summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-22 15:37:06 +0100
committerBen Murdoch <benm@google.com>2010-07-27 10:20:25 +0100
commit967717af5423377c967781471ee106e2bb4e11c8 (patch)
tree1e701dc0a12f7f07cce1df4a7681717de77a211b
parentdcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff)
downloadexternal_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
-rw-r--r--Android.mk3
-rw-r--r--JavaScriptCore/CMakeLists.txt4
-rw-r--r--JavaScriptCore/CMakeListsEfl.txt4
-rw-r--r--JavaScriptCore/ChangeLog650
-rw-r--r--JavaScriptCore/Configurations/FeatureDefines.xcconfig1
-rw-r--r--JavaScriptCore/GNUmakefile.am20
-rw-r--r--JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp12
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops58
-rwxr-xr-xJavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh10
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops1
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops57
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops58
-rw-r--r--JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj126
-rw-r--r--JavaScriptCore/assembler/ARMAssembler.cpp8
-rw-r--r--JavaScriptCore/assembler/MacroAssemblerARM.h8
-rw-r--r--JavaScriptCore/bytecode/CodeBlock.cpp2
-rw-r--r--JavaScriptCore/bytecompiler/BytecodeGenerator.cpp17
-rw-r--r--JavaScriptCore/bytecompiler/BytecodeGenerator.h7
-rw-r--r--JavaScriptCore/bytecompiler/NodesCodegen.cpp35
-rw-r--r--JavaScriptCore/interpreter/Interpreter.cpp149
-rw-r--r--JavaScriptCore/jit/ExecutableAllocator.h10
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp46
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorPosix.cpp5
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp5
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorWin.cpp5
-rw-r--r--JavaScriptCore/jit/JIT.cpp4
-rw-r--r--JavaScriptCore/jit/JIT.h16
-rw-r--r--JavaScriptCore/jit/JITArithmetic.cpp2
-rw-r--r--JavaScriptCore/jit/JITArithmetic32_64.cpp2
-rw-r--r--JavaScriptCore/jit/JITCall.cpp6
-rw-r--r--JavaScriptCore/jit/JITCall32_64.cpp6
-rw-r--r--JavaScriptCore/jit/JITInlineMethods.h9
-rw-r--r--JavaScriptCore/jit/JITOpcodes.cpp35
-rw-r--r--JavaScriptCore/jit/JITOpcodes32_64.cpp34
-rw-r--r--JavaScriptCore/jit/JITStubs.cpp85
-rw-r--r--JavaScriptCore/jit/JITStubs.h27
-rw-r--r--JavaScriptCore/jit/ThunkGenerators.cpp18
-rw-r--r--JavaScriptCore/parser/JSParser.cpp12
-rw-r--r--JavaScriptCore/parser/JSParser.h19
-rw-r--r--JavaScriptCore/parser/Lexer.cpp621
-rw-r--r--JavaScriptCore/parser/Lexer.h5
-rw-r--r--JavaScriptCore/parser/Nodes.cpp2
-rw-r--r--JavaScriptCore/parser/Nodes.h9
-rw-r--r--JavaScriptCore/parser/Parser.h29
-rw-r--r--JavaScriptCore/parser/SourceProvider.h10
-rw-r--r--JavaScriptCore/qt/ChangeLog112
-rw-r--r--JavaScriptCore/qt/api/QtScript.pro4
-rw-r--r--JavaScriptCore/qt/api/qscriptengine_p.cpp22
-rw-r--r--JavaScriptCore/qt/api/qscriptengine_p.h28
-rw-r--r--JavaScriptCore/qt/api/qscriptoriginalglobalobject_p.h186
-rw-r--r--JavaScriptCore/qt/api/qscriptvalue_p.h29
-rw-r--r--JavaScriptCore/qt/api/qscriptvalueiterator.cpp226
-rw-r--r--JavaScriptCore/qt/api/qscriptvalueiterator.h63
-rw-r--r--JavaScriptCore/qt/api/qscriptvalueiterator_p.h172
-rw-r--r--JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp24
-rw-r--r--JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h1
-rw-r--r--JavaScriptCore/qt/tests/qscriptvalueiterator/qscriptvalueiterator.pro7
-rw-r--r--JavaScriptCore/qt/tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp531
-rw-r--r--JavaScriptCore/qt/tests/tests.pro1
-rw-r--r--JavaScriptCore/runtime/ArrayConstructor.cpp2
-rw-r--r--JavaScriptCore/runtime/ArrayPrototype.cpp35
-rw-r--r--JavaScriptCore/runtime/ExceptionHelpers.cpp5
-rw-r--r--JavaScriptCore/runtime/ExceptionHelpers.h2
-rw-r--r--JavaScriptCore/runtime/Executable.cpp254
-rw-r--r--JavaScriptCore/runtime/Executable.h168
-rw-r--r--JavaScriptCore/runtime/FunctionConstructor.cpp11
-rw-r--r--JavaScriptCore/runtime/JSActivation.cpp2
-rw-r--r--JavaScriptCore/runtime/JSArray.cpp45
-rw-r--r--JavaScriptCore/runtime/JSArray.h26
-rw-r--r--JavaScriptCore/runtime/JSGlobalData.cpp39
-rw-r--r--JavaScriptCore/runtime/JSGlobalData.h18
-rw-r--r--JavaScriptCore/runtime/JSGlobalObject.h2
-rw-r--r--JavaScriptCore/runtime/RegExpConstructor.cpp2
-rw-r--r--JavaScriptCore/runtime/RegExpKey.h13
-rw-r--r--JavaScriptCore/wtf/MathExtras.h8
-rw-r--r--JavaScriptCore/wtf/PassRefPtr.h6
-rw-r--r--JavaScriptCore/wtf/Platform.h13
-rw-r--r--JavaScriptCore/wtf/RetainPtr.h2
-rw-r--r--JavaScriptCore/wtf/text/StringImpl.h31
-rw-r--r--JavaScriptCore/yarr/RegexJIT.cpp2
-rw-r--r--LayoutTests/fast/events/touch/touch-active-state-expected.txt9
-rw-r--r--LayoutTests/fast/events/touch/touch-active-state.html48
-rw-r--r--LayoutTests/fast/js/resources/js-test-pre.js23
-rw-r--r--SunSpider/ChangeLog9
-rwxr-xr-xSunSpider/sunspider2
-rw-r--r--WebCore/Android.jscbindings.mk9
-rw-r--r--WebCore/Android.mk9
-rw-r--r--WebCore/Android.v8bindings.mk1
-rw-r--r--WebCore/CMakeLists.txt32
-rw-r--r--WebCore/ChangeLog5758
-rw-r--r--WebCore/Configurations/FeatureDefines.xcconfig1
-rw-r--r--WebCore/DerivedSources.make8
-rw-r--r--WebCore/English.lproj/localizedStrings.jsbin42592 -> 42440 bytes
-rw-r--r--WebCore/GNUmakefile.am1414
-rw-r--r--WebCore/WebCore.exp.in47
-rw-r--r--WebCore/WebCore.gyp/WebCore.gyp17
-rw-r--r--WebCore/WebCore.gyp/scripts/rule_binding.py17
-rw-r--r--WebCore/WebCore.gypi26
-rw-r--r--WebCore/WebCore.order2
-rw-r--r--WebCore/WebCore.pri111
-rw-r--r--WebCore/WebCore.pro228
-rw-r--r--WebCore/WebCore.vcproj/WebCore.vcproj1226
-rw-r--r--WebCore/WebCore.vcproj/WebCoreCommon.vsprops50
-rw-r--r--WebCore/WebCore.xcodeproj/project.pbxproj357
-rw-r--r--WebCore/WebCorePrefix.h12
-rw-r--r--WebCore/accessibility/AccessibilityImageMapLink.cpp16
-rw-r--r--WebCore/accessibility/AccessibilityImageMapLink.h1
-rw-r--r--WebCore/accessibility/AccessibilityListBoxOption.cpp9
-rw-r--r--WebCore/accessibility/AccessibilityListBoxOption.h3
-rw-r--r--WebCore/accessibility/AccessibilityObject.cpp52
-rw-r--r--WebCore/accessibility/AccessibilityObject.h17
-rw-r--r--WebCore/accessibility/AccessibilityRenderObject.cpp101
-rw-r--r--WebCore/accessibility/AccessibilityRenderObject.h10
-rw-r--r--WebCore/accessibility/AccessibilityTable.cpp30
-rw-r--r--WebCore/accessibility/AccessibilityTableCell.cpp7
-rw-r--r--WebCore/accessibility/AccessibilityTableColumn.cpp3
-rw-r--r--WebCore/bindings/generic/RuntimeEnabledFeatures.cpp1
-rw-r--r--WebCore/bindings/generic/RuntimeEnabledFeatures.h6
-rw-r--r--WebCore/bindings/js/JSBindingsAllInOne.cpp1
-rw-r--r--WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp17
-rw-r--r--WebCore/bindings/js/JSConsoleCustom.cpp7
-rw-r--r--WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp83
-rw-r--r--WebCore/bindings/js/ScriptArray.cpp15
-rw-r--r--WebCore/bindings/js/ScriptArray.h36
-rw-r--r--WebCore/bindings/js/ScriptCallStack.cpp20
-rw-r--r--WebCore/bindings/js/ScriptController.cpp6
-rw-r--r--WebCore/bindings/js/ScriptController.h4
-rw-r--r--WebCore/bindings/js/ScriptDebugServer.cpp2
-rw-r--r--WebCore/bindings/js/ScriptDebugServer.h4
-rw-r--r--WebCore/bindings/js/StringSourceProvider.h4
-rw-r--r--WebCore/bindings/objc/WebScriptObject.mm21
-rw-r--r--WebCore/bindings/objc/WebScriptObjectPrivate.h10
-rw-r--r--WebCore/bindings/scripts/CodeGenerator.pm28
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorCPP.pm1
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorJS.pm3
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorObjC.pm1
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorV8.pm34
-rw-r--r--WebCore/bindings/scripts/IDLParser.pm8
-rw-r--r--WebCore/bindings/scripts/IDLStructure.pm3
-rwxr-xr-xWebCore/bindings/scripts/generate-bindings.pl9
-rw-r--r--WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h8
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.cpp56
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.h7
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestObj.h8
-rw-r--r--WebCore/bindings/scripts/test/TestObj.idl7
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestObj.cpp15
-rw-r--r--WebCore/bindings/v8/DOMData.h15
-rw-r--r--WebCore/bindings/v8/DOMDataStore.cpp9
-rw-r--r--WebCore/bindings/v8/ScriptArray.cpp19
-rw-r--r--WebCore/bindings/v8/ScriptArray.h38
-rw-r--r--WebCore/bindings/v8/ScriptCallFrame.cpp9
-rw-r--r--WebCore/bindings/v8/ScriptCallFrame.h1
-rw-r--r--WebCore/bindings/v8/ScriptCallStack.cpp124
-rw-r--r--WebCore/bindings/v8/ScriptCallStack.h18
-rw-r--r--WebCore/bindings/v8/ScriptController.cpp10
-rw-r--r--WebCore/bindings/v8/ScriptController.h4
-rw-r--r--WebCore/bindings/v8/ScriptDebugServer.cpp41
-rw-r--r--WebCore/bindings/v8/ScriptDebugServer.h6
-rw-r--r--WebCore/bindings/v8/ScriptSourceCode.h8
-rw-r--r--WebCore/bindings/v8/V8ConsoleMessage.cpp34
-rw-r--r--WebCore/bindings/v8/V8ConsoleMessage.h5
-rw-r--r--WebCore/bindings/v8/V8DOMMap.h9
-rw-r--r--WebCore/bindings/v8/V8DOMWindowShell.cpp44
-rw-r--r--WebCore/bindings/v8/V8DOMWindowShell.h5
-rw-r--r--WebCore/bindings/v8/V8DOMWrapper.cpp2
-rw-r--r--WebCore/bindings/v8/custom/V8ConsoleCustom.cpp25
-rw-r--r--WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp90
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp78
-rw-r--r--WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp5
-rw-r--r--WebCore/bridge/qt/qt_runtime.cpp2
-rw-r--r--WebCore/css/CSSComputedStyleDeclaration.cpp8
-rw-r--r--WebCore/css/CSSParser.cpp72
-rw-r--r--WebCore/css/CSSProperty.cpp20
-rw-r--r--WebCore/css/CSSPropertyNames.in9
-rw-r--r--WebCore/css/CSSSegmentedFontFace.cpp19
-rw-r--r--WebCore/css/CSSSegmentedFontFace.h3
-rw-r--r--WebCore/css/CSSSelector.cpp75
-rw-r--r--WebCore/css/CSSSelector.h10
-rw-r--r--WebCore/css/CSSStyleSelector.cpp27
-rw-r--r--WebCore/css/CSSStyleSelector.h8
-rw-r--r--WebCore/css/WebKitCSSTransformValue.idl3
-rw-r--r--WebCore/dom/CharacterData.cpp29
-rw-r--r--WebCore/dom/CharacterData.h3
-rw-r--r--WebCore/dom/ContainerNode.cpp20
-rw-r--r--WebCore/dom/DOMCoreException.idl3
-rw-r--r--WebCore/dom/DeviceOrientation.cpp89
-rw-r--r--WebCore/dom/DeviceOrientation.h60
-rw-r--r--WebCore/dom/DeviceOrientationClient.h3
-rw-r--r--WebCore/dom/DeviceOrientationController.cpp50
-rw-r--r--WebCore/dom/DeviceOrientationController.h12
-rw-r--r--WebCore/dom/DeviceOrientationEvent.cpp25
-rw-r--r--WebCore/dom/DeviceOrientationEvent.h20
-rw-r--r--WebCore/dom/DeviceOrientationEvent.idl8
-rw-r--r--WebCore/dom/EventException.idl3
-rw-r--r--WebCore/dom/Node.cpp3
-rw-r--r--WebCore/dom/Node.idl3
-rw-r--r--WebCore/dom/NodeRareData.h12
-rw-r--r--WebCore/dom/OverflowEvent.idl4
-rw-r--r--WebCore/dom/RangeException.idl2
-rw-r--r--WebCore/dom/TreeWalker.cpp8
-rw-r--r--WebCore/editing/DeleteSelectionCommand.cpp4
-rw-r--r--WebCore/editing/InsertLineBreakCommand.cpp5
-rw-r--r--WebCore/editing/InsertListCommand.cpp99
-rw-r--r--WebCore/editing/InsertListCommand.h2
-rw-r--r--WebCore/editing/InsertParagraphSeparatorCommand.cpp6
-rw-r--r--WebCore/html/Blob.cpp5
-rw-r--r--WebCore/html/Blob.h1
-rw-r--r--WebCore/html/BlobBuilder.cpp33
-rw-r--r--WebCore/html/File.cpp20
-rw-r--r--WebCore/html/File.h16
-rw-r--r--WebCore/html/File.idl3
-rw-r--r--WebCore/html/FileError.idl3
-rw-r--r--WebCore/html/FileReader.idl3
-rw-r--r--WebCore/html/FormDataList.cpp5
-rw-r--r--WebCore/html/HTMLAttributeNames.in1
-rw-r--r--WebCore/html/HTMLCanvasElement.cpp22
-rw-r--r--WebCore/html/HTMLCanvasElement.h8
-rw-r--r--WebCore/html/HTMLConstructionSite.cpp137
-rw-r--r--WebCore/html/HTMLConstructionSite.h23
-rw-r--r--WebCore/html/HTMLElementStack.cpp16
-rw-r--r--WebCore/html/HTMLElementStack.h2
-rw-r--r--WebCore/html/HTMLFormElement.cpp7
-rw-r--r--WebCore/html/HTMLFormElement.h4
-rw-r--r--WebCore/html/HTMLFormattingElementList.cpp45
-rw-r--r--WebCore/html/HTMLFormattingElementList.h25
-rw-r--r--WebCore/html/HTMLInputElement.cpp89
-rw-r--r--WebCore/html/HTMLInputElement.h5
-rw-r--r--WebCore/html/HTMLInputElement.idl7
-rw-r--r--WebCore/html/HTMLLinkElement.cpp4
-rw-r--r--WebCore/html/HTMLLinkElement.h1
-rw-r--r--WebCore/html/HTMLMediaElement.cpp103
-rw-r--r--WebCore/html/HTMLMediaElement.h3
-rw-r--r--WebCore/html/HTMLMediaElement.idl3
-rw-r--r--WebCore/html/HTMLToken.h23
-rw-r--r--WebCore/html/HTMLTreeBuilder.cpp334
-rw-r--r--WebCore/html/HTMLTreeBuilder.h18
-rw-r--r--WebCore/html/LegacyHTMLTreeBuilder.cpp46
-rw-r--r--WebCore/html/LegacyHTMLTreeBuilder.h1
-rw-r--r--WebCore/html/TimeRanges.cpp22
-rw-r--r--WebCore/html/TimeRanges.h2
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.cpp78
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.h2
-rw-r--r--WebCore/html/canvas/CanvasStyle.cpp24
-rw-r--r--WebCore/html/canvas/CanvasStyle.h2
-rw-r--r--WebCore/html/canvas/Float32Array.idl3
-rw-r--r--WebCore/html/canvas/Int16Array.idl3
-rw-r--r--WebCore/html/canvas/Int32Array.idl3
-rw-r--r--WebCore/html/canvas/Int8Array.idl3
-rw-r--r--WebCore/html/canvas/Uint16Array.idl3
-rw-r--r--WebCore/html/canvas/Uint32Array.idl3
-rw-r--r--WebCore/html/canvas/Uint8Array.idl3
-rw-r--r--WebCore/html/canvas/WebGLBuffer.cpp62
-rw-r--r--WebCore/html/canvas/WebGLBuffer.h2
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.cpp184
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.h17
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.idl6
-rw-r--r--WebCore/html/canvas/WebGLTexture.cpp212
-rw-r--r--WebCore/html/canvas/WebGLTexture.h57
-rw-r--r--WebCore/inspector/CodeGeneratorInspector.pm243
-rw-r--r--WebCore/inspector/ConsoleMessage.cpp57
-rw-r--r--WebCore/inspector/ConsoleMessage.h21
-rw-r--r--WebCore/inspector/Inspector.idl158
-rw-r--r--WebCore/inspector/InspectorBackend.cpp77
-rw-r--r--WebCore/inspector/InspectorBackend.h10
-rw-r--r--WebCore/inspector/InspectorBackend.idl10
-rw-r--r--WebCore/inspector/InspectorCSSStore.cpp6
-rw-r--r--WebCore/inspector/InspectorController.cpp78
-rw-r--r--WebCore/inspector/InspectorController.h32
-rw-r--r--WebCore/inspector/InspectorDOMAgent.cpp37
-rw-r--r--WebCore/inspector/InspectorDOMAgent.h13
-rw-r--r--WebCore/inspector/InspectorFrontend.cpp18
-rw-r--r--WebCore/inspector/InspectorFrontend.h2
-rw-r--r--WebCore/inspector/InspectorFrontend2.idl39
-rw-r--r--WebCore/inspector/InspectorResource.cpp5
-rw-r--r--WebCore/inspector/InspectorResource.h1
-rw-r--r--WebCore/inspector/InspectorTimelineAgent.cpp6
-rw-r--r--WebCore/inspector/InspectorTimelineAgent.h8
-rw-r--r--WebCore/inspector/InspectorValues.cpp7
-rw-r--r--WebCore/inspector/InspectorValues.h4
-rw-r--r--WebCore/inspector/JavaScriptCallFrame.idl6
-rw-r--r--WebCore/inspector/front-end/AbstractTimelinePanel.js3
-rw-r--r--WebCore/inspector/front-end/ConsoleView.js129
-rw-r--r--WebCore/inspector/front-end/ElementsPanel.js8
-rw-r--r--WebCore/inspector/front-end/ElementsTreeOutline.js3
-rw-r--r--WebCore/inspector/front-end/InjectedScript.js2
-rw-r--r--WebCore/inspector/front-end/InjectedScriptAccess.js2
-rw-r--r--WebCore/inspector/front-end/InspectorBackendStub.js10
-rw-r--r--WebCore/inspector/front-end/Resource.js22
-rw-r--r--WebCore/inspector/front-end/ResourcesPanel.js63
-rw-r--r--WebCore/inspector/front-end/ScriptsPanel.js12
-rw-r--r--WebCore/inspector/front-end/Settings.js3
-rw-r--r--WebCore/inspector/front-end/SourceCSSTokenizer.js6
-rw-r--r--WebCore/inspector/front-end/StoragePanel.js14
-rw-r--r--WebCore/inspector/front-end/TimelinePanel.js50
-rw-r--r--WebCore/inspector/front-end/inspector.css31
-rw-r--r--WebCore/inspector/front-end/inspector.js41
-rw-r--r--WebCore/inspector/front-end/treeoutline.js19
-rw-r--r--WebCore/inspector/front-end/utilities.js5
-rw-r--r--WebCore/loader/CachedScript.cpp7
-rw-r--r--WebCore/loader/CachedScript.h1
-rw-r--r--WebCore/loader/DocumentLoader.h4
-rw-r--r--WebCore/loader/DocumentThreadableLoader.cpp10
-rw-r--r--WebCore/loader/EmptyClients.h8
-rw-r--r--WebCore/loader/FrameLoader.cpp63
-rw-r--r--WebCore/loader/FrameLoader.h2
-rw-r--r--WebCore/loader/FrameLoaderClient.h2
-rw-r--r--WebCore/loader/FrameLoaderTypes.h23
-rw-r--r--WebCore/loader/MainResourceLoader.cpp22
-rw-r--r--WebCore/loader/SubframeLoader.cpp15
-rw-r--r--WebCore/loader/SubresourceLoader.cpp10
-rw-r--r--WebCore/loader/appcache/ApplicationCacheGroup.cpp25
-rw-r--r--WebCore/loader/appcache/DOMApplicationCache.idl3
-rw-r--r--WebCore/loader/icon/IconLoader.cpp6
-rw-r--r--WebCore/loader/loader.cpp2
-rw-r--r--WebCore/manual-tests/css3-background-layer-count.html38
-rw-r--r--WebCore/manual-tests/win/contextmenu-key2.html13
-rw-r--r--WebCore/notifications/NotificationCenter.cpp5
-rw-r--r--WebCore/page/Chrome.cpp4
-rw-r--r--WebCore/page/Chrome.h3
-rw-r--r--WebCore/page/ChromeClient.h14
-rw-r--r--WebCore/page/Console.cpp24
-rw-r--r--WebCore/page/Console.h11
-rw-r--r--WebCore/page/Console.idl6
-rw-r--r--WebCore/page/DOMWindow.cpp38
-rw-r--r--WebCore/page/DOMWindow.h2
-rw-r--r--WebCore/page/DOMWindow.idl4
-rw-r--r--WebCore/page/EditorClient.h2
-rw-r--r--WebCore/page/EventHandler.cpp44
-rw-r--r--WebCore/page/EventHandler.h6
-rw-r--r--WebCore/page/FocusController.cpp9
-rw-r--r--WebCore/page/Frame.cpp24
-rw-r--r--WebCore/page/FrameView.cpp2
-rw-r--r--WebCore/page/FrameView.h2
-rw-r--r--WebCore/page/Geolocation.cpp17
-rw-r--r--WebCore/page/Geolocation.h3
-rw-r--r--WebCore/page/MemoryInfo.cpp8
-rw-r--r--WebCore/page/MemoryInfo.h6
-rw-r--r--WebCore/page/Navigation.cpp16
-rw-r--r--WebCore/page/Navigation.h13
-rw-r--r--WebCore/page/Page.cpp7
-rw-r--r--WebCore/page/Page.h8
-rw-r--r--WebCore/page/PageGroup.cpp39
-rw-r--r--WebCore/page/PageGroup.h3
-rw-r--r--WebCore/page/Performance.cpp9
-rw-r--r--WebCore/page/Performance.h3
-rw-r--r--WebCore/page/Performance.idl1
-rw-r--r--WebCore/page/PrintContext.cpp48
-rw-r--r--WebCore/page/PrintContext.h4
-rw-r--r--WebCore/page/Settings.cpp4
-rw-r--r--WebCore/page/Settings.h7
-rw-r--r--WebCore/page/SpatialNavigation.cpp11
-rw-r--r--WebCore/page/SpeechInput.cpp67
-rw-r--r--WebCore/page/SpeechInput.h72
-rw-r--r--WebCore/page/SpeechInputClient.h53
-rw-r--r--WebCore/page/SpeechInputClientListener.h54
-rw-r--r--WebCore/page/SpeechInputListener.h54
-rw-r--r--WebCore/page/Timing.cpp224
-rw-r--r--WebCore/page/Timing.h19
-rw-r--r--WebCore/page/Timing.idl23
-rw-r--r--WebCore/page/animation/AnimationBase.cpp12
-rw-r--r--WebCore/page/animation/AnimationBase.h9
-rw-r--r--WebCore/page/animation/AnimationController.cpp22
-rw-r--r--WebCore/page/animation/AnimationController.h3
-rw-r--r--WebCore/page/animation/AnimationControllerPrivate.h3
-rw-r--r--WebCore/page/animation/CompositeAnimation.cpp8
-rw-r--r--WebCore/page/animation/CompositeAnimation.h4
-rw-r--r--WebCore/page/animation/ImplicitAnimation.cpp2
-rw-r--r--WebCore/page/animation/KeyframeAnimation.cpp2
-rw-r--r--WebCore/page/chromium/ChromeClientChromium.h10
-rw-r--r--WebCore/page/mac/EventHandlerMac.mm6
-rw-r--r--WebCore/platform/BlobItem.cpp142
-rw-r--r--WebCore/platform/BlobItem.h25
-rw-r--r--WebCore/platform/Cursor.cpp473
-rw-r--r--WebCore/platform/Cursor.h96
-rw-r--r--WebCore/platform/FileChooser.h6
-rw-r--r--WebCore/platform/HostWindow.h5
-rw-r--r--WebCore/platform/KURLGoogle.cpp53
-rw-r--r--WebCore/platform/MIMETypeRegistry.cpp1
-rw-r--r--WebCore/platform/PopupMenuClient.h1
-rw-r--r--WebCore/platform/Widget.h4
-rw-r--r--WebCore/platform/brew/PopupMenuBrew.cpp3
-rw-r--r--WebCore/platform/chromium/ChromiumBridge.h2
-rw-r--r--WebCore/platform/chromium/CursorChromium.cpp8
-rw-r--r--WebCore/platform/chromium/GLES2Context.h12
-rw-r--r--WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp221
-rw-r--r--WebCore/platform/chromium/PlatformThemeChromiumGtk.h71
-rw-r--r--WebCore/platform/chromium/PopupMenuChromium.cpp54
-rw-r--r--WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp216
-rw-r--r--WebCore/platform/chromium/ThemeChromiumMac.mm132
-rw-r--r--WebCore/platform/efl/CursorEfl.cpp18
-rw-r--r--WebCore/platform/efl/PopupMenuEfl.cpp3
-rw-r--r--WebCore/platform/efl/SoundEfl.cpp4
-rw-r--r--WebCore/platform/efl/WidgetEfl.cpp24
-rw-r--r--WebCore/platform/graphics/Color.h13
-rw-r--r--WebCore/platform/graphics/FloatPoint.h22
-rw-r--r--WebCore/platform/graphics/Font.cpp3
-rw-r--r--WebCore/platform/graphics/Font.h4
-rw-r--r--WebCore/platform/graphics/GraphicsContext3D.h16
-rw-r--r--WebCore/platform/graphics/GraphicsLayer.h5
-rw-r--r--WebCore/platform/graphics/ImageBuffer.h5
-rw-r--r--WebCore/platform/graphics/MediaPlayer.cpp16
-rw-r--r--WebCore/platform/graphics/MediaPlayer.h7
-rw-r--r--WebCore/platform/graphics/MediaPlayerPrivate.h3
-rw-r--r--WebCore/platform/graphics/Path.h1
-rw-r--r--WebCore/platform/graphics/WidthIterator.cpp23
-rw-r--r--WebCore/platform/graphics/cairo/FontCairo.cpp4
-rw-r--r--WebCore/platform/graphics/cairo/PathCairo.cpp9
-rw-r--r--WebCore/platform/graphics/cg/ColorCG.cpp11
-rw-r--r--WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp37
-rw-r--r--WebCore/platform/graphics/cg/PathCG.cpp8
-rw-r--r--WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp3
-rw-r--r--WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp25
-rw-r--r--WebCore/platform/graphics/chromium/GraphicsLayerChromium.h2
-rw-r--r--WebCore/platform/graphics/chromium/LayerRendererChromium.cpp21
-rw-r--r--WebCore/platform/graphics/chromium/LayerRendererChromium.h9
-rw-r--r--WebCore/platform/graphics/chromium/VideoLayerChromium.cpp50
-rw-r--r--WebCore/platform/graphics/chromium/VideoLayerChromium.h54
-rw-r--r--WebCore/platform/graphics/haiku/PathHaiku.cpp8
-rw-r--r--WebCore/platform/graphics/mac/ComplexTextController.cpp18
-rw-r--r--WebCore/platform/graphics/mac/GraphicsContext3DMac.mm87
-rw-r--r--WebCore/platform/graphics/mac/GraphicsLayerCA.h1
-rw-r--r--WebCore/platform/graphics/mac/GraphicsLayerCA.mm8
-rw-r--r--WebCore/platform/graphics/mac/WebLayer.h8
-rw-r--r--WebCore/platform/graphics/mac/WebLayer.mm51
-rw-r--r--WebCore/platform/graphics/mac/WebTiledLayer.mm22
-rw-r--r--WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp4
-rw-r--r--WebCore/platform/graphics/openvg/PathOpenVG.cpp7
-rw-r--r--WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp13
-rw-r--r--WebCore/platform/graphics/qt/GraphicsContextQt.cpp157
-rw-r--r--WebCore/platform/graphics/qt/ImageBufferQt.cpp15
-rw-r--r--WebCore/platform/graphics/qt/ImageQt.cpp4
-rw-r--r--WebCore/platform/graphics/qt/PathQt.cpp35
-rw-r--r--WebCore/platform/graphics/qt/StillImageQt.cpp74
-rw-r--r--WebCore/platform/graphics/qt/StillImageQt.h10
-rw-r--r--WebCore/platform/graphics/skia/ImageBufferSkia.cpp5
-rw-r--r--WebCore/platform/graphics/skia/PathSkia.cpp7
-rw-r--r--WebCore/platform/graphics/skia/SkiaUtils.cpp12
-rw-r--r--WebCore/platform/graphics/win/GraphicsLayerCACF.cpp2
-rw-r--r--WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp1
-rw-r--r--WebCore/platform/graphics/wince/PathWince.cpp7
-rw-r--r--WebCore/platform/graphics/wx/PathWx.cpp7
-rw-r--r--WebCore/platform/gtk/CursorGtk.cpp22
-rw-r--r--WebCore/platform/gtk/FileSystemGtk.cpp32
-rw-r--r--WebCore/platform/gtk/PasteboardHelper.cpp1
-rw-r--r--WebCore/platform/gtk/RenderThemeGtk.cpp7
-rw-r--r--WebCore/platform/haiku/CursorHaiku.cpp12
-rw-r--r--WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp69
-rw-r--r--WebCore/platform/mac/CursorMac.mm403
-rw-r--r--WebCore/platform/mac/FileSystemMac.mm25
-rw-r--r--WebCore/platform/mac/ThemeMac.mm2
-rw-r--r--WebCore/platform/mac/WidgetMac.mm9
-rw-r--r--WebCore/platform/network/Credential.cpp2
-rw-r--r--WebCore/platform/network/Credential.h2
-rw-r--r--WebCore/platform/network/CredentialStorage.cpp5
-rw-r--r--WebCore/platform/network/CredentialStorage.h1
-rw-r--r--WebCore/platform/network/FormData.cpp5
-rw-r--r--WebCore/platform/network/ResourceHandle.cpp37
-rw-r--r--WebCore/platform/network/ResourceHandle.h16
-rw-r--r--WebCore/platform/network/ResourceHandleInternal.h8
-rw-r--r--WebCore/platform/network/ResourceResponseBase.cpp16
-rw-r--r--WebCore/platform/network/ResourceResponseBase.h6
-rw-r--r--WebCore/platform/network/cf/ResourceErrorCF.cpp2
-rw-r--r--WebCore/platform/network/cf/ResourceHandleCFNet.cpp338
-rw-r--r--WebCore/platform/network/cf/ResourceRequestCFNet.cpp5
-rw-r--r--WebCore/platform/network/curl/FormDataStreamCurl.cpp8
-rw-r--r--WebCore/platform/network/curl/ResourceHandleManager.cpp34
-rw-r--r--WebCore/platform/network/mac/ResourceHandleMac.mm495
-rw-r--r--WebCore/platform/network/qt/QNetworkReplyHandler.cpp14
-rw-r--r--WebCore/platform/network/qt/ResourceHandleQt.cpp9
-rw-r--r--WebCore/platform/network/soup/ResourceHandleSoup.cpp18
-rw-r--r--WebCore/platform/qt/CursorQt.cpp8
-rw-r--r--WebCore/platform/qt/GeolocationServiceQt.cpp12
-rw-r--r--WebCore/platform/qt/RenderThemeQt.cpp2
-rw-r--r--WebCore/platform/qt/WidgetQt.cpp5
-rw-r--r--WebCore/platform/text/LineEnding.cpp150
-rw-r--r--WebCore/platform/text/LineEnding.h56
-rw-r--r--WebCore/platform/win/ClipboardUtilitiesWin.cpp82
-rw-r--r--WebCore/platform/win/ClipboardUtilitiesWin.h6
-rw-r--r--WebCore/platform/win/ClipboardWin.cpp25
-rw-r--r--WebCore/platform/win/ClipboardWin.h106
-rw-r--r--WebCore/platform/win/CursorWin.cpp433
-rw-r--r--WebCore/platform/win/PasteboardWin.cpp24
-rw-r--r--WebCore/platform/win/WidgetWin.cpp25
-rw-r--r--WebCore/platform/wince/CursorWince.cpp8
-rw-r--r--WebCore/platform/wx/CursorWx.cpp10
-rw-r--r--WebCore/plugins/PluginStream.cpp2
-rw-r--r--WebCore/plugins/PluginViewBase.h (renamed from WebCore/plugins/PluginWidget.h)21
-rw-r--r--WebCore/plugins/mac/PluginWidgetMac.mm49
-rw-r--r--WebCore/plugins/win/PluginViewWin.cpp6
-rw-r--r--WebCore/rendering/RenderBlock.cpp5
-rw-r--r--WebCore/rendering/RenderBox.cpp6
-rw-r--r--WebCore/rendering/RenderEmbeddedObject.cpp8
-rw-r--r--WebCore/rendering/RenderFileUploadControl.cpp13
-rw-r--r--WebCore/rendering/RenderFileUploadControl.h3
-rw-r--r--WebCore/rendering/RenderForeignObject.cpp7
-rw-r--r--WebCore/rendering/RenderLayer.cpp2
-rw-r--r--WebCore/rendering/RenderLayerBacking.cpp106
-rw-r--r--WebCore/rendering/RenderLayerBacking.h10
-rw-r--r--WebCore/rendering/RenderLayerCompositor.cpp12
-rw-r--r--WebCore/rendering/RenderMenuList.cpp8
-rw-r--r--WebCore/rendering/RenderMenuList.h1
-rw-r--r--WebCore/rendering/RenderObject.cpp14
-rw-r--r--WebCore/rendering/RenderObjectChildList.cpp16
-rw-r--r--WebCore/rendering/RenderPath.cpp6
-rw-r--r--WebCore/rendering/RenderSVGContainer.cpp6
-rw-r--r--WebCore/rendering/RenderSVGImage.cpp8
-rw-r--r--WebCore/rendering/RenderSVGModelObject.cpp8
-rw-r--r--WebCore/rendering/RenderSVGModelObject.h1
-rw-r--r--WebCore/rendering/RenderSVGResource.cpp30
-rw-r--r--WebCore/rendering/RenderSVGResource.h3
-rw-r--r--WebCore/rendering/RenderSVGResourceClipper.cpp48
-rw-r--r--WebCore/rendering/RenderSVGResourceClipper.h3
-rw-r--r--WebCore/rendering/RenderSVGResourceContainer.h53
-rw-r--r--WebCore/rendering/RenderSVGResourceFilter.cpp13
-rw-r--r--WebCore/rendering/RenderSVGResourceGradient.cpp13
-rw-r--r--WebCore/rendering/RenderSVGResourceMarker.cpp12
-rw-r--r--WebCore/rendering/RenderSVGResourceMasker.cpp32
-rw-r--r--WebCore/rendering/RenderSVGResourceMasker.h2
-rw-r--r--WebCore/rendering/RenderSVGResourcePattern.cpp29
-rw-r--r--WebCore/rendering/RenderSVGResourcePattern.h2
-rw-r--r--WebCore/rendering/RenderSVGRoot.cpp2
-rw-r--r--WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp5
-rw-r--r--WebCore/rendering/RenderSVGShadowTreeRootContainer.h2
-rw-r--r--WebCore/rendering/RenderSVGText.cpp6
-rw-r--r--WebCore/rendering/RenderTextControlSingleLine.cpp42
-rw-r--r--WebCore/rendering/RenderTextControlSingleLine.h3
-rw-r--r--WebCore/rendering/RenderTheme.cpp15
-rw-r--r--WebCore/rendering/RenderThemeChromiumLinux.cpp32
-rw-r--r--WebCore/rendering/RenderThemeChromiumLinux.h14
-rw-r--r--WebCore/rendering/RenderThemeChromiumWin.cpp150
-rw-r--r--WebCore/rendering/RenderThemeChromiumWin.h14
-rw-r--r--WebCore/rendering/RenderThemeMac.mm9
-rw-r--r--WebCore/rendering/RenderTreeAsText.cpp32
-rw-r--r--WebCore/rendering/RenderTreeAsText.h3
-rw-r--r--WebCore/rendering/RenderView.cpp19
-rw-r--r--WebCore/rendering/TextControlInnerElements.cpp97
-rw-r--r--WebCore/rendering/TextControlInnerElements.h33
-rw-r--r--WebCore/rendering/style/FillLayer.cpp35
-rw-r--r--WebCore/rendering/style/RenderStyle.h4
-rw-r--r--WebCore/storage/AbstractDatabase.cpp14
-rw-r--r--WebCore/storage/AbstractDatabase.h11
-rw-r--r--WebCore/storage/ChangeVersionWrapper.cpp6
-rw-r--r--WebCore/storage/Database.cpp33
-rw-r--r--WebCore/storage/Database.h5
-rw-r--r--WebCore/storage/DatabaseAuthorizer.cpp4
-rw-r--r--WebCore/storage/DatabaseCallback.h2
-rw-r--r--WebCore/storage/DatabaseSync.cpp91
-rw-r--r--WebCore/storage/DatabaseSync.h44
-rw-r--r--WebCore/storage/DatabaseSync.idl42
-rw-r--r--WebCore/storage/DatabaseTracker.cpp1
-rw-r--r--WebCore/storage/IDBAny.h7
-rw-r--r--WebCore/storage/IDBDatabaseRequest.cpp6
-rw-r--r--WebCore/storage/IDBDatabaseRequest.h1
-rw-r--r--WebCore/storage/IDBKeyRange.cpp6
-rw-r--r--WebCore/storage/IDBKeyRange.h8
-rw-r--r--WebCore/storage/IDBObjectStoreRequest.cpp14
-rw-r--r--WebCore/storage/IDBObjectStoreRequest.h1
-rw-r--r--WebCore/storage/IndexedDatabaseRequest.cpp4
-rw-r--r--WebCore/storage/IndexedDatabaseRequest.h1
-rw-r--r--WebCore/storage/SQLError.h2
-rw-r--r--WebCore/storage/SQLException.idl3
-rw-r--r--WebCore/storage/SQLResultSet.cpp3
-rw-r--r--WebCore/storage/SQLResultSet.h5
-rw-r--r--WebCore/storage/SQLStatementCallback.h2
-rw-r--r--WebCore/storage/SQLStatementErrorCallback.h2
-rw-r--r--WebCore/storage/SQLStatementSync.cpp127
-rw-r--r--WebCore/storage/SQLStatementSync.h63
-rw-r--r--WebCore/storage/SQLTransaction.cpp7
-rw-r--r--WebCore/storage/SQLTransaction.h6
-rw-r--r--WebCore/storage/SQLTransactionCallback.h2
-rw-r--r--WebCore/storage/SQLTransactionClient.cpp25
-rw-r--r--WebCore/storage/SQLTransactionClient.h21
-rw-r--r--WebCore/storage/SQLTransactionErrorCallback.h2
-rw-r--r--WebCore/storage/SQLTransactionSync.cpp179
-rw-r--r--WebCore/storage/SQLTransactionSync.h57
-rw-r--r--WebCore/storage/SQLTransactionSync.idl42
-rw-r--r--WebCore/storage/SQLTransactionSyncCallback.h45
-rw-r--r--WebCore/storage/SQLTransactionSyncCallback.idl42
-rw-r--r--WebCore/storage/chromium/DatabaseTrackerChromium.cpp6
-rw-r--r--WebCore/storage/chromium/SQLTransactionClientChromium.cpp30
-rw-r--r--WebCore/svg/SVGAllInOne.cpp3
-rw-r--r--WebCore/svg/SVGAnimateElement.cpp7
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.cpp19
-rw-r--r--WebCore/svg/SVGAnimateTransformElement.cpp8
-rw-r--r--WebCore/svg/SVGCircleElement.cpp7
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.idl5
-rw-r--r--WebCore/svg/SVGEllipseElement.cpp7
-rw-r--r--WebCore/svg/SVGException.idl3
-rw-r--r--WebCore/svg/SVGFEBlendElement.idl7
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.idl7
-rw-r--r--WebCore/svg/SVGFECompositeElement.idl7
-rw-r--r--WebCore/svg/SVGFEConvolveMatrixElement.idl8
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.idl7
-rw-r--r--WebCore/svg/SVGFEImageElement.cpp12
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.idl7
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.idl7
-rw-r--r--WebCore/svg/SVGFilterElement.cpp17
-rw-r--r--WebCore/svg/SVGFilterElement.h3
-rw-r--r--WebCore/svg/SVGFont.cpp2
-rw-r--r--WebCore/svg/SVGForeignObjectElement.cpp5
-rw-r--r--WebCore/svg/SVGGElement.cpp5
-rw-r--r--WebCore/svg/SVGGlyphElement.cpp6
-rw-r--r--WebCore/svg/SVGGradientElement.idl13
-rw-r--r--WebCore/svg/SVGImageElement.cpp5
-rw-r--r--WebCore/svg/SVGLineElement.cpp7
-rw-r--r--WebCore/svg/SVGPaint.cpp15
-rw-r--r--WebCore/svg/SVGPaint.h6
-rw-r--r--WebCore/svg/SVGParserUtilities.cpp658
-rw-r--r--WebCore/svg/SVGParserUtilities.h5
-rw-r--r--WebCore/svg/SVGPathBuilder.cpp77
-rw-r--r--WebCore/svg/SVGPathBuilder.h63
-rw-r--r--WebCore/svg/SVGPathConsumer.h68
-rw-r--r--WebCore/svg/SVGPathElement.cpp12
-rw-r--r--WebCore/svg/SVGPathParser.cpp509
-rw-r--r--WebCore/svg/SVGPathParser.h69
-rw-r--r--WebCore/svg/SVGPathSegListBuilder.cpp160
-rw-r--r--WebCore/svg/SVGPathSegListBuilder.h62
-rw-r--r--WebCore/svg/SVGPolyElement.cpp7
-rw-r--r--WebCore/svg/SVGRectElement.cpp7
-rw-r--r--WebCore/svg/SVGSVGElement.cpp11
-rw-r--r--WebCore/svg/SVGStopElement.cpp14
-rw-r--r--WebCore/svg/SVGStopElement.h1
-rw-r--r--WebCore/svg/SVGStyledElement.cpp30
-rw-r--r--WebCore/svg/SVGStyledElement.h1
-rw-r--r--WebCore/svg/SVGTRefElement.cpp3
-rw-r--r--WebCore/svg/SVGTextElement.cpp3
-rw-r--r--WebCore/svg/SVGTextPathElement.cpp3
-rw-r--r--WebCore/svg/SVGTextPositioningElement.cpp3
-rw-r--r--WebCore/svg/SVGUseElement.cpp16
-rw-r--r--WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp44
-rw-r--r--WebCore/websockets/WebSocket.cpp4
-rw-r--r--WebCore/websockets/WebSocket.h2
-rw-r--r--WebCore/xml/XMLHttpRequest.cpp9
-rw-r--r--WebCore/xml/XMLHttpRequestException.idl3
-rw-r--r--WebCore/xml/XPathException.idl3
-rw-r--r--WebKit/CMakeListsEfl.txt1
-rw-r--r--WebKit/ChangeLog97
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj30
-rw-r--r--WebKit/chromium/ChangeLog853
-rw-r--r--WebKit/chromium/DEPS4
-rw-r--r--WebKit/chromium/WebKit.gyp148
-rw-r--r--WebKit/chromium/WebKit.gypi1
-rw-r--r--WebKit/chromium/features.gypi2
-rw-r--r--WebKit/chromium/public/WebApplicationCacheHost.h44
-rw-r--r--WebKit/chromium/public/WebApplicationCacheHostClient.h3
-rw-r--r--WebKit/chromium/public/WebCommon.h2
-rw-r--r--WebKit/chromium/public/WebFileChooserParams.h2
-rw-r--r--WebKit/chromium/public/WebFormElement.h1
-rw-r--r--WebKit/chromium/public/WebIDBDatabaseError.h3
-rw-r--r--WebKit/chromium/public/WebIDBKey.h3
-rw-r--r--WebKit/chromium/public/WebMediaElement.h56
-rw-r--r--WebKit/chromium/public/WebOptionElement.h75
-rw-r--r--WebKit/chromium/public/WebPlugin.h3
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h3
-rw-r--r--WebKit/chromium/public/WebSelectElement.h9
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebThemeEngine.h4
-rw-r--r--WebKit/chromium/public/WebURLLoaderClient.h16
-rw-r--r--WebKit/chromium/public/WebURLRequest.h5
-rw-r--r--WebKit/chromium/public/WebURLResponse.h9
-rw-r--r--WebKit/chromium/public/WebView.h10
-rw-r--r--WebKit/chromium/public/WebViewClient.h6
-rw-r--r--WebKit/chromium/src/ApplicationCacheHostInternal.h5
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.cpp81
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.h14
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp20
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h6
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp8
-rw-r--r--WebKit/chromium/src/DebuggerAgentManager.cpp4
-rw-r--r--WebKit/chromium/src/EditorClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/EditorClientImpl.h1
-rw-r--r--WebKit/chromium/src/GLES2Context.cpp58
-rw-r--r--WebKit/chromium/src/GLES2ContextInternal.cpp52
-rw-r--r--WebKit/chromium/src/GLES2ContextInternal.h55
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp60
-rw-r--r--WebKit/chromium/src/InspectorFrontendClientImpl.cpp3
-rw-r--r--WebKit/chromium/src/ResourceHandle.cpp7
-rw-r--r--WebKit/chromium/src/WebAccessibilityCacheImpl.cpp7
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebDevToolsFrontendImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebFormElement.cpp14
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp18
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseError.cpp10
-rw-r--r--WebKit/chromium/src/WebIDBKey.cpp10
-rw-r--r--WebKit/chromium/src/WebMediaElement.cpp64
-rw-r--r--WebKit/chromium/src/WebMediaPlayerClientImpl.cpp64
-rw-r--r--WebKit/chromium/src/WebMediaPlayerClientImpl.h18
-rw-r--r--WebKit/chromium/src/WebOptionElement.cpp100
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h1
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp10
-rw-r--r--WebKit/chromium/src/WebSelectElement.cpp12
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--WebKit/chromium/src/WebURLRequest.cpp10
-rw-r--r--WebKit/chromium/src/WebURLRequestPrivate.h8
-rw-r--r--WebKit/chromium/src/WebURLResponse.cpp20
-rw-r--r--WebKit/chromium/src/WebURLResponsePrivate.h5
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp69
-rw-r--r--WebKit/chromium/src/WebViewImpl.h17
-rw-r--r--WebKit/chromium/src/gtk/WebFontInfo.cpp17
-rw-r--r--WebKit/chromium/src/js/DebuggerAgent.js1605
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js5
-rw-r--r--WebKit/chromium/src/js/DevTools.js106
-rw-r--r--WebKit/chromium/src/js/DevToolsHostStub.js3
-rw-r--r--WebKit/chromium/src/js/InspectorControllerImpl.js120
-rw-r--r--WebKit/chromium/src/js/Tests.js122
-rwxr-xr-xWebKit/chromium/src/js/devTools.css4
-rw-r--r--WebKit/chromium/tests/PopupMenuTest.cpp1
-rw-r--r--WebKit/efl/ChangeLog5
-rw-r--r--WebKit/efl/EWebLauncher/main.c1
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp3
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.h2
-rw-r--r--WebKit/efl/WebCoreSupport/EditorClientEfl.cpp5
-rw-r--r--WebKit/efl/WebCoreSupport/EditorClientEfl.h1
-rw-r--r--WebKit/efl/ewk/EWebKit.h1
-rw-r--r--WebKit/efl/ewk/ewk_cookies.cpp221
-rw-r--r--WebKit/efl/ewk/ewk_cookies.h64
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp2
-rw-r--r--WebKit/gtk/ChangeLog35
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp3
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp4
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h1
-rw-r--r--WebKit/gtk/po/ChangeLog9
-rw-r--r--WebKit/gtk/po/webkit.pot1076
-rw-r--r--WebKit/gtk/tests/testwebview.c5
-rw-r--r--WebKit/haiku/ChangeLog25
-rw-r--r--WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp3
-rw-r--r--WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h2
-rw-r--r--WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp6
-rw-r--r--WebKit/haiku/WebCoreSupport/EditorClientHaiku.h2
-rw-r--r--WebKit/mac/Carbon/CarbonWindowAdapter.mm6
-rw-r--r--WebKit/mac/ChangeLog310
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig1
-rw-r--r--WebKit/mac/DOM/WebDOMOperations.mm28
-rw-r--r--WebKit/mac/DOM/WebDOMOperationsPrivate.h6
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.h1
-rw-r--r--WebKit/mac/Misc/WebCoreStatistics.mm12
-rw-r--r--WebKit/mac/Misc/WebIconDatabase.mm2
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.h1
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.mm21
-rw-r--r--WebKit/mac/Misc/WebNSPasteboardExtras.mm2
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.h4
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm8
-rw-r--r--WebKit/mac/Plugins/WebPluginController.h7
-rw-r--r--WebKit/mac/Plugins/WebPluginController.mm43
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h2
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm9
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.h1
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm4
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h7
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm109
-rw-r--r--WebKit/mac/WebKit.exp1
-rw-r--r--WebKit/mac/WebKit.order2
-rw-r--r--WebKit/mac/WebView/WebDataSource.mm10
-rw-r--r--WebKit/mac/WebView/WebDataSourcePrivate.h2
-rw-r--r--WebKit/mac/WebView/WebHTMLRepresentation.mm2
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm2
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm13
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebRenderLayer.h53
-rw-r--r--WebKit/mac/WebView/WebRenderLayer.mm280
-rw-r--r--WebKit/mac/WebView/WebView.mm28
-rw-r--r--WebKit/mac/WebView/WebViewData.h1
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h4
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp19
-rw-r--r--WebKit/qt/Api/qgraphicswebview.h6
-rw-r--r--WebKit/qt/ChangeLog116
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp3
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp5
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.cpp4
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.h1
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp3
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h1
-rw-r--r--WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp3
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.cpp3
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.h7
-rw-r--r--WebKit/qt/tests/qwebelement/tst_qwebelement.cpp4
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp6
-rw-r--r--WebKit/win/ChangeLog191
-rw-r--r--WebKit/win/DOMCoreClasses.cpp13
-rw-r--r--WebKit/win/DOMCoreClasses.h3
-rw-r--r--WebKit/win/Interfaces/DOMPrivate.idl1
-rw-r--r--WebKit/win/Interfaces/IWebDataSource.idl1
-rw-r--r--WebKit/win/Interfaces/IWebPreferencesPrivate.idl3
-rw-r--r--WebKit/win/Interfaces/IWebViewPrivate.idl2
-rw-r--r--WebKit/win/Interfaces/WebKit.idl1
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.cpp21
-rw-r--r--WebKit/win/WebCoreSupport/WebChromeClient.h3
-rw-r--r--WebKit/win/WebCoreSupport/WebEditorClient.cpp4
-rw-r--r--WebKit/win/WebCoreSupport/WebEditorClient.h1
-rw-r--r--WebKit/win/WebDataSource.cpp10
-rw-r--r--WebKit/win/WebDataSource.h3
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.sln469
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.vcproj12
-rw-r--r--WebKit/win/WebPreferenceKeysPrivate.h2
-rw-r--r--WebKit/win/WebPreferences.cpp14
-rw-r--r--WebKit/win/WebPreferences.h3
-rw-r--r--WebKit/win/WebView.cpp43
-rw-r--r--WebKit/win/WebView.h9
-rw-r--r--WebKit/wx/ChangeLog25
-rw-r--r--WebKit/wx/WebKitSupport/ChromeClientWx.cpp3
-rw-r--r--WebKit/wx/WebKitSupport/ChromeClientWx.h2
-rw-r--r--WebKit/wx/WebKitSupport/EditorClientWx.cpp5
-rw-r--r--WebKit/wx/WebKitSupport/EditorClientWx.h1
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json11
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg4
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html1
-rw-r--r--WebKitTools/ChangeLog1177
-rw-r--r--WebKitTools/DumpRenderTree/LayoutTestController.cpp47
-rw-r--r--WebKitTools/DumpRenderTree/LayoutTestController.h11
-rw-r--r--WebKitTools/DumpRenderTree/PixelDumpSupport.cpp8
-rw-r--r--WebKitTools/DumpRenderTree/PixelDumpSupport.h1
-rw-r--r--WebKitTools/DumpRenderTree/WorkQueueItem.h15
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp9
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.h6
-rw-r--r--WebKitTools/DumpRenderTree/chromium/TestShell.cpp2
-rwxr-xr-xWebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp58
-rw-r--r--WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h4
-rw-r--r--WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp10
-rw-r--r--WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm2
-rw-r--r--WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm9
-rw-r--r--WebKitTools/DumpRenderTree/mac/ObjCController.m14
-rw-r--r--WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm55
-rw-r--r--WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm8
-rw-r--r--WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm9
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp1
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp11
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h2
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp12
-rw-r--r--WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h16
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp19
-rw-r--r--WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h1
-rw-r--r--WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp25
-rw-r--r--WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp12
-rw-r--r--WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp16
-rw-r--r--WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp12
-rw-r--r--WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp5
-rw-r--r--WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops24
-rw-r--r--WebKitTools/MiniBrowser/MBToolbarItem.h28
-rw-r--r--WebKitTools/MiniBrowser/MBToolbarItem.m35
-rw-r--r--WebKitTools/MiniBrowser/MiniBrowser.vcproj205
-rw-r--r--WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj6
-rw-r--r--WebKitTools/MiniBrowser/mac/BrowserWindow.xib645
-rw-r--r--WebKitTools/MiniBrowser/mac/BrowserWindowController.h5
-rw-r--r--WebKitTools/MiniBrowser/mac/BrowserWindowController.m102
-rw-r--r--WebKitTools/MiniBrowser/qt/BrowserWindow.cpp38
-rw-r--r--WebKitTools/MiniBrowser/qt/BrowserWindow.h3
-rw-r--r--WebKitTools/MiniBrowser/win/BrowserWindow.cpp1
-rw-r--r--WebKitTools/MiniBrowser/win/MiniBrowser.rc11
-rwxr-xr-xWebKitTools/Scripts/build-webkit2
-rwxr-xr-xWebKitTools/Scripts/build-webkittestrunner2
-rwxr-xr-xWebKitTools/Scripts/check-header-includes103
-rwxr-xr-xWebKitTools/Scripts/old-run-webkit-tests7
-rwxr-xr-xWebKitTools/Scripts/sunspider-compare-results2
-rwxr-xr-xWebKitTools/Scripts/update-webkit-chromium12
-rw-r--r--WebKitTools/Scripts/webkitdirs.pm5
-rw-r--r--WebKitTools/Scripts/webkitperl/httpd.pm51
-rw-r--r--WebKitTools/Scripts/webkitpy/common/config/committers.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/common/net/statusserver.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/base.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py4
-rw-r--r--WebKitTools/Scripts/webkitpy/thirdparty/__init__.py4
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/__init__.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/queries.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py113
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py38
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/mocktool.py3
-rw-r--r--WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig3
-rw-r--r--WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig2
-rw-r--r--WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops25
-rw-r--r--WebKitTools/WebKitTestRunner/DerivedSources.make49
-rw-r--r--WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h1
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h35
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm525
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h42
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp79
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h50
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl45
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp3
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp7
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp89
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h12
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp108
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h27
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm75
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp35
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj355
-rw-r--r--WebKitTools/WebKitTestRunner/TestController.cpp70
-rw-r--r--WebKitTools/WebKitTestRunner/TestController.h9
-rw-r--r--WebKitTools/WebKitTestRunner/TestInvocation.cpp13
-rw-r--r--WebKitTools/WebKitTestRunner/TestInvocation.h2
-rw-r--r--WebKitTools/WebKitTestRunner/WebKitTestRunner.sln78
-rw-r--r--WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj184
-rw-r--r--WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h3
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/AHEM____.TTFbin0 -> 12480 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/ColorBits-A.pngbin0 -> 585 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/ColorBits.ttfbin0 -> 1028 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttfbin0 -> 28812 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttfbin0 -> 28780 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttfbin0 -> 28512 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttfbin0 -> 28512 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttfbin0 -> 28440 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttfbin0 -> 28424 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttfbin0 -> 28460 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttfbin0 -> 28384 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm23
-rwxr-xr-xWebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj53
-rw-r--r--WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp33
-rw-r--r--WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp25
-rw-r--r--WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp9
-rw-r--r--WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln13
-rw-r--r--WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj64
-rw-r--r--WebKitTools/WebKitTestRunner/win/build-generated-files.sh42
-rw-r--r--WebKitTools/wx/build/settings.py1
924 files changed, 30377 insertions, 11786 deletions
diff --git a/Android.mk b/Android.mk
index 5d7496b..ca23094 100644
--- a/Android.mk
+++ b/Android.mk
@@ -127,7 +127,10 @@ LOCAL_C_INCLUDES := \
LOCAL_C_INCLUDES := $(LOCAL_C_INCLUDES) \
$(LOCAL_PATH)/WebCore \
$(LOCAL_PATH)/WebCore/accessibility \
+<<<<<<< HEAD:Android.mk
$(LOCAL_PATH)/WebCore/bindings/ \
+=======
+>>>>>>> webkit.org at r63859:Android.mk
$(LOCAL_PATH)/WebCore/bindings/generic \
$(LOCAL_PATH)/WebCore/css \
$(LOCAL_PATH)/WebCore/dom \
diff --git a/JavaScriptCore/CMakeLists.txt b/JavaScriptCore/CMakeLists.txt
index bdb1467..efcc05d 100644
--- a/JavaScriptCore/CMakeLists.txt
+++ b/JavaScriptCore/CMakeLists.txt
@@ -50,10 +50,6 @@ SET(JavaScriptCore_SOURCES
interpreter/RegisterFile.cpp
jit/ExecutableAllocator.cpp
- jit/ExecutableAllocatorFixedVMPool.cpp
- jit/ExecutableAllocatorPosix.cpp
- jit/ExecutableAllocatorSymbian.cpp
- jit/ExecutableAllocatorWin.cpp
jit/JITArithmetic32_64.cpp
jit/JITArithmetic.cpp
jit/JITCall32_64.cpp
diff --git a/JavaScriptCore/CMakeListsEfl.txt b/JavaScriptCore/CMakeListsEfl.txt
index aca73a8..945ad52 100644
--- a/JavaScriptCore/CMakeListsEfl.txt
+++ b/JavaScriptCore/CMakeListsEfl.txt
@@ -1,4 +1,6 @@
LIST(APPEND JavaScriptCore_SOURCES
+ jit/ExecutableAllocatorFixedVMPool.cpp
+ jit/ExecutableAllocatorPosix.cpp
runtime/MarkStackPosix.cpp
)
@@ -8,4 +10,4 @@ LIST(APPEND JavaScriptCore_LIBRARIES
LIST(APPEND JavaScriptCore_LINK_FLAGS
${ECORE_LDFLAGS}
-) \ No newline at end of file
+)
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 0acccc8..5e01de2 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,653 @@
+2010-07-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit on Windows should build optionally with an unversioned ICU DLL
+ https://bugs.webkit.org/show_bug.cgi?id=42722
+ <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU
+
+ Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh.
+ Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API
+ should be namespaced with the current ICU version number. Proper value is determined
+ by checking for the presence of libicuuc.lib, the unversioned copy of ICU.
+
+ To get the proper value for U_DISABLE_RENAMING into all source files, we force
+ the include of ICUVersion.h (our generated header) via the compiler options.
+
+ Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
+ we copy the ICU lib to an intermediate location under obj with a common name. This
+ allows us to link properly with either without adding a new build configuration.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ Copy ICU libs into a common location with a common name.
+ Add additional library search path to pick up icu lib.
+ Change ICU library filename specified to linker.
+ Add forced include of ICUVersion.h.
+ * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h
+ * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h.
+ * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
+ Copy ICU libs into a common location with a common name.
+ Add additional library search path to pick up icu lib.
+ Change ICU library filename specified to linker.
+ Add forced include of ICUVersion.h.
+ * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
+ Copy ICU libs into a common location with a common name.
+ Add additional library search path to pick up icu lib.
+ Change ICU library filename specified to linker.
+ Add forced include of ICUVersion.h.
+
+2010-07-20 Steve Falkenburg <sfalken@apple.com>
+
+ Re-save vsprops files after no-op edits in Visual Studio
+ to fix manual edit issues.
+
+2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Steve Block.
+
+ Need to be able to configure Geolocation policy regarding user permissions
+ https://bugs.webkit.org/show_bug.cgi?id=42068
+
+ If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
+ by default
+
+ * wtf/Platform.h:
+
+2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63742.
+ http://trac.webkit.org/changeset/63742
+ https://bugs.webkit.org/show_bug.cgi?id=42641
+
+ Broke Leopard Intel build. (Requested by bbandix on #webkit).
+
+ * wtf/Platform.h:
+
+2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Steve Block.
+
+ Need to be able to configure Geolocation policy regarding user permissions
+ https://bugs.webkit.org/show_bug.cgi?id=42068
+
+ If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
+ by default
+
+ * wtf/Platform.h:
+
+2010-07-19 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG CleanUp of SVGPathData parsing
+ https://bugs.webkit.org/show_bug.cgi?id=41410
+
+ Added piOverTwo to MathExtras.
+
+ * wtf/MathExtras.h:
+
+2010-07-19 Mike Moretti <mike.moretti@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Symbian] Build fix after r63404.
+
+ Implement isValid() function for the Symbian executable allocator.
+
+ * jit/ExecutableAllocatorSymbian.cpp:
+ (JSC::ExecutableAllocator::isValid):
+
+2010-07-19 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42118
+ Disable WebGL on Leopard for now.
+
+ LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
+ GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
+ SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
+ software OpenGL driver on machines without this support.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-07-16 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Use OwnPtr for CodeBlock objects
+ https://bugs.webkit.org/show_bug.cgi?id=42490
+
+ * runtime/Executable.cpp:
+ (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline.
+ Eliminated the code that used to initialize the raw pointer since it's now
+ an OwnPtr.
+ (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here.
+ (JSC::ProgramExecutable::ProgramExecutable): Ditto.
+ (JSC::ProgramExecutable::~ProgramExecutable): Ditto.
+ (JSC::FunctionExecutable::FunctionExecutable): Ditto.
+ (JSC::FunctionExecutable::~FunctionExecutable): Ditto.
+ (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get.
+ (JSC::ProgramExecutable::compileInternal): Ditto.
+ (JSC::FunctionExecutable::compileForCallInternal): Ditto.
+ (JSC::FunctionExecutable::compileForConstructInternal): Ditto.
+ (JSC::FunctionExecutable::recompile): Use clear instead of delete followed
+ by assignment of 0.
+
+ * runtime/Executable.h: Moved constructors to the cpp file and changed
+ raw pointers to OwnPtr.
+
+2010-07-19 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Fix build on 64-bit systems. According to
+ JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which
+ needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build
+ system.
+ https://bugs.webkit.org/show_bug.cgi?id=42559
+
+ * CMakeListsEfl.txt: add missing file for x86_64.
+
+2010-07-16 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Unreviewed build system cleanup.
+
+ Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from
+ root CMakeLists.txt to the platform CMakeLists.txt.
+
+ * CMakeLists.txt:
+ * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp.
+
+2010-07-16 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ ES5 allows use of reserved words as IdentifierName
+ https://bugs.webkit.org/show_bug.cgi?id=42471
+
+ Modify the lexer to allow us to avoid identifying reserved
+ words in those contexts where they are valid identifiers, and
+ we know it's safe. Additionally tag the reserved word tokens
+ so we can easily identify them in those cases where we can't
+ guarantee that we've skipped reserved word identification.
+
+ * parser/JSParser.cpp:
+ (JSC::JSParser::next):
+ (JSC::JSParser::parseProperty):
+ (JSC::JSParser::parseMemberExpression):
+ * parser/JSParser.h:
+ (JSC::):
+ * parser/Lexer.cpp:
+ (JSC::Lexer::lex):
+ * parser/Lexer.h:
+ (JSC::Lexer::):
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ clang++ build fixes for JavaScriptCore and WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=42478
+
+ * runtime/RegExpKey.h:
+ (JSC::operator==):
+ Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Levin.
+
+ Really add WARN_UNUSED_RESULT to leakRef
+ https://bugs.webkit.org/show_bug.cgi?id=42464
+
+ * wtf/PassRefPtr.h:
+ (WTF::PassRefPtr::):
+ (WTF::NonNullPassRefPtr::):
+ Put the WARN_UNUSED_RESULT attribute at the right place.
+
+ * wtf/RetainPtr.h:
+ (WTF::RetainPtr::releaseRef):
+ Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need
+ to be fixed first.
+
+2010-07-15 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Disable c4291 for chromium windows multi dll build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42177
+
+ * JavaScriptCore.gyp/JavaScriptCore.gyp:
+
+2010-07-15 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Crash entering mail.yahoo.com
+ https://bugs.webkit.org/show_bug.cgi?id=42394
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the
+ identifier we're resolving is not a local variable, registerFor returns
+ NULL.
+
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I
+ noticed this while working on it: No need to NULL-check returnNode,
+ since an early return has already done so.
+
+2010-07-15 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ [GTK] Simplify the distribution step
+ https://bugs.webkit.org/show_bug.cgi?id=42414
+
+ * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead
+ of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list.
+ Refer to create_hash_table and create_regexp_tables directly, as is the
+ behavior with other code generation scripts.
+
+2010-07-15 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Fix dumping of op_put_by_id.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::printPutByIdOp):
+
+2010-07-15 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Refactoring some parts of the lexer
+ https://bugs.webkit.org/show_bug.cgi?id=41845
+
+ This patch is a precursor of refactoring the identifier
+ parsing, which currently slows down the lexer, and not
+ ready for landing. This patch contains those sources,
+ which does not slow down the lexer (mainly style changes).
+
+ SunSpider: no change (529.4ms to 528.7ms)
+ --parse-only: no change (31.0ms to 31.2ms)
+
+ * parser/Lexer.cpp:
+ (JSC::isIdentStart): using typesOfASCIICharacters to determine
+ whether the current character is in identifier start
+ (JSC::isIdentPart): using typesOfASCIICharacters to determine
+ whether the current character is in identifier part
+ (JSC::Lexer::parseString): style fix
+ (JSC::Lexer::lex): removing the else after the main which
+ which reduces code duplication
+
+2010-07-15 Mark Rowe <mrowe@apple.com>
+
+ Update the sorting in the Xcode project files.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+2010-07-14 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
+ https://bugs.webkit.org/show_bug.cgi?id=42310
+
+ Add some null checks to deal with the Fixed VM allocator failing
+ to get the requested executable region, delay the creation of the
+ JITStubs in JSGlobalData until after we know whether we're using
+ the JIT.
+
+ * jit/ExecutableAllocator.h:
+ (JSC::ExecutableAllocator::ExecutableAllocator):
+ (JSC::ExecutableAllocator::poolForSize):
+ * jit/ExecutableAllocatorFixedVMPool.cpp:
+ (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
+ (JSC::FixedVMPoolAllocator::alloc):
+ (JSC::FixedVMPoolAllocator::free):
+ (JSC::FixedVMPoolAllocator::isValid):
+ (JSC::ExecutableAllocator::isValid):
+ (JSC::ExecutablePool::systemAlloc):
+ (JSC::ExecutablePool::systemRelease):
+ * jit/ExecutableAllocatorPosix.cpp:
+ (JSC::ExecutableAllocator::isValid):
+ * jit/ExecutableAllocatorWin.cpp:
+ (JSC::ExecutableAllocator::isValid):
+ * jit/JIT.cpp:
+ (JSC::JIT::linkCall):
+ (JSC::JIT::linkConstruct):
+ * jit/JIT.h:
+ (JSC::JIT::compileCTIMachineTrampolines):
+ (JSC::JIT::compileCTINativeCall):
+ * jit/JITArithmetic.cpp:
+ (JSC::JIT::emit_op_mod):
+ * jit/JITArithmetic32_64.cpp:
+ (JSC::JIT::emit_op_mod):
+ * jit/JITCall.cpp:
+ (JSC::JIT::compileOpCallVarargs):
+ (JSC::JIT::compileOpCall):
+ (JSC::JIT::compileOpCallSlowCase):
+ * jit/JITCall32_64.cpp:
+ (JSC::JIT::compileOpCallVarargs):
+ (JSC::JIT::compileOpCall):
+ (JSC::JIT::compileOpCallSlowCase):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::privateCompileCTINativeCall):
+ * jit/JITStubs.cpp:
+ (JSC::JITThunks::JITThunks):
+ (JSC::JITThunks::tryCacheGetByID):
+ (JSC::JITThunks::hostFunctionStub):
+ * jit/ThunkGenerators.cpp:
+ (JSC::charCodeAtThunkGenerator):
+ (JSC::charAtThunkGenerator):
+ (JSC::fromCharCodeThunkGenerator):
+ (JSC::sqrtThunkGenerator):
+ (JSC::powThunkGenerator):
+ * runtime/Executable.h:
+ (JSC::NativeExecutable::create):
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::JSGlobalData):
+ (JSC::JSGlobalData::getHostFunction):
+ * runtime/JSGlobalData.h:
+ (JSC::JSGlobalData::getCTIStub):
+ * yarr/RegexJIT.cpp:
+ (JSC::Yarr::jitCompileRegex):
+
+2010-07-14 Gavin Barraclough <barraclough@apple.com>
+
+ Speculative Qt/Windows build fix.
+
+ * jit/JITStubs.h:
+
+2010-07-14 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42280
+ JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it!
+
+ * jit/JIT.h:
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::restoreArgumentReferenceForTrampoline):
+ * jit/JITStubs.cpp:
+ * jit/JITStubs.h:
+ * wtf/Platform.h:
+
+2010-07-14 Oliver Hunt <oliver@apple.com>
+
+ RS=Geoff Garen.
+
+ Guard the CF path of interpreter vs. jit selection with PLATFORM(CF)
+
+ This allows the code to work on windows as well. Also unifies the
+ environment variable with the preference name.
+
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::JSGlobalData):
+
+2010-07-14 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Don Melton.
+
+ Crash when trying to enable JIT and Interpreter in a single build.
+
+ CFPreferences code added at the last minute failed to account for
+ the preference not being present and then attempted to CFRelease
+ a null value.
+
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::JSGlobalData):
+
+2010-07-14 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Change indentations in the lexer
+ https://bugs.webkit.org/show_bug.cgi?id=41845
+
+ This patch fixes an old, indentation error comes from kjs,
+ as webkit has a different style rule for switches, and change
+ the indentation of the main switch, which is a temporary
+ style error. This change makes easier to see the behavioural
+ changes in the follow-up patch.
+
+ No behavioural changes.
+
+ * parser/Lexer.cpp:
+ (JSC::singleEscape):
+ (JSC::Lexer::lex):
+
+2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63262.
+ http://trac.webkit.org/changeset/63262
+ https://bugs.webkit.org/show_bug.cgi?id=42229
+
+ broke Windows compile (Requested by bweinstein on #webkit).
+
+ * API/tests/testapi.c:
+ (assertEqualsAsCharactersPtr):
+ (main):
+ * testapi.pro: Removed.
+
+2010-07-13 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ ES5 requires BOMs to be treated as whitespace
+ https://bugs.webkit.org/show_bug.cgi?id=42218
+
+ Add BOM character to the Lexer's definition of whitespace,
+ and remove the logic that dealt with stripping BOMs and
+ caching the cleaned string.
+
+ * parser/Lexer.h:
+ (JSC::Lexer::isWhiteSpace):
+ * parser/SourceProvider.h:
+ (JSC::UStringSourceProvider::create):
+ (JSC::UStringSourceProvider::UStringSourceProvider):
+ * wtf/text/StringImpl.h:
+
+2010-07-13 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Avoid slow-path for put() in Array.splice()
+ https://bugs.webkit.org/show_bug.cgi?id=41920
+
+ Defer creation of the returned array until its final size is known
+ to avoid growing it while adding elements.
+
+ * runtime/JSArray.cpp:
+ (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old)
+ and CreateCompact (which should only be used when constructing arrays whose
+ size and contents are known at the time of creation.)
+ (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact
+ initialization mode. (Only applies to non-empty arrays.)
+ (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone)
+ * runtime/JSArray.h:
+ (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact
+ arrays. Does no bounds or other sanity checking.
+ * runtime/ArrayPrototype.cpp:
+ (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray.
+ * runtime/ArrayConstructor.cpp:
+ (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor.
+ * runtime/JSGlobalObject.h:
+ (JSC::constructEmptyArray): Pass CreateInitialized to ctor.
+ * runtime/RegExpConstructor.cpp:
+ (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor.
+
+2010-07-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 42207 - Clean up interface to compile executables, always check for exceptions
+
+ Presently interface to compile executable is inconsistent between eval/program and
+ function code, and is error prone in allowing a caller to byte compile without JIT
+ compiling an executable (we rely on all executables with codeblocks having JIT code).
+ Unify on an interface where all compilation is performed by a single compile (with
+ ForCall|ForConstruct variants) method, and make all clients check for errors.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::unwindCallFrame):
+ (JSC::Interpreter::execute):
+ (JSC::Interpreter::executeCall):
+ (JSC::Interpreter::executeConstruct):
+ (JSC::Interpreter::prepareForRepeatCall):
+ (JSC::Interpreter::privateExecute):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * parser/Parser.h:
+ (JSC::Parser::isFunctionBodyNode):
+ (JSC::Parser::parse):
+ * runtime/ArrayPrototype.cpp:
+ (JSC::isNumericCompareFunction):
+ * runtime/ExceptionHelpers.cpp:
+ (JSC::createStackOverflowError):
+ * runtime/ExceptionHelpers.h:
+ * runtime/Executable.cpp:
+ (JSC::EvalExecutable::compileInternal):
+ (JSC::ProgramExecutable::checkSyntax):
+ (JSC::ProgramExecutable::compileInternal):
+ (JSC::FunctionExecutable::compileForCallInternal):
+ (JSC::FunctionExecutable::compileForConstructInternal):
+ (JSC::FunctionExecutable::reparseExceptionInfo):
+ (JSC::EvalExecutable::reparseExceptionInfo):
+ (JSC::FunctionExecutable::fromGlobalCode):
+ * runtime/Executable.h:
+ (JSC::EvalExecutable::compile):
+ (JSC::EvalExecutable::generatedBytecode):
+ (JSC::EvalExecutable::generatedJITCode):
+ (JSC::ProgramExecutable::compile):
+ (JSC::ProgramExecutable::generatedBytecode):
+ (JSC::ProgramExecutable::generatedJITCode):
+ (JSC::FunctionExecutable::generatedBytecode):
+ (JSC::FunctionExecutable::compileForCall):
+ (JSC::FunctionExecutable::compileForConstruct):
+ (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
+ * runtime/FunctionConstructor.cpp:
+ (JSC::constructFunction):
+ * runtime/JSActivation.cpp:
+ (JSC::JSActivation::argumentsGetter):
+ * runtime/JSGlobalData.h:
+ (JSC::JSGlobalData::canUseJIT):
+
+2010-07-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Reviewed by Oliver Hunt.
+
+ testapi.c depends on the Core Foundation.
+ https://bugs.webkit.org/show_bug.cgi?id=40058
+
+ Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
+ to compile in Qt environments.
+
+ All tests should work except for the JSStringCreateWithCharacters() function,
+ because its tests depend on Core Foundation specific functions.
+
+ * API/tests/testapi.c:
+ (testJSStringRefCF): moved CoreFoundation specific tests to this function.
+ (main): The moves plus some minor tweaks.
+ * testapi.pro: Added.
+
+2010-07-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 42182 - Change how numeric compare functions are detected
+
+ There are three problems with the current mechanism:
+ * It requires that a function executable be bytecode compiled without
+ being JIT generated (in order to copy the bytecode from the numeric
+ compare function). This is a problem since we have an invariant when
+ running with the JIT that functions are never bytecode compiled without
+ also being JIT generated (after checking the codeblock we assume the
+ function has JIT code). To help maintain this invariant
+ * This implementation will prevent us from experimenting with alternate
+ compilation paths which do not compile via bytecode.
+ * It doesn't work. Functions passing more than two arguments will match
+ if they are comparing their last two arguments, not the first two.
+ Generally the mapping back from bytecode to semantics may be more
+ complex then initially expected.
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::generate):
+ (JSC::BytecodeGenerator::setIsNumericCompareFunction):
+ (JSC::BytecodeGenerator::argumentNumberFor):
+ * bytecompiler/BytecodeGenerator.h:
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::BlockNode::singleStatement):
+ (JSC::FunctionBodyNode::emitBytecode):
+ * parser/Nodes.h:
+ (JSC::ExpressionNode::isSubtract):
+ (JSC::BinaryOpNode::lhs):
+ (JSC::BinaryOpNode::rhs):
+ (JSC::SubNode::isSubtract):
+ (JSC::ReturnNode::value):
+ * runtime/JSGlobalData.cpp:
+ (JSC::JSGlobalData::JSGlobalData):
+ * runtime/JSGlobalData.h:
+
+2010-07-12 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
+ https://bugs.webkit.org/show_bug.cgi?id=41763
+
+ There are two parts to this patch, the first is to fix the actual
+ problem. When calling copyStringWithoutBOMs on a string we know
+ to contain BOMs we return a value indicating that there are no
+ BOMs.
+
+ The second part of this fix is simply to harden the path that
+ led to a crash when parsing failed.
+
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ Harden compilation stubs against parser failure.
+ * parser/Lexer.cpp:
+ (JSC::Lexer::sourceCode):
+ Add assertions to ensure that subranges into a source provider
+ are always actually braces. Hopefully this should catch similar
+ failures in future. These assertions fire on existing tests
+ without this fix.
+ * runtime/Executable.h:
+ (JSC::FunctionExecutable::tryJitCodeForCall):
+ (JSC::FunctionExecutable::tryJitCodeForConstruct):
+ * wtf/text/StringImpl.h:
+ (WebCore::StringImpl::copyStringWithoutBOMs):
+ Make copyStringWithBOMs do the right thing.
+
+2010-07-13 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ Fix the constant encoding in data transfer instructions on ARM
+ https://bugs.webkit.org/show_bug.cgi?id=42166
+
+ The getImm function is designed to produce modified immediate constant
+ for data processing instructions. It should not be used to encode
+ any constant for data transfer. In the current situation there is no
+ way to use any immediate constant for data transfer. So, the moveImm
+ function is the desired method to pass the offset value to the data
+ transfer instructions.
+
+ Reported by Jacob Bramley.
+
+ * assembler/ARMAssembler.cpp:
+ (JSC::ARMAssembler::dataTransfer32):
+ * assembler/MacroAssemblerARM.h:
+ (JSC::MacroAssemblerARM::call32):
+
2010-07-09 Darin Adler <darin@apple.com>
Reviewed by Geoffrey Garen.
diff --git a/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/JavaScriptCore/Configurations/FeatureDefines.xcconfig
index 9a3ec0b..4b363aa 100644
--- a/JavaScriptCore/Configurations/FeatureDefines.xcconfig
+++ b/JavaScriptCore/Configurations/FeatureDefines.xcconfig
@@ -34,7 +34,6 @@
ENABLE_LINK_PREFETCH = ;
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-ENABLE_3D_CANVAS_1050 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS;
diff --git a/JavaScriptCore/GNUmakefile.am b/JavaScriptCore/GNUmakefile.am
index 28cff47..9a2886f 100644
--- a/JavaScriptCore/GNUmakefile.am
+++ b/JavaScriptCore/GNUmakefile.am
@@ -554,14 +554,14 @@ javascriptcore_sources += \
JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h
endif
-JavaScriptCore/Lexer.lut.h: $(CREATE_HASH_TABLE) $(srcdir)/JavaScriptCore/parser/Keywords.table
+JavaScriptCore/Lexer.lut.h: $(srcdir)/JavaScriptCore/create_hash_table $(srcdir)/JavaScriptCore/parser/Keywords.table
$(AM_V_GEN)$(PERL) $^ > $@
-JavaScriptCore/%.lut.h: $(CREATE_HASH_TABLE) $(srcdir)/JavaScriptCore/%.cpp
+JavaScriptCore/%.lut.h: $(srcdir)/JavaScriptCore/create_hash_table $(srcdir)/JavaScriptCore/%.cpp
$(AM_V_GEN)$(PERL) $^ -i > $@
JavaScriptCore/RegExpJitTables.h: $(srcdir)/JavaScriptCore/create_regex_tables
- $(AM_V_GEN)$(PYTHON) $(CREATE_REGEXP_TABLES) > $@
+ $(AM_V_GEN)$(PYTHON) $^ > $@
JavaScriptCore/pcre/chartables.c: $(srcdir)/JavaScriptCore/pcre/dftables
$(AM_V_GEN)$(PERL) $^ $@
@@ -627,20 +627,20 @@ Programs_jsc_CXXFLAGS = \
Programs_jsc_LDADD = \
libJavaScriptCore.la
-javascriptcore_dist += \
- $(CREATE_HASH_TABLE) \
- $(CREATE_REGEXP_TABLES) \
+EXTRA_DIST += \
JavaScriptCore/AUTHORS \
- JavaScriptCore/COPYING.LIB \
JavaScriptCore/ChangeLog \
- JavaScriptCore/THANKS \
+ JavaScriptCore/COPYING.LIB \
+ JavaScriptCore/create_hash_table \
+ JavaScriptCore/create_regex_tables \
JavaScriptCore/icu/LICENSE \
JavaScriptCore/icu/README \
- JavaScriptCore/pcre/COPYING \
+ JavaScriptCore/parser/Keywords.table \
JavaScriptCore/pcre/AUTHORS \
+ JavaScriptCore/pcre/COPYING \
JavaScriptCore/pcre/dftables \
JavaScriptCore/pcre/ucptable.cpp \
- JavaScriptCore/parser/Keywords.table
+ JavaScriptCore/THANKS
# Clean rules for JavaScriptCore
CLEANFILES += \
diff --git a/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp b/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
index 9e014dd..32270e8 100644
--- a/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
+++ b/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
@@ -142,6 +142,18 @@
'include_dirs!': [
'<(SHARED_INTERMEDIATE_DIR)/webkit',
],
+ 'conditions': [
+ ['inside_chromium_build==1 and component=="shared_library"', {
+ # Chromium windows multi-dll build enables c++ exception and this
+ # causes wtf generates 4291 warning due to operator new/delete
+ # implementations. Disable the warning for chromium windows
+ # multi-dll build.
+ 'msvs_disabled_warnings': [4291],
+ 'direct_dependent_settings': {
+ 'msvs_disabled_warnings': [4291],
+ },
+ }],
+ ],
}],
],
},
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
index ad81c36..c92196e 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops
@@ -1,26 +1,32 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="JavaScriptCoreCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\DerivedSources\&quot;;../../;../../API/;../../pcre/;../../parser/;../../bytecompiler/;../../jit/;../../runtime/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;"
- PreprocessorDefinitions="__STD_C"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="gdi32.lib oleaut32.lib winmm.lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib WTF$(WebKitConfigSuffix).lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
- ModuleDefinitionFile="JavaScriptCore.def"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\VM\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\bytecode\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\interpreter\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\assembler\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\jit\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\debugger\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\create_hash_table&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\pcre\pcre.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\AtomicString.cpp&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\StringImpl.cpp&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\WTFString.cpp&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\JavaScriptCore.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- />
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash &quot;$(WebKitLibrariesDir)\tools\scripts\auto-version.sh&quot; &quot;$(IntDir)&quot;&#x0D;&#x0A;"
- />
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="JavaScriptCoreCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\DerivedSources\&quot;;../../;../../API/;../../pcre/;../../parser/;../../bytecompiler/;../../jit/;../../runtime/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;"
+ PreprocessorDefinitions="__STD_C"
+ ForcedIncludeFiles="ICUVersion.h"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="gdi32.lib oleaut32.lib winmm.lib libicuin$(LibraryConfigSuffix).lib libicuuc$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib WTF$(WebKitConfigSuffix).lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitDLLConfigSuffix).dll"
+ AdditionalLibraryDirectories="&quot;$(IntDir)\lib&quot;"
+ ModuleDefinitionFile="JavaScriptCore.def"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\VM\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\bytecode\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\interpreter\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\assembler\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\jit\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\debugger\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\create_hash_table&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\pcre\pcre.h&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\AtomicString.cpp&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\StringImpl.cpp&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\wtf\text\WTFString.cpp&quot; &quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;&#x0D;&#x0A;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(OutDir)\JavaScriptCore.resources&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\$(ProjectName).resources\*&quot; &quot;$(OutDir)\$(ProjectName).resources&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;bash &quot;$(WebKitLibrariesDir)\tools\scripts\auto-version.sh&quot; &quot;$(IntDir)&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="mkdir 2&gt;NUL &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\icuuc$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\icuuc$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\icuin$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\icuin$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;cmd /c&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
index 5955365..85c3152 100755
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh
@@ -10,6 +10,16 @@ then
echo "#define QUARTZCORE_PRESENT $?" > "${QUARTZCOREPRESENT_H_PATH}"
fi
+# Determine whether we have the versioned ICU 4.0 or the unversioned ICU 4.4
+UNVERSIONED_ICU_LIB_PATH=$(cygpath -u "${WEBKITLIBRARIESDIR}/lib/libicuuc.lib")
+ICUVERSION_H_PATH=$(cygpath -u "${WEBKITOUTPUTDIR}/include/private/ICUVersion.h")
+if test \( ! -f "${ICUVERSION_H_PATH}" \) -o \( -f "${UNVERSIONED_ICU_LIB_PATH}" -a \( "${UNVERSIONED_ICU_LIB_PATH}" -nt "${ICUVERSION_H_PATH}" \) \)
+then
+ mkdir -p "$(dirname "${ICUVERSION_H_PATH}")"
+ test ! -f "${UNVERSIONED_ICU_LIB_PATH}"
+ echo "#define U_DISABLE_RENAMING $?" > "${ICUVERSION_H_PATH}"
+fi
+
NUMCPUS=`../../../WebKitTools/Scripts/num-cpus`
XSRCROOT="`pwd`/../.."
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops
index b41682f..c2569ba 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops
@@ -9,6 +9,7 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../parser/;../../wtf/;../../wtf/unicode/;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;../../../icu/include;../../bindings;../../bindings/c;../../bindings/jni;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;"
PreprocessorDefinitions="__STD_C"
+ ForcedIncludeFiles="ICUVersion.h"
/>
<Tool
Name="VCLibrarianTool"
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops
index a8102c9..e5cc866 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops
@@ -1,25 +1,32 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="jscCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../assembler/;../../API/;../../parser/;../../runtime/;../../VM/;../../bytecode/;../../interpreter/;../../wtf/;../../debugger/;../../bytecompiler/;../../profiler;../../jit/;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
- PreprocessorDefinitions="__STD_C"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib winmm.lib pthreadVC2$(LibraryConfigSuffix).lib user32.lib"
- SubSystem="1"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt42.dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt42.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt42$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt42$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuin42$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin42$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuuc42$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc42$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\ASL$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\ASL$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\libdispatch$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libdispatch$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;cmd /c&#x0D;&#x0A;"
- />
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- />
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="jscCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\obj\JavaScriptCore\$(ConfigurationName)\DerivedSources\&quot;;../../;&quot;../../os-win32/&quot;;../../pcre/;../../assembler/;../../API/;../../parser/;../../runtime/;../../VM/;../../bytecode/;../../interpreter/;../../wtf/;../../debugger/;../../bytecompiler/;../../profiler;../../jit/;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
+ PreprocessorDefinitions="__STD_C"
+ ForcedIncludeFiles="ICUVersion.h"
+ ForcedUsingFiles=""
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib libicuin$(LibraryConfigSuffix).lib libicuuc$(LibraryConfigSuffix).lib winmm.lib pthreadVC2$(LibraryConfigSuffix).lib user32.lib"
+ AdditionalLibraryDirectories="&quot;$(IntDir)\lib&quot;"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt42.dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt42.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icudt42$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt42$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuin42$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin42$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\icuuc42$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc42$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\ASL$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\ASL$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\libdispatch$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libdispatch$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;cmd /c&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="mkdir 2&gt;NUL &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\icuuc$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\icuuc$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\icuin$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\icuin$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;cmd /c&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops b/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops
index 161f571..a1a7267 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops
+++ b/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiCommon.vsprops
@@ -1,26 +1,32 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="testapiCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\API&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
- WarningLevel="4"
- Detect64BitPortabilityProblems="true"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib icuin$(LibraryConfigSuffix).lib icuuc$(LibraryConfigSuffix).lib"
- SubSystem="1"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\API\tests\testapi.js&quot; &quot;$(OutDir)&quot;&#x0D;&#x0A;"
- />
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
- />
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="testapiCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\API&quot;;&quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="true"
+ ForcedIncludeFiles="ICUVersion.h"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WTF$(WebKitConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib libicuin$(LibraryConfigSuffix).lib libicuuc$(LibraryConfigSuffix).lib"
+ AdditionalLibraryDirectories="&quot;$(IntDir)\lib&quot;"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\..\API\tests\testapi.js&quot; &quot;$(OutDir)&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ CommandLine="mkdir 2&gt;NUL &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\icuuc$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\icuuc$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\icuin$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\icuin$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\libicuuc$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot; copy /y &quot;$(WebKitLibrariesDir)\lib\libicuin$(LibraryConfigSuffix).lib&quot; &quot;$(IntDir)\lib&quot;&#x0D;&#x0A;&#x0D;&#x0A;cmd /c&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 2dd4abd..562b4a1 100644
--- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -1250,9 +1250,6 @@
1429D92C0ED22D7000B89619 /* jit */ = {
isa = PBXGroup;
children = (
- A7386551118697B400540279 /* SpecializedThunkJIT.h */,
- A7386552118697B400540279 /* ThunkGenerators.cpp */,
- A7386553118697B400540279 /* ThunkGenerators.h */,
A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */,
A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */,
86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */,
@@ -1274,6 +1271,9 @@
14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */,
14A6581A0F4E36F4000150FD /* JITStubs.h */,
A76C51741182748D00715B05 /* JSInterfaceJIT.h */,
+ A7386551118697B400540279 /* SpecializedThunkJIT.h */,
+ A7386552118697B400540279 /* ThunkGenerators.cpp */,
+ A7386553118697B400540279 /* ThunkGenerators.h */,
);
path = jit;
sourceTree = "<group>";
@@ -1314,12 +1314,12 @@
146AAB2A0B66A84900E55F16 /* JSStringRefCF.h */,
14BD5A2B0A3E91F600BAF59C /* JSValueRef.cpp */,
1482B6EA0A4300B300517CFC /* JSValueRef.h */,
+ A7482E37116A697B003B0712 /* JSWeakObjectMapRefInternal.h */,
+ A7482B7A1166CDEA003B0712 /* JSWeakObjectMapRefPrivate.cpp */,
+ A7482B791166CDEA003B0712 /* JSWeakObjectMapRefPrivate.h */,
E124A8F60E555775003091F1 /* OpaqueJSString.cpp */,
E124A8F50E555775003091F1 /* OpaqueJSString.h */,
5DE3D0F40DD8DDFB00468714 /* WebKitAvailability.h */,
- A7482B791166CDEA003B0712 /* JSWeakObjectMapRefPrivate.h */,
- A7482B7A1166CDEA003B0712 /* JSWeakObjectMapRefPrivate.cpp */,
- A7482E37116A697B003B0712 /* JSWeakObjectMapRefInternal.h */,
);
path = API;
sourceTree = "<group>";
@@ -1374,7 +1374,6 @@
650FDF8D09D0FCA700769E54 /* Derived Sources */ = {
isa = PBXGroup;
children = (
- A718F61A11754A21002465A7 /* RegExpJitTables.h */,
BC18C5230E16FC8A00B34460 /* ArrayPrototype.lut.h */,
65B174BE09D1000200820339 /* chartables.c */,
BCD203E70E1718F4002C7E82 /* DatePrototype.lut.h */,
@@ -1383,6 +1382,7 @@
BC18C5290E16FCC200B34460 /* MathObject.lut.h */,
BC2680E60E16D52300A06E92 /* NumberConstructor.lut.h */,
BCD202D50E170708002C7E82 /* RegExpConstructor.lut.h */,
+ A718F61A11754A21002465A7 /* RegExpJitTables.h */,
BC18C52B0E16FCD200B34460 /* RegExpObject.lut.h */,
BC18C5250E16FCA700B34460 /* StringPrototype.lut.h */,
5D53727D0E1C55EC0021E549 /* TracingDtrace.h */,
@@ -1419,6 +1419,7 @@
E48E0F2C0F82151700A8CA37 /* FastAllocBase.h */,
65E217B908E7EECC0023E5F6 /* FastMalloc.cpp */,
65E217BA08E7EECC0023E5F6 /* FastMalloc.h */,
+ A7F19ECD11DD490900931E70 /* FixedArray.h */,
935AF46909E9D9DB00ACD1D8 /* Forward.h */,
93B6A0DE0AA64DA40076DE27 /* GetPtr.h */,
657EEBBF094E445E008C9C7B /* HashCountedSet.h */,
@@ -1458,8 +1459,8 @@
65C647B3093EF8D60022C380 /* RefPtr.h */,
148A1ECD0D10C23B0069A47C /* RefPtrHashMap.h */,
51F648D60BB4E2CA0033D760 /* RetainPtr.h */,
- 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */,
969A07290ED1CE6900F1F681 /* SegmentedVector.h */,
+ 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */,
868BFA5F117D048200B908B1 /* StaticConstructors.h */,
FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */,
E11D51750B2E798D0056C188 /* StringExtras.h */,
@@ -1486,7 +1487,6 @@
96DD73780F9DA3100027FBCC /* VMTags.h */,
86D08D5111793613006E5ED0 /* WTFThreadData.cpp */,
86D08D5211793613006E5ED0 /* WTFThreadData.h */,
- A7F19ECD11DD490900931E70 /* FixedArray.h */,
);
path = wtf;
sourceTree = "<group>";
@@ -1551,9 +1551,6 @@
7EF6E0BB0EB7A1EC0079AFAF /* runtime */ = {
isa = PBXGroup;
children = (
- A1712B4011C7B235007A5315 /* RegExpKey.h */,
- A1712B3E11C7B228007A5315 /* RegExpCache.h */,
- A1712B3A11C7B212007A5315 /* RegExpCache.cpp */,
BCF605110E203EF800B9A64D /* ArgList.cpp */,
BCF605120E203EF800B9A64D /* ArgList.h */,
BC257DE50E1F51C50016B6C9 /* Arguments.cpp */,
@@ -1704,8 +1701,11 @@
147B84620E6DE6B1004775A4 /* PutPropertySlot.h */,
F692A87D0255597D01FF60F7 /* RegExp.cpp */,
F692A87E0255597D01FF60F7 /* RegExp.h */,
+ A1712B3A11C7B212007A5315 /* RegExpCache.cpp */,
+ A1712B3E11C7B228007A5315 /* RegExpCache.h */,
BCD202BD0E1706A7002C7E82 /* RegExpConstructor.cpp */,
BCD202BE0E1706A7002C7E82 /* RegExpConstructor.h */,
+ A1712B4011C7B235007A5315 /* RegExpKey.h */,
93CEDDFB0EA91EE600258EBE /* RegExpMatchesArray.h */,
F692A87B0255597D01FF60F7 /* RegExpObject.cpp */,
F692A87C0255597D01FF60F7 /* RegExpObject.h */,
@@ -1913,11 +1913,16 @@
9688CB150ED12B4E001D649F /* AssemblerBuffer.h in Headers */,
86D3B2C510156BDE002865E7 /* AssemblerBufferWithConstantPool.h in Headers */,
BC18C3EA0E16F5CD00B34460 /* Assertions.h in Headers */,
+ A784A26111D16622005776AC /* ASTBuilder.h in Headers */,
+ BC5F7BBE11823B590052C02C /* Atomics.h in Headers */,
+ 868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */,
+ 868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */,
BC18C3EB0E16F5CD00B34460 /* AVLTree.h in Headers */,
147B83AC0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h in Headers */,
BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
A7A1F7AD0F252B3C00E184E2 /* ByteArray.h in Headers */,
969A07230ED1CE3300F1F681 /* BytecodeGenerator.h in Headers */,
+ 869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */,
BC18C3ED0E16F5CD00B34460 /* CallData.h in Headers */,
1429D8DE0ED2205B00B89619 /* CallFrame.h in Headers */,
95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */,
@@ -1933,6 +1938,7 @@
BC18C3F60E16F5CD00B34460 /* ConstructData.h in Headers */,
5DE6E5B30E1728EC00180407 /* create_hash_table in Headers */,
0BDFFAE00FC6192900D69EF4 /* CrossThreadRefCounted.h in Headers */,
+ 86565743115BE3DA00291F40 /* CString.h in Headers */,
180B9B080F16D94F009BDBC5 /* CurrentTime.h in Headers */,
BCD2034A0E17135E002C7E82 /* DateConstructor.h in Headers */,
41359CF30FDD89AD00206180 /* DateConversion.h in Headers */,
@@ -1957,6 +1963,7 @@
A766B44F0EE8DCD1009518CA /* ExecutableAllocator.h in Headers */,
E48E0F2D0F82151700A8CA37 /* FastAllocBase.h in Headers */,
BC18C4020E16F5CD00B34460 /* FastMalloc.h in Headers */,
+ A7F19ECE11DD490900931E70 /* FixedArray.h in Headers */,
BC18C4030E16F5CD00B34460 /* Forward.h in Headers */,
BC18C4040E16F5CD00B34460 /* FunctionConstructor.h in Headers */,
BC18C4050E16F5CD00B34460 /* FunctionPrototype.h in Headers */,
@@ -2001,12 +2008,16 @@
BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */,
BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */,
BC18C4220E16F5CD00B34460 /* JSImmediate.h in Headers */,
+ A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */,
BC18C4230E16F5CD00B34460 /* JSLock.h in Headers */,
BC7F8FB90E19D1C3008632C0 /* JSNumberCell.h in Headers */,
BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */,
BC18C4250E16F5CD00B34460 /* JSObjectRef.h in Headers */,
+ A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */,
+ A783A0D111A36DCA00563D20 /* JSObjectWithGlobalObject.h in Headers */,
A7F9935F0FD7325100A0B2D0 /* JSONObject.h in Headers */,
BC87CDB910712AD4000614CF /* JSONObject.lut.h in Headers */,
+ A784A26311D16622005776AC /* JSParser.h in Headers */,
9534AAFB0E5B7A9600B8A45B /* JSProfilerPrivate.h in Headers */,
BC18C4260E16F5CD00B34460 /* JSRetainPtr.h in Headers */,
BC18C4270E16F5CD00B34460 /* JSString.h in Headers */,
@@ -2018,7 +2029,10 @@
BC18C42B0E16F5CD00B34460 /* JSValue.h in Headers */,
BC18C42C0E16F5CD00B34460 /* JSValueRef.h in Headers */,
BC18C42D0E16F5CD00B34460 /* JSVariableObject.h in Headers */,
+ A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
+ A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
BC18C42E0E16F5CD00B34460 /* JSWrapperObject.h in Headers */,
+ BC01D4F211A8F1FF00A54B2A /* JSZombie.h in Headers */,
BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */,
969A072A0ED1CE6900F1F681 /* Label.h in Headers */,
960097A60EBABB58007A7297 /* LabelScope.h in Headers */,
@@ -2034,6 +2048,7 @@
86D3B2C610156BDE002865E7 /* MacroAssemblerARM.h in Headers */,
86ADD1460FDDEA980006EEC2 /* MacroAssemblerARMv7.h in Headers */,
863B23E00FC6118900703AA4 /* MacroAssemblerCodeRef.h in Headers */,
+ 86C568E111A213EE0007F7F0 /* MacroAssemblerMIPS.h in Headers */,
860161E40F3A83C100F84710 /* MacroAssemblerX86.h in Headers */,
860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */,
860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */,
@@ -2043,7 +2058,9 @@
BC18C43B0E16F5CD00B34460 /* MathExtras.h in Headers */,
BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */,
BC18C52A0E16FCC200B34460 /* MathObject.lut.h in Headers */,
+ 511FC4CB117EE2A800425272 /* MD5.h in Headers */,
BC18C43E0E16F5CD00B34460 /* MessageQueue.h in Headers */,
+ 86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */,
BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */,
BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */,
A76EE6590FAE59D5003F069A /* NativeFunctionWrapper.h in Headers */,
@@ -2097,8 +2114,10 @@
BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */,
86EAC49B0F93E8D1008EC948 /* RegexParser.h in Headers */,
86EAC49C0F93E8D1008EC948 /* RegexPattern.h in Headers */,
+ A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */,
BCD202C20E1706A7002C7E82 /* RegExpConstructor.h in Headers */,
BCD202D60E170708002C7E82 /* RegExpConstructor.lut.h in Headers */,
+ A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */,
BC18C45B0E16F5CD00B34460 /* RegExpObject.h in Headers */,
BC18C52C0E16FCD200B34460 /* RegExpObject.lut.h in Headers */,
BCD202C40E1706A7002C7E82 /* RegExpPrototype.h in Headers */,
@@ -2108,17 +2127,24 @@
86D3B3C410159D7F002865E7 /* RepatchBuffer.h in Headers */,
869EBCB70E8C6D4A008722CC /* ResultType.h in Headers */,
BC18C4600E16F5CD00B34460 /* RetainPtr.h in Headers */,
+ 86B99AB9117E391E00DF5A90 /* RopeImpl.h in Headers */,
1429D8860ED21C3D00B89619 /* SamplingTool.h in Headers */,
BC18C4610E16F5CD00B34460 /* ScopeChain.h in Headers */,
969A072C0ED1CE6900F1F681 /* SegmentedVector.h in Headers */,
933040040E6A749400786E6A /* SmallStrings.h in Headers */,
BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */,
BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */,
+ A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */,
+ 868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */,
FE1B447A0ECCD73B004F4DD1 /* StdLibExtras.h in Headers */,
+ 86B99AE3117E578100DF5A90 /* StringBuffer.h in Headers */,
8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */,
BC18C4660E16F5CD00B34460 /* StringConstructor.h in Headers */,
BC18C4670E16F5CD00B34460 /* StringExtras.h in Headers */,
+ 868BFA0D117CEFD100B908B1 /* StringHash.h in Headers */,
5D63E9AD10F2BD6E00FC8AE9 /* StringHashFunctions.h in Headers */,
+ 868BFA0F117CEFD100B908B1 /* StringImpl.h in Headers */,
+ 86B99AE4117E578100DF5A90 /* StringImplBase.h in Headers */,
BC18C4680E16F5CD00B34460 /* StringObject.h in Headers */,
BC18C4690E16F5CD00B34460 /* StringObjectThatMasqueradesAsUndefined.h in Headers */,
BC18C46A0E16F5CD00B34460 /* StringPrototype.h in Headers */,
@@ -2128,14 +2154,18 @@
BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */,
BC9041480EB9250900FE26FA /* StructureTransitionTable.h in Headers */,
BC18C46B0E16F5CD00B34460 /* SymbolTable.h in Headers */,
+ A784A26411D16622005776AC /* SyntaxChecker.h in Headers */,
BC18C46C0E16F5CD00B34460 /* TCPackedCache.h in Headers */,
BC18C46D0E16F5CD00B34460 /* TCPageMap.h in Headers */,
BC18C46E0E16F5CD00B34460 /* TCSpinLock.h in Headers */,
BC18C46F0E16F5CD00B34460 /* TCSystemAlloc.h in Headers */,
+ 971EDEA61169E0D3005E4262 /* Terminator.h in Headers */,
18BAB55410DAE066000D945B /* ThreadIdentifierDataPthreads.h in Headers */,
BC18C4700E16F5CD00B34460 /* Threading.h in Headers */,
+ BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */,
+ BC5F7BC011823B590052C02C /* ThreadSafeShared.h in Headers */,
BC18C4710E16F5CD00B34460 /* ThreadSpecific.h in Headers */,
- 971EDEA61169E0D3005E4262 /* Terminator.h in Headers */,
+ A7386556118697B400540279 /* ThunkGenerators.h in Headers */,
14A42E400F4F60EE00599099 /* TimeoutChecker.h in Headers */,
5D53726F0E1C54880021E549 /* Tracing.h in Headers */,
0B4D7E630F319AC800AD7E58 /* TypeTraits.h in Headers */,
@@ -2154,39 +2184,9 @@
14035DB110DBFB2A00FFFFE7 /* WeakGCPtr.h in Headers */,
1420BE7B10AA6DDB00F455D2 /* WeakRandom.h in Headers */,
BC18C47A0E16F5CD00B34460 /* WebKitAvailability.h in Headers */,
- 9688CB160ED12B4E001D649F /* X86Assembler.h in Headers */,
- A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */,
- 86565743115BE3DA00291F40 /* CString.h in Headers */,
- A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
- A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
- 86D08D5411793613006E5ED0 /* WTFThreadData.h in Headers */,
- 868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */,
- 868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */,
- 868BFA0D117CEFD100B908B1 /* StringHash.h in Headers */,
- 868BFA0F117CEFD100B908B1 /* StringImpl.h in Headers */,
868BFA18117CF19900B908B1 /* WTFString.h in Headers */,
- 868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */,
- 86B99AB9117E391E00DF5A90 /* RopeImpl.h in Headers */,
- 86B99AE3117E578100DF5A90 /* StringBuffer.h in Headers */,
- 86B99AE4117E578100DF5A90 /* StringImplBase.h in Headers */,
- 511FC4CB117EE2A800425272 /* MD5.h in Headers */,
- BC5F7BBE11823B590052C02C /* Atomics.h in Headers */,
- BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */,
- BC5F7BC011823B590052C02C /* ThreadSafeShared.h in Headers */,
- A76C51761182748D00715B05 /* JSInterfaceJIT.h in Headers */,
- A7386554118697B400540279 /* SpecializedThunkJIT.h in Headers */,
- A7386556118697B400540279 /* ThunkGenerators.h in Headers */,
- 869D04AF1193B54D00803475 /* CachedTranscendentalFunction.h in Headers */,
- 86C568E111A213EE0007F7F0 /* MacroAssemblerMIPS.h in Headers */,
- 86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */,
- A783A0D111A36DCA00563D20 /* JSObjectWithGlobalObject.h in Headers */,
- BC01D4F211A8F1FF00A54B2A /* JSZombie.h in Headers */,
- A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */,
- A1712B4111C7B235007A5315 /* RegExpKey.h in Headers */,
- A784A26111D16622005776AC /* ASTBuilder.h in Headers */,
- A784A26311D16622005776AC /* JSParser.h in Headers */,
- A784A26411D16622005776AC /* SyntaxChecker.h in Headers */,
- A7F19ECE11DD490900931E70 /* FixedArray.h in Headers */,
+ 86D08D5411793613006E5ED0 /* WTFThreadData.h in Headers */,
+ 9688CB160ED12B4E001D649F /* X86Assembler.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2462,6 +2462,7 @@
147F39BF107EC37600427A48 /* ArrayConstructor.cpp in Sources */,
147F39C0107EC37600427A48 /* ArrayPrototype.cpp in Sources */,
65FDE49C0BDD1D4A00E80111 /* Assertions.cpp in Sources */,
+ 868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */,
14280863107EC11A0013E7B2 /* BooleanConstructor.cpp in Sources */,
14280864107EC11A0013E7B2 /* BooleanObject.cpp in Sources */,
14280865107EC11A0013E7B2 /* BooleanPrototype.cpp in Sources */,
@@ -2476,6 +2477,7 @@
147F39C1107EC37600427A48 /* CommonIdentifiers.cpp in Sources */,
147F39C2107EC37600427A48 /* Completion.cpp in Sources */,
1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
+ 86565742115BE3DA00291F40 /* CString.cpp in Sources */,
180B9BFE0F16E94D009BDBC5 /* CurrentTime.cpp in Sources */,
147F39C3107EC37600427A48 /* DateConstructor.cpp in Sources */,
147F39C4107EC37600427A48 /* DateConversion.cpp in Sources */,
@@ -2507,8 +2509,11 @@
1429D7D40ED2128200B89619 /* Interpreter.cpp in Sources */,
1429D92F0ED22D7000B89619 /* JIT.cpp in Sources */,
86A90ED00EE7D51F00AB350D /* JITArithmetic.cpp in Sources */,
+ A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */,
86CC85A30EE79B7400288682 /* JITCall.cpp in Sources */,
+ 146FE51211A710430087AE66 /* JITCall32_64.cpp in Sources */,
BCDD51EB0FB8DF74004A8BDC /* JITOpcodes.cpp in Sources */,
+ A71236E51195F33C00BD2174 /* JITOpcodes32_64.cpp in Sources */,
86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */,
A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */,
14A23D750F4E1ABB0023CDAD /* JITStubs.cpp in Sources */,
@@ -2533,7 +2538,9 @@
1428085D107EC0F80013E7B2 /* JSNumberCell.cpp in Sources */,
147F39D4107EC37600427A48 /* JSObject.cpp in Sources */,
1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */,
+ A783A2AB11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp in Sources */,
A7F993600FD7325100A0B2D0 /* JSONObject.cpp in Sources */,
+ A784A26211D16622005776AC /* JSParser.cpp in Sources */,
95F6E6950E5B5F970091E860 /* JSProfilerPrivate.cpp in Sources */,
A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */,
140566D1107EC267005DBC8D /* JSStaticScopeObject.cpp in Sources */,
@@ -2543,16 +2550,20 @@
147F39D6107EC37600427A48 /* JSValue.cpp in Sources */,
14BD5A320A3E91F600BAF59C /* JSValueRef.cpp in Sources */,
147F39D7107EC37600427A48 /* JSVariableObject.cpp in Sources */,
+ A7482B9411671147003B0712 /* JSWeakObjectMapRefPrivate.cpp in Sources */,
14280870107EC1340013E7B2 /* JSWrapperObject.cpp in Sources */,
+ BC01D4F111A8F1FF00A54B2A /* JSZombie.cpp in Sources */,
BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */,
148F21B0107EC5410042EC2C /* Lexer.cpp in Sources */,
A7E2EA6C0FB460CF00601F06 /* LiteralParser.cpp in Sources */,
14469DDE107EC7E700650446 /* Lookup.cpp in Sources */,
+ 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */,
06D358B30DAADAA4003B174E /* MainThread.cpp in Sources */,
06D358B40DAADAAA003B174E /* MainThreadMac.mm in Sources */,
A74B3499102A5F8E0032AB98 /* MarkStack.cpp in Sources */,
A7C530E4102A3813005BC741 /* MarkStackPosix.cpp in Sources */,
14469DDF107EC7E700650446 /* MathObject.cpp in Sources */,
+ 511FC4C9117EE28700425272 /* MD5.cpp in Sources */,
14469DE0107EC7E700650446 /* NativeErrorConstructor.cpp in Sources */,
14469DE1107EC7E700650446 /* NativeErrorPrototype.cpp in Sources */,
148F21B7107EC5470042EC2C /* Nodes.cpp in Sources */,
@@ -2587,16 +2598,21 @@
86EAC4970F93E8D1008EC948 /* RegexInterpreter.cpp in Sources */,
86EAC4990F93E8D1008EC948 /* RegexJIT.cpp in Sources */,
14280841107EC0930013E7B2 /* RegExp.cpp in Sources */,
+ A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */,
14280842107EC0930013E7B2 /* RegExpConstructor.cpp in Sources */,
14280843107EC0930013E7B2 /* RegExpObject.cpp in Sources */,
14280844107EC0930013E7B2 /* RegExpPrototype.cpp in Sources */,
1428083A107EC0750013E7B2 /* RegisterFile.cpp in Sources */,
+ 86B99AB8117E391E00DF5A90 /* RopeImpl.cpp in Sources */,
1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */,
14469DEA107EC7E700650446 /* ScopeChain.cpp in Sources */,
+ 0BF28A2911A33DC300638F84 /* SizeLimits.cpp in Sources */,
9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */,
14469DEB107EC7E700650446 /* StringConstructor.cpp in Sources */,
+ 868BFA0E117CEFD100B908B1 /* StringImpl.cpp in Sources */,
14469DEC107EC7E700650446 /* StringObject.cpp in Sources */,
14469DED107EC7E700650446 /* StringPrototype.cpp in Sources */,
+ 8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */,
BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */,
7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */,
BCCF0D0C0EF0B8A500413C8F /* StructureStubInfo.cpp in Sources */,
@@ -2604,29 +2620,13 @@
18BAB55310DAE054000D945B /* ThreadIdentifierDataPthreads.cpp in Sources */,
5D6A566B0F05995500266145 /* Threading.cpp in Sources */,
E1EE793D0D6C9B9200FEA3BA /* ThreadingPthreads.cpp in Sources */,
+ A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */,
14A42E3F0F4F60EE00599099 /* TimeoutChecker.cpp in Sources */,
0B330C270F38C62300692DE3 /* TypeTraits.cpp in Sources */,
14469DEE107EC7E700650446 /* UString.cpp in Sources */,
E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */,
- 86565742115BE3DA00291F40 /* CString.cpp in Sources */,
- A7482B9411671147003B0712 /* JSWeakObjectMapRefPrivate.cpp in Sources */,
- 0BF28A2911A33DC300638F84 /* SizeLimits.cpp in Sources */,
- 86D08D5311793613006E5ED0 /* WTFThreadData.cpp in Sources */,
- 868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */,
- 868BFA0E117CEFD100B908B1 /* StringImpl.cpp in Sources */,
868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */,
- 86B99AB8117E391E00DF5A90 /* RopeImpl.cpp in Sources */,
- 511FC4C9117EE28700425272 /* MD5.cpp in Sources */,
- A7386555118697B400540279 /* ThunkGenerators.cpp in Sources */,
- A75706DE118A2BCF0057F88F /* JITArithmetic32_64.cpp in Sources */,
- 8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */,
- A71236E51195F33C00BD2174 /* JITOpcodes32_64.cpp in Sources */,
- 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */,
- 146FE51211A710430087AE66 /* JITCall32_64.cpp in Sources */,
- A783A2AB11A5BE8400563D20 /* JSObjectWithGlobalObject.cpp in Sources */,
- BC01D4F111A8F1FF00A54B2A /* JSZombie.cpp in Sources */,
- A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */,
- A784A26211D16622005776AC /* JSParser.cpp in Sources */,
+ 86D08D5311793613006E5ED0 /* WTFThreadData.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/JavaScriptCore/assembler/ARMAssembler.cpp b/JavaScriptCore/assembler/ARMAssembler.cpp
index a181b7e..0016540 100644
--- a/JavaScriptCore/assembler/ARMAssembler.cpp
+++ b/JavaScriptCore/assembler/ARMAssembler.cpp
@@ -272,8 +272,8 @@ void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID bas
add_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 12) | (10 << 8));
dtr_u(isLoad, srcDst, ARMRegisters::S0, (offset & 0xfff) | transferFlag);
} else {
- ARMWord reg = getImm(offset, ARMRegisters::S0);
- dtr_ur(isLoad, srcDst, base, reg | transferFlag);
+ moveImm(offset, ARMRegisters::S0);
+ dtr_ur(isLoad, srcDst, base, ARMRegisters::S0 | transferFlag);
}
} else {
offset = -offset;
@@ -283,8 +283,8 @@ void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID bas
sub_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 12) | (10 << 8));
dtr_d(isLoad, srcDst, ARMRegisters::S0, (offset & 0xfff) | transferFlag);
} else {
- ARMWord reg = getImm(offset, ARMRegisters::S0);
- dtr_dr(isLoad, srcDst, base, reg | transferFlag);
+ moveImm(offset, ARMRegisters::S0);
+ dtr_dr(isLoad, srcDst, base, ARMRegisters::S0 | transferFlag);
}
}
}
diff --git a/JavaScriptCore/assembler/MacroAssemblerARM.h b/JavaScriptCore/assembler/MacroAssemblerARM.h
index 1c64071..bb1a6da 100644
--- a/JavaScriptCore/assembler/MacroAssemblerARM.h
+++ b/JavaScriptCore/assembler/MacroAssemblerARM.h
@@ -956,9 +956,9 @@ protected:
prepareCall();
m_assembler.dtr_u(true, targetReg, tmpReg, offset & 0xfff);
} else {
- ARMWord reg = m_assembler.getImm(offset, tmpReg);
+ m_assembler.moveImm(offset, tmpReg);
prepareCall();
- m_assembler.dtr_ur(true, targetReg, base, reg);
+ m_assembler.dtr_ur(true, targetReg, base, tmpReg);
}
} else {
offset = -offset;
@@ -970,9 +970,9 @@ protected:
prepareCall();
m_assembler.dtr_d(true, targetReg, tmpReg, offset & 0xfff);
} else {
- ARMWord reg = m_assembler.getImm(offset, tmpReg);
+ m_assembler.moveImm(offset, tmpReg);
prepareCall();
- m_assembler.dtr_dr(true, targetReg, base, reg);
+ m_assembler.dtr_dr(true, targetReg, base, tmpReg);
}
}
#if WTF_ARM_ARCH_AT_LEAST(5)
diff --git a/JavaScriptCore/bytecode/CodeBlock.cpp b/JavaScriptCore/bytecode/CodeBlock.cpp
index a664719..0e55d6a 100644
--- a/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -174,7 +174,7 @@ void CodeBlock::printPutByIdOp(ExecState* exec, int location, Vector<Instruction
int id0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data());
- it += 4;
+ it += 5;
}
#if ENABLE(JIT)
diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 8ff1b5d..a3fa937 100644
--- a/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -152,8 +152,6 @@ void BytecodeGenerator::generate()
if ((m_codeType == FunctionCode && !m_codeBlock->needsFullScopeChain() && !m_codeBlock->usesArguments()) || m_codeType == EvalCode)
symbolTable().clear();
-
- m_codeBlock->setIsNumericCompareFunction(instructions() == m_globalData->numericCompareFunction(m_scopeChain->globalObject()->globalExec()));
#if !ENABLE(OPCODE_SAMPLING)
if (!m_regeneratingForExceptionInfo && !m_usesExceptions && (m_codeType == FunctionCode || m_codeType == EvalCode))
@@ -2045,4 +2043,19 @@ RegisterID* BytecodeGenerator::emitThrowExpressionTooDeepException()
return exception;
}
+void BytecodeGenerator::setIsNumericCompareFunction(bool isNumericCompareFunction)
+{
+ m_codeBlock->setIsNumericCompareFunction(isNumericCompareFunction);
+}
+
+int BytecodeGenerator::argumentNumberFor(const Identifier& ident)
+{
+ int parameterCount = m_parameters.size(); // includes 'this'
+ RegisterID* registerID = registerFor(ident);
+ if (!registerID)
+ return 0;
+ int index = registerID->index() + RegisterFile::CallFrameHeaderSize + parameterCount;
+ return (index > 0 && index < parameterCount) ? index : 0;
+}
+
} // namespace JSC
diff --git a/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index 2b231a7..ad0ae4e 100644
--- a/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -108,7 +108,12 @@ namespace JSC {
// such register exists. Registers returned by registerFor do not
// require explicit reference counting.
RegisterID* registerFor(const Identifier&);
-
+
+ // Returns the agument number if this is an argument, or 0 if not.
+ int argumentNumberFor(const Identifier&);
+
+ void setIsNumericCompareFunction(bool isNumericCompareFunction);
+
bool willResolveToArguments(const Identifier&);
RegisterID* uncheckedRegisterForArguments();
diff --git a/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index e50ce2d..277562d 100644
--- a/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -1359,6 +1359,11 @@ inline StatementNode* BlockNode::lastStatement() const
return m_statements ? m_statements->lastStatement() : 0;
}
+inline StatementNode* BlockNode::singleStatement() const
+{
+ return m_statements ? m_statements->singleStatement() : 0;
+}
+
RegisterID* BlockNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
{
if (m_statements)
@@ -2011,16 +2016,38 @@ RegisterID* FunctionBodyNode::emitBytecode(BytecodeGenerator& generator, Registe
{
generator.emitDebugHook(DidEnterCallFrame, firstLine(), lastLine());
emitStatementsBytecode(generator, generator.ignoredResult());
+
StatementNode* singleStatement = this->singleStatement();
+ ReturnNode* returnNode = 0;
+
+ // Check for a return statement at the end of a function composed of a single block.
if (singleStatement && singleStatement->isBlock()) {
StatementNode* lastStatementInBlock = static_cast<BlockNode*>(singleStatement)->lastStatement();
if (lastStatementInBlock && lastStatementInBlock->isReturnNode())
- return 0;
+ returnNode = static_cast<ReturnNode*>(lastStatementInBlock);
+ }
+
+ // If there is no return we must automatically insert one.
+ if (!returnNode) {
+ RegisterID* r0 = generator.isConstructor() ? generator.thisRegister() : generator.emitLoad(0, jsUndefined());
+ generator.emitDebugHook(WillLeaveCallFrame, firstLine(), lastLine());
+ generator.emitReturn(r0);
+ return 0;
+ }
+
+ // If there is a return statment, and it is the only statement in the function, check if this is a numeric compare.
+ if (static_cast<BlockNode*>(singleStatement)->singleStatement()) {
+ ExpressionNode* returnValueExpression = returnNode->value();
+ if (returnValueExpression && returnValueExpression->isSubtract()) {
+ ExpressionNode* lhsExpression = static_cast<SubNode*>(returnValueExpression)->lhs();
+ ExpressionNode* rhsExpression = static_cast<SubNode*>(returnValueExpression)->rhs();
+ if (lhsExpression->isResolveNode() && rhsExpression->isResolveNode()) {
+ generator.setIsNumericCompareFunction(generator.argumentNumberFor(static_cast<ResolveNode*>(lhsExpression)->identifier()) == 1
+ && generator.argumentNumberFor(static_cast<ResolveNode*>(rhsExpression)->identifier()) == 2);
+ }
+ }
}
- RegisterID* r0 = generator.isConstructor() ? generator.thisRegister() : generator.emitLoad(0, jsUndefined());
- generator.emitDebugHook(WillLeaveCallFrame, firstLine(), lastLine());
- generator.emitReturn(r0);
return 0;
}
diff --git a/JavaScriptCore/interpreter/Interpreter.cpp b/JavaScriptCore/interpreter/Interpreter.cpp
index 26f7a6b..2342ed6 100644
--- a/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/JavaScriptCore/interpreter/Interpreter.cpp
@@ -547,18 +547,17 @@ NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue ex
return false;
codeBlock = callerFrame->codeBlock();
-#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
+#if ENABLE(JIT) && ENABLE(INTERPRETER)
if (callerFrame->globalData().canUseJIT())
-#endif
bytecodeOffset = codeBlock->bytecodeOffset(callerFrame, callFrame->returnPC());
-#if ENABLE(INTERPRETER)
else
bytecodeOffset = codeBlock->bytecodeOffset(callerFrame, callFrame->returnVPC());
-#endif
+#elif ENABLE(JIT)
+ bytecodeOffset = codeBlock->bytecodeOffset(callerFrame, callFrame->returnPC());
#else
bytecodeOffset = codeBlock->bytecodeOffset(callerFrame, callFrame->returnVPC());
#endif
+
callFrame = callerFrame;
return true;
}
@@ -660,11 +659,12 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S
}
}
- CodeBlock* codeBlock = &program->bytecode(callFrame, scopeChain);
- if (!codeBlock) {
- *exception = createStackOverflowError(callFrame);
+ JSObject* error = program->compile(callFrame, scopeChain);
+ if (error) {
+ *exception = error;
return jsNull();
}
+ CodeBlock* codeBlock = &program->generatedBytecode();
Register* oldEnd = m_registerFile.end();
Register* newEnd = oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters;
@@ -697,17 +697,11 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S
m_reentryDepth++;
#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
if (callFrame->globalData().canUseJIT())
-#endif
- result = program->jitCode(newCallFrame, scopeChain).execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
-#if ENABLE(INTERPRETER)
+ result = program->generatedJITCode().execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
else
#endif
-#endif
-#if ENABLE(INTERPRETER)
result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
-#endif
m_reentryDepth--;
}
@@ -752,12 +746,16 @@ JSValue Interpreter::executeCall(CallFrame* callFrame, JSObject* function, CallT
if (callType == CallTypeJS) {
ScopeChainNode* callDataScopeChain = callData.js.scopeChain;
- CodeBlock* newCodeBlock = callData.js.functionExecutable->bytecodeForCall(callFrame, callDataScopeChain);
- if (newCodeBlock)
- newCallFrame = slideRegisterWindowForCall(newCodeBlock, &m_registerFile, newCallFrame, registerOffset, argCount);
- else
- newCallFrame = 0;
+ JSObject* compileError = callData.js.functionExecutable->compileForCall(callFrame, callDataScopeChain);
+ if (UNLIKELY(!!compileError)) {
+ *exception = compileError;
+ m_registerFile.shrink(oldEnd);
+ return jsNull();
+ }
+
+ CodeBlock* newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
+ newCallFrame = slideRegisterWindowForCall(newCodeBlock, &m_registerFile, newCallFrame, registerOffset, argCount);
if (UNLIKELY(!newCallFrame)) {
*exception = createStackOverflowError(callFrame);
m_registerFile.shrink(oldEnd);
@@ -778,17 +776,11 @@ JSValue Interpreter::executeCall(CallFrame* callFrame, JSObject* function, CallT
m_reentryDepth++;
#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
if (callFrame->globalData().canUseJIT())
-#endif
- result = callData.js.functionExecutable->jitCodeForCall(newCallFrame, callDataScopeChain).execute(&m_registerFile, newCallFrame, callDataScopeChain->globalData, exception);
-#if ENABLE(INTERPRETER)
+ result = callData.js.functionExecutable->generatedJITCodeForCall().execute(&m_registerFile, newCallFrame, callDataScopeChain->globalData, exception);
else
#endif
-#endif
-#if ENABLE(INTERPRETER)
result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
-#endif
m_reentryDepth--;
}
@@ -851,12 +843,16 @@ JSObject* Interpreter::executeConstruct(CallFrame* callFrame, JSObject* construc
if (constructType == ConstructTypeJS) {
ScopeChainNode* constructDataScopeChain = constructData.js.scopeChain;
- CodeBlock* newCodeBlock = constructData.js.functionExecutable->bytecodeForConstruct(callFrame, constructDataScopeChain);
- if (newCodeBlock)
- newCallFrame = slideRegisterWindowForCall(newCodeBlock, &m_registerFile, newCallFrame, registerOffset, argCount);
- else
- newCallFrame = 0;
+ JSObject* compileError = constructData.js.functionExecutable->compileForConstruct(callFrame, constructDataScopeChain);
+ if (UNLIKELY(!!compileError)) {
+ *exception = compileError;
+ m_registerFile.shrink(oldEnd);
+ return 0;
+ }
+
+ CodeBlock* newCodeBlock = &constructData.js.functionExecutable->generatedBytecodeForConstruct();
+ newCallFrame = slideRegisterWindowForCall(newCodeBlock, &m_registerFile, newCallFrame, registerOffset, argCount);
if (UNLIKELY(!newCallFrame)) {
*exception = createStackOverflowError(callFrame);
m_registerFile.shrink(oldEnd);
@@ -877,17 +873,11 @@ JSObject* Interpreter::executeConstruct(CallFrame* callFrame, JSObject* construc
m_reentryDepth++;
#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
if (callFrame->globalData().canUseJIT())
-#endif
- result = constructData.js.functionExecutable->jitCodeForConstruct(newCallFrame, constructDataScopeChain).execute(&m_registerFile, newCallFrame, constructDataScopeChain->globalData, exception);
-#if ENABLE(INTERPRETER)
+ result = constructData.js.functionExecutable->generatedJITCodeForConstruct().execute(&m_registerFile, newCallFrame, constructDataScopeChain->globalData, exception);
else
#endif
-#endif
-#if ENABLE(INTERPRETER)
result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
-#endif
m_reentryDepth--;
}
@@ -952,11 +942,15 @@ CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* FunctionE
for (int i = 0; i < argc; ++i)
newCallFrame->r(++dst) = jsUndefined();
- CodeBlock* codeBlock = FunctionExecutable->bytecodeForCall(callFrame, scopeChain);
- if (codeBlock)
- newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc);
- else
- newCallFrame = 0;
+ JSObject* error = FunctionExecutable->compileForCall(callFrame, scopeChain);
+ if (error) {
+ *exception = error;
+ m_registerFile.shrink(oldEnd);
+ return CallFrameClosure();
+ }
+ CodeBlock* codeBlock = &FunctionExecutable->generatedBytecodeForCall();
+
+ newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc);
if (UNLIKELY(!newCallFrame)) {
*exception = createStackOverflowError(callFrame);
m_registerFile.shrink(oldEnd);
@@ -964,12 +958,6 @@ CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* FunctionE
}
// a 0 codeBlock indicates a built-in caller
newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), argc, function);
-#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
- if (callFrame->globalData().canUseJIT())
-#endif
- FunctionExecutable->jitCodeForCall(newCallFrame, scopeChain);
-#endif
CallFrameClosure result = { callFrame, newCallFrame, function, FunctionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock->m_numParameters, argc };
return result;
}
@@ -1013,7 +1001,12 @@ void Interpreter::endRepeatCall(CallFrameClosure& closure)
JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue* exception)
{
- return execute(eval, callFrame, thisObj, m_registerFile.size() + eval->bytecode(callFrame, scopeChain).m_numParameters + RegisterFile::CallFrameHeaderSize, scopeChain, exception);
+ JSObject* compileError = eval->compile(callFrame, scopeChain);
+ if (UNLIKELY(!!compileError)) {
+ *exception = compileError;
+ return jsNull();
+ }
+ return execute(eval, callFrame, thisObj, m_registerFile.size() + eval->generatedBytecode().m_numParameters + RegisterFile::CallFrameHeaderSize, scopeChain, exception);
}
JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValue* exception)
@@ -1029,11 +1022,12 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec
DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject);
- EvalCodeBlock* codeBlock = &eval->bytecode(callFrame, scopeChain);
- if (!codeBlock) {
- *exception = createStackOverflowError(callFrame);
+ JSObject* compileError = eval->compile(callFrame, scopeChain);
+ if (UNLIKELY(!!compileError)) {
+ *exception = compileError;
return jsNull();
}
+ EvalCodeBlock* codeBlock = &eval->generatedBytecode();
JSVariableObject* variableObject;
for (ScopeChainNode* node = scopeChain; ; node = node->next) {
@@ -1096,7 +1090,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec
#if ENABLE(INTERPRETER)
if (callFrame->globalData().canUseJIT())
#endif
- result = eval->jitCode(newCallFrame, scopeChain).execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
+ result = eval->generatedJITCode().execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
#if ENABLE(INTERPRETER)
else
#endif
@@ -3712,13 +3706,16 @@ skip_id_custom_self:
if (callType == CallTypeJS) {
ScopeChainNode* callDataScopeChain = callData.js.scopeChain;
- CodeBlock* newCodeBlock = callData.js.functionExecutable->bytecodeForCall(callFrame, callDataScopeChain);
+
+ JSObject* error = callData.js.functionExecutable->compileForCall(callFrame, callDataScopeChain);
+ if (UNLIKELY(!!error)) {
+ exceptionValue = error;
+ goto vm_throw;
+ }
CallFrame* previousCallFrame = callFrame;
- if (newCodeBlock)
- callFrame = slideRegisterWindowForCall(newCodeBlock, registerFile, callFrame, registerOffset, argCount);
- else
- callFrame = 0;
+ CodeBlock* newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
+ callFrame = slideRegisterWindowForCall(newCodeBlock, registerFile, callFrame, registerOffset, argCount);
if (UNLIKELY(!callFrame)) {
callFrame = previousCallFrame;
exceptionValue = createStackOverflowError(callFrame);
@@ -3870,19 +3867,22 @@ skip_id_custom_self:
if (callType == CallTypeJS) {
ScopeChainNode* callDataScopeChain = callData.js.scopeChain;
- CodeBlock* newCodeBlock = callData.js.functionExecutable->bytecodeForCall(callFrame, callDataScopeChain);
-
+
+ JSObject* error = callData.js.functionExecutable->compileForCall(callFrame, callDataScopeChain);
+ if (UNLIKELY(!!error)) {
+ exceptionValue = error;
+ goto vm_throw;
+ }
+
CallFrame* previousCallFrame = callFrame;
- if (newCodeBlock)
- callFrame = slideRegisterWindowForCall(newCodeBlock, registerFile, callFrame, registerOffset, argCount);
- else
- callFrame = 0;
+ CodeBlock* newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
+ callFrame = slideRegisterWindowForCall(newCodeBlock, registerFile, callFrame, registerOffset, argCount);
if (UNLIKELY(!callFrame)) {
callFrame = previousCallFrame;
exceptionValue = createStackOverflowError(callFrame);
goto vm_throw;
}
-
+
callFrame->init(newCodeBlock, vPC + OPCODE_LENGTH(op_call_varargs), callDataScopeChain, previousCallFrame, argCount, asFunction(v));
codeBlock = newCodeBlock;
ASSERT(codeBlock == callFrame->codeBlock());
@@ -4195,15 +4195,16 @@ skip_id_custom_self:
if (constructType == ConstructTypeJS) {
ScopeChainNode* callDataScopeChain = constructData.js.scopeChain;
- CodeBlock* newCodeBlock = constructData.js.functionExecutable->bytecodeForConstruct(callFrame, callDataScopeChain);
-
- CallFrame* previousCallFrame = callFrame;
- if (newCodeBlock)
- callFrame = slideRegisterWindowForCall(newCodeBlock, registerFile, callFrame, registerOffset, argCount);
- else
- callFrame = 0;
+ JSObject* error = constructData.js.functionExecutable->compileForConstruct(callFrame, callDataScopeChain);
+ if (UNLIKELY(!!error)) {
+ exceptionValue = error;
+ goto vm_throw;
+ }
+ CallFrame* previousCallFrame = callFrame;
+ CodeBlock* newCodeBlock = &constructData.js.functionExecutable->generatedBytecodeForConstruct();
+ callFrame = slideRegisterWindowForCall(newCodeBlock, registerFile, callFrame, registerOffset, argCount);
if (UNLIKELY(!callFrame)) {
callFrame = previousCallFrame;
exceptionValue = createStackOverflowError(callFrame);
diff --git a/JavaScriptCore/jit/ExecutableAllocator.h b/JavaScriptCore/jit/ExecutableAllocator.h
index 703f63f..8fd6b71 100644
--- a/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/JavaScriptCore/jit/ExecutableAllocator.h
@@ -150,12 +150,20 @@ public:
{
if (!pageSize)
intializePageSize();
- m_smallAllocationPool = ExecutablePool::create(JIT_ALLOCATOR_LARGE_ALLOC_SIZE);
+ if (isValid())
+ m_smallAllocationPool = ExecutablePool::create(JIT_ALLOCATOR_LARGE_ALLOC_SIZE);
+#if !ENABLE(INTERPRETER)
+ else
+ CRASH();
+#endif
}
+ bool isValid() const;
+
PassRefPtr<ExecutablePool> poolForSize(size_t n)
{
// Try to fit in the existing small allocator
+ ASSERT(m_smallAllocationPool);
if (n < m_smallAllocationPool->available())
return m_smallAllocationPool;
diff --git a/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index 7846a25..65c9c13 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -306,20 +306,30 @@ public:
randomLocation <<= 21;
#endif
m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
- if (!m_base)
- CRASH();
- // For simplicity, we keep all memory in m_freeList in a 'released' state.
- // This means that we can simply reuse all memory when allocating, without
- // worrying about it's previous state, and also makes coalescing m_freeList
- // simpler since we need not worry about the possibility of coalescing released
- // chunks with non-released ones.
- release(m_base, m_totalHeapSize);
- m_freeList.insert(new FreeListEntry(m_base, m_totalHeapSize));
+ if (m_base) {
+ // For simplicity, we keep all memory in m_freeList in a 'released' state.
+ // This means that we can simply reuse all memory when allocating, without
+ // worrying about it's previous state, and also makes coalescing m_freeList
+ // simpler since we need not worry about the possibility of coalescing released
+ // chunks with non-released ones.
+ release(m_base, m_totalHeapSize);
+ m_freeList.insert(new FreeListEntry(m_base, m_totalHeapSize));
+ }
+#if !ENABLE(INTERPRETER)
+ else
+ CRASH();
+#endif
}
void* alloc(size_t size)
{
+#if ENABLE(INTERPRETER)
+ if (!m_base)
+ return 0;
+#else
+ ASSERT(m_base);
+#endif
void* result;
// Freed allocations of the common size are not stored back into the main
@@ -382,6 +392,7 @@ public:
void free(void* pointer, size_t size)
{
+ ASSERT(m_base);
// Call release to report to the operating system that this
// memory is no longer in use, and need not be paged out.
ASSERT(isWithinVMPool(pointer, size));
@@ -404,6 +415,8 @@ public:
}
}
+ bool isValid() const { return !!m_base; }
+
private:
#ifndef NDEBUG
@@ -435,19 +448,26 @@ void ExecutableAllocator::intializePageSize()
static FixedVMPoolAllocator* allocator = 0;
static SpinLock spinlock = SPINLOCK_INITIALIZER;
-ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t size)
+bool ExecutableAllocator::isValid() const
{
- SpinLockHolder lock_holder(&spinlock);
-
+ SpinLockHolder lock_holder(&spinlock);
if (!allocator)
allocator = new FixedVMPoolAllocator(JIT_ALLOCATOR_LARGE_ALLOC_SIZE, VM_POOL_SIZE);
+ return allocator->isValid();
+}
+
+ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t size)
+{
+ SpinLockHolder lock_holder(&spinlock);
+
+ ASSERT(allocator);
ExecutablePool::Allocation alloc = {reinterpret_cast<char*>(allocator->alloc(size)), size};
return alloc;
}
void ExecutablePool::systemRelease(const ExecutablePool::Allocation& allocation)
{
- SpinLockHolder lock_holder(&spinlock);
+ SpinLockHolder lock_holder(&spinlock);
ASSERT(allocator);
allocator->free(allocation.pages, allocation.size);
diff --git a/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp b/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
index b04049c..a841d32 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
@@ -55,6 +55,11 @@ void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc)
ASSERT_UNUSED(result, !result);
}
+bool ExecutableAllocator::isValid() const
+{
+ return true;
+}
+
}
#endif
diff --git a/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp b/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp
index 9028f50..8b0553d 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp
@@ -66,6 +66,11 @@ void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc)
delete alloc.chunk;
}
+bool ExecutableAllocator::isValid() const
+{
+ return true;
+}
+
#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
#error "ASSEMBLER_WX_EXCLUSIVE not yet suported on this platform."
#endif
diff --git a/JavaScriptCore/jit/ExecutableAllocatorWin.cpp b/JavaScriptCore/jit/ExecutableAllocatorWin.cpp
index 72a1d5f..2b13529 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorWin.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorWin.cpp
@@ -54,6 +54,11 @@ void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc)
VirtualFree(alloc.pages, 0, MEM_RELEASE);
}
+bool ExecutableAllocator::isValid() const
+{
+ return true;
+}
+
#if ENABLE(ASSEMBLER_WX_EXCLUSIVE)
#error "ASSEMBLER_WX_EXCLUSIVE not yet suported on this platform."
#endif
diff --git a/JavaScriptCore/jit/JIT.cpp b/JavaScriptCore/jit/JIT.cpp
index 5d96847..f5df5f7 100644
--- a/JavaScriptCore/jit/JIT.cpp
+++ b/JavaScriptCore/jit/JIT.cpp
@@ -637,7 +637,7 @@ void JIT::linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* ca
}
// patch the call so we do not continue to try to link.
- repatchBuffer.relink(callLinkInfo->callReturnLocation, globalData->jitStubs.ctiVirtualCall());
+ repatchBuffer.relink(callLinkInfo->callReturnLocation, globalData->jitStubs->ctiVirtualCall());
}
void JIT::linkConstruct(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, JIT::CodePtr code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData)
@@ -657,7 +657,7 @@ void JIT::linkConstruct(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBloc
}
// patch the call so we do not continue to try to link.
- repatchBuffer.relink(callLinkInfo->callReturnLocation, globalData->jitStubs.ctiVirtualConstruct());
+ repatchBuffer.relink(callLinkInfo->callReturnLocation, globalData->jitStubs->ctiVirtualConstruct());
}
#endif // ENABLE(JIT_OPTIMIZE_CALL)
diff --git a/JavaScriptCore/jit/JIT.h b/JavaScriptCore/jit/JIT.h
index 0980be2..f9be930 100644
--- a/JavaScriptCore/jit/JIT.h
+++ b/JavaScriptCore/jit/JIT.h
@@ -219,12 +219,16 @@ namespace JSC {
static void compileCTIMachineTrampolines(JSGlobalData* globalData, RefPtr<ExecutablePool>* executablePool, TrampolineStructure *trampolines)
{
+ if (!globalData->canUseJIT())
+ return;
JIT jit(globalData);
jit.privateCompileCTIMachineTrampolines(executablePool, globalData, trampolines);
}
static CodePtr compileCTINativeCall(JSGlobalData* globalData, PassRefPtr<ExecutablePool> executablePool, NativeFunction func)
{
+ if (!globalData->canUseJIT())
+ return CodePtr();
JIT jit(globalData);
return jit.privateCompileCTINativeCall(executablePool, globalData, func);
}
@@ -352,12 +356,8 @@ namespace JSC {
static const int patchOffsetGetByIdPropertyMapOffset1 = 22;
static const int patchOffsetGetByIdPropertyMapOffset2 = 28;
static const int patchOffsetGetByIdPutResult = 28;
-#if ENABLE(OPCODE_SAMPLING) && USE(JIT_STUB_ARGUMENT_VA_LIST)
- static const int patchOffsetGetByIdSlowCaseCall = 35;
-#elif ENABLE(OPCODE_SAMPLING)
+#if ENABLE(OPCODE_SAMPLING)
static const int patchOffsetGetByIdSlowCaseCall = 37;
-#elif USE(JIT_STUB_ARGUMENT_VA_LIST)
- static const int patchOffsetGetByIdSlowCaseCall = 25;
#else
static const int patchOffsetGetByIdSlowCaseCall = 27;
#endif
@@ -549,12 +549,8 @@ namespace JSC {
static const int patchLengthGetByIdExternalLoad = 3;
static const int patchOffsetGetByIdPropertyMapOffset = 22;
static const int patchOffsetGetByIdPutResult = 22;
-#if ENABLE(OPCODE_SAMPLING) && USE(JIT_STUB_ARGUMENT_VA_LIST)
- static const int patchOffsetGetByIdSlowCaseCall = 31;
-#elif ENABLE(OPCODE_SAMPLING)
+#if ENABLE(OPCODE_SAMPLING)
static const int patchOffsetGetByIdSlowCaseCall = 33;
-#elif USE(JIT_STUB_ARGUMENT_VA_LIST)
- static const int patchOffsetGetByIdSlowCaseCall = 21;
#else
static const int patchOffsetGetByIdSlowCaseCall = 23;
#endif
diff --git a/JavaScriptCore/jit/JITArithmetic.cpp b/JavaScriptCore/jit/JITArithmetic.cpp
index 0e5bb45..0f6d290 100644
--- a/JavaScriptCore/jit/JITArithmetic.cpp
+++ b/JavaScriptCore/jit/JITArithmetic.cpp
@@ -1203,7 +1203,7 @@ void JIT::emit_op_mod(Instruction* currentInstruction)
addSlowCase(branch32(Equal, regT2, Imm32(1)));
- emitNakedCall(m_globalData->jitStubs.ctiSoftModulo());
+ emitNakedCall(m_globalData->jitStubs->ctiSoftModulo());
emitPutVirtualRegister(result, regT0);
#else
diff --git a/JavaScriptCore/jit/JITArithmetic32_64.cpp b/JavaScriptCore/jit/JITArithmetic32_64.cpp
index 4f36d66..232e287 100644
--- a/JavaScriptCore/jit/JITArithmetic32_64.cpp
+++ b/JavaScriptCore/jit/JITArithmetic32_64.cpp
@@ -1370,7 +1370,7 @@ void JIT::emit_op_mod(Instruction* currentInstruction)
addSlowCase(branch32(Equal, regT2, Imm32(0)));
- emitNakedCall(m_globalData->jitStubs.ctiSoftModulo());
+ emitNakedCall(m_globalData->jitStubs->ctiSoftModulo());
emitStoreInt32(dst, regT0, (op1 == dst || op2 == dst));
#else
diff --git a/JavaScriptCore/jit/JITCall.cpp b/JavaScriptCore/jit/JITCall.cpp
index 5c2b308..368eab9 100644
--- a/JavaScriptCore/jit/JITCall.cpp
+++ b/JavaScriptCore/jit/JITCall.cpp
@@ -81,7 +81,7 @@ void JIT::compileOpCallVarargs(Instruction* instruction)
addPtr(callFrameRegister, regT3);
storePtr(callFrameRegister, regT3);
addPtr(regT2, callFrameRegister);
- emitNakedCall(m_globalData->jitStubs.ctiVirtualCall());
+ emitNakedCall(m_globalData->jitStubs->ctiVirtualCall());
sampleCodeBlock(m_codeBlock);
}
@@ -132,7 +132,7 @@ void JIT::compileOpCall(OpcodeID opcodeID, Instruction* instruction, unsigned)
addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), callFrameRegister);
move(Imm32(argCount), regT1);
- emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs.ctiVirtualConstruct() : m_globalData->jitStubs.ctiVirtualCall());
+ emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs->ctiVirtualConstruct() : m_globalData->jitStubs->ctiVirtualCall());
if (opcodeID == op_call_eval)
wasEval.link(this);
@@ -231,7 +231,7 @@ void JIT::compileOpCallSlowCase(Instruction* instruction, Vector<SlowCaseEntry>:
addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), callFrameRegister);
move(Imm32(argCount), regT1);
- m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs.ctiVirtualConstructLink() : m_globalData->jitStubs.ctiVirtualCallLink());
+ m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs->ctiVirtualConstructLink() : m_globalData->jitStubs->ctiVirtualCallLink());
// Done! - return back to the hot path.
ASSERT(OPCODE_LENGTH(op_call) == OPCODE_LENGTH(op_call_eval));
diff --git a/JavaScriptCore/jit/JITCall32_64.cpp b/JavaScriptCore/jit/JITCall32_64.cpp
index 5f551cc..aa8e987 100644
--- a/JavaScriptCore/jit/JITCall32_64.cpp
+++ b/JavaScriptCore/jit/JITCall32_64.cpp
@@ -82,7 +82,7 @@ void JIT::compileOpCallVarargs(Instruction* instruction)
move(regT2, regT1); // argCount
- emitNakedCall(m_globalData->jitStubs.ctiVirtualCall());
+ emitNakedCall(m_globalData->jitStubs->ctiVirtualCall());
sampleCodeBlock(m_codeBlock);
}
@@ -232,7 +232,7 @@ void JIT::compileOpCall(OpcodeID opcodeID, Instruction* instruction, unsigned)
addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), callFrameRegister);
move(Imm32(argCount), regT1);
- emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs.ctiVirtualConstruct() : m_globalData->jitStubs.ctiVirtualCall());
+ emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs->ctiVirtualConstruct() : m_globalData->jitStubs->ctiVirtualCall());
if (opcodeID == op_call_eval)
wasEval.link(this);
@@ -333,7 +333,7 @@ void JIT::compileOpCallSlowCase(Instruction* instruction, Vector<SlowCaseEntry>:
addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), callFrameRegister);
move(Imm32(argCount), regT1);
- m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs.ctiVirtualConstructLink() : m_globalData->jitStubs.ctiVirtualCallLink());
+ m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_globalData->jitStubs->ctiVirtualConstructLink() : m_globalData->jitStubs->ctiVirtualCallLink());
// Done! - return back to the hot path.
ASSERT(OPCODE_LENGTH(op_call) == OPCODE_LENGTH(op_call_eval));
diff --git a/JavaScriptCore/jit/JITInlineMethods.h b/JavaScriptCore/jit/JITInlineMethods.h
index 04f7158..3b28f34 100644
--- a/JavaScriptCore/jit/JITInlineMethods.h
+++ b/JavaScriptCore/jit/JITInlineMethods.h
@@ -181,18 +181,12 @@ ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address)
#endif
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-ALWAYS_INLINE void JIT::restoreArgumentReference()
-{
- poke(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof (void*));
-}
-ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline() {}
-#else
ALWAYS_INLINE void JIT::restoreArgumentReference()
{
move(stackPointerRegister, firstArgumentRegister);
poke(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof (void*));
}
+
ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline()
{
#if CPU(X86)
@@ -203,7 +197,6 @@ ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline()
#endif
// In the trampoline on x86-64, the first argument register is not overwritten.
}
-#endif
ALWAYS_INLINE JIT::Jump JIT::checkStructure(RegisterID reg, Structure* structure)
{
diff --git a/JavaScriptCore/jit/JITOpcodes.cpp b/JavaScriptCore/jit/JITOpcodes.cpp
index 8e86d40..949dee3 100644
--- a/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/JavaScriptCore/jit/JITOpcodes.cpp
@@ -73,14 +73,14 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
// VirtualCallLink Trampoline
// regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable.
- JumpList callLazyLinkFailures;
+ JumpList callLinkFailures;
Label virtualCallLinkBegin = align();
compileOpCallInitializeCallFrame();
preserveReturnAddressAfterCall(regT3);
emitPutToCallFrameHeader(regT3, RegisterFile::ReturnPC);
restoreArgumentReference();
Call callLazyLinkCall = call();
- callLazyLinkFailures.append(branchTestPtr(Zero, regT0));
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
restoreReturnAddressBeforeReturn(regT3);
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
jump(regT0);
@@ -93,24 +93,11 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
emitPutToCallFrameHeader(regT3, RegisterFile::ReturnPC);
restoreArgumentReference();
Call callLazyLinkConstruct = call();
- callLazyLinkFailures.append(branchTestPtr(Zero, regT0));
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
restoreReturnAddressBeforeReturn(regT3);
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
jump(regT0);
- // If the parser fails we want to be able to be able to keep going,
- // So we handle this as a parse failure.
- callLazyLinkFailures.link(this);
- emitGetFromCallFrameHeaderPtr(RegisterFile::ReturnPC, regT1);
- emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister);
- restoreReturnAddressBeforeReturn(regT1);
- move(ImmPtr(&globalData->exceptionLocation), regT2);
- storePtr(regT1, regT2);
- poke(callFrameRegister, 1 + OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
- poke(ImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()));
- ret();
-
-
// VirtualCall Trampoline
// regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable.
Label virtualCallBegin = align();
@@ -122,6 +109,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callCompileCall = call();
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
restoreReturnAddressBeforeReturn(regT3);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);
@@ -141,6 +129,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callCompileConstruct = call();
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
restoreReturnAddressBeforeReturn(regT3);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);
@@ -148,6 +137,18 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCodeForConstructWithArityCheck)), regT0);
jump(regT0);
+
+ // If the parser fails we want to be able to be able to keep going,
+ // So we handle this as a parse failure.
+ callLinkFailures.link(this);
+ emitGetFromCallFrameHeaderPtr(RegisterFile::ReturnPC, regT1);
+ emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister);
+ restoreReturnAddressBeforeReturn(regT1);
+ move(ImmPtr(&globalData->exceptionLocation), regT2);
+ storePtr(regT1, regT2);
+ poke(callFrameRegister, 1 + OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
+ poke(ImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()));
+ ret();
// NativeCall Trampoline
Label nativeCallThunk = privateCompileCTINativeCall(globalData);
@@ -307,7 +308,7 @@ JIT::Label JIT::privateCompileCTINativeCall(JSGlobalData* globalData, bool isCon
JIT::CodePtr JIT::privateCompileCTINativeCall(PassRefPtr<ExecutablePool>, JSGlobalData* globalData, NativeFunction)
{
- return globalData->jitStubs.ctiNativeCall();
+ return globalData->jitStubs->ctiNativeCall();
}
void JIT::emit_op_mov(Instruction* currentInstruction)
diff --git a/JavaScriptCore/jit/JITOpcodes32_64.cpp b/JavaScriptCore/jit/JITOpcodes32_64.cpp
index a44a8a1..658ebc5 100644
--- a/JavaScriptCore/jit/JITOpcodes32_64.cpp
+++ b/JavaScriptCore/jit/JITOpcodes32_64.cpp
@@ -64,10 +64,10 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
ret();
#endif
-
+
+ JumpList callLinkFailures;
// (2) Trampolines for the slow cases of op_call / op_call_eval / op_construct.
#if ENABLE(JIT_OPTIMIZE_CALL)
- JumpList callLazyLinkFailures;
// VirtualCallLink Trampoline
// regT0 holds callee, regT1 holds argCount. regT2 will hold the FunctionExecutable.
Label virtualCallLinkBegin = align();
@@ -76,7 +76,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
emitPutToCallFrameHeader(regT3, RegisterFile::ReturnPC);
restoreArgumentReference();
Call callLazyLinkCall = call();
- callLazyLinkFailures.append(branchTestPtr(Zero, regT0));
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
restoreReturnAddressBeforeReturn(regT3);
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
jump(regT0);
@@ -90,22 +90,10 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
restoreArgumentReference();
Call callLazyLinkConstruct = call();
restoreReturnAddressBeforeReturn(regT3);
- callLazyLinkFailures.append(branchTestPtr(Zero, regT0));
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
jump(regT0);
- // If the parser fails we want to be able to be able to keep going,
- // So we handle this as a parse failure.
- callLazyLinkFailures.link(this);
- emitGetFromCallFrameHeaderPtr(RegisterFile::ReturnPC, regT1);
- emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister);
- restoreReturnAddressBeforeReturn(regT1);
- move(ImmPtr(&globalData->exceptionLocation), regT2);
- storePtr(regT1, regT2);
- poke(callFrameRegister, 1 + OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
- poke(ImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()));
- ret();
-
#endif // ENABLE(JIT_OPTIMIZE_CALL)
// VirtualCall Trampoline
@@ -119,6 +107,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callCompileCall = call();
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
restoreReturnAddressBeforeReturn(regT3);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);
@@ -138,6 +127,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
preserveReturnAddressAfterCall(regT3);
restoreArgumentReference();
Call callCompileCconstruct = call();
+ callLinkFailures.append(branchTestPtr(Zero, regT0));
emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT1);
restoreReturnAddressBeforeReturn(regT3);
loadPtr(Address(regT0, OBJECT_OFFSETOF(JSFunction, m_executable)), regT2);
@@ -145,6 +135,18 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
loadPtr(Address(regT2, OBJECT_OFFSETOF(FunctionExecutable, m_jitCodeForConstructWithArityCheck)), regT0);
jump(regT0);
+
+ // If the parser fails we want to be able to be able to keep going,
+ // So we handle this as a parse failure.
+ callLinkFailures.link(this);
+ emitGetFromCallFrameHeaderPtr(RegisterFile::ReturnPC, regT1);
+ emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister);
+ restoreReturnAddressBeforeReturn(regT1);
+ move(ImmPtr(&globalData->exceptionLocation), regT2);
+ storePtr(regT1, regT2);
+ poke(callFrameRegister, 1 + OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
+ poke(ImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()));
+ ret();
// NativeCall Trampoline
Label nativeCallThunk = privateCompileCTINativeCall(globalData);
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index 85bd54f..f088b6e 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -139,9 +139,7 @@ asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
-#if !USE(JIT_STUB_ARGUMENT_VA_LIST)
"movl %esp, %ecx" "\n"
-#endif
"call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n"
"addl $0x3c, %esp" "\n"
"popl %ebx" "\n"
@@ -165,10 +163,6 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(X86_64)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST not supported on x86-64."
-#endif
-
// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
// need to change the assembly trampolines below to match.
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) % 32 == 0x0, JITStackFrame_maintains_32byte_stack_alignment);
@@ -235,10 +229,6 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(ARM_THUMB2)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
-#endif
-
#define THUNK_RETURN_ADDRESS_OFFSET 0x3C
#define PRESERVED_RETURN_ADDRESS_OFFSET 0x40
#define PRESERVED_R4_OFFSET 0x44
@@ -256,10 +246,6 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(MSVC) && CPU(X86)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST configuration not supported on MSVC."
-#endif
-
// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
// need to change the assembly trampolines below to match.
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) % 16 == 0x0, JITStackFrame_maintains_16byte_stack_alignment);
@@ -358,9 +344,7 @@ asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
-#if !USE(JIT_STUB_ARGUMENT_VA_LIST)
"movl %esp, %ecx" "\n"
-#endif
"call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n"
"addl $0x1c, %esp" "\n"
"popl %ebx" "\n"
@@ -384,10 +368,6 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(X86_64)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST not supported on x86-64."
-#endif
-
// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
// need to change the assembly trampolines below to match.
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
@@ -461,10 +441,6 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(ARM_THUMB2)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
-#endif
-
#define THUNK_RETURN_ADDRESS_OFFSET 0x1C
#define PRESERVED_RETURN_ADDRESS_OFFSET 0x20
#define PRESERVED_R4_OFFSET 0x24
@@ -482,10 +458,6 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif CPU(MIPS)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST not supported on MIPS."
-#endif
-
asm volatile(
".text" "\n"
".align 2" "\n"
@@ -620,10 +592,6 @@ __asm void ctiOpThrowNotCaught()
#elif COMPILER(MSVC) && CPU(X86)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#error "JIT_STUB_ARGUMENT_VA_LIST configuration not supported on MSVC."
-#endif
-
// These ASSERTs remind you that, if you change the layout of JITStackFrame, you
// need to change the assembly trampolines below to match.
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x38, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
@@ -797,8 +765,11 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
JITThunks::JITThunks(JSGlobalData* globalData)
{
- JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_trampolineStructure);
+ if (!globalData->executableAllocator.isValid())
+ return;
+ JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_trampolineStructure);
+ ASSERT(m_executablePool);
#if CPU(ARM_THUMB2)
// Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types),
// and the OBJECT_OFFSETOF macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT
@@ -915,7 +886,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
if (isJSString(globalData, baseValue) && propertyName == callFrame->propertyNames().length) {
// The tradeoff of compiling an patched inline string length access routine does not seem
// to pay off, so we currently only do this for arrays.
- ctiPatchCallByReturnAddress(codeBlock, returnAddress, globalData->jitStubs.ctiStringLengthTrampoline());
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, globalData->jitStubs->ctiStringLengthTrampoline());
return;
}
@@ -985,12 +956,6 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
#endif // ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
-#define SETUP_VA_LISTL_ARGS va_list vl_args; va_start(vl_args, args)
-#else
-#define SETUP_VA_LISTL_ARGS
-#endif
-
#ifndef NDEBUG
extern "C" {
@@ -1021,13 +986,13 @@ struct StackHack {
ReturnAddressPtr savedReturnAddress;
};
-#define STUB_INIT_STACK_FRAME(stackFrame) SETUP_VA_LISTL_ARGS; JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame)
+#define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame)
#define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = ReturnAddressPtr(returnAddress)
#define STUB_RETURN_ADDRESS stackHack.savedReturnAddress
#else
-#define STUB_INIT_STACK_FRAME(stackFrame) SETUP_VA_LISTL_ARGS; JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS)
+#define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS)
#define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = ReturnAddressPtr(returnAddress)
#define STUB_RETURN_ADDRESS *stackFrame.returnAddressSlot()
@@ -1858,8 +1823,11 @@ DEFINE_STUB_FUNCTION(void*, op_call_jitCompile)
ASSERT(!function->isHostFunction());
FunctionExecutable* executable = function->jsExecutable();
ScopeChainNode* callDataScopeChain = function->scope().node();
- executable->jitCodeForCall(stackFrame.callFrame, callDataScopeChain);
-
+ JSObject* error = executable->compileForCall(stackFrame.callFrame, callDataScopeChain);
+ if (error) {
+ stackFrame.callFrame->globalData().exception = error;
+ return 0;
+ }
return function;
}
@@ -1876,8 +1844,11 @@ DEFINE_STUB_FUNCTION(void*, op_construct_jitCompile)
ASSERT(!function->isHostFunction());
FunctionExecutable* executable = function->jsExecutable();
ScopeChainNode* callDataScopeChain = function->scope().node();
- executable->jitCodeForConstruct(stackFrame.callFrame, callDataScopeChain);
-
+ JSObject* error = executable->compileForConstruct(stackFrame.callFrame, callDataScopeChain);
+ if (error) {
+ stackFrame.callFrame->globalData().exception = error;
+ return 0;
+ }
return function;
}
@@ -2013,12 +1984,12 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkCall)
codePtr = executable->generatedJITCodeForCall().addressForCall();
else {
FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
- codeBlock = functionExecutable->bytecodeForCall(stackFrame.callFrame, callee->scope().node());
- if (!codeBlock) {
- stackFrame.callFrame->globalData().exception = createStackOverflowError(callFrame);
+ JSObject* error = functionExecutable->compileForCall(callFrame, callee->scope().node());
+ if (error) {
+ callFrame->globalData().exception = createStackOverflowError(callFrame);
return 0;
}
- functionExecutable->jitCodeForCall(callFrame, callee->scope().node());
+ codeBlock = &functionExecutable->generatedBytecodeForCall();
if (callFrame->argumentCountIncludingThis() == static_cast<size_t>(codeBlock->m_numParameters))
codePtr = functionExecutable->generatedJITCodeForCall().addressForCall();
else
@@ -2047,12 +2018,12 @@ DEFINE_STUB_FUNCTION(void*, vm_lazyLinkConstruct)
codePtr = executable->generatedJITCodeForConstruct().addressForCall();
else {
FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
- codeBlock = functionExecutable->bytecodeForConstruct(stackFrame.callFrame, callee->scope().node());
- if (!codeBlock) {
+ JSObject* error = functionExecutable->compileForConstruct(callFrame, callee->scope().node());
+ if (error) {
throwStackOverflowError(callFrame, stackFrame.globalData, ReturnAddressPtr(callFrame->returnPC()), STUB_RETURN_ADDRESS);
- VM_THROW_EXCEPTION();
+ return 0;
}
- functionExecutable->jitCodeForConstruct(callFrame, callee->scope().node());
+ codeBlock = &functionExecutable->generatedBytecodeForConstruct();
if (callFrame->argumentCountIncludingThis() == static_cast<size_t>(codeBlock->m_numParameters))
codePtr = functionExecutable->generatedJITCodeForConstruct().addressForCall();
else
@@ -3536,8 +3507,10 @@ PassRefPtr<NativeExecutable> JITThunks::hostFunctionStub(JSGlobalData* globalDat
PassRefPtr<NativeExecutable> JITThunks::hostFunctionStub(JSGlobalData* globalData, NativeFunction function, ThunkGenerator generator)
{
std::pair<HostFunctionStubMap::iterator, bool> entry = m_hostFunctionStubMap.add(function, 0);
- if (entry.second)
- entry.first->second = NativeExecutable::create(generator(globalData, m_executablePool.get()), function, ctiNativeConstruct(), callHostFunctionAsConstructor);
+ if (entry.second) {
+ MacroAssemblerCodePtr code = globalData->canUseJIT() ? generator(globalData, m_executablePool.get()) : MacroAssemblerCodePtr();
+ entry.first->second = NativeExecutable::create(code, function, ctiNativeConstruct(), callHostFunctionAsConstructor);
+ }
return entry.first->second;
}
diff --git a/JavaScriptCore/jit/JITStubs.h b/JavaScriptCore/jit/JITStubs.h
index a5b21e5..ba9e15f 100644
--- a/JavaScriptCore/jit/JITStubs.h
+++ b/JavaScriptCore/jit/JITStubs.h
@@ -225,26 +225,15 @@ namespace JSC {
#define JITSTACKFRAME_ARGS_INDEX (OBJECT_OFFSETOF(JITStackFrame, args) / sizeof(void*))
-#if USE(JIT_STUB_ARGUMENT_VA_LIST)
- #define STUB_ARGS_DECLARATION void* args, ...
- #define STUB_ARGS (reinterpret_cast<void**>(vl_args) - 1)
-
- #if COMPILER(MSVC)
- #define JIT_STUB __cdecl
- #else
- #define JIT_STUB
- #endif
+#define STUB_ARGS_DECLARATION void** args
+#define STUB_ARGS (args)
+
+#if CPU(X86) && COMPILER(MSVC)
+#define JIT_STUB __fastcall
+#elif CPU(X86) && COMPILER(GCC) && !OS(WINDOWS)
+#define JIT_STUB __attribute__ ((fastcall))
#else
- #define STUB_ARGS_DECLARATION void** args
- #define STUB_ARGS (args)
-
- #if CPU(X86) && COMPILER(MSVC)
- #define JIT_STUB __fastcall
- #elif CPU(X86) && COMPILER(GCC)
- #define JIT_STUB __attribute__ ((fastcall))
- #else
- #define JIT_STUB
- #endif
+#define JIT_STUB
#endif
extern "C" void ctiVMThrowTrampoline();
diff --git a/JavaScriptCore/jit/ThunkGenerators.cpp b/JavaScriptCore/jit/ThunkGenerators.cpp
index 271c7c1..20857cb 100644
--- a/JavaScriptCore/jit/ThunkGenerators.cpp
+++ b/JavaScriptCore/jit/ThunkGenerators.cpp
@@ -68,7 +68,7 @@ MacroAssemblerCodePtr charCodeAtThunkGenerator(JSGlobalData* globalData, Executa
SpecializedThunkJIT jit(1, globalData, pool);
stringCharLoad(jit);
jit.returnInt32(SpecializedThunkJIT::regT0);
- return jit.finalize(globalData->jitStubs.ctiNativeCall());
+ return jit.finalize(globalData->jitStubs->ctiNativeCall());
}
MacroAssemblerCodePtr charAtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
@@ -77,7 +77,7 @@ MacroAssemblerCodePtr charAtThunkGenerator(JSGlobalData* globalData, ExecutableP
stringCharLoad(jit);
charToString(jit, globalData, SpecializedThunkJIT::regT0, SpecializedThunkJIT::regT0, SpecializedThunkJIT::regT1);
jit.returnJSCell(SpecializedThunkJIT::regT0);
- return jit.finalize(globalData->jitStubs.ctiNativeCall());
+ return jit.finalize(globalData->jitStubs->ctiNativeCall());
}
MacroAssemblerCodePtr fromCharCodeThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
@@ -87,7 +87,7 @@ MacroAssemblerCodePtr fromCharCodeThunkGenerator(JSGlobalData* globalData, Execu
jit.loadInt32Argument(0, SpecializedThunkJIT::regT0);
charToString(jit, globalData, SpecializedThunkJIT::regT0, SpecializedThunkJIT::regT0, SpecializedThunkJIT::regT1);
jit.returnJSCell(SpecializedThunkJIT::regT0);
- return jit.finalize(globalData->jitStubs.ctiNativeCall());
+ return jit.finalize(globalData->jitStubs->ctiNativeCall());
}
MacroAssemblerCodePtr sqrtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
@@ -95,15 +95,15 @@ MacroAssemblerCodePtr sqrtThunkGenerator(JSGlobalData* globalData, ExecutablePoo
#if USE(JSVALUE64) || USE(JSVALUE32_64)
SpecializedThunkJIT jit(1, globalData, pool);
if (!jit.supportsFloatingPointSqrt())
- return globalData->jitStubs.ctiNativeCall();
+ return globalData->jitStubs->ctiNativeCall();
jit.loadDoubleArgument(0, SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::regT0);
jit.sqrtDouble(SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::fpRegT0);
jit.returnDouble(SpecializedThunkJIT::fpRegT0);
- return jit.finalize(globalData->jitStubs.ctiNativeCall());
+ return jit.finalize(globalData->jitStubs->ctiNativeCall());
#else
UNUSED_PARAM(pool);
- return globalData->jitStubs.ctiNativeCall();
+ return globalData->jitStubs->ctiNativeCall();
#endif
}
@@ -115,7 +115,7 @@ MacroAssemblerCodePtr powThunkGenerator(JSGlobalData* globalData, ExecutablePool
#if USE(JSVALUE64) || USE(JSVALUE32_64)
SpecializedThunkJIT jit(2, globalData, pool);
if (!jit.supportsFloatingPoint())
- return globalData->jitStubs.ctiNativeCall();
+ return globalData->jitStubs->ctiNativeCall();
jit.loadDouble(&oneConstant, SpecializedThunkJIT::fpRegT1);
jit.loadDoubleArgument(0, SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::regT0);
@@ -148,10 +148,10 @@ MacroAssemblerCodePtr powThunkGenerator(JSGlobalData* globalData, ExecutablePool
} else
jit.appendFailure(nonIntExponent);
- return jit.finalize(globalData->jitStubs.ctiNativeCall());
+ return jit.finalize(globalData->jitStubs->ctiNativeCall());
#else
UNUSED_PARAM(pool);
- return globalData->jitStubs.ctiNativeCall();
+ return globalData->jitStubs->ctiNativeCall();
#endif
}
diff --git a/JavaScriptCore/parser/JSParser.cpp b/JavaScriptCore/parser/JSParser.cpp
index 1fb1a9187..13013c7 100644
--- a/JavaScriptCore/parser/JSParser.cpp
+++ b/JavaScriptCore/parser/JSParser.cpp
@@ -85,12 +85,12 @@ private:
};
const JSToken& token() { return m_token; }
- void next()
+ void next(Lexer::LexType lexType = Lexer::IdentifyReservedWords)
{
m_lastLine = token().m_info.line;
m_lastTokenEnd = token().m_info.endOffset;
m_lexer->setLastLineNumber(m_lastLine);
- m_token.m_type = m_lexer->lex(&m_token.m_data, &m_token.m_info);
+ m_token.m_type = m_lexer->lex(&m_token.m_data, &m_token.m_info, lexType);
m_tokenCount++;
}
@@ -1091,11 +1091,12 @@ template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty
{
bool wasIdent = false;
switch (token().m_type) {
+ namedProperty:
case IDENT:
wasIdent = true;
case STRING: {
const Identifier* ident = token().m_data.ident;
- next();
+ next(Lexer::IgnoreReservedWords);
if (match(COLON)) {
next();
TreeExpression node = parseAssignmentExpression(context);
@@ -1129,7 +1130,8 @@ template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty
return context.template createProperty<complete>(m_globalData, propertyName, node, PropertyNode::Constant);
}
default:
- fail();
+ failIfFalse(token().m_type & KeywordTokenFlag);
+ goto namedProperty;
}
}
@@ -1410,7 +1412,7 @@ template <class TreeBuilder> TreeExpression JSParser::parseMemberExpression(Tree
}
case DOT: {
int expressionEnd = lastTokenEnd();
- next();
+ next(Lexer::IgnoreReservedWords);
matchOrFail(IDENT);
base = context.createDotAccess(base, *token().m_data.ident, expressionStart, expressionEnd, tokenEnd());
next();
diff --git a/JavaScriptCore/parser/JSParser.h b/JavaScriptCore/parser/JSParser.h
index 60f284c..b5a21d9 100644
--- a/JavaScriptCore/parser/JSParser.h
+++ b/JavaScriptCore/parser/JSParser.h
@@ -34,16 +34,17 @@ class SourceCode;
enum {
UnaryOpTokenFlag = 64,
- BinaryOpTokenPrecedenceShift = 7,
+ KeywordTokenFlag = 128,
+ BinaryOpTokenPrecedenceShift = 8,
BinaryOpTokenAllowsInPrecedenceAdditionalShift = 4,
- BinaryOpTokenPrecedenceMask = 15 << BinaryOpTokenPrecedenceShift
+ BinaryOpTokenPrecedenceMask = 15 << BinaryOpTokenPrecedenceShift,
};
#define BINARY_OP_PRECEDENCE(prec) (((prec) << BinaryOpTokenPrecedenceShift) | ((prec) << (BinaryOpTokenPrecedenceShift + BinaryOpTokenAllowsInPrecedenceAdditionalShift)))
#define IN_OP_PRECEDENCE(prec) ((prec) << (BinaryOpTokenPrecedenceShift + BinaryOpTokenAllowsInPrecedenceAdditionalShift))
enum JSTokenType {
- NULLTOKEN,
+ NULLTOKEN = KeywordTokenFlag,
TRUETOKEN,
FALSETOKEN,
BREAK,
@@ -69,7 +70,7 @@ enum JSTokenType {
FINALLY,
DEBUGGER,
ELSE,
- OPENBRACE,
+ OPENBRACE = 0,
CLOSEBRACE,
OPENPAREN,
CLOSEPAREN,
@@ -106,9 +107,9 @@ enum JSTokenType {
TILDE = 3 | UnaryOpTokenFlag,
AUTOPLUSPLUS = 4 | UnaryOpTokenFlag,
AUTOMINUSMINUS = 5 | UnaryOpTokenFlag,
- TYPEOF = 6 | UnaryOpTokenFlag,
- VOIDTOKEN = 7 | UnaryOpTokenFlag,
- DELETETOKEN = 8 | UnaryOpTokenFlag,
+ TYPEOF = 6 | UnaryOpTokenFlag | KeywordTokenFlag,
+ VOIDTOKEN = 7 | UnaryOpTokenFlag | KeywordTokenFlag,
+ DELETETOKEN = 8 | UnaryOpTokenFlag | KeywordTokenFlag,
OR = 0 | BINARY_OP_PRECEDENCE(1),
AND = 1 | BINARY_OP_PRECEDENCE(2),
BITOR = 2 | BINARY_OP_PRECEDENCE(3),
@@ -122,8 +123,8 @@ enum JSTokenType {
GT = 10 | BINARY_OP_PRECEDENCE(7),
LE = 11 | BINARY_OP_PRECEDENCE(7),
GE = 12 | BINARY_OP_PRECEDENCE(7),
- INSTANCEOF = 13 | BINARY_OP_PRECEDENCE(7),
- INTOKEN = 14 | IN_OP_PRECEDENCE(7),
+ INSTANCEOF = 13 | BINARY_OP_PRECEDENCE(7) | KeywordTokenFlag,
+ INTOKEN = 14 | IN_OP_PRECEDENCE(7) | KeywordTokenFlag,
LSHIFT = 15 | BINARY_OP_PRECEDENCE(8),
RSHIFT = 16 | BINARY_OP_PRECEDENCE(8),
URSHIFT = 17 | BINARY_OP_PRECEDENCE(8),
diff --git a/JavaScriptCore/parser/Lexer.cpp b/JavaScriptCore/parser/Lexer.cpp
index 45fe007..d7a122e 100644
--- a/JavaScriptCore/parser/Lexer.cpp
+++ b/JavaScriptCore/parser/Lexer.cpp
@@ -46,14 +46,16 @@ using namespace Unicode;
namespace JSC {
-enum CharacterTypes {
+enum CharacterType {
// Types for the main switch
- CharacterInvalid,
- CharacterAlpha,
+ // The first three types are fixed, and also used for identifying
+ // ASCII alpha and alphanumeric characters (see isIdentStart and isIdentPart).
+ CharacterIdentifierStart,
CharacterZero,
CharacterNumber,
+ CharacterInvalid,
CharacterLineTerminator,
CharacterExclamationMark,
CharacterOpenParen,
@@ -87,8 +89,8 @@ enum CharacterTypes {
CharacterWhiteSpace,
};
-// 128 ascii codes
-static unsigned short AsciiCharacters[128] = {
+// 128 ASCII codes
+static const unsigned short typesOfASCIICharacters[128] = {
/* 0 - Null */ CharacterInvalid,
/* 1 - Start of Heading */ CharacterInvalid,
/* 2 - Start of Text */ CharacterInvalid,
@@ -125,7 +127,7 @@ static unsigned short AsciiCharacters[128] = {
/* 33 - ! */ CharacterExclamationMark,
/* 34 - " */ CharacterQuote,
/* 35 - # */ CharacterInvalid,
-/* 36 - $ */ CharacterAlpha,
+/* 36 - $ */ CharacterIdentifierStart,
/* 37 - % */ CharacterModulo,
/* 38 - & */ CharacterAnd,
/* 39 - ' */ CharacterQuote,
@@ -154,64 +156,64 @@ static unsigned short AsciiCharacters[128] = {
/* 62 - > */ CharacterGreater,
/* 63 - ? */ CharacterQuestion,
/* 64 - @ */ CharacterInvalid,
-/* 65 - A */ CharacterAlpha,
-/* 66 - B */ CharacterAlpha,
-/* 67 - C */ CharacterAlpha,
-/* 68 - D */ CharacterAlpha,
-/* 69 - E */ CharacterAlpha,
-/* 70 - F */ CharacterAlpha,
-/* 71 - G */ CharacterAlpha,
-/* 72 - H */ CharacterAlpha,
-/* 73 - I */ CharacterAlpha,
-/* 74 - J */ CharacterAlpha,
-/* 75 - K */ CharacterAlpha,
-/* 76 - L */ CharacterAlpha,
-/* 77 - M */ CharacterAlpha,
-/* 78 - N */ CharacterAlpha,
-/* 79 - O */ CharacterAlpha,
-/* 80 - P */ CharacterAlpha,
-/* 81 - Q */ CharacterAlpha,
-/* 82 - R */ CharacterAlpha,
-/* 83 - S */ CharacterAlpha,
-/* 84 - T */ CharacterAlpha,
-/* 85 - U */ CharacterAlpha,
-/* 86 - V */ CharacterAlpha,
-/* 87 - W */ CharacterAlpha,
-/* 88 - X */ CharacterAlpha,
-/* 89 - Y */ CharacterAlpha,
-/* 90 - Z */ CharacterAlpha,
+/* 65 - A */ CharacterIdentifierStart,
+/* 66 - B */ CharacterIdentifierStart,
+/* 67 - C */ CharacterIdentifierStart,
+/* 68 - D */ CharacterIdentifierStart,
+/* 69 - E */ CharacterIdentifierStart,
+/* 70 - F */ CharacterIdentifierStart,
+/* 71 - G */ CharacterIdentifierStart,
+/* 72 - H */ CharacterIdentifierStart,
+/* 73 - I */ CharacterIdentifierStart,
+/* 74 - J */ CharacterIdentifierStart,
+/* 75 - K */ CharacterIdentifierStart,
+/* 76 - L */ CharacterIdentifierStart,
+/* 77 - M */ CharacterIdentifierStart,
+/* 78 - N */ CharacterIdentifierStart,
+/* 79 - O */ CharacterIdentifierStart,
+/* 80 - P */ CharacterIdentifierStart,
+/* 81 - Q */ CharacterIdentifierStart,
+/* 82 - R */ CharacterIdentifierStart,
+/* 83 - S */ CharacterIdentifierStart,
+/* 84 - T */ CharacterIdentifierStart,
+/* 85 - U */ CharacterIdentifierStart,
+/* 86 - V */ CharacterIdentifierStart,
+/* 87 - W */ CharacterIdentifierStart,
+/* 88 - X */ CharacterIdentifierStart,
+/* 89 - Y */ CharacterIdentifierStart,
+/* 90 - Z */ CharacterIdentifierStart,
/* 91 - [ */ CharacterOpenBracket,
/* 92 - \ */ CharacterBackSlash,
/* 93 - ] */ CharacterCloseBracket,
/* 94 - ^ */ CharacterXor,
-/* 95 - _ */ CharacterAlpha,
+/* 95 - _ */ CharacterIdentifierStart,
/* 96 - ` */ CharacterInvalid,
-/* 97 - a */ CharacterAlpha,
-/* 98 - b */ CharacterAlpha,
-/* 99 - c */ CharacterAlpha,
-/* 100 - d */ CharacterAlpha,
-/* 101 - e */ CharacterAlpha,
-/* 102 - f */ CharacterAlpha,
-/* 103 - g */ CharacterAlpha,
-/* 104 - h */ CharacterAlpha,
-/* 105 - i */ CharacterAlpha,
-/* 106 - j */ CharacterAlpha,
-/* 107 - k */ CharacterAlpha,
-/* 108 - l */ CharacterAlpha,
-/* 109 - m */ CharacterAlpha,
-/* 110 - n */ CharacterAlpha,
-/* 111 - o */ CharacterAlpha,
-/* 112 - p */ CharacterAlpha,
-/* 113 - q */ CharacterAlpha,
-/* 114 - r */ CharacterAlpha,
-/* 115 - s */ CharacterAlpha,
-/* 116 - t */ CharacterAlpha,
-/* 117 - u */ CharacterAlpha,
-/* 118 - v */ CharacterAlpha,
-/* 119 - w */ CharacterAlpha,
-/* 120 - x */ CharacterAlpha,
-/* 121 - y */ CharacterAlpha,
-/* 122 - z */ CharacterAlpha,
+/* 97 - a */ CharacterIdentifierStart,
+/* 98 - b */ CharacterIdentifierStart,
+/* 99 - c */ CharacterIdentifierStart,
+/* 100 - d */ CharacterIdentifierStart,
+/* 101 - e */ CharacterIdentifierStart,
+/* 102 - f */ CharacterIdentifierStart,
+/* 103 - g */ CharacterIdentifierStart,
+/* 104 - h */ CharacterIdentifierStart,
+/* 105 - i */ CharacterIdentifierStart,
+/* 106 - j */ CharacterIdentifierStart,
+/* 107 - k */ CharacterIdentifierStart,
+/* 108 - l */ CharacterIdentifierStart,
+/* 109 - m */ CharacterIdentifierStart,
+/* 110 - n */ CharacterIdentifierStart,
+/* 111 - o */ CharacterIdentifierStart,
+/* 112 - p */ CharacterIdentifierStart,
+/* 113 - q */ CharacterIdentifierStart,
+/* 114 - r */ CharacterIdentifierStart,
+/* 115 - s */ CharacterIdentifierStart,
+/* 116 - t */ CharacterIdentifierStart,
+/* 117 - u */ CharacterIdentifierStart,
+/* 118 - v */ CharacterIdentifierStart,
+/* 119 - w */ CharacterIdentifierStart,
+/* 120 - x */ CharacterIdentifierStart,
+/* 121 - y */ CharacterIdentifierStart,
+/* 122 - z */ CharacterIdentifierStart,
/* 123 - { */ CharacterOpenBrace,
/* 124 - | */ CharacterOr,
/* 125 - } */ CharacterCloseBrace,
@@ -335,7 +337,7 @@ static NEVER_INLINE bool isNonASCIIIdentStart(int c)
static inline bool isIdentStart(int c)
{
- return isASCII(c) ? isASCIIAlpha(c) || c == '$' || c == '_' : isNonASCIIIdentStart(c);
+ return isASCII(c) ? typesOfASCIICharacters[c] == CharacterIdentifierStart : isNonASCIIIdentStart(c);
}
static NEVER_INLINE bool isNonASCIIIdentPart(int c)
@@ -346,32 +348,35 @@ static NEVER_INLINE bool isNonASCIIIdentPart(int c)
static inline bool isIdentPart(int c)
{
- return isASCII(c) ? isASCIIAlphanumeric(c) || c == '$' || c == '_' : isNonASCIIIdentPart(c);
+ // Character types are divided into two groups depending on whether they can be part of an
+ // identifier or not. Those whose type value is less or equal than CharacterNumber can be
+ // part of an identifier. (See the CharacterType definition for more details.)
+ return isASCII(c) ? typesOfASCIICharacters[c] <= CharacterNumber : isNonASCIIIdentPart(c);
}
static inline int singleEscape(int c)
{
switch (c) {
- case 'b':
- return 0x08;
- case 't':
- return 0x09;
- case 'n':
- return 0x0A;
- case 'v':
- return 0x0B;
- case 'f':
- return 0x0C;
- case 'r':
- return 0x0D;
- case '\\':
- return '\\';
- case '\'':
- return '\'';
- case '"':
- return '"';
- default:
- return 0;
+ case 'b':
+ return 0x08;
+ case 't':
+ return 0x09;
+ case 'n':
+ return 0x0A;
+ case 'v':
+ return 0x0B;
+ case 'f':
+ return 0x0C;
+ case 'r':
+ return 0x0D;
+ case '\\':
+ return '\\';
+ case '\'':
+ return '\'';
+ case '"':
+ return '"';
+ default:
+ return 0;
}
}
@@ -456,7 +461,11 @@ ALWAYS_INLINE bool Lexer::parseString(JSTokenData* lvalp)
stringStart = currentCharacter();
continue;
- } else if (UNLIKELY(((static_cast<unsigned>(m_current) - 0xE) & 0x2000))) {
+ }
+ // Fast check for characters that require special handling.
+ // Catches -1, \n, \r, 0x2028, and 0x2029 as efficiently
+ // as possible, and lets through all common ASCII characters.
+ if (UNLIKELY(((static_cast<unsigned>(m_current) - 0xE) & 0x2000))) {
// New-line or end of input is not allowed
if (UNLIKELY(isLineTerminator(m_current)) || UNLIKELY(m_current == -1))
return false;
@@ -472,7 +481,7 @@ ALWAYS_INLINE bool Lexer::parseString(JSTokenData* lvalp)
return true;
}
-JSTokenType Lexer::lex(JSTokenData* lvalp, JSTokenInfo* llocp)
+JSTokenType Lexer::lex(JSTokenData* lvalp, JSTokenInfo* llocp, LexType lexType)
{
ASSERT(!m_error);
ASSERT(m_buffer8.isEmpty());
@@ -493,295 +502,287 @@ start:
m_delimited = false;
- if (isASCII(m_current)) {
- ASSERT(m_current >= 0 && m_current < 128);
+ CharacterType type;
+ if (LIKELY(isASCII(m_current)))
+ type = static_cast<CharacterType>(typesOfASCIICharacters[m_current]);
+ else if (isNonASCIIIdentStart(m_current))
+ type = CharacterIdentifierStart;
+ else if (isLineTerminator(m_current))
+ type = CharacterLineTerminator;
+ else
+ type = CharacterInvalid;
- switch (AsciiCharacters[m_current]) {
- case CharacterGreater:
+ switch (type) {
+ case CharacterGreater:
+ shift();
+ if (m_current == '>') {
shift();
if (m_current == '>') {
shift();
- if (m_current == '>') {
- shift();
- if (m_current == '=') {
- shift();
- token = URSHIFTEQUAL;
- break;
- }
- token = URSHIFT;
- break;
- }
if (m_current == '=') {
shift();
- token = RSHIFTEQUAL;
+ token = URSHIFTEQUAL;
break;
}
- token = RSHIFT;
- break;
- }
- if (m_current == '=') {
- shift();
- token = GE;
- break;
- }
- token = GT;
- break;
- case CharacterEqual:
- shift();
- if (m_current == '=') {
- shift();
- if (m_current == '=') {
- shift();
- token = STREQ;
- break;
- }
- token = EQEQ;
- break;
- }
- token = EQUAL;
- break;
- case CharacterLess:
- shift();
- if (m_current == '!' && peek(1) == '-' && peek(2) == '-') {
- // <!-- marks the beginning of a line comment (for www usage)
- goto inSingleLineComment;
- }
- if (m_current == '<') {
- shift();
- if (m_current == '=') {
- shift();
- token = LSHIFTEQUAL;
- break;
- }
- token = LSHIFT;
- break;
- }
- if (m_current == '=') {
- shift();
- token = LE;
+ token = URSHIFT;
break;
}
- token = LT;
- break;
- case CharacterExclamationMark:
- shift();
if (m_current == '=') {
shift();
- if (m_current == '=') {
- shift();
- token = STRNEQ;
- break;
- }
- token = NE;
+ token = RSHIFTEQUAL;
break;
}
- token = EXCLAMATION;
+ token = RSHIFT;
break;
- case CharacterAdd:
+ }
+ if (m_current == '=') {
shift();
- if (m_current == '+') {
- shift();
- token = (!m_terminator) ? PLUSPLUS : AUTOPLUSPLUS;
- break;
- }
- if (m_current == '=') {
- shift();
- token = PLUSEQUAL;
- break;
- }
- token = PLUS;
+ token = GE;
break;
- case CharacterSub:
+ }
+ token = GT;
+ break;
+ case CharacterEqual:
+ shift();
+ if (m_current == '=') {
shift();
- if (m_current == '-') {
- shift();
- if (m_atLineStart && m_current == '>') {
- shift();
- goto inSingleLineComment;
- }
- token = (!m_terminator) ? MINUSMINUS : AUTOMINUSMINUS;
- break;
- }
if (m_current == '=') {
shift();
- token = MINUSEQUAL;
+ token = STREQ;
break;
}
- token = MINUS;
+ token = EQEQ;
break;
- case CharacterMultiply:
+ }
+ token = EQUAL;
+ break;
+ case CharacterLess:
+ shift();
+ if (m_current == '!' && peek(1) == '-' && peek(2) == '-') {
+ // <!-- marks the beginning of a line comment (for www usage)
+ goto inSingleLineComment;
+ }
+ if (m_current == '<') {
shift();
if (m_current == '=') {
shift();
- token = MULTEQUAL;
+ token = LSHIFTEQUAL;
break;
}
- token = TIMES;
+ token = LSHIFT;
break;
- case CharacterSlash:
+ }
+ if (m_current == '=') {
shift();
- if (m_current == '/') {
- shift();
- goto inSingleLineComment;
- }
- if (m_current == '*') {
- shift();
- goto inMultiLineComment;
- }
- if (m_current == '=') {
- shift();
- token = DIVEQUAL;
- break;
- }
- token = DIVIDE;
+ token = LE;
break;
- case CharacterAnd:
+ }
+ token = LT;
+ break;
+ case CharacterExclamationMark:
+ shift();
+ if (m_current == '=') {
shift();
- if (m_current == '&') {
- shift();
- token = AND;
- break;
- }
if (m_current == '=') {
shift();
- token = ANDEQUAL;
+ token = STRNEQ;
break;
}
- token = BITAND;
+ token = NE;
break;
- case CharacterXor:
+ }
+ token = EXCLAMATION;
+ break;
+ case CharacterAdd:
+ shift();
+ if (m_current == '+') {
shift();
- if (m_current == '=') {
- shift();
- token = XOREQUAL;
- break;
- }
- token = BITXOR;
+ token = (!m_terminator) ? PLUSPLUS : AUTOPLUSPLUS;
break;
- case CharacterModulo:
+ }
+ if (m_current == '=') {
shift();
- if (m_current == '=') {
- shift();
- token = MODEQUAL;
- break;
- }
- token = MOD;
+ token = PLUSEQUAL;
break;
- case CharacterOr:
+ }
+ token = PLUS;
+ break;
+ case CharacterSub:
+ shift();
+ if (m_current == '-') {
shift();
- if (m_current == '=') {
+ if (m_atLineStart && m_current == '>') {
shift();
- token = OREQUAL;
- break;
- }
- if (m_current == '|') {
- shift();
- token = OR;
- break;
- }
- token = BITOR;
- break;
- case CharacterDot:
- shift();
- if (isASCIIDigit(m_current)) {
- record8('.');
- goto inNumberAfterDecimalPoint;
+ goto inSingleLineComment;
}
- token = DOT;
- break;
- case CharacterOpenParen:
- token = OPENPAREN;
- shift();
+ token = (!m_terminator) ? MINUSMINUS : AUTOMINUSMINUS;
break;
- case CharacterCloseParen:
- token = CLOSEPAREN;
+ }
+ if (m_current == '=') {
shift();
+ token = MINUSEQUAL;
break;
- case CharacterOpenBracket:
- token = OPENBRACKET;
+ }
+ token = MINUS;
+ break;
+ case CharacterMultiply:
+ shift();
+ if (m_current == '=') {
shift();
+ token = MULTEQUAL;
break;
- case CharacterCloseBracket:
- token = CLOSEBRACKET;
+ }
+ token = TIMES;
+ break;
+ case CharacterSlash:
+ shift();
+ if (m_current == '/') {
shift();
- break;
- case CharacterComma:
- token = COMMA;
+ goto inSingleLineComment;
+ }
+ if (m_current == '*') {
shift();
- break;
- case CharacterColon:
- token = COLON;
+ goto inMultiLineComment;
+ }
+ if (m_current == '=') {
shift();
+ token = DIVEQUAL;
break;
- case CharacterQuestion:
- token = QUESTION;
+ }
+ token = DIVIDE;
+ break;
+ case CharacterAnd:
+ shift();
+ if (m_current == '&') {
shift();
+ token = AND;
break;
- case CharacterTilde:
- token = TILDE;
+ }
+ if (m_current == '=') {
shift();
+ token = ANDEQUAL;
break;
- case CharacterSemicolon:
- m_delimited = true;
+ }
+ token = BITAND;
+ break;
+ case CharacterXor:
+ shift();
+ if (m_current == '=') {
shift();
- token = SEMICOLON;
+ token = XOREQUAL;
break;
- case CharacterOpenBrace:
- lvalp->intValue = currentOffset();
+ }
+ token = BITXOR;
+ break;
+ case CharacterModulo:
+ shift();
+ if (m_current == '=') {
shift();
- token = OPENBRACE;
+ token = MODEQUAL;
break;
- case CharacterCloseBrace:
- lvalp->intValue = currentOffset();
- m_delimited = true;
+ }
+ token = MOD;
+ break;
+ case CharacterOr:
+ shift();
+ if (m_current == '=') {
shift();
- token = CLOSEBRACE;
+ token = OREQUAL;
break;
- case CharacterBackSlash:
- goto startIdentifierWithBackslash;
- case CharacterZero:
- goto startNumberWithZeroDigit;
- case CharacterNumber:
- goto startNumber;
- case CharacterQuote:
- if (UNLIKELY(!parseString(lvalp)))
- goto returnError;
+ }
+ if (m_current == '|') {
shift();
- m_delimited = false;
- token = STRING;
+ token = OR;
break;
- case CharacterAlpha:
- ASSERT(isIdentStart(m_current));
- goto startIdentifierOrKeyword;
- case CharacterLineTerminator:
- ASSERT(isLineTerminator(m_current));
- shiftLineTerminator();
- m_atLineStart = true;
- m_terminator = true;
- if (lastTokenWasRestrKeyword()) {
- token = SEMICOLON;
- goto doneSemicolon;
- }
- goto start;
- case CharacterInvalid:
- goto returnError;
- default:
- ASSERT_NOT_REACHED();
- goto returnError;
}
- } else {
- // Rare characters
-
- if (isNonASCIIIdentStart(m_current))
- goto startIdentifierOrKeyword;
- if (isLineTerminator(m_current)) {
- shiftLineTerminator();
- m_atLineStart = true;
- m_terminator = true;
- if (lastTokenWasRestrKeyword())
- goto doneSemicolon;
- goto start;
+ token = BITOR;
+ break;
+ case CharacterDot:
+ shift();
+ if (isASCIIDigit(m_current)) {
+ record8('.');
+ goto inNumberAfterDecimalPoint;
}
+ token = DOT;
+ break;
+ case CharacterOpenParen:
+ token = OPENPAREN;
+ shift();
+ break;
+ case CharacterCloseParen:
+ token = CLOSEPAREN;
+ shift();
+ break;
+ case CharacterOpenBracket:
+ token = OPENBRACKET;
+ shift();
+ break;
+ case CharacterCloseBracket:
+ token = CLOSEBRACKET;
+ shift();
+ break;
+ case CharacterComma:
+ token = COMMA;
+ shift();
+ break;
+ case CharacterColon:
+ token = COLON;
+ shift();
+ break;
+ case CharacterQuestion:
+ token = QUESTION;
+ shift();
+ break;
+ case CharacterTilde:
+ token = TILDE;
+ shift();
+ break;
+ case CharacterSemicolon:
+ m_delimited = true;
+ shift();
+ token = SEMICOLON;
+ break;
+ case CharacterOpenBrace:
+ lvalp->intValue = currentOffset();
+ shift();
+ token = OPENBRACE;
+ break;
+ case CharacterCloseBrace:
+ lvalp->intValue = currentOffset();
+ m_delimited = true;
+ shift();
+ token = CLOSEBRACE;
+ break;
+ case CharacterBackSlash:
+ goto startIdentifierWithBackslash;
+ case CharacterZero:
+ goto startNumberWithZeroDigit;
+ case CharacterNumber:
+ goto startNumber;
+ case CharacterQuote:
+ if (UNLIKELY(!parseString(lvalp)))
+ goto returnError;
+ shift();
+ m_delimited = false;
+ token = STRING;
+ break;
+ case CharacterIdentifierStart:
+ ASSERT(isIdentStart(m_current));
+ goto startIdentifierOrKeyword;
+ case CharacterLineTerminator:
+ ASSERT(isLineTerminator(m_current));
+ shiftLineTerminator();
+ m_atLineStart = true;
+ m_terminator = true;
+ if (lastTokenWasRestrKeyword()) {
+ token = SEMICOLON;
+ goto doneSemicolon;
+ }
+ goto start;
+ case CharacterInvalid:
+ goto returnError;
+ default:
+ ASSERT_NOT_REACHED();
goto returnError;
}
@@ -1021,9 +1022,11 @@ doneIdentifierOrKeyword: {
m_atLineStart = false;
m_delimited = false;
m_buffer16.resize(0);
- const HashEntry* entry = m_keywordTable.entry(m_globalData, *lvalp->ident);
- token = entry ? static_cast<JSTokenType>(entry->lexerValue()) : IDENT;
-
+ if (lexType == IdentifyReservedWords) {
+ const HashEntry* entry = m_keywordTable.entry(m_globalData, *lvalp->ident);
+ token = entry ? static_cast<JSTokenType>(entry->lexerValue()) : IDENT;
+ } else
+ token = IDENT;
// Fall through into returnToken.
}
@@ -1157,6 +1160,8 @@ void Lexer::clear()
SourceCode Lexer::sourceCode(int openBrace, int closeBrace, int firstLine)
{
+ ASSERT(m_source->provider()->data()[openBrace] == '{');
+ ASSERT(m_source->provider()->data()[closeBrace] == '}');
return SourceCode(m_source->provider(), openBrace, closeBrace + 1, firstLine);
}
diff --git a/JavaScriptCore/parser/Lexer.h b/JavaScriptCore/parser/Lexer.h
index 5ab7ad7..4f7af44 100644
--- a/JavaScriptCore/parser/Lexer.h
+++ b/JavaScriptCore/parser/Lexer.h
@@ -50,7 +50,8 @@ namespace JSC {
void setIsReparsing() { m_isReparsing = true; }
// Functions for the parser itself.
- JSTokenType lex(JSTokenData* lvalp, JSTokenInfo* llocp);
+ enum LexType { IdentifyReservedWords, IgnoreReservedWords };
+ JSTokenType lex(JSTokenData* lvalp, JSTokenInfo* llocp, LexType);
int lineNumber() const { return m_lineNumber; }
void setLastLineNumber(int lastLineNumber) { m_lastLineNumber = lastLineNumber; }
int lastLineNumber() const { return m_lastLineNumber; }
@@ -126,7 +127,7 @@ namespace JSC {
inline bool Lexer::isWhiteSpace(int ch)
{
- return isASCII(ch) ? (ch == ' ' || ch == '\t' || ch == 0xB || ch == 0xC) : WTF::Unicode::isSeparatorSpace(ch);
+ return isASCII(ch) ? (ch == ' ' || ch == '\t' || ch == 0xB || ch == 0xC) : (WTF::Unicode::isSeparatorSpace(ch) || ch == 0xFEFF);
}
inline bool Lexer::isLineTerminator(int ch)
diff --git a/JavaScriptCore/parser/Nodes.cpp b/JavaScriptCore/parser/Nodes.cpp
index ffea524..c41d735 100644
--- a/JavaScriptCore/parser/Nodes.cpp
+++ b/JavaScriptCore/parser/Nodes.cpp
@@ -67,7 +67,7 @@ void SourceElements::append(StatementNode* statement)
m_statements.append(statement);
}
-inline StatementNode* SourceElements::singleStatement() const
+StatementNode* SourceElements::singleStatement() const
{
size_t size = m_statements.size();
return size == 1 ? m_statements[0] : 0;
diff --git a/JavaScriptCore/parser/Nodes.h b/JavaScriptCore/parser/Nodes.h
index 6206384..d25079b 100644
--- a/JavaScriptCore/parser/Nodes.h
+++ b/JavaScriptCore/parser/Nodes.h
@@ -152,6 +152,7 @@ namespace JSC {
virtual bool isCommaNode() const { return false; }
virtual bool isSimpleArray() const { return false; }
virtual bool isAdd() const { return false; }
+ virtual bool isSubtract() const { return false; }
virtual bool hasConditionContextCodegen() const { return false; }
virtual void emitBytecodeInConditionContext(BytecodeGenerator&, Label*, Label*, bool) { ASSERT_NOT_REACHED(); }
@@ -806,6 +807,9 @@ namespace JSC {
RegisterID* emitStrcat(BytecodeGenerator& generator, RegisterID* destination, RegisterID* lhs = 0, ReadModifyResolveNode* emitExpressionInfoForMe = 0);
+ ExpressionNode* lhs() { return m_expr1; };
+ ExpressionNode* rhs() { return m_expr2; };
+
private:
virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0);
@@ -854,6 +858,8 @@ namespace JSC {
class SubNode : public BinaryOpNode {
public:
SubNode(JSGlobalData*, ExpressionNode* expr1, ExpressionNode* expr2, bool rightHasAssignments);
+
+ virtual bool isSubtract() const { return true; }
};
class LeftShiftNode : public BinaryOpNode {
@@ -1143,6 +1149,7 @@ namespace JSC {
public:
BlockNode(JSGlobalData*, SourceElements* = 0);
+ StatementNode* singleStatement() const;
StatementNode* lastStatement() const;
private:
@@ -1294,6 +1301,8 @@ namespace JSC {
public:
ReturnNode(JSGlobalData*, ExpressionNode* value);
+ ExpressionNode* value() { return m_value; }
+
private:
virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0);
diff --git a/JavaScriptCore/parser/Parser.h b/JavaScriptCore/parser/Parser.h
index 894f709..c167980 100644
--- a/JavaScriptCore/parser/Parser.h
+++ b/JavaScriptCore/parser/Parser.h
@@ -24,6 +24,7 @@
#define Parser_h
#include "Debugger.h"
+#include "ExceptionHelpers.h"
#include "Executable.h"
#include "JSGlobalObject.h"
#include "Lexer.h"
@@ -38,6 +39,7 @@
namespace JSC {
class FunctionBodyNode;
+
class ProgramNode;
class UString;
@@ -46,7 +48,7 @@ namespace JSC {
class Parser : public Noncopyable {
public:
template <class ParsedNode>
- PassRefPtr<ParsedNode> parse(JSGlobalData* globalData, Debugger*, ExecState*, const SourceCode& source, int* errLine = 0, UString* errMsg = 0);
+ PassRefPtr<ParsedNode> parse(JSGlobalData* globalData, JSGlobalObject* lexicalGlobalObject, Debugger*, ExecState*, const SourceCode& source, JSObject** exception);
void didFinishParsing(SourceElements*, ParserArenaData<DeclarationStacks::VarStack>*,
ParserArenaData<DeclarationStacks::FunctionStack>*, CodeFeatures features, int lastLine, int numConstants);
@@ -56,6 +58,10 @@ namespace JSC {
private:
void parse(JSGlobalData*, int* errLine, UString* errMsg);
+ // Used to determine type of error to report.
+ bool isFunctionBodyNode(ScopeNode*) { return false; }
+ bool isFunctionBodyNode(FunctionBodyNode*) { return true; }
+
ParserArena m_arena;
const SourceCode* m_source;
SourceElements* m_sourceElements;
@@ -67,12 +73,16 @@ namespace JSC {
};
template <class ParsedNode>
- PassRefPtr<ParsedNode> Parser::parse(JSGlobalData* globalData, Debugger* debugger, ExecState* debuggerExecState, const SourceCode& source, int* errLine, UString* errMsg)
+ PassRefPtr<ParsedNode> Parser::parse(JSGlobalData* globalData, JSGlobalObject* lexicalGlobalObject, Debugger* debugger, ExecState* debuggerExecState, const SourceCode& source, JSObject** exception)
{
+ ASSERT(exception && !*exception);
+ int errLine;
+ UString errMsg;
+
m_source = &source;
if (ParsedNode::scopeIsFunction)
globalData->lexer->setIsReparsing();
- parse(globalData, errLine, errMsg);
+ parse(globalData, &errLine, &errMsg);
RefPtr<ParsedNode> result;
if (m_sourceElements) {
@@ -84,6 +94,17 @@ namespace JSC {
m_features,
m_numConstants);
result->setLoc(m_source->firstLine(), m_lastLine);
+ } else if (lexicalGlobalObject) {
+ // We can never see a syntax error when reparsing a function, since we should have
+ // reported the error when parsing the containing program or eval code. So if we're
+ // parsing a function body node, we assume that what actually happened here is that
+ // we ran out of stack while parsing. If we see an error while parsing eval or program
+ // code we assume that it was a syntax error since running out of stack is much less
+ // likely, and we are currently unable to distinguish between the two cases.
+ if (isFunctionBodyNode(static_cast<ParsedNode*>(0)))
+ *exception = createStackOverflowError(lexicalGlobalObject);
+ else
+ *exception = addErrorInfo(globalData, createSyntaxError(lexicalGlobalObject, errMsg), errLine, source);
}
m_arena.reset();
@@ -94,7 +115,7 @@ namespace JSC {
m_funcDeclarations = 0;
if (debugger && !ParsedNode::scopeIsFunction)
- debugger->sourceParsed(debuggerExecState, source, *errLine, *errMsg);
+ debugger->sourceParsed(debuggerExecState, source, errLine, errMsg);
return result.release();
}
diff --git a/JavaScriptCore/parser/SourceProvider.h b/JavaScriptCore/parser/SourceProvider.h
index 6b9c028..5a57542 100644
--- a/JavaScriptCore/parser/SourceProvider.h
+++ b/JavaScriptCore/parser/SourceProvider.h
@@ -60,9 +60,9 @@ namespace JSC {
class UStringSourceProvider : public SourceProvider {
public:
- static PassRefPtr<UStringSourceProvider> create(const UString& source, const UString& url, bool hasBOMs = true)
+ static PassRefPtr<UStringSourceProvider> create(const UString& source, const UString& url)
{
- return adoptRef(new UStringSourceProvider(source, url, hasBOMs));
+ return adoptRef(new UStringSourceProvider(source, url));
}
UString getRange(int start, int end) const
@@ -73,14 +73,10 @@ namespace JSC {
int length() const { return m_source.size(); }
private:
- UStringSourceProvider(const UString& source, const UString& url, bool hasBOMs)
+ UStringSourceProvider(const UString& source, const UString& url)
: SourceProvider(url)
, m_source(source)
{
- if (hasBOMs && m_source.size()) {
- bool scratch = false;
- m_source = UString(m_source.rep()->copyStringWithoutBOMs(false, scratch));
- }
}
UString m_source;
diff --git a/JavaScriptCore/qt/ChangeLog b/JavaScriptCore/qt/ChangeLog
index 71b4a21..448a59e 100644
--- a/JavaScriptCore/qt/ChangeLog
+++ b/JavaScriptCore/qt/ChangeLog
@@ -1,3 +1,115 @@
+2010-07-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Introduce QScriptOriginalGlobalObject.
+
+ QtScript exposes more functionality than JSC C API. Sometimes it is
+ necessary to take a shortcut in implementation. Really often we have
+ to use a standard JS function. These function could be changed or
+ even deleted by a script, so a backup of a reference to an object is needed.
+
+ In them same time this is rather a workaround then real fix, so the code
+ should be separated and changed easily in future. It is why we need
+ the new internal class.
+
+ The patch fixes a few crashes.
+
+ [Qt] QScriptEngine should work correctly even after global object changes
+ https://bugs.webkit.org/show_bug.cgi?id=41839
+
+ * api/QtScript.pro:
+ * api/qscriptengine_p.cpp:
+ (QScriptEnginePrivate::QScriptEnginePrivate):
+ (QScriptEnginePrivate::~QScriptEnginePrivate):
+ * api/qscriptengine_p.h:
+ (QScriptEnginePrivate::isArray):
+ (QScriptEnginePrivate::isError):
+ (QScriptEnginePrivate::objectHasOwnProperty):
+ (QScriptEnginePrivate::objectGetOwnPropertyNames):
+ * api/qscriptoriginalglobalobject_p.h: Added.
+ (QScriptOriginalGlobalObject::QScriptOriginalGlobalObject):
+ (QScriptOriginalGlobalObject::initializeMember):
+ (QScriptOriginalGlobalObject::~QScriptOriginalGlobalObject):
+ (QScriptOriginalGlobalObject::objectHasOwnProperty):
+ (QScriptOriginalGlobalObject::objectGetOwnPropertyNames):
+ (QScriptOriginalGlobalObject::isArray):
+ (QScriptOriginalGlobalObject::isError):
+ (QScriptOriginalGlobalObject::isType):
+ * api/qscriptvalue_p.h:
+ (QScriptValuePrivate::isError):
+ (QScriptValuePrivate::hasOwnProperty):
+ * api/qscriptvalueiterator_p.h:
+ (QScriptValueIteratorPrivate::QScriptValueIteratorPrivate):
+ * tests/qscriptvalue/tst_qscriptvalue.cpp:
+ (tst_QScriptValue::globalObjectChanges):
+ * tests/qscriptvalue/tst_qscriptvalue.h:
+
+2010-07-13 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Introduce QScriptValueIterator.
+
+ The QScriptValueIterator class permits to iterate over a QScriptValue's properties.
+
+ [Qt] QtScript should provide an API for enumerating a JS object's properties
+ https://bugs.webkit.org/show_bug.cgi?id=41680
+
+ * api/QtScript.pro:
+ * api/qscriptvalueiterator.cpp: Added.
+ (QScriptValueIterator::QScriptValueIterator):
+ (QScriptValueIterator::~QScriptValueIterator):
+ (QScriptValueIterator::hasNext):
+ (QScriptValueIterator::next):
+ (QScriptValueIterator::hasPrevious):
+ (QScriptValueIterator::previous):
+ (QScriptValueIterator::toFront):
+ (QScriptValueIterator::toBack):
+ (QScriptValueIterator::name):
+ (QScriptValueIterator::scriptName):
+ (QScriptValueIterator::value):
+ (QScriptValueIterator::setValue):
+ (QScriptValueIterator::remove):
+ (QScriptValueIterator::flags):
+ (QScriptValueIterator::operator=):
+ * api/qscriptvalueiterator.h: Added.
+ * api/qscriptvalueiterator_p.h: Added.
+ (QScriptValueIteratorPrivate::QScriptValueIteratorPrivate):
+ (QScriptValueIteratorPrivate::~QScriptValueIteratorPrivate):
+ (QScriptValueIteratorPrivate::hasNext):
+ (QScriptValueIteratorPrivate::next):
+ (QScriptValueIteratorPrivate::hasPrevious):
+ (QScriptValueIteratorPrivate::previous):
+ (QScriptValueIteratorPrivate::name):
+ (QScriptValueIteratorPrivate::scriptName):
+ (QScriptValueIteratorPrivate::value):
+ (QScriptValueIteratorPrivate::setValue):
+ (QScriptValueIteratorPrivate::remove):
+ (QScriptValueIteratorPrivate::toFront):
+ (QScriptValueIteratorPrivate::toBack):
+ (QScriptValueIteratorPrivate::flags):
+ (QScriptValueIteratorPrivate::isValid):
+ (QScriptValueIteratorPrivate::engine):
+ * tests/qscriptvalueiterator/qscriptvalueiterator.pro: Added.
+ * tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp: Added.
+ (tst_QScriptValueIterator::tst_QScriptValueIterator):
+ (tst_QScriptValueIterator::~tst_QScriptValueIterator):
+ (tst_QScriptValueIterator::iterateForward_data):
+ (tst_QScriptValueIterator::iterateForward):
+ (tst_QScriptValueIterator::iterateBackward_data):
+ (tst_QScriptValueIterator::iterateBackward):
+ (tst_QScriptValueIterator::iterateArray_data):
+ (tst_QScriptValueIterator::iterateArray):
+ (tst_QScriptValueIterator::iterateBackAndForth):
+ (tst_QScriptValueIterator::setValue):
+ (tst_QScriptValueIterator::remove):
+ (tst_QScriptValueIterator::removeMixed):
+ (tst_QScriptValueIterator::removeUndeletable):
+ (tst_QScriptValueIterator::iterateString):
+ (tst_QScriptValueIterator::assignObjectToIterator):
+ * tests/tests.pro:
+
2010-07-09 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/JavaScriptCore/qt/api/QtScript.pro b/JavaScriptCore/qt/api/QtScript.pro
index 3c2691e..c2c6f83 100644
--- a/JavaScriptCore/qt/api/QtScript.pro
+++ b/JavaScriptCore/qt/api/QtScript.pro
@@ -24,6 +24,7 @@ INCLUDEPATH += $$PWD/../../API
SOURCES += $$PWD/qscriptengine.cpp \
$$PWD/qscriptengine_p.cpp \
$$PWD/qscriptvalue.cpp \
+ $$PWD/qscriptvalueiterator.cpp \
$$PWD/qscriptstring.cpp \
$$PWD/qscriptprogram.cpp \
$$PWD/qscriptsyntaxcheckresult.cpp \
@@ -33,12 +34,15 @@ HEADERS += $$PWD/qtscriptglobal.h \
$$PWD/qscriptengine_p.h \
$$PWD/qscriptvalue.h \
$$PWD/qscriptvalue_p.h \
+ $$PWD/qscriptvalueiterator.h \
+ $$PWD/qscriptvalueiterator_p.h \
$$PWD/qscriptconverter_p.h \
$$PWD/qscriptstring.h \
$$PWD/qscriptstring_p.h \
$$PWD/qscriptprogram.h \
$$PWD/qscriptprogram_p.h \
$$PWD/qscriptsyntaxcheckresult.h \
+ $$PWD/qscriptoriginalglobalobject_p.h \
!static: DEFINES += QT_MAKEDLL
diff --git a/JavaScriptCore/qt/api/qscriptengine_p.cpp b/JavaScriptCore/qt/api/qscriptengine_p.cpp
index 360de29..e3311ed 100644
--- a/JavaScriptCore/qt/api/qscriptengine_p.cpp
+++ b/JavaScriptCore/qt/api/qscriptengine_p.cpp
@@ -32,32 +32,12 @@ QScriptEnginePrivate::QScriptEnginePrivate(const QScriptEngine* engine)
: q_ptr(const_cast<QScriptEngine*>(engine))
, m_context(JSGlobalContextCreate(0))
, m_exception(0)
- , m_arrayConstructor(0)
- , m_arrayPrototype(0)
+ , m_originalGlobalObject(m_context)
{
- JSObjectRef globalObject = JSContextGetGlobalObject(m_context);
-
- // Save references to the Array constructor and prototype.
- JSRetainPtr<JSStringRef> arrayName(Adopt, JSStringCreateWithUTF8CString("Array"));
- JSValueRef arrayConstructor = JSObjectGetProperty(m_context, globalObject, arrayName.get(), /* exception */ 0);
- Q_ASSERT(JSValueIsObject(m_context, arrayConstructor));
- m_arrayConstructor = JSValueToObject(m_context, arrayConstructor, /* exception */ 0);
- JSValueProtect(m_context, m_arrayConstructor);
-
- // Note that this is not the [[Prototype]] internal property (which we could
- // get via JSObjectGetPrototype), but the Array.prototype, that will be set
- // as [[Prototype]] of Array instances.
- JSRetainPtr<JSStringRef> prototypeName(Adopt, JSStringCreateWithUTF8CString("prototype"));
- JSValueRef arrayPrototype = JSObjectGetProperty(m_context, m_arrayConstructor, prototypeName.get(), /* exception */ 0);
- Q_ASSERT(JSValueIsObject(m_context, arrayPrototype));
- m_arrayPrototype = arrayPrototype;
- JSValueProtect(m_context, m_arrayPrototype);
}
QScriptEnginePrivate::~QScriptEnginePrivate()
{
- JSValueUnprotect(m_context, m_arrayConstructor);
- JSValueUnprotect(m_context, m_arrayPrototype);
if (m_exception)
JSValueUnprotect(m_context, m_exception);
JSGlobalContextRelease(m_context);
diff --git a/JavaScriptCore/qt/api/qscriptengine_p.h b/JavaScriptCore/qt/api/qscriptengine_p.h
index 401c051..d54cdcc 100644
--- a/JavaScriptCore/qt/api/qscriptengine_p.h
+++ b/JavaScriptCore/qt/api/qscriptengine_p.h
@@ -22,6 +22,7 @@
#include "qscriptconverter_p.h"
#include "qscriptengine.h"
+#include "qscriptoriginalglobalobject_p.h"
#include "qscriptstring_p.h"
#include "qscriptsyntaxcheckresult_p.h"
#include "qscriptvalue.h"
@@ -79,13 +80,15 @@ public:
inline operator JSGlobalContextRef() const;
inline bool isArray(JSValueRef value) const;
+ inline bool isError(JSValueRef value) const;
+ inline bool objectHasOwnProperty(JSObjectRef object, JSStringRef property) const;
+ inline QVector<JSStringRef> objectGetOwnPropertyNames(JSObjectRef object) const;
private:
QScriptEngine* q_ptr;
JSGlobalContextRef m_context;
JSValueRef m_exception;
- JSObjectRef m_arrayConstructor;
- JSValueRef m_arrayPrototype;
+ QScriptOriginalGlobalObject m_originalGlobalObject;
};
@@ -218,9 +221,24 @@ QScriptEnginePrivate::operator JSGlobalContextRef() const
bool QScriptEnginePrivate::isArray(JSValueRef value) const
{
- // JSC API doesn't export the [[Class]] information for the builtins. But we know that a value
- // is an array if it was created with the Array constructor or if it is the Array.prototype.
- return JSValueIsInstanceOfConstructor(m_context, value, m_arrayConstructor, /* exception */ 0) || JSValueIsStrictEqual(m_context, value, m_arrayPrototype);
+ return m_originalGlobalObject.isArray(value);
+}
+
+bool QScriptEnginePrivate::isError(JSValueRef value) const
+{
+ return m_originalGlobalObject.isError(value);
+}
+
+inline bool QScriptEnginePrivate::objectHasOwnProperty(JSObjectRef object, JSStringRef property) const
+{
+ // FIXME We need a JSC C API function for this.
+ return m_originalGlobalObject.objectHasOwnProperty(object, property);
+}
+
+inline QVector<JSStringRef> QScriptEnginePrivate::objectGetOwnPropertyNames(JSObjectRef object) const
+{
+ // FIXME We can't use C API function JSObjectGetPropertyNames as it returns only enumerable properties.
+ return m_originalGlobalObject.objectGetOwnPropertyNames(object);
}
#endif
diff --git a/JavaScriptCore/qt/api/qscriptoriginalglobalobject_p.h b/JavaScriptCore/qt/api/qscriptoriginalglobalobject_p.h
new file mode 100644
index 0000000..8d080fb
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptoriginalglobalobject_p.h
@@ -0,0 +1,186 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptoriginalglobalobject_p_h
+#define qscriptoriginalglobalobject_p_h
+
+#include <JavaScriptCore/JavaScript.h>
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <QtCore/qvector.h>
+
+/*!
+ \internal
+ This class is a workaround for missing JSC C API functionality. This class keeps all important
+ properties of an original (default) global object, so we can use it even if the global object was
+ changed.
+
+ FIXME this class is a container for workarounds :-) it should be replaced by proper JSC C API calls.
+
+ The class have to be created on the QScriptEnginePrivate creation time (before any change got applied to
+ global object).
+*/
+class QScriptOriginalGlobalObject {
+public:
+ inline QScriptOriginalGlobalObject(JSGlobalContextRef context);
+ inline ~QScriptOriginalGlobalObject();
+
+ inline bool objectHasOwnProperty(JSObjectRef object, JSStringRef property) const;
+ inline QVector<JSStringRef> objectGetOwnPropertyNames(JSObjectRef object) const;
+
+ inline bool isArray(JSValueRef value) const;
+ inline bool isError(JSValueRef value) const;
+private:
+ inline bool isType(JSValueRef value, JSObjectRef constructor, JSValueRef prototype) const;
+ inline void initializeMember(JSObjectRef globalObject, JSStringRef prototypeName, const char* type, JSObjectRef& constructor, JSValueRef& prototype);
+
+ // Copy of the global context reference (the same as in QScriptEnginePrivate).
+ JSGlobalContextRef m_context;
+
+ // Copy of constructors and prototypes used in isType functions.
+ JSObjectRef m_arrayConstructor;
+ JSValueRef m_arrayPrototype;
+ JSObjectRef m_errorConstructor;
+ JSValueRef m_errorPrototype;
+
+ // Reference to standard JS functions that are not exposed by JSC C API.
+ JSObjectRef m_hasOwnPropertyFunction;
+ JSObjectRef m_getOwnPropertyNamesFunction;
+};
+
+QScriptOriginalGlobalObject::QScriptOriginalGlobalObject(JSGlobalContextRef context)
+ : m_context(JSGlobalContextRetain(context))
+{
+ JSObjectRef globalObject = JSContextGetGlobalObject(m_context);
+ JSValueRef exception = 0;
+ JSRetainPtr<JSStringRef> propertyName;
+
+ propertyName.adopt(JSStringCreateWithUTF8CString("prototype"));
+ initializeMember(globalObject, propertyName.get(), "Array", m_arrayConstructor, m_arrayPrototype);
+ initializeMember(globalObject, propertyName.get(), "Error", m_errorConstructor, m_errorPrototype);
+
+ propertyName.adopt(JSStringCreateWithUTF8CString("hasOwnProperty"));
+ m_hasOwnPropertyFunction = const_cast<JSObjectRef>(JSObjectGetProperty(m_context, globalObject, propertyName.get(), &exception));
+ JSValueProtect(m_context, m_hasOwnPropertyFunction);
+ Q_ASSERT(JSValueIsObject(m_context, m_hasOwnPropertyFunction));
+ Q_ASSERT(JSObjectIsFunction(m_context, m_hasOwnPropertyFunction));
+ Q_ASSERT(!exception);
+
+ propertyName.adopt(JSStringCreateWithUTF8CString("Object"));
+ JSObjectRef objectConstructor
+ = const_cast<JSObjectRef>(JSObjectGetProperty(m_context, globalObject, propertyName.get(), &exception));
+ propertyName.adopt(JSStringCreateWithUTF8CString("getOwnPropertyNames"));
+ m_getOwnPropertyNamesFunction
+ = const_cast<JSObjectRef>(JSObjectGetProperty(m_context, objectConstructor, propertyName.get(), &exception));
+ JSValueProtect(m_context, m_getOwnPropertyNamesFunction);
+ Q_ASSERT(JSValueIsObject(m_context, m_getOwnPropertyNamesFunction));
+ Q_ASSERT(JSObjectIsFunction(m_context, m_getOwnPropertyNamesFunction));
+ Q_ASSERT(!exception);
+}
+
+inline void QScriptOriginalGlobalObject::initializeMember(JSObjectRef globalObject, JSStringRef prototypeName, const char* type, JSObjectRef& constructor, JSValueRef& prototype)
+{
+ JSRetainPtr<JSStringRef> typeName(Adopt, JSStringCreateWithUTF8CString(type));
+ JSValueRef exception = 0;
+
+ // Save references to the Type constructor and prototype.
+ JSValueRef typeConstructor = JSObjectGetProperty(m_context, globalObject, typeName.get(), &exception);
+ Q_ASSERT(JSValueIsObject(m_context, typeConstructor));
+ constructor = JSValueToObject(m_context, typeConstructor, &exception);
+ JSValueProtect(m_context, constructor);
+
+ // Note that this is not the [[Prototype]] internal property (which we could
+ // get via JSObjectGetPrototype), but the Type.prototype, that will be set
+ // as [[Prototype]] of Type instances.
+ prototype = JSObjectGetProperty(m_context, constructor, prototypeName, &exception);
+ Q_ASSERT(JSValueIsObject(m_context, prototype));
+ JSValueProtect(m_context, prototype);
+ Q_ASSERT(!exception);
+}
+
+QScriptOriginalGlobalObject::~QScriptOriginalGlobalObject()
+{
+ JSValueUnprotect(m_context, m_arrayConstructor);
+ JSValueUnprotect(m_context, m_arrayPrototype);
+ JSValueUnprotect(m_context, m_errorConstructor);
+ JSValueUnprotect(m_context, m_errorPrototype);
+ JSValueUnprotect(m_context, m_hasOwnPropertyFunction);
+ JSValueUnprotect(m_context, m_getOwnPropertyNamesFunction);
+ JSGlobalContextRelease(m_context);
+}
+
+inline bool QScriptOriginalGlobalObject::objectHasOwnProperty(JSObjectRef object, JSStringRef property) const
+{
+ // FIXME This function should be replaced by JSC C API.
+ JSValueRef exception = 0;
+ JSValueRef propertyName[] = { JSValueMakeString(m_context, property) };
+ JSValueRef result = JSObjectCallAsFunction(m_context, m_hasOwnPropertyFunction, object, 1, propertyName, &exception);
+ return exception ? false : JSValueToBoolean(m_context, result);
+}
+
+/*!
+ \internal
+ This method gives ownership of all JSStringRefs.
+*/
+inline QVector<JSStringRef> QScriptOriginalGlobalObject::objectGetOwnPropertyNames(JSObjectRef object) const
+{
+ JSValueRef exception = 0;
+ JSObjectRef propertyNames
+ = const_cast<JSObjectRef>(JSObjectCallAsFunction(m_context,
+ m_getOwnPropertyNamesFunction,
+ /* thisObject */ 0,
+ /* argumentCount */ 1,
+ &object,
+ &exception));
+ Q_ASSERT(JSValueIsObject(m_context, propertyNames));
+ Q_ASSERT(!exception);
+ JSStringRef lengthName = QScriptConverter::toString("length");
+ int count = JSValueToNumber(m_context, JSObjectGetProperty(m_context, propertyNames, lengthName, &exception), &exception);
+
+ Q_ASSERT(!exception);
+ QVector<JSStringRef> names;
+ names.reserve(count);
+ for (int i = 0; i < count; ++i) {
+ JSValueRef tmp = JSObjectGetPropertyAtIndex(m_context, propertyNames, i, &exception);
+ names.append(JSValueToStringCopy(m_context, tmp, &exception));
+ Q_ASSERT(!exception);
+ }
+ return names;
+}
+
+inline bool QScriptOriginalGlobalObject::isArray(JSValueRef value) const
+{
+ return isType(value, m_arrayConstructor, m_arrayPrototype);
+}
+
+inline bool QScriptOriginalGlobalObject::isError(JSValueRef value) const
+{
+ return isType(value, m_errorConstructor, m_errorPrototype);
+}
+
+inline bool QScriptOriginalGlobalObject::isType(JSValueRef value, JSObjectRef constructor, JSValueRef prototype) const
+{
+ // JSC API doesn't export the [[Class]] information for the builtins. But we know that a value
+ // is an object of the Type if it was created with the Type constructor or if it is the Type.prototype.
+ JSValueRef exception = 0;
+ bool result = JSValueIsInstanceOfConstructor(m_context, value, constructor, &exception) || JSValueIsStrictEqual(m_context, value, prototype);
+ Q_ASSERT(!exception);
+ return result;
+}
+
+#endif // qscriptoriginalglobalobject_p_h
diff --git a/JavaScriptCore/qt/api/qscriptvalue_p.h b/JavaScriptCore/qt/api/qscriptvalue_p.h
index 1d319ba..6e93a07 100644
--- a/JavaScriptCore/qt/api/qscriptvalue_p.h
+++ b/JavaScriptCore/qt/api/qscriptvalue_p.h
@@ -184,7 +184,6 @@ private:
Value(QString* string) : m_string(string) {}
} u;
- inline bool inherits(const char*);
inline State refinedJSValue();
inline bool isJSBased() const;
@@ -416,7 +415,7 @@ bool QScriptValuePrivate::isError()
return false;
// Fall-through.
case JSObject:
- return inherits("Error");
+ return m_engine->isError(*this);
default:
return false;
}
@@ -868,13 +867,7 @@ inline bool QScriptValuePrivate::hasOwnProperty(quint32 property)
inline bool QScriptValuePrivate::hasOwnProperty(JSStringRef property)
{
Q_ASSERT(isObject());
- // FIXME it could be faster, but JSC C API doesn't expose needed functionality.
- JSRetainPtr<JSStringRef> hasOwnPropertyName(Adopt, JSStringCreateWithUTF8CString("hasOwnProperty"));
- JSValueRef exception = 0;
- JSValueRef hasOwnProperty = JSObjectGetProperty(*m_engine, *this, hasOwnPropertyName.get(), &exception);
- JSValueRef propertyName[] = { JSValueMakeString(*m_engine, property) };
- JSValueRef result = JSObjectCallAsFunction(*m_engine, const_cast<JSObjectRef>(hasOwnProperty), *this, 1, propertyName, &exception);
- return exception ? false : JSValueToBoolean(*m_engine, result);
+ return m_engine->objectHasOwnProperty(*this, property);
}
/*!
@@ -1124,24 +1117,6 @@ QScriptValuePrivate::operator JSObjectRef() const
/*!
\internal
- Returns true if QSV is created from constructor with the given \a name, it has to be a
- built-in type.
-*/
-bool QScriptValuePrivate::inherits(const char* name)
-{
- Q_ASSERT(isJSBased());
- JSObjectRef globalObject = JSContextGetGlobalObject(*m_engine);
- JSStringRef errorAttrName = QScriptConverter::toString(name);
- JSValueRef exception = 0;
- JSValueRef error = JSObjectGetProperty(*m_engine, globalObject, errorAttrName, &exception);
- JSStringRelease(errorAttrName);
- bool result = JSValueIsInstanceOfConstructor(*m_engine, *this, JSValueToObject(*m_engine, error, &exception), &exception);
- m_engine->setException(exception);
- return result;
-}
-
-/*!
- \internal
Refines the state of this QScriptValuePrivate. Returns the new state.
*/
QScriptValuePrivate::State QScriptValuePrivate::refinedJSValue()
diff --git a/JavaScriptCore/qt/api/qscriptvalueiterator.cpp b/JavaScriptCore/qt/api/qscriptvalueiterator.cpp
new file mode 100644
index 0000000..f1caa61
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptvalueiterator.cpp
@@ -0,0 +1,226 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#include "qscriptvalueiterator.h"
+
+#include "qscriptvalue_p.h"
+#include "qscriptvalueiterator_p.h"
+
+/*!
+ \class QScriptValueIterator
+
+ \brief The QScriptValueIterator class provides a Java-style iterator for QScriptValue.
+
+ \ingroup script
+
+
+ The QScriptValueIterator constructor takes a QScriptValue as
+ argument. After construction, the iterator is located at the very
+ beginning of the sequence of properties. Here's how to iterate over
+ all the properties of a QScriptValue:
+
+ \snippet doc/src/snippets/code/src_script_qscriptvalueiterator.cpp 0
+
+ The next() advances the iterator. The name(), value() and flags()
+ functions return the name, value and flags of the last item that was
+ jumped over.
+
+ If you want to remove properties as you iterate over the
+ QScriptValue, use remove(). If you want to modify the value of a
+ property, use setValue().
+
+ Note that QScriptValueIterator only iterates over the QScriptValue's
+ own properties; i.e. it does not follow the prototype chain. You can
+ use a loop like this to follow the prototype chain:
+
+ \snippet doc/src/snippets/code/src_script_qscriptvalueiterator.cpp 1
+
+ Note that QScriptValueIterator will not automatically skip over
+ properties that have the QScriptValue::SkipInEnumeration flag set;
+ that flag only affects iteration in script code. If you want, you
+ can skip over such properties with code like the following:
+
+ \snippet doc/src/snippets/code/src_script_qscriptvalueiterator.cpp 2
+
+ \sa QScriptValue::property()
+*/
+
+/*!
+ Constructs an iterator for traversing \a object. The iterator is
+ set to be at the front of the sequence of properties (before the
+ first property).
+*/
+QScriptValueIterator::QScriptValueIterator(const QScriptValue& object)
+ : d_ptr(new QScriptValueIteratorPrivate(QScriptValuePrivate::get(object)))
+{}
+
+/*!
+ Destroys the iterator.
+*/
+QScriptValueIterator::~QScriptValueIterator()
+{}
+
+/*!
+ Returns true if there is at least one item ahead of the iterator
+ (i.e. the iterator is \e not at the back of the property sequence);
+ otherwise returns false.
+
+ \sa next(), hasPrevious()
+*/
+bool QScriptValueIterator::hasNext() const
+{
+ return d_ptr->hasNext();
+}
+
+/*!
+ Advances the iterator by one position.
+
+ Calling this function on an iterator located at the back of the
+ container leads to undefined results.
+
+ \sa hasNext(), previous(), name()
+*/
+void QScriptValueIterator::next()
+{
+ d_ptr->next();
+}
+
+/*!
+ Returns true if there is at least one item behind the iterator
+ (i.e. the iterator is \e not at the front of the property sequence);
+ otherwise returns false.
+
+ \sa previous(), hasNext()
+*/
+bool QScriptValueIterator::hasPrevious() const
+{
+ return d_ptr->hasPrevious();
+}
+
+/*!
+ Moves the iterator back by one position.
+
+ Calling this function on an iterator located at the front of the
+ container leads to undefined results.
+
+ \sa hasPrevious(), next(), name()
+*/
+void QScriptValueIterator::previous()
+{
+ d_ptr->previous();
+}
+
+/*!
+ Moves the iterator to the front of the QScriptValue (before the
+ first property).
+
+ \sa toBack(), next()
+*/
+void QScriptValueIterator::toFront()
+{
+ d_ptr->toFront();
+}
+
+/*!
+ Moves the iterator to the back of the QScriptValue (after the
+ last property).
+
+ \sa toFront(), previous()
+*/
+void QScriptValueIterator::toBack()
+{
+ d_ptr->toBack();
+}
+
+/*!
+ Returns the name of the last property that was jumped over using
+ next() or previous().
+
+ \sa value(), flags()
+*/
+QString QScriptValueIterator::name() const
+{
+ return d_ptr->name();
+}
+
+/*!
+ Returns the name of the last property that was jumped over using
+ next() or previous().
+*/
+QScriptString QScriptValueIterator::scriptName() const
+{
+ return QScriptStringPrivate::get(d_ptr->scriptName());
+}
+
+/*!
+ Returns the value of the last property that was jumped over using
+ next() or previous().
+
+ \sa setValue(), name()
+*/
+QScriptValue QScriptValueIterator::value() const
+{
+ return QScriptValuePrivate::get(d_ptr->value());
+}
+
+/*!
+ Sets the \a value of the last property that was jumped over using
+ next() or previous().
+
+ \sa value(), name()
+*/
+void QScriptValueIterator::setValue(const QScriptValue& value)
+{
+ d_ptr->setValue(QScriptValuePrivate::get(value));
+}
+
+/*!
+ Removes the last property that was jumped over using next()
+ or previous().
+
+ \sa setValue()
+*/
+void QScriptValueIterator::remove()
+{
+ d_ptr->remove();
+}
+
+/*!
+ Returns the flags of the last property that was jumped over using
+ next() or previous().
+
+ \sa value()
+*/
+QScriptValue::PropertyFlags QScriptValueIterator::flags() const
+{
+ return d_ptr->flags();
+}
+
+/*!
+ Makes the iterator operate on \a object. The iterator is set to be
+ at the front of the sequence of properties (before the first
+ property).
+*/
+QScriptValueIterator& QScriptValueIterator::operator=(QScriptValue& object)
+{
+ d_ptr = new QScriptValueIteratorPrivate(QScriptValuePrivate::get(object));
+ return *this;
+}
diff --git a/JavaScriptCore/qt/api/qscriptvalueiterator.h b/JavaScriptCore/qt/api/qscriptvalueiterator.h
new file mode 100644
index 0000000..0c90661
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptvalueiterator.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptvalueiterator_h
+#define qscriptvalueiterator_h
+
+#include "qtscriptglobal.h"
+#include "qscriptstring.h"
+#include <QtCore/qshareddata.h>
+#include "qscriptvalue.h"
+
+class QScriptValue;
+class QScriptValueIteratorPrivate;
+
+
+class Q_JAVASCRIPT_EXPORT QScriptValueIterator {
+public:
+ QScriptValueIterator(const QScriptValue& value);
+ ~QScriptValueIterator();
+
+ bool hasNext() const;
+ void next();
+
+ bool hasPrevious() const;
+ void previous();
+
+ QString name() const;
+ QScriptString scriptName() const;
+
+ QScriptValue value() const;
+ void setValue(const QScriptValue& value);
+
+ void remove();
+ QScriptValue::PropertyFlags flags() const;
+
+ void toFront();
+ void toBack();
+
+ QScriptValueIterator& operator=(QScriptValue& value);
+private:
+ QExplicitlySharedDataPointer<QScriptValueIteratorPrivate> d_ptr;
+
+ Q_DECLARE_PRIVATE(QScriptValueIterator)
+ Q_DISABLE_COPY(QScriptValueIterator)
+};
+
+#endif // qscriptvalueiterator_h
diff --git a/JavaScriptCore/qt/api/qscriptvalueiterator_p.h b/JavaScriptCore/qt/api/qscriptvalueiterator_p.h
new file mode 100644
index 0000000..b93b518
--- /dev/null
+++ b/JavaScriptCore/qt/api/qscriptvalueiterator_p.h
@@ -0,0 +1,172 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef qscriptvalueiterator_p_h
+#define qscriptvalueiterator_p_h
+
+#include "qscriptvalue_p.h"
+#include <JavaScriptCore/JavaScript.h>
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <QtCore/qshareddata.h>
+#include <QtCore/qvector.h>
+
+class QScriptValueIteratorPrivate: public QSharedData {
+public:
+ inline QScriptValueIteratorPrivate(const QScriptValuePrivate* value);
+ inline ~QScriptValueIteratorPrivate();
+
+ inline bool hasNext();
+ inline void next();
+
+ inline bool hasPrevious();
+ inline void previous();
+
+ inline QString name() const;
+ inline QScriptStringPrivate* scriptName() const;
+
+ inline QScriptValuePrivate* value() const;
+ inline void setValue(const QScriptValuePrivate* value);
+
+ inline void remove();
+
+ inline void toFront();
+ inline void toBack();
+
+ QScriptValue::PropertyFlags flags() const;
+
+ inline bool isValid() const;
+private:
+ inline QScriptEnginePrivate* engine() const;
+
+ QExplicitlySharedDataPointer<QScriptValuePrivate> m_object;
+ QVector<JSStringRef> m_names;
+ QMutableVectorIterator<JSStringRef> m_idx;
+};
+
+inline QScriptValueIteratorPrivate::QScriptValueIteratorPrivate(const QScriptValuePrivate* value)
+ : m_object(const_cast<QScriptValuePrivate*>(value))
+ , m_idx(m_names)
+{
+ if (m_object->isObject()) {
+ m_names = engine()->objectGetOwnPropertyNames(*m_object);
+ m_idx = m_names;
+ } else
+ m_object = 0;
+}
+
+inline QScriptValueIteratorPrivate::~QScriptValueIteratorPrivate()
+{
+ QVector<JSStringRef>::const_iterator i = m_names.constBegin();
+ for (; i != m_names.constEnd(); ++i)
+ JSStringRelease(*i);
+}
+
+inline bool QScriptValueIteratorPrivate::hasNext()
+{
+ return m_idx.hasNext();
+}
+
+inline void QScriptValueIteratorPrivate::next()
+{
+ // FIXME (Qt5) This method should return a value (QTBUG-11226).
+ m_idx.next();
+}
+
+inline bool QScriptValueIteratorPrivate::hasPrevious()
+{
+ return m_idx.hasPrevious();
+}
+
+inline void QScriptValueIteratorPrivate::previous()
+{
+ m_idx.previous();
+}
+
+inline QString QScriptValueIteratorPrivate::name() const
+{
+ if (!isValid())
+ return QString();
+ return QScriptConverter::toString(m_idx.value());
+}
+
+inline QScriptStringPrivate* QScriptValueIteratorPrivate::scriptName() const
+{
+ if (!isValid())
+ return new QScriptStringPrivate();
+ return new QScriptStringPrivate(QScriptConverter::toString(m_idx.value()));
+}
+
+inline QScriptValuePrivate* QScriptValueIteratorPrivate::value() const
+{
+ if (!isValid())
+ return new QScriptValuePrivate();
+ JSValueRef exception = 0;
+ JSValueRef value = m_object->property(m_idx.value(), &exception);
+ engine()->setException(exception);
+ return new QScriptValuePrivate(engine(), value);
+}
+
+inline void QScriptValueIteratorPrivate::setValue(const QScriptValuePrivate* value)
+{
+ if (!isValid())
+ return;
+ JSValueRef exception = 0;
+ m_object->setProperty(m_idx.value(), *value, /* flags */ 0, &exception);
+ engine()->setException(exception);
+}
+
+inline void QScriptValueIteratorPrivate::remove()
+{
+ if (!isValid())
+ return;
+ JSValueRef exception = 0;
+ m_object->deleteProperty(m_idx.value(), &exception);
+ engine()->setException(exception);
+ m_idx.remove();
+}
+
+inline void QScriptValueIteratorPrivate::toFront()
+{
+ m_idx.toFront();
+}
+
+inline void QScriptValueIteratorPrivate::toBack()
+{
+ m_idx.toBack();
+}
+
+QScriptValue::PropertyFlags QScriptValueIteratorPrivate::flags() const
+{
+ if (!isValid())
+ return QScriptValue::PropertyFlags(0);
+ return m_object->propertyFlags(m_idx.value(), QScriptValue::ResolveLocal);
+}
+
+inline bool QScriptValueIteratorPrivate::isValid() const
+{
+ return m_object;
+}
+
+inline QScriptEnginePrivate* QScriptValueIteratorPrivate::engine() const
+{
+ Q_ASSERT(isValid());
+ return m_object->engine();
+}
+
+#endif // qscriptvalueiterator_p_h
diff --git a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp
index 73b57dc..a82347e 100644
--- a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp
+++ b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp
@@ -1261,4 +1261,28 @@ void tst_QScriptValue::propertyFlag()
QVERIFY(!object.propertyFlags(protoNameHandle, QScriptValue::ResolveLocal));
}
+void tst_QScriptValue::globalObjectChanges()
+{
+ // API functionality shouldn't depend on Global Object.
+ QScriptEngine engine;
+ QScriptValue array = engine.newArray();
+ QScriptValue error = engine.evaluate("new Error");
+ QScriptValue object = engine.newObject();
+
+ object.setProperty("foo", 512);
+
+ // Remove properties form global object.
+ engine.evaluate("delete Object; delete Error; delete Array;");
+
+ QVERIFY(array.isArray());
+ QVERIFY(error.isError());
+ QVERIFY(object.isObject());
+
+ QVERIFY(object.property("foo").isValid());
+ QVERIFY(object.property("foo", QScriptValue::ResolveLocal).isValid());
+ object.setProperty("foo", QScriptValue());
+ QVERIFY(!object.property("foo").isValid());
+ QVERIFY(!object.property("foo", QScriptValue::ResolveLocal).isValid());
+}
+
QTEST_MAIN(tst_QScriptValue)
diff --git a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h
index 6108423..41b99cd 100644
--- a/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h
+++ b/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h
@@ -60,6 +60,7 @@ private slots:
void getPropertyResolveFlag();
void propertyFlag_data();
void propertyFlag();
+ void globalObjectChanges();
// Generated test functions.
void isBool_data();
diff --git a/JavaScriptCore/qt/tests/qscriptvalueiterator/qscriptvalueiterator.pro b/JavaScriptCore/qt/tests/qscriptvalueiterator/qscriptvalueiterator.pro
new file mode 100644
index 0000000..5314ec9
--- /dev/null
+++ b/JavaScriptCore/qt/tests/qscriptvalueiterator/qscriptvalueiterator.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+TARGET = tst_qscriptvalueiterator
+QT += testlib
+include(../tests.pri)
+
+SOURCES += tst_qscriptvalueiterator.cpp
+
diff --git a/JavaScriptCore/qt/tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp b/JavaScriptCore/qt/tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
new file mode 100644
index 0000000..43d0042
--- /dev/null
+++ b/JavaScriptCore/qt/tests/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
@@ -0,0 +1,531 @@
+/*
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef tst_qscriptvalueiterator_h
+#define tst_qscriptvalueiterator_h
+
+#include "qscriptengine.h"
+#include "qscriptvalue.h"
+#include "qscriptvalueiterator.h"
+#include <QtCore/qhash.h>
+#include <QtTest/QtTest>
+
+class tst_QScriptValueIterator : public QObject {
+ Q_OBJECT
+
+public:
+ tst_QScriptValueIterator();
+ virtual ~tst_QScriptValueIterator();
+
+private slots:
+ void iterateForward_data();
+ void iterateForward();
+ void iterateBackward_data();
+ void iterateBackward();
+ void iterateArray_data();
+ void iterateArray();
+ void iterateBackAndForth();
+ void setValue();
+ void remove();
+ void removeMixed();
+ void removeUndeletable();
+ void iterateString();
+ void assignObjectToIterator();
+};
+
+tst_QScriptValueIterator::tst_QScriptValueIterator()
+{
+}
+
+tst_QScriptValueIterator::~tst_QScriptValueIterator()
+{
+}
+
+void tst_QScriptValueIterator::iterateForward_data()
+{
+ QTest::addColumn<QStringList>("propertyNames");
+ QTest::addColumn<QStringList>("propertyValues");
+
+ QTest::newRow("no properties")
+ << QStringList() << QStringList();
+ QTest::newRow("foo=bar")
+ << (QStringList() << "foo")
+ << (QStringList() << "bar");
+ QTest::newRow("foo=bar, baz=123")
+ << (QStringList() << "foo" << "baz")
+ << (QStringList() << "bar" << "123");
+ QTest::newRow("foo=bar, baz=123, rab=oof")
+ << (QStringList() << "foo" << "baz" << "rab")
+ << (QStringList() << "bar" << "123" << "oof");
+}
+
+void tst_QScriptValueIterator::iterateForward()
+{
+ QFETCH(QStringList, propertyNames);
+ QFETCH(QStringList, propertyValues);
+ QMap<QString, QString> pmap;
+ Q_ASSERT(propertyNames.size() == propertyValues.size());
+
+ QScriptEngine engine;
+ QScriptValue object = engine.newObject();
+ for (int i = 0; i < propertyNames.size(); ++i) {
+ QString name = propertyNames.at(i);
+ QString value = propertyValues.at(i);
+ pmap.insert(name, value);
+ object.setProperty(name, QScriptValue(&engine, value));
+ }
+ QScriptValue otherObject = engine.newObject();
+ otherObject.setProperty("foo", QScriptValue(&engine, 123456));
+ otherObject.setProperty("protoProperty", QScriptValue(&engine, 654321));
+ object.setPrototype(otherObject); // should not affect iterator
+
+ QStringList lst;
+ QScriptValueIterator it(object);
+ while (!pmap.isEmpty()) {
+ QCOMPARE(it.hasNext(), true);
+ QCOMPARE(it.hasNext(), true);
+ it.next();
+ QString name = it.name();
+ QCOMPARE(pmap.contains(name), true);
+ QCOMPARE(it.name(), name);
+ QCOMPARE(it.flags(), object.propertyFlags(name));
+ QCOMPARE(it.value().strictlyEquals(QScriptValue(&engine, pmap.value(name))), true);
+ QCOMPARE(it.scriptName(), engine.toStringHandle(name));
+ pmap.remove(name);
+ lst.append(name);
+ }
+
+ QCOMPARE(it.hasNext(), false);
+ QCOMPARE(it.hasNext(), false);
+
+ it.toFront();
+ for (int i = 0; i < lst.count(); ++i) {
+ QCOMPARE(it.hasNext(), true);
+ it.next();
+ QCOMPARE(it.name(), lst.at(i));
+ }
+
+ for (int i = 0; i < lst.count(); ++i) {
+ QCOMPARE(it.hasPrevious(), true);
+ it.previous();
+ QCOMPARE(it.name(), lst.at(lst.count()-1-i));
+ }
+ QCOMPARE(it.hasPrevious(), false);
+}
+
+void tst_QScriptValueIterator::iterateBackward_data()
+{
+ iterateForward_data();
+}
+
+void tst_QScriptValueIterator::iterateBackward()
+{
+ QFETCH(QStringList, propertyNames);
+ QFETCH(QStringList, propertyValues);
+ QMap<QString, QString> pmap;
+ Q_ASSERT(propertyNames.size() == propertyValues.size());
+
+ QScriptEngine engine;
+ QScriptValue object = engine.newObject();
+ for (int i = 0; i < propertyNames.size(); ++i) {
+ QString name = propertyNames.at(i);
+ QString value = propertyValues.at(i);
+ pmap.insert(name, value);
+ object.setProperty(name, QScriptValue(&engine, value));
+ }
+
+ QStringList lst;
+ QScriptValueIterator it(object);
+ it.toBack();
+ while (!pmap.isEmpty()) {
+ QCOMPARE(it.hasPrevious(), true);
+ QCOMPARE(it.hasPrevious(), true);
+ it.previous();
+ QString name = it.name();
+ QCOMPARE(pmap.contains(name), true);
+ QCOMPARE(it.name(), name);
+ QCOMPARE(it.flags(), object.propertyFlags(name));
+ QCOMPARE(it.value().strictlyEquals(QScriptValue(&engine, pmap.value(name))), true);
+ pmap.remove(name);
+ lst.append(name);
+ }
+
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasPrevious(), false);
+
+ it.toBack();
+ for (int i = 0; i < lst.count(); ++i) {
+ QCOMPARE(it.hasPrevious(), true);
+ it.previous();
+ QCOMPARE(it.name(), lst.at(i));
+ }
+
+ for (int i = 0; i < lst.count(); ++i) {
+ QCOMPARE(it.hasNext(), true);
+ it.next();
+ QCOMPARE(it.name(), lst.at(lst.count()-1-i));
+ }
+ QCOMPARE(it.hasNext(), false);
+}
+
+void tst_QScriptValueIterator::iterateArray_data()
+{
+ QTest::addColumn<QStringList>("inputPropertyNames");
+ QTest::addColumn<QStringList>("inputPropertyValues");
+ QTest::addColumn<QStringList>("propertyNames");
+ QTest::addColumn<QStringList>("propertyValues");
+ QTest::newRow("no elements") << QStringList() << QStringList() << QStringList() << QStringList();
+
+ QTest::newRow("0=foo, 1=barr")
+ << (QStringList() << "0" << "1")
+ << (QStringList() << "foo" << "bar")
+ << (QStringList() << "0" << "1")
+ << (QStringList() << "foo" << "bar");
+
+ QTest::newRow("0=foo, 3=barr")
+ << (QStringList() << "0" << "1" << "2" << "3")
+ << (QStringList() << "foo" << "" << "" << "bar")
+ << (QStringList() << "0" << "1" << "2" << "3")
+ << (QStringList() << "foo" << "" << "" << "bar");
+}
+
+void tst_QScriptValueIterator::iterateArray()
+{
+ QFETCH(QStringList, inputPropertyNames);
+ QFETCH(QStringList, inputPropertyValues);
+ QFETCH(QStringList, propertyNames);
+ QFETCH(QStringList, propertyValues);
+
+ QScriptEngine engine;
+ QScriptValue array = engine.newArray();
+ for (int i = 0; i < inputPropertyNames.size(); ++i)
+ array.setProperty(inputPropertyNames.at(i), inputPropertyValues.at(i));
+
+ int length = array.property("length").toInt32();
+ QCOMPARE(length, propertyNames.size());
+ QScriptValueIterator it(array);
+ for (int i = 0; i < length; ++i) {
+ QCOMPARE(it.hasNext(), true);
+ it.next();
+ QCOMPARE(it.name(), propertyNames.at(i));
+ QCOMPARE(it.flags(), array.propertyFlags(propertyNames.at(i)));
+ QVERIFY(it.value().strictlyEquals(array.property(propertyNames.at(i))));
+ QCOMPARE(it.value().toString(), propertyValues.at(i));
+ }
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("length"));
+ QVERIFY(it.value().isNumber());
+ QCOMPARE(it.value().toInt32(), length);
+ QCOMPARE(it.flags(), QScriptValue::PropertyFlags(QScriptValue::SkipInEnumeration | QScriptValue::Undeletable));
+
+ it.previous();
+ QCOMPARE(it.hasPrevious(), length > 0);
+ for (int i = length - 1; i >= 0; --i) {
+ it.previous();
+ QCOMPARE(it.name(), propertyNames.at(i));
+ QCOMPARE(it.flags(), array.propertyFlags(propertyNames.at(i)));
+ QVERIFY(it.value().strictlyEquals(array.property(propertyNames.at(i))));
+ QCOMPARE(it.value().toString(), propertyValues.at(i));
+ QCOMPARE(it.hasPrevious(), i > 0);
+ }
+ QCOMPARE(it.hasPrevious(), false);
+
+ // hasNext() and hasPrevious() cache their result; verify that the result is in sync
+ if (length > 1) {
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("0"));
+ QVERIFY(it.hasNext());
+ it.previous();
+ QCOMPARE(it.name(), QString::fromLatin1("0"));
+ QVERIFY(!it.hasPrevious());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("0"));
+ QVERIFY(it.hasPrevious());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("1"));
+ }
+ {
+ // same test as object:
+ QScriptValue originalArray = engine.newArray();
+ for (int i = 0; i < inputPropertyNames.size(); ++i)
+ originalArray.setProperty(inputPropertyNames.at(i), inputPropertyValues.at(i));
+
+ QScriptValue array = originalArray.toObject();
+ int length = array.property("length").toInt32();
+ QCOMPARE(length, propertyNames.size());
+ QScriptValueIterator it(array);
+ for (int i = 0; i < length; ++i) {
+ QCOMPARE(it.hasNext(), true);
+ it.next();
+ QCOMPARE(it.name(), propertyNames.at(i));
+ QCOMPARE(it.flags(), array.propertyFlags(propertyNames.at(i)));
+ QVERIFY(it.value().strictlyEquals(array.property(propertyNames.at(i))));
+ QCOMPARE(it.value().toString(), propertyValues.at(i));
+ }
+ QCOMPARE(it.hasNext(), true);
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("length"));
+ }
+}
+
+void tst_QScriptValueIterator::iterateBackAndForth()
+{
+ QScriptEngine engine;
+ {
+ QScriptValue object = engine.newObject();
+ object.setProperty("foo", QScriptValue(&engine, "bar"));
+ object.setProperty("rab", QScriptValue(&engine, "oof"),
+ QScriptValue::SkipInEnumeration); // should not affect iterator
+ QScriptValueIterator it(object);
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ QVERIFY(it.hasPrevious());
+ it.previous();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ QVERIFY(it.hasPrevious());
+ it.previous();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("rab"));
+ QVERIFY(it.hasPrevious());
+ it.previous();
+ QCOMPARE(it.name(), QLatin1String("rab"));
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("rab"));
+ QVERIFY(it.hasPrevious());
+ it.previous();
+ QCOMPARE(it.name(), QLatin1String("rab"));
+ }
+ {
+ // hasNext() and hasPrevious() cache their result; verify that the result is in sync
+ QScriptValue object = engine.newObject();
+ object.setProperty("foo", QScriptValue(&engine, "bar"));
+ object.setProperty("rab", QScriptValue(&engine, "oof"));
+ QScriptValueIterator it(object);
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("foo"));
+ QVERIFY(it.hasNext());
+ it.previous();
+ QCOMPARE(it.name(), QString::fromLatin1("foo"));
+ QVERIFY(!it.hasPrevious());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("foo"));
+ QVERIFY(it.hasPrevious());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("rab"));
+ }
+}
+
+void tst_QScriptValueIterator::setValue()
+{
+ QScriptEngine engine;
+ QScriptValue object = engine.newObject();
+ object.setProperty("foo", QScriptValue(&engine, "bar"));
+ QScriptValueIterator it(object);
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ it.setValue(QScriptValue(&engine, "baz"));
+ QCOMPARE(it.value().strictlyEquals(QScriptValue(&engine, QLatin1String("baz"))), true);
+ QCOMPARE(object.property("foo").toString(), QLatin1String("baz"));
+ it.setValue(QScriptValue(&engine, "zab"));
+ QCOMPARE(it.value().strictlyEquals(QScriptValue(&engine, QLatin1String("zab"))), true);
+ QCOMPARE(object.property("foo").toString(), QLatin1String("zab"));
+}
+
+void tst_QScriptValueIterator::remove()
+{
+ QScriptEngine engine;
+ QScriptValue object = engine.newObject();
+ object.setProperty("foo", QScriptValue(&engine, "bar"),
+ QScriptValue::SkipInEnumeration); // should not affect iterator
+ object.setProperty("rab", QScriptValue(&engine, "oof"));
+ QScriptValueIterator it(object);
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("foo"));
+ it.remove();
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(object.property("foo").isValid(), false);
+ QCOMPARE(object.property("rab").toString(), QLatin1String("oof"));
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("rab"));
+ QCOMPARE(it.value().toString(), QLatin1String("oof"));
+ QCOMPARE(it.hasNext(), false);
+ it.remove();
+ QCOMPARE(object.property("rab").isValid(), false);
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), false);
+}
+
+void tst_QScriptValueIterator::removeMixed()
+{
+ // This test checks if QScriptValueIterator behaives correctly if an object's property got deleted
+ // in different way.
+ QScriptEngine engine;
+ QScriptValue object = engine.evaluate("o = new Object; o");
+ object.setProperty("a", QScriptValue(124), QScriptValue::SkipInEnumeration);
+ object.setProperty("b", QScriptValue(816));
+ object.setProperty("c", QScriptValue(3264));
+ QScriptValueIterator it(object);
+ it.next();
+ it.next();
+ QCOMPARE(it.name(), QLatin1String("b"));
+ QCOMPARE(it.hasPrevious(), true);
+ QCOMPARE(it.hasNext(), true);
+ // Remove 'a'
+ object.setProperty("a", QScriptValue());
+ QEXPECT_FAIL("", "That would be a significant behavioral and performance change, new QtScript API should be developed (QTBUG-12087)", Abort);
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), true);
+ // Remove 'c'
+ engine.evaluate("delete o.c");
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), false);
+ // Remove 'b'
+ object.setProperty("b", QScriptValue());
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), false);
+ QCOMPARE(it.name(), QString());
+ QCOMPARE(it.value().toString(), QString());
+
+ // Try to remove a removed property.
+ it.remove();
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), false);
+ QCOMPARE(it.name(), QString());
+ QCOMPARE(it.value().toString(), QString());
+
+ for (int i = 0; i < 2; ++i) {
+ it.next();
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), false);
+ QCOMPARE(it.name(), QString());
+ QCOMPARE(it.value().toString(), QString());
+ }
+
+ for (int i = 0; i < 2; ++i) {
+ it.previous();
+ QCOMPARE(it.hasPrevious(), false);
+ QCOMPARE(it.hasNext(), false);
+ QCOMPARE(it.name(), QString());
+ QCOMPARE(it.value().toString(), QString());
+ }
+}
+
+void tst_QScriptValueIterator::removeUndeletable()
+{
+ // Undeletable property can't be deleted via iterator.
+ QScriptEngine engine;
+ QScriptValue object = engine.evaluate("o = new Object; o");
+ object.setProperty("a", QScriptValue(&engine, 124));
+ object.setProperty("b", QScriptValue(&engine, 816), QScriptValue::Undeletable);
+ QVERIFY(object.property("b").isValid());
+ QScriptValueIterator it(object);
+ it.next();
+ it.next();
+ it.remove();
+ it.toFront();
+ QVERIFY(it.hasNext());
+ QVERIFY(object.property("b").isValid());
+}
+
+void tst_QScriptValueIterator::iterateString()
+{
+ QScriptEngine engine;
+ QScriptValue str = QScriptValue(&engine, QString::fromLatin1("ciao"));
+ QVERIFY(str.isString());
+ QScriptValue obj = str.toObject();
+ int length = obj.property("length").toInt32();
+ QCOMPARE(length, 4);
+ QScriptValueIterator it(obj);
+ for (int i = 0; i < length; ++i) {
+ QCOMPARE(it.hasNext(), true);
+ QString indexStr = QScriptValue(&engine, i).toString();
+ it.next();
+ QCOMPARE(it.name(), indexStr);
+ QCOMPARE(it.flags(), obj.propertyFlags(indexStr));
+ QCOMPARE(it.value().strictlyEquals(obj.property(indexStr)), true);
+ }
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("length"));
+ QVERIFY(it.value().isNumber());
+ QCOMPARE(it.value().toInt32(), length);
+ QCOMPARE(it.flags(), QScriptValue::PropertyFlags(QScriptValue::ReadOnly | QScriptValue::SkipInEnumeration | QScriptValue::Undeletable));
+
+ it.previous();
+ QCOMPARE(it.hasPrevious(), length > 0);
+ for (int i = length - 1; i >= 0; --i) {
+ it.previous();
+ QString indexStr = QScriptValue(&engine, i).toString();
+ QCOMPARE(it.name(), indexStr);
+ QCOMPARE(it.flags(), obj.propertyFlags(indexStr));
+ QCOMPARE(it.value().strictlyEquals(obj.property(indexStr)), true);
+ QCOMPARE(it.hasPrevious(), i > 0);
+ }
+ QCOMPARE(it.hasPrevious(), false);
+}
+
+void tst_QScriptValueIterator::assignObjectToIterator()
+{
+ QScriptEngine eng;
+ QScriptValue obj1 = eng.newObject();
+ obj1.setProperty("foo", 123);
+ QScriptValue obj2 = eng.newObject();
+ obj2.setProperty("bar", 456);
+
+ QScriptValueIterator it(obj1);
+ QVERIFY(it.hasNext());
+ it.next();
+ it = obj2;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("bar"));
+
+ it = obj1;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("foo"));
+
+ it = obj2;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("bar"));
+
+ it = obj2;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("bar"));
+}
+
+QTEST_MAIN(tst_QScriptValueIterator)
+#include "tst_qscriptvalueiterator.moc"
+
+#endif // tst_qscriptvalueiterator_h
diff --git a/JavaScriptCore/qt/tests/tests.pro b/JavaScriptCore/qt/tests/tests.pro
index 7c3f590..6d5559b 100644
--- a/JavaScriptCore/qt/tests/tests.pro
+++ b/JavaScriptCore/qt/tests/tests.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = qscriptengine \
qscriptvalue \
+ qscriptvalueiterator \
qscriptstring
diff --git a/JavaScriptCore/runtime/ArrayConstructor.cpp b/JavaScriptCore/runtime/ArrayConstructor.cpp
index 589739a..e5d0dac 100644
--- a/JavaScriptCore/runtime/ArrayConstructor.cpp
+++ b/JavaScriptCore/runtime/ArrayConstructor.cpp
@@ -58,7 +58,7 @@ static inline JSObject* constructArrayWithSizeQuirk(ExecState* exec, const ArgLi
uint32_t n = args.at(0).toUInt32(exec);
if (n != args.at(0).toNumber(exec))
return throwError(exec, createRangeError(exec, "Array size is not a small enough positive integer."));
- return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), n);
+ return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), n, CreateInitialized);
}
// otherwise the array is constructed with the arguments in it
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index 2cb04ff..e79c46d 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -73,26 +73,13 @@ static inline bool isNumericCompareFunction(ExecState* exec, CallType callType,
if (callType != CallTypeJS)
return false;
-#if ENABLE(JIT)
- // If the JIT is enabled then we need to preserve the invariant that every
- // function with a CodeBlock also has JIT code.
- CodeBlock* codeBlock = 0;
-#if ENABLE(INTERPRETER)
- if (!exec->globalData().canUseJIT())
- codeBlock = callData.js.functionExecutable->bytecodeForCall(exec, callData.js.scopeChain);
- else
-#endif
- {
- callData.js.functionExecutable->jitCodeForCall(exec, callData.js.scopeChain);
- codeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
- }
-#else
- CodeBlock* codeBlock = callData.js.functionExecutable->bytecodeForCall(exec, callData.js.scopeChain);
-#endif
- if (!codeBlock)
+ FunctionExecutable* executable = callData.js.functionExecutable;
+
+ JSObject* error = executable->compileForCall(exec, callData.js.scopeChain);
+ if (error)
return false;
- return codeBlock->isNumericCompareFunction();
+ return executable->generatedBytecodeForCall().isNumericCompareFunction();
}
// ------------------------------ ArrayPrototype ----------------------------
@@ -560,8 +547,6 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec)
JSObject* thisObj = thisValue.toThisObject(exec);
// 15.4.4.12
- JSArray* resObj = constructEmptyArray(exec);
- JSValue result = resObj;
// FIXME: Firefox returns an empty array.
if (!exec->argumentCount())
@@ -582,10 +567,12 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec)
else
deleteCount = length - begin;
- for (unsigned k = 0; k < deleteCount; k++) {
- if (JSValue v = getProperty(exec, thisObj, k + begin))
- resObj->put(exec, k, v);
- }
+ JSArray* resObj = new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), deleteCount, CreateCompact);
+ JSValue result = resObj;
+
+ for (unsigned k = 0; k < deleteCount; k++)
+ resObj->uncheckedSetIndex(k, getProperty(exec, thisObj, k + begin));
+
resObj->setLength(deleteCount);
unsigned additionalArgs = std::max<int>(exec->argumentCount() - 2, 0);
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.cpp b/JavaScriptCore/runtime/ExceptionHelpers.cpp
index 0647e81..ebde320 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.cpp
+++ b/JavaScriptCore/runtime/ExceptionHelpers.cpp
@@ -78,6 +78,11 @@ JSObject* createStackOverflowError(ExecState* exec)
return createRangeError(exec, "Maximum call stack size exceeded.");
}
+JSObject* createStackOverflowError(JSGlobalObject* globalObject)
+{
+ return createRangeError(globalObject, "Maximum call stack size exceeded.");
+}
+
JSValue createUndefinedVariableError(ExecState* exec, const Identifier& ident, unsigned bytecodeOffset, CodeBlock* codeBlock)
{
int startOffset = 0;
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.h b/JavaScriptCore/runtime/ExceptionHelpers.h
index 906465f..3e6de86 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.h
+++ b/JavaScriptCore/runtime/ExceptionHelpers.h
@@ -37,6 +37,7 @@ namespace JSC {
class ExecState;
class Identifier;
class JSGlobalData;
+ class JSGlobalObject;
class JSNotAnObjectErrorStub;
class JSObject;
class Node;
@@ -45,6 +46,7 @@ namespace JSC {
JSValue createInterruptedExecutionException(JSGlobalData*);
JSValue createTerminatedExecutionException(JSGlobalData*);
JSObject* createStackOverflowError(ExecState*);
+ JSObject* createStackOverflowError(JSGlobalObject*);
JSValue createUndefinedVariableError(ExecState*, const Identifier&, unsigned bytecodeOffset, CodeBlock*);
JSNotAnObjectErrorStub* createNotAnObjectErrorStub(ExecState*, bool isNull);
JSObject* createInvalidParamError(ExecState*, const char* op, JSValue, unsigned bytecodeOffset, CodeBlock*);
diff --git a/JavaScriptCore/runtime/Executable.cpp b/JavaScriptCore/runtime/Executable.cpp
index 355ee86..229588b 100644
--- a/JavaScriptCore/runtime/Executable.cpp
+++ b/JavaScriptCore/runtime/Executable.cpp
@@ -45,86 +45,144 @@ VPtrHackExecutable::~VPtrHackExecutable()
{
}
+EvalExecutable::EvalExecutable(ExecState* exec, const SourceCode& source)
+ : ScriptExecutable(exec, source)
+{
+}
+
EvalExecutable::~EvalExecutable()
{
- delete m_evalCodeBlock;
+}
+
+ProgramExecutable::ProgramExecutable(ExecState* exec, const SourceCode& source)
+ : ScriptExecutable(exec, source)
+{
}
ProgramExecutable::~ProgramExecutable()
{
- delete m_programCodeBlock;
+}
+
+FunctionExecutable::FunctionExecutable(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
+ : ScriptExecutable(globalData, source)
+ , m_numVariables(0)
+ , m_forceUsesArguments(forceUsesArguments)
+ , m_parameters(parameters)
+ , m_name(name)
+ , m_symbolTable(0)
+{
+ m_firstLine = firstLine;
+ m_lastLine = lastLine;
+}
+
+FunctionExecutable::FunctionExecutable(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
+ : ScriptExecutable(exec, source)
+ , m_numVariables(0)
+ , m_forceUsesArguments(forceUsesArguments)
+ , m_parameters(parameters)
+ , m_name(name)
+ , m_symbolTable(0)
+{
+ m_firstLine = firstLine;
+ m_lastLine = lastLine;
}
FunctionExecutable::~FunctionExecutable()
{
- delete m_codeBlockForCall;
- delete m_codeBlockForConstruct;
}
-JSObject* EvalExecutable::compile(ExecState* exec, ScopeChainNode* scopeChainNode)
+JSObject* EvalExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode)
{
- int errLine;
- UString errMsg;
+ JSObject* exception = 0;
JSGlobalData* globalData = &exec->globalData();
JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
- RefPtr<EvalNode> evalNode = globalData->parser->parse<EvalNode>(globalData, lexicalGlobalObject->debugger(), exec, m_source, &errLine, &errMsg);
- if (!evalNode)
- return addErrorInfo(globalData, createSyntaxError(lexicalGlobalObject, errMsg), errLine, m_source);
+ RefPtr<EvalNode> evalNode = globalData->parser->parse<EvalNode>(globalData, lexicalGlobalObject, lexicalGlobalObject->debugger(), exec, m_source, &exception);
+ if (!evalNode) {
+ ASSERT(exception);
+ return exception;
+ }
recordParse(evalNode->features(), evalNode->lineNo(), evalNode->lastLine());
ScopeChain scopeChain(scopeChainNode);
JSGlobalObject* globalObject = scopeChain.globalObject();
ASSERT(!m_evalCodeBlock);
- m_evalCodeBlock = new EvalCodeBlock(this, globalObject, source().provider(), scopeChain.localDepth());
- OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(evalNode.get(), globalObject->debugger(), scopeChain, m_evalCodeBlock->symbolTable(), m_evalCodeBlock)));
+ m_evalCodeBlock = adoptPtr(new EvalCodeBlock(this, globalObject, source().provider(), scopeChain.localDepth()));
+ OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(evalNode.get(), globalObject->debugger(), scopeChain, m_evalCodeBlock->symbolTable(), m_evalCodeBlock.get())));
generator->generate();
evalNode->destroyData();
+
+#if ENABLE(JIT)
+ if (exec->globalData().canUseJIT()) {
+ m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_evalCodeBlock.get());
+#if !ENABLE(OPCODE_SAMPLING)
+ if (!BytecodeGenerator::dumpsGeneratedCode())
+ m_evalCodeBlock->discardBytecode();
+#endif
+ }
+#endif
+
return 0;
}
JSObject* ProgramExecutable::checkSyntax(ExecState* exec)
{
- int errLine;
- UString errMsg;
+ JSObject* exception = 0;
JSGlobalData* globalData = &exec->globalData();
JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
- RefPtr<ProgramNode> programNode = globalData->parser->parse<ProgramNode>(globalData, lexicalGlobalObject->debugger(), exec, m_source, &errLine, &errMsg);
- if (!programNode)
- return addErrorInfo(globalData, createSyntaxError(lexicalGlobalObject, errMsg), errLine, m_source);
- return 0;
+ RefPtr<ProgramNode> programNode = globalData->parser->parse<ProgramNode>(globalData, lexicalGlobalObject, lexicalGlobalObject->debugger(), exec, m_source, &exception);
+ if (programNode)
+ return 0;
+ ASSERT(exception);
+ return exception;
}
-JSObject* ProgramExecutable::compile(ExecState* exec, ScopeChainNode* scopeChainNode)
+JSObject* ProgramExecutable::compileInternal(ExecState* exec, ScopeChainNode* scopeChainNode)
{
- int errLine;
- UString errMsg;
+ ASSERT(!m_programCodeBlock);
+
+ JSObject* exception = 0;
JSGlobalData* globalData = &exec->globalData();
JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
- RefPtr<ProgramNode> programNode = globalData->parser->parse<ProgramNode>(globalData, lexicalGlobalObject->debugger(), exec, m_source, &errLine, &errMsg);
- if (!programNode)
- return addErrorInfo(globalData, createSyntaxError(lexicalGlobalObject, errMsg), errLine, m_source);
+ RefPtr<ProgramNode> programNode = globalData->parser->parse<ProgramNode>(globalData, lexicalGlobalObject, lexicalGlobalObject->debugger(), exec, m_source, &exception);
+ if (!programNode) {
+ ASSERT(exception);
+ return exception;
+ }
recordParse(programNode->features(), programNode->lineNo(), programNode->lastLine());
ScopeChain scopeChain(scopeChainNode);
JSGlobalObject* globalObject = scopeChain.globalObject();
- ASSERT(!m_programCodeBlock);
- m_programCodeBlock = new ProgramCodeBlock(this, GlobalCode, globalObject, source().provider());
- OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(programNode.get(), globalObject->debugger(), scopeChain, &globalObject->symbolTable(), m_programCodeBlock)));
+ m_programCodeBlock = adoptPtr(new ProgramCodeBlock(this, GlobalCode, globalObject, source().provider()));
+ OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(programNode.get(), globalObject->debugger(), scopeChain, &globalObject->symbolTable(), m_programCodeBlock.get())));
generator->generate();
programNode->destroyData();
- return 0;
+
+#if ENABLE(JIT)
+ if (exec->globalData().canUseJIT()) {
+ m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_programCodeBlock.get());
+#if !ENABLE(OPCODE_SAMPLING)
+ if (!BytecodeGenerator::dumpsGeneratedCode())
+ m_programCodeBlock->discardBytecode();
+#endif
+ }
+#endif
+
+ return 0;
}
-bool FunctionExecutable::compileForCall(ExecState*, ScopeChainNode* scopeChainNode)
+JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, ScopeChainNode* scopeChainNode)
{
+ JSObject* exception = 0;
JSGlobalData* globalData = scopeChainNode->globalData;
- RefPtr<FunctionBodyNode> body = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source);
- if (!body)
- return false;
+ RefPtr<FunctionBodyNode> body = globalData->parser->parse<FunctionBodyNode>(globalData, exec->lexicalGlobalObject(), 0, 0, m_source, &exception);
+ if (!body) {
+ ASSERT(exception);
+ return exception;
+ }
if (m_forceUsesArguments)
body->setUsesArguments();
body->finishParsing(m_parameters, m_name);
@@ -134,8 +192,8 @@ bool FunctionExecutable::compileForCall(ExecState*, ScopeChainNode* scopeChainNo
JSGlobalObject* globalObject = scopeChain.globalObject();
ASSERT(!m_codeBlockForCall);
- m_codeBlockForCall = new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), false);
- OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlockForCall->symbolTable(), m_codeBlockForCall)));
+ m_codeBlockForCall = adoptPtr(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), false));
+ OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlockForCall->symbolTable(), m_codeBlockForCall.get())));
generator->generate();
m_numParametersForCall = m_codeBlockForCall->m_numParameters;
ASSERT(m_numParametersForCall);
@@ -143,15 +201,29 @@ bool FunctionExecutable::compileForCall(ExecState*, ScopeChainNode* scopeChainNo
m_symbolTable = m_codeBlockForCall->sharedSymbolTable();
body->destroyData();
- return true;
+
+#if ENABLE(JIT)
+ if (exec->globalData().canUseJIT()) {
+ m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_codeBlockForCall.get(), &m_jitCodeForCallWithArityCheck);
+#if !ENABLE(OPCODE_SAMPLING)
+ if (!BytecodeGenerator::dumpsGeneratedCode())
+ m_codeBlockForCall->discardBytecode();
+#endif
+ }
+#endif
+
+ return 0;
}
-bool FunctionExecutable::compileForConstruct(ExecState*, ScopeChainNode* scopeChainNode)
+JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, ScopeChainNode* scopeChainNode)
{
+ JSObject* exception = 0;
JSGlobalData* globalData = scopeChainNode->globalData;
- RefPtr<FunctionBodyNode> body = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source);
- if (!body)
- return false;
+ RefPtr<FunctionBodyNode> body = globalData->parser->parse<FunctionBodyNode>(globalData, exec->lexicalGlobalObject(), 0, 0, m_source, &exception);
+ if (!body) {
+ ASSERT(exception);
+ return exception;
+ }
if (m_forceUsesArguments)
body->setUsesArguments();
body->finishParsing(m_parameters, m_name);
@@ -161,8 +233,8 @@ bool FunctionExecutable::compileForConstruct(ExecState*, ScopeChainNode* scopeCh
JSGlobalObject* globalObject = scopeChain.globalObject();
ASSERT(!m_codeBlockForConstruct);
- m_codeBlockForConstruct = new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), true);
- OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlockForConstruct->symbolTable(), m_codeBlockForConstruct)));
+ m_codeBlockForConstruct = adoptPtr(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), true));
+ OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlockForConstruct->symbolTable(), m_codeBlockForConstruct.get())));
generator->generate();
m_numParametersForConstruct = m_codeBlockForConstruct->m_numParameters;
ASSERT(m_numParametersForConstruct);
@@ -170,69 +242,20 @@ bool FunctionExecutable::compileForConstruct(ExecState*, ScopeChainNode* scopeCh
m_symbolTable = m_codeBlockForConstruct->sharedSymbolTable();
body->destroyData();
- return true;
-}
#if ENABLE(JIT)
-
-void EvalExecutable::generateJITCode(ExecState* exec, ScopeChainNode* scopeChainNode)
-{
-#if ENABLE(INTERPRETER)
- ASSERT(exec->globalData().canUseJIT());
-#endif
- CodeBlock* codeBlock = &bytecode(exec, scopeChainNode);
- m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, codeBlock);
-
-#if !ENABLE(OPCODE_SAMPLING)
- if (!BytecodeGenerator::dumpsGeneratedCode())
- codeBlock->discardBytecode();
-#endif
-}
-
-void ProgramExecutable::generateJITCode(ExecState* exec, ScopeChainNode* scopeChainNode)
-{
-#if ENABLE(INTERPRETER)
- ASSERT(exec->globalData().canUseJIT());
-#endif
- CodeBlock* codeBlock = &bytecode(exec, scopeChainNode);
- m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, codeBlock);
-
-#if !ENABLE(OPCODE_SAMPLING)
- if (!BytecodeGenerator::dumpsGeneratedCode())
- codeBlock->discardBytecode();
-#endif
-}
-
-void FunctionExecutable::generateJITCodeForCall(ExecState* exec, ScopeChainNode* scopeChainNode)
-{
-#if ENABLE(INTERPRETER)
- ASSERT(exec->globalData().canUseJIT());
-#endif
- CodeBlock* codeBlock = bytecodeForCall(exec, scopeChainNode);
- m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, codeBlock, &m_jitCodeForCallWithArityCheck);
-
+ if (exec->globalData().canUseJIT()) {
+ m_jitCodeForConstruct = JIT::compile(scopeChainNode->globalData, m_codeBlockForConstruct.get(), &m_jitCodeForConstructWithArityCheck);
#if !ENABLE(OPCODE_SAMPLING)
- if (!BytecodeGenerator::dumpsGeneratedCode())
- codeBlock->discardBytecode();
+ if (!BytecodeGenerator::dumpsGeneratedCode())
+ m_codeBlockForConstruct->discardBytecode();
#endif
-}
-
-void FunctionExecutable::generateJITCodeForConstruct(ExecState* exec, ScopeChainNode* scopeChainNode)
-{
-#if ENABLE(INTERPRETER)
- ASSERT(exec->globalData().canUseJIT());
+ }
#endif
- CodeBlock* codeBlock = bytecodeForConstruct(exec, scopeChainNode);
- m_jitCodeForConstruct = JIT::compile(scopeChainNode->globalData, codeBlock, &m_jitCodeForConstructWithArityCheck);
-#if !ENABLE(OPCODE_SAMPLING)
- if (!BytecodeGenerator::dumpsGeneratedCode())
- codeBlock->discardBytecode();
-#endif
+ return 0;
}
-#endif
-
void FunctionExecutable::markAggregate(MarkStack& markStack)
{
if (m_codeBlockForCall)
@@ -243,7 +266,8 @@ void FunctionExecutable::markAggregate(MarkStack& markStack)
PassOwnPtr<ExceptionInfo> FunctionExecutable::reparseExceptionInfo(JSGlobalData* globalData, ScopeChainNode* scopeChainNode, CodeBlock* codeBlock)
{
- RefPtr<FunctionBodyNode> newFunctionBody = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, m_source);
+ JSObject* exception = 0;
+ RefPtr<FunctionBodyNode> newFunctionBody = globalData->parser->parse<FunctionBodyNode>(globalData, 0, 0, 0, m_source, &exception);
if (!newFunctionBody)
return PassOwnPtr<ExceptionInfo>();
if (m_forceUsesArguments)
@@ -263,10 +287,7 @@ PassOwnPtr<ExceptionInfo> FunctionExecutable::reparseExceptionInfo(JSGlobalData*
ASSERT(newCodeBlock->instructionCount() == codeBlock->instructionCount());
#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
- if (globalData->canUseJIT())
-#endif
- {
+ if (globalData->canUseJIT()) {
JITCode newJITCode = JIT::compile(globalData, newCodeBlock.get());
ASSERT(codeBlock->m_isConstructor ? newJITCode.size() == generatedJITCodeForConstruct().size() : newJITCode.size() == generatedJITCodeForCall().size());
}
@@ -279,7 +300,8 @@ PassOwnPtr<ExceptionInfo> FunctionExecutable::reparseExceptionInfo(JSGlobalData*
PassOwnPtr<ExceptionInfo> EvalExecutable::reparseExceptionInfo(JSGlobalData* globalData, ScopeChainNode* scopeChainNode, CodeBlock* codeBlock)
{
- RefPtr<EvalNode> newEvalBody = globalData->parser->parse<EvalNode>(globalData, 0, 0, m_source);
+ JSObject* exception = 0;
+ RefPtr<EvalNode> newEvalBody = globalData->parser->parse<EvalNode>(globalData, 0, 0, 0, m_source, &exception);
if (!newEvalBody)
return PassOwnPtr<ExceptionInfo>();
@@ -295,10 +317,7 @@ PassOwnPtr<ExceptionInfo> EvalExecutable::reparseExceptionInfo(JSGlobalData* glo
ASSERT(newCodeBlock->instructionCount() == codeBlock->instructionCount());
#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
- if (globalData->canUseJIT())
-#endif
- {
+ if (globalData->canUseJIT()) {
JITCode newJITCode = JIT::compile(globalData, newCodeBlock.get());
ASSERT(newJITCode.size() == generatedJITCodeForCall().size());
}
@@ -309,10 +328,8 @@ PassOwnPtr<ExceptionInfo> EvalExecutable::reparseExceptionInfo(JSGlobalData* glo
void FunctionExecutable::recompile(ExecState*)
{
- delete m_codeBlockForCall;
- m_codeBlockForCall = 0;
- delete m_codeBlockForConstruct;
- m_codeBlockForConstruct = 0;
+ m_codeBlockForCall.clear();
+ m_codeBlockForConstruct.clear();
m_numParametersForCall = NUM_PARAMETERS_NOT_COMPILED;
m_numParametersForConstruct = NUM_PARAMETERS_NOT_COMPILED;
#if ENABLE(JIT)
@@ -321,26 +338,25 @@ void FunctionExecutable::recompile(ExecState*)
#endif
}
-PassRefPtr<FunctionExecutable> FunctionExecutable::fromGlobalCode(const Identifier& functionName, ExecState* exec, Debugger* debugger, const SourceCode& source, int* errLine, UString* errMsg)
+PassRefPtr<FunctionExecutable> FunctionExecutable::fromGlobalCode(const Identifier& functionName, ExecState* exec, Debugger* debugger, const SourceCode& source, JSObject** exception)
{
- RefPtr<ProgramNode> program = exec->globalData().parser->parse<ProgramNode>(&exec->globalData(), debugger, exec, source, errLine, errMsg);
- if (!program)
+ JSGlobalObject* lexicalGlobalObject = exec->lexicalGlobalObject();
+ RefPtr<ProgramNode> program = exec->globalData().parser->parse<ProgramNode>(&exec->globalData(), lexicalGlobalObject, debugger, exec, source, exception);
+ if (!program) {
+ ASSERT(*exception);
return 0;
+ }
+ // Uses of this function that would not result in a single function expression are invalid.
StatementNode* exprStatement = program->singleStatement();
ASSERT(exprStatement);
ASSERT(exprStatement->isExprStatement());
- if (!exprStatement || !exprStatement->isExprStatement())
- return 0;
-
ExpressionNode* funcExpr = static_cast<ExprStatementNode*>(exprStatement)->expr();
ASSERT(funcExpr);
ASSERT(funcExpr->isFuncExprNode());
- if (!funcExpr || !funcExpr->isFuncExprNode())
- return 0;
-
FunctionBodyNode* body = static_cast<FuncExprNode*>(funcExpr)->body();
ASSERT(body);
+
return FunctionExecutable::create(&exec->globalData(), functionName, body->source(), body->usesArguments(), body->parameters(), body->lineNo(), body->lastLine());
}
diff --git a/JavaScriptCore/runtime/Executable.h b/JavaScriptCore/runtime/Executable.h
index 516d6ce..10dfb34 100644
--- a/JavaScriptCore/runtime/Executable.h
+++ b/JavaScriptCore/runtime/Executable.h
@@ -98,6 +98,8 @@ namespace JSC {
public:
static PassRefPtr<NativeExecutable> create(MacroAssemblerCodePtr callThunk, NativeFunction function, MacroAssemblerCodePtr constructThunk, NativeFunction constructor)
{
+ if (!callThunk)
+ return adoptRef(new NativeExecutable(JITCode(), function, JITCode(), constructor));
return adoptRef(new NativeExecutable(JITCode::HostFunction(callThunk), function, JITCode::HostFunction(constructThunk), constructor));
}
@@ -193,42 +195,38 @@ namespace JSC {
~EvalExecutable();
- EvalCodeBlock& bytecode(ExecState* exec, ScopeChainNode* scopeChainNode)
+ JSObject* compile(ExecState* exec, ScopeChainNode* scopeChainNode)
{
- if (!m_evalCodeBlock) {
- JSObject* error = compile(exec, scopeChainNode);
- ASSERT_UNUSED(!error, error);
- }
- return *m_evalCodeBlock;
+ JSObject* error = 0;
+ if (!m_evalCodeBlock)
+ error = compileInternal(exec, scopeChainNode);
+ ASSERT(!error == !!m_evalCodeBlock);
+ return error;
}
- JSObject* compile(ExecState*, ScopeChainNode*);
-
- static PassRefPtr<EvalExecutable> create(ExecState* exec, const SourceCode& source) { return adoptRef(new EvalExecutable(exec, source)); }
-
- private:
- EvalExecutable(ExecState* exec, const SourceCode& source)
- : ScriptExecutable(exec, source)
- , m_evalCodeBlock(0)
+ EvalCodeBlock& generatedBytecode()
{
+ ASSERT(m_evalCodeBlock);
+ return *m_evalCodeBlock;
}
- virtual PassOwnPtr<ExceptionInfo> reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
-
- EvalCodeBlock* m_evalCodeBlock;
+ static PassRefPtr<EvalExecutable> create(ExecState* exec, const SourceCode& source) { return adoptRef(new EvalExecutable(exec, source)); }
#if ENABLE(JIT)
- public:
- JITCode& jitCode(ExecState* exec, ScopeChainNode* scopeChainNode)
+ JITCode& generatedJITCode()
{
- if (!m_jitCodeForCall)
- generateJITCode(exec, scopeChainNode);
- return m_jitCodeForCall;
+ return generatedJITCodeForCall();
}
+#endif
private:
- void generateJITCode(ExecState*, ScopeChainNode*);
-#endif
+ EvalExecutable(ExecState*, const SourceCode&);
+
+ JSObject* compileInternal(ExecState*, ScopeChainNode*);
+
+ virtual PassOwnPtr<ExceptionInfo> reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
+
+ OwnPtr<EvalCodeBlock> m_evalCodeBlock;
};
class ProgramExecutable : public ScriptExecutable {
@@ -240,41 +238,38 @@ namespace JSC {
~ProgramExecutable();
- ProgramCodeBlock& bytecode(ExecState* exec, ScopeChainNode* scopeChainNode)
+ JSObject* compile(ExecState* exec, ScopeChainNode* scopeChainNode)
{
- if (!m_programCodeBlock) {
- JSObject* error = compile(exec, scopeChainNode);
- ASSERT_UNUSED(!error, error);
- }
- return *m_programCodeBlock;
+ JSObject* error = 0;
+ if (!m_programCodeBlock)
+ error = compileInternal(exec, scopeChainNode);
+ ASSERT(!error == !!m_programCodeBlock);
+ return error;
}
- JSObject* checkSyntax(ExecState*);
- JSObject* compile(ExecState*, ScopeChainNode*);
-
- private:
- ProgramExecutable(ExecState* exec, const SourceCode& source)
- : ScriptExecutable(exec, source)
- , m_programCodeBlock(0)
+ ProgramCodeBlock& generatedBytecode()
{
+ ASSERT(m_programCodeBlock);
+ return *m_programCodeBlock;
}
- virtual PassOwnPtr<ExceptionInfo> reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
-
- ProgramCodeBlock* m_programCodeBlock;
+ JSObject* checkSyntax(ExecState*);
#if ENABLE(JIT)
- public:
- JITCode& jitCode(ExecState* exec, ScopeChainNode* scopeChainNode)
+ JITCode& generatedJITCode()
{
- if (!m_jitCodeForCall)
- generateJITCode(exec, scopeChainNode);
- return m_jitCodeForCall;
+ return generatedJITCodeForCall();
}
+#endif
private:
- void generateJITCode(ExecState*, ScopeChainNode*);
-#endif
+ ProgramExecutable(ExecState*, const SourceCode&);
+
+ JSObject* compileInternal(ExecState*, ScopeChainNode*);
+
+ virtual PassOwnPtr<ExceptionInfo> reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
+
+ OwnPtr<ProgramCodeBlock> m_programCodeBlock;
};
class FunctionExecutable : public ScriptExecutable {
@@ -300,7 +295,7 @@ namespace JSC {
// Returns either call or construct bytecode. This can be appropriate
// for answering questions that that don't vary between call and construct --
// for example, argumentsRegister().
- FunctionCodeBlock& generatedByteCode()
+ FunctionCodeBlock& generatedBytecode()
{
if (m_codeBlockForCall)
return *m_codeBlockForCall;
@@ -308,12 +303,13 @@ namespace JSC {
return *m_codeBlockForConstruct;
}
- FunctionCodeBlock* bytecodeForCall(ExecState* exec, ScopeChainNode* scopeChainNode)
+ JSObject* compileForCall(ExecState* exec, ScopeChainNode* scopeChainNode)
{
- ASSERT(scopeChainNode);
+ JSObject* error = 0;
if (!m_codeBlockForCall)
- compileForCall(exec, scopeChainNode);
- return m_codeBlockForCall;
+ error = compileForCallInternal(exec, scopeChainNode);
+ ASSERT(!error == !!m_codeBlockForCall);
+ return error;
}
bool isGeneratedForCall() const
@@ -327,12 +323,13 @@ namespace JSC {
return *m_codeBlockForCall;
}
- FunctionCodeBlock* bytecodeForConstruct(ExecState* exec, ScopeChainNode* scopeChainNode)
+ JSObject* compileForConstruct(ExecState* exec, ScopeChainNode* scopeChainNode)
{
- ASSERT(scopeChainNode);
+ JSObject* error = 0;
if (!m_codeBlockForConstruct)
- compileForConstruct(exec, scopeChainNode);
- return m_codeBlockForConstruct;
+ error = compileForConstructInternal(exec, scopeChainNode);
+ ASSERT(!error == !!m_codeBlockForConstruct);
+ return error;
}
bool isGeneratedForConstruct() const
@@ -353,40 +350,15 @@ namespace JSC {
SharedSymbolTable* symbolTable() const { return m_symbolTable; }
void recompile(ExecState*);
- void markAggregate(MarkStack& markStack);
- static PassRefPtr<FunctionExecutable> fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, int* errLine = 0, UString* errMsg = 0);
+ void markAggregate(MarkStack&);
+ static PassRefPtr<FunctionExecutable> fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);
private:
- FunctionExecutable(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
- : ScriptExecutable(globalData, source)
- , m_numVariables(0)
- , m_forceUsesArguments(forceUsesArguments)
- , m_parameters(parameters)
- , m_codeBlockForCall(0)
- , m_codeBlockForConstruct(0)
- , m_name(name)
- , m_symbolTable(0)
- {
- m_firstLine = firstLine;
- m_lastLine = lastLine;
- }
+ FunctionExecutable(JSGlobalData*, const Identifier& name, const SourceCode&, bool forceUsesArguments, FunctionParameters*, int firstLine, int lastLine);
+ FunctionExecutable(ExecState*, const Identifier& name, const SourceCode&, bool forceUsesArguments, FunctionParameters*, int firstLine, int lastLine);
- FunctionExecutable(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
- : ScriptExecutable(exec, source)
- , m_numVariables(0)
- , m_forceUsesArguments(forceUsesArguments)
- , m_parameters(parameters)
- , m_codeBlockForCall(0)
- , m_codeBlockForConstruct(0)
- , m_name(name)
- , m_symbolTable(0)
- {
- m_firstLine = firstLine;
- m_lastLine = lastLine;
- }
-
- bool compileForCall(ExecState*, ScopeChainNode*);
- bool compileForConstruct(ExecState*, ScopeChainNode*);
+ JSObject* compileForCallInternal(ExecState*, ScopeChainNode*);
+ JSObject* compileForConstructInternal(ExecState*, ScopeChainNode*);
virtual PassOwnPtr<ExceptionInfo> reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
@@ -394,27 +366,13 @@ namespace JSC {
bool m_forceUsesArguments : 1;
RefPtr<FunctionParameters> m_parameters;
- FunctionCodeBlock* m_codeBlockForCall;
- FunctionCodeBlock* m_codeBlockForConstruct;
+ OwnPtr<FunctionCodeBlock> m_codeBlockForCall;
+ OwnPtr<FunctionCodeBlock> m_codeBlockForConstruct;
Identifier m_name;
SharedSymbolTable* m_symbolTable;
#if ENABLE(JIT)
public:
- JITCode& jitCodeForCall(ExecState* exec, ScopeChainNode* scopeChainNode)
- {
- if (!m_jitCodeForCall)
- generateJITCodeForCall(exec, scopeChainNode);
- return m_jitCodeForCall;
- }
-
- JITCode& jitCodeForConstruct(ExecState* exec, ScopeChainNode* scopeChainNode)
- {
- if (!m_jitCodeForConstruct)
- generateJITCodeForConstruct(exec, scopeChainNode);
- return m_jitCodeForConstruct;
- }
-
MacroAssemblerCodePtr generatedJITCodeForCallWithArityCheck()
{
ASSERT(m_jitCodeForCall);
@@ -428,10 +386,6 @@ namespace JSC {
ASSERT(m_jitCodeForConstructWithArityCheck);
return m_jitCodeForConstructWithArityCheck;
}
-
- private:
- void generateJITCodeForCall(ExecState*, ScopeChainNode*);
- void generateJITCodeForConstruct(ExecState*, ScopeChainNode*);
#endif
};
diff --git a/JavaScriptCore/runtime/FunctionConstructor.cpp b/JavaScriptCore/runtime/FunctionConstructor.cpp
index a5ff28c..a036eef 100644
--- a/JavaScriptCore/runtime/FunctionConstructor.cpp
+++ b/JavaScriptCore/runtime/FunctionConstructor.cpp
@@ -95,14 +95,15 @@ JSObject* constructFunction(ExecState* exec, const ArgList& args, const Identifi
program = builder.build();
}
- int errLine;
- UString errMsg;
JSGlobalObject* globalObject = exec->lexicalGlobalObject();
JSGlobalData* globalData = globalObject->globalData();
SourceCode source = makeSource(program, sourceURL, lineNumber);
- RefPtr<FunctionExecutable> function = FunctionExecutable::fromGlobalCode(functionName, exec, exec->dynamicGlobalObject()->debugger(), source, &errLine, &errMsg);
- if (!function)
- return throwError(exec, addErrorInfo(globalData, createSyntaxError(globalObject, errMsg), errLine, source));
+ JSObject* exception = 0;
+ RefPtr<FunctionExecutable> function = FunctionExecutable::fromGlobalCode(functionName, exec, exec->dynamicGlobalObject()->debugger(), source, &exception);
+ if (!function) {
+ ASSERT(exception);
+ return throwError(exec, exception);
+ }
ScopeChain scopeChain(globalObject, globalData, globalObject, exec->globalThisValue());
return new (exec) JSFunction(exec, function, scopeChain.node());
diff --git a/JavaScriptCore/runtime/JSActivation.cpp b/JavaScriptCore/runtime/JSActivation.cpp
index fd415ce..8cf71d0 100644
--- a/JavaScriptCore/runtime/JSActivation.cpp
+++ b/JavaScriptCore/runtime/JSActivation.cpp
@@ -143,7 +143,7 @@ JSValue JSActivation::argumentsGetter(ExecState*, JSValue slotBase, const Identi
{
JSActivation* activation = asActivation(slotBase);
CallFrame* callFrame = CallFrame::create(activation->d()->registers);
- int argumentsRegister = activation->d()->functionExecutable->generatedByteCode().argumentsRegister();
+ int argumentsRegister = activation->d()->functionExecutable->generatedBytecode().argumentsRegister();
if (!callFrame->r(argumentsRegister).jsValue()) {
JSValue arguments = JSValue(new (callFrame) Arguments(callFrame));
callFrame->r(argumentsRegister) = arguments;
diff --git a/JavaScriptCore/runtime/JSArray.cpp b/JavaScriptCore/runtime/JSArray.cpp
index 362f89b..56603a3 100644
--- a/JavaScriptCore/runtime/JSArray.cpp
+++ b/JavaScriptCore/runtime/JSArray.cpp
@@ -33,8 +33,6 @@
#include <wtf/OwnPtr.h>
#include <Operations.h>
-#define CHECK_ARRAY_CONSISTENCY 0
-
using namespace std;
using namespace WTF;
@@ -141,22 +139,37 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure)
checkConsistency();
}
-JSArray::JSArray(NonNullPassRefPtr<Structure> structure, unsigned initialLength)
+JSArray::JSArray(NonNullPassRefPtr<Structure> structure, unsigned initialLength, ArrayCreationMode creationMode)
: JSObject(structure)
{
- unsigned initialCapacity = min(initialLength, MIN_SPARSE_ARRAY_INDEX);
+ unsigned initialCapacity;
+ if (creationMode == CreateCompact)
+ initialCapacity = initialLength;
+ else
+ initialCapacity = min(initialLength, MIN_SPARSE_ARRAY_INDEX);
m_storage = static_cast<ArrayStorage*>(fastMalloc(storageSize(initialCapacity)));
- m_storage->m_length = initialLength;
m_vectorLength = initialCapacity;
- m_storage->m_numValuesInVector = 0;
m_storage->m_sparseValueMap = 0;
m_storage->subclassData = 0;
m_storage->reportedMapCapacity = 0;
- JSValue* vector = m_storage->m_vector;
- for (size_t i = 0; i < initialCapacity; ++i)
- vector[i] = JSValue();
+ if (creationMode == CreateCompact) {
+#if CHECK_ARRAY_CONSISTENCY
+ m_storage->m_inCompactInitialization = !!initialCapacity;
+#endif
+ m_storage->m_length = 0;
+ m_storage->m_numValuesInVector = initialCapacity;
+ } else {
+#if CHECK_ARRAY_CONSISTENCY
+ m_storage->m_inCompactInitialization = false;
+#endif
+ m_storage->m_length = initialLength;
+ m_storage->m_numValuesInVector = 0;
+ JSValue* vector = m_storage->m_vector;
+ for (size_t i = 0; i < initialCapacity; ++i)
+ vector[i] = JSValue();
+ }
checkConsistency();
@@ -175,6 +188,9 @@ JSArray::JSArray(NonNullPassRefPtr<Structure> structure, const ArgList& list)
m_storage->m_sparseValueMap = 0;
m_storage->subclassData = 0;
m_storage->reportedMapCapacity = 0;
+#if CHECK_ARRAY_CONSISTENCY
+ m_storage->m_inCompactInitialization = false;
+#endif
size_t i = 0;
ArgList::const_iterator end = list.end();
@@ -524,7 +540,12 @@ bool JSArray::increaseVectorLength(unsigned newLength)
void JSArray::setLength(unsigned newLength)
{
- checkConsistency();
+#if CHECK_ARRAY_CONSISTENCY
+ if (!m_storage->m_inCompactInitialization)
+ checkConsistency();
+ else
+ m_storage->m_inCompactInitialization = false;
+#endif
ArrayStorage* storage = m_storage;
@@ -1045,7 +1066,7 @@ void JSArray::checkConsistency(ConsistencyCheckType type)
if (JSValue value = m_storage->m_vector[i]) {
ASSERT(i < m_storage->m_length);
if (type != DestructorConsistencyCheck)
- value->type(); // Likely to crash if the object was deallocated.
+ value.isUndefined(); // Likely to crash if the object was deallocated.
++numValuesInVector;
} else {
if (type == SortConsistencyCheck)
@@ -1064,7 +1085,7 @@ void JSArray::checkConsistency(ConsistencyCheckType type)
ASSERT(index <= MAX_ARRAY_INDEX);
ASSERT(it->second);
if (type != DestructorConsistencyCheck)
- it->second->type(); // Likely to crash if the object was deallocated.
+ it->second.isUndefined(); // Likely to crash if the object was deallocated.
}
}
}
diff --git a/JavaScriptCore/runtime/JSArray.h b/JavaScriptCore/runtime/JSArray.h
index f65f2bc..b6dd7cc 100644
--- a/JavaScriptCore/runtime/JSArray.h
+++ b/JavaScriptCore/runtime/JSArray.h
@@ -23,6 +23,8 @@
#include "JSObject.h"
+#define CHECK_ARRAY_CONSISTENCY 0
+
namespace JSC {
typedef HashMap<unsigned, JSValue> SparseArrayValueMap;
@@ -33,16 +35,29 @@ namespace JSC {
SparseArrayValueMap* m_sparseValueMap;
void* subclassData; // A JSArray subclass can use this to fill the vector lazily.
size_t reportedMapCapacity;
+#if CHECK_ARRAY_CONSISTENCY
+ bool m_inCompactInitialization;
+#endif
JSValue m_vector[1];
};
+ // The CreateCompact creation mode is used for fast construction of arrays
+ // whose size and contents are known at time of creation.
+ //
+ // There are two obligations when using this mode:
+ //
+ // - uncheckedSetIndex() must be used when initializing the array.
+ // - setLength() must be called after initialization.
+
+ enum ArrayCreationMode { CreateCompact, CreateInitialized };
+
class JSArray : public JSObject {
friend class JIT;
friend class Walker;
public:
explicit JSArray(NonNullPassRefPtr<Structure>);
- JSArray(NonNullPassRefPtr<Structure>, unsigned initialLength);
+ JSArray(NonNullPassRefPtr<Structure>, unsigned initialLength, ArrayCreationMode);
JSArray(NonNullPassRefPtr<Structure>, const ArgList& initialValues);
virtual ~JSArray();
@@ -83,6 +98,15 @@ namespace JSC {
x = v;
}
+ void uncheckedSetIndex(unsigned i, JSValue v)
+ {
+ ASSERT(canSetIndex(i));
+#if CHECK_ARRAY_CONSISTENCY
+ ASSERT(m_storage->m_inCompactInitialization);
+#endif
+ m_storage->m_vector[i] = v;
+ }
+
void fillArgList(ExecState*, MarkedArgumentBuffer&);
void copyToRegisters(ExecState*, Register*, uint32_t);
diff --git a/JavaScriptCore/runtime/JSGlobalData.cpp b/JavaScriptCore/runtime/JSGlobalData.cpp
index 1508750..065cbe1 100644
--- a/JavaScriptCore/runtime/JSGlobalData.cpp
+++ b/JavaScriptCore/runtime/JSGlobalData.cpp
@@ -136,11 +136,7 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread
, lexer(new Lexer(this))
, parser(new Parser)
, interpreter(new Interpreter)
-#if ENABLE(JIT)
- , jitStubs(this)
-#endif
, heap(this)
- , initializingLazyNumericCompareFunction(false)
, head(0)
, dynamicGlobalObject(0)
, functionCodeBlockBeingReparsed(0)
@@ -158,18 +154,28 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread
startProfilerServerIfNeeded();
#endif
#if ENABLE(JIT) && ENABLE(INTERPRETER)
-#if PLATFORM(MAC)
+#if PLATFORM(CF)
CFStringRef canUseJITKey = CFStringCreateWithCString(0 , "JavaScriptCoreUseJIT", kCFStringEncodingMacRoman);
CFBooleanRef canUseJIT = (CFBooleanRef)CFPreferencesCopyAppValue(canUseJITKey, kCFPreferencesCurrentApplication);
- m_canUseJIT = kCFBooleanTrue == canUseJIT;
- CFRelease(canUseJIT);
+ if (canUseJIT) {
+ m_canUseJIT = kCFBooleanTrue == canUseJIT;
+ CFRelease(canUseJIT);
+ } else
+ m_canUseJIT = !getenv("JavaScriptCoreUseJIT");
CFRelease(canUseJITKey);
#elif OS(UNIX)
- m_canUseJIT = !getenv("JSC_FORCE_INTERPRETER");
+ m_canUseJIT = !getenv("JavaScriptCoreUseJIT");
#else
m_canUseJIT = true;
#endif
#endif
+#if ENABLE(JIT)
+#if ENABLE(INTERPRETER)
+ if (m_canUseJIT)
+ m_canUseJIT = executableAllocator.isValid();
+#endif
+ jitStubs = new JITThunks(this);
+#endif
}
JSGlobalData::~JSGlobalData()
@@ -257,27 +263,14 @@ JSGlobalData*& JSGlobalData::sharedInstanceInternal()
return sharedInstance;
}
-// FIXME: We can also detect forms like v1 < v2 ? -1 : 0, reverse comparison, etc.
-const Vector<Instruction>& JSGlobalData::numericCompareFunction(ExecState* exec)
-{
- if (!lazyNumericCompareFunction.size() && !initializingLazyNumericCompareFunction) {
- initializingLazyNumericCompareFunction = true;
- RefPtr<FunctionExecutable> function = FunctionExecutable::fromGlobalCode(Identifier(exec, "numericCompare"), exec, 0, makeSource(UString("(function (v1, v2) { return v1 - v2; })")), 0, 0);
- lazyNumericCompareFunction = function->bytecodeForCall(exec, exec->scopeChain())->instructions();
- initializingLazyNumericCompareFunction = false;
- }
-
- return lazyNumericCompareFunction;
-}
-
#if ENABLE(JIT)
PassRefPtr<NativeExecutable> JSGlobalData::getHostFunction(NativeFunction function)
{
- return jitStubs.hostFunctionStub(this, function);
+ return jitStubs->hostFunctionStub(this, function);
}
PassRefPtr<NativeExecutable> JSGlobalData::getHostFunction(NativeFunction function, ThunkGenerator generator)
{
- return jitStubs.hostFunctionStub(this, function, generator);
+ return jitStubs->hostFunctionStub(this, function, generator);
}
#endif
diff --git a/JavaScriptCore/runtime/JSGlobalData.h b/JavaScriptCore/runtime/JSGlobalData.h
index f3f6cba..23b6b21 100644
--- a/JavaScriptCore/runtime/JSGlobalData.h
+++ b/JavaScriptCore/runtime/JSGlobalData.h
@@ -167,21 +167,21 @@ namespace JSC {
ExecutableAllocator executableAllocator;
#endif
-#if ENABLE(JIT)
-#if ENABLE(INTERPRETER)
- bool canUseJIT() { return m_canUseJIT; }
-#endif
+#if !ENABLE(JIT)
+ bool canUseJIT() { return false; } // interpreter only
+#elif !ENABLE(INTERPRETER)
+ bool canUseJIT() { return true; } // jit only
#else
- bool canUseJIT() { return false; }
+ bool canUseJIT() { return m_canUseJIT; }
#endif
Lexer* lexer;
Parser* parser;
Interpreter* interpreter;
#if ENABLE(JIT)
- JITThunks jitStubs;
+ OwnPtr<JITThunks> jitStubs;
MacroAssemblerCodePtr getCTIStub(ThunkGenerator generator)
{
- return jitStubs.ctiStub(this, generator);
+ return jitStubs->ctiStub(this, generator);
}
PassRefPtr<NativeExecutable> getHostFunction(NativeFunction function);
PassRefPtr<NativeExecutable> getHostFunction(NativeFunction function, ThunkGenerator generator);
@@ -195,10 +195,6 @@ namespace JSC {
ReturnAddressPtr exceptionLocation;
#endif
- const Vector<Instruction>& numericCompareFunction(ExecState*);
- Vector<Instruction> lazyNumericCompareFunction;
- bool initializingLazyNumericCompareFunction;
-
HashMap<OpaqueJSClass*, OpaqueJSClassContextData*> opaqueJSClassData;
JSGlobalObject* head;
diff --git a/JavaScriptCore/runtime/JSGlobalObject.h b/JavaScriptCore/runtime/JSGlobalObject.h
index 09a92a1..115af87 100644
--- a/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/JavaScriptCore/runtime/JSGlobalObject.h
@@ -457,7 +457,7 @@ namespace JSC {
inline JSArray* constructEmptyArray(ExecState* exec, unsigned initialLength)
{
- return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), initialLength);
+ return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), initialLength, CreateInitialized);
}
inline JSArray* constructArray(ExecState* exec, JSValue singleItemValue)
diff --git a/JavaScriptCore/runtime/RegExpConstructor.cpp b/JavaScriptCore/runtime/RegExpConstructor.cpp
index fa2a1e2..aff83e7 100644
--- a/JavaScriptCore/runtime/RegExpConstructor.cpp
+++ b/JavaScriptCore/runtime/RegExpConstructor.cpp
@@ -106,7 +106,7 @@ RegExpConstructor::RegExpConstructor(ExecState* exec, JSGlobalObject* globalObje
}
RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate* data)
- : JSArray(exec->lexicalGlobalObject()->regExpMatchesArrayStructure(), data->lastNumSubPatterns + 1)
+ : JSArray(exec->lexicalGlobalObject()->regExpMatchesArrayStructure(), data->lastNumSubPatterns + 1, CreateInitialized)
{
RegExpConstructorPrivate* d = new RegExpConstructorPrivate;
d->input = data->lastInput;
diff --git a/JavaScriptCore/runtime/RegExpKey.h b/JavaScriptCore/runtime/RegExpKey.h
index e5ab438..2bbdb07 100644
--- a/JavaScriptCore/runtime/RegExpKey.h
+++ b/JavaScriptCore/runtime/RegExpKey.h
@@ -76,13 +76,8 @@ struct RegExpKey {
return flagsValue;
}
};
-} // namespace JSC
-
-namespace WTF {
-template<typename T> struct DefaultHash;
-template<typename T> struct RegExpHash;
-inline bool operator==(const JSC::RegExpKey& a, const JSC::RegExpKey& b)
+inline bool operator==(const RegExpKey& a, const RegExpKey& b)
{
if (a.flagsValue != b.flagsValue)
return false;
@@ -93,6 +88,12 @@ inline bool operator==(const JSC::RegExpKey& a, const JSC::RegExpKey& b)
return equal(a.pattern.get(), b.pattern.get());
}
+} // namespace JSC
+
+namespace WTF {
+template<typename T> struct DefaultHash;
+template<typename T> struct RegExpHash;
+
template<> struct RegExpHash<JSC::RegExpKey> {
static unsigned hash(const JSC::RegExpKey& key) { return key.pattern->hash(); }
static bool equal(const JSC::RegExpKey& a, const JSC::RegExpKey& b) { return a == b; }
diff --git a/JavaScriptCore/wtf/MathExtras.h b/JavaScriptCore/wtf/MathExtras.h
index 0222a10..8a8741c 100644
--- a/JavaScriptCore/wtf/MathExtras.h
+++ b/JavaScriptCore/wtf/MathExtras.h
@@ -54,6 +54,14 @@ const double piDouble = M_PI;
const float piFloat = static_cast<float>(M_PI);
#endif
+#ifndef M_PI_2
+const double piOverTwoDouble = 1.57079632679489661923;
+const float piOverTwoFloat = 1.57079632679489661923f;
+#else
+const double piOverTwoDouble = M_PI_2;
+const float piOverTwoFloat = static_cast<float>(M_PI_2);
+#endif
+
#ifndef M_PI_4
const double piOverFourDouble = 0.785398163397448309616;
const float piOverFourFloat = 0.785398163397448309616f;
diff --git a/JavaScriptCore/wtf/PassRefPtr.h b/JavaScriptCore/wtf/PassRefPtr.h
index 230637a..54fa14c 100644
--- a/JavaScriptCore/wtf/PassRefPtr.h
+++ b/JavaScriptCore/wtf/PassRefPtr.h
@@ -96,7 +96,7 @@ namespace WTF {
friend PassRefPtr adoptRef<T>(T*);
// FIXME: Remove releaseRef once we change all callers to call leakRef instead.
- T* releaseRef() const { return leakRef(); } WARN_UNUSED_RETURN;
+ T* releaseRef() const WARN_UNUSED_RETURN { return leakRef(); }
private:
// adopting constructor
@@ -152,13 +152,13 @@ namespace WTF {
T* get() const { return m_ptr; }
void clear();
- T* leakRef() const { T* tmp = m_ptr; m_ptr = 0; return tmp; } WARN_UNUSED_RETURN;
+ T* leakRef() const WARN_UNUSED_RETURN { T* tmp = m_ptr; m_ptr = 0; return tmp; }
T& operator*() const { return *m_ptr; }
T* operator->() const { return m_ptr; }
// FIXME: Remove releaseRef once we change all callers to call leakRef instead.
- T* releaseRef() const { return leakRef(); } WARN_UNUSED_RETURN;
+ T* releaseRef() const WARN_UNUSED_RETURN { return leakRef(); }
private:
mutable T* m_ptr;
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 2500c56..4166ad9 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -944,7 +944,6 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
/* The JIT is tested & working on x86 Mac */
#elif CPU(X86) && PLATFORM(MAC)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(ARM_THUMB2) && PLATFORM(IPHONE)
#define ENABLE_JIT 1
/* The JIT is tested & working on Android */
@@ -960,16 +959,12 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define ENABLE_JIT 1
#elif CPU(X86) && OS(DARWIN)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
#elif CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#elif CPU(ARM_TRADITIONAL) && OS(LINUX)
@@ -978,7 +973,6 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define ENABLE_JIT 1
#elif CPU(MIPS) && OS(LINUX)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 0
#endif
#endif /* PLATFORM(QT) */
@@ -1138,4 +1132,11 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WTF_USE_PLATFORM_STRATEGIES 1
#endif
+/* Geolocation request policy. pre-emptive policy is to acquire user permission before acquiring location.
+ Client based implementations will have option to choose between pre-emptive and nonpre-emptive permission policy.
+ pre-emptive permission policy is enabled by default for all client-based implementations. */
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#define WTF_USE_PREEMPT_GEOLOCATION_PERMISSION 1
+#endif
+
#endif /* WTF_Platform_h */
diff --git a/JavaScriptCore/wtf/RetainPtr.h b/JavaScriptCore/wtf/RetainPtr.h
index 2768be7..f5a027e 100644
--- a/JavaScriptCore/wtf/RetainPtr.h
+++ b/JavaScriptCore/wtf/RetainPtr.h
@@ -71,7 +71,7 @@ namespace WTF {
PtrType get() const { return m_ptr; }
- PtrType releaseRef() { PtrType tmp = m_ptr; m_ptr = 0; return tmp; } WARN_UNUSED_RETURN;
+ PtrType releaseRef() { PtrType tmp = m_ptr; m_ptr = 0; return tmp; }
PtrType operator->() const { return m_ptr; }
diff --git a/JavaScriptCore/wtf/text/StringImpl.h b/JavaScriptCore/wtf/text/StringImpl.h
index a172e2c..244009f 100644
--- a/JavaScriptCore/wtf/text/StringImpl.h
+++ b/JavaScriptCore/wtf/text/StringImpl.h
@@ -257,37 +257,6 @@ public:
memcpy(destination, source, numCharacters * sizeof(UChar));
}
- PassRefPtr<StringImpl> copyStringWithoutBOMs(bool definitelyHasBOMs, bool& hasBOMs)
- {
- static const UChar byteOrderMark = 0xFEFF;
- size_t i = 0;
- if (!definitelyHasBOMs) {
- hasBOMs = false;
- // ECMA-262 calls for stripping all Cf characters, but we only strip BOM characters.
- // See <https://bugs.webkit.org/show_bug.cgi?id=4931> for details.
- for (; i < m_length; i++) {
- if (UNLIKELY(m_data[i] == byteOrderMark)) {
- hasBOMs = true;
- break;
- }
- }
- if (!hasBOMs)
- return this;
- }
- Vector<UChar> result;
- result.reserveInitialCapacity(m_length);
- size_t firstBOM = i;
- i = 0;
- for (; i < firstBOM; i++)
- result.append(m_data[i]);
- for (; i < m_length; i++) {
- UChar c = m_data[i];
- if (c != byteOrderMark)
- result.append(c);
- }
- return StringImpl::adopt(result);
- }
-
// Returns a StringImpl suitable for use on another thread.
PassRefPtr<StringImpl> crossThreadString();
// Makes a deep copy. Helpful only if you need to use a String on another thread
diff --git a/JavaScriptCore/yarr/RegexJIT.cpp b/JavaScriptCore/yarr/RegexJIT.cpp
index 68d3803..609417f 100644
--- a/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/JavaScriptCore/yarr/RegexJIT.cpp
@@ -1489,7 +1489,7 @@ void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const
return;
numSubpatterns = pattern.m_numSubpatterns;
- if (!pattern.m_containsBackreferences) {
+ if (!pattern.m_containsBackreferences && globalData->canUseJIT()) {
RegexGenerator generator(pattern);
generator.compile(globalData, jitObject);
if (!generator.shouldFallBack())
diff --git a/LayoutTests/fast/events/touch/touch-active-state-expected.txt b/LayoutTests/fast/events/touch/touch-active-state-expected.txt
new file mode 100644
index 0000000..1c9c36f
--- /dev/null
+++ b/LayoutTests/fast/events/touch/touch-active-state-expected.txt
@@ -0,0 +1,9 @@
+Test touches set the active state.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/events/touch/touch-active-state.html b/LayoutTests/fast/events/touch/touch-active-state.html
new file mode 100644
index 0000000..8b1fe29
--- /dev/null
+++ b/LayoutTests/fast/events/touch/touch-active-state.html
@@ -0,0 +1,48 @@
+<html>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../../js/resources/js-test-post-function.js"></script>
+<style type="text/css">
+#box {
+ background-color:blue;
+ width:100px;
+ height:100px;
+}
+
+#box:active {
+ visibility:hidden;
+}
+
+</style>
+<body onload="runTest();">
+<div id="box" ontouchstart="testComplete();">FAIL</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script type="text/javascript">
+description('Test touches set the active state.');
+
+function testComplete(event)
+{
+ isSuccessfullyParsed();
+ layoutTestController.notifyDone();
+}
+
+function runTest()
+{
+ if (window.eventSender) {
+ // Touch the center of the div.
+ eventSender.addTouchPoint(50, 50);
+ eventSender.touchStart();
+ } else
+ debug('This test requires DRT.');
+}
+
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js
index 6647798..93c3cb6 100644
--- a/LayoutTests/fast/js/resources/js-test-pre.js
+++ b/LayoutTests/fast/js/resources/js-test-pre.js
@@ -1,5 +1,6 @@
+// svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump text + pixel results
if (window.layoutTestController)
- layoutTestController.dumpAsText();
+ layoutTestController.dumpAsText(window.enablePixelTesting);
function description(msg)
{
@@ -218,6 +219,26 @@ function shouldBeUndefined(_a)
testFailed(_a + " should be undefined. Was " + _av);
}
+function shouldBeGreaterThanOrEqual(_a, _b) {
+ if (typeof _a != "string" || typeof _b != "string")
+ debug("WARN: shouldBeGreaterThanOrEqual expects string arguments");
+
+ var exception;
+ var _av;
+ try {
+ _av = eval(_a);
+ } catch (e) {
+ exception = e;
+ }
+ var _bv = eval(_b);
+
+ if (exception)
+ testFailed(_a + " should be >= " + _b + ". Threw exception " + exception);
+ else if (typeof _av == "undefined" || _av < _bv)
+ testFailed(_a + " should be >= " + _b + ". Was " + _av + " (of type " + typeof _av + ").");
+ else
+ testPassed(_a + " is >= " + _b);
+}
function shouldThrow(_a, _e)
{
diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
index 4681355..b4bbc3c 100644
--- a/SunSpider/ChangeLog
+++ b/SunSpider/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-15 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ http://bugs.webkit.org/show_bug.cgi?id=42406
+ Output location of results file.
+
+ * sunspider:
+
2010-05-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Mark Rowe.
diff --git a/SunSpider/sunspider b/SunSpider/sunspider
index 97a86f1..dedc88f 100755
--- a/SunSpider/sunspider
+++ b/SunSpider/sunspider
@@ -229,6 +229,8 @@ dumpToFile(File::Spec->rel2abs($resultsFile), "$resultDirectory/baseline-filenam
system("$jsShellPath", "-f", $prefixFile, "-f", $resultsFile, "-f", "resources/sunspider-analyze-results.js");
+print("\nResults are located at $resultsFile\n");
+
if ($runShark) {
my $newestMShark = newestFile(".", qr/\.mshark$/);
if ($newestMShark) {
diff --git a/WebCore/Android.jscbindings.mk b/WebCore/Android.jscbindings.mk
index d79ea79..f67fe16 100644
--- a/WebCore/Android.jscbindings.mk
+++ b/WebCore/Android.jscbindings.mk
@@ -81,7 +81,10 @@ LOCAL_SRC_FILES += \
bindings/js/JSCustomPositionErrorCallback.cpp \
bindings/js/JSCustomSQLStatementErrorCallback.cpp \
bindings/js/JSCustomVoidCallback.cpp \
+<<<<<<< HEAD:WebCore/Android.jscbindings.mk
bindings/js/JSDesktopNotificationsCustom.cpp \
+=======
+>>>>>>> webkit.org at r63859:WebCore/Android.jscbindings.mk
bindings/js/JSDOMApplicationCacheCustom.cpp \
bindings/js/JSDOMBinding.cpp \
bindings/js/JSDOMFormDataCustom.cpp \
@@ -93,12 +96,18 @@ LOCAL_SRC_FILES += \
bindings/js/JSDOMWindowBase.cpp \
bindings/js/JSDOMWindowCustom.cpp \
bindings/js/JSDOMWindowShell.cpp \
+<<<<<<< HEAD:WebCore/Android.jscbindings.mk
bindings/js/JSDOMWrapper.cpp \
+=======
+ bindings/js/JSDatabaseCallback.cpp \
+>>>>>>> webkit.org at r63859:WebCore/Android.jscbindings.mk
bindings/js/JSDataGridColumnListCustom.cpp \
bindings/js/JSDataGridDataSource.cpp \
bindings/js/JSDatabaseCustom.cpp \
bindings/js/JSDatabaseSyncCustom.cpp \
bindings/js/JSDedicatedWorkerContextCustom.cpp \
+ bindings/js/JSDesktopNotificationsCustom.cpp \
+ bindings/js/JSDeviceOrientationEventCustom.cpp \
bindings/js/JSDocumentCustom.cpp \
bindings/js/JSElementCustom.cpp \
bindings/js/JSEventCustom.cpp \
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index df10d8c..a0dafa3 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -24,7 +24,11 @@
##
LOCAL_SRC_FILES := \
+<<<<<<< HEAD:WebCore/Android.mk
bindings/generic/BindingSecurityBase.cpp \
+=======
+ bindings/generic/RuntimeEnabledFeatures.cpp \
+>>>>>>> webkit.org at r63859:WebCore/Android.mk
\
css/CSSBorderImageValue.cpp \
css/CSSCanvasValue.cpp \
@@ -154,6 +158,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
dom/Notation.cpp \
dom/OptionElement.cpp \
dom/OptionGroupElement.cpp \
+ dom/DeviceOrientation.cpp \
dom/DeviceOrientationController.cpp \
dom/DeviceOrientationEvent.cpp \
dom/OverflowEvent.cpp \
@@ -400,6 +405,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
page/SecurityOrigin.cpp \
page/Settings.cpp \
page/SpatialNavigation.cpp \
+ page/SpeechInput.cpp \
page/SuspendableTimer.cpp \
page/Timing.cpp \
page/UserContentURLPattern.cpp \
@@ -918,7 +924,9 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
svg/SVGNumberList.cpp \
svg/SVGPaint.cpp \
svg/SVGParserUtilities.cpp \
+ svg/SVGPathBuilder.cpp \
svg/SVGPathElement.cpp \
+ svg/SVGPathParser.cpp \
svg/SVGPathSegArc.cpp \
svg/SVGPathSegClosePath.cpp \
svg/SVGPathSegCurvetoCubic.cpp \
@@ -929,6 +937,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
svg/SVGPathSegLinetoHorizontal.cpp \
svg/SVGPathSegLinetoVertical.cpp \
svg/SVGPathSegList.cpp \
+ svg/SVGPathSegListBuilder.cpp \
svg/SVGPathSegMoveto.cpp \
svg/SVGPatternElement.cpp \
svg/SVGPointList.cpp \
diff --git a/WebCore/Android.v8bindings.mk b/WebCore/Android.v8bindings.mk
index a64d75e..017bf98 100644
--- a/WebCore/Android.v8bindings.mk
+++ b/WebCore/Android.v8bindings.mk
@@ -119,6 +119,7 @@ LOCAL_SRC_FILES += \
bindings/v8/custom/V8DatabaseCustom.cpp \
bindings/v8/custom/V8DatabaseSyncCustom.cpp \
bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp \
+ bindings/v8/custom/V8DeviceOrientationEventCustom.cpp \
bindings/v8/custom/V8DocumentCustom.cpp \
bindings/v8/custom/V8DocumentLocationCustom.cpp \
bindings/v8/custom/V8ElementCustom.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 957b770..7919317 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -2,6 +2,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}"
"${WEBCORE_DIR}/accessibility"
"${WEBCORE_DIR}/bindings"
+ "${WEBCORE_DIR}/bindings/generic"
"${WEBCORE_DIR}/bindings/js"
"${WEBCORE_DIR}/bridge"
"${WEBCORE_DIR}/bridge/c"
@@ -19,6 +20,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/loader/appcache"
"${WEBCORE_DIR}/loader/archive"
"${WEBCORE_DIR}/loader/icon"
+ "${WEBCORE_DIR}/mathml"
"${WEBCORE_DIR}/notifications"
"${WEBCORE_DIR}/page"
"${WEBCORE_DIR}/page/animation"
@@ -46,6 +48,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/svg/animation"
"${WEBCORE_DIR}/svg/graphics"
"${WEBCORE_DIR}/svg/graphics/filters"
+ "${WEBCORE_DIR}/websockets"
"${WEBCORE_DIR}/workers"
"${WEBCORE_DIR}/xml"
"${JAVASCRIPTCORE_DIR}"
@@ -526,6 +529,8 @@ SET(WebCore_SOURCES
${DERIVED_SOURCES_DIR}/HTMLEntityNames.cpp
${DERIVED_SOURCES_DIR}/HTMLNames.cpp
${DERIVED_SOURCES_DIR}/JSHTMLElementWrapperFactory.cpp
+ ${DERIVED_SOURCES_DIR}/MathMLElementFactory.cpp
+ ${DERIVED_SOURCES_DIR}/MathMLNames.cpp
${DERIVED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp
${DERIVED_SOURCES_DIR}/XMLNames.cpp
${DERIVED_SOURCES_DIR}/XMLNSNames.cpp
@@ -555,6 +560,8 @@ SET(WebCore_SOURCES
bindings/ScriptControllerBase.cpp
+ bindings/generic/RuntimeEnabledFeatures.cpp
+
bindings/js/DOMObjectHashTableMap.cpp
bindings/js/DOMWrapperWorld.cpp
bindings/js/GCController.cpp
@@ -584,6 +591,7 @@ SET(WebCore_SOURCES
bindings/js/JSDataGridDataSource.cpp
bindings/js/JSDebugWrapperSet.cpp
bindings/js/JSDedicatedWorkerContextCustom.cpp
+ bindings/js/JSDeviceOrientationEventCustom.cpp
bindings/js/JSDocumentCustom.cpp
bindings/js/JSDOMApplicationCacheCustom.cpp
bindings/js/JSDOMBinding.cpp
@@ -778,6 +786,7 @@ SET(WebCore_SOURCES
dom/CustomEvent.cpp
dom/DatasetDOMStringMap.cpp
dom/DecodedDataDocumentParser.cpp
+ dom/DeviceOrientation.cpp
dom/DeviceOrientationController.cpp
dom/DeviceOrientationEvent.cpp
dom/Document.cpp
@@ -1110,6 +1119,20 @@ SET(WebCore_SOURCES
loader/icon/PageURLRecord.cpp
loader/loader.cpp
+ mathml/MathMLElement.cpp
+ mathml/MathMLInlineContainerElement.cpp
+ mathml/MathMLMathElement.cpp
+ mathml/MathMLTextElement.cpp
+ mathml/RenderMathMLBlock.cpp
+ mathml/RenderMathMLFraction.cpp
+ mathml/RenderMathMLMath.cpp
+ mathml/RenderMathMLOperator.cpp
+ mathml/RenderMathMLRoot.cpp
+ mathml/RenderMathMLRow.cpp
+ mathml/RenderMathMLSquareRoot.cpp
+ mathml/RenderMathMLSubSup.cpp
+ mathml/RenderMathMLUnderOver.cpp
+
page/BarInfo.cpp
page/Chrome.cpp
page/Console.cpp
@@ -1273,6 +1296,7 @@ SET(WebCore_SOURCES
platform/text/Base64.cpp
platform/text/BidiContext.cpp
+ platform/text/LineEnding.cpp
platform/text/Hyphenation.cpp
platform/text/RegularExpression.cpp
platform/text/SegmentedString.cpp
@@ -1426,6 +1450,7 @@ SET(WebCore_SOURCES
storage/SQLResultSet.cpp
storage/SQLResultSetRowList.cpp
storage/SQLStatement.cpp
+ storage/SQLStatementSync.cpp
storage/SQLTransaction.cpp
storage/SQLTransactionClient.cpp
storage/SQLTransactionCoordinator.cpp
@@ -1629,7 +1654,9 @@ IF (ENABLE_SVG)
svg/SVGNumberList.cpp
svg/SVGPaint.cpp
svg/SVGParserUtilities.cpp
+ svg/SVGPathBuilder.cpp
svg/SVGPathElement.cpp
+ svg/SVGPathParser.cpp
svg/SVGPathSegArc.cpp
svg/SVGPathSegClosePath.cpp
svg/SVGPathSegCurvetoCubic.cpp
@@ -1640,6 +1667,7 @@ IF (ENABLE_SVG)
svg/SVGPathSegLinetoHorizontal.cpp
svg/SVGPathSegLinetoVertical.cpp
svg/SVGPathSegList.cpp
+ svg/SVGPathSegListBuilder.cpp
svg/SVGPathSegMoveto.cpp
svg/SVGPatternElement.cpp
svg/SVGPointList.cpp
@@ -1715,7 +1743,7 @@ FOREACH (_file ${WebCore_IDL_PURE_FILES})
GENERATE_JS_FROM_IDL_PURE(${_file})
ENDFOREACH ()
-GENERATE_INSPECTOR_FROM_IDL(inspector/InspectorFrontend2.idl)
+GENERATE_INSPECTOR_FROM_IDL(inspector/Inspector.idl)
LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES} ${Inspector_IDL_FILES})
@@ -1740,9 +1768,11 @@ ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/platform/graphics/Color.cpp Color
ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp tokenizer.cpp)
ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/LegacyPreloadScanner.cpp HTMLEntityNames.cpp)
ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLEntityParser.cpp HTMLEntityNames.cpp)
+ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLTreeBuilder.cpp MathMLNames.cpp)
ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSStyleSelector.cpp UserAgentStyleSheetsData.cpp UserAgentStyleSheets.h)
GENERATE_DOM_NAMES_FACTORY(HTML ${WEBCORE_DIR}/html/HTMLTagNames.in ${WEBCORE_DIR}/html/HTMLAttributeNames.in "${HTML_FEATURES}")
+GENERATE_DOM_NAMES_FACTORY(MathML ${WEBCORE_DIR}/mathml/mathtags.in ${WEBCORE_DIR}/mathml/mathattrs.in "${MATHML_FEATURES}")
GENERATE_DOM_NAMES_FACTORY(SVG ${WEBCORE_DIR}/svg/svgtags.in ${WEBCORE_DIR}/svg/svgattrs.in "${SVG_FEATURES}")
GENERATE_DOM_NAMES_ONLY(XLink ${WEBCORE_DIR}/svg/xlinkattrs.in)
GENERATE_DOM_NAMES_ONLY(XMLNS ${WEBCORE_DIR}/xml/xmlnsattrs.in)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e0d5843..79eb390 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,5761 @@
+2010-07-21 Bo Liu <boliu@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add chromium WebMediaPlayer to PlatformMedia
+ https://bugs.webkit.org/show_bug.cgi?id=41295
+
+ * platform/graphics/MediaPlayer.h:
+ (WebCore::PlatformMedia::):
+
+2010-07-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Composited layers don't scroll in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42771
+
+ Prep work: FrameView::scrollPositionChanged() sounds like a generic "did scroll" bottleneck,
+ but this is deceiving. It's only every called on one platform (Mac) when the NSScrollView gets
+ scrolled, so rename it to FrameView::scrollPositionChangedViaPlatformWidget().
+
+ * WebCore.exp.in:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollPositionChangedViaPlatformWidget):
+ * page/FrameView.h:
+
+2010-07-21 Peter Beverloo <peter@lvp-media.com>
+
+ Reviewed by Eric Carlson.
+
+ Removed support for the -khtml CSS vendor prefix and limit the
+ -apple prefix to two properties (dashboard-region and line-clamp).
+
+ Test: fast/css/limited-vendor-prefix-behavior.html
+
+ * css/CSSParser.cpp:
+ (WebCore::cssPropertyID):
+
+2010-07-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix the last tree HTML5 tree builder crashes
+ https://bugs.webkit.org/show_bug.cgi?id=42773
+
+ This patch changes the internal representation of a bookmark to handle
+ the case where one of the adjecent entries in the list of active
+ formatting elements is actually a marker.
+
+ After this patch, the bookmarking mechanism isn't as general, but it
+ works for the cases we need in the adoption agency.
+
+ Also, after this patch, there aren't any more known crashers in the
+ HTML5 tree builder. :)
+
+ * html/HTMLFormattingElementList.cpp:
+ (WebCore::HTMLFormattingElementList::bookmarkFor):
+ (WebCore::HTMLFormattingElementList::swapTo):
+ * html/HTMLFormattingElementList.h:
+ (WebCore::HTMLFormattingElementList::Bookmark::Bookmark):
+ (WebCore::HTMLFormattingElementList::Bookmark::moveToAfter):
+ (WebCore::HTMLFormattingElementList::Bookmark::hasBeenMoved):
+ (WebCore::HTMLFormattingElementList::Bookmark::mark):
+ (WebCore::HTMLFormattingElementList::first):
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
+
+2010-07-21 Tony Gentilcore <tonyg@chromium.org>
+
+ Unreviewed build fix.
+
+ Disable overzealous ASSERT
+ https://bugs.webkit.org/show_bug.cgi?id=42775
+
+ No new tests because no changed functionality.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+
+2010-07-21 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Crash in Notification::disconnectFrame() triggered by Frame::lifeSupportTimerFired()
+ https://bugs.webkit.org/show_bug.cgi?id=42534
+
+ Call NotificationsCenter::disconnectFrame() when the frame is disconnected from the page.
+ Calling it from the destructor of Frame is too late and sometimes causes access violation.
+ I was not able to reproduce this crash, so did not add new tests.
+ This patch is based on the error reported in
+ http://code.google.com/p/chromium/issues/detail?id=49323.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::pageDestroyed):
+ * page/DOMWindow.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::pageDestroyed):
+
+2010-07-21 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Don't assert when clicking on a plug-in in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42762
+
+ Remove a now invalid assert and return false instead.
+
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::passMouseDownEventToWidget):
+
+2010-07-21 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [v8] Revert r60670 as it introduced a regression: in some cases named children couldn't be retrieved.
+ https://bugs.webkit.org/show_bug.cgi?id=42766
+
+ See http://code.google.com/p/chromium/issues/detail?id=48804 for more details.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::namedItemAdded):
+ (WebCore::ScriptController::namedItemRemoved):
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::V8DOMWindowShell::updateDocumentWrapperCache):
+ * bindings/v8/V8DOMWindowShell.h:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::instantiateV8Object):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::V8HTMLDocument::namedPropertyDeleter):
+ (WebCore::V8HTMLDocument::namedPropertyGetter):
+ (WebCore::V8HTMLDocument::indexedPropertyGetter):
+ (WebCore::V8HTMLDocument::allAccessorSetter):
+ (WebCore::toV8):
+
+2010-07-21 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Update plug-in proxy backed <video> and <audio> elements.
+ https://bugs.webkit.org/show_bug.cgi?id=42770
+ <rdar://problem/7963467>
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::attributeChanged): Only call m_player->setControls when
+ the 'controls' attribute changes.
+ (WebCore::HTMLMediaElement::createRenderer):
+ (WebCore::HTMLMediaElement::attach): If we have a proxy widget, call the WebFrameLoaderClient's
+ 'hide' and 'show' methods for the media proxy plug-in to make sure we remove and re-add the
+ plug-in's view to the global list of plugin views.
+ (WebCore::HTMLMediaElement::createMediaPlayerProxy): Bail if m_proxyWidget is non-NULL
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyFrameLoaderClient::hideMediaPlayerProxyPlugin): Empty stub method.
+ (WebCore::EmptyFrameLoaderClient::showMediaPlayerProxyPlugin): Ditto.
+
+ * loader/FrameLoader.cpp:
+ * loader/FrameLoaderClient.h:
+ * loader/SubframeLoader.cpp:
+ (WebCore::FrameLoader::loadMediaPlayerProxyPlugin): Always set m_containsPlugIns in loadMediaPlayerProxyPlugin(),
+ even when we don't have a renderer.
+ (WebCore::FrameLoader::hideMediaPlayerProxyPlugin): New, call hideMediaPlayerProxyPlugin.
+ (WebCore::FrameLoader::showMediaPlayerProxyPlugin): New, call showMediaPlayerProxyPlugin.
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::NullMediaPlayerPrivate::setControls):
+ (WebCore::MediaPlayer::setControls): New, pass through to media engine.
+ (WebCore::MediaPlayer::enterFullscreen): Ditto.
+ (WebCore::MediaPlayer::exitFullscreen): Ditto.
+ * platform/graphics/MediaPlayer.h:
+ * platform/graphics/MediaPlayerPrivate.h:
+ (WebCore::MediaPlayerPrivateInterface::setControls):
+ (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
+ (WebCore::MediaPlayerPrivateInterface::exitFullscreen):
+
+2010-07-21 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Make more members of CSSStyleSelector private.
+ https://bugs.webkit.org/show_bug.cgi?id=42757
+
+ No change in behavior, so no new tests.
+
+ * css/CSSStyleSelector.h: Made a publicly-unused methods private.
+
+2010-07-21 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: consider jQuery object to be of array nature.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42758
+
+ * inspector/front-end/InjectedScript.js:
+ (injectedScriptConstructor):
+
+2010-07-21 Alexey Proskuryakov <ap@apple.com>
+
+ Unreviewed Windows build fix.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42717
+ <rdar://problem/7062824> A wrong password entered for site or proxy auth remains in WebCore
+ credential storage, and is sent with subsequent requests
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Don't use that direct a
+ copy/paste, oops!
+
+2010-07-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ When GraphicsLayer::contentsOrientation() is CompositingCoordinatesBottomUp, need to flip repaint rects
+ https://bugs.webkit.org/show_bug.cgi?id=42662
+
+ If the contentsOrientation() on a GraphicsLayer is CompositingCoordinatesBottomUp, then we
+ need to flip the rects passed to setNeedsDisplayInRect:.
+
+ Avoid writing this code twice by making a bare function to share code
+ between WebLayer and WebTiledLayer. Convert the existing +drawContents:ofLayer:intoContext:
+ class method into a bare function, because the Obj-C calling overhead doesn't buy us anything.
+
+ Take out an assertion in GraphicsLayerCA::updateContentsTransform() that is not
+ correct.
+
+ No new tests because no layers use bottom-up contents at present.
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::updateContentsTransform):
+ * platform/graphics/mac/WebLayer.h:
+ * platform/graphics/mac/WebLayer.mm:
+ (drawLayerContents):
+ (setLayerNeedsDisplayInRect):
+ (-[WebLayer setNeedsDisplayInRect:]):
+ (-[WebLayer drawInContext:]):
+ * platform/graphics/mac/WebTiledLayer.mm:
+ (-[WebTiledLayer setNeedsDisplayInRect:]):
+ (-[WebTiledLayer drawInContext:]):
+
+2010-07-20 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42717
+ <rdar://problem/7062824> A wrong password entered for site or proxy auth remains in WebCore
+ credential storage, and is sent with subsequent requests
+
+ Tests: http/tests/security/401-logout/401-logout.php
+ http/tests/xmlhttprequest/remember-bad-password.html
+
+ * platform/network/CredentialStorage.cpp: (WebCore::CredentialStorage::remove):
+ * platform/network/CredentialStorage.h:
+ Added a way to remove stored credentials for a given protection space.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ Remove stored credentials if they didn't work the first time.
+
+2010-07-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit on Windows should build optionally with an unversioned ICU DLL
+ https://bugs.webkit.org/show_bug.cgi?id=42722
+ <rdar://problem/8211767> WebKit needs to link against unversioned ICU
+
+ To get the proper value for U_DISABLE_RENAMING into all source files, we force
+ the include of ICUVersion.h (our generated header) via the compiler options.
+
+ * WebCore.vcproj/WebCore.vcproj:
+ Add forced include of ICUVersion.h.
+ * WebCore.vcproj/WebCoreCommon.vsprops: Add forced include of ICUVersion.h.
+
+2010-07-21 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: Serialization to JSON in InspectorValue works incorrect
+ if comma is assigned as decimal separator. Windows with Russian locale.
+ https://bugs.webkit.org/show_bug.cgi?id=42755
+
+ * inspector/InspectorValues.cpp:
+ (WebCore::InspectorBasicValue::writeJSON):
+
+2010-07-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ CSS rotation transform can cause elements with certain styles to vanish during rotation.
+ https://bugs.webkit.org/show_bug.cgi?id=42579
+
+ Remove some untested, broken code that, as far as I can tell, could never get hit.
+ Use the correct rect for the PaintInfo so that zero-sized elements with overflow:hidden
+ but a border paint correctly.
+
+ Test: compositing/overflow/zero-size-overflow.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::paintIntoLayer):
+
+2010-07-21 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [QT] Leak and few more fixes to qt port of geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=42753
+
+ Fixes memory leak and default values set to attributes.
+
+ Memory leak fix no new test case added.
+
+ * platform/qt/GeolocationServiceQt.cpp: Added.
+ (WebCore::GeolocationServiceQt::~GeolocationServiceQt):
+ (WebCore::GeolocationServiceQt::positionUpdated):
+
+2010-07-21 Kristian Amlie <kristian.amlie@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added automatic sqlite extraction for Symbian to QtWebKit.
+
+ Also added sqlite detection in case sqlite is not present in the SDK.
+ This is possible if WebKit is compiled standalone.
+
+ The inclusion part is a consequence of commit c578c6c1d6d in the Qt
+ repository. It will not work on Qt versions < 4.7.1, but that is ok,
+ since the only build system it will affect is marked as experimental
+ in the whole 4.7 series.
+
+ * WebCore.pro:
+
+2010-07-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Associate elements with the active form
+ https://bugs.webkit.org/show_bug.cgi?id=42728
+
+ This patch fixes fast/forms/formmove3.html. The test still doesn't
+ pass due to some render tree differences, but it works as intended now.
+
+ To fix this test, I needed to deviate from the spec slight. Minefield
+ seems to have the same deviation:
+ - http://www.w3.org/Bugs/Public/show_bug.cgi?id=10216
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::takeForm):
+ (WebCore::HTMLConstructionSite::setForm):
+ (WebCore::HTMLConstructionSite::createHTMLElement):
+ * html/HTMLConstructionSite.h:
+ (WebCore::HTMLConstructionSite::form):
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+
+2010-07-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ The adoption agency doesn't properly attach()
+ https://bugs.webkit.org/show_bug.cgi?id=42727
+
+ The adoption agency is transliterated rather directly from the spec,
+ but it misses some of the WebKit-specific machinations, such as
+ attaching to the render tree.
+
+ The algorithm, as written, is a minor layer violation. I've added to
+ the problem by calling attach() from HTMLTreeBuilder (even though
+ that's the job of the HTMLConstructionSite). We'll need to clean up
+ the layering a bit at some point.
+
+ This patch half fixes fast/forms/formmove3.html. Hopefully I'll finish
+ fixing it in the next patch.
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
+
+2010-07-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ <input> elements with no type attribute should be foster parented
+ https://bugs.webkit.org/show_bug.cgi?id=42725
+
+ Fix spec transcription error.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTagForInTable):
+
+2010-07-21 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Fix fast/css/last-child-style-sharing.html
+ https://bugs.webkit.org/show_bug.cgi?id=42731
+
+ Prior to this patch, we weren't calling finishParsingChildren on the
+ body element. We need a more systematic way of catching these bugs.
+
+ * html/HTMLElementStack.cpp:
+ (WebCore::HTMLElementStack::popAll):
+ * html/HTMLElementStack.h:
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processEndOfFile):
+
+2010-07-21 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Runtime feature switch for device orientation
+ https://bugs.webkit.org/show_bug.cgi?id=42265
+
+ Add a runtime feature switch that decides whether device orientation
+ events are available or not. Defaults to true.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops: Add bindings/generic to include path.
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
+ (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::removeAllEventListeners):
+ * page/DOMWindow.idl:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+
+2010-07-21 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed Nikolas Zimmermann.
+
+ SVGFilterElement & SVGFE*Element don't support dynamic invalidation, when attributes change
+ https://bugs.webkit.org/show_bug.cgi?id=42244
+
+ The implementation was done by Nikolas Zimmermann before, but
+ there was no tests for it. The patch also implements the simple
+ setFilterRes method.
+
+ Tests: svg/dynamic-updates/SVGFilterElement-dom-filterRes-attr.html
+ svg/dynamic-updates/SVGFilterElement-dom-filterUnits-attr.html
+ svg/dynamic-updates/SVGFilterElement-dom-height-attr.html
+ svg/dynamic-updates/SVGFilterElement-dom-primitiveUnits-attr.html
+ svg/dynamic-updates/SVGFilterElement-dom-width-attr.html
+ svg/dynamic-updates/SVGFilterElement-dom-x-attr.html
+ svg/dynamic-updates/SVGFilterElement-dom-y-attr.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-filterRes-call.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-filterResX-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-filterResY-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-filterUnits-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-height-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-primitiveUnits-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-width-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-x-prop.html
+ svg/dynamic-updates/SVGFilterElement-svgdom-y-prop.html
+
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::setFilterRes):
+ (WebCore::SVGFilterElement::svgAttributeChanged):
+ (WebCore::SVGFilterElement::childrenChanged):
+ * svg/SVGFilterElement.h:
+
+2010-07-21 Ben Murdoch <benm@google.com>
+
+ Unreviewed, build fix.
+
+ Forgot to update the role of HitTestRequest.h in
+ the xcode project after landing patch from
+ https://bugs.webkit.org/show_bug.cgi?id=39493
+
+ * WebCore.xcodeproj/project.pbxproj: Make HitTestRequest.h
+ private so it can be included in WebKit by EventHandler.h
+ which is already private..
+
+2010-07-20 Ben Murdoch <benm@google.com>
+
+ Reviewed by Steve Block.
+
+ Touch events do not affect the :active CSS state
+ https://bugs.webkit.org/show_bug.cgi?id=39493
+
+ Test: fast/events/touch/touch-active-state.html
+
+ * WebCore.exp.in: Update exports for new signature of
+ hitTestResultAtPoint.
+ * WebCore.order: ditto.
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::EventHandler):
+ (WebCore::EventHandler::hitTestResultAtPoint): Pass the type
+ of the hit test to perform as a parameter with a default
+ value rather than harcoding it in the function body.
+ (WebCore::EventHandler::handleMouseMoveEvent): Do not modiify
+ the active element during a mouse move if the user is
+ touching the screen.
+ (WebCore::EventHandler::handleTouchEvent): Set the correct
+ type of hit test to perform depending on the type of the
+ touch event we are handling.
+ * page/EventHandler.h: Update the signature of hitTestResultAtPoint.
+
+2010-07-20 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ console.assert should include stack trace with line numbers.
+ https://bugs.webkit.org/show_bug.cgi?id=22556
+
+ Test: inspector/console-assert.html
+
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::getTopFrameLocation):
+ (WebCore::toScriptCallFramesVector):
+ (WebCore::ScriptCallStack::create):
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptCallStack.h:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::setCaptureCallStackForUncaughtExceptions):
+ * bindings/v8/custom/V8ConsoleCustom.cpp:
+ (WebCore::V8Console::traceCallback):
+ (WebCore::V8Console::assertCallback):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addMessageToConsole):
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._formatMessage):
+ (WebInspector.ConsoleMessage.prototype.toMessageElement):
+ * page/Console.cpp:
+ (WebCore::Console::lastWMLErrorMessage):
+ * page/Console.idl:
+
+2010-07-20 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Kent Tamura.
+
+ [EFL] Use log functions instead of fprintf
+ https://bugs.webkit.org/show_bug.cgi?id=42576
+
+ Use LOG and LOG_ERROR instead of fprintf.
+
+ No new tests, no new functionality.
+
+ * platform/efl/WidgetEfl.cpp:
+ (WebCore::Widget::applyFallbackCursor):
+
+2010-07-20 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: the bindings generation helper script can be
+ simplified a bit. Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=42523
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gyp/scripts/rule_binding.py:
+ * bindings/scripts/CodeGenerator.pm:
+ * bindings/scripts/CodeGeneratorCPP.pm:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/generate-bindings.pl:
+ * inspector/CodeGeneratorInspector.pm:
+
+2010-07-20 Steve Falkenburg <sfalken@apple.com>
+
+ Re-save vsprops file after no-op edit in Visual Studio
+ to fix manual edit issues.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2010-07-20 Steve Falkenburg <sfalken@apple.com>
+
+ Re-save vcproj file after no-op edit in Visual Studio
+ to fix manual edit issues.
+
+ * WebCore.vcproj/WebCore.vcproj:
+
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Include attributes when reconstructing elements in HTML5 tree builder
+ https://bugs.webkit.org/show_bug.cgi?id=42594
+
+ Remove FIXME now that we have a test.
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::createHTMLElementFromElementRecord):
+
+2010-07-20 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady Eidson.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42719
+ Make Acid2 pass in WebKit2
+
+ * WebCore.exp.in: Update exported functions.
+
+2010-07-20 Gavin Peters <gavinp@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ prefetch categorization is exactly wrong
+ https://bugs.webkit.org/show_bug.cgi?id=42651
+
+ While I was in the area, I saw that CachedResource::schedule() was dead, so I have removed it.
+
+ Test: fast/dom/HTMLLinkElement/onload-completion-test.html
+
+ * loader/CachedCSSStyleSheet.h:
+ * loader/CachedFont.h:
+ * loader/CachedImage.h:
+ * loader/CachedResource.cpp:
+ * loader/CachedResource.h:
+ (WebCore::CachedResource::isPrefetch):
+ * loader/CachedScript.h:
+ * loader/CachedXBLDocument.h:
+ * loader/CachedXSLStyleSheet.h:
+
+2010-07-20 James Hawkins <jhawkins@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Expose the form submission trigger on the HTMLFormElement object. This
+ is used to verify that the user submitted the form instead of JS when
+ saving form data in Chrome AutoFill.
+ https://bugs.webkit.org/show_bug.cgi?id=42479
+
+ No new tests as this is only used by the Chromium WebKit API.
+
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::HTMLFormElement):
+ (WebCore::HTMLFormElement::submit):
+ (WebCore::HTMLFormElement::reset):
+ (WebCore::HTMLFormElement::submissionTrigger):
+ * html/HTMLFormElement.h:
+
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Unreviewed.
+
+ Fix fast/dom/title-content-write-set.html for HTML5 tree builder
+ https://bugs.webkit.org/show_bug.cgi?id=42668
+
+ Address some late-breaking review comments.
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::appendDataCommon):
+ (WebCore::CharacterData::parserAppendData):
+ (WebCore::CharacterData::appendData):
+ (WebCore::CharacterData::insertData):
+ (WebCore::CharacterData::replaceData):
+ * dom/CharacterData.h:
+
+2010-07-20 Daniel Erat <derat@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Subpixel rendering always disabled for Chromium Linux
+ https://bugs.webkit.org/show_bug.cgi?id=42220
+
+ Explicitly initialize global Chromium Linux isSkiaSubpixelGlyphs
+ flag to false for clarity.
+
+ * platform/graphics/chromium/FontPlatformDataLinux.cpp:
+
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix fast/dom/title-content-write-set.html for HTML5 tree builder
+ https://bugs.webkit.org/show_bug.cgi?id=42668
+
+ When I split parserAppendData from appendData, it was tempting to cut
+ the function at dispatchModifiedEvent, but that's not quite right. We
+ still need to notify the parent that it's children have changed.
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::appendDataCommon):
+ (WebCore::CharacterData::parserAppendData):
+ (WebCore::CharacterData::appendData):
+ * dom/CharacterData.h:
+
+2010-07-20 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ CrashTracer: [USER] 300 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityTable::isTableExposableThroughAccessibility + 573
+ https://bugs.webkit.org/show_bug.cgi?id=42652
+
+ When a table cell accesses its parent table, we should not use getOrCreate, because creating an AXTable inspects its render tree state
+ which may be out of date, leading to a crash.
+ By using only get(), it implies that the AXTable must be created before AXTableCells. This should
+ always be the case when AT clients access a table.
+
+ Test: accessibility/updating-attribute-in-table-causes-crash.html
+
+ * accessibility/AccessibilityTableCell.cpp:
+ (WebCore::AccessibilityTableCell::parentTable):
+
+2010-07-20 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Check the node is a text node before doing the static cast
+ for editing commands.
+ https://bugs.webkit.org/show_bug.cgi?id=42655
+
+ Test: editing/execCommand/editing-nontext-node-crash.xhtml
+
+ * editing/DeleteSelectionCommand.cpp:
+ (WebCore::DeleteSelectionCommand::fixupWhitespace):
+ * editing/InsertLineBreakCommand.cpp:
+ (WebCore::InsertLineBreakCommand::doApply):
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::doApply):
+
+2010-07-20 Leo Yang <leo.yang@torchmobile.com.cn>
+
+ Reviewed by David Hyatt.
+
+ Don't merge Anonymous block whose first child is inline run-in.
+ Make run-in recalculate its style after its renderer is destroyed.
+ https://bugs.webkit.org/show_bug.cgi?id=41375.
+
+ Test: fast/runin/crash-when-reparent-sibling.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::canMergeContiguousAnonymousBlocks):
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::destroyLeftoverChildren):
+
+2010-07-20 Steve Block <steveblock@google.com>
+
+ Unreviewed Qt test fix.
+
+ Qt should not use PREEMPT_GEOLOCATION_PERMISSION until Bug 42027 is fixed.
+ https://bugs.webkit.org/show_bug.cgi?id=42068
+
+ No new tests, test fix only.
+
+ * WebCore.pro:
+
+2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63764.
+ http://trac.webkit.org/changeset/63764
+ https://bugs.webkit.org/show_bug.cgi?id=42658
+
+ have broken Chromium linux build (Requested by loislo on
+ #webkit).
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gyp/scripts/rule_binding.py:
+ * bindings/scripts/CodeGenerator.pm:
+ * bindings/scripts/CodeGeneratorCPP.pm:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/generate-bindings.pl:
+ * inspector/CodeGeneratorInspector.pm:
+
+2010-07-20 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41531
+ Asynchronous cross origin XMLHttpRequest doesn't expose 401 response when withCredentials is false
+
+ This doesn't match Firefox, but it matches our sync case, XHR2 spec and common sense.
+
+ Test: http/tests/xmlhttprequest/cross-origin-no-authorization.html (updated results).
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::didReceiveAuthenticationChallenge): Instead of canceling
+ the request, continue without credentials - if the platform has a necessary method on
+ ResourceHandle.
+
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Don't ask resource loader
+ client for credentials if subresource loader client already took care of those.
+
+ * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::hasAuthenticationChallenge):
+ * platform/network/ResourceHandle.h:
+ Added an accessor to check whether ResourceHandle is currently waiting for credentials.
+
+2010-07-20 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Unreviewed build fix.
+
+ Build SVGPathBuilder, SVGPathParser and SVGPathSegListBuilder.
+ Add websockets include directory.
+
+ The EFL port doesn't yet support automated tests.
+
+ * CMakeLists.txt:
+
+2010-07-20 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: the bindings generation helper script can be
+ simplified a bit. Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=42523
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gyp/scripts/rule_binding.py:
+ * bindings/scripts/CodeGenerator.pm:
+ * bindings/scripts/CodeGeneratorCPP.pm:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/generate-bindings.pl:
+ * inspector/CodeGeneratorInspector.pm:
+
+2010-07-20 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ WebScriptObject Should Allow Safely Checking For Key Existence
+ https://bugs.webkit.org/show_bug.cgi?id=42613
+
+ Test: platform/mac/fast/objc/webScriptObject-hasWebScriptKey.html
+
+ Add private API "hasWebScriptKey" to check for key existence in
+ a WebScriptObject. Like JavaScript's `in` syntax. This is intended
+ to be made public eventually.
+
+ * bindings/objc/WebScriptObject.mm:
+ (-[WebScriptObject hasWebScriptKey:]):
+ * bindings/objc/WebScriptObjectPrivate.h:
+
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ HTML5 tree builder needs to call dispatchDocumentElementAvailable
+ https://bugs.webkit.org/show_bug.cgi?id=42654
+
+ This patch fixes the follout LayoutTests with --html5-treebuilder:
+ - userscripts/script-not-run-for-fragments.html
+ - userscripts/script-run-at-start.html
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::HTMLConstructionSite):
+ (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
+ (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
+ (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
+ * html/HTMLConstructionSite.h:
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
+
+2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Steve Block.
+
+ Need to be able to configure Geolocation policy regarding user permissions
+ https://bugs.webkit.org/show_bug.cgi?id=42068
+
+ Introducing new USE() flag PREEMPT_GEOLOCATION_PREMISSION using which
+ acquires user permission first before starting location service
+
+ This change does not introduce any change in behavior for any platform. So there are no new tests
+ added.
+
+ * WebCore.pro:
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::startRequest):
+ (WebCore::Geolocation::setIsAllowed):
+ (WebCore::Geolocation::startUpdating):
+ * page/Geolocation.h:
+
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ HTML5 tree builder should restore form state
+ https://bugs.webkit.org/show_bug.cgi?id=42644
+
+ We need to tell self-closing tags that we're done parsing their
+ children. This patch fixes the following LayoutTests when run with
+ --html5-treebuilder:
+
+ fast/forms/button-state-restore.html
+ fast/forms/state-restore-to-non-autocomplete-form.html
+ fast/forms/state-restore-to-non-edited-controls.html
+ fast/history/saves-state-after-fragment-nav.html
+ http/tests/navigation/restore-form-state-https.html
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
+
+2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63750.
+ http://trac.webkit.org/changeset/63750
+ https://bugs.webkit.org/show_bug.cgi?id=42648
+
+ This revision breaks the windows builds (Requested by
+ hwennborg on #webkit).
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::removeAllEventListeners):
+ * page/DOMWindow.idl:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+
+2010-07-20 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: It is possible to show full call stack instead of top frame for Caller
+ and Call Site properties in Timeline panel.
+ https://bugs.webkit.org/show_bug.cgi?id=42620
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.FormattedRecord):
+ (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
+ (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
+ (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendElementRow):
+ (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow):
+ (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace):
+ * inspector/front-end/inspector.css:
+ (.timeline-details):
+ (.timeline-function-name):
+ (.timeline-stacktrace-title):
+
+2010-07-20 Leon Clarke <leonclarke@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Make things compile again when the inspector is disabled, following
+ recent inspector improvements.
+ https://bugs.webkit.org/show_bug.cgi?id=42632
+
+ No new tests. Fixing a build break.
+
+
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::stackTrace):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::didInsertDOMNode):
+ (WebCore::InspectorController::didRemoveDOMNode):
+ (WebCore::InspectorController::didModifyDOMAttr):
+ * inspector/InspectorDOMAgent.h:
+ * loader/appcache/ApplicationCacheGroup.cpp:
+
+2010-07-20 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [v8] Allow handles to be disposed and WebKit objects to be dereferenced even if their map is already destroyed.
+ https://bugs.webkit.org/show_bug.cgi?id=42634
+
+ Currently DOMDataStore could be destroyed even if it has some mappings (it gets destroyed
+ when its isolated context gets GCed). However in this case, handles allocated for
+ such objects would never be disposed as we require presence of mapping from wrapped
+ WebKit object to handle being collected in the map and now map is gone. That leads to
+ zombie objects in both WebKit (wrapped WebKit object doesn't get dereferenced) and V8
+ (both handle and V8 wrapper object could not be destroyed).
+
+ See http://code.google.com/p/chromium/issues/detail?id=47125 for further discussion.
+
+ * bindings/v8/DOMData.h:
+ (WebCore::DOMData::handleWeakObject):
+ * bindings/v8/DOMDataStore.cpp:
+ (WebCore::DOMDataStore::weakNodeCallback):
+ * bindings/v8/V8DOMMap.h:
+ (WebCore::WeakReferenceMap::~WeakReferenceMap):
+
+2010-07-20 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Runtime feature switch for device orientation
+ https://bugs.webkit.org/show_bug.cgi?id=42265
+
+ Add a runtime feature switch that decides whether device orientation
+ events are available or not. Defaults to true.
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setDeviceOrientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceOrientationEnabled):
+ (WebCore::RuntimeEnabledFeatures::deviceOrientationEventEnabled):
+ (WebCore::RuntimeEnabledFeatures::ondeviceorientationEnabled):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::removeAllEventListeners):
+ * page/DOMWindow.idl:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+
+2010-07-20 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fixed a crash when deeply nested CSS selector is used.
+ https://bugs.webkit.org/show_bug.cgi?id=41129
+
+ This patch deletes CSSSelectors iteratively so that it doesn't cause stack overflow.
+
+ Test: fast/css/css-selector-deeply-nested.html
+
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelectorBag::~CSSSelectorBag):
+ (WebCore::CSSSelectorBag::isEmpty):
+ (WebCore::CSSSelectorBag::append):
+ (WebCore::CSSSelectorBag::takeAny):
+ (WebCore::CSSSelector::~CSSSelector):
+ (WebCore::CSSSelector::specificity):
+ * css/CSSSelector.h:
+
+2010-07-20 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [v8] Web Inspector: inspected page renderer crashes when inspected page has JS syntax error
+ https://bugs.webkit.org/show_bug.cgi?id=42642
+
+ * bindings/v8/V8ConsoleMessage.cpp:
+ (WebCore::V8ConsoleMessage::handler):
+
+2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63742.
+ http://trac.webkit.org/changeset/63742
+ https://bugs.webkit.org/show_bug.cgi?id=42641
+
+ Broke Leopard Intel build. (Requested by bbandix on #webkit).
+
+ * WebCore.pro:
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::startRequest):
+ (WebCore::Geolocation::setIsAllowed):
+ (WebCore::Geolocation::startUpdating):
+ * page/Geolocation.h:
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * WebCore.vcproj/WebCore.vcproj: Fixed case of "Name" attribute.
+
+2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Steve Block.
+
+ Need to be able to configure Geolocation policy regarding user permissions
+ https://bugs.webkit.org/show_bug.cgi?id=42068
+
+ Introducing new USE() flag PREEMPT_GEOLOCATION_PREMISSION using which
+ acquires user permission first before starting location service
+
+ This change does not introduce any change in behavior for any platform. So there are no new tests
+ added.
+
+ * WebCore.pro:
+ * page/Geolocation.cpp:
+ (WebCore::Geolocation::startRequest):
+ (WebCore::Geolocation::setIsAllowed):
+ (WebCore::Geolocation::startUpdating):
+ * page/Geolocation.h:
+
+2010-07-20 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Inspector: Resources Search Should Search Only Filtered Resources
+ https://bugs.webkit.org/show_bug.cgi?id=28290
+
+ * inspector/front-end/AbstractTimelinePanel.js:
+ (WebInspector.AbstractTimelinePanel.prototype._updateFilter):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype.get searchableViews):
+ * inspector/front-end/inspector.js:
+ (WebInspector.performSearch):
+ (WebInspector.doPerformSearch):
+
+2010-07-20 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Incorrect absolute URLs in tooltips of links in the ElementsTreeOutline
+ https://bugs.webkit.org/show_bug.cgi?id=42626
+
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._attributeHTML):
+
+2010-07-20 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed comment fix. The comment in IDL should be //, not # .
+
+ Code generator: ensure generated constants match their corresponding enums.
+ https://bugs.webkit.org/show_bug.cgi?id=42250
+
+ * dom/OverflowEvent.idl:
+
+2010-07-20 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Add WebCore/bindings/generic/RuntimeEnabledFeatures.cpp to build files
+ https://bugs.webkit.org/show_bug.cgi?id=42380
+
+ RuntimeEnabledFeatures.cpp and .h were moved from bindings/v8 to
+ bindings/generic a while a go (in r54593), but need to
+ be added to the build in order to be used.
+
+ No new functionality so no new tests.
+
+ * Android.mk:
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * websockets/WebSocket.cpp: Remove #if USE(V8), as RuntimeEnabledFeatures.cpp is no longer V8-only.
+ * websockets/WebSocket.h: Ditto.
+
+2010-07-20 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ clean up style in ClipboardWin and PasteboardWin
+ https://bugs.webkit.org/show_bug.cgi?id=42609
+
+ No new tests since this is just a style cleanup.
+
+ * platform/win/ClipboardUtilitiesWin.cpp:
+ (WebCore::createGlobalData):
+ (WebCore::markupToCFHTML):
+ (WebCore::getURL):
+ (WebCore::getPlainText):
+ (WebCore::getTextHTML):
+ (WebCore::fragmentFromFilenames):
+ (WebCore::containsFilenames):
+ (WebCore::fragmentFromCFHTML):
+ (WebCore::fragmentFromHTML):
+ * platform/win/ClipboardUtilitiesWin.h:
+ * platform/win/ClipboardWin.cpp:
+ (WebCore::pathRemoveBadFSCharacters):
+ (WebCore::createGlobalHDropContent):
+ (WebCore::createGlobalUrlFileDescriptor):
+ (WebCore::writeURL):
+ (WebCore::ClipboardWin::clearData):
+ (WebCore::ClipboardWin::clearAllData):
+ (WebCore::ClipboardWin::getData):
+ (WebCore::ClipboardWin::types):
+ (WebCore::ClipboardWin::declareAndWriteDragImage):
+ (WebCore::ClipboardWin::writeRange):
+ * platform/win/ClipboardWin.h:
+ (WebCore::ClipboardWin::create):
+ (WebCore::ClipboardWin::dataObject):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::PasteboardOwnerWndProc):
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writeURL):
+ (WebCore::Pasteboard::plainText):
+ (WebCore::Pasteboard::documentFragment):
+
+2010-07-20 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: jump to source is broken for call frames logged by console.trace
+ https://bugs.webkit.org/show_bug.cgi?id=42619
+
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement):
+ * inspector/front-end/treeoutline.js: allow passing HTML element as a title.
+ (TreeElement.prototype.set title):
+ (TreeElement.prototype.set shouldRefreshChildren):
+ (TreeElement.prototype._setListItemNodeContent):
+ (TreeElement.prototype._attach):
+
+2010-07-20 Tony Chang <tony@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ [chromium] crash in Position::getInlineBoxAndOffset
+ https://bugs.webkit.org/show_bug.cgi?id=42202
+
+ Test: editing/selection/firstRect-crash.html
+ Manual test: win/contextmenu-key2.html
+
+ * page/EventHandler.cpp: Code no longer needed
+ * page/Frame.cpp:
+ (WebCore::Frame::firstRectForRange): Normalize Positions to VisiblePositions because
+ Positions may be pointing to nodes that have no renderer. If there's no renderer,
+ getInlineBoxAndOffset will crash.
+
+2010-07-20 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Foster parenting depends on the current element at insertion time
+ https://bugs.webkit.org/show_bug.cgi?id=42599
+
+ We need to consider the current element at insertion-time when deciding
+ whether to redirect insertion to the foster parent. Previously, we
+ were considering the current element *both* at insertion-time and at
+ the time we created the guard.
+
+ * html/HTMLConstructionSite.h:
+ (WebCore::HTMLConstructionSite::RedirectToFosterParentGuard::RedirectToFosterParentGuard):
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTagForInTable):
+ (WebCore::HTMLTreeBuilder::processEndTagForInTable):
+ (WebCore::HTMLTreeBuilder::defaultForInTableText):
+
+2010-07-20 Matthew Delaney <mdelaney@apple.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Failing 2d.path.stroke.prune.curve philip canvas test
+ https://bugs.webkit.org/show_bug.cgi?id=42190
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::closePath): Added check to make sure there's a non-trivial path to close. Since there is currently no way to check if the current point is the start point, or similarly if there is only 1 point in the current subpath (since these are both sufficient conditions for a trivial subpath), then checking that the bounding rectangle has both zero width and height proves also to be a sufficient condition for a trivial path.
+ (WebCore::CanvasRenderingContext2D::quadraticCurveTo): Added in simple bounds as per the spec.
+ (WebCore::CanvasRenderingContext2D::bezierCurveTo): Added in simple bounds as per the spec.
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::Path::closeSubpath): Moved the check for an empty path up on level to make it platform independent and remove redundancy.
+
+2010-07-19 Victoria Kirst <vrk@google.com>
+
+ Reviewed by David Levin.
+
+ Added a simple implementation of VideoLayerChromium. Uses the
+ LayerChromium::updateTextureRect() to send video frames to the
+ GPU.
+ https://bugs.webkit.org/show_bug.cgi?id=42234
+
+ * WebCore.gypi: Added include for VideoLayerChromium.
+ * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+ (WebCore::GraphicsLayerChromium::setContentsToMedia): Implemented
+ setContentsToMedia, though it does not seem to trigger a repaint
+ correctly.
+ * platform/graphics/chromium/GraphicsLayerChromium.h:
+ * platform/graphics/chromium/VideoLayerChromium.cpp: Added.
+ (WebCore::VideoLayerChromium::create):
+ (WebCore::VideoLayerChromium::VideoLayerChromium):
+ (WebCore::VideoLayerChromium::updateTextureContents):
+ * platform/graphics/chromium/VideoLayerChromium.h: Added.
+ (WebCore::VideoLayerChromium::drawsContent):
+
+2010-07-19 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG CleanUp of SVGPathData parsing
+ https://bugs.webkit.org/show_bug.cgi?id=41410
+
+ Cleanup the parsing code for SVG Paths. Move classes out of the convoluted SVGParserUtilities.cpp
+ in their own files. Make use of WebCore specific objects in parsing code like FloatPoint, AffineTransform,
+ etc. instead of using home-brewn solutions.
+ The SVGPathParser parses a path data string and delivers the parsed segments and values to the SVGPathConsumer.
+ SVGPathConsumer is the base class for SVGPathBuilder and SVGPathSegListBuilder, that either build the platform
+ Path object or a SVGPathSegList out of the segments.
+ We're now directly parsing floats instead of truncating precision to float afterwards.
+
+ SVG Path with an arc with radius of 0 does not render
+ https://bugs.webkit.org/show_bug.cgi?id=40448
+
+ If one of the radii on the elliptic arc are zero, we should draw a line from the starting point to
+ the end point according to the spec. Fixed this bug with this patch, because an is zero check and
+ an DRT check was neccessary with the current clean-up.
+ Extended svg/dom/path-parser.xhml to check the correct behavior.
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/FloatPoint.h:
+ (WebCore::FloatPoint::move): Follow WebKit style and use multiple lines for the function.
+ (WebCore::FloatPoint::scale): Scale FloatPoint.
+ (WebCore::operator+=):
+ (WebCore::operator+): Add two FloatPoints and give back the sum as FloatPoint.
+ * svg/SVGAllInOne.cpp: Added new created files.
+ * svg/SVGAnimateElement.cpp:
+ (WebCore::SVGAnimateElement::calculateFromAndToValues): Use new PathParser to create a PathSegList.
+ * svg/SVGAnimateMotionElement.cpp:
+ (WebCore::SVGAnimateMotionElement::parseMappedAttribute): Use new PathParser to create a Path.
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::parsePathData): Use new PathParser to create a Path.
+ * svg/SVGParserUtilities.cpp:
+ (WebCore::parseArcFlag): Removed parseArcFlag(double&), we parse in float now.
+ * svg/SVGParserUtilities.h: Removed path parsing code and a lot of unneccessary includes.
+ * svg/SVGPathBuilder.cpp: Added.
+ (WebCore::SVGPathBuilder::SVGPathBuilder):
+ (WebCore::SVGPathBuilder::build): Builds a normalized Path.
+ (WebCore::SVGPathBuilder::moveTo):
+ (WebCore::SVGPathBuilder::lineTo):
+ (WebCore::SVGPathBuilder::curveToCubic):
+ (WebCore::SVGPathBuilder::closePath):
+ * svg/SVGPathBuilder.h: Added. We just create normalized Paths, so this functions should never be reached.
+ (WebCore::SVGPathBuilder::lineToHorizontal):
+ (WebCore::SVGPathBuilder::lineToVertical):
+ (WebCore::SVGPathBuilder::curveToCubicSmooth):
+ (WebCore::SVGPathBuilder::curveToQuadratic):
+ (WebCore::SVGPathBuilder::curveToQuadraticSmooth):
+ (WebCore::SVGPathBuilder::arcTo):
+ * svg/SVGPathConsumer.h: Added. Base class of SVGPathBuilder and SVGPathSegListBuilder.
+ (WebCore::):
+ (WebCore::SVGPathConsumer::SVGPathConsumer):
+ (WebCore::SVGPathConsumer::~SVGPathConsumer):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::parseMappedAttribute): Use new PathParser to create a PathSegList.
+ * svg/SVGPathParser.cpp: Added.
+ (WebCore::SVGPathParser::SVGPathParser):
+ (WebCore::SVGPathParser::~SVGPathParser):
+ (WebCore::SVGPathParser::parseClosePathSegment):
+ (WebCore::SVGPathParser::parseMoveToSegment):
+ (WebCore::SVGPathParser::parseLineToSegment):
+ (WebCore::SVGPathParser::parseLineToHorizontalSegment):
+ (WebCore::SVGPathParser::parseLineToVerticalSegment):
+ (WebCore::SVGPathParser::parseCurveToCubicSegment):
+ (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment):
+ (WebCore::SVGPathParser::parseCurveToQuadraticSegment):
+ (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment):
+ (WebCore::SVGPathParser::parseArcToSegment):
+ (WebCore::SVGPathParser::parsePathDataString):
+ (WebCore::SVGPathParser::decomposeArcToCubic): Normalizes an arc to multiple cubic curves.
+ * svg/SVGPathParser.h: Added.
+ * svg/SVGPathSegListBuilder.cpp: Added.
+ (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
+ (WebCore::SVGPathSegListBuilder::build):
+ (WebCore::SVGPathSegListBuilder::moveTo):
+ (WebCore::SVGPathSegListBuilder::lineTo):
+ (WebCore::SVGPathSegListBuilder::lineToHorizontal):
+ (WebCore::SVGPathSegListBuilder::lineToVertical):
+ (WebCore::SVGPathSegListBuilder::curveToCubic):
+ (WebCore::SVGPathSegListBuilder::curveToCubicSmooth):
+ (WebCore::SVGPathSegListBuilder::curveToQuadratic):
+ (WebCore::SVGPathSegListBuilder::curveToQuadraticSmooth):
+ (WebCore::SVGPathSegListBuilder::arcTo):
+ (WebCore::SVGPathSegListBuilder::closePath):
+ * svg/SVGPathSegListBuilder.h: Added.
+
+2010-07-15 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for Bug 42342 - Font download error for an @font-face rule invalidates other @font-face rules for the same font-family
+ https://bugs.webkit.org/show_bug.cgi?id=42342
+
+ Test: fast/css/font-face-download-error.html
+
+ * css/CSSSegmentedFontFace.cpp:
+ (WebCore::CSSSegmentedFontFace::isValid): Valid if at least one font
+ face is valid.
+ (WebCore::CSSSegmentedFontFace::getFontData): Check validity for each
+ font face.
+ * css/CSSSegmentedFontFace.h: Make isValid private.
+
+2010-07-19 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [Chromium] Fix style errors of RenderThemeChromiumWin.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=42568
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::):
+ (WebCore::getNonClientMetrics):
+ (WebCore::systemFontSize):
+ (WebCore::pointsToPixels):
+ (WebCore::querySystemBlinkInterval):
+ (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
+ (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
+ (WebCore::RenderThemeChromiumWin::platformActiveTextSearchHighlightColor):
+ (WebCore::RenderThemeChromiumWin::paintButton):
+ (WebCore::RenderThemeChromiumWin::paintSliderTrack):
+ (WebCore::RenderThemeChromiumWin::paintMenuList):
+ (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
+ (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
+
+2010-07-19 Steve Falkenburg <sfalken@apple.com>
+
+ (Hopefully the last) Windows build fix.
+
+ Version of CoreServices.h in WebKit Support Libraries uses
+ pragma once, unlike the version I have locally. Switch based
+ on __COLORSYNCDEPRECATED__ instead.
+
+ * WebCorePrefix.h:
+
+2010-07-19 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+
+ * WebCorePrefix.h:
+
+2010-07-19 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix.
+
+ * WebCorePrefix.h:
+
+2010-07-19 Steve Falkenburg <sfalken@apple.com>
+
+ Build fix.
+
+ * WebCorePrefix.h:
+
+2010-07-19 Steve Falkenburg <sfalken@apple.com>
+
+ Windows Build fixes for new ColorSync API.
+ We support both new and old APIs, since the newer headers aren't in the tree yet.
+
+ * WebCorePrefix.h: Removed include of CoreServices.h. Included via ColorSyncPriv.h instead, since header may not be present.
+ * platform/graphics/cg/ColorCG.cpp:
+ (WebCore::createCGColor): Conditionally use new ColorSync API.
+ * platform/graphics/opentype/OpenTypeUtilities.cpp: Define Fixed if CoreServices.h doesn't.
+ * platform/graphics/win/GraphicsLayerCACF.cpp:
+ (WebCore::GraphicsLayerCACF::updateLayerDrawsContent): Use 0 instead of nil, since nil is no longer present via CoreServices.h.
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Include AssertMacros.h.
+ * platform/network/cf/ResourceErrorCF.cpp:
+ (WebCore::ResourceError::operator CFErrorRef): Use 0 instead of nil, since nil is no longer present via CoreServices.h.
+
+2010-07-19 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Only set unloadEventEnd when the unload event is actually fired
+ https://bugs.webkit.org/show_bug.cgi?id=42607
+
+ r63689 introduced this ASSERT and it began failing on Qt and Mac debug.
+ For some reason, it did not fail on Windows (which is where I was
+ testing). The ASSERT was disabled in r63699.
+
+ Test: page-cache related layout tests don't crash in debug mode on Mac.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+
+2010-07-19 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Don't unnecessarily copy QPainterPath in fillPath() and strokePath()
+ https://bugs.webkit.org/show_bug.cgi?id=42513
+
+ Avoid making unnecessary deep-copies of QPainterPaths that will
+ be discarded after use.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+
+2010-07-19 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Nate Chapin.
+
+ WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
+ https://bugs.webkit.org/show_bug.cgi?id=34719
+
+ Fixed compiler warning introduced by original patch. No new tests;
+ covered by existing tests.
+
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
+
+2010-07-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler, Adam Roben, Dan Bernstein and Sam Weinig.
+
+ Handle NP_ASFILE and NP_ASFILEONLY transfer modes
+ https://bugs.webkit.org/show_bug.cgi?id=42587
+
+ * WebCore.exp.in:
+ Export functions from FileSystem.h
+
+ * platform/mac/FileSystemMac.mm:
+ (WebCore::openTemporaryFile):
+ Try to create a temporary file using mkstemp.
+
+2010-07-19 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implement NPN_PostURLNotify
+ https://bugs.webkit.org/show_bug.cgi?id=42602
+
+ Export symbols needed by WebKit2.
+
+ * WebCore.exp.in:
+
+2010-07-19 Tony Gentilcore <tonyg@chromium.org>
+
+ Unreviewed build fix.
+
+ Remove overzealous ASSERT from r63689
+ https://bugs.webkit.org/show_bug.cgi?id=42606
+
+ No new tests because no new functionality.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+
+2010-07-19 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ Web Inspector: Do Not Copy *.re2js Inspector Resources in XCode Build Phase
+ https://bugs.webkit.org/show_bug.cgi?id=42601
+
+ Remove *.re2js files after copying them over in the Build Phase. We do
+ the same to remove the WebKit.qrc file.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2010-07-17 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Web Timing] Move times to DocumentLoader and fix bugs in mark points
+ https://bugs.webkit.org/show_bug.cgi?id=42512
+
+ Test: fast/dom/webtiming-navigate-within-document.html
+
+ * loader/DocumentLoader.h: Move the FrameLoadTimeline (now call DocumentLoadTiming) to the DocumentLoader.
+ (WebCore::DocumentLoader::documentLoadTiming):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading): Set unloadEventEnd on the provisional DocumentLoader. Add some ASSERTs to tighten things up.
+ (WebCore::FrameLoader::loadWithDocumentLoader): This was not the right place to set navigationStart. Setting it here caused it to be set before the unload form prompt and caused it to be reset when navigating within the document.
+ (WebCore::FrameLoader::finishedLoading): Set responseEnd on the active DocumentLoader.
+ (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): This is the right place for navigationStart as defined by the spec.
+ * loader/FrameLoader.h: Get rid of FrameLoadTimeline.
+ * loader/FrameLoaderTypes.h: Rename FrameLoadTimeline to DocumentLoadTiming. It is even more apparent this doesn't belong in this file now. I am planning to submit a patch moving it out ASAP, but didn't want to muddy this patch with all those build files.
+ (WebCore::DocumentLoadTiming::DocumentLoadTiming):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::willSendRequest): Move fetchStart out of this method to load(), and rewrite setting of redirectStart, redirectEnd, and redirectCount to be more readable.
+ (WebCore::MainResourceLoader::load): Set fetchStart slightly earlier here and tighten it up with some ASSERTs.
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::dispatchLoadEvent): Set loadEventStart and loadEventEnd on the DocumentLoader.
+ * page/Navigation.cpp:
+ (WebCore::Navigation::redirectCount): Retrieve redirectCount from the DocumentLoader.
+ * page/Timing.cpp:
+ (WebCore::getPossiblySkewedTimeInKnownRange): The skew problem turned out to be due to the fact that chromium's currentTime() implementation only syncs to the system time every 60 seconds. So absolute times across threads may be skewed slightly. I resolved this temporarily by clipping the time from another thread into a known bound. A better long term solution is probably to add a currentTimeFromSystemTime() method and call that for web timing marks.
+ (WebCore::Timing::navigationStart):
+ (WebCore::Timing::unloadEventEnd):
+ (WebCore::Timing::redirectStart):
+ (WebCore::Timing::redirectEnd):
+ (WebCore::Timing::fetchStart):
+ (WebCore::Timing::domainLookupStart):
+ (WebCore::Timing::domainLookupEnd):
+ (WebCore::Timing::connectStart):
+ (WebCore::Timing::connectEnd):
+ (WebCore::Timing::requestStart):
+ (WebCore::Timing::requestEnd):
+ (WebCore::Timing::responseStart):
+ (WebCore::Timing::responseEnd):
+ (WebCore::Timing::loadEventStart):
+ (WebCore::Timing::loadEventEnd):
+ (WebCore::Timing::documentLoader):
+ (WebCore::Timing::documentLoadTiming):
+ (WebCore::Timing::resourceLoadTiming):
+ (WebCore::Timing::resourceLoadTimeRelativeToAbsolute): Ensure requestTime is in the range of fetchStart to responseEnd.
+ * page/Timing.h:
+
+2010-07-19 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42118
+ Disable WebGL on Leopard for now.
+
+ LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
+ GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
+ SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
+ software OpenGL driver on machines without this support.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-07-19 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove HTML5 media element 'load' event
+ https://bugs.webkit.org/show_bug.cgi?id=30464
+ <rdar://problem/5650561>
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_completelyLoaded.
+ (WebCore::HTMLMediaElement::parseMappedAttribute): Don't deal with 'load' event.
+ (WebCore::HTMLMediaElement::prepareForLoad): Set m_completelyLoaded to false.
+ (WebCore::HTMLMediaElement::setNetworkState): Don't post 'load' event.
+ (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if m_networkState != NETWORK_LOADING.
+ (WebCore::HTMLMediaElement::userCancelledLoad): No more NETWORK_LOADED state.
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::):
+ * html/HTMLMediaElement.idl: Remove NETWORK_LOADING.
+
+2010-07-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40996
+ Progress event should not be fired during synchronous XMLHttpRequest
+
+ https://bugs.webkit.org/show_bug.cgi?id=17502
+ Assertion failure when trying to restart a sync XMLHttpRequest as an async one from onreadystatechange
+
+ Tests: http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events.html
+ http/tests/xmlhttprequest/xmlhttprequest-sync-vs-async-assertion-failure.html
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::callReadyStateChangeListener): We now only dispatch readystatechange
+ event for synchronous requests in states UNSENT, OPENED and DONE. I'm not sure what exactly
+ the spec draft says about readystatechange for sync requests, but this seems to be the most
+ logical and backwards compatible behavior.
+ (WebCore::XMLHttpRequest::didReceiveData): Don't dispatch progress events for sync requests.
+ Note that we already don't dispatch upload progress events for those.
+
+2010-07-19 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7232109> Unpainted white area appears at the edge of the page when body has bg color
+ https://bugs.webkit.org/show_bug.cgi?id=34913
+
+ Tests: fast/repaint/view-background-from-body-1.html
+ fast/repaint/view-background-from-body-2.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::styleWillChange): If this is the body renderer and its current style is
+ null, repaint the view, similarly to how the view is repainted for any repaint-or-higher
+ style changes.
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::removeChildNode): If the removed child is the body renderer,
+ repaint the view, in case the body’s background was propagated to the view.
+
+2010-07-19 Adam Roben <aroben@apple.com>
+
+ Fix an assertion when a plugin returns -1 from NPP_Write
+
+ We were forgetting to call setDefersLoading(false) before destroying
+ the PluginStream. In the process of destroying the stream, someone
+ would call setDefersLoading(true), and we would assert because we were
+ already deferring loads.
+
+ Fixes <http://webkit.org/b/42563> Assertion failure in
+ ResourceHandle::setDefersLoading when running
+ plugins/return-negative-one-from-write.html on Windows
+
+ Reviewed by Anders Carlsson.
+
+ * plugins/PluginStream.cpp:
+ (WebCore::PluginStream::deliverData): Call setDefersLoading(false)
+ before destroying the stream, to match the setDefersLoading(true) call
+ earlier in this function. (We already call setDefersLoading(false) in
+ the non-error case later on.)
+
+2010-07-19 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Fix some EFL theme issues
+ https://bugs.webkit.org/show_bug.cgi?id=42569
+
+ Keep a pointer to theme filename and check for it correctly.
+ Reduce the scope of some variables.
+ Don't test for platformWidget() since we are not using it.
+
+ No new tests, no new functionality.
+
+ * platform/efl/WidgetEfl.cpp:
+ (WebCore::Widget::applyCursor):
+ (WebCore::Widget::setCursor):
+
+2010-07-19 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Add ifdef to compile code just on presence of Ecore_X
+ https://bugs.webkit.org/show_bug.cgi?id=42567
+
+ No new tests since there's no new functionality.
+
+ * platform/efl/WidgetEfl.cpp:
+ (WebCore::Widget::setEvasObject):
+ Add #ifdef HAVE_ECORE_X to it.
+
+2010-07-19 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: add/removeStyleClass shouldn't increase number of spaces between class names.
+ https://bugs.webkit.org/show_bug.cgi?id=42485
+
+ * inspector/front-end/utilities.js:
+ (Element.prototype.removeStyleClass):
+
+2010-07-19 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: show stack trace for uncaught exceptions when Web Inspector is open.
+ https://bugs.webkit.org/show_bug.cgi?id=42560
+
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::setCaptureCallStackForUncaughtExceptions):
+ * bindings/js/ScriptController.h:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::setCaptureCallStackForUncaughtExceptions):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/V8ConsoleMessage.cpp:
+ (WebCore::V8ConsoleMessage::dispatchNow):
+ (WebCore::V8ConsoleMessage::handler):
+ * bindings/v8/V8ConsoleMessage.h:
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ * inspector/ConsoleMessage.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::addMessageToConsole):
+ (WebCore::InspectorController::startGroup):
+ (WebCore::InspectorController::connectFrontend):
+ (WebCore::InspectorController::disconnectFrontend):
+ * inspector/InspectorController.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._formatMessage):
+ (WebInspector.ConsoleMessage.prototype.toMessageElement):
+ (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement):
+ (WebInspector.ConsoleMessage.prototype._addMessageHeader):
+ (WebInspector.ConsoleMessage.prototype.toString):
+ * inspector/front-end/inspector.css:
+ (.console-message.repeated-message > ol.stack-trace):
+ (.section .properties ol, .event-properties ol, .stack-trace ol, ol.stack-trace):
+ (ol.stack-trace):
+ (.section .properties ol.expanded, .event-properties ol.expanded, .stack-trace ol, ol.stack-trace):
+ * page/Console.cpp:
+ (WebCore::Console::addMessage):
+ * page/Console.h:
+ (WebCore::):
+
+2010-07-19 Robin Burchell <robin.burchell@collabora.co.uk>
+
+ Reviewed by Antonio Gomes
+
+ [Qt] Use memcpy() instead of qMemCopy()
+ This is supposed to be more efficient, as the compiler is able to
+ optimise more.
+
+ Additionally, qMemCopy() is only strictly supposed to be used in
+ headers (see Qt's src/corelib/qglobal.h for reference)
+ See: https://bugs.webkit.org/show_bug.cgi?id=42392
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertQVariantToValue):
+
+2010-07-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Canvas: Rename operator==(CanvasStyle,CanvasStyle) since it isn't a proper equality check
+ https://bugs.webkit.org/show_bug.cgi?id=42284
+
+ New name is isEquivalentColor(CanvasStyle).
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setStrokeStyle):
+ (WebCore::CanvasRenderingContext2D::setFillStyle):
+ * html/canvas/CanvasStyle.cpp:
+ (WebCore::CanvasStyle::isEquivalentColor):
+ * html/canvas/CanvasStyle.h:
+
+2010-07-19 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Canvas: Wrong internal positioning of drawImage() shadows
+ https://bugs.webkit.org/show_bug.cgi?id=42510
+
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::BitmapImage::draw):
+ * platform/graphics/qt/StillImageQt.cpp:
+ (WebCore::StillImage::draw):
+
+2010-07-19 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Render shadow when drawing one canvas onto another
+ https://bugs.webkit.org/show_bug.cgi?id=42508
+
+ * platform/graphics/qt/StillImageQt.cpp:
+ (WebCore::StillImage::draw):
+
+2010-07-19 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Some composition modes fail when color has alpha zero
+ https://bugs.webkit.org/show_bug.cgi?id=36973
+
+ Remove erroneous optimization that ignored painting calls when
+ the stroke/fill color had an alpha value of zero.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::fillPath):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::fillRoundedRect):
+
+2010-07-19 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ CSS3 background: Number of layers should be determined by background-image element count
+ https://bugs.webkit.org/show_bug.cgi?id=41201
+
+ Manual test: css3-background-layer-count.html
+
+ Spec link:
+ http://www.w3.org/TR/css3-background/#layering
+
+ * manual-tests/css3-background-layer-count.html: Added.
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::fillUnsetProperties): Don't repeat
+ image properties, they determine the total number of layers.
+ (WebCore::FillLayer::cullEmptyLayers): Change culling logic
+ to discard all layers after the first one without an image set.
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::adjustBackgroundLayers): Call
+ fillUnsetProperties() before cullEmptyLayers()
+ (WebCore::InheritedFlags::adjustMaskLayers): Ditto.
+
+2010-07-19 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Avoid QImage::pixel() in getImageData()
+ https://bugs.webkit.org/show_bug.cgi?id=42463
+
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::getImageData): Use QImage::scanLine() instead
+ of fetching data pixel-by-pixel.
+
+2010-07-19 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: hide "toggle debugger" button when debugger is always enabled
+ https://bugs.webkit.org/show_bug.cgi?id=42558
+
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+
+2010-07-19 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Explicitly declare DeviceOrientationEvent destructor and define it in the .cpp file
+ https://bugs.webkit.org/show_bug.cgi?id=42466
+
+ (Original problem at https://bugs.webkit.org/show_bug.cgi?id=42447)
+
+ No new functionality so no new tests.
+
+ * dom/DeviceOrientationEvent.cpp:
+ (WebCore::DeviceOrientationEvent::~DeviceOrientationEvent):
+ Move here to avoid needing to have the full declaration of
+ DeviceOrientation in DeviceOrientationEvent.h.
+ * dom/DeviceOrientationEvent.h:
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Fix Build.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Always set the current NSGraphicsContext before calling drawWithFrame
+ https://bugs.webkit.org/show_bug.cgi?id=42542
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMeter):
+ (WebCore::RenderThemeMac::paintSearchField):
+ (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move PluginWidget to WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=42530
+
+ Rename the PluginWidget class to PluginViewBase and make it an abstract base class.
+
+ This is a stopgap measure until we have a single PluginView class that we can use everywhere.
+
+ * WebCore.exp.in:
+ Remove PluginWidget symbols.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Update.
+
+ * platform/Widget.h:
+ (WebCore::Widget::isPluginViewBase):
+ Return false.
+
+ * plugins/PluginViewBase.h: Added.
+ (WebCore::PluginViewBase::platformLayer):
+ Always return 0 here now.
+
+ (WebCore::PluginViewBase::isPluginViewBase):
+ Return true.
+
+ * plugins/PluginWidget.h: Removed.
+ * plugins/mac/PluginWidgetMac.mm: Removed.
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
+ Cast to PluginWidgetBase instead.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+ Cast to PluginWidgetBase instead.
+
+2010-07-18 Dean Jackson <dino@apple.com>
+
+ Unreviewed.
+
+ Remove the unwanted extra line that Xcode
+ added in my last commit.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2010-07-18 Dean Jackson <dino@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41259
+ Interacting with a <select> element within a transformed and clipped
+ container scrolls the container
+
+ The Node::getRect and ContainerNode::getRect functions were not
+ transform-aware. This fixes both, and has a test to make sure
+ we're not breaking any existing scrollToView code. This means
+ that a <select> popup will appear in the correct place if it
+ is within a transformed and scrolled container.
+
+ Test: fast/transforms/scrollIntoView-transformed.html
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::getUpperLeftCorner):
+ (WebCore::ContainerNode::getLowerRightCorner):
+ - make sure we call localToAbsolute in the right order
+ (after we've done a local move) and pass in the flags to
+ indicate it should look for transforms.
+ * dom/Node.cpp:
+ (WebCore::Node::getRect):
+ - make sure localToAbsolute gets told to look for transforms.
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add NPJSObjectMap class
+ https://bugs.webkit.org/show_bug.cgi?id=42524
+
+ Export ScriptController functions.
+
+ * WebCore.exp.in:
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Implement some NPRuntime related NPN_ functions
+ https://bugs.webkit.org/show_bug.cgi?id=42518
+
+ * WebCore.exp.in:
+ Export IdentifierRep functions.
+
+2010-07-17 TJ Lee <tjlee0909@gmail.com>
+
+ Reviewed by Timothy Hatcher.
+
+ HTMLLinkElement ignores dnsPrefetchingEnabled setting
+ https://bugs.webkit.org/show_bug.cgi?id=42500
+
+ Changed the HTML Link tag to check that the browser
+ has DNS-prefetching enabled before calling ResourceHandle::prepareForURL.
+
+ There are no test cases for this patch because it was unclear how to test
+ this using a layout test. A possible test case would be to
+ clear the DNS cache on the client's machine before loading a page with
+ <link rel="dns-prefetch" href="SomeSiteThatsNotTheCurrentOne.com"> and
+ then check the number of DNS cache entries.
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process):
+
+2010-07-16 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Asynchronous policy checks make FrameLoader think it is done loading prematurely
+ https://bugs.webkit.org/show_bug.cgi?id=42489
+
+ This caused many (~100) layout tsts to fail under WebKit2.
+
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::loadSubframe): Right after loading a new subframe,
+ if m_complete is true, do not consider it done if it has a provisional loader.
+ This will happen in the case where the policy check is asynchronous.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::subframeIsLoading): For similar reasons,
+ consider a subframe to be loading if it has a policy decision pending.
+
+2010-07-15 Qi Zhang <qi.2.zhang@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Failure on http://philip.html5.org/tests/canvas/suite/tests/2d.shadow.alpha.5.html
+ https://bugs.webkit.org/show_bug.cgi?id=38400
+
+ FillRect with shadow need take alpha information from fillstyle
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::fillRect):
+
+2010-07-17 Nikita Vasilyev <me@elv1s.ru>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: [REGRESSION] Edit long CSS attributes works incorrect
+ https://bugs.webkit.org/show_bug.cgi?id=42476
+
+ * inspector/front-end/inspector.css:
+ (.editing):
+
+2010-07-16 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Sam Weinig.
+
+ Failing 2d.path.arcTo.ensuresubpath.* philip canvas tests
+ https://bugs.webkit.org/show_bug.cgi?id=42186
+
+ Move code from Qt's Path::addArcTo() up to CanvasRenderingContext2D.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::arcTo): Behave as moveTo(x1,y1)
+ if the current path is empty.
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::addArcTo): Remove now-redundant code.
+
+2010-07-16 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Oliver Hunt.
+
+ QtWebkit creates an unnecessary deep copy of images when canvas drawing is done
+ A https://bugs.webkit.org/show_bug.cgi?id=32530
+
+ Solve this by adding ImageBuffer::imageForRendering() which returns an image
+ that can be used for rendering now, but isn't a copy to be kept around.
+
+ * platform/graphics/ImageBuffer.h:
+ (WebCore::ImageBuffer::imageForRendering):
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::ImageBuffer::imageForRendering): Added to provide an image that can
+ be used for rendering now, but may change in the future.
+ * platform/graphics/qt/StillImageQt.cpp:
+ (WebCore::StillImage::StillImage):
+ (WebCore::StillImage::~StillImage):
+ (WebCore::StillImage::size):
+ (WebCore::StillImage::nativeImageForCurrentFrame):
+ (WebCore::StillImage::draw):
+ * platform/graphics/qt/StillImageQt.h:
+ (WebCore::StillImage::createForRendering): Added for use in
+ ImageBuffer::imageForRendering(), provides a thin wrapper around a QPixmap*.
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::paint): Paint with ImageBuffer::imageForRendering()
+
+2010-07-16 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Oliver Hunt.
+
+ [Qt] Remove redundant logic in Path::addArcTo()
+ https://bugs.webkit.org/show_bug.cgi?id=42494
+
+ Bounds checking for arcTo() is now done in cross-platform code
+ thanks to <http://trac.webkit.org/changeset/63599>
+
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::addArcTo):
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ This patch just reverts the change to WebCore/page/FocusController.cpp
+ made in changeset 61484, and add a new method named
+ willSetInputMethodState in EditorClient interface, which gets called
+ in FocusController just before changing the focused node.
+
+ No new tests, because no new functionality.
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyEditorClient::willSetInputMethodState):
+ * page/EditorClient.h:
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setFocusedNode):
+
+2010-07-16 Matthew Delaney <mdelaney@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Failing 2d.path.stroke.prune.arc philip canvas test
+ https://bugs.webkit.org/show_bug.cgi?id=42188
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ Note, updated parameter names to match spec.
+ (WebCore::CanvasRenderingContext2D::lineTo): Pulled bound checking code out of lower code to have checks for all platforms.
+ (WebCore::CanvasRenderingContext2D::arcTo): Bound checking per the spec for arcTo parameters. Updated parameter names to match spec.
+ * platform/graphics/Path.h: Added in new method to expose the current position.
+ * platform/graphics/cairo/PathCairo.cpp:
+ (WebCore::Path::currentPoint): Added in likely correct implementation for this call with a FIXME just in case.
+ * platform/graphics/cg/PathCG.cpp:
+ (WebCore::Path::currentPoint): Added in support for this call.
+ * platform/graphics/haiku/PathHaiku.cpp:
+ (WebCore::Path::currentPoint): Added in stub for this call.
+ * platform/graphics/openvg/PathOpenVG.cpp:
+ (WebCore::Path::currentPoint): Added in likely implementation for this call with a FIXME just in case.
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::Path::currentPoint): Added in implementation for this call courtesy of Andrea Kling.
+ * platform/graphics/skia/PathSkia.cpp:
+ (WebCore::Path::currentPoint): Added in stub for this call.
+ * platform/graphics/wince/PathWince.cpp:
+ (WebCore::Path::currentPoint): Added in stub for this call.
+ * platform/graphics/wx/PathWx.cpp:
+ (WebCore::Path::currentPoint): Added in stub for this call.
+
+2010-07-16 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63593.
+ http://trac.webkit.org/changeset/63593
+ https://bugs.webkit.org/show_bug.cgi?id=42487
+
+ Broke a few chromium pixel tests (Requested by tony^work on
+ #webkit).
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::drawEllipse):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::strokeRect):
+
+2010-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Part of <rdar://problem/7233974> Deprecate +[WebView _setShouldUseFontSmoothing:]
+ https://bugs.webkit.org/show_bug.cgi?id=29355
+
+ * WebCore.exp.in: Updated.
+ * platform/graphics/Font.cpp:
+ (WebCore::Font::Font): Added a font smoothing mode parameter to the constructor.
+ Set the font smoothing mode in the font description.
+ * platform/graphics/Font.h:
+
+2010-07-16 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Anders Carlsson.
+
+ Add speech attribute to IDL for enabling access from JS.
+ https://bugs.webkit.org/show_bug.cgi?id=42483
+
+ No tests added, this change is a pre-requisite for future layout tests.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::parseMappedAttribute): Update the renderer when speech attribute changes.
+ * html/HTMLInputElement.idl: Added the speech attribute to IDL.
+
+2010-07-16 Fady Samuel <fsamuel@chromium.org>
+
+ Reviewed by David Levin.
+
+ Avoids adding stroke when stroke-width is zero.
+
+ SVG - stroke-width:0 bug with stroke other than "none"
+ https://bugs.webkit.org/show_bug.cgi?id=42387
+
+ Test: svg/stroke/path-zero-strokewidth-test.svg
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawConvexPolygon):
+ (WebCore::GraphicsContext::drawEllipse):
+ (WebCore::GraphicsContext::drawLine):
+ (WebCore::GraphicsContext::strokeArc):
+ (WebCore::GraphicsContext::strokePath):
+ (WebCore::GraphicsContext::strokeRect):
+
+2010-07-16 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, build fix.
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::getThemeData): Fix a typo.
+
+2010-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] <input type=number> UI implementation for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=42259
+
+ No additional tests. Existing tests cover this change and we'll
+ update expectations.
+
+ * platform/chromium/ChromiumBridge.h: Add paintSpinButton().
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::determineState):
+ Add ControlSubPart parameter and add support for spin buttons.
+ (WebCore::RenderThemeChromiumWin::determineClassicState): ditto.
+ (WebCore::RenderThemeChromiumWin::getThemeData): ditto.
+ (WebCore::RenderThemeChromiumWin::adjustInnerSpinButtonStyle): Added.
+ (WebCore::RenderThemeChromiumWin::paintInnerSpinButton): Added.
+ * rendering/RenderThemeChromiumWin.h:
+ Declare ControlSubpart, and add it to some functions.
+
+2010-07-16 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Use function provided by EFL for system beep
+ https://bugs.webkit.org/show_bug.cgi?id=42481
+
+ EFL port does not support automated tests, yet.
+
+ * platform/efl/SoundEfl.cpp:
+ (WebCore::systemBeep):
+
+2010-07-16 Sarah Strong <sarah.e.strong@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Clipboard data is lost on exit
+ https://bugs.webkit.org/show_bug.cgi?id=27411
+
+ No new tests. To manually test the bug fixed by this patch:
+ 1) Open an application that uses a webkit webview on a GNOME-based system
+ 2) Copy some text from that application
+ 3) Optional: paste it to another application. This should work properly with and without this patch.
+ 4) Exit the application completely.
+ 5) Paste:
+ Without this patch, you cannot because your clipboard is empty.
+ With this patch, pasting succeeds.
+ I have not included an automated test because of the difficulty of testing behaviour after application exit.
+
+2010-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Keyboard operations for <input type=number>
+ https://bugs.webkit.org/show_bug.cgi?id=42076
+
+ - The up arrow key works as stepUp().
+ - The down arrow key works as stepDown().
+ - Reject characters other than + - 0-9 . e E
+
+ Test: fast/forms/input-number-keyoperation.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::defaultEventHandler):
+ Add up/down arrow keys support, and call handleBeforeTextInsertedEvent().
+ (WebCore::isNumberCharacter):
+ (WebCore::HTMLInputElement::handleBeforeTextInsertedEvent):
+ For type=number, remove unacceptable characters.
+ * html/HTMLInputElement.h:
+
+2010-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Improve hover state handling for spin buttons
+ https://bugs.webkit.org/show_bug.cgi?id=42260
+
+ Background:
+ When we move the mouse cursor to a node from the outside of the node,
+ the following steps are executed.
+ 1. setHovered(true) is called.
+ 2. The node is repainted for the hover state.
+ 3. 'mousemove' event is dispatched for the node.
+ For a spin-button, RenderTheme::paint{Inner,Outer}SpinButton() is
+ called before the event handler of the spin-button. So we can't
+ detect which of the up part or the down part is hovered correctly.
+
+ Solution:
+ The hover state of a spin-button is one of three states;
+ Indeterminate, Up, and Down. The state is Indeterminate since
+ setHovered(true) is called and until 'mousemove' event is
+ dispatched.
+
+ No new tests because there are no implementation of spin-buttons
+ with hovered state yet.
+
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::isSpinUpButtonPartPressed):
+ (WebCore::RenderTheme::isHovered):
+ Return false if the node is a spin-button and the state is Indeterminate.
+ (WebCore::RenderTheme::isSpinUpButtonPartHovered):
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::SpinButtonElement::SpinButtonElement):
+ Initialize m_upDownState.
+ (WebCore::SpinButtonElement::defaultEventHandler):
+ (WebCore::SpinButtonElement::setHovered):
+ Set the state to Indeterminate.
+ * rendering/TextControlInnerElements.h:
+ (WebCore::SpinButtonElement::upDownState):
+
+2010-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7527532> Crash beneath setSelection() during detach()
+ https://bugs.webkit.org/show_bug.cgi?id=42020
+
+ No test because I am unable to reproduce the crash.
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::setSelection): In the clearSelection() case, where the repaint mode is
+ RepaintNewMinusOld, avoid making RenderBlockSelectionInfo instances, and thereby avoid calling
+ localToAbsolute() during detach().
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Fix release build.
+
+ * storage/Database.cpp:
+ (WebCore::DerefContextTask::performTask):
+
+2010-07-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Safari pegs CPU and drops frames on http://neography.com/experiment/circles/solarsystem/ (CSS animations)
+ https://bugs.webkit.org/show_bug.cgi?id=41409
+
+ AnimationController::isAnimatingPropertyOnRenderer() really asked whether an accelerated animation
+ or transition was running. This prevented us from falling into compositing layers for animation
+ on platforms, like Windows, that don't have accelerated animations.
+
+ Fix by making things more explicit: we now have two methods, isRunningAnimationOnRenderer()
+ and isRunningAcceleratedAnimationOnRenderer().
+
+ Changes are more extensive because I flipped the sense of 'm_fallbackAnimating', which is
+ now 'm_isAccelerated', for clarity.
+
+ Test: compositing/animation/animation-compositing.html
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::AnimationBase): m_fallbackAnimating -> m_isAccelerated
+ (WebCore::AnimationBase::blendProperties): Ditto.
+ (WebCore::AnimationBase::updateStateMachine): Ditto.
+ * page/animation/AnimationBase.h:
+ (WebCore::AnimationBase::isAnimatingProperty): Takes new acceleratedOnly parameter
+ which causes the method to only return true if the animation is accelerated.
+ (WebCore::AnimationBase::isAccelerated): Changed from isFallbackAnimating.
+
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
+ (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
+ (WebCore::AnimationController::isRunningAnimationOnRenderer):
+ (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
+
+ * page/animation/CompositeAnimation.h:
+ * page/animation/AnimationController.h: Rename isAnimatingPropertyOnRenderer(), add
+ isRunningAcceleratedAnimationOnRenderer().
+ * page/animation/AnimationControllerPrivate.h: Ditto.
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions): !isFallbackAnimating() -> isAccelerated().
+ (WebCore::CompositeAnimation::isAnimatingProperty): Pass acceleratedOnly down.
+
+ * page/animation/ImplicitAnimation.cpp:
+ (WebCore::ImplicitAnimation::timeToNextService): !isFallbackAnimating() -> isAccelerated().
+
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::timeToNextService): isFallbackAnimating() -> !isAccelerated().
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Avoid touching the transform or
+ opacity if an accelerated animation is running.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresCompositingForAnimation): Make compositing layers
+ if an animation of transform or opacity is running.
+
+2010-07-16 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Assertion when turning Accelerated Compositing off on a composited page
+ https://bugs.webkit.org/show_bug.cgi?id=42408
+
+ When accelerated compositing is turned off, check m_hasAcceleratedCompositing
+ before saying that the root layer will be composited. Fixes an assertion.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+
+2010-07-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Spatial navigation: do not consider outline for focusable element boundaries
+ https://bugs.webkit.org/show_bug.cgi?id=42474
+
+ Test: fast/events/spatial-navigation/snav-zero-margin-content.html
+
+ Currently in WebCore::renderRectRelativeToRootDocument function, we are calling
+ RenderObject::absoluteClippedOverflowRect to obtain the rect boundary of a given
+ renderer/element. This method deals with outline, which is out of elements boundary.
+ It makes spatial navigation to fail on common sites like google.gom: "Web, Images, Map, etc"
+ are inaccessible.
+
+ Patch replaces RenderObject::absoluteClippedOverflowRect by Node::getRect,
+ which returns only the absolute bounding box rect of the Element.
+
+ * page/SpatialNavigation.cpp:
+ (WebCore::renderRectRelativeToRootDocument):
+ (WebCore::checkNegativeCoordsForNode):
+
+2010-07-15 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Gustavo Noronha.
+
+ [Qt] Remove unnecessary WebKit headers inclusion from WebCore files
+ https://bugs.webkit.org/show_bug.cgi?id=42416
+
+ There are some places in WebCore unnecessarily including WebKit headers.
+
+ Cleaning up only, no testing needed.
+
+ * platform/network/qt/ResourceHandleQt.cpp:
+ * platform/qt/RenderThemeQt.cpp:
+ * platform/qt/WidgetQt.cpp:
+
+2010-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Refinement of r63556: moved the tab width computation back to Font, but added a
+ SimpleFontData parameter.
+
+ * platform/graphics/Font.h:
+ (WebCore::Font::tabWidth):
+ * platform/graphics/WidthIterator.cpp:
+ (WebCore::WidthIterator::advance):
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
+
+2010-07-16 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Fix unit error in calculating timings from ResourceLoadTiming API
+ https://bugs.webkit.org/show_bug.cgi?id=42473
+
+ The start and end offsets are already in milliseconds so they should not be multiplied by 1000.0 like requestTime.
+
+ No new tests because, for a yet unknown reason, the ResourceLoadTiming API is not populated in the chromium test shell like it is in full chromium. This means the test that would have caught this bug (fast/dom/webtiming.html) currently has its expectation set to FAIL.
+
+ * page/Timing.cpp:
+ (WebCore::Timing::domainLookupStart):
+ (WebCore::Timing::domainLookupEnd):
+ (WebCore::Timing::connectStart):
+ (WebCore::Timing::connectEnd):
+ (WebCore::Timing::requestStart):
+ (WebCore::Timing::requestEnd):
+ (WebCore::Timing::responseStart):
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ clang++ build fixes for JavaScriptCore and WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=42478
+
+ * platform/network/Credential.cpp:
+ (WebCore::Credential::type):
+ * platform/network/Credential.h:
+ Remove const qualifier on Credential::type since it doesn't have an effect on the type.
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by David Levin.
+
+ Really add WARN_UNUSED_RESULT to leakRef
+ https://bugs.webkit.org/show_bug.cgi?id=42464
+
+ Get rid of a call to releaseRef here by passing the ScriptExecutionContext
+ reference through to the DerefContextTask.
+
+ * storage/Database.cpp:
+ (WebCore::DerefContextTask::create):
+ (WebCore::DerefContextTask::performTask):
+ (WebCore::DerefContextTask::DerefContextTask):
+ (WebCore::Database::~Database):
+
+2010-07-16 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: The current implementation of generator is not ready
+ for generation Backend part of Inspector interface. The full patch
+ with Backend is quite big and I've split it.
+ https://bugs.webkit.org/show_bug.cgi?id=42462
+
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/Inspector.idl:
+ * inspector/InspectorValues.cpp:
+ (WebCore::InspectorArray::get):
+ * inspector/InspectorValues.h:
+ (WebCore::InspectorArray::length):
+
+2010-07-15 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ An empty value for xml:lang isn't considered
+ https://bugs.webkit.org/show_bug.cgi?id=42042
+
+ Allow :lang selector to match empty values for xml:lang and
+ lang attributes.
+
+ Test: fast/css/lang-selector-empty-attribute.xhtml
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
+
+2010-07-16 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Shift-Enter does not do a reverse search. It searches forward.
+ https://bugs.webkit.org/show_bug.cgi?id=42459
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.performSearch):
+
+2010-07-16 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: do not include SSL time into Waiting time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42458
+
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._showPopover):
+
+2010-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ <rdar://problem/8198266> white-space: pre text containing tabs is not laid out correctly when the font lacks a space glyph
+ https://bugs.webkit.org/show_bug.cgi?id=42437
+
+ No test because none of the fonts available to DumpRenderTree are missing a space glyph.
+
+ Changed the tab width computation to use the width of the space glyph from the font that has
+ a space glyph, which may be a fallback font if the primary font lacks a space glyph.
+
+ * platform/graphics/Font.h: Removed Font::tabWidth().
+ * platform/graphics/WidthIterator.cpp:
+ (WebCore::WidthIterator::advance):
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
+
+2010-07-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Chromium build fix. Add missing include.
+
+ * inspector/ConsoleMessage.h:
+
+2010-07-16 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Path: Avoid creating a new GraphicsContext in strokeContains() and strokeBoundingRect()
+ https://bugs.webkit.org/show_bug.cgi?id=42456
+
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::scratchContext): Added, provides a scratch GraphicsContext.
+ (WebCore::Path::strokeContains): Use the scratch context instead
+ of creating a new GraphicsContext.
+ (WebCore::Path::strokeBoundingRect): Ditto.
+
+2010-07-16 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ [V8] V8Proxy::retrieve may return null if javascript is disabled. Add a check
+ to avoid crashes in inspected page.
+ https://bugs.webkit.org/show_bug.cgi?id=42065
+
+ * bindings/v8/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::addListener):
+
+2010-07-16 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: add SSL time label into the resources popover.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42458
+
+ * English.lproj/localizedStrings.js:
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::buildObjectForTiming):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._showPopover):
+
+2010-07-16 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: disable AppCache in chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41858
+
+ * inspector/front-end/Settings.js:
+ * inspector/front-end/StoragePanel.js:
+ (WebInspector.StoragePanel):
+ (WebInspector.StoragePanel.prototype.reset):
+ (WebInspector.StoragePanel.prototype.addApplicationCache):
+
+2010-07-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ console.trace should show file and line number for each function in the stack
+ https://bugs.webkit.org/show_bug.cgi?id=21180
+
+ Test: inspector/console-trace.html
+
+ * bindings/js/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::initialize):
+ * bindings/v8/ScriptCallFrame.cpp:
+ (WebCore::ScriptCallFrame::ScriptCallFrame):
+ * bindings/v8/ScriptCallFrame.h:
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::getFrameLocation):
+ (WebCore::toScriptCallFrame):
+ (WebCore::ScriptCallStack::create):
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ (WebCore::ScriptCallStack::at):
+ (WebCore::ScriptCallStack::size):
+ * bindings/v8/ScriptCallStack.h:
+ * bindings/v8/custom/V8ConsoleCustom.cpp:
+ (WebCore::V8Console::traceCallback):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::CallFrame::CallFrame):
+ (WebCore::ConsoleMessage::CallFrame::isEqual):
+ (WebCore::ConsoleMessage::CallFrame::createFrontendObject):
+ (WebCore::ConsoleMessage::ConsoleMessage):
+ (WebCore::ConsoleMessage::addToFrontend):
+ (WebCore::ConsoleMessage::isEqual):
+ * inspector/ConsoleMessage.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleMessage.prototype._formatMessage):
+ (WebInspector.ConsoleMessage.prototype._createStackTraceElement):
+ (WebInspector.ConsoleMessage.prototype._createSourceUrlLink):
+ * inspector/front-end/inspector.css:
+ (.console-message.expandable > .console-message-text::before):
+ (.console-message.expandable.collapsed > .console-message-text::before):
+ (.console-message.expandable.collapsed > ol.stack-trace):
+ (.console-message > ol.stack-trace):
+ (.console-message.repeated-message > ol.stack-trace):
+ (.console-message.repeated-message > ol.stack-trace.trace-message):
+ * page/Console.idl:
+
+2010-07-16 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Build with MathML enabled. Fix build when MathML is enabled and
+ make it the default.
+ https://bugs.webkit.org/show_bug.cgi?id=42453
+
+ EFL port does not support automated tests, yet.
+
+ * CMakeLists.txt: add missing source file and sort.
+
+2010-07-16 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ DeviceOrientationEvent.h should not forward-declare DeviceOrientation
+ https://bugs.webkit.org/show_bug.cgi?id=42447
+
+ When destructing m_orientation, DeviceOrientation cannot be an incomplete type.
+
+ * dom/DeviceOrientationEvent.h:
+
+2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ gradientTransform + objectBoundingBox is wrong
+ https://bugs.webkit.org/show_bug.cgi?id=42446
+
+ gradientTransform + gradientUnits="objectBoundingBox" is wrong. Reverse multiplication order of both transforms.
+
+ * rendering/RenderSVGResourceGradient.cpp: s/multiply/multLeft/
+
+2010-07-16 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Make JS memory stats available via 'Performance' object (Web Timing).
+ This statistics is populated only if 'WebKitMemoryInfoEnabled'
+ preference is set.
+
+ 'console.memory' is kept until Web Timing object becomes visible by
+ default (currently it is hidden under compile-time flag). These stats
+ are guarded with the same preference.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41617
+
+ * bindings/js/JSConsoleCustom.cpp:
+ * bindings/v8/custom/V8ConsoleCustom.cpp:
+ * page/Console.cpp:
+ (WebCore::Console::disconnectFrame):
+ (WebCore::Console::memory):
+ * page/Console.h:
+ * page/Console.idl:
+ * page/MemoryInfo.cpp:
+ (WebCore::MemoryInfo::MemoryInfo):
+ * page/MemoryInfo.h:
+ (WebCore::MemoryInfo::create):
+ * page/Performance.cpp:
+ (WebCore::Performance::disconnectFrame):
+ (WebCore::Performance::memory):
+ * page/Performance.h:
+ * page/Performance.idl:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h:
+ (WebCore::Settings::setMemoryInfoEnabled):
+ (WebCore::Settings::memoryInfoEnabled):
+
+2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Convolution computation causes bad alpha channel values
+ https://bugs.webkit.org/show_bug.cgi?id=42273
+
+ Unbreak the convolve matrix filter, fixing svg/W3C-SVG-1.1/filters-conv-01-f.svg.
+
+ 1) Fix clamping the rgb values:
+ "image->set(pixel++, clampRGBAValue(totals[0], maxAlpha));" totals[0] -> totals[i].
+
+ 2) Don't apply the divisior divison and bias addition multiple times, accumulated!
+
+ * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
+ (WebCore::setDestinationPixels): Fix two evil bugs, breaking feConvolveMatrix.
+
+2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ relative positioning does not work for radialGradient after window resize
+ https://bugs.webkit.org/show_bug.cgi?id=41249
+
+ Redesign the way resources are invalidated. No longer utilize the DOM tree, specifically SVGStyledElement::svgAttributeChanged(), to invalidate
+ all resources in the ancestor chain (including itself) when any attribute changes. rect.setAttribute("foo", "bar") should never invalidate the
+ resources. Also the old approach didn't work correctly if the root layout changed (eg. window size change) - we failed to invalidate the resources,
+ thus leading to wrong renderings.
+
+ Instead of calling setNeedsLayout(true) from the SVG*Element classes, call RenderSVGResource::markForLayoutAndParentResourceInvalidation(), which
+ does the same thing and invalidates all resources in the ancestor chain (removing the cached results from the HashMaps). This only happens from
+ the various svgAttributeChanged() methods, if we know which attribute changed, and what action has to be taken.
+
+ All SVG renderers now invalidate their own resources on layout() if the layout changed (selfNeedsLayout()=true). The resources will be recreated
+ and cached during the following paint() call.
+
+ Tests: svg/custom/marker-child-changes-css.svg
+ svg/custom/relative-sized-content-with-resources.xhtml
+
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer().
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::layout): Ditto.
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::layout): Ditto.
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::layout): Ditto.
+ * rendering/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::styleDidChange): Added, to invalidate resources on CSS changes, covered by new svg/custom/marker-child-changes-css.svg test.
+ * rendering/RenderSVGModelObject.h:
+ * rendering/RenderSVGResource.cpp:
+ (WebCore::RenderSVGResource::markForLayoutAndResourceInvalidation): Add new "needsBoundaries" parameter, calling setNeedsBoundaries() on the target render object,
+ simplifying all RenderSVGResource* code.
+ (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): New static method used from DOM tree to invalidate all cached resources in the ancestor chain
+ for a render object. Also marks the renderer for layout, if needed.
+ * rendering/RenderSVGResource.h:
+ * rendering/RenderSVGResourceClipper.cpp: Simplify code, remove no longer needed hacks, as invalidation is now carried out by render tree.
+ (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): Add m_invalidationBlocked hack, to avoid invalidations, while we're mutating the render styles (which is a hack!).
+ (WebCore::RenderSVGResourceClipper::invalidateClients): Don't do anything if m_invalidationBlocked=true.
+ (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto.
+ (WebCore::RenderSVGResourceClipper::createClipData): Set m_invalidationBlocked before mutating render styles, as they are restored immediately after creating the clip image.
+ (WebCore::RenderSVGResourceClipper::resourceBoundingBox): Remove no longer needed hack to initialize ClipperData earlier than applyResource() would do.
+ * rendering/RenderSVGResourceClipper.h:
+ * rendering/RenderSVGResourceFilter.cpp:
+ (WebCore::RenderSVGResourceFilter::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
+ (WebCore::RenderSVGResourceFilter::invalidateClient): Remove wrong assertion.
+ * rendering/RenderSVGResourceGradient.cpp:
+ (WebCore::RenderSVGResourceGradient::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
+ (WebCore::RenderSVGResourceGradient::invalidateClient): Remove wrong assertion.
+ * rendering/RenderSVGResourceMarker.cpp:
+ (WebCore::RenderSVGResourceMarker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
+ (WebCore::RenderSVGResourceMarker::invalidateClient): Remove wrong assertion.
+ * rendering/RenderSVGResourceMasker.cpp:
+ (WebCore::RenderSVGResourceMasker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
+ (WebCore::RenderSVGResourceMasker::invalidateClient): Remove wrong assertion.
+ (WebCore::RenderSVGResourceMasker::resourceBoundingBox): Remove no longer needed hack to initializer MaskerData earlier than applyResource() would do.
+ * rendering/RenderSVGResourcePattern.cpp:
+ (WebCore::RenderSVGResourcePattern::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation.
+ (WebCore::RenderSVGResourcePattern::invalidateClient): Remove wrong assertion.
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer().
+ * svg/SVGAnimateMotionElement.cpp:
+ (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true).
+ * svg/SVGAnimateTransformElement.cpp:
+ (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto.
+ * svg/SVGCircleElement.cpp:
+ (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::notifyFinished): Ditto.
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
+ * svg/SVGGElement.cpp:
+ (WebCore::SVGGElement::svgAttributeChanged): Ditto.
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::setCurrentScale): Ditto.
+ (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
+ (WebCore::SVGSVGElement::inheritViewAttributes): Ditto.
+ * svg/SVGStopElement.cpp:
+ (WebCore::SVGStopElement::SVGStopElement): Changed m_offset initialization from 0.0f to 0.
+ (WebCore::SVGStopElement::svgAttributeChanged): Add missing implementation, calling RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) on offsetAttr changes.
+ * svg/SVGStopElement.h:
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::svgAttributeChanged): Don't call invalidateResourceInAncestorChain() on every attribute change, do it in all classes inheriting from us,
+ for specific attributes. Also stop calling RenderSVGResource::invalidateAllResourcesOfRenderer(), all handled in the render tree now.
+ (WebCore::SVGStyledElement::invalidateResourceClients): Early exit, if document is still parsing.
+ * svg/SVGStyledElement.h:
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::svgAttributeChanged): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true).
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::svgAttributeChanged): Ditto.
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
+ * svg/SVGTextPositioningElement.cpp:
+ (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
+ (WebCore::SVGUseElement::updateContainerSizes): Ditto.
+ (WebCore::SVGUseElement::updateContainerOffsets): Ditto.
+
+2010-07-16 Cosmin Truta <ctruta@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Some SVGs with empty <g> elements crash Chromium on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=41175
+
+ Avoid painting of zero-sized image buffers. Skia can't handle it.
+
+ Test: svg/filters/filter-empty-g.svg
+
+ * WebCore/platform/graphics/skia/ImageBufferSkia.cpp:
+ (ImageBuffer::ImageBuffer):
+
+2010-07-16 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Regression in r63100: Don't clear m_loadType in
+ FrameLoader::handledOnloadEvents, as it is used
+ to make some decisions after the load has actually
+ completed.
+
+ Tickling this bug requires manipulation
+ via the API (layout tests don't appear to traverse
+ the correct codepath), so no layout test.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42298
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::handledOnloadEvents): Don't reset m_loadType.
+ (WebCore::FrameLoader::addExtraFieldsToRequest): Set subresource cache
+ policy in one place and don't depend on m_loadType.
+
+2010-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ Added spoolAllPagesWithBoundaries into PrintContext.
+
+ Test: printing/setPrinting.html
+
+ * WebCore.base.exp:
+ * page/PrintContext.cpp:
+ (WebCore::PrintContext::spoolAllPagesWithBoundaries):
+ * page/PrintContext.h:
+
+2010-07-15 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, small style fixes.
+
+ * platform/chromium/ThemeChromiumMac.mm:
+ (WebCore::ThemeChromiumMac::inflateControlPaintRect):
+ * platform/mac/ThemeMac.mm:
+ (WebCore::ThemeMac::inflateControlPaintRect):
+
+2010-07-15 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Update LegacyHTMLTreeBuilder to insert whitespace between </head> and <body>
+ https://bugs.webkit.org/show_bug.cgi?id=42431
+
+ Insert these whitespace text nodes into the HTML element between <head>
+ and <body>, as required by HTML5. Previously, we just dropped them on
+ the floor.
+
+ * html/LegacyHTMLTreeBuilder.cpp:
+ (WebCore::LegacyHTMLTreeBuilder::handleError):
+
+2010-07-15 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] update KURLGoogle decodeURLEscapeSequences to
+ use googleurl public api so it does not access functions in
+ url_canon_internal. This is for chromium multi-dll build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42177
+
+ Test: (unittest) WebKit\chromium\tests\KURLTest.cpp
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::decodeURLEscapeSequences):
+
+2010-07-15 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [Chromium] Update ThemeChromiumMac.mm for the recent changes of ThemeMac.mm
+ https://bugs.webkit.org/show_bug.cgi?id=41932
+
+ Sync with ThemeMac.mm r61760.
+ This change doesn't contain r54299, r57603, r57734, r57741, and
+ r58533 because they conflict with Chromium change for
+ FlippedView().
+
+ * platform/chromium/ThemeChromiumMac.mm:
+ (WebCore::sizeFromNSControlSize):
+ (WebCore::sizeFromFont):
+ (WebCore::controlSizeFromPixelSize):
+ (WebCore::setControlSize):
+ (WebCore::convertControlStatesToThemeDrawState):
+ (WebCore::stepperSizes):
+ (WebCore::stepperControlSizeForFont):
+ (WebCore::paintStepper):
+ (WebCore::ThemeChromiumMac::controlSize):
+ (WebCore::ThemeChromiumMac::minimumControlSize):
+ (WebCore::ThemeChromiumMac::inflateControlPaintRect):
+ (WebCore::ThemeChromiumMac::paint):
+
+2010-07-15 MORITA Hajime <morrita@google.com>
+
+ Reviewed by David Levin.
+
+ [Chromium][Win] Crashes with <keygen> with huge padding.
+ https://bugs.webkit.org/show_bug.cgi?id=41737
+
+ When we try to draw a large region, TransparencyWin can fail to
+ allocate a temporal buffer for composition. This change adds a
+ fallback path to ThemePainter to handle the buffer allocation
+ failure.
+
+ ThemePainter is no longer a subclass of TransparencyWin. It has
+ a TransparencyWin as a member.
+
+ Test: fast/forms/large-parts.html
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::ThemePainter): Added a fallback path.
+
+2010-07-15 Yuzo Fujishima <yuzo@google.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for Bug 42362 - CSSSegmentedFontFace::isLoaded() const is not used anywhere
+ Remove the method.
+ https://bugs.webkit.org/show_bug.cgi?id=42362
+
+ No new tests because of no behavior changes.
+
+ * css/CSSSegmentedFontFace.cpp:
+ * css/CSSSegmentedFontFace.h:
+
+2010-07-15 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add directional property enums to the switch in applyProperty
+ https://bugs.webkit.org/show_bug.cgi?id=42438
+
+ Build fix for chromium mac.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+
+2010-07-13 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Nate Chapin.
+
+ bufferData and bufferSubData generate wrong error when null buffer is bound
+ https://bugs.webkit.org/show_bug.cgi?id=42125
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::bufferData): Call validateBufferDataParameters().
+ (WebCore::WebGLRenderingContext::bufferSubData): Ditto.
+ (WebCore::WebGLRenderingContext::validateBufferDataParameters): Parameters validation for buffer{Sub}Data().
+ * html/canvas/WebGLRenderingContext.h: Declare validateBufferDataParameters().
+
+2010-07-15 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Making the popup label color visible when the item is
+ selected.
+ https://bugs.webkit.org/show_bug.cgi?id=42271
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::paintRow): paint the label text with a
+ different color when it is selected.
+
+2010-07-13 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Nate Chapin.
+
+ WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
+ https://bugs.webkit.org/show_bug.cgi?id=34719
+
+ Tests: fast/canvas/webgl/canvas-test.html
+ fast/canvas/webgl/gl-pixelstorei.html
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::makeRenderingResultsAvailable): Paint the WebGL rendering results to canvas if it's 3d.
+ (WebCore::HTMLCanvasElement::toDataURL): Paint the WebGL rendering results to canvas if it's 3d.
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::drawImage): Paint the WebGL rendering results to canvas if it's 3d before drawing.
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::markContextChanged): Mark it always for canvas2d.drawImage purpose.
+ (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): Paint the WebGL rendering results to canvas if it's dirty.
+ * html/canvas/WebGLRenderingContext.h: Declare paintRenderingResultsToCanvas().
+ * platform/graphics/GraphicsContext3D.h: Declare paintRenderingResultsToCanvas() & paintToCanvas().
+ * platform/graphics/cg/GraphicsContext3DCG.cpp:
+ (WebCore::GraphicsContext3D::paintToCanvas): Paint the rendered image pixels to the canvas.
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
+ * platform/graphics/qt/GraphicsContext3DQt.cpp:
+ (WebCore::GraphicsContext3D::beginPaint): Just call paintRenderingResultsToCanvas().
+ (WebCore::GraphicsContext3D::endPaint):
+ (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
+
+2010-07-15 Nico Weber <thakis@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ chromium/skia: Fix canvas.toDataURL in the presence of transparency
+ https://bugs.webkit.org/show_bug.cgi?id=42214
+
+ The problem was that SkBitmaps contain premultiplied data, but pnglib
+ doesn't expect premultiplied data. Now, the encoder unpremultiplies
+ data before sending it to pnglib.
+
+ Patch partially by deanm.
+
+ Covered by fast/canvas/toDataURL-alpha.html.
+
+ * platform/image-encoders/skia/PNGImageEncoder.cpp:
+ (WebCore::preMultipliedBGRAtoRGBA):
+ (WebCore::encodeImpl):
+ (WebCore::PNGImageEncoder::encode):
+
+2010-07-15 Alex Nicolaou <anicolao@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Convolution computation causes bad alpha channel values
+ https://bugs.webkit.org/show_bug.cgi?id=42273
+
+ Fixed by clamping colour channel values to the alpha value so that
+ r <= a, g <= a, and b <= a after the convolution is applied. See
+ the bug for why I believe the SVG specification needs to be updated.
+ Test must be drawn to crash. 100x100 green rectangle is used to
+ indicate pass to minimize the chance of regression.
+
+ Test: svg/custom/convolution-crash.svg
+
+ * platform/graphics/skia/SkiaUtils.cpp:
+ (WebCore::SkPMColorToColor):
+ * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
+ (WebCore::clampRGBAValue):
+ (WebCore::setDestinationPixels):
+ (WebCore::FEConvolveMatrix::fastSetInteriorPixels):
+ (WebCore::FEConvolveMatrix::fastSetOuterPixels):
+
+2010-07-15 Dumitru Daniliuc <dumi@chromium.org>
+
+ Unreviewed, Chromium-specific changes that I forgot to make in r63278.
+
+ 1. DatabaseTrackerChromium::getMaxSizeForDatabase() is called on
+ the context thread by sync DBs.
+ 2. Forgot to change V8SQLTransactionSyncCustom to return the
+ result set when executeSql() is called.
+
+ * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
+ (WebCore::V8SQLTransactionSync::executeSqlCallback):
+ * storage/chromium/DatabaseTrackerChromium.cpp:
+ (WebCore::DatabaseTracker::getMaxSizeForDatabase):
+
+2010-07-15 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Oliver Hunt.
+
+ [GTK] Simplify the distribution step
+ https://bugs.webkit.org/show_bug.cgi?id=42414
+
+ No new tests as this is just a build change.
+
+ * GNUmakefile.am: Modify EXTRA_DIST directly and make sure the list
+ of files is sorted. Also handle distributing the IDL files from the
+ WebCore source tree.
+
+2010-07-15 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ LegacyHTMLTreeBuilder should insert an implicit <colgroup> before inserting <col> to match HTML5
+ https://bugs.webkit.org/show_bug.cgi?id=42346
+
+ This turned out to be an easy fix.
+
+ This is covered by lots of layout tests. I believe
+ all of the changed results to be progressions.
+
+ This change had no measurable effect on the parser benchmark.
+
+ * html/LegacyHTMLTreeBuilder.cpp:
+ (WebCore::LegacyHTMLTreeBuilder::colCreateErrorCheck):
+ (WebCore::LegacyHTMLTreeBuilder::getNode):
+ * html/LegacyHTMLTreeBuilder.h:
+
+2010-07-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42410
+ Many leaking DatasetDOMStringMaps seen on buildbot
+
+ * dom/NodeRareData.h:
+ (WebCore::NodeRareData::~NodeRareData): Add a virtual destructor so
+ that the ElementRareData's destructor will be called when this is deleted
+ from the Node's destructor.
+
+2010-07-15 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: Crash when table has empty thead tag
+ https://bugs.webkit.org/show_bug.cgi?id=42391
+
+ Test: accessibility/table-with-empty-thead-causes-crash.html
+
+ * accessibility/AccessibilityTableColumn.cpp:
+ (WebCore::AccessibilityTableColumn::headerObjectForSection):
+
+2010-07-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Start loading plug-in streams
+ https://bugs.webkit.org/show_bug.cgi?id=42407
+
+ Export some ResourceRequestBase getters.
+
+ * WebCore.exp.in:
+
+2010-07-15 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Nate Chapin.
+
+ Query of NUM_COMPRESSED_TEXTURE_FORMATS must be handled by WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=42401
+
+ No new tests; covered by gl-get-calls.html.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getParameter):
+ - Return 0 for getParameter(NUM_COMPRESSED_TEXTURE_FORMATS).
+
+2010-07-07 John Gregg <johnnyg@google.com>
+
+ Reviewed by Jian Li.
+
+ Experimental directory upload feature.
+ https://bugs.webkit.org/show_bug.cgi?id=40872
+
+ This patch adds a new HTML attribute webkitdirectory which applies to
+ <input type="file"> tags and allows the user to specify a folder
+ which is recursively enumerated so that all the files in that folder
+ are added to the file list.
+
+ The files chosen in that way have a .webkitRelativePath attribute which contains
+ the relative path starting from the chosen folder. The relative path is
+ also appended to each item in the FormData when uploaded.
+
+ All the code is behind an ENABLE_DIRECTORY_UPLOAD flag.
+
+ Test: fast/forms/input-file-directory-upload.html
+
+ * html/Blob.cpp:
+ (WebCore::Blob::Blob):
+ * html/Blob.h:
+ * html/File.cpp:
+ (WebCore::File::File):
+ (WebCore::File::Init):
+ (WebCore::File::webkitRelativePath):
+ * html/File.h:
+ (WebCore::File::create):
+ * html/File.idl:
+ * html/HTMLAttributeNames.in: add webkitdirectory attribute
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setFileListFromRenderer):
+ (WebCore::HTMLInputElement::webkitdirectory):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ * platform/BlobItem.cpp:
+ (WebCore::FileBlobItem::create):
+ (WebCore::FileBlobItem::FileBlobItem):
+ * platform/BlobItem.h:
+ (WebCore::FileBlobItem::relativePath):
+ * platform/FileChooser.h:
+ (WebCore::FileChooser::allowsDirectoryUpload):
+ * platform/network/FormData.cpp:
+ (WebCore::FormData::appendKeyValuePairItems):
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::allowsMultipleFiles):
+ (WebCore::RenderFileUploadControl::allowsDirectoryUpload):
+ * rendering/RenderFileUploadControl.h:
+
+2010-07-15 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Avoid creating huge compositing layers for elements that project outside the viewport
+ https://bugs.webkit.org/show_bug.cgi?id=42338
+
+ The logic that computed the bounds of compositing layers naively used the
+ union of the bounds of descendant, non-composited RenderLayers, without regard
+ to what is actually visible. This could result in huge layers for page with
+ elements are large negative offsets, or with large negative text-indent (both
+ common).
+
+ For elements without transforms on them or in their ancestor chain, and when
+ no 3d transforms or hardware-accelerated animations are used, can clip compositing
+ layers to the size of the document, or based on CSS overflow and clip.
+
+ Tests: compositing/geometry/limit-layer-bounds-clipping-ancestor.html
+ compositing/geometry/limit-layer-bounds-fixed-positioned.html
+ compositing/geometry/limit-layer-bounds-overflow-repaint.html
+ compositing/geometry/limit-layer-bounds-positioned-transition.html
+ compositing/geometry/limit-layer-bounds-positioned.html
+ compositing/geometry/limit-layer-bounds-transformed-overflow.html
+ compositing/geometry/limit-layer-bounds-transformed.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::enclosingOverflowClipAncestor): Walk up the RenderLayer tree
+ looking for an ancestor that has overflow, or to the root. Along the way, check for
+ transformed elements.
+ (WebCore::RenderLayerBacking::updateCompositedBounds): If we're in "consult
+ overlap" mode, and we don't have transforms, then constrain the bounds
+ of composited layers by the RenderView's layoutOverflowRect(), or by the
+ enclosing layer with overflow.
+ (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): If the offset from the renderer changes,
+ we need to repaint the layer.
+
+2010-07-15 Alex Nicolaou <anicolao@chromium.org>
+
+ Reviewed by Dirk Schulze.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42228
+
+ SVG Masks were in the wrong colour space for non-CG graphics layers,
+ because for those cases ImageBuffer needs to be explicitly told to
+ convert the pixels. This change adds a test that demonstrates the
+ problem and the conversion call to make the mask LinearRGB.
+
+ Test: svg/custom/mask-colorspace.svg
+
+ * rendering/RenderSVGResourceMasker.cpp:
+ (WebCore::RenderSVGResourceMasker::createMaskImage):
+
+2010-07-15 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ [Mac] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=37929
+
+ Export symbols for WebCore::markerTextForListItem() and WebCore::toElement().
+
+ * WebCore.exp.in:
+
+2010-07-15 Andreas Kling <andreas.kling@nokia.com>
+
+ Rubber-stamped by Kenneth Rohde Christiansen.
+
+ [Qt] Remove an unused variable in BitmapImage::draw()
+
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::BitmapImage::draw): Remove selfSize.
+
+2010-07-15 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: pass all parameters to WebInspector.addConsoleMessage as a single payload object
+ https://bugs.webkit.org/show_bug.cgi?id=42345
+
+ This refactoring is covered by existing console tests.
+
+ * bindings/js/ScriptArray.cpp:
+ (WebCore::ScriptArray::set):
+ * bindings/js/ScriptArray.h:
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::jsArray):
+ * bindings/v8/ScriptArray.cpp:
+ (WebCore::ScriptArray::set):
+ * bindings/v8/ScriptArray.h:
+ (WebCore::ScriptArray::ScriptArray):
+ (WebCore::ScriptArray::~ScriptArray):
+ * inspector/ConsoleMessage.cpp:
+ (WebCore::ConsoleMessage::addToFrontend):
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addConsoleMessage):
+ * inspector/InspectorFrontend.h:
+ * inspector/front-end/ConsoleView.js:
+ (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
+ (WebInspector.ConsoleMessage):
+ (WebInspector.ConsoleMessage.createTextMessage):
+ (WebInspector.ConsoleCommandResult):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.generateStylesheet):
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName.myCallback):
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.prototype._checkWarning):
+ * inspector/front-end/inspector.js:
+ (WebInspector.updateConsoleMessageExpiredCount):
+ (WebInspector.addConsoleMessage):
+ (WebInspector.log.logMessage):
+ (WebInspector.log):
+
+2010-07-14 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Backfill DNS and connect times rather than exposing hard zeros
+ https://bugs.webkit.org/show_bug.cgi?id=42303
+
+ There are several cases where domain lookup is not performed and/or a new connection is not established. Previously in these cases, we exposed a "0" to the API. Now, we instead "backfill" with the most recent mark's time.
+
+ Also, previously, I was using the ResourceLoadTiming API incorrectly. Each mark is an integer representing offset in milliseconds from requestTime. So all values need to be added to requestTime.
+
+ No new test because existing test expectations are set to FAIL because disable disabled by default. The expected results of existings tests change as expected when enabled.
+
+ * page/Timing.cpp:
+ (WebCore::toIntegerMilliseconds): Move to file static instead of class static because it might generate more optimal code. Also, instead of converting negative doubles to zero, ASSERT that they are >= 0. This is because we no longer expose hard zeros for DNS and connect, so we want to be sure that the -1s returned by the API are properly handled.
+ (WebCore::Timing::domainLookupStart):
+ (WebCore::Timing::domainLookupEnd):
+ (WebCore::Timing::connectStart):
+ (WebCore::Timing::connectEnd):
+ (WebCore::Timing::requestStart):
+ (WebCore::Timing::requestEnd):
+ (WebCore::Timing::responseStart):
+ * page/Timing.h:
+
+2010-07-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: differentiate between blocking and connecting timers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42372
+
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::InspectorResource):
+ (WebCore::InspectorResource::updateResponse):
+ (WebCore::InspectorResource::updateScriptObject):
+ (WebCore::InspectorResource::buildObjectForTiming):
+ * inspector/InspectorResource.h:
+ * inspector/front-end/Resource.js:
+ (WebInspector.Resource.prototype.get cached):
+ (WebInspector.Resource.prototype.set cached):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourcesPanel.prototype._showPopover):
+ (WebInspector.ResourceGraph):
+ (WebInspector.ResourceGraph.prototype.refresh):
+ (WebInspector.ResourceGraph.prototype._cachedChanged):
+ * inspector/front-end/inspector.js:
+ (WebInspector.updateResource):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadedResourceFromMemoryCache):
+ * loader/FrameLoader.h:
+ * platform/network/ResourceResponseBase.cpp:
+ (WebCore::ResourceResponseBase::ResourceResponseBase):
+ (WebCore::ResourceResponseBase::connectionReused):
+ (WebCore::ResourceResponseBase::setConnectionID):
+ * platform/network/ResourceResponseBase.h:
+
+2010-07-15 MORITA Hajime <morrita@google.com>
+
+ Text layout is wrong with a SVG Font that lacks <missing-glyph> element
+ https://bugs.webkit.org/show_bug.cgi?id=42352
+
+ floatWidthOfSubStringUsingSVGFont() calculated a wrong value for a
+ sub-run, and a fallback to system font triggers such a computation.
+ This change made floatWidthOfSubStringUsingSVGFont() to deal with
+ sub-runs.
+
+ Test: svg/custom/svg-fonts-without-missing-glyph.xhtml
+
+ * svg/SVGFont.cpp:
+ (WebCore::floatWidthOfSubStringUsingSVGFont):
+
+2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Cycle detection needs to include shadow tree
+ https://bugs.webkit.org/show_bug.cgi?id=42360
+
+ Search for cycles in shadow tree fragments as well. Extended the svg/custom/recursion-* tests. No more crashes in any of them.
+
+ * rendering/RenderSVGResourceContainer.h:
+ (WebCore::RenderSVGResourceContainer::containsCyclicReference):
+ * rendering/RenderSVGShadowTreeRootContainer.cpp: Implemented here, not inline, so that clients don't need to include SVGShadowTreeElements.h
+ (WebCore::RenderSVGShadowTreeRootContainer::rootElement): Expose helper function, that returns the shadow tree root element as Node*.
+ * rendering/RenderSVGShadowTreeRootContainer.h:
+
+2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ clipPath is missing cycle detection
+ https://bugs.webkit.org/show_bug.cgi?id=42350
+
+ Detect cyclic clipper resources, and ignore them on rendering. Early exit in applyResource just like the pattern/mask resources do.
+
+ * rendering/RenderSVGResourceClipper.cpp:
+ (WebCore::RenderSVGResourceClipper::applyResource):
+ (WebCore::RenderSVGResourceClipper::hitTestClipContent):
+ (WebCore::RenderSVGResourceClipper::childElementReferencesResource):
+ * rendering/RenderSVGResourceClipper.h:
+
+2010-07-15 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fix a leak of Vector instances seen on the build bot.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::drawBoxSideFromPath): Don't unnecessarily heap allocate then leak the DashArray.
+
+2010-07-15 Mark Rowe <mrowe@apple.com>
+
+ Update the sorting in the Xcode project files.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ SVG patterns and masks should not be able to reference themselves
+ https://bugs.webkit.org/show_bug.cgi?id=32171
+
+ Pattern still had an issue, when using constructs like:
+ <pattern id="pattern1" xlink:href="#pattern2"/>
+ <pattern id="pattern2"><rect fill="url(#pattern1)"/></pattern>
+
+ Extended test svg/custom/recursive-pattern.svg to cover this situation.
+
+ * rendering/RenderSVGResourcePattern.cpp:
+ (WebCore::RenderSVGResourcePattern::applyResource): Don't perform the cycle check against node()...
+ (WebCore::RenderSVGResourcePattern::createTileImage): .. but against the "patternContentElement" which respect the xlink:href chaining.
+
+2010-07-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Adam Barth.
+
+ Pixel test failure in moving-shadow-on-path.html and moving-shadow-on-container.html
+ https://bugs.webkit.org/show_bug.cgi?id=42249
+
+ Partly revert <http://trac.webkit.org/changeset/63307>. The RenderSVGRoot change caused a pixel test regression in two fast/repaint tests.
+
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::layout): Include selfNeedsLayout() check in LayoutStateRepainter argument.
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63352.
+ http://trac.webkit.org/changeset/63352
+ https://bugs.webkit.org/show_bug.cgi?id=42341
+
+ Broke plugin-initiate-popup-window.html and plugin-javascript-
+ access.html on snow leopard (Requested by abarth on #webkit).
+
+ * bindings/v8/NPV8Object.cpp:
+ (_NPN_EvaluateHelper):
+
+2010-07-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make the LegacyHTMLTreeBuilder coalesce text nodes
+ https://bugs.webkit.org/show_bug.cgi?id=42314
+
+ This is slightly tricky as we're side-stepping the old
+ parsers insertion logic in the cases where we know we can
+ safely merge text into an existing text node instead of
+ inserting a new one.
+
+ This affects lots of tests (which will need to change for
+ the HTML5 TreeBuilder anyway) and causes the LegacyHTMLTreeBuilder
+ to now pass a bunch more subtests in html5lib/runner.html.
+
+ The parser benchmark thinks that this is a small speedup.
+ I think I happen to have been lucky enough to get the right
+ cache alignment, and that this is likely a wash.
+
+ * html/LegacyHTMLTreeBuilder.cpp:
+ (WebCore::LegacyHTMLTreeBuilder::parseToken):
+
+2010-07-14 Evan Stade <estade@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] Linux scrollbar steppers are "clickable" even when disabled
+ https://bugs.webkit.org/show_bug.cgi?id=42231
+
+ Not tested by layout tests.
+
+ * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+ (WebCore::ScrollbarThemeChromiumLinux::paintButton):
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63389.
+ http://trac.webkit.org/changeset/63389
+ https://bugs.webkit.org/show_bug.cgi?id=42311
+
+ It broke the Chromium Linux build. (Requested by dave_levin on
+ #webkit).
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::decodeURLEscapeSequences):
+
+2010-07-13 Mirko Damiani <mirko@develer.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] CSS border style not cleared for SVG object
+ https://bugs.webkit.org/show_bug.cgi?id=42150
+
+ For tests and description see:
+ https://bugs.webkit.org/show_bug.cgi?id=25738
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::setLineDash):
+
+2010-07-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ HTMLTreeBuilder shouldn't crash during fast/parser/remove-parser-current-node.html
+ https://bugs.webkit.org/show_bug.cgi?id=42312
+
+ We were crashing because of an ASSERT I added to the attach logic in
+ the HTMLConstructionSite. I knew this ASSERT was wrong when I added
+ it, I just wanted to make sure we had test coverage of those cases.
+ Turns out we do! :)
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::attach):
+ (WebCore::HTMLConstructionSite::attachAtSite):
+
+2010-07-14 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] update KURLGoogle decodeURLEscapeSequences to
+ use googleurl public api so it does not access functions in
+ url_canon_internal. This is for chromium multi-dll build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42177
+
+ Test: (unittest) WebKit\chromium\tests\KURLTest.cpp
+
+ * platform/KURLGoogle.cpp:
+ (WebCore::decodeURLEscapeSequences):
+
+2010-07-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Avoid extra memcpy of character tokens
+ https://bugs.webkit.org/show_bug.cgi?id=42002
+
+ Eric tells me this patch makes the new tree builder 1% faster than the
+ old tree builder on our parser benchmark.
+
+ * html/HTMLToken.h:
+ (WebCore::AtomicHTMLToken::AtomicHTMLToken):
+ (WebCore::AtomicHTMLToken::characters):
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
+ (WebCore::convertToOldStyle):
+ (WebCore::HTMLTreeBuilder::processFakeCharacters):
+
+2010-07-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ HTMLTreeBuilder foster parents when it should not
+ https://bugs.webkit.org/show_bug.cgi?id=42235
+
+ Regarding foster parenting of nodes inside tables:
+ "Process the token using the rules for the "in body" insertion mode,
+ except that if the current node is a table, tbody, tfoot, thead, or
+ tr element, then, whenever a node would be inserted into the current
+ node, it must instead be foster parented."
+
+ We were forgetting the "when the current node is" part of that check
+ and always foster parenting, even if we had just inserted another
+ element (which would have just changed the current node).
+
+ This was covered by multiple tests in html5lib/runner.html
+ but I wrote a reduction (one which I included) as it makes it
+ easier to see what's going on.
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLNames::causesFosterParenting):
+ (WebCore::HTMLConstructionSite::attach):
+ (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
+ (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
+ (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
+ (WebCore::HTMLConstructionSite::insertTextNode):
+ (WebCore::HTMLConstructionSite::shouldFosterParent):
+ * html/HTMLConstructionSite.h:
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
+
+2010-07-14 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/8131355> Apps load stale versions of pages when initial load happens via back/forward navigation.
+
+ No test case is added because DumpRenderTree is not able to test the scenario where the initial load in a WebView
+ occurs via a back/forward navigation.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::navigateToDifferentDocument): When the first load in a page is a back/forward navigation, we
+ shouldn't try to prefer cached data but should do revalidation by default.
+ (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
+
+2010-07-14 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Breaks all dependencies on Page from platform/ and cleans up GLES2Context lifetime
+ https://bugs.webkit.org/show_bug.cgi?id=42203
+
+ Rather than constructing a GLES2Context from a Page, pass the LayerRendererChromium
+ a GLES2Context in from the constructor. This way the platform/ directory can remain
+ ignorant of Page and friends. Also adds functions on ChromeClientChromium to request
+ onscreen and offscreen GLES2Contexts for callers in WebCore that need them.
+
+ * page/chromium/ChromeClientChromium.h:
+ * platform/chromium/GLES2Context.h:
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::create):
+ (WebCore::LayerRendererChromium::LayerRendererChromium):
+ * platform/graphics/chromium/LayerRendererChromium.h:
+
+2010-07-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Add functions to extract individual RGBA32 components
+ https://bugs.webkit.org/show_bug.cgi?id=42305
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::willDraw): Use alphaChannel()
+ * platform/graphics/Color.h:
+ (WebCore::redChannel):
+ (WebCore::greenChannel):
+ (WebCore::blueChannel):
+ (WebCore::alphaChannel):
+ (WebCore::Color::red):
+ (WebCore::Color::green):
+ (WebCore::Color::blue):
+ (WebCore::Color::alpha):
+
+2010-07-14 Alexey Proskuryakov <ap@apple.com>
+
+ Not reviewed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42201
+ Use ResourceHandle object for synchronous loading
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::loadResourceSynchronously): Fix an obvious typo.
+
+2010-07-14 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42201
+ Use ResourceHandle object for synchronous loading
+
+ Fix a Tiger test failure.
+
+ Setting NSURLRequest properties has been moved to createNSURLConnection to share code between
+ sync and async cases, but on Tiger, we don't call this function.
+
+ There is more refactoring needed to make this nice, and we need to figure out if some of
+ request-tweaking code in createNSURLConnection needs to run on every redirect, as it happens
+ with CFNetwork version.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::loadResourceSynchronously): Set main document for cookies, which is
+ the only thing we've been missing.
+
+2010-07-14 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ * WebCore.xcodeproj/project.pbxproj: Silence rsync.
+
+2010-07-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Fix warning seen with newer gcc (on Qt buildbot).
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
+ Add parentheses around && expression.
+
+2010-07-14 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Avoid extra memcpy of character tokens
+ https://bugs.webkit.org/show_bug.cgi?id=42002
+
+ This patch is just some cleanup to make fixing this bug easier.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::~ExternalCharacterTokenBuffer):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::isEmpty):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingWhitespace):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeadingWhitespace):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo):
+ (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):
+ (WebCore::HTMLTreeBuilder::processDoctypeToken):
+ (WebCore::HTMLTreeBuilder::processStartTag):
+ (WebCore::HTMLTreeBuilder::processEndTag):
+ (WebCore::HTMLTreeBuilder::processComment):
+ (WebCore::HTMLTreeBuilder::processCharacter):
+ (WebCore::HTMLTreeBuilder::processCharacterBuffer):
+ (WebCore::HTMLTreeBuilder::processEndOfFile):
+ (WebCore::HTMLTreeBuilder::defaultForInitial):
+ (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
+ (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
+ (WebCore::HTMLTreeBuilder::defaultForInHead):
+ (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
+ (WebCore::HTMLTreeBuilder::defaultForAfterHead):
+ (WebCore::HTMLTreeBuilder::defaultForInTableText):
+ * html/HTMLTreeBuilder.h:
+
+2010-07-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Canvas: Don't add shadow rect to dirty region when shadow alpha is 0
+ https://bugs.webkit.org/show_bug.cgi?id=42300
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::willDraw):
+
+2010-07-14 Kevin Ollivier <kevino@theolliviers.com>
+
+ [CURL] Build fix after request -> firstRequest rename.
+
+ * platform/network/curl/FormDataStreamCurl.cpp:
+ (WebCore::FormDataStream::read):
+ (WebCore::FormDataStream::hasMoreElements):
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::headerCallback):
+ (WebCore::ResourceHandleManager::setupPOST):
+ (WebCore::parseDataUrl):
+ (WebCore::ResourceHandleManager::dispatchSynchronousJob):
+ (WebCore::ResourceHandleManager::startJob):
+ (WebCore::ResourceHandleManager::initializeHandle):
+
+2010-07-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/8186963> Expose information about compositing layers.
+
+ Expose information about the types of compositing layers via RenderLayerBacking::compositingLayerType().
+
+ * WebCore.exp.in: Export WebCore::SpaceSplitStringData::createVector().
+ * WebCore.xcodeproj/project.pbxproj: Make RenderLayerBacking.h a Private header for use by WebKit.
+ * platform/graphics/GraphicsLayer.h: Add hasContentsLayer() and usingTiledLayer() methods.
+ (WebCore::GraphicsLayer::hasContentsLayer):
+ (WebCore::GraphicsLayer::usingTiledLayer):
+ * platform/graphics/mac/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::hasContentsLayer): Return true if we have a contents layer.
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::compositingLayerType): Return information about the type of composited layer.
+ * rendering/RenderLayerBacking.h:
+
+2010-07-14 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ TreeWalker::previousSibling calls firstChild instead of lastChild when handling FILTER_SKIP
+ https://bugs.webkit.org/show_bug.cgi?id=42008
+
+ TreeWalker::previousNode does not handle FILTER_REJECT when processing lastChild
+ https://bugs.webkit.org/show_bug.cgi?id=42010
+
+ Tests: fast/dom/TreeWalker/previousNodeLastChildReject.html
+ fast/dom/TreeWalker/previousSiblingLastChildSkip.html
+
+ * dom/TreeWalker.cpp:
+ (WebCore::TreeWalker::previousSibling): Call lastChild instead of firstChild.
+ (WebCore::TreeWalker::previousNode): Fix handling of FILTER_REJECT by exiting
+ the lastChild loop when we encounter it.
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Brady Eidson.
+
+ Fix crashing layout test on snowleopard.
+
+ * platform/mac/CursorMac.mm:
+ (WebCore::Cursor::ensurePlatformCursor): Make sure to retain the cursor.
+
+2010-07-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: aria-checked not recognized on image map radio buttons
+ https://bugs.webkit.org/show_bug.cgi?id=42055
+
+ Moves some code from AccessibilityRenderObject to AccessibilityObject so that
+ elements that do not have render objects, but do have Nodes (like image map links
+ and list box options) can still make use of certain aria attributes.
+
+ Test: platform/mac/accessibility/image-map-link-used-as-radiobutton.html
+
+ * accessibility/AccessibilityImageMapLink.cpp:
+ (WebCore::AccessibilityImageMapLink::roleValue):
+ (WebCore::AccessibilityImageMapLink::accessibilityDescription):
+ (WebCore::AccessibilityImageMapLink::title):
+ Make imageMap use standard AccessibilityObject methods for getAttribute()
+ * accessibility/AccessibilityImageMapLink.h:
+ (WebCore::AccessibilityImageMapLink::node):
+ * accessibility/AccessibilityListBoxOption.cpp:
+ (WebCore::AccessibilityListBoxOption::accessibilityIsIgnored):
+ (WebCore::AccessibilityListBoxOption::stringValue):
+ * accessibility/AccessibilityListBoxOption.h:
+ (WebCore::AccessibilityListBoxOption::node):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::language):
+ Language method doesn't need a node() anymore, it can use the node from AccessibilityObject.
+ (WebCore::renderListItemContainerForNode):
+ (WebCore::AccessibilityObject::getAttribute):
+ (WebCore::AccessibilityObject::intValue):
+ Move intValue into AccessibilityObject.
+ (WebCore::AccessibilityObject::hasIntValue):
+ * accessibility/AccessibilityObject.h:
+ (WebCore::AccessibilityObject::isCheckbox):
+ (WebCore::AccessibilityObject::isRadioButton):
+ (WebCore::AccessibilityObject::isCheckboxOrRadio):
+ Consolidate what defines a checkbox and radio button into AccessibilityObject.
+ (WebCore::AccessibilityObject::node):
+ (WebCore::AccessibilityObject::headingLevel):
+ (WebCore::AccessibilityObject::isDetached):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::isPasswordField):
+ (WebCore::AccessibilityRenderObject::headingLevel):
+ (WebCore::AccessibilityRenderObject::selectedTabItem):
+ (WebCore::AccessibilityRenderObject::hierarchicalLevel):
+ (WebCore::AccessibilityRenderObject::node):
+ (WebCore::AccessibilityRenderObject::intValue):
+ * accessibility/AccessibilityRenderObject.h:
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::itemAccessibilityText):
+ Stop using AccessibilityObjects getAttribute (no reason to use it really).
+
+2010-07-14 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7759909> Certain text runs measure 1 pixel wider when measured as a whole than when measured piecewise
+ https://bugs.webkit.org/show_bug.cgi?id=42279
+
+ No test because the issue cannot be reproduced with standard fonts.
+
+ Word- and run-rounding works by advancing ahead to the nearest integral width. As the total
+ width accumulated becomes large, the float type’s low precision results in accumulated rounding
+ error, sometimes crossing an integer. Consequently, word-rounding makes different decisions when
+ measuring a multi-word run than when measuring its words individually. To work around this,
+ word- and run-rounding are applied only to the width accumulated since the last rounding
+ character.
+
+ * platform/graphics/WidthIterator.cpp:
+ (WebCore::WidthIterator::advance):
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
+
+2010-07-14 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix enum value names for Navigation.{idl|h}
+ https://bugs.webkit.org/show_bug.cgi?id=42282
+
+ This is necessary after https://bugs.webkit.org/show_bug.cgi?id=42250.
+
+ No new tests because no new functionality.
+
+ * page/Navigation.cpp:
+ (WebCore::Navigation::type):
+ * page/Navigation.h:
+ (WebCore::Navigation::):
+
+2010-07-14 Johnny Ding <jnd@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41292
+ Set right UserGestureIndicator to indicate whether the NPN_Evaluate allows popup window or not.
+
+ Test: plugins/plugin-initiate-popup-window.html
+
+ * bindings/v8/NPV8Object.cpp:
+ (_NPN_EvaluateHelper):
+
+2010-07-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Bug 42117 - AX: Data table heuristics: consider assuming data table for 'zebra-striped' rows
+ https://bugs.webkit.org/show_bug.cgi?id=42117
+
+ Test: platform/mac/accessibility/table-with-zebra-rows.html
+
+ * accessibility/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
+
+2010-07-14 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: VoiceOver cannot navigate this page because Safari is taking too long
+ https://bugs.webkit.org/show_bug.cgi?id=42219
+
+ No tests. Existing tests cover change.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::boundingBoxRect):
+
+2010-07-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Canvas: Fast-path for assigning the same color string as before to fillStyle or strokeStyle
+ https://bugs.webkit.org/show_bug.cgi?id=42272
+
+ Always route assignment of color strings via setFillColor() or setStrokeColor()
+ where we can check it against the previous value and return early if it's the same.
+
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::toHTMLCanvasStyle):
+ (WebCore::JSCanvasRenderingContext2D::strokeStyle):
+ (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
+ (WebCore::JSCanvasRenderingContext2D::setFillStyle):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setStrokeStyle):
+ (WebCore::CanvasRenderingContext2D::setFillStyle):
+ (WebCore::CanvasRenderingContext2D::setStrokeColor):
+ (WebCore::CanvasRenderingContext2D::setFillColor):
+ * html/canvas/CanvasRenderingContext2D.h:
+
+2010-07-14 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Separate line-ending conversion code from BlobItem
+ https://bugs.webkit.org/show_bug.cgi?id=40932
+
+ Add common line-ending normalization code under platform/text.
+ No new tests as it doesn't change any functionality.
+
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/BlobBuilder.cpp:
+ (WebCore::BlobBuilder::appendString):
+ * html/FormDataList.cpp:
+ (WebCore::FormDataList::appendString):
+ * platform/BlobItem.cpp:
+ * platform/BlobItem.h:
+ * platform/text/LineEnding.cpp: Added.
+ * platform/text/LineEnding.h: Added.
+
+2010-07-14 Erik Arvidsson <arv@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Implement border-start and border-end properties
+ https://bugs.webkit.org/show_bug.cgi?id=41782
+
+ Test: fast/css/border-start-end.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSProperty.cpp:
+ (WebCore::CSSProperty::resolveDirectionAwareProperty):
+ * css/CSSPropertyNames.in:
+ * inspector/front-end/SourceCSSTokenizer.js:
+ (WebInspector.SourceCSSTokenizer):
+
+2010-07-14 Alexey Proskuryakov <ap@apple.com>
+
+ Tiger and Gtk build fixes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42201
+ Use ResourceHandle object for synchronous loading
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::createNSURLConnection):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp):
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ - Converted Mac and Windows Cursor implementations to lazily
+ create the platform cursor.
+ - Add HostWindow function to set the cursor and use it from Widget::setCursor.
+ - Rework Windows cursor code to use fewer global variables.
+
+ * WebCore.exp.in: Updated
+ * loader/EmptyClients.h:
+ (WebCore::EmptyChromeClient::setCursor):
+ (WebCore::EmptyChromeClient::setLastSetCursorToCurrentCursor):
+ Added empty implementations.
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::setCursor):
+ * page/Chrome.h:
+ * page/ChromeClient.h:
+ Change existing setCursor() function to take a Cursor instead of a
+ PlatformCursorHandle. Added setLastSetCursorToCurrentCursor.
+
+ * platform/Cursor.cpp:
+ * platform/Cursor.h:
+ Added Cursor Type and the option of lazily creating the native cursor
+ (used on Mac and Windows for now).
+
+ * platform/HostWindow.h:
+ Add setCursor.
+
+ * platform/mac/CursorMac.mm:
+ (WebCore::createCustomCursor): This no longer needs to call determineHotSpot
+ as that is done when on construction of the cursor now and the hotSpot passed
+ in is correct.
+ (WebCore::Cursor::ensurePlatformCursor):
+ (WebCore::Cursor::Cursor):
+ (WebCore::Cursor::~Cursor):
+ (WebCore::Cursor::operator=):
+ (WebCore::Cursor::platformCursor):
+ Convert to lazily creating the native cursor on the first request and
+ storing the type.
+
+ * platform/mac/WidgetMac.mm:
+ (WebCore::Widget::setCursor):
+ Use HostWindow::setCursor to set the cursor. This in turn will call the
+ ChromeClient.
+
+ * platform/win/CursorWin.cpp:
+ (WebCore::createSharedCursor):
+ (WebCore::loadSharedCursor):
+ (WebCore::loadCursorByName):
+ (WebCore::Cursor::ensurePlatformCursor):
+ (WebCore::SharedCursor::~SharedCursor):
+ (WebCore::Cursor::Cursor):
+ (WebCore::Cursor::~Cursor):
+ (WebCore::Cursor::operator=):
+ (WebCore::Cursor::platformCursor):
+ Convert to lazily creating the native cursor on the first request and
+ storing the type.
+
+ * platform/win/WidgetWin.cpp:
+ (WebCore::Widget::setCursor):
+ Use HostWindow::setCursor to set the cursor. This in turn will call the
+ ChromeClient.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::handleMouseEvent):
+ Use the new setLastSetCursorToCurrentCursor client function to ensure
+ the cursor is properly updated when over a plugin.
+
+ * platform/chromium/CursorChromium.cpp:
+ * platform/efl/CursorEfl.cpp:
+ * platform/gtk/CursorGtk.cpp:
+ * platform/haiku/CursorHaiku.cpp:
+ * platform/wince/CursorWince.cpp:
+ * platform/wx/CursorWx.cpp:
+ * platform/qt/CursorQt.cpp:
+ Change m_impl -> m_platformCursor.
+
+2010-07-13 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ reconstructActiveFormElements should reconstruct attributes as well
+ https://bugs.webkit.org/show_bug.cgi?id=42222
+
+ The case in question is "<p><b foo='bar'></p>text</b>".
+ When the "b" is re-opened to wrap the text it should include
+ any attributes from the original (now closed) tag name.
+
+ There are also similar cases for the Adoption Agency algorithm, but since
+ the html5lib test suite did not cover those (and it wasn't immediately
+ obvious to me how to test those) I've saved fixing that bug for a
+ later patch. For now I've just made the adoption agency use
+ HTMLConstructionSite::createHTMLElementFromElementRecord so the
+ FIXME can be in one place instead of two.
+
+ In order to cleanly support createHTMLElementFromSavedElement
+ I re-factored "attachToCurrent" out from createHTMLElementAndAttachToCurrent
+ and changed all callers to use attachToCurrent(createHTMLElement(token)).
+
+ This is covered by two existing tests in html5lib/runner.html
+ and I wrote two more. One to cover the basic case that we now pass
+ and a second to cover an evil edge case which we do not.
+
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::attachToCurrent):
+ (WebCore::HTMLConstructionSite::insertHTMLHtmlElement):
+ (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
+ (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
+ (WebCore::HTMLConstructionSite::insertHTMLElement):
+ (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
+ (WebCore::HTMLConstructionSite::insertScriptElement):
+ (WebCore::HTMLConstructionSite::insertForeignElement):
+ (WebCore::HTMLConstructionSite::createHTMLElementFromElementRecord):
+ (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
+ (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
+ * html/HTMLConstructionSite.h:
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
+
+2010-07-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42201
+ Use ResourceHandle object for synchronous loading
+
+ * platform/network/ResourceHandle.cpp:
+ (WebCore::ResourceHandle::ResourceHandle): Moved common tasks from create() to constructor.
+ (WebCore::ResourceHandle::firstRequest): Renamed from request(). This is not changed with
+ redirect, so the old name was quite confusing.
+
+ * platform/network/ResourceHandle.h: Made createNSURLConnection() a member function, since
+ it now needs access to both ResourceHandle and ResourceHandleInternal. Added createCFURLConnection().
+
+ * platform/network/ResourceHandleInternal.h:
+ (WebCore::ResourceHandleInternal::ResourceHandleInternal): Renamed m_request to m_firstRequest.
+
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCoreSynchronousLoaderClient): Replaced an Objective C delegate class with a ResourceHandleClient
+ subclass. This allows for much better code sharing, with common logic is in ResourceHandle.
+ (WebCore::ResourceHandle::createNSURLConnection): Factored out more code that is common
+ between sync and async parts.
+ (WebCore::ResourceHandle::start): Ditto.
+ (WebCore::ResourceHandle::cancel): Updated for firstRequest() renaming.
+ (WebCore::ResourceHandle::loadResourceSynchronously): Use ResourceHandle and ResourceHandleClient,
+ like a good loader.
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Updated for firstRequest() renaming.
+ (WebCore::ResourceHandle::receivedCredential): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): Ditto.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::WebCoreSynchronousLoaderClient::create):
+ (WebCore::WebCoreSynchronousLoaderClient::setAllowStoredCredentials):
+ (WebCore::WebCoreSynchronousLoaderClient::isDone):
+ (WebCore::WebCoreSynchronousLoaderClient::data):
+ (WebCore::WebCoreSynchronousLoaderClient::WebCoreSynchronousLoaderClient):
+ (WebCore::willSendRequest):
+ (WebCore::didReceiveResponse):
+ (WebCore::didReceiveData):
+ (WebCore::shouldUseCredentialStorageCallback):
+ (WebCore::didFinishLoading):
+ (WebCore::didFail):
+ (WebCore::didReceiveChallenge):
+ (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
+ (WebCore::ResourceHandle::~ResourceHandle):
+ (WebCore::ResourceHandle::createCFURLConnection):
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
+ (WebCore::ResourceHandle::receivedCredential):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ (WebCore::WebCoreSynchronousLoaderClient::willSendRequest):
+ (WebCore::WebCoreSynchronousLoaderClient::didReceiveResponse):
+ (WebCore::WebCoreSynchronousLoaderClient::didReceiveData):
+ (WebCore::WebCoreSynchronousLoaderClient::didFinishLoading):
+ (WebCore::WebCoreSynchronousLoaderClient::didFail):
+ (WebCore::WebCoreSynchronousLoaderClient::didReceiveAuthenticationChallenge):
+ (WebCore::WebCoreSynchronousLoaderClient::shouldUseCredentialStorage):
+ Same changes for CFNetwork version. Now it's a more direct copy/paste than before, some
+ day we'll share the code.
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::continueAfterContentPolicy):
+ * loader/appcache/ApplicationCacheGroup.cpp:
+ (WebCore::ApplicationCacheGroup::createResourceHandle):
+ (WebCore::ApplicationCacheGroup::didReceiveResponse):
+ (WebCore::ApplicationCacheGroup::didFinishLoading):
+ (WebCore::ApplicationCacheGroup::didFail):
+ (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
+ * loader/icon/IconLoader.cpp:
+ (WebCore::IconLoader::didReceiveResponse):
+ (WebCore::IconLoader::didFail):
+ (WebCore::IconLoader::didFinishLoading):
+ * platform/network/curl/ResourceHandleManager.cpp:
+ (WebCore::headerCallback):
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::start):
+ * platform/network/qt/ResourceHandleQt.cpp:
+ (WebCore::ResourceHandle::start):
+ (WebCore::ResourceHandle::loadResourceSynchronously):
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp):
+ Updated for request() -> firstRequest renaming.
+
+2010-07-14 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Code generator: ensure generated constants match their corresponding enums.
+ https://bugs.webkit.org/show_bug.cgi?id=42250
+
+ Specific interfaces can use DontCheckEnums attribute to avoid generating the compile-time check.
+
+ Tests: updated bindings tests. Generated code should compile.
+
+ * bindings/scripts/CodeGenerator.pm:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/scripts/test/CPP/WebDOMTestObj.h:
+ (WebDOMTestObj::):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::):
+ (WebCore::JSTestObjPrototype::getOwnPropertySlot):
+ (WebCore::JSTestObjPrototype::getOwnPropertyDescriptor):
+ (WebCore::jsTestObjCONST_VALUE_0):
+ (WebCore::jsTestObjCONST_VALUE_1):
+ (WebCore::jsTestObjCONST_VALUE_2):
+ (WebCore::jsTestObjCONST_VALUE_4):
+ (WebCore::jsTestObjCONST_VALUE_8):
+ * bindings/scripts/test/JS/JSTestObj.h:
+ * bindings/scripts/test/ObjC/DOMTestObj.h:
+ * bindings/scripts/test/TestObj.idl:
+ * bindings/scripts/test/V8/V8TestObj.cpp:
+ (WebCore::):
+ (WebCore::ConfigureV8TestObjTemplate):
+ * css/WebKitCSSTransformValue.idl:
+ * dom/DOMCoreException.idl:
+ * dom/EventException.idl:
+ * dom/Node.idl:
+ * dom/OverflowEvent.idl:
+ * dom/RangeException.idl:
+ * html/FileError.idl:
+ * html/FileReader.idl:
+ * html/canvas/Float32Array.idl:
+ * html/canvas/Int16Array.idl:
+ * html/canvas/Int32Array.idl:
+ * html/canvas/Int8Array.idl:
+ * html/canvas/Uint16Array.idl:
+ * html/canvas/Uint32Array.idl:
+ * html/canvas/Uint8Array.idl:
+ * html/canvas/WebGLRenderingContext.idl:
+ * inspector/JavaScriptCallFrame.idl:
+ * loader/appcache/DOMApplicationCache.idl:
+ * storage/SQLException.idl:
+ * svg/SVGComponentTransferFunctionElement.idl:
+ * svg/SVGException.idl:
+ * svg/SVGFEBlendElement.idl:
+ * svg/SVGFEColorMatrixElement.idl:
+ * svg/SVGFECompositeElement.idl:
+ * svg/SVGFEConvolveMatrixElement.idl:
+ * svg/SVGFEDisplacementMapElement.idl:
+ * svg/SVGFEMorphologyElement.idl:
+ * svg/SVGFETurbulenceElement.idl:
+ * svg/SVGGradientElement.idl:
+ * xml/XMLHttpRequestException.idl:
+ * xml/XPathException.idl:
+
+2010-07-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Ojan Vafai.
+
+ Unbreak fast/canvas/gradient-add-second-start-end-stop.html
+
+ Assigning the same CanvasGradient or CanvasPattern to fillStyle
+ or strokeStyle may not be a no-op since the object could have been
+ modified since it was last set.
+
+ Regressed with <http://trac.webkit.org/changeset/63327>
+
+ * html/canvas/CanvasStyle.cpp:
+ (WebCore::operator==):
+
+2010-07-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Canvas: Make assigning the same fillStyle or strokeStyle a fast no-op
+ https://bugs.webkit.org/show_bug.cgi?id=42267
+
+ Avoid calling into GraphicsContext when setting a style to its current value.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setStrokeStyle): Return early if the
+ new style is the same as the current one.
+ (WebCore::CanvasRenderingContext2D::setFillStyle): Same.
+ * html/canvas/CanvasStyle.cpp:
+ (WebCore::operator==): Added operator==(CanvasStyle, CanvasStyle)
+ * html/canvas/CanvasStyle.h:
+
+2010-07-14 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Implement Web Timing redirectStart, redirectEnd, redirectCount
+ https://bugs.webkit.org/show_bug.cgi?id=42018
+
+ Tests: http/tests/misc/webtiming-one-redirect.php
+ http/tests/misc/webtiming-two-redirects.php
+
+ * loader/FrameLoaderTypes.h:
+ (WebCore::FrameLoadTimeline::FrameLoadTimeline):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::willSendRequest): This method is called for each request (including server redirects). fetchStart is updated to the current time on each invocation so that it represents fetching of the final document and doesn't include redirect time. For each redirect, redirectCount is incremented and redirectStart to redirectEnd measures the cumulative fetch time for all redirects.
+ * page/Navigation.cpp:
+ (WebCore::Navigation::redirectCount): http://dev.w3.org/2006/webapi/WebTiming/#nt-redirect-count
+ * page/Timing.cpp:
+ (WebCore::Timing::redirectStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-redirect-start
+ (WebCore::Timing::redirectEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-redirect-end
+ * page/Timing.h:
+ * page/Timing.idl:
+
+2010-07-14 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ Generate MathML files with CMake even if MathML is disabled. This
+ fixes EFL build after r63274.
+ https://bugs.webkit.org/show_bug.cgi?id=42263
+
+ No new functionality, so no new tests.
+
+ * CMakeLists.txt:
+
+2010-07-14 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Get rid of libWebCoreJS
+ https://bugs.webkit.org/show_bug.cgi?id=42083
+
+ Remove the need to build libWebCoreJS.
+
+ * GNUmakefile.am: List all auto-generated source files for libWebCoreJS
+ instead of relying on make to build libWebCoreJS. This is a more autotools-
+ -friendly approach.
+
+2010-07-14 Eric Carlson <eric.carlson@apple.com>
+
+ One more unreviewed build fix for r63319.
+
+ * html/TimeRanges.cpp:
+ (TimeRanges::nearest):
+
+2010-07-14 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Enable toggling of the "Inspect Element" mode from the browser
+ https://bugs.webkit.org/show_bug.cgi?id=42169
+
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel):
+ (WebInspector.ElementsPanel.prototype.handleShortcut):
+ (WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
+ * inspector/front-end/inspector.js:
+ (WebInspector.toggleSearchingForNode):
+
+2010-07-14 Eric Carlson <eric.carlson@apple.com>
+
+ Unreviewed, build fix for r63319.
+
+ * html/TimeRanges.cpp:
+ (TimeRanges::nearest): Include math.h and use narrowPrecisionToFloat.
+
+2010-07-14 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Update media element's seeking logic
+ https://bugs.webkit.org/show_bug.cgi?id=42178
+ <rdar://problem/8185817>
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::seek): When asked to seek to an unbuffered time, seek to the
+ nearest time instead of generating an exception. Re-order the logic to match spec text.
+
+ * html/TimeRanges.cpp:
+ (TimeRanges::nearest): New, return the value closest to the specified time.
+ * html/TimeRanges.h:
+
+2010-07-14 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Rename DeviceOrientationController::onOrientationChange to didChangeDeviceOrientation
+ https://bugs.webkit.org/show_bug.cgi?id=42257
+
+ According to convention, we should avoid "on" in favor of "did" in function names.
+
+ * dom/DeviceOrientationController.cpp:
+ (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
+ * dom/DeviceOrientationController.h:
+
+2010-07-14 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kent Tamura.
+
+ Notify browser about popup being deleted. In EFL and BREW ports, the
+ WebCore::Popup object was being deleted leaving the popup in browser
+ alive. Popups can be deleted in two ways: either from browser to webcore or
+ from webcore to browser. The first path was ok. The problem was when the
+ user changed the page with a popup still opened. This would trigger the
+ second path and would cause WebCore::Popup to be deleted without
+ notifying browser.
+ https://bugs.webkit.org/show_bug.cgi?id=41877
+
+ No new functionality so no new tests.
+
+ * platform/brew/PopupMenuBrew.cpp:
+ (WebCore::PopupMenu::~PopupMenu): call hide() when object is
+ destroyed.
+ * platform/efl/PopupMenuEfl.cpp:
+ (WebCore::PopupMenu::~PopupMenu): ditto.
+
+2010-07-14 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Invoke speech recognition when user clicks on the speech button of input elements.
+ http://bugs.webkit.org/show_bug.cgi?id=42047
+
+ No new tests, the relevant LayoutTestController bindings will be added in a subsequent patch.
+
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
+ (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Added click handling.
+ (WebCore::InputFieldSpeechButtonElement::speechInput):
+ (WebCore::InputFieldSpeechButtonElement::recordingComplete): Callback to indicate recording progress.
+ (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): Callback to receive recognized text.
+ (WebCore::InputFieldSpeechButtonElement::detach):
+ * rendering/TextControlInnerElements.h:
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63305.
+ http://trac.webkit.org/changeset/63305
+ https://bugs.webkit.org/show_bug.cgi?id=42256
+
+ "debugger-breakpoints-not-activated-on-reload.html fails on
+ GTK" (Requested by yurys on #webkit).
+
+ * inspector/front-end/ScriptView.js:
+ (WebInspector.ScriptView.prototype._addBreakpoint):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
+ (WebInspector.ScriptsPanel.prototype._breakpointAdded):
+ (WebInspector.ScriptsPanel.prototype._scriptOrResourceForURLAndLine):
+ (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
+ (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView.prototype._addBreakpoint):
+
+2010-07-14 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Provide implementation of DeviceOrientationController and hook into DOMWindow
+ https://bugs.webkit.org/show_bug.cgi?id=39588
+
+ Added DeviceOrientationController::addListener() and removeListener()
+ to start and stop the client and added calls from DomWindow. Implemented
+ DeviceOrientationController::onDeviceOrientationChange() to fire a
+ DeviceOrientationEvent on the window object.
+
+ No new tests yet, pending LayoutTestController methods for mock DeviceOrientation.
+
+ * dom/DeviceOrientationClient.h:
+ * dom/DeviceOrientationController.cpp:
+ (WebCore::DeviceOrientation::addListener):
+ (WebCore::DeviceOrientation::removeListener):
+ (WebCore::DeviceOrientation::removeAllListeners):
+ (WebCore::DeviceOrientationController::onDeviceOrientationChange):
+ * dom/DeviceOrientationController.h:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::removeAllEventListeners):
+
+2010-07-14 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: remove v8 debugger code that doesn't use ScriptDebugServer
+ https://bugs.webkit.org/show_bug.cgi?id=42164
+
+ * bindings/v8/ScriptDebugServer.cpp:
+ (WebCore::retrieveFrame):
+ (WebCore::ScriptDebugServer::addListener):
+ (WebCore::ScriptDebugServer::setBreakpoint):
+ (WebCore::ScriptDebugServer::removeBreakpoint):
+ (WebCore::ScriptDebugServer::clearBreakpoints):
+ (WebCore::ScriptDebugServer::setBreakpointsActivated):
+ (WebCore::ScriptDebugServer::pauseOnExceptionsState):
+ (WebCore::ScriptDebugServer::setPauseOnExceptionsState):
+ (WebCore::ScriptDebugServer::continueProgram):
+ (WebCore::ScriptDebugServer::stepIntoStatement):
+ (WebCore::ScriptDebugServer::stepOverStatement):
+ (WebCore::ScriptDebugServer::stepOutOfFunction):
+ (WebCore::ScriptDebugServer::editScriptSource):
+ (WebCore::ScriptDebugServer::handleV8DebugEvent):
+ * bindings/v8/ScriptDebugServer.h:
+
+2010-07-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: Clean-up InspectorBackend code. In the next changes
+ InspectorBackend content will be generated by scripts. As far as
+ generator is very simple thing all nontrivial function should be
+ moved to InspectorController and DOMAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=42171
+
+ * bindings/js/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::pause):
+ * bindings/js/ScriptDebugServer.h:
+ (WebCore::ScriptDebugServer::activateBreakpoints):
+ (WebCore::ScriptDebugServer::deactivateBreakpoints):
+ * bindings/v8/ScriptDebugServer.h:
+ (WebCore::ScriptDebugServer::activateBreakpoints):
+ (WebCore::ScriptDebugServer::deactivateBreakpoints):
+ (WebCore::ScriptDebugServer::pause):
+ * inspector/Inspector.idl:
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::saveApplicationSettings):
+ (WebCore::InspectorBackend::saveSessionSettings):
+ (WebCore::InspectorBackend::enableSearchingForNode):
+ (WebCore::InspectorBackend::disableSearchingForNode):
+ (WebCore::InspectorBackend::enableMonitoringXHR):
+ (WebCore::InspectorBackend::disableMonitoringXHR):
+ (WebCore::InspectorBackend::getResourceContent):
+ (WebCore::InspectorBackend::reloadPage):
+ (WebCore::InspectorBackend::activateBreakpoints):
+ (WebCore::InspectorBackend::deactivateBreakpoints):
+ (WebCore::InspectorBackend::pause):
+ (WebCore::InspectorBackend::resume):
+ (WebCore::InspectorBackend::stepOverStatement):
+ (WebCore::InspectorBackend::stepIntoStatement):
+ (WebCore::InspectorBackend::stepOutOfFunction):
+ (WebCore::InspectorBackend::setPauseOnExceptionsState):
+ (WebCore::InspectorBackend::copyNode):
+ (WebCore::InspectorBackend::pushNodeByPathToFrontend):
+ (WebCore::InspectorBackend::highlightDOMNode):
+ (WebCore::InspectorBackend::hideDOMNodeHighlight):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::saveApplicationSettings):
+ (WebCore::InspectorController::saveSessionSettings):
+ (WebCore::InspectorController::highlightDOMNode):
+ (WebCore::InspectorController::resume):
+ (WebCore::InspectorController::setPauseOnExceptionsState):
+ (WebCore::InspectorController::getResourceContent):
+ (WebCore::InspectorController::reloadPage):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::hideDOMNodeHighlight):
+ (WebCore::InspectorController::startProfiling):
+ (WebCore::InspectorController::stopProfiling):
+ (WebCore::InspectorController::enableSearchingForNode):
+ (WebCore::InspectorController::disableSearchingForNode):
+ (WebCore::InspectorController::enableMonitoringXHR):
+ (WebCore::InspectorController::disableMonitoringXHR):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::copyNode):
+ (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/front-end/InspectorBackendStub.js:
+ (.WebInspector.InspectorBackendStub.prototype.pause):
+ (.WebInspector.InspectorBackendStub.prototype.resume):
+ (.WebInspector.InspectorBackendStub.prototype.stepIntoStatement):
+ (.WebInspector.InspectorBackendStub.prototype.stepOutOfFunction):
+ (.WebInspector.InspectorBackendStub.prototype.stepOverStatement):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._togglePause):
+ (WebInspector.ScriptsPanel.prototype._stepOverClicked):
+ (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
+ (WebInspector.ScriptsPanel.prototype._stepOutClicked):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+
+2010-07-14 Joone Hur <joone@kldp.org>
+
+ Reviewed by Jian Li.
+
+ [GTK] Enabling File Reader/Writer APIs
+ https://bugs.webkit.org/show_bug.cgi?id=40209
+
+ The layout test fast/files will be enabled after eventSender.beginDragWithFiles is implemented for GTK.
+
+ * platform/gtk/FileSystemGtk.cpp:
+ (WebCore::openFile): Added.
+ (WebCore::readFromFile): Added.
+
+2010-07-14 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Inconsistent LayoutRepainter usage in the SVG renderers
+ https://bugs.webkit.org/show_bug.cgi?id=42245
+
+ Unify LayoutRepainter usage in the SVG renders, as RenderBlock does it, always use:
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
+ instead of including selfWillPaint / selfNeedsLayout checks. This improves layout test
+ performance by 8s on my machine with a debug build (from 76.72s -> 68.59s, averaged over 5 runs)
+
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::layout):
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::layout):
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::layout):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::layout):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::layout):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::layout):
+
+2010-07-14 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, build fix for r63300.
+
+ * rendering/RenderSVGResourceContainer.h:
+ (WebCore::RenderSVGResourceContainer::containsCyclicReference):
+
+2010-07-14 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: do not activate all breakpoints on page reload
+ https://bugs.webkit.org/show_bug.cgi?id=41461
+
+ Test: inspector/debugger-breakpoints-not-activated-on-reload.html
+
+ * inspector/front-end/ScriptView.js:
+ (WebInspector.ScriptView.prototype._addBreakpoint):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel):
+ (WebInspector.ScriptsPanel.prototype._breakpointAdded):
+ (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
+ * inspector/front-end/SourceView.js:
+ (WebInspector.SourceView.prototype._addBreakpoint):
+
+2010-07-14 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: use OwnPtr to manage ConsoleMessages in InspectorController
+ https://bugs.webkit.org/show_bug.cgi?id=42243
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::~InspectorController):
+ (WebCore::InspectorController::addConsoleMessage):
+ (WebCore::InspectorController::clearConsoleMessages):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::consoleMessages):
+
+2010-07-14 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ SVG patterns and masks should not be able to reference themselves
+ https://bugs.webkit.org/show_bug.cgi?id=32171
+
+ Don't apply pattern/mask resources, if they contain cyclic references. Gradients/Filters are not affected.
+ Clippers are already correcly handling this on their own, as well as markers (all which require subtle quirks, covered by existing tests).
+
+ Tests: svg/custom/recursive-filter.svg
+ svg/custom/recursive-gradient.svg
+ svg/custom/recursive-mask.svg
+ svg/custom/recursive-pattern.svg
+
+ * rendering/RenderSVGResourceContainer.h:
+ (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer): Stop using idForStyleResolution(), but use getIdAttribute(), no functional change though.
+ (WebCore::RenderSVGResourceContainer::idChanged): Ditto.
+ (WebCore::RenderSVGResourceContainer::childElementReferencesResource): To be implemented by classes inheriting from us. Defaults to false.
+ (WebCore::RenderSVGResourceContainer::containsCyclicReference): Check whether this resource contains contains a child which references ourselves.
+ * rendering/RenderSVGResourceMasker.cpp:
+ (WebCore::RenderSVGResourceMasker::childElementReferencesResource): Check whether the masker child specifies mask=".." with the same URI than ourselves.
+ (WebCore::RenderSVGResourceMasker::applyResource): Early exit if we contain a cylic reference.
+ * rendering/RenderSVGResourceMasker.h:
+ * rendering/RenderSVGResourcePattern.cpp:
+ (WebCore::RenderSVGResourcePattern::childElementReferencesResource): Check whether the masker child specifies fill=".." with the same URI than ourselves.
+ (WebCore::RenderSVGResourcePattern::applyResource): Early exit if we contain a cylic reference.
+ * rendering/RenderSVGResourcePattern.h:
+ * svg/SVGPaint.cpp:
+ (WebCore::SVGPaint::matchesTargetURI): Add new helper function comparing a SVGPaint URI with a given reference id.
+ * svg/SVGPaint.h:
+
+2010-07-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Selection dumping code should not dump body's offset in the document
+ https://bugs.webkit.org/show_bug.cgi?id=42238
+
+ This requires updating the results of many layout tests,
+ but has no functional change.
+
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::nodePosition):
+
+2010-07-14 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ <input type=number> UI: inner spin button layout
+ https://bugs.webkit.org/show_bug.cgi?id=41924
+
+ Add layout/event/style code for the inner spin button, which is
+ going to be used for Windows implementation.
+ No new tests because no ports implement the inner spin button yet.
+
+ * rendering/RenderTextControlSingleLine.cpp:
+ Introduce m_innerSpinButton.
+ (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
+ Detach m_innerSpinButton.
+ (WebCore::RenderTextControlSingleLine::layout):
+ Set position and size of m_innerSpinButton.
+ (WebCore::RenderTextControlSingleLine::nodeAtPoint):
+ Handle m_innerSpinButton.
+ (WebCore::RenderTextControlSingleLine::forwardEvent):
+ Handle m_innerSpinButton.
+ (WebCore::RenderTextControlSingleLine::textBlockWidth):
+ Shorten the text block width by m_innerSpinButton width.
+ (WebCore::RenderTextControlSingleLine::preferredContentWidth):
+ Add m_innerSpinButton width.
+ (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
+ Handle m_innerSpinButton.
+ (WebCore::RenderTextControlSingleLine::createInnerSpinButtonStyle):
+ Make style for m_innerSpinButton with INNER_SPIN_BUTTON pseudo class.
+ * rendering/RenderTextControlSingleLine.h:
+
+2010-07-14 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ <input type=number> UI: Support disabled/readonly states
+ https://bugs.webkit.org/show_bug.cgi?id=38568
+
+ Implement isEnabledFormControl() and isReadOnlyFormControl() of
+ SpinButtonElement. They returns the states of the parent <input> element.
+ The existing isEnabledFormControl() had a bug. It didn't have 'const'
+ modifier.
+
+ Test: fast/forms/input-appearance-spinbutton-disabled-readonly.html
+
+ * rendering/TextControlInnerElements.cpp:
+ (WebCore::SpinButtonElement::defaultEventHandler):
+ - If the input element is disabled or read-only, don't process events.
+ - Protect 'input' object from destruction during focus().
+ - Fix a hit-test issue. We don't need to add renderBox()->y() because
+ 'local' is relative to the RenderBox.
+ - Some code cleanup
+ * rendering/TextControlInnerElements.h:
+ (WebCore::SpinButtonElement::isEnabledFormControl):
+ (WebCore::SpinButtonElement::isReadOnlyFormControl):
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Page flashes to mostly white towards the end of loading
+ https://bugs.webkit.org/show_bug.cgi?id=42230
+
+ We constrain the size of huge composited layers. When doing so, we
+ need to use the constained size to set the position as well
+ as the dimensions, to ensure the layer appears in the correct place.
+
+ Test: compositing/tiling/constrained-layer-size.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::updateLayerPosition):
+
+2010-07-13 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Linux implementation of <input type=number> UI
+ https://bugs.webkit.org/show_bug.cgi?id=41925
+
+ - Move the code for scrollbar steppers from ScrollbarThemeChromiumLinux
+ to PlatformThemeChromiumGtk.
+ - Move the code for scrollbar colors from RenderThemeChromiumLinux
+ to PlatformThemeChromiumGtk.
+
+ * WebCore.gypi:
+ * platform/chromium/PlatformThemeChromiumGtk.cpp: Added.
+ (WebCore::PlatformThemeChromiumGtk::setScrollbarColors): Moved from RenderThemeChromiumLinux.
+ (WebCore::clamp): Moved from ScrollbarThemeChromiumLinux.
+ (WebCore::PlatformThemeChromiumGtk::saturateAndBrighten): ditto.
+ (WebCore::PlatformThemeChromiumGtk::outlineColor): ditto.
+ (WebCore::PlatformThemeChromiumGtk::paintArrowButton): ditto.
+ * platform/chromium/PlatformThemeChromiumGtk.h: Added.
+ * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
+ (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
+ (WebCore::ScrollbarThemeChromiumLinux::paintButton):
+ Move the main part of the code to PlatformThemeChromiumGtk.
+ (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
+ * rendering/RenderThemeChromiumLinux.cpp:
+ (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle): Added.
+ (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton): Added.
+ * rendering/RenderThemeChromiumLinux.h:
+
+2010-07-13 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher
+
+ Implementing DatabaseSync::transaction() and DatabaseSync::changeVersion().
+ https://bugs.webkit.org/show_bug.cgi?id=40607
+
+ Tests: fast/workers/storage/change-version-handle-reuse-sync.html
+ fast/workers/storage/change-version-sync.html
+ fast/workers/storage/empty-statement-sync.html
+ fast/workers/storage/execute-sql-args-sync.html
+ fast/workers/storage/executesql-accepts-only-one-statement-sync.html
+ fast/workers/storage/multiple-transactions-on-different-handles-sync.html
+ fast/workers/storage/open-database-creation-callback-sync.html
+ fast/workers/storage/open-database-empty-version-sync.html
+ fast/workers/storage/open-database-inputs-sync.html
+ fast/workers/storage/open-database-set-empty-version-sync.html
+ fast/workers/storage/open-database-while-transaction-in-progress-sync.html
+ fast/workers/storage/sql-data-types-sync.html
+ fast/workers/storage/sql-exception-codes-sync.html
+ fast/workers/storage/test-authorizer-sync.html
+ fast/workers/storage/transaction-in-transaction-sync.html
+
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * storage/AbstractDatabase.cpp:
+ (WebCore::AbstractDatabase::maximumSize):
+ (WebCore::AbstractDatabase::incrementalVacuumIfNeeded):
+ * storage/AbstractDatabase.h:
+ (WebCore::AbstractDatabase::sqliteDatabase):
+ * storage/ChangeVersionWrapper.cpp:
+ (WebCore::ChangeVersionWrapper::performPreflight):
+ (WebCore::ChangeVersionWrapper::performPostflight):
+ * storage/Database.cpp:
+ (WebCore::Database::performGetTableNames):
+ * storage/Database.h:
+ * storage/DatabaseAuthorizer.cpp:
+ (WebCore::DatabaseAuthorizer::createVTable):
+ (WebCore::DatabaseAuthorizer::dropVTable):
+ * storage/DatabaseCallback.h:
+ * storage/DatabaseSync.cpp:
+ (WebCore::ChangeVersionPreflightStep::create):
+ (WebCore::ChangeVersionPreflightStep::performStep):
+ (WebCore::ChangeVersionPreflightStep::ChangeVersionPreflightStep):
+ (WebCore::ChangeVersionPostflightStep::create):
+ (WebCore::ChangeVersionPostflightStep::performStep):
+ (WebCore::ChangeVersionPostflightStep::ChangeVersionPostflightStep):
+ (WebCore::DatabaseSync::changeVersion):
+ (WebCore::DatabaseSync::transaction):
+ (WebCore::DatabaseSync::runTransaction):
+ * storage/DatabaseSync.h:
+ * storage/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::getMaxSizeForDatabase):
+ * storage/SQLError.h:
+ * storage/SQLResultSet.cpp:
+ * storage/SQLResultSet.h:
+ * storage/SQLStatementCallback.h:
+ * storage/SQLStatementErrorCallback.h:
+ * storage/SQLStatementSync.cpp: Copied from WebCore/storage/SQLStatement.cpp.
+ (WebCore::SQLStatementSync::SQLStatementSync):
+ (WebCore::SQLStatementSync::execute):
+ * storage/SQLStatementSync.h: Added.
+ * storage/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::runCurrentStatement):
+ (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
+ (WebCore::SQLTransaction::postflightAndCommit):
+ * storage/SQLTransaction.h:
+ * storage/SQLTransactionCallback.h:
+ * storage/SQLTransactionClient.cpp:
+ (WebCore::SQLTransactionClient::didCommitWriteTransaction):
+ (WebCore::SQLTransactionClient::didExecuteStatement):
+ (WebCore::SQLTransactionClient::didExceedQuota):
+ * storage/SQLTransactionClient.h:
+ * storage/SQLTransactionErrorCallback.h:
+ * storage/SQLTransactionSync.cpp:
+ (WebCore::transactionClient):
+ (WebCore::SQLTransactionSync::create):
+ (WebCore::SQLTransactionSync::SQLTransactionSync):
+ (WebCore::SQLTransactionSync::~SQLTransactionSync):
+ (WebCore::SQLTransactionSync::executeSQL):
+ (WebCore::SQLTransactionSync::begin):
+ (WebCore::SQLTransactionSync::execute):
+ (WebCore::SQLTransactionSync::commit):
+ (WebCore::SQLTransactionSync::rollback):
+ * storage/SQLTransactionSync.h:
+ (WebCore::SQLTransactionSync::SQLTransactionSyncOptionalStep::~SQLTransactionSyncOptionalStep):
+ * storage/SQLTransactionSyncCallback.h:
+ * storage/chromium/SQLTransactionClientChromium.cpp:
+ (WebCore::SQLTransactionClient::didCommitWriteTransaction):
+ (WebCore::SQLTransactionClient::didExecuteStatement):
+ (WebCore::SQLTransactionClient::didExceedQuota):
+
+2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63162.
+ http://trac.webkit.org/changeset/63162
+ https://bugs.webkit.org/show_bug.cgi?id=42224
+
+ This is no longer needed (Requested by olliej_ on #webkit).
+
+ * bindings/v8/ScriptSourceCode.h:
+ (WebCore::ScriptSourceCode::ScriptSourceCode):
+
+2010-07-13 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix my misreading of "clear to the last marker" in the HTML5 spec
+ https://bugs.webkit.org/show_bug.cgi?id=42199
+
+ * html/HTMLFormattingElementList.cpp:
+ (WebCore::HTMLFormattingElementList::clearToLastMarker):
+ * html/HTMLFormattingElementList.h:
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
+ (WebCore::HTMLTreeBuilder::processEndOfFile):
+
+2010-07-13 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ ES5 requires BOMs to be treated as whitespace
+ https://bugs.webkit.org/show_bug.cgi?id=42218
+
+ Remove BOM handling logic from WebCore Script objects.
+
+ * bindings/js/StringSourceProvider.h:
+ (WebCore::StringSourceProvider::StringSourceProvider):
+ * loader/CachedScript.cpp:
+ (WebCore::CachedScript::CachedScript):
+ (WebCore::CachedScript::script):
+ * loader/CachedScript.h:
+
+2010-07-13 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Canvas: rect(x,y,w,h) should move to (x,y) even if w=0 and h=0
+ https://bugs.webkit.org/show_bug.cgi?id=42211
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::rect):
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Show IDs and classnames in layer tree dumps
+ https://bugs.webkit.org/show_bug.cgi?id=42213
+
+ When dumping the layer tree via showLayerTree(), include id and class attributes for
+ ease of debugging.
+
+ No tests, since this is debug-only code.
+
+ * rendering/RenderLayer.cpp:
+ (showLayerTree):
+ * rendering/RenderTreeAsText.cpp:
+ (WebCore::RenderTreeAsText::writeRenderObject):
+ * rendering/RenderTreeAsText.h:
+ (WebCore::):
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Build fix: fix WebCore exports by editing the .in file, rather than the generated file.
+
+ * WebCore.exp.in:
+
+2010-07-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42216
+ ResourceRequest::doUpdateResourceRequest() crashes if client denied request
+
+ This is covered by many regression tests with patch for bug 42201 applied (because it makes
+ us also use this code path for sync requests, and those currently have more strict limitations).
+
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::ResourceRequest::doUpdateResourceRequest): Added a null check.
+
+2010-07-13 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Make our end tag in-foreign-content mode spec bug workarounds more closely match minefield
+ https://bugs.webkit.org/show_bug.cgi?id=42187
+
+ I do not expect these work-arounds to be permanent. Hixie has promised to
+ addresses the feedback to the parser sections of HTML5 soon.
+ I added these hacks to make our hacks more-closely match Minefield's hacks
+ and thus have us "pass" a few more html5lib runner tests.
+
+ We now pass all of the html5lib foreign content tests
+ (thus we'll likely need to write more).
+
+ Tested by html5lib/runner.html
+
+ * html/HTMLElementStack.cpp:
+ (WebCore::HTMLElementStack::contains):
+ * html/HTMLElementStack.h:
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processEndTag):
+
+2010-07-12 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Wire network times from ResourceLoadTiming to performance.timing
+ https://bugs.webkit.org/show_bug.cgi?id=41824
+
+ * page/Timing.cpp:
+ (WebCore::Timing::domainLookupStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupstart
+ (WebCore::Timing::domainLookupEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-domain-lookupend
+ (WebCore::Timing::connectStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-start
+ (WebCore::Timing::connectEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-connect-end
+ (WebCore::Timing::requestStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-start
+ (WebCore::Timing::requestEnd): http://dev.w3.org/2006/webapi/WebTiming/#nt-request-end
+ (WebCore::Timing::responseStart): http://dev.w3.org/2006/webapi/WebTiming/#nt-response-start
+ (WebCore::Timing::resourceLoadTiming):
+ * page/Timing.h:
+ * page/Timing.idl:
+
+2010-07-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add support for loading javascript: URLs
+ https://bugs.webkit.org/show_bug.cgi?id=42221
+
+ * WebCore.exp.in:
+ Export protocolIsJavaScript and ScriptValue::getString.
+
+2010-07-13 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add support for URL frame loading using NPN_GetURLNotify
+ https://bugs.webkit.org/show_bug.cgi?id=42192
+
+ * WebCore.exp.in:
+ Export ResourceRequestBase::setHTTPMethod and ResourceRequestBase::setURL.
+
+2010-07-04 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Need to track texture completeness
+ https://bugs.webkit.org/show_bug.cgi?id=41381
+
+ Test: fast/canvas/webgl/texture-complete.html
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::WebGLRenderingContext): Init max texture level.
+ (WebCore::WebGLRenderingContext::bindTexture): Pass max texture level to setTarget().
+ (WebCore::WebGLRenderingContext::copyTexImage2D): Cache full texture info rather than partial.
+ (WebCore::WebGLRenderingContext::generateMipmap): Ditto.
+ (WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
+ (WebCore::WebGLRenderingContext::validateTexFuncParameters): Also validate level.
+ * html/canvas/WebGLRenderingContext.h: Add max texture level.
+ * html/canvas/WebGLTexture.cpp: Update the class to fully cache texture information and track NPOT and COMPLETE states.
+ (WebCore::WebGLTexture::WebGLTexture):
+ (WebCore::WebGLTexture::setTarget): Check whether the texture is initialized or has been deleted.
+ (WebCore::WebGLTexture::setParameteri): Ditto.
+ (WebCore::WebGLTexture::setParameterf): Ditto.
+ (WebCore::WebGLTexture::setLevelInfo): Set texture info.
+ (WebCore::WebGLTexture::generateMipmapLevelInfo): Generate texture info for all levels after generateMipmaps() is called.
+ (WebCore::WebGLTexture::getInternalFormat): Return internal format on texture face 0 level 0.
+ (WebCore::WebGLTexture::isNPOT): Check whether the texture is initialized or has been deleted.
+ (WebCore::WebGLTexture::needToUseBlackTexture): Ditto.
+ (WebCore::WebGLTexture::_deleteObject):
+ (WebCore::WebGLTexture::mapTargetToIndex): Map target to index.
+ (WebCore::WebGLTexture::canGenerateMipmaps): Check whether Mipmaps can be generated.
+ (WebCore::WebGLTexture::computeLevelCount): Compute texture level count from width/height.
+ (WebCore::WebGLTexture::update): Update NPOT/COMPLETE states.
+ * html/canvas/WebGLTexture.h: Ditto.
+ (WebCore::WebGLTexture::LevelInfo::LevelInfo): Add data structure to fully cache texture info.
+ (WebCore::WebGLTexture::LevelInfo::setInfo): Set information.
+
+2010-07-13 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Canvas: drawImage() with wrong 'image' argument type should always throw TypeError
+ https://bugs.webkit.org/show_bug.cgi?id=42160
+
+ Test: canvas/philip/tests/2d.drawImage.wrongtype.html
+
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext2D::drawImage): Throw TypeError instead of
+ TYPE_MISMATCH_ERR if 'image' argument is not an image, canvas or video element.
+
+2010-07-13 Aaron Boodman <aa@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Don't reset per-document user style caches when user styles are updated in
+ Chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42003
+
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserStyleSheetToWorld):
+ (WebCore::PageGroup::removeUserStyleSheetFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
+ (WebCore::PageGroup::removeAllUserContent):
+ (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
+ * page/PageGroup.h:
+
+2010-07-13 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ On Leopard, media element can't handle audio/mp4 MIME type in source tag
+ https://bugs.webkit.org/show_bug.cgi?id=29326
+
+ Test: media/media-can-play-mpeg-audio.html
+
+ * platform/MIMETypeRegistry.cpp:
+ (WebCore::TypeExtensionPair::): Add "audio/mp4", "m4a" to mappings table.
+
+2010-07-13 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Implement performance.timing.fetchStart
+ https://bugs.webkit.org/show_bug.cgi?id=41816
+
+ See: http://dev.w3.org/2006/webapi/WebTiming/#nt-fetch-start
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::willSendRequest): Record the fetchStart time for each request for the main resource. This means it is called for each server redirect, overwritting the previous value. In https://bugs.webkit.org/show_bug.cgi?id=42018, this will be modified such that if a previous value exists, it is stored as the redirect time.
+ * loader/FrameLoaderTypes.h:
+ (WebCore::FrameLoadTimeline::FrameLoadTimeline):
+ * page/Timing.cpp:
+ (WebCore::Timing::fetchStart):
+ * page/Timing.h:
+ * page/Timing.idl:
+
+2010-07-13 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Speech input plumbing in webcore
+ https://bugs.webkit.org/show_bug.cgi?id=41518
+
+ Adds the following:
+ - a SpeechInput class to be used by the speech enabled HTML elements
+ - a SpeechInputListener interface to be implemented by the speech enabled HTML elements
+ - a SpeechInputClient interface (defined in WebCore, implemented by WebKit) for WebCore to call into WebKit.
+ This is available as a member of WebCore::Page, set by the platforms which support speech input.
+ - a SpeechInputClientListener interface for WebCore to receive events from WebKit
+
+ No new tests, the relevant LayoutTestController bindings will be added in a subsequent patch.
+
+ * Android.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ * page/Page.h: Added SpeechInputClient member variable and associated methods.
+ (WebCore::Page::setSpeechInputClient):
+ (WebCore::Page::speechInputClient):
+ * page/SpeechInput.cpp: Added new class to provide speech API services to HTML elements.
+ (WebCore::SpeechInput::SpeechInput):
+ (WebCore::SpeechInput::recordingComplete):
+ (WebCore::SpeechInput::setRecognitionResult):
+ (WebCore::SpeechInput::startRecognition):
+ * page/SpeechInput.h: Added.
+ (WebCore::SpeechInput::~SpeechInput):
+ (WebCore::SpeechInput::client):
+ * page/SpeechInputListener.h: Added.
+ (WebCore::SpeechInputListener::~SpeechInputListener):
+ * page/SpeechInputClient.h: Added new interface implemented by WebKit to bubble up speech API requests to the embedder.
+ (WebCore::SpeechInputClient::~SpeechInputClient):
+ * page/SpeechInputClientListener.h: Added.
+ (WebCore::SpeechInputClientListener::~SpeechInputClientListener):
+
+2010-07-13 Richard Moore <rich@kde.org>, Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] MIME handling in qtwebkit network layer case-sensitivity
+
+ https://bugs.webkit.org/show_bug.cgi?id=28654
+
+ Like other platforms, Qt needs to convert MIME types to lower case
+ so they will be handled by WebCore.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2010-07-13 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ REGRESSION(55056) debug builds ASSERT falsely on pages with animations
+ https://bugs.webkit.org/show_bug.cgi?id=42175
+
+ Revision 55065 added some repaint box precomputation and some debug ASSERT()ions
+ to ensure the precomputed values were valid. However, if animations are enabled and
+ not hardware accelerated, the repaint box dimensions become time-dependent and the
+ ASSERT()s can trigger. This can make it impossible to interactively debug pages
+ like google maps.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37048 is another example of an assertion
+ failing due to time dependent animation values.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
+
+2010-07-13 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Implement bufferData and bufferSubData with ArrayBuffer as input
+ https://bugs.webkit.org/show_bug.cgi?id=41884
+
+ Test: fast/canvas/webgl/buffer-data-array-buffer.html
+
+ * html/canvas/WebGLBuffer.cpp: Implement associateBufferData & associateBufferSubData with ArrayBuffer as input.
+ (WebCore::WebGLBuffer::associateBufferData):
+ (WebCore::WebGLBuffer::associateBufferSubData):
+ * html/canvas/WebGLBuffer.h: Ditto.
+ * html/canvas/WebGLRenderingContext.cpp: Implement bufferData and bufferSubData with ArrayBuffer as input.
+ (WebCore::WebGLRenderingContext::bufferData):
+ (WebCore::WebGLRenderingContext::bufferSubData):
+ * html/canvas/WebGLRenderingContext.h: Ditto.
+ * html/canvas/WebGLRenderingContext.idl: Ditto.
+ * platform/graphics/GraphicsContext3D.h: Ditto.
+ * platform/graphics/mac/GraphicsContext3DMac.mm: Ditto.
+ (WebCore::GraphicsContext3D::bufferData):
+ (WebCore::GraphicsContext3D::bufferSubData):
+
+2010-07-13 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Implement performance.timing.responseEnd
+ https://bugs.webkit.org/show_bug.cgi?id=42006
+
+ See: http://dev.w3.org/2006/webapi/WebTiming/#nt-response-end
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::finishedLoading):
+ * loader/FrameLoaderTypes.h:
+ (WebCore::FrameLoadTimeline::FrameLoadTimeline):
+ * page/Timing.cpp:
+ (WebCore::Timing::responseEnd):
+ * page/Timing.h:
+ * page/Timing.idl:
+
+2010-07-13 W. James MacLean <wjmaclean@chromium.org>
+
+ Reviewed by Darin Fisher
+
+ Bug 41962 Limit html canvas element dimensions to 32767 for Skia platform
+ https://bugs.webkit.org/show_bug.cgi?id=41962
+
+ Test: fast/canvas/canvas-skia-excessive-size.html
+
+ * WebCore/html/HTMLCanvasElement.cpp
+ (WebCore::HTMLCanvasElement::convertLogicalToDevice):
+
+2010-07-10 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Need to emulate MAX_VARYING_VECTORS/MAX_FRAGMENT_UNIFORM_VECTORs/MAX_VERTEX_UNIFORM_VECTORS for glGet
+ https://bugs.webkit.org/show_bug.cgi?id=42032
+
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3D::getIntegerv): Emulate the enums.
+
+2010-07-13 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GTK] video playback position query flood when mouse over the video element
+ https://bugs.webkit.org/show_bug.cgi?id=35333
+
+ Don't trigger a position query only to know which play/pause
+ button to display. Instead use the media-control button display
+ type to select the image to paint.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::paintMediaPlayButton):
+
+2010-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63192.
+ http://trac.webkit.org/changeset/63192
+ https://bugs.webkit.org/show_bug.cgi?id=42173
+
+ Broke fast/backgrounds/size/contain-and-cover.html (Requested
+ by kling on #webkit).
+
+ * manual-tests/css3-background-layer-count.html: Removed.
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::cullEmptyLayers):
+
+2010-07-13 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Removes cycles caused by "m_this" members in a few IndexedDB classes.
+ https://bugs.webkit.org/show_bug.cgi?id=42161
+
+ Adds IDBAny::create for the various types.
+ No functionality change, just cleaning up.
+
+ * storage/IDBAny.cpp:
+ (WebCore::createIDBAny):
+ (WebCore::IDBAny::create):
+ * storage/IDBAny.h:
+ * storage/IDBDatabaseRequest.cpp:
+ (WebCore::IDBDatabaseRequest::IDBDatabaseRequest):
+ (WebCore::IDBDatabaseRequest::createObjectStore):
+ (WebCore::IDBDatabaseRequest::removeObjectStore):
+ * storage/IDBDatabaseRequest.h:
+ * storage/IDBKeyRange.cpp:
+ (WebCore::IDBKeyRange::IDBKeyRange):
+ * storage/IDBKeyRange.h:
+ (WebCore::IDBKeyRange::left):
+ (WebCore::IDBKeyRange::right):
+ * storage/IDBObjectStoreRequest.cpp:
+ (WebCore::IDBObjectStoreRequest::IDBObjectStoreRequest):
+ (WebCore::IDBObjectStoreRequest::get):
+ (WebCore::IDBObjectStoreRequest::add):
+ (WebCore::IDBObjectStoreRequest::put):
+ (WebCore::IDBObjectStoreRequest::remove):
+ (WebCore::IDBObjectStoreRequest::createIndex):
+ (WebCore::IDBObjectStoreRequest::removeIndex):
+ * storage/IDBObjectStoreRequest.h:
+ * storage/IndexedDatabaseRequest.cpp:
+ (WebCore::IndexedDatabaseRequest::IndexedDatabaseRequest):
+ (WebCore::IndexedDatabaseRequest::open):
+ * storage/IndexedDatabaseRequest.h:
+
+2010-07-13 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Land the initial build system for WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=41604
+
+ The build is enabled by passing --qmakearg="CONFIG+=webkit2" to build-webkit
+
+ * WebCore.pri:
+ * WebCore.pro:
+
+2010-07-13 Leon Clarke <leonclarke@google.com>
+
+ Reviewed by Pavel Feldman.
+
+ Don't access objects after deleting them, following
+ the addition of link prefetching. Also remove a forward declaration
+ of the now-nonexistent CachedLinkPrefetch class.
+ https://bugs.webkit.org/show_bug.cgi?id=3652
+
+ No new tests. Correcting aspects of the prefetch change that shouldn't
+ have affected functionality.
+
+ * html/HTMLLinkElement.h:
+ * loader/loader.cpp:
+ (WebCore::Loader::Host::cancelPendingRequests):
+
+2010-07-13 Andras Becsi <abecsi@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix the case of a linker option to lowercase to be able to
+ cross compile QtWebKit for Windows on Linux.
+
+ No new tests needed.
+
+ * WebCore.pro:
+
+2010-07-12 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: Next iteration of Inspector code generator.
+ The InspectorFrontend2 was replaced by slightly modified version of
+ InspectorBackend file (Inspector.idl). At the end all the interface
+ between WebInspector and inspected page will be specified by this file
+ and generated by CodeGeneratorInspector (InspectorFrontend.cpp,
+ InspectorBackend.cpp and InspectorBackend.js).
+ https://bugs.webkit.org/show_bug.cgi?id=42104
+
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gyp/scripts/rule_binding.py:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/scripts/IDLParser.pm:
+ * bindings/scripts/IDLStructure.pm:
+ * bindings/scripts/generate-bindings.pl:
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/Inspector.idl: Added.
+ * inspector/InspectorCSSStore.cpp:
+ (WebCore::InspectorCSSStore::inspectorStyleSheet):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::connectFrontend):
+ (WebCore::InspectorController::startTimelineProfiler):
+ * inspector/InspectorController.h:
+ (WebCore::InspectorController::remoteInspectorFrontend):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::InspectorDOMAgent):
+ * inspector/InspectorDOMAgent.h:
+ (WebCore::InspectorDOMAgent::create):
+ * inspector/InspectorFrontend2.idl: Removed.
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
+ (WebCore::InspectorTimelineAgent::resetFrontendProxyObject):
+ * inspector/InspectorTimelineAgent.h:
+
+2010-07-12 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ DeviceOrientationEvent should use optional properties
+ https://bugs.webkit.org/show_bug.cgi?id=41607
+
+ This change adds a new DeviceOrientation class which takes care of which of the
+ optional properties are present. DeviceOrientationEvent owns an instance of
+ DeviceOrientation, rather than owning the properties directly.
+ DeviceOrientationEvent now requires custom bindings.
+
+ Test: fast/dom/DeviceOrientation/optional-event-properties.html
+
+ * Android.mk:
+ * Android.jscbindings.mk:
+ * Android.v8bindings.mk:
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/JSDeviceOrientationEventCustom.cpp: Added.
+ (WebCore::JSDeviceOrientationEvent::alpha):
+ (WebCore::JSDeviceOrientationEvent::beta):
+ (WebCore::JSDeviceOrientationEvent::gamma):
+ (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
+ * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp: Added.
+ (WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
+ (WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
+ (WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
+ (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
+ * dom/DeviceOrientation.cpp: Added.
+ * dom/DeviceOrientation.h: Added.
+ (WebCore::DeviceOrientation::create):
+ (WebCore::DeviceOrientation::canProvideAlpha):
+ (WebCore::DeviceOrientation::alpha):
+ (WebCore::DeviceOrientation::canProvideBeta):
+ (WebCore::DeviceOrientation::beta):
+ (WebCore::DeviceOrientation::canProvideGamma):
+ (WebCore::DeviceOrientation::gamma):
+ (WebCore::DeviceOrientation::DeviceOrientation):
+ * dom/DeviceOrientationEvent.cpp:
+ (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
+ (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
+ * dom/DeviceOrientationEvent.h:
+ (WebCore::DeviceOrientationEvent::create):
+ (WebCore::DeviceOrientationEvent::orientation):
+ * dom/DeviceOrientationEvent.idl:
+
+2010-07-13 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ CSS3 background: Number of layers should be determined by background-image element count
+ https://bugs.webkit.org/show_bug.cgi?id=41201
+
+ Change FillLayer culling logic to discard all layers
+ after the first one without an image set.
+
+ Manual test: css3-background-layer-count.html
+
+ * manual-tests/css3-background-layer-count.html: Added.
+ * rendering/style/FillLayer.cpp:
+ (WebCore::FillLayer::cullEmptyLayers):
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ Test: fast/loader/non-deferred-substitute-load.html
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::handleDataLoadNow):
+
+2010-07-13 Yoshiki Hayashi <yhayashi@google.com>
+
+ Reviewed by Kent Tamura.
+
+ Make sure correct Nodes are passed to childrenChanged so that
+ :last-child gets properly applied when fragment is inserted.
+ https://bugs.webkit.org/show_bug.cgi?id=37944
+
+ Test: fast/css/last-child-innerhtml.html
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::replaceChild):
+ (WebCore::ContainerNode::appendChild):
+
+2010-07-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Kent Tamura.
+
+ InsertListCommand's modifyRange and doApply should be merged
+ https://bugs.webkit.org/show_bug.cgi?id=41403
+
+ Isolated the code in doApply to insert and remove lists for single paragraph into doApplyForSingleParagraph.
+ Merged the code in modifyRange into doApply and cleaned up.
+
+ No test is added since this is a clean up.
+
+ * editing/InsertListCommand.cpp:
+ (WebCore::InsertListCommand::InsertListCommand): m_forceCreateList is no longer initialized
+ (WebCore::InsertListCommand::doApply): Isolated the code to insert/remove lists in doApplyForSingleParagraph
+ (WebCore::InsertListCommand::doApplyForSingleParagraph): Insert/remove lists for single paragraph
+ * editing/InsertListCommand.h: Added doApplyForSingleParagraph and removed m_forceCreateList
+
+2010-07-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix typo in "close the cell" which caused assertion
+ https://bugs.webkit.org/show_bug.cgi?id=42138
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::closeTheCell):
+
+2010-07-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Fix line number handling in HTMLTreeBuilder to fix a zillion layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=42143
+
+ Covered by a zillion layout tests.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processEndTag):
+ (WebCore::HTMLTreeBuilder::processScriptStartTag):
+
+2010-07-12 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Adding right aligned text called labels to PopupMenus.
+ https://bugs.webkit.org/show_bug.cgi?id=41964
+
+ * platform/PopupMenuClient.h:
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::paintRow):
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::itemLabel):
+ * rendering/RenderMenuList.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::itemLabel):
+ * rendering/RenderTextControlSingleLine.h:
+
+2010-07-12 Mihnea Ovidenea <mihnea@adobe.com>
+
+ Reviewed by Dirk Schulze.
+
+ [Cairo] Incorrect Test for Text Fill
+ https://bugs.webkit.org/show_bug.cgi?id=42123
+
+ Correct test used for text shadow. It currently checks for
+ equality with cTextFill. However, this test fails if the
+ text drawing mode is set to 'cTextFill | cTextStroke'. Fix
+ is to modify the test to be like other Cairo uses of the
+ text drawing mode, and check for the cTextFill bit being
+ set, not for equality with the bit.
+
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::Font::drawGlyphs):
+
2010-07-12 Eric Seidel <eric@webkit.org>
Reviewed by Sam Weinig.
diff --git a/WebCore/Configurations/FeatureDefines.xcconfig b/WebCore/Configurations/FeatureDefines.xcconfig
index 9a3ec0b..4b363aa 100644
--- a/WebCore/Configurations/FeatureDefines.xcconfig
+++ b/WebCore/Configurations/FeatureDefines.xcconfig
@@ -34,7 +34,6 @@
ENABLE_LINK_PREFETCH = ;
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-ENABLE_3D_CANVAS_1050 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS;
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 8430024..7c53e86 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -471,11 +471,11 @@ DOM_CLASSES = \
XSLTProcessor \
#
-INSPECTOR_CLASSES = InspectorFrontend2
+INSPECTOR_CLASSES = Inspector
.PHONY : all
-JS_DOM_HEADERS=$(filter-out JSEventListener.h JSEventTarget.h,$(DOM_CLASSES:%=JS%.h) $(INSPECTOR_CLASSES:%=Remote%.h))
+JS_DOM_HEADERS=$(filter-out JSEventListener.h JSEventTarget.h,$(DOM_CLASSES:%=JS%.h) $(INSPECTOR_CLASSES:%=Remote%Frontend.h))
all : \
remove-stray-plugin-and-mime-type-files \
@@ -808,8 +808,8 @@ JS%.h : %.idl $(JS_BINDINGS_SCRIPTS)
INSPECTOR_GENERATOR_SCRIPTS = $(GENERATE_SCRIPTS) inspector/CodeGeneratorInspector.pm
-Remote%.h : %.idl $(INSPECTOR_GENERATOR_SCRIPTS)
- $(call generator_script, $(INSPECTOR_GENERATOR_SCRIPTS)) --outputDir . --defines "LANGUAGE_JAVASCRIPT" --generator Inspector $<
+Remote%Frontend.h : %.idl $(INSPECTOR_GENERATOR_SCRIPTS)
+ $(call generator_script, $(INSPECTOR_GENERATOR_SCRIPTS)) --outputDir . --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator Inspector $<
-include $(JS_DOM_HEADERS:.h=.dep)
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index e624b16..010c28c 100644
--- a/WebCore/English.lproj/localizedStrings.js
+++ b/WebCore/English.lproj/localizedStrings.js
Binary files differ
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 278aa9b..2aac9a1 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -14,6 +14,7 @@ webcore_cppflags += \
-I$(srcdir)/WebKit/gtk/webkit \
-I$(srcdir)/WebCore \
-I$(srcdir)/WebCore/accessibility \
+ -I$(srcdir)/WebCore/bindings/generic \
-I$(srcdir)/WebCore/bindings/js \
-I$(srcdir)/WebCore/bindings/gobject \
-I$(srcdir)/WebCore/bridge \
@@ -98,248 +99,465 @@ webcore_built_sources += \
DerivedSources/WebCore/HTMLEntityNames.cpp \
DerivedSources/WebCore/HTMLNames.cpp \
DerivedSources/WebCore/HTMLNames.h \
+ DerivedSources/WebCore/JSAbstractWorker.cpp \
+ DerivedSources/WebCore/JSAbstractWorker.h \
+ DerivedSources/WebCore/JSArrayBuffer.cpp \
+ DerivedSources/WebCore/JSArrayBuffer.h \
+ DerivedSources/WebCore/JSArrayBufferView.cpp \
+ DerivedSources/WebCore/JSArrayBufferView.h \
+ DerivedSources/WebCore/JSAttr.cpp \
+ DerivedSources/WebCore/JSAttr.h \
+ DerivedSources/WebCore/JSBarInfo.cpp \
+ DerivedSources/WebCore/JSBarInfo.h \
+ DerivedSources/WebCore/JSBeforeLoadEvent.cpp \
+ DerivedSources/WebCore/JSBeforeLoadEvent.h \
+ DerivedSources/WebCore/JSBeforeProcessEvent.cpp \
+ DerivedSources/WebCore/JSBeforeProcessEvent.h \
+ DerivedSources/WebCore/JSBlobBuilder.cpp \
+ DerivedSources/WebCore/JSBlobBuilder.h \
+ DerivedSources/WebCore/JSBlob.cpp \
+ DerivedSources/WebCore/JSBlob.h \
+ DerivedSources/WebCore/JSCanvasGradient.cpp \
+ DerivedSources/WebCore/JSCanvasGradient.h \
+ DerivedSources/WebCore/JSCanvasPattern.cpp \
+ DerivedSources/WebCore/JSCanvasPattern.h \
+ DerivedSources/WebCore/JSCanvasRenderingContext2D.cpp \
+ DerivedSources/WebCore/JSCanvasRenderingContext2D.h \
+ DerivedSources/WebCore/JSCanvasRenderingContext.cpp \
+ DerivedSources/WebCore/JSCanvasRenderingContext.h \
+ DerivedSources/WebCore/JSCDATASection.cpp \
+ DerivedSources/WebCore/JSCDATASection.h \
+ DerivedSources/WebCore/JSCharacterData.cpp \
+ DerivedSources/WebCore/JSCharacterData.h \
+ DerivedSources/WebCore/JSClientRect.cpp \
+ DerivedSources/WebCore/JSClientRect.h \
+ DerivedSources/WebCore/JSClientRectList.cpp \
+ DerivedSources/WebCore/JSClientRectList.h \
+ DerivedSources/WebCore/JSClipboard.cpp \
+ DerivedSources/WebCore/JSClipboard.h \
+ DerivedSources/WebCore/JSComment.cpp \
+ DerivedSources/WebCore/JSComment.h \
+ DerivedSources/WebCore/JSCompositionEvent.cpp \
+ DerivedSources/WebCore/JSCompositionEvent.h \
+ DerivedSources/WebCore/JSConsole.cpp \
+ DerivedSources/WebCore/JSConsole.h \
+ DerivedSources/WebCore/JSCoordinates.cpp \
+ DerivedSources/WebCore/JSCoordinates.h \
+ DerivedSources/WebCore/JSCounter.cpp \
+ DerivedSources/WebCore/JSCounter.h \
+ DerivedSources/WebCore/JSCSSCharsetRule.cpp \
+ DerivedSources/WebCore/JSCSSCharsetRule.h \
+ DerivedSources/WebCore/JSCSSFontFaceRule.cpp \
+ DerivedSources/WebCore/JSCSSFontFaceRule.h \
+ DerivedSources/WebCore/JSCSSImportRule.cpp \
+ DerivedSources/WebCore/JSCSSImportRule.h \
+ DerivedSources/WebCore/JSCSSMediaRule.cpp \
+ DerivedSources/WebCore/JSCSSMediaRule.h \
+ DerivedSources/WebCore/JSCSSPageRule.cpp \
+ DerivedSources/WebCore/JSCSSPageRule.h \
+ DerivedSources/WebCore/JSCSSPrimitiveValue.cpp \
+ DerivedSources/WebCore/JSCSSPrimitiveValue.h \
+ DerivedSources/WebCore/JSCSSRule.cpp \
+ DerivedSources/WebCore/JSCSSRule.h \
+ DerivedSources/WebCore/JSCSSRuleList.cpp \
+ DerivedSources/WebCore/JSCSSRuleList.h \
+ DerivedSources/WebCore/JSCSSStyleDeclaration.cpp \
+ DerivedSources/WebCore/JSCSSStyleDeclaration.h \
+ DerivedSources/WebCore/JSCSSStyleRule.cpp \
+ DerivedSources/WebCore/JSCSSStyleRule.h \
+ DerivedSources/WebCore/JSCSSStyleSheet.cpp \
+ DerivedSources/WebCore/JSCSSStyleSheet.h \
+ DerivedSources/WebCore/JSCSSValue.cpp \
+ DerivedSources/WebCore/JSCSSValue.h \
+ DerivedSources/WebCore/JSCSSValueList.cpp \
+ DerivedSources/WebCore/JSCSSValueList.h \
+ DerivedSources/WebCore/JSCSSVariablesDeclaration.cpp \
+ DerivedSources/WebCore/JSCSSVariablesDeclaration.h \
+ DerivedSources/WebCore/JSCSSVariablesRule.cpp \
+ DerivedSources/WebCore/JSCSSVariablesRule.h \
+ DerivedSources/WebCore/JSCustomEvent.cpp \
+ DerivedSources/WebCore/JSCustomEvent.h \
+ DerivedSources/WebCore/JSDataGridColumn.cpp \
+ DerivedSources/WebCore/JSDataGridColumn.h \
+ DerivedSources/WebCore/JSDataGridColumnList.cpp \
+ DerivedSources/WebCore/JSDataGridColumnList.h \
+ DerivedSources/WebCore/JSDedicatedWorkerContext.cpp \
+ DerivedSources/WebCore/JSDedicatedWorkerContext.h \
+ DerivedSources/WebCore/JSDeviceOrientationEvent.cpp \
+ DerivedSources/WebCore/JSDeviceOrientationEvent.h \
+ DerivedSources/WebCore/JSDocument.cpp \
+ DerivedSources/WebCore/JSDocumentFragment.cpp \
+ DerivedSources/WebCore/JSDocumentFragment.h \
+ DerivedSources/WebCore/JSDocument.h \
+ DerivedSources/WebCore/JSDocumentType.cpp \
+ DerivedSources/WebCore/JSDocumentType.h \
+ DerivedSources/WebCore/JSDOMCoreException.cpp \
+ DerivedSources/WebCore/JSDOMCoreException.h \
+ DerivedSources/WebCore/JSDOMFormData.cpp \
+ DerivedSources/WebCore/JSDOMFormData.h \
+ DerivedSources/WebCore/JSDOMImplementation.cpp \
+ DerivedSources/WebCore/JSDOMImplementation.h \
+ DerivedSources/WebCore/JSDOMMimeTypeArray.cpp \
+ DerivedSources/WebCore/JSDOMMimeTypeArray.h \
+ DerivedSources/WebCore/JSDOMMimeType.cpp \
+ DerivedSources/WebCore/JSDOMMimeType.h \
+ DerivedSources/WebCore/JSDOMParser.cpp \
+ DerivedSources/WebCore/JSDOMParser.h \
+ DerivedSources/WebCore/JSDOMPluginArray.cpp \
+ DerivedSources/WebCore/JSDOMPluginArray.h \
+ DerivedSources/WebCore/JSDOMPlugin.cpp \
+ DerivedSources/WebCore/JSDOMPlugin.h \
+ DerivedSources/WebCore/JSDOMSelection.cpp \
+ DerivedSources/WebCore/JSDOMSelection.h \
+ DerivedSources/WebCore/JSDOMStringList.cpp \
+ DerivedSources/WebCore/JSDOMStringList.h \
+ DerivedSources/WebCore/JSDOMStringMap.cpp \
+ DerivedSources/WebCore/JSDOMStringMap.h \
+ DerivedSources/WebCore/JSDOMWindow.cpp \
+ DerivedSources/WebCore/JSDOMWindow.h \
+ DerivedSources/WebCore/JSElement.cpp \
+ DerivedSources/WebCore/JSElement.h \
+ DerivedSources/WebCore/JSEntity.cpp \
+ DerivedSources/WebCore/JSEntity.h \
+ DerivedSources/WebCore/JSEntityReference.cpp \
+ DerivedSources/WebCore/JSEntityReference.h \
+ DerivedSources/WebCore/JSErrorEvent.cpp \
+ DerivedSources/WebCore/JSErrorEvent.h \
+ DerivedSources/WebCore/JSEvent.cpp \
+ DerivedSources/WebCore/JSEventException.cpp \
+ DerivedSources/WebCore/JSEventException.h \
+ DerivedSources/WebCore/JSEvent.h \
+ DerivedSources/WebCore/JSEventSource.cpp \
+ DerivedSources/WebCore/JSEventSource.h \
+ DerivedSources/WebCore/JSFile.cpp \
+ DerivedSources/WebCore/JSFileError.cpp \
+ DerivedSources/WebCore/JSFileError.h \
+ DerivedSources/WebCore/JSFile.h \
+ DerivedSources/WebCore/JSFileList.cpp \
+ DerivedSources/WebCore/JSFileList.h \
+ DerivedSources/WebCore/JSFileReader.cpp \
+ DerivedSources/WebCore/JSFileReader.h \
+ DerivedSources/WebCore/JSFloat32Array.cpp \
+ DerivedSources/WebCore/JSFloat32Array.h \
+ DerivedSources/WebCore/JSGeolocation.cpp \
+ DerivedSources/WebCore/JSGeolocation.h \
+ DerivedSources/WebCore/JSGeoposition.cpp \
+ DerivedSources/WebCore/JSGeoposition.h \
+ DerivedSources/WebCore/JSHistory.cpp \
+ DerivedSources/WebCore/JSHistory.h \
+ DerivedSources/WebCore/JSHTMLAllCollection.cpp \
+ DerivedSources/WebCore/JSHTMLAllCollection.h \
+ DerivedSources/WebCore/JSHTMLAnchorElement.cpp \
+ DerivedSources/WebCore/JSHTMLAnchorElement.h \
+ DerivedSources/WebCore/JSHTMLAppletElement.cpp \
+ DerivedSources/WebCore/JSHTMLAppletElement.h \
+ DerivedSources/WebCore/JSHTMLAreaElement.cpp \
+ DerivedSources/WebCore/JSHTMLAreaElement.h \
+ DerivedSources/WebCore/JSHTMLAudioElement.cpp \
+ DerivedSources/WebCore/JSHTMLAudioElement.h \
+ DerivedSources/WebCore/JSHTMLBaseElement.cpp \
+ DerivedSources/WebCore/JSHTMLBaseElement.h \
+ DerivedSources/WebCore/JSHTMLBaseFontElement.cpp \
+ DerivedSources/WebCore/JSHTMLBaseFontElement.h \
+ DerivedSources/WebCore/JSHTMLBlockquoteElement.cpp \
+ DerivedSources/WebCore/JSHTMLBlockquoteElement.h \
+ DerivedSources/WebCore/JSHTMLBodyElement.cpp \
+ DerivedSources/WebCore/JSHTMLBodyElement.h \
+ DerivedSources/WebCore/JSHTMLBRElement.cpp \
+ DerivedSources/WebCore/JSHTMLBRElement.h \
+ DerivedSources/WebCore/JSHTMLButtonElement.cpp \
+ DerivedSources/WebCore/JSHTMLButtonElement.h \
+ DerivedSources/WebCore/JSHTMLCanvasElement.cpp \
+ DerivedSources/WebCore/JSHTMLCanvasElement.h \
+ DerivedSources/WebCore/JSHTMLCollection.cpp \
+ DerivedSources/WebCore/JSHTMLCollection.h \
+ DerivedSources/WebCore/JSHTMLDataGridCellElement.cpp \
+ DerivedSources/WebCore/JSHTMLDataGridCellElement.h \
+ DerivedSources/WebCore/JSHTMLDataGridColElement.cpp \
+ DerivedSources/WebCore/JSHTMLDataGridColElement.h \
+ DerivedSources/WebCore/JSHTMLDataGridElement.cpp \
+ DerivedSources/WebCore/JSHTMLDataGridElement.h \
+ DerivedSources/WebCore/JSHTMLDataGridRowElement.cpp \
+ DerivedSources/WebCore/JSHTMLDataGridRowElement.h \
+ DerivedSources/WebCore/JSHTMLDataListElement.cpp \
+ DerivedSources/WebCore/JSHTMLDataListElement.h \
+ DerivedSources/WebCore/JSHTMLDirectoryElement.cpp \
+ DerivedSources/WebCore/JSHTMLDirectoryElement.h \
+ DerivedSources/WebCore/JSHTMLDivElement.cpp \
+ DerivedSources/WebCore/JSHTMLDivElement.h \
+ DerivedSources/WebCore/JSHTMLDListElement.cpp \
+ DerivedSources/WebCore/JSHTMLDListElement.h \
+ DerivedSources/WebCore/JSHTMLDocument.cpp \
+ DerivedSources/WebCore/JSHTMLDocument.h \
+ DerivedSources/WebCore/JSHTMLElement.cpp \
+ DerivedSources/WebCore/JSHTMLElement.h \
DerivedSources/WebCore/JSHTMLElementWrapperFactory.cpp \
- DerivedSources/WebCore/RemoteInspectorFrontend2.cpp \
- DerivedSources/WebCore/RemoteInspectorFrontend2.h \
- DerivedSources/WebCore/UserAgentStyleSheets.h \
+ DerivedSources/WebCore/JSHTMLEmbedElement.cpp \
+ DerivedSources/WebCore/JSHTMLEmbedElement.h \
+ DerivedSources/WebCore/JSHTMLFieldSetElement.cpp \
+ DerivedSources/WebCore/JSHTMLFieldSetElement.h \
+ DerivedSources/WebCore/JSHTMLFontElement.cpp \
+ DerivedSources/WebCore/JSHTMLFontElement.h \
+ DerivedSources/WebCore/JSHTMLFormElement.cpp \
+ DerivedSources/WebCore/JSHTMLFormElement.h \
+ DerivedSources/WebCore/JSHTMLFrameElement.cpp \
+ DerivedSources/WebCore/JSHTMLFrameElement.h \
+ DerivedSources/WebCore/JSHTMLFrameSetElement.cpp \
+ DerivedSources/WebCore/JSHTMLFrameSetElement.h \
+ DerivedSources/WebCore/JSHTMLHeadElement.cpp \
+ DerivedSources/WebCore/JSHTMLHeadElement.h \
+ DerivedSources/WebCore/JSHTMLHeadingElement.cpp \
+ DerivedSources/WebCore/JSHTMLHeadingElement.h \
+ DerivedSources/WebCore/JSHTMLHRElement.cpp \
+ DerivedSources/WebCore/JSHTMLHRElement.h \
+ DerivedSources/WebCore/JSHTMLHtmlElement.cpp \
+ DerivedSources/WebCore/JSHTMLHtmlElement.h \
+ DerivedSources/WebCore/JSHTMLIFrameElement.cpp \
+ DerivedSources/WebCore/JSHTMLIFrameElement.h \
+ DerivedSources/WebCore/JSHTMLImageElement.cpp \
+ DerivedSources/WebCore/JSHTMLImageElement.h \
+ DerivedSources/WebCore/JSHTMLInputElement.cpp \
+ DerivedSources/WebCore/JSHTMLInputElement.h \
+ DerivedSources/WebCore/JSHTMLIsIndexElement.cpp \
+ DerivedSources/WebCore/JSHTMLIsIndexElement.h \
+ DerivedSources/WebCore/JSHTMLLabelElement.cpp \
+ DerivedSources/WebCore/JSHTMLLabelElement.h \
+ DerivedSources/WebCore/JSHTMLLegendElement.cpp \
+ DerivedSources/WebCore/JSHTMLLegendElement.h \
+ DerivedSources/WebCore/JSHTMLLIElement.cpp \
+ DerivedSources/WebCore/JSHTMLLIElement.h \
+ DerivedSources/WebCore/JSHTMLLinkElement.cpp \
+ DerivedSources/WebCore/JSHTMLLinkElement.h \
+ DerivedSources/WebCore/JSHTMLMapElement.cpp \
+ DerivedSources/WebCore/JSHTMLMapElement.h \
+ DerivedSources/WebCore/JSHTMLMarqueeElement.cpp \
+ DerivedSources/WebCore/JSHTMLMarqueeElement.h \
+ DerivedSources/WebCore/JSHTMLMediaElement.cpp \
+ DerivedSources/WebCore/JSHTMLMediaElement.h \
+ DerivedSources/WebCore/JSHTMLMenuElement.cpp \
+ DerivedSources/WebCore/JSHTMLMenuElement.h \
+ DerivedSources/WebCore/JSHTMLMetaElement.cpp \
+ DerivedSources/WebCore/JSHTMLMetaElement.h \
+ DerivedSources/WebCore/JSHTMLMeterElement.cpp \
+ DerivedSources/WebCore/JSHTMLMeterElement.h \
+ DerivedSources/WebCore/JSHTMLModElement.cpp \
+ DerivedSources/WebCore/JSHTMLModElement.h \
+ DerivedSources/WebCore/JSHTMLObjectElement.cpp \
+ DerivedSources/WebCore/JSHTMLObjectElement.h \
+ DerivedSources/WebCore/JSHTMLOListElement.cpp \
+ DerivedSources/WebCore/JSHTMLOListElement.h \
+ DerivedSources/WebCore/JSHTMLOptGroupElement.cpp \
+ DerivedSources/WebCore/JSHTMLOptGroupElement.h \
+ DerivedSources/WebCore/JSHTMLOptionElement.cpp \
+ DerivedSources/WebCore/JSHTMLOptionElement.h \
+ DerivedSources/WebCore/JSHTMLOptionsCollection.cpp \
+ DerivedSources/WebCore/JSHTMLOptionsCollection.h \
+ DerivedSources/WebCore/JSHTMLParagraphElement.cpp \
+ DerivedSources/WebCore/JSHTMLParagraphElement.h \
+ DerivedSources/WebCore/JSHTMLParamElement.cpp \
+ DerivedSources/WebCore/JSHTMLParamElement.h \
+ DerivedSources/WebCore/JSHTMLPreElement.cpp \
+ DerivedSources/WebCore/JSHTMLPreElement.h \
+ DerivedSources/WebCore/JSHTMLProgressElement.cpp \
+ DerivedSources/WebCore/JSHTMLProgressElement.h \
+ DerivedSources/WebCore/JSHTMLQuoteElement.cpp \
+ DerivedSources/WebCore/JSHTMLQuoteElement.h \
+ DerivedSources/WebCore/JSHTMLScriptElement.cpp \
+ DerivedSources/WebCore/JSHTMLScriptElement.h \
+ DerivedSources/WebCore/JSHTMLSelectElement.cpp \
+ DerivedSources/WebCore/JSHTMLSelectElement.h \
+ DerivedSources/WebCore/JSHTMLSourceElement.cpp \
+ DerivedSources/WebCore/JSHTMLSourceElement.h \
+ DerivedSources/WebCore/JSHTMLStyleElement.cpp \
+ DerivedSources/WebCore/JSHTMLStyleElement.h \
+ DerivedSources/WebCore/JSHTMLTableCaptionElement.cpp \
+ DerivedSources/WebCore/JSHTMLTableCaptionElement.h \
+ DerivedSources/WebCore/JSHTMLTableCellElement.cpp \
+ DerivedSources/WebCore/JSHTMLTableCellElement.h \
+ DerivedSources/WebCore/JSHTMLTableColElement.cpp \
+ DerivedSources/WebCore/JSHTMLTableColElement.h \
+ DerivedSources/WebCore/JSHTMLTableElement.cpp \
+ DerivedSources/WebCore/JSHTMLTableElement.h \
+ DerivedSources/WebCore/JSHTMLTableRowElement.cpp \
+ DerivedSources/WebCore/JSHTMLTableRowElement.h \
+ DerivedSources/WebCore/JSHTMLTableSectionElement.cpp \
+ DerivedSources/WebCore/JSHTMLTableSectionElement.h \
+ DerivedSources/WebCore/JSHTMLTextAreaElement.cpp \
+ DerivedSources/WebCore/JSHTMLTextAreaElement.h \
+ DerivedSources/WebCore/JSHTMLTitleElement.cpp \
+ DerivedSources/WebCore/JSHTMLTitleElement.h \
+ DerivedSources/WebCore/JSHTMLUListElement.cpp \
+ DerivedSources/WebCore/JSHTMLUListElement.h \
+ DerivedSources/WebCore/JSHTMLVideoElement.cpp \
+ DerivedSources/WebCore/JSHTMLVideoElement.h \
+ DerivedSources/WebCore/JSImageData.cpp \
+ DerivedSources/WebCore/JSImageData.h \
+ DerivedSources/WebCore/JSInjectedScriptHost.cpp \
+ DerivedSources/WebCore/JSInjectedScriptHost.h \
+ DerivedSources/WebCore/JSInspectorBackend.cpp \
+ DerivedSources/WebCore/JSInspectorBackend.h \
+ DerivedSources/WebCore/JSInspectorFrontendHost.cpp \
+ DerivedSources/WebCore/JSInspectorFrontendHost.h \
+ DerivedSources/WebCore/JSInt16Array.cpp \
+ DerivedSources/WebCore/JSInt16Array.h \
+ DerivedSources/WebCore/JSInt32Array.cpp \
+ DerivedSources/WebCore/JSInt32Array.h \
+ DerivedSources/WebCore/JSInt8Array.cpp \
+ DerivedSources/WebCore/JSInt8Array.h \
+ DerivedSources/WebCore/JSJavaScriptCallFrame.cpp \
+ DerivedSources/WebCore/JSJavaScriptCallFrame.h \
+ DerivedSources/WebCore/JSKeyboardEvent.cpp \
+ DerivedSources/WebCore/JSKeyboardEvent.h \
+ DerivedSources/WebCore/JSLocation.cpp \
+ DerivedSources/WebCore/JSLocation.h \
+ DerivedSources/WebCore/JSMediaError.cpp \
+ DerivedSources/WebCore/JSMediaError.h \
+ DerivedSources/WebCore/JSMediaList.cpp \
+ DerivedSources/WebCore/JSMediaList.h \
+ DerivedSources/WebCore/JSMemoryInfo.cpp \
+ DerivedSources/WebCore/JSMemoryInfo.h \
+ DerivedSources/WebCore/JSMessageChannel.cpp \
+ DerivedSources/WebCore/JSMessageChannel.h \
+ DerivedSources/WebCore/JSMessageEvent.cpp \
+ DerivedSources/WebCore/JSMessageEvent.h \
+ DerivedSources/WebCore/JSMessagePort.cpp \
+ DerivedSources/WebCore/JSMessagePort.h \
+ DerivedSources/WebCore/JSMouseEvent.cpp \
+ DerivedSources/WebCore/JSMouseEvent.h \
+ DerivedSources/WebCore/JSMutationEvent.cpp \
+ DerivedSources/WebCore/JSMutationEvent.h \
+ DerivedSources/WebCore/JSNamedNodeMap.cpp \
+ DerivedSources/WebCore/JSNamedNodeMap.h \
+ DerivedSources/WebCore/JSNavigation.cpp \
+ DerivedSources/WebCore/JSNavigation.h \
+ DerivedSources/WebCore/JSNavigator.cpp \
+ DerivedSources/WebCore/JSNavigator.h \
+ DerivedSources/WebCore/JSNode.cpp \
+ DerivedSources/WebCore/JSNodeFilter.cpp \
+ DerivedSources/WebCore/JSNodeFilter.h \
+ DerivedSources/WebCore/JSNode.h \
+ DerivedSources/WebCore/JSNodeIterator.cpp \
+ DerivedSources/WebCore/JSNodeIterator.h \
+ DerivedSources/WebCore/JSNodeList.cpp \
+ DerivedSources/WebCore/JSNodeList.h \
+ DerivedSources/WebCore/JSNotation.cpp \
+ DerivedSources/WebCore/JSNotation.h \
+ DerivedSources/WebCore/JSNotificationCenter.cpp \
+ DerivedSources/WebCore/JSNotificationCenter.h \
+ DerivedSources/WebCore/JSNotification.cpp \
+ DerivedSources/WebCore/JSNotification.h \
+ DerivedSources/WebCore/JSOverflowEvent.cpp \
+ DerivedSources/WebCore/JSOverflowEvent.h \
+ DerivedSources/WebCore/JSPageTransitionEvent.cpp \
+ DerivedSources/WebCore/JSPageTransitionEvent.h \
+ DerivedSources/WebCore/JSPerformance.cpp \
+ DerivedSources/WebCore/JSPerformance.h \
+ DerivedSources/WebCore/JSPopStateEvent.cpp \
+ DerivedSources/WebCore/JSPopStateEvent.h \
+ DerivedSources/WebCore/JSPositionError.cpp \
+ DerivedSources/WebCore/JSPositionError.h \
+ DerivedSources/WebCore/JSProcessingInstruction.cpp \
+ DerivedSources/WebCore/JSProcessingInstruction.h \
+ DerivedSources/WebCore/JSProgressEvent.cpp \
+ DerivedSources/WebCore/JSProgressEvent.h \
+ DerivedSources/WebCore/JSRange.cpp \
+ DerivedSources/WebCore/JSRangeException.cpp \
+ DerivedSources/WebCore/JSRangeException.h \
+ DerivedSources/WebCore/JSRange.h \
+ DerivedSources/WebCore/JSRect.cpp \
+ DerivedSources/WebCore/JSRect.h \
+ DerivedSources/WebCore/JSRGBColor.cpp \
+ DerivedSources/WebCore/JSRGBColor.h \
+ DerivedSources/WebCore/JSScreen.cpp \
+ DerivedSources/WebCore/JSScreen.h \
+ DerivedSources/WebCore/JSScriptProfile.cpp \
+ DerivedSources/WebCore/JSScriptProfile.h \
+ DerivedSources/WebCore/JSScriptProfileNode.cpp \
+ DerivedSources/WebCore/JSScriptProfileNode.h \
+ DerivedSources/WebCore/JSSharedWorkerContext.cpp \
+ DerivedSources/WebCore/JSSharedWorkerContext.h \
+ DerivedSources/WebCore/JSSharedWorker.cpp \
+ DerivedSources/WebCore/JSSharedWorker.h \
+ DerivedSources/WebCore/JSStyleMedia.cpp \
+ DerivedSources/WebCore/JSStyleMedia.h \
+ DerivedSources/WebCore/JSStyleSheet.cpp \
+ DerivedSources/WebCore/JSStyleSheet.h \
+ DerivedSources/WebCore/JSStyleSheetList.cpp \
+ DerivedSources/WebCore/JSStyleSheetList.h \
+ DerivedSources/WebCore/JSText.cpp \
+ DerivedSources/WebCore/JSTextEvent.cpp \
+ DerivedSources/WebCore/JSTextEvent.h \
+ DerivedSources/WebCore/JSText.h \
+ DerivedSources/WebCore/JSTextMetrics.cpp \
+ DerivedSources/WebCore/JSTextMetrics.h \
+ DerivedSources/WebCore/JSTiming.cpp \
+ DerivedSources/WebCore/JSTiming.h \
+ DerivedSources/WebCore/JSTouch.cpp \
+ DerivedSources/WebCore/JSTouchEvent.cpp \
+ DerivedSources/WebCore/JSTouchEvent.h \
+ DerivedSources/WebCore/JSTouch.h \
+ DerivedSources/WebCore/JSTouchList.cpp \
+ DerivedSources/WebCore/JSTouchList.h \
+ DerivedSources/WebCore/JSTreeWalker.cpp \
+ DerivedSources/WebCore/JSTreeWalker.h \
+ DerivedSources/WebCore/JSUIEvent.cpp \
+ DerivedSources/WebCore/JSUIEvent.h \
+ DerivedSources/WebCore/JSUint16Array.cpp \
+ DerivedSources/WebCore/JSUint16Array.h \
+ DerivedSources/WebCore/JSUint32Array.cpp \
+ DerivedSources/WebCore/JSUint32Array.h \
+ DerivedSources/WebCore/JSUint8Array.cpp \
+ DerivedSources/WebCore/JSUint8Array.h \
+ DerivedSources/WebCore/JSValidityState.cpp \
+ DerivedSources/WebCore/JSValidityState.h \
+ DerivedSources/WebCore/JSVoidCallback.cpp \
+ DerivedSources/WebCore/JSVoidCallback.h \
+ DerivedSources/WebCore/JSWebGLRenderingContext.cpp \
+ DerivedSources/WebCore/JSWebGLRenderingContext.h \
+ DerivedSources/WebCore/JSWebKitAnimationEvent.cpp \
+ DerivedSources/WebCore/JSWebKitAnimationEvent.h \
+ DerivedSources/WebCore/JSWebKitCSSKeyframeRule.cpp \
+ DerivedSources/WebCore/JSWebKitCSSKeyframeRule.h \
+ DerivedSources/WebCore/JSWebKitCSSKeyframesRule.cpp \
+ DerivedSources/WebCore/JSWebKitCSSKeyframesRule.h \
+ DerivedSources/WebCore/JSWebKitCSSMatrix.cpp \
+ DerivedSources/WebCore/JSWebKitCSSMatrix.h \
+ DerivedSources/WebCore/JSWebKitCSSTransformValue.cpp \
+ DerivedSources/WebCore/JSWebKitCSSTransformValue.h \
+ DerivedSources/WebCore/JSWebKitPoint.cpp \
+ DerivedSources/WebCore/JSWebKitPoint.h \
+ DerivedSources/WebCore/JSWebKitTransitionEvent.cpp \
+ DerivedSources/WebCore/JSWebKitTransitionEvent.h \
+ DerivedSources/WebCore/JSWheelEvent.cpp \
+ DerivedSources/WebCore/JSWheelEvent.h \
+ DerivedSources/WebCore/JSWorkerContext.cpp \
+ DerivedSources/WebCore/JSWorkerContext.h \
+ DerivedSources/WebCore/JSWorker.cpp \
+ DerivedSources/WebCore/JSWorker.h \
+ DerivedSources/WebCore/JSWorkerLocation.cpp \
+ DerivedSources/WebCore/JSWorkerLocation.h \
+ DerivedSources/WebCore/JSWorkerNavigator.cpp \
+ DerivedSources/WebCore/JSWorkerNavigator.h \
+ DerivedSources/WebCore/JSXMLHttpRequest.cpp \
+ DerivedSources/WebCore/JSXMLHttpRequestException.cpp \
+ DerivedSources/WebCore/JSXMLHttpRequestException.h \
+ DerivedSources/WebCore/JSXMLHttpRequest.h \
+ DerivedSources/WebCore/JSXMLHttpRequestProgressEvent.cpp \
+ DerivedSources/WebCore/JSXMLHttpRequestProgressEvent.h \
+ DerivedSources/WebCore/JSXMLHttpRequestUpload.cpp \
+ DerivedSources/WebCore/JSXMLHttpRequestUpload.h \
+ DerivedSources/WebCore/JSXMLSerializer.cpp \
+ DerivedSources/WebCore/JSXMLSerializer.h \
+ DerivedSources/WebCore/JSXSLTProcessor.cpp \
+ DerivedSources/WebCore/JSXSLTProcessor.h \
+ DerivedSources/WebCore/RemoteInspectorFrontend.cpp \
+ DerivedSources/WebCore/RemoteInspectorFrontend.h \
DerivedSources/WebCore/UserAgentStyleSheetsData.cpp \
- DerivedSources/WebCore/XMLNSNames.cpp \
- DerivedSources/WebCore/XMLNSNames.h \
+ DerivedSources/WebCore/UserAgentStyleSheets.h \
DerivedSources/WebCore/XMLNames.cpp \
- DerivedSources/WebCore/XMLNames.h
-
-IDL_BINDINGS += \
- WebCore/css/CSSCharsetRule.idl \
- WebCore/css/CSSFontFaceRule.idl \
- WebCore/css/CSSImportRule.idl \
- WebCore/css/CSSMediaRule.idl \
- WebCore/css/CSSPageRule.idl \
- WebCore/css/CSSPrimitiveValue.idl \
- WebCore/css/CSSRule.idl \
- WebCore/css/CSSRuleList.idl \
- WebCore/css/CSSStyleDeclaration.idl \
- WebCore/css/CSSStyleRule.idl \
- WebCore/css/CSSStyleSheet.idl \
- WebCore/css/CSSValue.idl \
- WebCore/css/CSSValueList.idl \
- WebCore/css/CSSVariablesDeclaration.idl \
- WebCore/css/CSSVariablesRule.idl \
- WebCore/css/Counter.idl \
- WebCore/css/MediaList.idl \
- WebCore/css/Rect.idl \
- WebCore/css/RGBColor.idl \
- WebCore/css/StyleMedia.idl \
- WebCore/css/StyleSheet.idl \
- WebCore/css/StyleSheetList.idl \
- WebCore/css/WebKitCSSKeyframeRule.idl \
- WebCore/css/WebKitCSSKeyframesRule.idl \
- WebCore/css/WebKitCSSMatrix.idl \
- WebCore/css/WebKitCSSTransformValue.idl \
- WebCore/dom/Attr.idl \
- WebCore/dom/BeforeLoadEvent.idl \
- WebCore/dom/BeforeProcessEvent.idl \
- WebCore/dom/CDATASection.idl \
- WebCore/dom/CharacterData.idl \
- WebCore/dom/ClientRect.idl \
- WebCore/dom/ClientRectList.idl \
- WebCore/dom/Clipboard.idl \
- WebCore/dom/Comment.idl \
- WebCore/dom/CompositionEvent.idl \
- WebCore/dom/CustomEvent.idl \
- WebCore/dom/DOMCoreException.idl \
- WebCore/dom/DOMImplementation.idl \
- WebCore/dom/DOMStringList.idl \
- WebCore/dom/DOMStringMap.idl \
- WebCore/dom/DeviceOrientationEvent.idl \
- WebCore/dom/Document.idl \
- WebCore/dom/DocumentFragment.idl \
- WebCore/dom/DocumentType.idl \
- WebCore/dom/Element.idl \
- WebCore/dom/Entity.idl \
- WebCore/dom/EntityReference.idl \
- WebCore/dom/ErrorEvent.idl \
- WebCore/dom/Event.idl \
- WebCore/dom/EventException.idl \
- WebCore/dom/KeyboardEvent.idl \
- WebCore/dom/MessageChannel.idl \
- WebCore/dom/MessageEvent.idl \
- WebCore/dom/MessagePort.idl \
- WebCore/dom/MouseEvent.idl \
- WebCore/dom/MutationEvent.idl \
- WebCore/dom/NamedNodeMap.idl \
- WebCore/dom/Node.idl \
- WebCore/dom/NodeFilter.idl \
- WebCore/dom/NodeIterator.idl \
- WebCore/dom/NodeList.idl \
- WebCore/dom/Notation.idl \
- WebCore/dom/OverflowEvent.idl \
- WebCore/dom/PageTransitionEvent.idl \
- WebCore/dom/PopStateEvent.idl \
- WebCore/dom/ProcessingInstruction.idl \
- WebCore/dom/ProgressEvent.idl \
- WebCore/dom/Range.idl \
- WebCore/dom/RangeException.idl \
- WebCore/dom/Text.idl \
- WebCore/dom/TextEvent.idl \
- WebCore/dom/Touch.idl \
- WebCore/dom/TouchEvent.idl \
- WebCore/dom/TouchList.idl \
- WebCore/dom/TreeWalker.idl \
- WebCore/dom/UIEvent.idl \
- WebCore/dom/WebKitAnimationEvent.idl \
- WebCore/dom/WebKitTransitionEvent.idl \
- WebCore/dom/WheelEvent.idl \
- WebCore/html/Blob.idl \
- WebCore/html/BlobBuilder.idl \
- WebCore/html/canvas/ArrayBufferView.idl \
- WebCore/html/canvas/ArrayBuffer.idl \
- WebCore/html/canvas/Int8Array.idl \
- WebCore/html/canvas/Float32Array.idl \
- WebCore/html/canvas/CanvasGradient.idl \
- WebCore/html/canvas/Int32Array.idl \
- WebCore/html/canvas/CanvasPattern.idl \
- WebCore/html/canvas/CanvasRenderingContext.idl \
- WebCore/html/canvas/CanvasRenderingContext2D.idl \
- WebCore/html/canvas/WebGLRenderingContext.idl \
- WebCore/html/canvas/Int16Array.idl \
- WebCore/html/canvas/Uint8Array.idl \
- WebCore/html/canvas/Uint32Array.idl \
- WebCore/html/canvas/Uint16Array.idl \
- WebCore/html/DataGridColumn.idl \
- WebCore/html/DataGridColumnList.idl \
- WebCore/html/DOMFormData.idl \
- WebCore/html/File.idl \
- WebCore/html/FileError.idl \
- WebCore/html/FileList.idl \
- WebCore/html/FileReader.idl \
- WebCore/html/HTMLAllCollection.idl \
- WebCore/html/HTMLAnchorElement.idl \
- WebCore/html/HTMLAppletElement.idl \
- WebCore/html/HTMLAreaElement.idl \
- WebCore/html/HTMLAudioElement.idl \
- WebCore/html/HTMLBRElement.idl \
- WebCore/html/HTMLBaseElement.idl \
- WebCore/html/HTMLBaseFontElement.idl \
- WebCore/html/HTMLBlockquoteElement.idl \
- WebCore/html/HTMLBodyElement.idl \
- WebCore/html/HTMLButtonElement.idl \
- WebCore/html/HTMLCanvasElement.idl \
- WebCore/html/HTMLCollection.idl \
- WebCore/html/HTMLDataGridElement.idl \
- WebCore/html/HTMLDataGridCellElement.idl \
- WebCore/html/HTMLDataGridColElement.idl \
- WebCore/html/HTMLDataGridRowElement.idl \
- WebCore/html/HTMLDataListElement.idl \
- WebCore/html/HTMLDListElement.idl \
- WebCore/html/HTMLDirectoryElement.idl \
- WebCore/html/HTMLDivElement.idl \
- WebCore/html/HTMLDocument.idl \
- WebCore/html/HTMLElement.idl \
- WebCore/html/HTMLEmbedElement.idl \
- WebCore/html/HTMLFieldSetElement.idl \
- WebCore/html/HTMLFontElement.idl \
- WebCore/html/HTMLFormElement.idl \
- WebCore/html/HTMLFrameElement.idl \
- WebCore/html/HTMLFrameSetElement.idl \
- WebCore/html/HTMLHRElement.idl \
- WebCore/html/HTMLHeadElement.idl \
- WebCore/html/HTMLHeadingElement.idl \
- WebCore/html/HTMLHtmlElement.idl \
- WebCore/html/HTMLIFrameElement.idl \
- WebCore/html/HTMLImageElement.idl \
- WebCore/html/HTMLInputElement.idl \
- WebCore/html/HTMLIsIndexElement.idl \
- WebCore/html/HTMLLIElement.idl \
- WebCore/html/HTMLLabelElement.idl \
- WebCore/html/HTMLLegendElement.idl \
- WebCore/html/HTMLLinkElement.idl \
- WebCore/html/HTMLMapElement.idl \
- WebCore/html/HTMLMarqueeElement.idl \
- WebCore/html/HTMLMediaElement.idl \
- WebCore/html/MediaError.idl \
- WebCore/html/HTMLMenuElement.idl \
- WebCore/html/HTMLMetaElement.idl \
- WebCore/html/HTMLMeterElement.idl \
- WebCore/html/HTMLModElement.idl \
- WebCore/html/HTMLOListElement.idl \
- WebCore/html/HTMLObjectElement.idl \
- WebCore/html/HTMLOptGroupElement.idl \
- WebCore/html/HTMLOptionElement.idl \
- WebCore/html/HTMLOptionsCollection.idl \
- WebCore/html/HTMLParagraphElement.idl \
- WebCore/html/HTMLParamElement.idl \
- WebCore/html/HTMLPreElement.idl \
- WebCore/html/HTMLProgressElement.idl \
- WebCore/html/HTMLQuoteElement.idl \
- WebCore/html/HTMLScriptElement.idl \
- WebCore/html/HTMLSelectElement.idl \
- WebCore/html/HTMLSourceElement.idl \
- WebCore/html/HTMLStyleElement.idl \
- WebCore/html/HTMLTableCaptionElement.idl \
- WebCore/html/HTMLTableCellElement.idl \
- WebCore/html/HTMLTableColElement.idl \
- WebCore/html/HTMLTableElement.idl \
- WebCore/html/HTMLTableRowElement.idl \
- WebCore/html/HTMLTableSectionElement.idl \
- WebCore/html/HTMLTextAreaElement.idl \
- WebCore/html/HTMLTitleElement.idl \
- WebCore/html/HTMLUListElement.idl \
- WebCore/html/HTMLVideoElement.idl \
- WebCore/html/ImageData.idl \
- WebCore/html/TextMetrics.idl \
- WebCore/html/ValidityState.idl \
- WebCore/html/VoidCallback.idl \
- WebCore/inspector/JavaScriptCallFrame.idl \
- WebCore/inspector/InjectedScriptHost.idl \
- WebCore/inspector/InspectorBackend.idl \
- WebCore/inspector/InspectorFrontendHost.idl \
- WebCore/inspector/ScriptProfile.idl \
- WebCore/inspector/ScriptProfileNode.idl \
- WebCore/notifications/Notification.idl \
- WebCore/notifications/NotificationCenter.idl \
- WebCore/page/BarInfo.idl \
- WebCore/page/Console.idl \
- WebCore/page/Coordinates.idl \
- WebCore/page/DOMSelection.idl \
- WebCore/page/DOMWindow.idl \
- WebCore/page/EventSource.idl \
- WebCore/page/Geolocation.idl \
- WebCore/page/Geoposition.idl \
- WebCore/page/History.idl \
- WebCore/page/Location.idl \
- WebCore/page/MemoryInfo.idl \
- WebCore/page/Navigation.idl \
- WebCore/page/Navigator.idl \
- WebCore/page/Performance.idl \
- WebCore/page/PositionError.idl \
- WebCore/page/Screen.idl \
- WebCore/page/Timing.idl \
- WebCore/page/WebKitPoint.idl \
- WebCore/page/WorkerNavigator.idl \
- WebCore/plugins/DOMMimeType.idl \
- WebCore/plugins/DOMMimeTypeArray.idl \
- WebCore/plugins/DOMPlugin.idl \
- WebCore/plugins/DOMPluginArray.idl \
- WebCore/workers/AbstractWorker.idl \
- WebCore/workers/DedicatedWorkerContext.idl \
- WebCore/workers/SharedWorker.idl \
- WebCore/workers/SharedWorkerContext.idl \
- WebCore/workers/Worker.idl \
- WebCore/workers/WorkerContext.idl \
- WebCore/workers/WorkerLocation.idl \
- WebCore/xml/DOMParser.idl \
- WebCore/xml/XMLHttpRequest.idl \
- WebCore/xml/XMLHttpRequestException.idl \
- WebCore/xml/XMLHttpRequestProgressEvent.idl \
- WebCore/xml/XMLHttpRequestUpload.idl \
- WebCore/xml/XMLSerializer.idl \
- WebCore/xml/XSLTProcessor.idl
-
-# This IDL file should not be used when calculating the source list
-# of libWebCoreJS, so we add it directly to the header list here, so
-# that it will be included in the distribution.
-noinst_HEADERS += \
- WebCore/inspector/InspectorFrontend2.idl
+ DerivedSources/WebCore/XMLNames.h \
+ DerivedSources/WebCore/XMLNSNames.cpp \
+ DerivedSources/WebCore/XMLNSNames.h
webcoregtk_dom_sources = \
WebCore/bindings/gobject/ConvertToUTF8String.cpp \
@@ -403,6 +621,8 @@ webcore_sources += \
WebCore/accessibility/AccessibilityTableHeaderContainer.h \
WebCore/accessibility/AccessibilityTableRow.cpp \
WebCore/accessibility/AccessibilityTableRow.h \
+ WebCore/bindings/generic/RuntimeEnabledFeatures.cpp \
+ WebCore/bindings/generic/RuntimeEnabledFeatures.h \
WebCore/bindings/js/CachedScriptSourceProvider.h \
WebCore/bindings/js/DOMObjectHashTableMap.cpp \
WebCore/bindings/js/DOMObjectHashTableMap.h \
@@ -452,6 +672,7 @@ webcore_sources += \
WebCore/bindings/js/JSDOMWindowShell.h \
WebCore/bindings/js/JSDOMWrapper.cpp \
WebCore/bindings/js/JSDOMWrapper.h \
+ WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp \
WebCore/bindings/js/JSDocumentCustom.cpp \
WebCore/bindings/js/JSElementCustom.cpp \
WebCore/bindings/js/JSEventCustom.cpp \
@@ -800,6 +1021,8 @@ webcore_sources += \
WebCore/dom/DatasetDOMStringMap.h \
WebCore/dom/DecodedDataDocumentParser.cpp \
WebCore/dom/DecodedDataDocumentParser.h \
+ WebCore/dom/DeviceOrientation.cpp \
+ WebCore/dom/DeviceOrientation.h \
WebCore/dom/DeviceOrientationClient.h \
WebCore/dom/DeviceOrientationController.cpp \
WebCore/dom/DeviceOrientationController.h \
@@ -1871,6 +2094,8 @@ webcore_sources += \
WebCore/platform/text/CharacterNames.h \
WebCore/platform/text/Hyphenation.cpp \
WebCore/platform/text/Hyphenation.h \
+ WebCore/platform/text/LineEnding.cpp \
+ WebCore/platform/text/LineEnding.h \
WebCore/platform/text/ParserUtilities.h \
WebCore/platform/text/PlatformString.h \
WebCore/platform/text/RegularExpression.cpp \
@@ -2422,12 +2647,13 @@ endif # END ENABLE_JAVASCRIPT_DEBUGGER
if ENABLE_OFFLINE_WEB_APPLICATIONS
FEATURE_DEFINES += ENABLE_OFFLINE_WEB_APPLICATIONS=1
-IDL_BINDINGS += \
- WebCore/loader/appcache/DOMApplicationCache.idl
-
webcore_cppflags += \
-DENABLE_OFFLINE_WEB_APPLICATIONS=1
+webcore_built_sources += \
+ DerivedSources/WebCore/JSDOMApplicationCache.cpp \
+ DerivedSources/WebCore/JSDOMApplicationCache.h
+
webcore_sources += \
WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp \
WebCore/loader/appcache/ApplicationCache.cpp \
@@ -2453,25 +2679,39 @@ endif # END ENABLE_OFFLINE_WEB_APPLICATIONS
if ENABLE_DATABASE
FEATURE_DEFINES += ENABLE_DATABASE=1
-IDL_BINDINGS += \
- WebCore/storage/Database.idl \
- WebCore/storage/DatabaseCallback.idl \
- WebCore/storage/DatabaseSync.idl \
- WebCore/storage/SQLError.idl \
- WebCore/storage/SQLException.idl \
- WebCore/storage/SQLResultSet.idl \
- WebCore/storage/SQLResultSetRowList.idl \
- WebCore/storage/SQLStatementCallback.idl \
- WebCore/storage/SQLStatementErrorCallback.idl \
- WebCore/storage/SQLTransaction.idl \
- WebCore/storage/SQLTransactionCallback.idl \
- WebCore/storage/SQLTransactionErrorCallback.idl \
- WebCore/storage/SQLTransactionSync.idl \
- WebCore/storage/SQLTransactionSyncCallback.idl
-
webcore_cppflags += \
-DENABLE_DATABASE=1
+webcore_built_sources += \
+ DerivedSources/WebCore/JSDatabase.cpp \
+ DerivedSources/WebCore/JSDatabase.h \
+ DerivedSources/WebCore/JSDatabaseCallback.cpp \
+ DerivedSources/WebCore/JSDatabaseCallback.h \
+ DerivedSources/WebCore/JSDatabaseSync.cpp \
+ DerivedSources/WebCore/JSDatabaseSync.h \
+ DerivedSources/WebCore/JSSQLError.cpp \
+ DerivedSources/WebCore/JSSQLError.h \
+ DerivedSources/WebCore/JSSQLException.cpp \
+ DerivedSources/WebCore/JSSQLException.h \
+ DerivedSources/WebCore/JSSQLResultSet.cpp \
+ DerivedSources/WebCore/JSSQLResultSet.h \
+ DerivedSources/WebCore/JSSQLResultSetRowList.cpp \
+ DerivedSources/WebCore/JSSQLResultSetRowList.h \
+ DerivedSources/WebCore/JSSQLStatementCallback.cpp \
+ DerivedSources/WebCore/JSSQLStatementCallback.h \
+ DerivedSources/WebCore/JSSQLStatementErrorCallback.cpp \
+ DerivedSources/WebCore/JSSQLStatementErrorCallback.h \
+ DerivedSources/WebCore/JSSQLTransaction.cpp \
+ DerivedSources/WebCore/JSSQLTransaction.h \
+ DerivedSources/WebCore/JSSQLTransactionCallback.cpp \
+ DerivedSources/WebCore/JSSQLTransactionCallback.h \
+ DerivedSources/WebCore/JSSQLTransactionErrorCallback.cpp \
+ DerivedSources/WebCore/JSSQLTransactionErrorCallback.h \
+ DerivedSources/WebCore/JSSQLTransactionSync.cpp \
+ DerivedSources/WebCore/JSSQLTransactionSync.h \
+ DerivedSources/WebCore/JSSQLTransactionSyncCallback.cpp \
+ DerivedSources/WebCore/JSSQLTransactionSyncCallback.h
+
webcore_sources += \
WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp \
WebCore/bindings/js/JSDatabaseCustom.cpp \
@@ -2524,6 +2764,8 @@ webcore_sources += \
WebCore/storage/SQLStatement.h \
WebCore/storage/SQLStatementCallback.h \
WebCore/storage/SQLStatementErrorCallback.h \
+ WebCore/storage/SQLStatementSync.cpp \
+ WebCore/storage/SQLStatementSync.h \
WebCore/storage/SQLTransaction.cpp \
WebCore/storage/SQLTransaction.h \
WebCore/storage/SQLTransactionCallback.h \
@@ -2572,23 +2814,35 @@ endif # ENABLE_EVENTSOURCE
if ENABLE_INDEXED_DATABASE
FEATURE_DEFINES += ENABLE_INDEXED_DATABASE=1
-IDL_BINDINGS += \
- WebCore/storage/IDBAny.idl \
- WebCore/storage/IDBDatabaseError.idl \
- WebCore/storage/IDBDatabaseException.idl \
- WebCore/storage/IDBDatabaseRequest.idl \
- WebCore/storage/IDBErrorEvent.idl \
- WebCore/storage/IDBEvent.idl \
- WebCore/storage/IDBIndexRequest.idl \
- WebCore/storage/IDBKeyRange.idl \
- WebCore/storage/IDBObjectStoreRequest.idl \
- WebCore/storage/IDBRequest.idl \
- WebCore/storage/IDBSuccessEvent.idl \
- WebCore/storage/IndexedDatabaseRequest.idl
-
webcore_cppflags += \
-DENABLE_INDEXED_DATABASE=1
+webcore_built_sources += \
+ DerivedSources/WebCore/JSIDBAny.cpp \
+ DerivedSources/WebCore/JSIDBAny.h \
+ DerivedSources/WebCore/JSIDBDatabaseError.cpp \
+ DerivedSources/WebCore/JSIDBDatabaseError.h \
+ DerivedSources/WebCore/JSIDBDatabaseException.cpp \
+ DerivedSources/WebCore/JSIDBDatabaseException.h \
+ DerivedSources/WebCore/JSIDBDatabaseRequest.cpp \
+ DerivedSources/WebCore/JSIDBDatabaseRequest.h \
+ DerivedSources/WebCore/JSIDBErrorEvent.cpp \
+ DerivedSources/WebCore/JSIDBErrorEvent.h \
+ DerivedSources/WebCore/JSIDBEvent.cpp \
+ DerivedSources/WebCore/JSIDBEvent.h \
+ DerivedSources/WebCore/JSIDBIndexRequest.cpp \
+ DerivedSources/WebCore/JSIDBIndexRequest.h \
+ DerivedSources/WebCore/JSIDBKeyRange.cpp \
+ DerivedSources/WebCore/JSIDBKeyRange.h \
+ DerivedSources/WebCore/JSIDBObjectStoreRequest.cpp \
+ DerivedSources/WebCore/JSIDBObjectStoreRequest.h \
+ DerivedSources/WebCore/JSIDBRequest.cpp \
+ DerivedSources/WebCore/JSIDBRequest.h \
+ DerivedSources/WebCore/JSIDBSuccessEvent.cpp \
+ DerivedSources/WebCore/JSIDBSuccessEvent.h \
+ DerivedSources/WebCore/JSIndexedDatabaseRequest.cpp \
+ DerivedSources/WebCore/JSIndexedDatabaseRequest.h
+
webcore_sources += \
WebCore/storage/IDBAny.cpp \
WebCore/storage/IDBAny.h \
@@ -2647,13 +2901,15 @@ endif # END ENABLE_DIRECTORY_UPLOAD
if ENABLE_DOM_STORAGE
FEATURE_DEFINES += ENABLE_DOM_STORAGE=1
-IDL_BINDINGS += \
- WebCore/storage/Storage.idl \
- WebCore/storage/StorageEvent.idl
-
webcore_cppflags += \
-DENABLE_DOM_STORAGE=1
+webcore_built_sources += \
+ DerivedSources/WebCore/JSStorage.cpp \
+ DerivedSources/WebCore/JSStorage.h \
+ DerivedSources/WebCore/JSStorageEvent.cpp \
+ DerivedSources/WebCore/JSStorageEvent.h
+
webcore_sources += \
WebCore/bindings/js/JSStorageCustom.cpp \
WebCore/storage/LocalStorageTask.cpp \
@@ -2689,6 +2945,13 @@ if ENABLE_INPUT_SPEECH
FEATURE_DEFINES += ENABLE_INPUT_SPEECH=1
webcore_cppflags += -DENABLE_INPUT_SPEECH=1
+webcore_sources += \
+ WebCore/page/SpeechInput.cpp \
+ WebCore/page/SpeechInput.h \
+ WebCore/page/SpeechInputClient.h \
+ WebCore/page/SpeechInputClientListener.h \
+ WebCore/page/SpeechInputListener.h
+
else
webcore_cppflags += -DENABLE_INPUT_SPEECH=0
@@ -2755,8 +3018,9 @@ if ENABLE_DEBUG
webcore_cppflags += -DGST_DISABLE_DEPRECATED
endif # END ENABLE_DEBUG
-IDL_BINDINGS += \
- WebCore/html/TimeRanges.idl
+webcore_built_sources += \
+ DerivedSources/WebCore/JSTimeRanges.cpp \
+ DerivedSources/WebCore/JSTimeRanges.h
webcore_sources += \
WebCore/bindings/js/JSAudioConstructor.cpp \
@@ -2845,16 +3109,19 @@ FEATURE_DEFINES += ENABLE_XPATH=1
webcore_cppflags += -DENABLE_XPATH=1
webcore_built_sources += \
+ DerivedSources/WebCore/JSXPathEvaluator.cpp \
+ DerivedSources/WebCore/JSXPathEvaluator.h \
+ DerivedSources/WebCore/JSXPathException.cpp \
+ DerivedSources/WebCore/JSXPathException.h \
+ DerivedSources/WebCore/JSXPathExpression.cpp \
+ DerivedSources/WebCore/JSXPathExpression.h \
+ DerivedSources/WebCore/JSXPathNSResolver.cpp \
+ DerivedSources/WebCore/JSXPathNSResolver.h \
+ DerivedSources/WebCore/JSXPathResult.cpp \
+ DerivedSources/WebCore/JSXPathResult.h \
DerivedSources/WebCore/XPathGrammar.cpp \
DerivedSources/WebCore/XPathGrammar.h
-IDL_BINDINGS += \
- WebCore/xml/XPathEvaluator.idl \
- WebCore/xml/XPathException.idl \
- WebCore/xml/XPathExpression.idl \
- WebCore/xml/XPathNSResolver.idl \
- WebCore/xml/XPathResult.idl
-
webcore_sources += \
WebCore/xml/NativeXPathNSResolver.cpp \
WebCore/xml/NativeXPathNSResolver.h \
@@ -3190,160 +3457,295 @@ FEATURE_DEFINES += ENABLE_SVG=1
WEBCORE_CSS_PROPERTY_NAMES += $(WebCore)/css/SVGCSSPropertyNames.in
WEBCORE_CSS_VALUE_KEYWORDS += $(WebCore)/css/SVGCSSValueKeywords.in
-IDL_BINDINGS += \
- WebCore/svg/ElementTimeControl.idl \
- WebCore/svg/SVGAElement.idl \
- WebCore/svg/SVGAltGlyphElement.idl \
- WebCore/svg/SVGAngle.idl \
- WebCore/svg/SVGAnimateColorElement.idl \
- WebCore/svg/SVGAnimateElement.idl \
- WebCore/svg/SVGAnimateTransformElement.idl \
- WebCore/svg/SVGAnimatedAngle.idl \
- WebCore/svg/SVGAnimatedBoolean.idl \
- WebCore/svg/SVGAnimatedEnumeration.idl \
- WebCore/svg/SVGAnimatedInteger.idl \
- WebCore/svg/SVGAnimatedLength.idl \
- WebCore/svg/SVGAnimatedLengthList.idl \
- WebCore/svg/SVGAnimatedNumber.idl \
- WebCore/svg/SVGAnimatedNumberList.idl \
- WebCore/svg/SVGAnimatedPathData.idl \
- WebCore/svg/SVGAnimatedPoints.idl \
- WebCore/svg/SVGAnimatedPreserveAspectRatio.idl \
- WebCore/svg/SVGAnimatedRect.idl \
- WebCore/svg/SVGAnimatedString.idl \
- WebCore/svg/SVGAnimatedTransformList.idl \
- WebCore/svg/SVGAnimationElement.idl \
- WebCore/svg/SVGCircleElement.idl \
- WebCore/svg/SVGClipPathElement.idl \
- WebCore/svg/SVGColor.idl \
- WebCore/svg/SVGComponentTransferFunctionElement.idl \
- WebCore/svg/SVGCursorElement.idl \
- WebCore/svg/SVGDefsElement.idl \
- WebCore/svg/SVGDescElement.idl \
- WebCore/svg/SVGDocument.idl \
- WebCore/svg/SVGElement.idl \
- WebCore/svg/SVGElementInstance.idl \
- WebCore/svg/SVGElementInstanceList.idl \
- WebCore/svg/SVGEllipseElement.idl \
- WebCore/svg/SVGException.idl \
- WebCore/svg/SVGExternalResourcesRequired.idl \
- WebCore/svg/SVGFEBlendElement.idl \
- WebCore/svg/SVGFEColorMatrixElement.idl \
- WebCore/svg/SVGFEComponentTransferElement.idl \
- WebCore/svg/SVGFECompositeElement.idl \
- WebCore/svg/SVGFEConvolveMatrixElement.idl \
- WebCore/svg/SVGFEDiffuseLightingElement.idl \
- WebCore/svg/SVGFEDisplacementMapElement.idl \
- WebCore/svg/SVGFEDistantLightElement.idl \
- WebCore/svg/SVGFEFloodElement.idl \
- WebCore/svg/SVGFEFuncAElement.idl \
- WebCore/svg/SVGFEFuncBElement.idl \
- WebCore/svg/SVGFEFuncGElement.idl \
- WebCore/svg/SVGFEFuncRElement.idl \
- WebCore/svg/SVGFEGaussianBlurElement.idl \
- WebCore/svg/SVGFEImageElement.idl \
- WebCore/svg/SVGFEMergeElement.idl \
- WebCore/svg/SVGFEMergeNodeElement.idl \
- WebCore/svg/SVGFEMorphologyElement.idl \
- WebCore/svg/SVGFEOffsetElement.idl \
- WebCore/svg/SVGFEPointLightElement.idl \
- WebCore/svg/SVGFESpecularLightingElement.idl \
- WebCore/svg/SVGFESpotLightElement.idl \
- WebCore/svg/SVGFETileElement.idl \
- WebCore/svg/SVGFETurbulenceElement.idl \
- WebCore/svg/SVGFilterElement.idl \
- WebCore/svg/SVGFilterPrimitiveStandardAttributes.idl \
- WebCore/svg/SVGFitToViewBox.idl \
- WebCore/svg/SVGFontElement.idl \
- WebCore/svg/SVGFontFaceElement.idl \
- WebCore/svg/SVGFontFaceFormatElement.idl \
- WebCore/svg/SVGFontFaceNameElement.idl \
- WebCore/svg/SVGFontFaceSrcElement.idl \
- WebCore/svg/SVGFontFaceUriElement.idl \
- WebCore/svg/SVGForeignObjectElement.idl \
- WebCore/svg/SVGGElement.idl \
- WebCore/svg/SVGGlyphElement.idl \
- WebCore/svg/SVGGradientElement.idl \
- WebCore/svg/SVGHKernElement.idl \
- WebCore/svg/SVGImageElement.idl \
- WebCore/svg/SVGLangSpace.idl \
- WebCore/svg/SVGLength.idl \
- WebCore/svg/SVGLengthList.idl \
- WebCore/svg/SVGLineElement.idl \
- WebCore/svg/SVGLinearGradientElement.idl \
- WebCore/svg/SVGLocatable.idl \
- WebCore/svg/SVGMarkerElement.idl \
- WebCore/svg/SVGMaskElement.idl \
- WebCore/svg/SVGMatrix.idl \
- WebCore/svg/SVGMetadataElement.idl \
- WebCore/svg/SVGMissingGlyphElement.idl \
- WebCore/svg/SVGNumber.idl \
- WebCore/svg/SVGNumberList.idl \
- WebCore/svg/SVGPaint.idl \
- WebCore/svg/SVGPathElement.idl \
- WebCore/svg/SVGPathSeg.idl \
- WebCore/svg/SVGPathSegArcAbs.idl \
- WebCore/svg/SVGPathSegArcRel.idl \
- WebCore/svg/SVGPathSegClosePath.idl \
- WebCore/svg/SVGPathSegCurvetoCubicAbs.idl \
- WebCore/svg/SVGPathSegCurvetoCubicRel.idl \
- WebCore/svg/SVGPathSegCurvetoCubicSmoothAbs.idl \
- WebCore/svg/SVGPathSegCurvetoCubicSmoothRel.idl \
- WebCore/svg/SVGPathSegCurvetoQuadraticAbs.idl \
- WebCore/svg/SVGPathSegCurvetoQuadraticRel.idl \
- WebCore/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl \
- WebCore/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl \
- WebCore/svg/SVGPathSegLinetoAbs.idl \
- WebCore/svg/SVGPathSegLinetoHorizontalAbs.idl \
- WebCore/svg/SVGPathSegLinetoHorizontalRel.idl \
- WebCore/svg/SVGPathSegLinetoRel.idl \
- WebCore/svg/SVGPathSegLinetoVerticalAbs.idl \
- WebCore/svg/SVGPathSegLinetoVerticalRel.idl \
- WebCore/svg/SVGPathSegList.idl \
- WebCore/svg/SVGPathSegMovetoAbs.idl \
- WebCore/svg/SVGPathSegMovetoRel.idl \
- WebCore/svg/SVGPatternElement.idl \
- WebCore/svg/SVGPoint.idl \
- WebCore/svg/SVGPointList.idl \
- WebCore/svg/SVGPolygonElement.idl \
- WebCore/svg/SVGPolylineElement.idl \
- WebCore/svg/SVGPreserveAspectRatio.idl \
- WebCore/svg/SVGRadialGradientElement.idl \
- WebCore/svg/SVGRect.idl \
- WebCore/svg/SVGRectElement.idl \
- WebCore/svg/SVGRenderingIntent.idl \
- WebCore/svg/SVGSVGElement.idl \
- WebCore/svg/SVGScriptElement.idl \
- WebCore/svg/SVGSetElement.idl \
- WebCore/svg/SVGStopElement.idl \
- WebCore/svg/SVGStringList.idl \
- WebCore/svg/SVGStylable.idl \
- WebCore/svg/SVGStyleElement.idl \
- WebCore/svg/SVGSwitchElement.idl \
- WebCore/svg/SVGSymbolElement.idl \
- WebCore/svg/SVGTRefElement.idl \
- WebCore/svg/SVGTSpanElement.idl \
- WebCore/svg/SVGTests.idl \
- WebCore/svg/SVGTextContentElement.idl \
- WebCore/svg/SVGTextElement.idl \
- WebCore/svg/SVGTextPathElement.idl \
- WebCore/svg/SVGTextPositioningElement.idl \
- WebCore/svg/SVGTitleElement.idl \
- WebCore/svg/SVGTransform.idl \
- WebCore/svg/SVGTransformList.idl \
- WebCore/svg/SVGTransformable.idl \
- WebCore/svg/SVGURIReference.idl \
- WebCore/svg/SVGUnitTypes.idl \
- WebCore/svg/SVGUseElement.idl \
- WebCore/svg/SVGViewElement.idl \
- WebCore/svg/SVGViewSpec.idl \
- WebCore/svg/SVGVKernElement.idl \
- WebCore/svg/SVGZoomAndPan.idl \
- WebCore/svg/SVGZoomEvent.idl
-
webcore_cppflags += \
-DENABLE_SVG=1
+webcore_built_sources += \
+ DerivedSources/WebCore/JSElementTimeControl.h \
+ DerivedSources/WebCore/JSSVGAElement.cpp \
+ DerivedSources/WebCore/JSSVGAElement.h \
+ DerivedSources/WebCore/JSSVGAltGlyphElement.cpp \
+ DerivedSources/WebCore/JSSVGAltGlyphElement.h \
+ DerivedSources/WebCore/JSSVGAngle.cpp \
+ DerivedSources/WebCore/JSSVGAngle.h \
+ DerivedSources/WebCore/JSSVGAnimateColorElement.cpp \
+ DerivedSources/WebCore/JSSVGAnimateColorElement.h \
+ DerivedSources/WebCore/JSSVGAnimatedAngle.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedAngle.h \
+ DerivedSources/WebCore/JSSVGAnimatedBoolean.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedBoolean.h \
+ DerivedSources/WebCore/JSSVGAnimatedEnumeration.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedEnumeration.h \
+ DerivedSources/WebCore/JSSVGAnimatedInteger.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedInteger.h \
+ DerivedSources/WebCore/JSSVGAnimatedLength.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedLength.h \
+ DerivedSources/WebCore/JSSVGAnimatedLengthList.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedLengthList.h \
+ DerivedSources/WebCore/JSSVGAnimatedNumber.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedNumber.h \
+ DerivedSources/WebCore/JSSVGAnimatedNumberList.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedNumberList.h \
+ DerivedSources/WebCore/JSSVGAnimatedPathData.h \
+ DerivedSources/WebCore/JSSVGAnimatedPoints.h \
+ DerivedSources/WebCore/JSSVGAnimatedPreserveAspectRatio.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedPreserveAspectRatio.h \
+ DerivedSources/WebCore/JSSVGAnimatedRect.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedRect.h \
+ DerivedSources/WebCore/JSSVGAnimatedString.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedString.h \
+ DerivedSources/WebCore/JSSVGAnimatedTransformList.cpp \
+ DerivedSources/WebCore/JSSVGAnimatedTransformList.h \
+ DerivedSources/WebCore/JSSVGAnimateElement.cpp \
+ DerivedSources/WebCore/JSSVGAnimateElement.h \
+ DerivedSources/WebCore/JSSVGAnimateTransformElement.cpp \
+ DerivedSources/WebCore/JSSVGAnimateTransformElement.h \
+ DerivedSources/WebCore/JSSVGAnimationElement.cpp \
+ DerivedSources/WebCore/JSSVGAnimationElement.h \
+ DerivedSources/WebCore/JSSVGCircleElement.cpp \
+ DerivedSources/WebCore/JSSVGCircleElement.h \
+ DerivedSources/WebCore/JSSVGClipPathElement.cpp \
+ DerivedSources/WebCore/JSSVGClipPathElement.h \
+ DerivedSources/WebCore/JSSVGColor.cpp \
+ DerivedSources/WebCore/JSSVGColor.h \
+ DerivedSources/WebCore/JSSVGComponentTransferFunctionElement.cpp \
+ DerivedSources/WebCore/JSSVGComponentTransferFunctionElement.h \
+ DerivedSources/WebCore/JSSVGCursorElement.cpp \
+ DerivedSources/WebCore/JSSVGCursorElement.h \
+ DerivedSources/WebCore/JSSVGDefsElement.cpp \
+ DerivedSources/WebCore/JSSVGDefsElement.h \
+ DerivedSources/WebCore/JSSVGDescElement.cpp \
+ DerivedSources/WebCore/JSSVGDescElement.h \
+ DerivedSources/WebCore/JSSVGDocument.cpp \
+ DerivedSources/WebCore/JSSVGDocument.h \
+ DerivedSources/WebCore/JSSVGElement.cpp \
+ DerivedSources/WebCore/JSSVGElement.h \
+ DerivedSources/WebCore/JSSVGElementInstance.cpp \
+ DerivedSources/WebCore/JSSVGElementInstance.h \
+ DerivedSources/WebCore/JSSVGElementInstanceList.cpp \
+ DerivedSources/WebCore/JSSVGElementInstanceList.h \
+ DerivedSources/WebCore/JSSVGEllipseElement.cpp \
+ DerivedSources/WebCore/JSSVGEllipseElement.h \
+ DerivedSources/WebCore/JSSVGException.cpp \
+ DerivedSources/WebCore/JSSVGException.h \
+ DerivedSources/WebCore/JSSVGExternalResourcesRequired.h \
+ DerivedSources/WebCore/JSSVGFEBlendElement.cpp \
+ DerivedSources/WebCore/JSSVGFEBlendElement.h \
+ DerivedSources/WebCore/JSSVGFEColorMatrixElement.cpp \
+ DerivedSources/WebCore/JSSVGFEColorMatrixElement.h \
+ DerivedSources/WebCore/JSSVGFEComponentTransferElement.cpp \
+ DerivedSources/WebCore/JSSVGFEComponentTransferElement.h \
+ DerivedSources/WebCore/JSSVGFECompositeElement.cpp \
+ DerivedSources/WebCore/JSSVGFECompositeElement.h \
+ DerivedSources/WebCore/JSSVGFEConvolveMatrixElement.cpp \
+ DerivedSources/WebCore/JSSVGFEConvolveMatrixElement.h \
+ DerivedSources/WebCore/JSSVGFEDiffuseLightingElement.cpp \
+ DerivedSources/WebCore/JSSVGFEDiffuseLightingElement.h \
+ DerivedSources/WebCore/JSSVGFEDisplacementMapElement.cpp \
+ DerivedSources/WebCore/JSSVGFEDisplacementMapElement.h \
+ DerivedSources/WebCore/JSSVGFEDistantLightElement.cpp \
+ DerivedSources/WebCore/JSSVGFEDistantLightElement.h \
+ DerivedSources/WebCore/JSSVGFEFloodElement.cpp \
+ DerivedSources/WebCore/JSSVGFEFloodElement.h \
+ DerivedSources/WebCore/JSSVGFEFuncAElement.cpp \
+ DerivedSources/WebCore/JSSVGFEFuncAElement.h \
+ DerivedSources/WebCore/JSSVGFEFuncBElement.cpp \
+ DerivedSources/WebCore/JSSVGFEFuncBElement.h \
+ DerivedSources/WebCore/JSSVGFEFuncGElement.cpp \
+ DerivedSources/WebCore/JSSVGFEFuncGElement.h \
+ DerivedSources/WebCore/JSSVGFEFuncRElement.cpp \
+ DerivedSources/WebCore/JSSVGFEFuncRElement.h \
+ DerivedSources/WebCore/JSSVGFEGaussianBlurElement.cpp \
+ DerivedSources/WebCore/JSSVGFEGaussianBlurElement.h \
+ DerivedSources/WebCore/JSSVGFEImageElement.cpp \
+ DerivedSources/WebCore/JSSVGFEImageElement.h \
+ DerivedSources/WebCore/JSSVGFEMergeElement.cpp \
+ DerivedSources/WebCore/JSSVGFEMergeElement.h \
+ DerivedSources/WebCore/JSSVGFEMergeNodeElement.cpp \
+ DerivedSources/WebCore/JSSVGFEMergeNodeElement.h \
+ DerivedSources/WebCore/JSSVGFEMorphologyElement.cpp \
+ DerivedSources/WebCore/JSSVGFEMorphologyElement.h \
+ DerivedSources/WebCore/JSSVGFEOffsetElement.cpp \
+ DerivedSources/WebCore/JSSVGFEOffsetElement.h \
+ DerivedSources/WebCore/JSSVGFEPointLightElement.cpp \
+ DerivedSources/WebCore/JSSVGFEPointLightElement.h \
+ DerivedSources/WebCore/JSSVGFESpecularLightingElement.cpp \
+ DerivedSources/WebCore/JSSVGFESpecularLightingElement.h \
+ DerivedSources/WebCore/JSSVGFESpotLightElement.cpp \
+ DerivedSources/WebCore/JSSVGFESpotLightElement.h \
+ DerivedSources/WebCore/JSSVGFETileElement.cpp \
+ DerivedSources/WebCore/JSSVGFETileElement.h \
+ DerivedSources/WebCore/JSSVGFETurbulenceElement.cpp \
+ DerivedSources/WebCore/JSSVGFETurbulenceElement.h \
+ DerivedSources/WebCore/JSSVGFilterElement.cpp \
+ DerivedSources/WebCore/JSSVGFilterElement.h \
+ DerivedSources/WebCore/JSSVGFilterPrimitiveStandardAttributes.h \
+ DerivedSources/WebCore/JSSVGFitToViewBox.h \
+ DerivedSources/WebCore/JSSVGFontElement.cpp \
+ DerivedSources/WebCore/JSSVGFontElement.h \
+ DerivedSources/WebCore/JSSVGFontFaceElement.cpp \
+ DerivedSources/WebCore/JSSVGFontFaceElement.h \
+ DerivedSources/WebCore/JSSVGFontFaceFormatElement.cpp \
+ DerivedSources/WebCore/JSSVGFontFaceFormatElement.h \
+ DerivedSources/WebCore/JSSVGFontFaceNameElement.cpp \
+ DerivedSources/WebCore/JSSVGFontFaceNameElement.h \
+ DerivedSources/WebCore/JSSVGFontFaceSrcElement.cpp \
+ DerivedSources/WebCore/JSSVGFontFaceSrcElement.h \
+ DerivedSources/WebCore/JSSVGFontFaceUriElement.cpp \
+ DerivedSources/WebCore/JSSVGFontFaceUriElement.h \
+ DerivedSources/WebCore/JSSVGForeignObjectElement.cpp \
+ DerivedSources/WebCore/JSSVGForeignObjectElement.h \
+ DerivedSources/WebCore/JSSVGGElement.cpp \
+ DerivedSources/WebCore/JSSVGGElement.h \
+ DerivedSources/WebCore/JSSVGGlyphElement.cpp \
+ DerivedSources/WebCore/JSSVGGlyphElement.h \
+ DerivedSources/WebCore/JSSVGGradientElement.cpp \
+ DerivedSources/WebCore/JSSVGGradientElement.h \
+ DerivedSources/WebCore/JSSVGHKernElement.cpp \
+ DerivedSources/WebCore/JSSVGHKernElement.h \
+ DerivedSources/WebCore/JSSVGImageElement.cpp \
+ DerivedSources/WebCore/JSSVGImageElement.h \
+ DerivedSources/WebCore/JSSVGLangSpace.h \
+ DerivedSources/WebCore/JSSVGLength.cpp \
+ DerivedSources/WebCore/JSSVGLength.h \
+ DerivedSources/WebCore/JSSVGLengthList.cpp \
+ DerivedSources/WebCore/JSSVGLengthList.h \
+ DerivedSources/WebCore/JSSVGLinearGradientElement.cpp \
+ DerivedSources/WebCore/JSSVGLinearGradientElement.h \
+ DerivedSources/WebCore/JSSVGLineElement.cpp \
+ DerivedSources/WebCore/JSSVGLineElement.h \
+ DerivedSources/WebCore/JSSVGLocatable.h \
+ DerivedSources/WebCore/JSSVGMarkerElement.cpp \
+ DerivedSources/WebCore/JSSVGMarkerElement.h \
+ DerivedSources/WebCore/JSSVGMaskElement.cpp \
+ DerivedSources/WebCore/JSSVGMaskElement.h \
+ DerivedSources/WebCore/JSSVGMatrix.cpp \
+ DerivedSources/WebCore/JSSVGMatrix.h \
+ DerivedSources/WebCore/JSSVGMetadataElement.cpp \
+ DerivedSources/WebCore/JSSVGMetadataElement.h \
+ DerivedSources/WebCore/JSSVGMissingGlyphElement.cpp \
+ DerivedSources/WebCore/JSSVGMissingGlyphElement.h \
+ DerivedSources/WebCore/JSSVGNumber.cpp \
+ DerivedSources/WebCore/JSSVGNumber.h \
+ DerivedSources/WebCore/JSSVGNumberList.cpp \
+ DerivedSources/WebCore/JSSVGNumberList.h \
+ DerivedSources/WebCore/JSSVGPaint.cpp \
+ DerivedSources/WebCore/JSSVGPaint.h \
+ DerivedSources/WebCore/JSSVGPathElement.cpp \
+ DerivedSources/WebCore/JSSVGPathElement.h \
+ DerivedSources/WebCore/JSSVGPathSegArcAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegArcAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegArcRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegArcRel.h \
+ DerivedSources/WebCore/JSSVGPathSegClosePath.cpp \
+ DerivedSources/WebCore/JSSVGPathSegClosePath.h \
+ DerivedSources/WebCore/JSSVGPathSeg.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicRel.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicSmoothAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicSmoothAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicSmoothRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoCubicSmoothRel.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticRel.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticSmoothAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticSmoothRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegCurvetoQuadraticSmoothRel.h \
+ DerivedSources/WebCore/JSSVGPathSeg.h \
+ DerivedSources/WebCore/JSSVGPathSegLinetoAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegLinetoAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegLinetoHorizontalAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegLinetoHorizontalAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegLinetoHorizontalRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegLinetoHorizontalRel.h \
+ DerivedSources/WebCore/JSSVGPathSegLinetoRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegLinetoRel.h \
+ DerivedSources/WebCore/JSSVGPathSegLinetoVerticalAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegLinetoVerticalAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegLinetoVerticalRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegLinetoVerticalRel.h \
+ DerivedSources/WebCore/JSSVGPathSegList.cpp \
+ DerivedSources/WebCore/JSSVGPathSegList.h \
+ DerivedSources/WebCore/JSSVGPathSegMovetoAbs.cpp \
+ DerivedSources/WebCore/JSSVGPathSegMovetoAbs.h \
+ DerivedSources/WebCore/JSSVGPathSegMovetoRel.cpp \
+ DerivedSources/WebCore/JSSVGPathSegMovetoRel.h \
+ DerivedSources/WebCore/JSSVGPatternElement.cpp \
+ DerivedSources/WebCore/JSSVGPatternElement.h \
+ DerivedSources/WebCore/JSSVGPoint.cpp \
+ DerivedSources/WebCore/JSSVGPoint.h \
+ DerivedSources/WebCore/JSSVGPointList.cpp \
+ DerivedSources/WebCore/JSSVGPointList.h \
+ DerivedSources/WebCore/JSSVGPolygonElement.cpp \
+ DerivedSources/WebCore/JSSVGPolygonElement.h \
+ DerivedSources/WebCore/JSSVGPolylineElement.cpp \
+ DerivedSources/WebCore/JSSVGPolylineElement.h \
+ DerivedSources/WebCore/JSSVGPreserveAspectRatio.cpp \
+ DerivedSources/WebCore/JSSVGPreserveAspectRatio.h \
+ DerivedSources/WebCore/JSSVGRadialGradientElement.cpp \
+ DerivedSources/WebCore/JSSVGRadialGradientElement.h \
+ DerivedSources/WebCore/JSSVGRect.cpp \
+ DerivedSources/WebCore/JSSVGRectElement.cpp \
+ DerivedSources/WebCore/JSSVGRectElement.h \
+ DerivedSources/WebCore/JSSVGRect.h \
+ DerivedSources/WebCore/JSSVGRenderingIntent.cpp \
+ DerivedSources/WebCore/JSSVGRenderingIntent.h \
+ DerivedSources/WebCore/JSSVGScriptElement.cpp \
+ DerivedSources/WebCore/JSSVGScriptElement.h \
+ DerivedSources/WebCore/JSSVGSetElement.cpp \
+ DerivedSources/WebCore/JSSVGSetElement.h \
+ DerivedSources/WebCore/JSSVGStopElement.cpp \
+ DerivedSources/WebCore/JSSVGStopElement.h \
+ DerivedSources/WebCore/JSSVGStringList.cpp \
+ DerivedSources/WebCore/JSSVGStringList.h \
+ DerivedSources/WebCore/JSSVGStylable.h \
+ DerivedSources/WebCore/JSSVGStyleElement.cpp \
+ DerivedSources/WebCore/JSSVGStyleElement.h \
+ DerivedSources/WebCore/JSSVGSVGElement.cpp \
+ DerivedSources/WebCore/JSSVGSVGElement.h \
+ DerivedSources/WebCore/JSSVGSwitchElement.cpp \
+ DerivedSources/WebCore/JSSVGSwitchElement.h \
+ DerivedSources/WebCore/JSSVGSymbolElement.cpp \
+ DerivedSources/WebCore/JSSVGSymbolElement.h \
+ DerivedSources/WebCore/JSSVGTests.h \
+ DerivedSources/WebCore/JSSVGTextContentElement.cpp \
+ DerivedSources/WebCore/JSSVGTextContentElement.h \
+ DerivedSources/WebCore/JSSVGTextElement.cpp \
+ DerivedSources/WebCore/JSSVGTextElement.h \
+ DerivedSources/WebCore/JSSVGTextPathElement.cpp \
+ DerivedSources/WebCore/JSSVGTextPathElement.h \
+ DerivedSources/WebCore/JSSVGTextPositioningElement.cpp \
+ DerivedSources/WebCore/JSSVGTextPositioningElement.h \
+ DerivedSources/WebCore/JSSVGTitleElement.cpp \
+ DerivedSources/WebCore/JSSVGTitleElement.h \
+ DerivedSources/WebCore/JSSVGTransformable.h \
+ DerivedSources/WebCore/JSSVGTransform.cpp \
+ DerivedSources/WebCore/JSSVGTransform.h \
+ DerivedSources/WebCore/JSSVGTransformList.cpp \
+ DerivedSources/WebCore/JSSVGTransformList.h \
+ DerivedSources/WebCore/JSSVGTRefElement.cpp \
+ DerivedSources/WebCore/JSSVGTRefElement.h \
+ DerivedSources/WebCore/JSSVGTSpanElement.cpp \
+ DerivedSources/WebCore/JSSVGTSpanElement.h \
+ DerivedSources/WebCore/JSSVGUnitTypes.cpp \
+ DerivedSources/WebCore/JSSVGUnitTypes.h \
+ DerivedSources/WebCore/JSSVGURIReference.h \
+ DerivedSources/WebCore/JSSVGUseElement.cpp \
+ DerivedSources/WebCore/JSSVGUseElement.h \
+ DerivedSources/WebCore/JSSVGViewElement.cpp \
+ DerivedSources/WebCore/JSSVGViewElement.h \
+ DerivedSources/WebCore/JSSVGViewSpec.h \
+ DerivedSources/WebCore/JSSVGVKernElement.cpp \
+ DerivedSources/WebCore/JSSVGVKernElement.h \
+ DerivedSources/WebCore/JSSVGZoomAndPan.h \
+ DerivedSources/WebCore/JSSVGZoomEvent.cpp \
+ DerivedSources/WebCore/JSSVGZoomEvent.h
+
webcore_sources += \
WebCore/bindings/js/JSSVGContextCache.h \
WebCore/bindings/js/JSSVGElementInstanceCustom.cpp \
@@ -3618,8 +4020,13 @@ webcore_sources += \
WebCore/svg/SVGPaint.h \
WebCore/svg/SVGParserUtilities.cpp \
WebCore/svg/SVGParserUtilities.h \
+ WebCore/svg/SVGPathBuilder.cpp \
+ WebCore/svg/SVGPathBuilder.h \
+ WebCore/svg/SVGPathConsumer.h \
WebCore/svg/SVGPathElement.cpp \
WebCore/svg/SVGPathElement.h \
+ WebCore/svg/SVGPathParser.cpp \
+ WebCore/svg/SVGPathParser.h \
WebCore/svg/SVGPathSeg.h \
WebCore/svg/SVGPathSegArc.cpp \
WebCore/svg/SVGPathSegArc.h \
@@ -3641,6 +4048,8 @@ webcore_sources += \
WebCore/svg/SVGPathSegLinetoVertical.h \
WebCore/svg/SVGPathSegList.cpp \
WebCore/svg/SVGPathSegList.h \
+ WebCore/svg/SVGPathSegListBuilder.cpp \
+ WebCore/svg/SVGPathSegListBuilder.h \
WebCore/svg/SVGPathSegMoveto.cpp \
WebCore/svg/SVGPathSegMoveto.h \
WebCore/svg/SVGPatternElement.cpp \
@@ -3830,12 +4239,13 @@ DerivedSources/WebCore/XLinkNames.cpp : $(WebCore)/dom/make_names.pl $(WebCore)/
if ENABLE_WEB_SOCKETS
FEATURE_DEFINES += ENABLE_WEB_SOCKETS=1
-IDL_BINDINGS += \
- WebCore/websockets/WebSocket.idl
-
webcore_cppflags += \
-DENABLE_WEB_SOCKETS=1
+webcore_built_sources += \
+ DerivedSources/WebCore/JSWebSocket.cpp \
+ DerivedSources/WebCore/JSWebSocket.h
+
webcore_sources += \
WebCore/bindings/js/JSWebSocketCustom.cpp \
WebCore/platform/network/SocketStreamErrorBase.cpp \
@@ -3983,7 +4393,7 @@ DerivedSources/WebCore/XMLNames.cpp DerivedSources/WebCore/XMLNames.h: $(WebCore
$(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in --outputDir "$(GENSOURCES_WEBCORE)"
# Remote Inspector frontend
-DerivedSources/WebCore/RemoteInspectorFrontend2.cpp DerivedSources/WebCore/RemoteInspectorFrontend2.h: $(WebCore)/inspector/InspectorFrontend2.idl $(SCRIPTS_BINDINGS) $(WebCore)/inspector/CodeGeneratorInspector.pm
+DerivedSources/WebCore/RemoteInspectorFrontend.cpp DerivedSources/WebCore/RemoteInspectorFrontend.h: $(WebCore)/inspector/Inspector.idl $(SCRIPTS_BINDINGS) $(WebCore)/inspector/CodeGeneratorInspector.pm
$(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts -I$(WebCore)/inspector $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator Inspector $<
IDL_PATH := \
@@ -4011,51 +4421,6 @@ DerivedSources/WebCore/JS%.h: DerivedSources/WebCore/JS%.cpp;
DerivedSources/WebCore/JS%.cpp: %.idl $(SCRIPTS_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm
$(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator JS $<
-IDL_BINDINGS_JS_PURE := \
- WebCore/svg/ElementTimeControl.idl \
- WebCore/svg/SVGAnimatedPathData.idl \
- WebCore/svg/SVGAnimatedPoints.idl \
- WebCore/svg/SVGExternalResourcesRequired.idl \
- WebCore/svg/SVGFilterPrimitiveStandardAttributes.idl \
- WebCore/svg/SVGFitToViewBox.idl \
- WebCore/svg/SVGLangSpace.idl \
- WebCore/svg/SVGLocatable.idl \
- WebCore/svg/SVGStylable.idl \
- WebCore/svg/SVGTests.idl \
- WebCore/svg/SVGTransformable.idl \
- WebCore/svg/SVGURIReference.idl \
- WebCore/svg/SVGViewSpec.idl \
- WebCore/svg/SVGZoomAndPan.idl
-
-IDL_BINDINGS_JS := $(filter-out $(IDL_BINDINGS_JS_PURE),$(IDL_BINDINGS))
-
-webcore_built_nosources += $(patsubst %.idl,DerivedSources/WebCore/JS%.h,$(notdir $(IDL_BINDINGS)))
-
-webcore_built_nosources += $(patsubst %.idl,DerivedSources/WebCore/JS%.cpp,$(notdir $(IDL_BINDINGS_JS)))
-
-webcore_built_objects = := $(patsubst %.cpp,%.lo,$(webcore_built_nosources))
-
-$(webcore_built_objects): AM_CPPFLAGS+=$(corekit_cppflags)
-
-$(webcore_built_objects): AM_CXXFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS)
-
-libWebCoreJS_objects := $(patsubst %.idl,DerivedSources/WebCore/JS%.lo,$(notdir $(IDL_BINDINGS_JS)))
-
-libWebCoreJS_depfiles := $(patsubst %.idl,DerivedSources/WebCore/$(DEPDIR)/JS%.Plo,$(notdir $(IDL_BINDINGS_JS)))
-
-# Older automake versions (1.7) place Plo files in a different place:
-libWebCoreJS_depfiles += $(patsubst %.lo,$(DEPDIR)/%.Plo,$(libWebCoreJS_objects))
-
--include $(libWebCoreJS_depfiles)
-
-$(libWebCoreJS_objects): AM_CPPFLAGS+=$(corekit_cppflags)
-
-$(libWebCoreJS_objects): AM_CXXFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS)
-
-libWebCoreJS.la: $(libWebCoreJS_objects)
- $(CXXLINK) $(libWebCoreJS_objects) $(LIBS)
-
-
DerivedSources/webkit/webkitdomdummy.c:
$(AM_V_GEN)mkdir -p DerivedSources/webkit || echo > $@
@@ -4247,59 +4612,70 @@ $(libgdom_objects): AM_CXXFLAGS+=$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@W
libgdom.la: $(libgdom_objects)
$(CXXLINK) $(libgdom_objects) $(LIBS)
-noinst_HEADERS += \
- $(IDL_BINDINGS)
-
-webcore_dist += \
- WebCore/ChangeLog \
- WebCore/LICENSE-APPLE \
- WebCore/LICENSE-LGPL-2 \
- WebCore/LICENSE-LGPL-2.1 \
- WebCore/icu/LICENSE \
+EXTRA_DIST += \
+ $(shell ls $(srcdir)/WebCore/css/*.idl) \
+ $(shell ls $(srcdir)/WebCore/dom/*.idl) \
+ $(shell ls $(srcdir)/WebCore/html/canvas/*.idl) \
+ $(shell ls $(srcdir)/WebCore/html/*.idl) \
+ $(shell ls $(srcdir)/WebCore/inspector/*.idl) \
+ $(shell ls $(srcdir)/WebCore/loader/appcache/*.idl) \
+ $(shell ls $(srcdir)/WebCore/notifications/*.idl) \
+ $(shell ls $(srcdir)/WebCore/page/*.idl) \
+ $(shell ls $(srcdir)/WebCore/plugins/*.idl) \
+ $(shell ls $(srcdir)/WebCore/storage/*.idl) \
+ $(shell ls $(srcdir)/WebCore/svg/*.idl) \
+ $(shell ls $(srcdir)/WebCore/websockets/*.idl) \
+ $(shell ls $(srcdir)/WebCore/workers/*.idl) \
+ $(shell ls $(srcdir)/WebCore/xml/*.idl) \
+ WebCore/bindings/scripts/CodeGeneratorGObject.pm \
+ WebCore/bindings/scripts/CodeGeneratorJS.pm \
WebCore/bindings/scripts/CodeGenerator.pm \
+ WebCore/bindings/scripts/generate-bindings.pl \
+ WebCore/bindings/scripts/gobject-generate-headers.pl \
WebCore/bindings/scripts/IDLParser.pm \
WebCore/bindings/scripts/IDLStructure.pm \
WebCore/bindings/scripts/InFilesParser.pm \
- WebCore/bindings/scripts/generate-bindings.pl \
- WebCore/bindings/scripts/CodeGeneratorJS.pm \
- WebCore/bindings/scripts/CodeGeneratorGObject.pm \
- WebCore/bindings/scripts/gobject-generate-headers.pl \
+ WebCore/ChangeLog \
+ WebCore/css/CSSGrammar.y \
+ WebCore/css/CSSPropertyNames.in \
+ WebCore/css/CSSValueKeywords.in \
WebCore/css/html.css \
+ WebCore/css/make-css-file-arrays.pl \
+ WebCore/css/makegrammar.pl \
+ WebCore/css/makeprop.pl \
+ WebCore/css/maketokenizer \
+ WebCore/css/makevalues.pl \
WebCore/css/mathml.css \
- WebCore/css/quirks.css \
- WebCore/css/view-source.css \
- WebCore/css/svg.css \
- WebCore/css/wml.css \
WebCore/css/mediaControls.css \
WebCore/css/mediaControlsGtk.css \
- WebCore/css/CSSGrammar.y \
- WebCore/css/CSSValueKeywords.in \
+ WebCore/css/quirks.css \
+ WebCore/css/svg.css \
WebCore/css/SVGCSSPropertyNames.in \
- WebCore/css/maketokenizer \
- WebCore/css/makeprop.pl \
- WebCore/css/makevalues.pl \
- WebCore/css/tokenizer.flex \
- WebCore/css/CSSPropertyNames.in \
- WebCore/css/make-css-file-arrays.pl \
WebCore/css/SVGCSSValueKeywords.in \
- WebCore/css/makegrammar.pl \
+ WebCore/css/tokenizer.flex \
+ WebCore/css/view-source.css \
+ WebCore/css/wml.css \
WebCore/dom/make_names.pl \
+ WebCore/html/DocTypeStrings.gperf \
+ WebCore/html/HTMLAttributeNames.in \
+ WebCore/html/HTMLEntityNames.gperf \
+ WebCore/html/HTMLTagNames.in \
+ WebCore/icu/LICENSE \
WebCore/inspector/CodeGeneratorInspector.pm \
+ WebCore/LICENSE-APPLE \
+ WebCore/LICENSE-LGPL-2 \
+ WebCore/LICENSE-LGPL-2.1 \
+ WebCore/make-hash-tools.pl \
WebCore/mathml/mathattrs.in \
WebCore/mathml/mathtags.in \
- WebCore/platform/text/mac/make-charset-table.pl \
WebCore/platform/ColorData.gperf \
- WebCore/svg/xlinkattrs.in \
+ WebCore/platform/text/mac/make-charset-table.pl \
WebCore/svg/svgattrs.in \
WebCore/svg/svgtags.in \
- WebCore/html/DocTypeStrings.gperf \
- WebCore/html/HTMLTagNames.in \
- WebCore/html/HTMLEntityNames.gperf \
- WebCore/html/HTMLAttributeNames.in \
+ WebCore/svg/xlinkattrs.in \
WebCore/xml/xmlattrs.in \
WebCore/xml/xmlnsattrs.in \
- WebCore/xml/XPathGrammar.y \
- WebCore/make-hash-tools.pl
+ WebCore/xml/XPathGrammar.y
# Installing web inspector files
webinspectordir = ${datadir}/webkit-@WEBKITGTK_API_VERSION@/webinspector
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 71c632f..cf66285 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -138,6 +138,7 @@ __ZN7WebCore10MouseEventC1ERKNS_12AtomicStringEbbN3WTF10PassRefPtrINS_9DOMWindow
__ZN7WebCore10ScrollView20setCanHaveScrollbarsEb
__ZN7WebCore10StringImpl14createCFStringEv
__ZN7WebCore10StringImplcvP8NSStringEv
+__ZN7WebCore10deleteFileERKNS_6StringE
__ZN7WebCore10handCursorEv
__ZN7WebCore10setCookiesEPNS_8DocumentERKNS_4KURLERKNS_6StringE
__ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE
@@ -203,6 +204,7 @@ __ZN7WebCore11IconFetcher6createEPNS_5FrameEPNS_17IconFetcherClientE
__ZN7WebCore11RenderLayer19scrollRectToVisibleERKNS_7IntRectEbRKNS_15ScrollAlignmentES6_
__ZN7WebCore11globalPointERK8_NSPointP8NSWindow
__ZN7WebCore11toUserSpaceERK7_NSRectP8NSWindow
+__ZN7WebCore11writeToFileEiPKci
__ZN7WebCore12ChromeClient20paintCustomScrollbarEPNS_15GraphicsContextERKNS_9FloatRectENS_20ScrollbarControlSizeEjNS_13ScrollbarPartEbffj
__ZN7WebCore12ChromeClient23paintCustomScrollCornerEPNS_15GraphicsContextERKNS_9FloatRectE
__ZN7WebCore12EventHandler10mouseMovedEP7NSEvent
@@ -214,7 +216,7 @@ __ZN7WebCore12EventHandler14scrollOverflowENS_15ScrollDirectionENS_17ScrollGranu
__ZN7WebCore12EventHandler15sendScrollEventEv
__ZN7WebCore12EventHandler16handleWheelEventERNS_18PlatformWheelEventE
__ZN7WebCore12EventHandler20handleTextInputEventERKNS_6StringEPNS_5EventEbb
-__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsE
+__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsEi
__ZN7WebCore12EventHandler21handleMousePressEventERKNS_18PlatformMouseEventE
__ZN7WebCore12EventHandler23handleMouseReleaseEventERKNS_18PlatformMouseEventE
__ZN7WebCore12EventHandler27capsLockStateMayHaveChangedEv
@@ -247,12 +249,12 @@ __ZN7WebCore12IconDatabase27checkIntegrityBeforeOpeningEv
__ZN7WebCore12IconDatabase4openERKNS_6StringE
__ZN7WebCore12IconDatabase5closeEv
__ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE
-__ZN7WebCore12PluginWidget14invalidateRectERKNS_7IntRectE
__ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci
__ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE
__ZN7WebCore12PrintContext16isPageBoxVisibleEPNS_5FrameEi
__ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_9FloatSizeE
__ZN7WebCore12PrintContext26pageSizeAndMarginsInPixelsEPNS_5FrameEiiiiiii
+__ZN7WebCore12PrintContext27spoolAllPagesWithBoundariesEPNS_5FrameERNS_15GraphicsContextERKNS_9FloatSizeE
__ZN7WebCore12PrintContext28computePageRectsWithPageSizeERKNS_9FloatSizeEb
__ZN7WebCore12PrintContextC1EPNS_5FrameE
__ZN7WebCore12PrintContextD1Ev
@@ -261,6 +263,7 @@ __ZN7WebCore12RenderWidget19showSubstituteImageEN3WTF10PassRefPtrINS_5ImageEEE
__ZN7WebCore12SchedulePairC1EP9NSRunLoopPK10__CFString
__ZN7WebCore12SharedBuffer10wrapNSDataEP6NSData
__ZN7WebCore12SharedBuffer12createNSDataEv
+__ZN7WebCore12SharedBuffer24createWithContentsOfFileERKNS_6StringE
__ZN7WebCore12SharedBufferD1Ev
__ZN7WebCore12TextEncodingC1ERKNS_6StringE
__ZN7WebCore12TextIterator11rangeLengthEPKNS_5RangeEb
@@ -279,6 +282,8 @@ __ZN7WebCore13AXObjectCache21gAccessibilityEnabledE
__ZN7WebCore13AXObjectCache42gAccessibilityEnhancedUserInterfaceEnabledE
__ZN7WebCore13HitTestResultC1ERKS0_
__ZN7WebCore13HitTestResultD1Ev
+__ZN7WebCore13IdentifierRep3getEPKc
+__ZN7WebCore13IdentifierRep3getEi
__ZN7WebCore13KeyboardEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowERKNS_6StringEjbbbbb
__ZN7WebCore13TypingCommand39insertParagraphSeparatorInQuotedContentEPNS_8DocumentE
__ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
@@ -365,8 +370,10 @@ __ZN7WebCore16LegacyWebArchive6createEPNS_4NodeE
__ZN7WebCore16LegacyWebArchive6createEPNS_5FrameE
__ZN7WebCore16LegacyWebArchive6createEPNS_5RangeE
__ZN7WebCore16LegacyWebArchive6createEv
+__ZN7WebCore16MIMETypeRegistry23getMIMETypeForExtensionERKNS_6StringE
__ZN7WebCore16MIMETypeRegistry24isSupportedImageMIMETypeERKNS_6StringE
__ZN7WebCore16MIMETypeRegistry26getSupportedImageMIMETypesEv
+__ZN7WebCore16MIMETypeRegistry27isSupportedNonImageMIMETypeERKNS_6StringE
__ZN7WebCore16MIMETypeRegistry29getSupportedNonImageMIMETypesEv
__ZN7WebCore16MIMETypeRegistry32isSupportedImageResourceMIMETypeERKNS_6StringE
__ZN7WebCore16NavigationActionC1ERKNS_4KURLENS_13FrameLoadTypeEb
@@ -375,8 +382,10 @@ __ZN7WebCore16NavigationActionC1Ev
__ZN7WebCore16ScriptController10initScriptEPNS_15DOMWrapperWorldE
__ZN7WebCore16ScriptController11createWorldEv
__ZN7WebCore16ScriptController13executeScriptERKNS_6StringEbNS_14ShouldAllowXSSE
+__ZN7WebCore16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE
__ZN7WebCore16ScriptController18windowScriptObjectEv
__ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKNS_6StringEbNS_14ShouldAllowXSSE
+__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
__ZN7WebCore16ThreadGlobalData10staticDataE
__ZN7WebCore16ThreadGlobalDataC1Ev
__ZN7WebCore16ThreadGlobalDataD1Ev
@@ -393,6 +402,8 @@ __ZN7WebCore17DOMImplementation14isTextMIMETypeERKNS_6StringE
__ZN7WebCore17GlyphPageTreeNode18treeGlyphPageCountEv
__ZN7WebCore17HTMLPlugInElement11getNPObjectEv
__ZN7WebCore17HistoryController26saveDocumentAndScrollStateEv
+__ZN7WebCore17nameForCursorTypeENS_6Cursor4TypeE
+__ZN7WebCore17openTemporaryFileEPKcRi
__ZN7WebCore18deprecatedParseURLERKNS_6StringE
__ZN7WebCore18isStartOfParagraphERKNS_15VisiblePositionE
__ZN7WebCore19AnimationController16resumeAnimationsEPNS_8DocumentE
@@ -402,6 +413,10 @@ __ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKNS
__ZN7WebCore19BackForwardListImplC1EPNS_4PageE
__ZN7WebCore19CSSStyleDeclaration11setPropertyERKNS_6StringES3_Ri
__ZN7WebCore19InspectorController34inspectorStartsAttachedSettingNameEv
+__ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE
+__ZN7WebCore19ResourceRequestBase13setHTTPMethodERKNS_6StringE
+__ZN7WebCore19ResourceRequestBase19addHTTPHeaderFieldsERKNS_13HTTPHeaderMapE
+__ZN7WebCore19ResourceRequestBase6setURLERKNS_4KURLE
__ZN7WebCore19SelectionController10setFocusedEb
__ZN7WebCore19SelectionController12setSelectionERKNS_16VisibleSelectionEbbbNS0_19CursorAlignOnScrollENS_15TextGranularityENS_20DirectionalityPolicyE
__ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEb
@@ -417,6 +432,8 @@ __ZN7WebCore19applicationIsSafariEv
__ZN7WebCore20RenderEmbeddedObject30setShowsCrashedPluginIndicatorEv
__ZN7WebCore20ResourceResponseBase24setExpectedContentLengthEx
__ZN7WebCore20ResourceResponseBaseC2Ev
+__ZN7WebCore20SpaceSplitStringData12createVectorEv
+__ZN7WebCore20protocolIsJavaScriptERKNS_6StringE
__ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS0_4TypeEb
__ZN7WebCore21PlatformKeyboardEventC1EP7NSEvent
__ZN7WebCore21SVGDocumentExtensions21sampleAnimationAtTimeERKNS_6StringEPNS_14SVGSMILElementEd
@@ -428,6 +445,7 @@ __ZN7WebCore21WindowsLatin1EncodingEv
__ZN7WebCore21findEventWithKeyStateEPNS_5EventE
__ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
__ZN7WebCore21mainThreadNormalWorldEv
+__ZN7WebCore21markerTextForListItemEPNS_7ElementE
__ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
__ZN7WebCore21setPlatformStrategiesEPNS_18PlatformStrategiesE
__ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
@@ -474,7 +492,7 @@ __ZN7WebCore3macERKNS_23AuthenticationChallengeE
__ZN7WebCore4Font11setCodePathENS0_8CodePathE
__ZN7WebCore4Font18shouldUseSmoothingEv
__ZN7WebCore4Font21setShouldUseSmoothingEb
-__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEb
+__ZN7WebCore4FontC1ERKNS_16FontPlatformDataEbNS_17FontSmoothingModeE
__ZN7WebCore4FontC1Ev
__ZN7WebCore4FontaSERKS0_
__ZN7WebCore4Icon18createIconForFilesERKN3WTF6VectorINS_6StringELm0EEE
@@ -537,6 +555,9 @@ __ZN7WebCore5Range6setEndEN3WTF10PassRefPtrINS_4NodeEEEiRi
__ZN7WebCore5Range8setStartEN3WTF10PassRefPtrINS_4NodeEEEiRi
__ZN7WebCore5RangeD1Ev
__ZN7WebCore5cacheEv
+__ZN7WebCore6Cursor8fromTypeENS0_4TypeE
+__ZN7WebCore6CursorD1Ev
+__ZN7WebCore6CursoraSERKS0_
__ZN7WebCore6Editor10applyStyleEPNS_19CSSStyleDeclarationENS_10EditActionE
__ZN7WebCore6Editor10insertTextERKNS_6StringEPNS_5EventE
__ZN7WebCore6Editor13canDHTMLPasteEv
@@ -614,6 +635,7 @@ __ZN7WebCore8Document26pageSizeAndMarginsInPixelsEiRNS_7IntSizeERiS3_S3_S3_
__ZN7WebCore8Document27removeMediaCanStartListenerEPNS_21MediaCanStartListenerE
__ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv
__ZN7WebCore8Document4headEv
+__ZN7WebCore8FormData6createEPKvm
__ZN7WebCore8FormDataD1Ev
__ZN7WebCore8IntPointC1ERK8_NSPoint
__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEEi
@@ -704,7 +726,7 @@ __ZN7WebCore9FrameView16setPaintBehaviorEj
__ZN7WebCore9FrameView18updateControlTintsEv
__ZN7WebCore9FrameView20enterCompositingModeEv
__ZN7WebCore9FrameView21flushDeferredRepaintsEv
-__ZN7WebCore9FrameView21scrollPositionChangedEv
+__ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetEv
__ZN7WebCore9FrameView22setBaseBackgroundColorENS_5ColorE
__ZN7WebCore9FrameView23layoutIfNeededRecursiveEv
__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
@@ -767,9 +789,11 @@ __ZN7WebCore9TimerBase4stopEv
__ZN7WebCore9TimerBase5startEdd
__ZN7WebCore9TimerBaseC2Ev
__ZN7WebCore9TimerBaseD2Ev
+__ZN7WebCore9closeFileERi
__ZN7WebCore9fontCacheEv
__ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
__ZN7WebCore9pageCacheEv
+__ZN7WebCore9toElementEN3JSC7JSValueE
__ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_
__ZNK3JSC8Bindings10RootObject12globalObjectEv
__ZNK7WebCore10FloatPointcv8_NSPointEv
@@ -806,7 +830,9 @@ __ZNK7WebCore11HistoryItem8childrenEv
__ZNK7WebCore11HistoryItem8referrerEv
__ZNK7WebCore11HistoryItem9urlStringEv
__ZNK7WebCore11HistoryItem9viewStateEv
+__ZNK7WebCore11RenderLayer19absoluteBoundingBoxEv
__ZNK7WebCore11RenderStyle21visitedDependentColorEi
+__ZNK7WebCore11ScriptValue9getStringEPN3JSC9ExecStateERNS_6StringE
__ZNK7WebCore12EventHandler20currentKeyboardEventEv
__ZNK7WebCore12IconDatabase12databasePathEv
__ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
@@ -821,6 +847,7 @@ __ZNK7WebCore12TextIterator4nodeEv
__ZNK7WebCore12TextIterator5rangeEv
__ZNK7WebCore13ContainerNode14childNodeCountEv
__ZNK7WebCore13ContainerNode9childNodeEj
+__ZNK7WebCore13HTTPHeaderMap3getEPKc
__ZNK7WebCore13HitTestResult10isLiveLinkEv
__ZNK7WebCore13HitTestResult10isSelectedEv
__ZNK7WebCore13HitTestResult11targetFrameEv
@@ -879,10 +906,15 @@ __ZNK7WebCore19ResourceRequestBase7isEmptyEv
__ZNK7WebCore19SelectionController17isInPasswordFieldEv
__ZNK7WebCore19SelectionController18isFocusedAndActiveEv
__ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv
+__ZNK7WebCore20ResourceResponseBase14httpStatusTextEv
+__ZNK7WebCore20ResourceResponseBase15httpHeaderFieldEPKc
__ZNK7WebCore20ResourceResponseBase16httpHeaderFieldsEv
+__ZNK7WebCore20ResourceResponseBase16lastModifiedDateEv
__ZNK7WebCore20ResourceResponseBase16textEncodingNameEv
__ZNK7WebCore20ResourceResponseBase17suggestedFilenameEv
+__ZNK7WebCore20ResourceResponseBase21expectedContentLengthEv
__ZNK7WebCore20ResourceResponseBase3urlEv
+__ZNK7WebCore20ResourceResponseBase6isHTTPEv
__ZNK7WebCore20ResourceResponseBase8mimeTypeEv
__ZNK7WebCore21UserContentURLPattern7matchesERKNS_4KURLE
__ZNK7WebCore23FrameLoaderStateMachine15firstLayoutDoneEv
@@ -928,6 +960,7 @@ __ZNK7WebCore5Range19boundaryPointsValidEv
__ZNK7WebCore5Range9endOffsetERi
__ZNK7WebCore5Range9firstNodeEv
__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesE
+__ZNK7WebCore6Cursor14platformCursorEv
__ZNK7WebCore6Editor13canEditRichlyEv
__ZNK7WebCore6Editor16compositionRangeEv
__ZNK7WebCore6Editor16fontForSelectionERb
@@ -986,7 +1019,6 @@ __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv
__ZNK7WebCore9PageCache10frameCountEv
__ZNK7WebCore9PageCache21autoreleasedPageCountEv
__ZTVN7WebCore12ChromeClientE
-__ZTVN7WebCore12PluginWidgetE
__ZTVN7WebCore17FileChooserClientE
__ZTVN7WebCore17FrameLoaderClientE
__ZTVN7WebCore25HistoryPropertyListWriterE
@@ -1061,6 +1093,7 @@ _WebCoreHas3DRendering
#if USE(ACCELERATED_COMPOSITING)
__ZN7WebCore13GraphicsLayer17removeAllChildrenEv
__ZN7WebCore13GraphicsLayer6createEPNS_19GraphicsLayerClientE
+__ZNK7WebCore18RenderLayerBacking20compositingLayerTypeEv
#endif
#if ENABLE(CONTEXT_MENUS)
@@ -1200,12 +1233,8 @@ __ZN3JSC8Bindings13RuntimeObjectD2Ev
__ZN3JSC8Bindings8Instance19createRuntimeObjectEPNS_9ExecStateE
__ZN3JSC8Bindings8InstanceC2EN3WTF10PassRefPtrINS0_10RootObjectEEE
__ZN3JSC8Bindings8InstanceD2Ev
-__ZN7WebCore13IdentifierRep3getEPKc
-__ZN7WebCore13IdentifierRep3getEi
__ZN7WebCore13IdentifierRep7isValidEPS0_
__ZN7WebCore16ScriptController16createRootObjectEPv
-__ZN7WebCore16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE
-__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
__ZNK3JSC8Bindings13RuntimeObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
__ZTVN3JSC13RuntimeMethodE
#endif
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index 3b94644..6193294 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -475,18 +475,18 @@
],
},
{
- 'action_name': 'InspectorFrontend2',
+ 'action_name': 'RemoteInspectorFrontend',
'inputs': [
'../bindings/scripts/generate-bindings.pl',
'../bindings/scripts/CodeGenerator.pm',
'../bindings/scripts/IDLParser.pm',
'../bindings/scripts/IDLStructure.pm',
'../inspector/CodeGeneratorInspector.pm',
- '../inspector/InspectorFrontend2.idl',
+ '../inspector/Inspector.idl',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend2.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend2.h',
+ '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend.h',
],
'variables': {
'generator_include_dirs': [
@@ -495,18 +495,17 @@
'action': [
'python',
'scripts/rule_binding.py',
- '../inspector/InspectorFrontend2.idl',
+ '../inspector/Inspector.idl',
'<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
'<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
'--',
'<@(_inputs)',
'--',
- '--defines', 'LANGUAGE_JAVASCRIPT',
- '--prefix', 'Remote',
+ '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',
'--generator', 'Inspector',
'<@(generator_include_dirs)'
],
- 'message': 'Generating InspectorFrontend2 class from InspectorFrontend2.idl',
+ 'message': 'Generating RemoteInspectorFrontend class from Inspector.idl',
},
{
'action_name': 'XMLNames',
@@ -714,7 +713,7 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
# Additional .cpp files from the webcore_inspector_sources list.
- '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend2.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
],
'conditions': [
['javascript_engine=="v8"', {
diff --git a/WebCore/WebCore.gyp/scripts/rule_binding.py b/WebCore/WebCore.gyp/scripts/rule_binding.py
index f7f3ed1..5a41808 100644
--- a/WebCore/WebCore.gyp/scripts/rule_binding.py
+++ b/WebCore/WebCore.gyp/scripts/rule_binding.py
@@ -100,6 +100,10 @@ def main(args):
else:
prefixIndex = options.index('--generator')
+ fileName = ''
+ if '--filename' in options:
+ fileName = options[options.index('--filename') + 1]
+
if prefixIndex + 1 < len(options):
prefix = options[prefixIndex + 1]
@@ -117,6 +121,7 @@ def main(args):
command.extend(['-I', includeDir])
command.append(generateBindings)
command.extend(options)
+ command.extend(['--outputHeadersDir', hdir])
command.extend(['--outputDir', cppdir, input])
# Do it. check_call is new in 2.5, so simulate its behavior with call and
@@ -124,18 +129,6 @@ def main(args):
returnCode = subprocess.call(command)
assert returnCode == 0
- # Both the .cpp and .h were generated in cppdir, but if hdir is different,
- # the .h needs to move. Copy it instead of using os.rename for maximum
- # portability in all cases.
- if cppdir != hdir:
- inputBasename = os.path.basename(input)
- (root, ext) = os.path.splitext(inputBasename)
- hname = '%s%s.h' % (prefix, root)
- hsrc = os.path.join(cppdir, hname)
- hdst = os.path.join(hdir, hname)
- shutil.copyfile(hsrc, hdst)
- os.unlink(hsrc)
-
return returnCode
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 1ccbc3f..7aa5d60 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -279,7 +279,7 @@
'xml/XSLTProcessor.idl',
],
'webcore_inspector_idl_files': [
- 'inspector/InspectorFrontend2.idl',
+ 'inspector/Inspector.idl',
],
'webcore_svg_bindings_idl_files': [
'svg/ElementTimeControl.idl',
@@ -542,6 +542,7 @@
'bindings/js/JSDedicatedWorkerContextCustom.cpp',
'bindings/js/JSDebugWrapperSet.cpp',
'bindings/js/JSDebugWrapperSet.h',
+ 'bindings/js/JSDeviceOrientationEventCustom.cpp',
'bindings/js/JSDocumentCustom.cpp',
'bindings/js/JSDOMApplicationCacheCustom.cpp',
'bindings/js/JSDOMBinding.cpp',
@@ -737,6 +738,7 @@
'bindings/v8/custom/V8DatabaseSyncCustom.cpp',
'bindings/v8/custom/V8DataGridColumnListCustom.cpp',
'bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp',
+ 'bindings/v8/custom/V8DeviceOrientationEventCustom.cpp',
'bindings/v8/custom/V8DocumentLocationCustom.cpp',
'bindings/v8/custom/V8DOMFormDataCustom.cpp',
'bindings/v8/custom/V8DOMWindowCustom.cpp',
@@ -1119,6 +1121,8 @@
'dom/DatasetDOMStringMap.h',
'dom/DecodedDataDocumentParser.cpp',
'dom/DecodedDataDocumentParser.h',
+ 'dom/DeviceOrientation.cpp',
+ 'dom/DeviceOrientation.h',
'dom/DeviceOrientationClient.h',
'dom/DeviceOrientationController.cpp',
'dom/DeviceOrientationController.h',
@@ -2033,6 +2037,11 @@
'page/Settings.h',
'page/SpatialNavigation.h',
'page/SpatialNavigation.cpp',
+ 'page/SpeechInput.cpp',
+ 'page/SpeechInput.h',
+ 'page/SpeechInputClient.h',
+ 'page/SpeechInputClientListener.h',
+ 'page/SpeechInputListener.h',
'page/SuspendableTimer.cpp',
'page/SuspendableTimer.h',
'page/Timing.cpp',
@@ -2101,6 +2110,8 @@
'platform/chromium/PlatformCursor.h',
'platform/chromium/PlatformKeyboardEventChromium.cpp',
'platform/chromium/PlatformScreenChromium.cpp',
+ 'platform/chromium/PlatformThemeChromiumGtk.cpp',
+ 'platform/chromium/PlatformThemeChromiumGtk.h',
'platform/chromium/PlatformWidget.h',
'platform/chromium/PopupMenuChromium.cpp',
'platform/chromium/PopupMenuChromium.h',
@@ -2199,6 +2210,8 @@
'platform/graphics/chromium/UniscribeHelper.h',
'platform/graphics/chromium/UniscribeHelperTextRun.cpp',
'platform/graphics/chromium/UniscribeHelperTextRun.h',
+ 'platform/graphics/chromium/VideoLayerChromium.cpp',
+ 'platform/graphics/chromium/VideoLayerChromium.h',
'platform/graphics/chromium/WebGLLayerChromium.cpp',
'platform/graphics/chromium/WebGLLayerChromium.h',
'platform/graphics/filters/FEBlend.cpp',
@@ -2825,6 +2838,8 @@
'platform/text/CharacterNames.h',
'platform/text/Hyphenation.cpp',
'platform/text/Hyphenation.h',
+ 'platform/text/LineEnding.cpp',
+ 'platform/text/LineEnding.h',
'platform/text/ParserUtilities.h',
'platform/text/PlatformString.h',
'platform/text/RegularExpression.cpp',
@@ -3500,6 +3515,8 @@
'storage/SQLStatement.h',
'storage/SQLStatementCallback.h',
'storage/SQLStatementErrorCallback.h',
+ 'storage/SQLStatementSync.cpp',
+ 'storage/SQLStatementSync.h',
'storage/SQLTransaction.cpp',
'storage/SQLTransaction.h',
'storage/SQLTransactionCallback.h',
@@ -3749,8 +3766,13 @@
'svg/SVGPaint.h',
'svg/SVGParserUtilities.cpp',
'svg/SVGParserUtilities.h',
+ 'svg/SVGPathBuilder.cpp',
+ 'svg/SVGPathBuilder.h',
+ 'svg/SVGPathConsumer.h',
'svg/SVGPathElement.cpp',
'svg/SVGPathElement.h',
+ 'svg/SVGPathParser.cpp',
+ 'svg/SVGPathParser.h',
'svg/SVGPathSeg.h',
'svg/SVGPathSegArc.cpp',
'svg/SVGPathSegArc.h',
@@ -3772,6 +3794,8 @@
'svg/SVGPathSegLinetoVertical.h',
'svg/SVGPathSegList.cpp',
'svg/SVGPathSegList.h',
+ 'svg/SVGPathSegListBuilder.cpp',
+ 'svg/SVGPathSegListBuilder.h',
'svg/SVGPathSegMoveto.cpp',
'svg/SVGPathSegMoveto.h',
'svg/SVGPatternElement.cpp',
diff --git a/WebCore/WebCore.order b/WebCore/WebCore.order
index 7f916d2..8fa6586 100644
--- a/WebCore/WebCore.order
+++ b/WebCore/WebCore.order
@@ -2999,7 +2999,7 @@ __ZN7WebCore24StringWrapperCFAllocatorL22deallocateOnMainThreadEPv
__ZNK7WebCore12RenderObject5themeEv
__ZNK7WebCore14RenderThemeMac20supportsControlTintsEv
__ZN7WebCore15GraphicsContext23setUpdatingControlTintsEb
-__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsE
+__ZN7WebCore12EventHandler20hitTestResultAtPointERKNS_8IntPointEbbNS_17HitTestScrollbarsEi
__ZNK7WebCore13HitTestResult10isSelectedEv
__ZN7WebCore19SelectionController8containsERKNS_8IntPointE
__ZN7WebCore13InlineTextBox11nodeAtPointERKNS_14HitTestRequestERNS_13HitTestResultEiiii
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 1451984..7205add 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -664,7 +664,87 @@ IDL_BINDINGS += \
xml/XPathEvaluator.idl \
xml/XSLTProcessor.idl
-INSPECTOR_INTERFACES = inspector/InspectorFrontend2.idl
+
+INSPECTOR_INTERFACES = inspector/Inspector.idl
+
+WEBCORE_HEADERS_FOR_WEBKIT2 += \
+ bindings/js/DOMWrapperWorld.h \
+ platform/FileChooser.h \
+ platform/network/qt/ResourceError.h \
+ platform/network/qt/ResourceRequest.h \
+ platform/network/qt/ResourceResponse.h \
+ dom/KeyboardEvent.h \
+ editing/EditCommand.h \
+ history/BackForwardList.h \
+ history/BackForwardControllerClient.h \
+ history/HistoryItem.h \
+ html/HTMLFormElement.h \
+ html/HTMLFrameOwnerElement.h \
+ inspector/InspectorClient.h \
+ loader/DocumentLoader.h \
+ loader/FormState.h \
+ loader/FrameLoader.h \
+ loader/FrameLoaderClient.h \
+ loader/FrameLoaderTypes.h \
+ loader/PolicyChecker.h \
+ loader/ProgressTracker.h \
+ page/animation/AnimationController.h \
+ page/Chrome.h \
+ page/ChromeClient.h \
+ page/ContextMenuClient.h \
+ page/DragClient.h \
+ page/EditorClient.h \
+ page/EventHandler.h \
+ page/FocusController.h \
+ page/Frame.h \
+ page/FrameLoadRequest.h \
+ page/FrameView.h \
+ page/Page.h \
+ page/Settings.h \
+ page/WindowFeatures.h \
+ platform/PlatformKeyboardEvent.h \
+ platform/PlatformMouseEvent.h \
+ platform/PlatformWheelEvent.h \
+ platform/Widget.h \
+ platform/KURL.h \
+ platform/graphics/FloatRect.h \
+ platform/graphics/GraphicsContext.h \
+ platform/graphics/GraphicsLayerClient.h \
+ platform/graphics/IntPoint.h \
+ platform/graphics/IntRect.h \
+ platform/graphics/IntSize.h \
+ platform/graphics/Tile.h \
+ platform/graphics/TiledBackingStore.h \
+ platform/graphics/TiledBackingStoreClient.h \
+ platform/text/PlatformString.h \
+ platform/text/StringImpl.h \
+ platform/MIMETypeRegistry.h \
+ rendering/RenderTreeAsText.h \
+ plugins/PluginData.h \
+
+JSC_HEADERS_FOR_WEBKIT2 += \
+ ../JavaScriptCore/runtime/JSObject.h \
+
+WEBKIT2_API_HEADERS += \
+ ../WebKit2/UIProcess/API/C/WKAPICast.h \
+ ../WebKit2/UIProcess/API/C/WKBase.h \
+ ../WebKit2/UIProcess/API/C/WKContext.h \
+ ../WebKit2/UIProcess/API/C/WKContextPrivate.h \
+ ../WebKit2/UIProcess/API/C/WKFrame.h \
+ ../WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
+ ../WebKit2/UIProcess/API/C/WKNavigationData.h \
+ ../WebKit2/UIProcess/API/C/WKPage.h \
+ ../WebKit2/UIProcess/API/C/WKPageNamespace.h \
+ ../WebKit2/UIProcess/API/C/WKPagePrivate.h \
+ ../WebKit2/UIProcess/API/C/WKPreferences.h \
+ ../WebKit2/UIProcess/API/C/WKString.h \
+ ../WebKit2/UIProcess/API/C/WKURL.h \
+ ../WebKit2/UIProcess/API/C/WebKit2.h \
+ ../WebKit2/UIProcess/API/cpp/WKRetainPtr.h \
+ ../WebKit2/UIProcess/API/qt/qgraphicswkview.h \
+ ../WebKit2/UIProcess/API/qt/qwkpage.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h \
mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp
mathmlnames.input = MATHML_NAMES
@@ -728,7 +808,7 @@ idl.depends = $$PWD/bindings/scripts/CodeGenerator.pm \
addExtraCompiler(idl)
# GENERATOR 2: inspector idl compiler
-inspectorIDL.output = $${WC_GENERATED_SOURCES_DIR}/Remote${QMAKE_FILE_BASE}.cpp
+inspectorIDL.output = $${WC_GENERATED_SOURCES_DIR}/Remote${QMAKE_FILE_BASE}Frontend.cpp
inspectorIDL.input = INSPECTOR_INTERFACES
inspectorIDL.wkScript = $$PWD/bindings/scripts/generate-bindings.pl
inspectorIDL.commands = perl -I$$PWD/bindings/scripts -I$$PWD/inspector $$inspectorIDL.wkScript --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator Inspector --outputDir $$WC_GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
@@ -830,3 +910,30 @@ webkitversion.clean = ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/WebKitVersion.h
webkitversion.wkAddOutputToSources = false
addExtraCompiler(webkitversion)
+webkit2 {
+
+# GENERATOR 12: Copy WebCore headers for WebKit2
+webcoreheaders.output = ../include/WebCore/${QMAKE_FILE_BASE}.h
+webcoreheaders.input = WEBCORE_HEADERS_FOR_WEBKIT2
+webcoreheaders.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
+webcoreheaders.clean = ${QMAKE_FILE_OUT}
+webcoreheaders.wkAddOutputToSources = false
+addExtraCompiler(webcoreheaders)
+
+# GENERATOR 12-B: Copy JavaScriptCore headers for WebKit2
+jscheaders.output = ../include/JavaScriptCore/${QMAKE_FILE_BASE}.h
+jscheaders.input = JSC_HEADERS_FOR_WEBKIT2
+jscheaders.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
+jscheaders.clean = ${QMAKE_FILE_OUT}
+jscheaders.wkAddOutputToSources = false
+addExtraCompiler(jscheaders)
+
+# GENERATOR 13: Copy WebKit2 headers
+webkit2headers.output = ../include/WebKit2/${QMAKE_FILE_BASE}.h
+webkit2headers.input = WEBKIT2_API_HEADERS
+webkit2headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
+webkit2headers.clean = ${QMAKE_FILE_OUT}
+webkit2headers.wkAddOutputToSources = false
+addExtraCompiler(webkit2headers)
+
+}
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 49149dc..8ed7157 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2,6 +2,10 @@
CONFIG += building-libs
CONFIG += depend_includepath
+meegotouch {
+ DEFINES += WTF_USE_MEEGOTOUCH=1
+}
+
symbian: {
TARGET.EPOCALLOWDLLDATA=1
TARGET.CAPABILITY = All -Tcb
@@ -116,8 +120,16 @@ win32-g++* {
QMAKE_LIBDIR_POST += $$split(TMPPATH,";")
}
-# Assume that symbian OS always comes with sqlite
-symbian:!CONFIG(QTDIR_build): CONFIG += system-sqlite
+symbian {
+ !CONFIG(QTDIR_build) {
+ # Test if symbian OS comes with sqlite
+ exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso):CONFIG *= system-sqlite
+ } else:!symbian-abld:!symbian-sbsv2 {
+ # When bundled with Qt, all Symbian build systems extract their own sqlite files if
+ # necessary, but on non-mmp based ones we need to specify this ourselves.
+ include($$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+ }
+}
@@ -168,6 +180,7 @@ INCLUDEPATH = \
$$PWD \
$$PWD/accessibility \
$$PWD/bindings \
+ $$PWD/bindings/generic \
$$PWD/bindings/js \
$$PWD/bridge \
$$PWD/bridge/c \
@@ -263,6 +276,7 @@ SOURCES += \
accessibility/AccessibilityTableHeaderContainer.cpp \
accessibility/AccessibilityTableRow.cpp \
accessibility/AXObjectCache.cpp \
+ bindings/generic/RuntimeEnabledFeatures.cpp \
bindings/js/GCController.cpp \
bindings/js/DOMObjectHashTableMap.cpp \
bindings/js/DOMWrapperWorld.cpp \
@@ -286,6 +300,7 @@ SOURCES += \
bindings/js/JSDataGridDataSource.cpp \
bindings/js/JSDebugWrapperSet.cpp \
bindings/js/JSDesktopNotificationsCustom.cpp \
+ bindings/js/JSDeviceOrientationEventCustom.cpp \
bindings/js/JSDocumentCustom.cpp \
bindings/js/JSDOMFormDataCustom.cpp \
bindings/js/JSDOMGlobalObject.cpp \
@@ -462,6 +477,7 @@ SOURCES += \
dom/CSSMappedAttributeDeclaration.cpp \
dom/CustomEvent.cpp \
dom/DecodedDataDocumentParser.cpp \
+ dom/DeviceOrientation.cpp \
dom/DeviceOrientationController.cpp \
dom/DeviceOrientationEvent.cpp \
dom/Document.cpp \
@@ -891,6 +907,7 @@ SOURCES += \
platform/KillRingNone.cpp \
platform/KURL.cpp \
platform/Length.cpp \
+ platform/text/LineEnding.cpp \
platform/LinkHash.cpp \
platform/Logging.cpp \
platform/MIMETypeRegistry.cpp \
@@ -1219,6 +1236,7 @@ HEADERS += \
dom/CSSMappedAttributeDeclaration.h \
dom/CustomEvent.h \
dom/default/PlatformMessagePortChannel.h \
+ dom/DeviceOrientation.h \
dom/DeviceOrientationClient.h \
dom/DeviceOrientationController.h \
dom/DeviceOrientationEvent.h \
@@ -1590,6 +1608,10 @@ HEADERS += \
page/SecurityOrigin.h \
page/Settings.h \
page/SpatialNavigation.h \
+ page/SpeechInput.h \
+ page/SpeechInputClient.h \
+ page/SpeechInputClientListener.h \
+ page/SpeechInputListener.h \
page/WindowFeatures.h \
page/WorkerNavigator.h \
page/XSSAuditor.h \
@@ -1661,6 +1683,7 @@ HEADERS += \
platform/KillRing.h \
platform/KURL.h \
platform/Length.h \
+ platform/text/LineEnding.h \
platform/LinkHash.h \
platform/Logging.h \
platform/MIMETypeRegistry.h \
@@ -1982,7 +2005,10 @@ HEADERS += \
svg/SVGNumberList.h \
svg/SVGPaint.h \
svg/SVGParserUtilities.h \
+ svg/SVGPathBuilder.h \
+ svg/SVGPathConsumer.h \
svg/SVGPathElement.h \
+ svg/SVGPathParser.h \
svg/SVGPathSegArc.h \
svg/SVGPathSegClosePath.h \
svg/SVGPathSegCurvetoCubic.h \
@@ -1993,6 +2019,7 @@ HEADERS += \
svg/SVGPathSegLinetoHorizontal.h \
svg/SVGPathSegLinetoVertical.h \
svg/SVGPathSegList.h \
+ svg/SVGPathSegListBuilder.h \
svg/SVGPathSegMoveto.h \
svg/SVGPatternElement.h \
svg/SVGPointList.h \
@@ -2243,12 +2270,12 @@ maemo5 {
win32-* {
LIBS += -lgdi32
- LIBS += -lOle32
+ LIBS += -lole32
LIBS += -luser32
}
wince* {
LIBS += -lmmtimer
- LIBS += -lOle32
+ LIBS += -lole32
}
contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
@@ -2368,6 +2395,7 @@ contains(DEFINES, ENABLE_DATABASE=1) {
storage/SQLResultSet.cpp \
storage/SQLResultSetRowList.cpp \
storage/SQLStatement.cpp \
+ storage/SQLStatementSync.cpp \
storage/SQLTransaction.cpp \
storage/SQLTransactionClient.cpp \
storage/SQLTransactionCoordinator.cpp \
@@ -2446,6 +2474,7 @@ contains(DEFINES, ENABLE_DOM_STORAGE=1) {
storage/SQLResultSet.h \
storage/SQLResultSetRowList.h \
storage/SQLStatement.h \
+ storage/SQLStatementSync.h \
storage/SQLTransaction.h \
storage/SQLTransactionClient.h \
storage/SQLTransactionCoordinator.h \
@@ -2519,6 +2548,7 @@ contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
contains(DEFINES, ENABLE_INPUT_SPEECH=1) {
SOURCES += \
+ page/SpeechInput.cpp \
rendering/RenderInputSpeech.cpp
}
@@ -2791,7 +2821,9 @@ contains(DEFINES, ENABLE_SVG=1) {
svg/SVGNumberList.cpp \
svg/SVGPaint.cpp \
svg/SVGParserUtilities.cpp \
+ svg/SVGPathBuilder.cpp \
svg/SVGPathElement.cpp \
+ svg/SVGPathParser.cpp \
svg/SVGPathSegArc.cpp \
svg/SVGPathSegClosePath.cpp \
svg/SVGPathSegCurvetoCubic.cpp \
@@ -2802,6 +2834,7 @@ contains(DEFINES, ENABLE_SVG=1) {
svg/SVGPathSegLinetoHorizontal.cpp \
svg/SVGPathSegLinetoVertical.cpp \
svg/SVGPathSegList.cpp \
+ svg/SVGPathSegListBuilder.cpp \
svg/SVGPathSegMoveto.cpp \
svg/SVGPatternElement.cpp \
svg/SVGPointList.cpp \
@@ -3026,6 +3059,7 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) {
}
include($$PWD/../WebKit/qt/Api/headers.pri)
+
HEADERS += $$WEBKIT_API_HEADERS
!CONFIG(QTDIR_build) {
@@ -3146,6 +3180,192 @@ SOURCES += \
rendering/RenderLayerCompositor.cpp
}
+webkit2 {
+
+CONFIG += precompile_header
+PRECOMPILED_HEADER = $$PWD/../WebKit2/WebKit2Prefix.h
+
+INCLUDEPATH = \
+ $$PWD/../WebKit2/Platform \
+ $$PWD/../WebKit2/Platform/CoreIPC \
+ $$PWD/../WebKit2/Shared \
+ $$PWD/../WebKit2/Shared/CoreIPCSupport \
+ $$PWD/../WebKit2/Shared/qt \
+ $$PWD/../WebKit2/UIProcess \
+ $$PWD/../WebKit2/UIProcess/API/C \
+ $$PWD/../WebKit2/UIProcess/API/cpp \
+ $$PWD/../WebKit2/UIProcess/API/cpp/qt \
+ $$PWD/../WebKit2/UIProcess/API/qt \
+ $$PWD/../WebKit2/UIProcess/Launcher \
+ $$PWD/../WebKit2/UIProcess/Plugins \
+ $$PWD/../WebKit2/UIProcess/qt \
+ $$PWD/../WebKit2/WebProcess \
+ $$PWD/../WebKit2/WebProcess/InjectedBundle \
+ $$PWD/../WebKit2/WebProcess/InjectedBundle/API/c \
+ $$PWD/../WebKit2/WebProcess/WebCoreSupport \
+ $$PWD/../WebKit2/WebProcess/WebPage \
+ $$INCLUDEPATH \
+ $$OUTPUT_DIR/include \
+
+HEADERS += \
+ ../WebKit2/Platform/CoreIPC/ArgumentDecoder.h \
+ ../WebKit2/Platform/CoreIPC/ArgumentEncoder.h \
+ ../WebKit2/Platform/CoreIPC/Arguments.h \
+ ../WebKit2/Platform/CoreIPC/Attachment.h \
+ ../WebKit2/Platform/CoreIPC/Connection.h \
+ ../WebKit2/Platform/CoreIPC/CoreIPCMessageKinds.h \
+ ../WebKit2/Platform/CoreIPC/MessageID.h \
+ ../WebKit2/Platform/PlatformProcessIdentifier.h \
+ ../WebKit2/Platform/RunLoop.h \
+ ../WebKit2/Platform/WorkItem.h \
+ ../WebKit2/Platform/WorkQueue.h \
+ ../WebKit2/Shared/CoreIPCSupport/DrawingAreaMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/WebPageMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h \
+ ../WebKit2/Shared/NotImplemented.h \
+ ../WebKit2/Shared/qt/WebEventFactoryQt.h \
+ ../WebKit2/Shared/WebEventConversion.h \
+ ../WebKit2/Shared/WebEvent.h \
+ ../WebKit2/Shared/WebNavigationDataStore.h \
+ ../WebKit2/Shared/WebPreferencesStore.h \
+ ../WebKit2/UIProcess/API/cpp/WKRetainPtr.h \
+ ../WebKit2/UIProcess/API/cpp/qt/WKStringQt.h \
+ ../WebKit2/UIProcess/API/cpp/qt/WKURLQt.h \
+ ../WebKit2/UIProcess/API/C/WebKit2.h \
+ ../WebKit2/UIProcess/API/C/WKAPICast.h \
+ ../WebKit2/UIProcess/API/C/WKBase.h \
+ ../WebKit2/UIProcess/API/C/WKContext.h \
+ ../WebKit2/UIProcess/API/C/WKContextPrivate.h \
+ ../WebKit2/UIProcess/API/C/WKFrame.h \
+ ../WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
+ ../WebKit2/UIProcess/API/C/WKNavigationData.h \
+ ../WebKit2/UIProcess/API/C/WKPage.h \
+ ../WebKit2/UIProcess/API/C/WKPageNamespace.h \
+ ../WebKit2/UIProcess/API/C/WKPagePrivate.h \
+ ../WebKit2/UIProcess/API/C/WKPreferences.h \
+ ../WebKit2/UIProcess/API/C/WKString.h \
+ ../WebKit2/UIProcess/API/C/WKURL.h \
+ ../WebKit2/UIProcess/API/qt/qgraphicswkview.h \
+ ../WebKit2/UIProcess/API/qt/qwkpage.h \
+ ../WebKit2/UIProcess/API/qt/qwkpage_p.h \
+ ../WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h \
+ ../WebKit2/UIProcess/DrawingAreaProxy.h \
+ ../WebKit2/UIProcess/GenericCallback.h \
+ ../WebKit2/UIProcess/Launcher/ProcessLauncher.h \
+ ../WebKit2/UIProcess/Plugins/PluginInfoStore.h \
+ ../WebKit2/UIProcess/PageClient.h \
+ ../WebKit2/UIProcess/ProcessModel.h \
+ ../WebKit2/UIProcess/API/qt/ClientImpl.h \
+ ../WebKit2/UIProcess/ResponsivenessTimer.h \
+ ../WebKit2/UIProcess/WebContext.h \
+ ../WebKit2/UIProcess/WebContextInjectedBundleClient.h \
+ ../WebKit2/UIProcess/WebFramePolicyListenerProxy.h \
+ ../WebKit2/UIProcess/WebFrameProxy.h \
+ ../WebKit2/UIProcess/WebHistoryClient.h \
+ ../WebKit2/UIProcess/WebLoaderClient.h \
+ ../WebKit2/UIProcess/WebNavigationData.h \
+ ../WebKit2/UIProcess/WebPageNamespace.h \
+ ../WebKit2/UIProcess/WebPageProxy.h \
+ ../WebKit2/UIProcess/WebPolicyClient.h \
+ ../WebKit2/UIProcess/WebPreferences.h \
+ ../WebKit2/UIProcess/WebProcessManager.h \
+ ../WebKit2/UIProcess/WebProcessProxy.h \
+ ../WebKit2/UIProcess/WebUIClient.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundle.h \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebDragClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebErrors.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h \
+ ../WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h \
+ ../WebKit2/WebProcess/WebPage/DrawingArea.h \
+ ../WebKit2/WebProcess/WebPage/WebFrame.h \
+ ../WebKit2/WebProcess/WebPage/WebPage.h \
+ ../WebKit2/WebProcess/WebProcess.h \
+
+SOURCES += \
+ ../WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp \
+ ../WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp \
+ ../WebKit2/Platform/CoreIPC/Attachment.cpp \
+ ../WebKit2/Platform/CoreIPC/Connection.cpp \
+ ../WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp \
+ ../WebKit2/Platform/RunLoop.cpp \
+ ../WebKit2/Platform/WorkQueue.cpp \
+ ../WebKit2/Platform/qt/RunLoopQt.cpp \
+ ../WebKit2/Platform/qt/WorkQueueQt.cpp \
+ ../WebKit2/Shared/ImmutableArray.cpp \
+ ../WebKit2/Shared/WebEventConversion.cpp \
+ ../WebKit2/Shared/WebPreferencesStore.cpp \
+ ../WebKit2/Shared/qt/UpdateChunk.cpp \
+ ../WebKit2/Shared/qt/WebEventFactoryQt.cpp \
+ ../WebKit2/UIProcess/API/C/WKContext.cpp \
+ ../WebKit2/UIProcess/API/C/WKFrame.cpp \
+ ../WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp \
+ ../WebKit2/UIProcess/API/C/WKNavigationData.cpp \
+ ../WebKit2/UIProcess/API/C/WKPage.cpp \
+ ../WebKit2/UIProcess/API/C/WKPageNamespace.cpp \
+ ../WebKit2/UIProcess/API/C/WKPreferences.cpp \
+ ../WebKit2/UIProcess/API/C/WKString.cpp \
+ ../WebKit2/UIProcess/API/C/WKURL.cpp \
+ ../WebKit2/UIProcess/API/qt/qgraphicswkview.cpp \
+ ../WebKit2/UIProcess/API/qt/qwkpage.cpp \
+ ../WebKit2/UIProcess/API/cpp/qt/WKStringQt.cpp \
+ ../WebKit2/UIProcess/API/cpp/qt/WKURLQt.cpp \
+ ../WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp \
+ ../WebKit2/UIProcess/DrawingAreaProxy.cpp \
+ ../WebKit2/UIProcess/Plugins/PluginInfoStore.cpp \
+ ../WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp \
+ ../WebKit2/UIProcess/Launcher/ProcessLauncher.cpp \
+ ../WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp \
+ ../WebKit2/UIProcess/ResponsivenessTimer.cpp \
+ ../WebKit2/UIProcess/WebBackForwardList.cpp \
+ ../WebKit2/UIProcess/WebBackForwardListItem.cpp \
+ ../WebKit2/UIProcess/WebContext.cpp \
+ ../WebKit2/UIProcess/WebContextInjectedBundleClient.cpp \
+ ../WebKit2/UIProcess/WebFramePolicyListenerProxy.cpp \
+ ../WebKit2/UIProcess/WebFrameProxy.cpp \
+ ../WebKit2/UIProcess/WebHistoryClient.cpp \
+ ../WebKit2/UIProcess/WebLoaderClient.cpp \
+ ../WebKit2/UIProcess/WebNavigationData.cpp \
+ ../WebKit2/UIProcess/WebPageNamespace.cpp \
+ ../WebKit2/UIProcess/WebPageProxy.cpp \
+ ../WebKit2/UIProcess/WebPolicyClient.cpp \
+ ../WebKit2/UIProcess/WebPreferences.cpp \
+ ../WebKit2/UIProcess/WebProcessManager.cpp \
+ ../WebKit2/UIProcess/WebProcessProxy.cpp \
+ ../WebKit2/UIProcess/WebUIClient.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp \
+ ../WebKit2/UIProcess/API/qt/ClientImpl.cpp \
+ ../WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp \
+ ../WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp \
+ ../WebKit2/WebProcess/WebPage/DrawingArea.cpp \
+ ../WebKit2/WebProcess/WebPage/WebFrame.cpp \
+ ../WebKit2/WebProcess/WebPage/WebPage.cpp \
+ ../WebKit2/WebProcess/WebPage/WebBackForwardListProxy.cpp \
+ ../WebKit2/WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp \
+ ../WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp \
+ ../WebKit2/WebProcess/WebProcess.cpp \
+
+}
+
symbian {
shared {
contains(CONFIG, def_files) {
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 4e77d82..17a6b7f 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="windows-1251"?>
+<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
@@ -364,7 +364,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -374,7 +374,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -384,7 +384,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -394,7 +394,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -404,7 +404,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -414,7 +414,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
</File>
@@ -3345,6 +3345,118 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeType.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeType.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeTypeArray.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeTypeArray.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMParser.cpp"
>
<FileConfiguration
@@ -3401,6 +3513,118 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPlugin.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPlugin.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPluginArray.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPluginArray.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMSelection.cpp"
>
<FileConfiguration
@@ -9173,118 +9397,6 @@
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeType.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeType.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeTypeArray.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMMimeTypeArray.h"
- >
- </File>
- <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSMouseEvent.cpp"
>
<FileConfiguration
@@ -10125,118 +10237,6 @@
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPlugin.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPlugin.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPluginArray.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSDOMPluginArray.h"
- >
- </File>
- <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSPopStateEvent.cpp"
>
<FileConfiguration
@@ -20741,31 +20741,31 @@
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGElementFactory.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend.cpp"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGElementFactory.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGNames.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGElementFactory.cpp"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGNames.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGElementFactory.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\UserAgentStyleSheets.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGNames.cpp"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend2.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\SVGNames.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\RemoteInspectorFrontend2.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\UserAgentStyleSheets.h"
>
</File>
<File
@@ -20910,7 +20910,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -20920,7 +20920,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -20930,7 +20930,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -20940,7 +20940,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -20950,7 +20950,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -20960,7 +20960,7 @@
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
DisableSpecificWarnings="4065;4273;4565;4701;4702"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
</File>
@@ -22417,19 +22417,19 @@
>
</File>
<File
- RelativePath="..\page\Performance.cpp"
+ RelativePath="..\page\PageGroupLoadDeferrer.cpp"
>
</File>
<File
- RelativePath="..\page\Performance.h"
+ RelativePath="..\page\PageGroupLoadDeferrer.h"
>
</File>
<File
- RelativePath="..\page\PageGroupLoadDeferrer.cpp"
+ RelativePath="..\page\Performance.cpp"
>
</File>
<File
- RelativePath="..\page\PageGroupLoadDeferrer.h"
+ RelativePath="..\page\Performance.h"
>
</File>
<File
@@ -22501,6 +22501,26 @@
>
</File>
<File
+ RelativePath="..\page\SpeechInput.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\page\SpeechInput.h"
+ >
+ </File>
+ <File
+ RelativePath="..\page\SpeechInputClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\page\SpeechInputClientListener.h"
+ >
+ </File>
+ <File
+ RelativePath="..\page\SpeechInputListener.h"
+ >
+ </File>
+ <File
RelativePath="..\page\SuspendableTimer.cpp"
>
</File>
@@ -23824,7 +23844,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -23833,7 +23853,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -23842,7 +23862,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -23851,7 +23871,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -23860,7 +23880,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -23869,7 +23889,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
</File>
@@ -27144,6 +27164,14 @@
>
</File>
<File
+ RelativePath="..\platform\text\LineEnding.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\platform\text\LineEnding.h"
+ >
+ </File>
+ <File
RelativePath="..\platform\text\ParserUtilities.h"
>
</File>
@@ -32059,7 +32087,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -32068,7 +32096,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -32077,7 +32105,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -32086,7 +32114,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -32095,7 +32123,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
<FileConfiguration
@@ -32104,7 +32132,7 @@
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
- ForcedIncludeFiles="$(NOINHERIT)"
+ ForcedIncludeFiles="$(NOINHERIT);ICUVersion.h"
/>
</FileConfiguration>
</File>
@@ -32393,6 +32421,14 @@
>
</File>
<File
+ RelativePath="..\dom\DatasetDOMStringMap.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\dom\DatasetDOMStringMap.h"
+ >
+ </File>
+ <File
RelativePath="..\dom\DecodedDataDocumentParser.cpp"
>
</File>
@@ -32401,31 +32437,31 @@
>
</File>
<File
- RelativePath="..\dom\DeviceOrientationClient.h"
+ RelativePath="..\dom\DeviceOrientation.cpp"
>
</File>
<File
- RelativePath="..\dom\DeviceOrientationController.cpp"
+ RelativePath="..\dom\DeviceOrientation.h"
>
</File>
<File
- RelativePath="..\dom\DeviceOrientationController.h"
+ RelativePath="..\dom\DeviceOrientationClient.h"
>
</File>
<File
- RelativePath="..\dom\DeviceOrientationEvent.cpp"
+ RelativePath="..\dom\DeviceOrientationController.cpp"
>
</File>
<File
- RelativePath="..\dom\DeviceOrientationEvent.h"
+ RelativePath="..\dom\DeviceOrientationController.h"
>
</File>
<File
- RelativePath="..\dom\DatasetDOMStringMap.cpp"
+ RelativePath="..\dom\DeviceOrientationEvent.cpp"
>
</File>
<File
- RelativePath="..\dom\DatasetDOMStringMap.h"
+ RelativePath="..\dom\DeviceOrientationEvent.h"
>
</File>
<File
@@ -36713,6 +36749,14 @@
>
</File>
<File
+ RelativePath="..\html\HTMLConstructionSite.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\HTMLConstructionSite.h"
+ >
+ </File>
+ <File
RelativePath="..\html\HTMLDataGridCellElement.cpp"
>
<FileConfiguration
@@ -37233,15 +37277,15 @@
>
</File>
<File
- RelativePath="..\html\HTMLElementStack.cpp"
+ RelativePath="..\html\HTMLElementsAllInOne.cpp"
>
</File>
<File
- RelativePath="..\html\HTMLElementStack.h"
+ RelativePath="..\html\HTMLElementStack.cpp"
>
</File>
<File
- RelativePath="..\html\HTMLElementsAllInOne.cpp"
+ RelativePath="..\html\HTMLElementStack.h"
>
</File>
<File
@@ -40385,14 +40429,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLConstructionSite.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLConstructionSite.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLUListElement.cpp"
>
<FileConfiguration
@@ -40605,6 +40641,18 @@
>
</File>
<Filter
+ Name="generic"
+ >
+ <File
+ RelativePath="..\bindings\generic\RuntimeEnabledFeatures.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\generic\RuntimeEnabledFeatures.h"
+ >
+ </File>
+ </Filter>
+ <Filter
Name="js"
>
<File
@@ -40784,6 +40832,62 @@
>
</File>
<File
+ RelativePath="..\bindings\js\IDBBindingUtilities.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\bindings\js\IDBBindingUtilities.h"
+ >
+ </File>
+ <File
RelativePath="..\bindings\js\JSAttrCustom.cpp"
>
<FileConfiguration
@@ -42108,6 +42212,58 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\bindings\js\JSDeviceOrientationEventCustom.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\bindings\js\JSDocumentCustom.cpp"
>
<FileConfiguration
@@ -42376,6 +42532,162 @@
>
</File>
<File
+ RelativePath="..\bindings\js\JSDOMMimeTypeArrayCustom.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\bindings\js\JSDOMPluginArrayCustom.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\bindings\js\JSDOMPluginCustom.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\bindings\js\JSDOMStringMapCustom.cpp"
>
<FileConfiguration
@@ -43980,170 +44292,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKey.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKey.h"
- >
- </File>
- <File
- RelativePath="..\bindings\js\JSIDBKeyCustom.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\bindings\js\IDBBindingUtilities.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\bindings\js\IDBBindingUtilities.h"
- >
- </File>
- <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBDatabase.cpp"
>
<FileConfiguration
@@ -44484,7 +44632,7 @@
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKeyRange.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKey.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44536,11 +44684,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKeyRange.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKey.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.cpp"
+ RelativePath="..\bindings\js\JSIDBKeyCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44592,7 +44740,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKeyRange.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44644,11 +44792,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBKeyRange.h"
>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBRequest.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44700,11 +44848,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBRequest.h"
- >
- </File>
- <File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBSuccessEvent.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44756,11 +44900,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBSuccessEvent.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBObjectStoreRequest.h"
>
</File>
<File
- RelativePath="..\bindings\js\JSImageConstructor.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBRequest.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44812,11 +44956,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSImageConstructor.h"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBRequest.h"
>
</File>
<File
- RelativePath="..\bindings\js\JSImageDataCustom.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBSuccessEvent.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44868,7 +45012,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIndexedDatabaserequest.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIDBSuccessEvent.h"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JSImageConstructor.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44920,11 +45068,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIndexedDatabaseRequest.h"
+ RelativePath="..\bindings\js\JSImageConstructor.h"
>
</File>
<File
- RelativePath="..\bindings\js\JSInjectedScriptHostCustom.cpp"
+ RelativePath="..\bindings\js\JSImageDataCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -44976,7 +45124,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSInspectorFrontendHostCustom.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIndexedDatabaserequest.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45028,7 +45176,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSJavaScriptCallFrameCustom.cpp"
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSIndexedDatabaseRequest.h"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JSInjectedScriptHostCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45080,7 +45232,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSLazyEventListener.cpp"
+ RelativePath="..\bindings\js\JSInspectorFrontendHostCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45132,11 +45284,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSLazyEventListener.h"
- >
- </File>
- <File
- RelativePath="..\bindings\js\JSLocationCustom.cpp"
+ RelativePath="..\bindings\js\JSJavaScriptCallFrameCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45188,7 +45336,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSMainThreadExecState.cpp"
+ RelativePath="..\bindings\js\JSLazyEventListener.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45240,11 +45388,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSMainThreadExecState.h"
+ RelativePath="..\bindings\js\JSLazyEventListener.h"
>
</File>
<File
- RelativePath="..\bindings\js\JSMessageChannelCustom.cpp"
+ RelativePath="..\bindings\js\JSLocationCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45296,7 +45444,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSMessageEventCustom.cpp"
+ RelativePath="..\bindings\js\JSMainThreadExecState.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45348,7 +45496,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSMessagePortCustom.cpp"
+ RelativePath="..\bindings\js\JSMainThreadExecState.h"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JSMessageChannelCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45400,11 +45552,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSMessagePortCustom.h"
- >
- </File>
- <File
- RelativePath="..\bindings\js\JSDOMMimeTypeArrayCustom.cpp"
+ RelativePath="..\bindings\js\JSMessageEventCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45456,7 +45604,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNamedNodeMapCustom.cpp"
+ RelativePath="..\bindings\js\JSMessagePortCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45508,7 +45656,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNavigatorCustom.cpp"
+ RelativePath="..\bindings\js\JSMessagePortCustom.h"
+ >
+ </File>
+ <File
+ RelativePath="..\bindings\js\JSNamedNodeMapCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45560,7 +45712,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNodeCustom.cpp"
+ RelativePath="..\bindings\js\JSNavigatorCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45612,11 +45764,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNodeCustom.h"
- >
- </File>
- <File
- RelativePath="..\bindings\js\JSNodeFilterCondition.cpp"
+ RelativePath="..\bindings\js\JSNodeCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45668,11 +45816,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNodeFilterCondition.h"
+ RelativePath="..\bindings\js\JSNodeCustom.h"
>
</File>
<File
- RelativePath="..\bindings\js\JSNodeFilterCustom.cpp"
+ RelativePath="..\bindings\js\JSNodeFilterCondition.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45724,59 +45872,11 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNodeIteratorCustom.cpp"
+ RelativePath="..\bindings\js\JSNodeFilterCondition.h"
>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Internal|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSNodeListCustom.cpp"
+ RelativePath="..\bindings\js\JSNodeFilterCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45828,7 +45928,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSOptionConstructor.cpp"
+ RelativePath="..\bindings\js\JSNodeIteratorCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45880,11 +45980,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSOptionConstructor.h"
- >
- </File>
- <File
- RelativePath="..\bindings\js\JSDOMPluginArrayCustom.cpp"
+ RelativePath="..\bindings\js\JSNodeListCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45936,7 +46032,7 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\bindings\js\JSDOMPluginCustom.cpp"
+ RelativePath="..\bindings\js\JSOptionConstructor.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -45988,6 +46084,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\bindings\js\JSOptionConstructor.h"
+ >
+ </File>
+ <File
RelativePath="..\bindings\js\JSPluginElementFunctions.cpp"
>
<FileConfiguration
@@ -48153,27 +48253,27 @@
>
</File>
<File
- RelativePath="..\plugins\npapi.cpp"
+ RelativePath="..\plugins\DOMPlugin.cpp"
>
</File>
<File
- RelativePath="..\plugins\npfunctions.h"
+ RelativePath="..\plugins\DOMPlugin.h"
>
</File>
<File
- RelativePath="..\plugins\DOMPlugin.cpp"
+ RelativePath="..\plugins\DOMPluginArray.cpp"
>
</File>
<File
- RelativePath="..\plugins\DOMPlugin.h"
+ RelativePath="..\plugins\DOMPluginArray.h"
>
</File>
<File
- RelativePath="..\plugins\DOMPluginArray.cpp"
+ RelativePath="..\plugins\npapi.cpp"
>
</File>
<File
- RelativePath="..\plugins\DOMPluginArray.h"
+ RelativePath="..\plugins\npfunctions.h"
>
</File>
<File
@@ -48841,10 +48941,22 @@
>
</File>
<File
+ RelativePath="..\svg\SVGPathBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath="..\svg\SVGPathConsumer.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGPathElement.h"
>
</File>
<File
+ RelativePath="..\svg\SVGPathParser.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGPathSeg.h"
>
</File>
@@ -48889,6 +49001,10 @@
>
</File>
<File
+ RelativePath="..\svg\SVGPathSegListBuilder.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGPathSegMoveto.h"
>
</File>
@@ -50021,6 +50137,14 @@
>
</File>
<File
+ RelativePath="..\storage\SQLStatementSync.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\storage\SQLStatementSync.h"
+ >
+ </File>
+ <File
RelativePath="..\storage\SQLTransaction.cpp"
>
</File>
diff --git a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
index 71105bc..537e129 100644
--- a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
+++ b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebCoreCommon"
- OutputDirectory="$(WebKitOutputDir)\lib"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;"
- PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="WebCorePrefix.h"
- ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
- ForcedIncludeFiles="WebCorePrefix.h"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;touch &quot;$(WebKitOutputDir)\tmp.cpp&quot;&#x0D;&#x0A;cl /analyze /nologo /c &quot;$(WebKitOutputDir)\tmp.cpp&quot; /Fo&quot;$(IntDir)\tmp.obj&quot; 2&gt;&amp;1 | findstr D9040&#x0D;&#x0A;if ERRORLEVEL 1 (set EnablePREfast=&quot;true&quot;) else (set EnablePREfast=&quot;false&quot;)&#x0D;&#x0A;if ERRORLEVEL 1 (set AnalyzeWithLargeStack=&quot;/analyze:65536&quot;) else (set AnalyzeWithLargeStack=&quot;&quot;)&#x0D;&#x0A;exit /b&#x0D;&#x0A;"
- />
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebCoreCommon"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\generic&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;"
+ PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="WebCorePrefix.h"
+ ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
+ ForcedIncludeFiles="WebCorePrefix.h;ICUVersion.h"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;touch &quot;$(WebKitOutputDir)\tmp.cpp&quot;&#x0D;&#x0A;cl /analyze /nologo /c &quot;$(WebKitOutputDir)\tmp.cpp&quot; /Fo&quot;$(IntDir)\tmp.obj&quot; 2&gt;&amp;1 | findstr D9040&#x0D;&#x0A;if ERRORLEVEL 1 (set EnablePREfast=&quot;true&quot;) else (set EnablePREfast=&quot;false&quot;)&#x0D;&#x0A;if ERRORLEVEL 1 (set AnalyzeWithLargeStack=&quot;/analyze:65536&quot;) else (set AnalyzeWithLargeStack=&quot;&quot;)&#x0D;&#x0A;exit /b&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 1cd25ec..af1949f 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -195,8 +195,7 @@
08E6E0F10EFF42BA00029FBF /* WMLFieldSetElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */; };
08E6E0F20EFF42BA00029FBF /* WMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */; };
0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */; };
- 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */; };
0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; };
0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
@@ -223,7 +222,7 @@
0F580B0E0F12A2690051D689 /* GraphicsLayerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580B0B0F12A2690051D689 /* GraphicsLayerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F580CFD0F12DE9B0051D689 /* RenderLayerCompositor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CF90F12DE9B0051D689 /* RenderLayerCompositor.h */; };
0F580CFE0F12DE9B0051D689 /* RenderLayerCompositor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFA0F12DE9B0051D689 /* RenderLayerCompositor.cpp */; };
- 0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */; };
+ 0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F580D000F12DE9B0051D689 /* RenderLayerBacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */; };
0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */; };
0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1030,7 +1029,7 @@
4F1534E011B533020021FD86 /* EditingBehaviorTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
4F3289B511A42AAB005ABE7E /* InspectorValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */; };
4F3289B611A42AAB005ABE7E /* InspectorValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F3289B411A42AAB005ABE7E /* InspectorValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend2.cpp */; };
+ 4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */; };
4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
510184690B08602A004A825F /* CachedPage.h in Headers */ = {isa = PBXBuildFile; fileRef = 510184670B08602A004A825F /* CachedPage.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1071,7 +1070,7 @@
513F14540AB634C400094DDF /* IconLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 513F14520AB634C400094DDF /* IconLoader.h */; };
514185EE0CD65F0400763C99 /* ChangeVersionWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 514185EC0CD65F0400763C99 /* ChangeVersionWrapper.h */; };
514185EF0CD65F0400763C99 /* ChangeVersionWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514185ED0CD65F0400763C99 /* ChangeVersionWrapper.cpp */; };
- 514B3F730C722047000530DF /* FileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 514B3F720C722047000530DF /* FileSystem.h */; };
+ 514B3F730C722047000530DF /* FileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 514B3F720C722047000530DF /* FileSystem.h */; settings = {ATTRIBUTES = (Private, ); }; };
514B3F760C722055000530DF /* FileSystemMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 514B3F750C722055000530DF /* FileSystemMac.mm */; };
514C76370CE9225E007EF3CD /* JSSQLError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76350CE9225E007EF3CD /* JSSQLError.cpp */; };
514C76380CE9225E007EF3CD /* JSSQLTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76360CE9225E007EF3CD /* JSSQLTransaction.cpp */; };
@@ -1182,6 +1181,8 @@
54C50F7B0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54C50F7A0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp */; };
550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 590E1B4911E4EF4B0069F784 /* DeviceOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */; };
+ 590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */; };
5913953B110758450083EC55 /* JNIBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 5913953A110758450083EC55 /* JNIBridge.h */; };
5913953D1107584E0083EC55 /* JNIBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5913953C1107584E0083EC55 /* JNIBridge.cpp */; };
596229781133EFD700DC4CBB /* GeolocationPositionCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 596229771133EFD700DC4CBB /* GeolocationPositionCache.cpp */; };
@@ -1199,6 +1200,7 @@
59B597731108656B007159E8 /* BridgeJSC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59B597721108656B007159E8 /* BridgeJSC.cpp */; };
59B5977511086579007159E8 /* BridgeJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59B5977411086579007159E8 /* BridgeJSC.h */; settings = {ATTRIBUTES = (Private, ); }; };
59BC393F11054A1300FD85DB /* JavaStringJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59BC393E11054A1300FD85DB /* JavaStringJSC.h */; };
+ 59D1C10411EB5DCF00B638C8 /* DeviceOrientation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59D1C10311EB5DCF00B638C8 /* DeviceOrientation.cpp */; };
59E560A71105336600AA1258 /* JavaClassJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59E560A61105336600AA1258 /* JavaClassJSC.h */; };
59E560A91105336F00AA1258 /* JavaClassJSC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 59E560A81105336F00AA1258 /* JavaClassJSC.cpp */; };
59E842661109E5A2000305AD /* JNIBridgeJSC.h in Headers */ = {isa = PBXBuildFile; fileRef = 59E842651109E5A2000305AD /* JNIBridgeJSC.h */; };
@@ -1342,6 +1344,11 @@
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */; };
7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */; };
7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */; };
+ 7578F90B11DDF26900D933C5 /* SpeechInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7578F90811DDF26900D933C5 /* SpeechInput.cpp */; };
+ 7578F90C11DDF26900D933C5 /* SpeechInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F90911DDF26900D933C5 /* SpeechInput.h */; };
+ 7578F90D11DDF26900D933C5 /* SpeechInputClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F90A11DDF26900D933C5 /* SpeechInputClient.h */; };
+ 7578F91F11E4E32800D933C5 /* SpeechInputClientListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F91D11E4E32800D933C5 /* SpeechInputClientListener.h */; };
+ 7578F92011E4E32800D933C5 /* SpeechInputListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7578F91E11E4E32800D933C5 /* SpeechInputListener.h */; };
75793E830D0CE0B3007FC0AC /* MessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */; };
75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793E810D0CE0B3007FC0AC /* MessageEvent.h */; };
75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793EC60D0CE72D007FC0AC /* JSMessageEvent.cpp */; };
@@ -1405,6 +1412,13 @@
845E72F80FD261EE00A87D79 /* Filter.h in Headers */ = {isa = PBXBuildFile; fileRef = 845E72F70FD261EE00A87D79 /* Filter.h */; };
845E72FB0FD2623900A87D79 /* SVGFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 845E72F90FD2623900A87D79 /* SVGFilter.cpp */; };
845E72FC0FD2623900A87D79 /* SVGFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 845E72FA0FD2623900A87D79 /* SVGFilter.h */; };
+ 8476C9E511DF6A0B00555B02 /* SVGPathSegListBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8476C9E311DF6A0B00555B02 /* SVGPathSegListBuilder.cpp */; };
+ 8476C9E611DF6A0B00555B02 /* SVGPathSegListBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8476C9E411DF6A0B00555B02 /* SVGPathSegListBuilder.h */; };
+ 8476C9EA11DF6A2900555B02 /* SVGPathBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8476C9E711DF6A2900555B02 /* SVGPathBuilder.cpp */; };
+ 8476C9EB11DF6A2900555B02 /* SVGPathBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8476C9E811DF6A2900555B02 /* SVGPathBuilder.h */; };
+ 8476C9EC11DF6A2900555B02 /* SVGPathConsumer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8476C9E911DF6A2900555B02 /* SVGPathConsumer.h */; };
+ 8476C9EF11DF6A5800555B02 /* SVGPathParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8476C9ED11DF6A5800555B02 /* SVGPathParser.cpp */; };
+ 8476C9F011DF6A5800555B02 /* SVGPathParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 8476C9EE11DF6A5800555B02 /* SVGPathParser.h */; };
84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */; };
84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */ = {isa = PBXBuildFile; fileRef = 84801953108BAFB300CB2B1F /* FEGaussianBlur.h */; };
8485227B1190162C006EDC7F /* JSSVGHKernElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 848522771190162C006EDC7F /* JSSVGHKernElement.cpp */; };
@@ -2303,6 +2317,8 @@
895253DF116C4F0600CABF00 /* FileThreadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 895253DE116C4F0600CABF00 /* FileThreadTask.h */; };
8988E10E11A3508B00DB732E /* BlobItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8988E10C11A3508B00DB732E /* BlobItem.cpp */; };
8988E10F11A3508B00DB732E /* BlobItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 8988E10D11A3508B00DB732E /* BlobItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 89B5EAA111E8003D00F2367E /* LineEnding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89B5EA9F11E8003D00F2367E /* LineEnding.cpp */; };
+ 89B5EAA211E8003D00F2367E /* LineEnding.h in Headers */ = {isa = PBXBuildFile; fileRef = 89B5EAA011E8003D00F2367E /* LineEnding.h */; settings = {ATTRIBUTES = (Private, ); }; };
89BED5EB11BE11CE00448492 /* BlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89BED5E911BE11CE00448492 /* BlobBuilder.cpp */; };
89BED5EC11BE11CE00448492 /* BlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 89BED5EA11BE11CE00448492 /* BlobBuilder.h */; };
89CD029311C85B870070B791 /* JSBlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89CD029111C85B870070B791 /* JSBlobBuilder.cpp */; };
@@ -2320,6 +2336,8 @@
8AF4E55611DC5A36000ED3DE /* Navigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AF4E55311DC5A36000ED3DE /* Navigation.h */; };
8AF4E55B11DC5A63000ED3DE /* Timing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AF4E55811DC5A63000ED3DE /* Timing.cpp */; };
8AF4E55C11DC5A63000ED3DE /* Timing.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AF4E55911DC5A63000ED3DE /* Timing.h */; };
+ 8C6EA61911EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C6EA61711EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp */; };
+ 8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */; };
8FAC774D119872CB0015AE94 /* JSMainThreadExecState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */; };
9302B0BD0D79F82900C7EE83 /* PageGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */; };
9302B0BF0D79F82C00C7EE83 /* PageGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2331,7 +2349,7 @@
9307F1130AF2C8BE00DBA31A /* DOMNodeInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85B498FA0ADB340200925CBB /* DOMNodeInternal.h */; };
9307F1D70AF2D59000DBA31A /* HitTestResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9307F1D50AF2D59000DBA31A /* HitTestResult.cpp */; };
9307F1D80AF2D59000DBA31A /* HitTestResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9307F1D60AF2D59000DBA31A /* HitTestResult.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 930908900AF7EDE40081DF01 /* HitTestRequest.h */; };
+ 930908910AF7EDE40081DF01 /* HitTestRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 930908900AF7EDE40081DF01 /* HitTestRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 930FC6891072B9280045293E /* TextRenderingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
931BCC611124DFCB00BE70DD /* MediaCanStartListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 931BCC601124DFCB00BE70DD /* MediaCanStartListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581AC09D14EE6000E61D7 /* CharsetData.cpp */; };
@@ -4291,6 +4309,8 @@
B523CF0B1182675400EBB29C /* DatabaseSync.h in Headers */ = {isa = PBXBuildFile; fileRef = B523CF041182675400EBB29C /* DatabaseSync.h */; };
B525A96511CA2340003A23A8 /* JSSQLException.h in Headers */ = {isa = PBXBuildFile; fileRef = B525A96311CA2340003A23A8 /* JSSQLException.h */; };
B525A96611CA2340003A23A8 /* JSSQLException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B525A96411CA2340003A23A8 /* JSSQLException.cpp */; };
+ B550B52511DC68A800923885 /* SQLStatementSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B550B52111DC68A800923885 /* SQLStatementSync.cpp */; };
+ B550B52611DC68A800923885 /* SQLStatementSync.h in Headers */ = {isa = PBXBuildFile; fileRef = B550B52211DC68A800923885 /* SQLStatementSync.h */; };
B55D5AA4119131FC00BCC315 /* JSSQLTransactionSyncCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = B55D5AA2119131FC00BCC315 /* JSSQLTransactionSyncCallback.h */; };
B55D5AA5119131FC00BCC315 /* JSSQLTransactionSyncCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55D5AA3119131FC00BCC315 /* JSSQLTransactionSyncCallback.cpp */; };
B55D5AA81191325000BCC315 /* JSDatabaseSyncCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55D5AA61191325000BCC315 /* JSDatabaseSyncCustom.cpp */; };
@@ -5814,8 +5834,7 @@
08FB84B00ECE373300DC064E /* WMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLElementFactory.cpp; sourceTree = "<group>"; };
08FB84B10ECE373300DC064E /* WMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLElementFactory.h; sourceTree = "<group>"; };
0A4844980CA44CB200B7BD48 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
- 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PluginWidgetMac.mm; path = mac/PluginWidgetMac.mm; sourceTree = "<group>"; };
- 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginWidget.h; sourceTree = "<group>"; };
+ 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginViewBase.h; sourceTree = "<group>"; };
0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; };
0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentThreadableLoader.cpp; sourceTree = "<group>"; };
0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentThreadableLoader.h; sourceTree = "<group>"; };
@@ -6751,8 +6770,8 @@
4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditingBehaviorTypes.h; sourceTree = "<group>"; };
4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorValues.cpp; sourceTree = "<group>"; };
4F3289B411A42AAB005ABE7E /* InspectorValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorValues.h; sourceTree = "<group>"; };
- 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteInspectorFrontend2.cpp; sourceTree = "<group>"; };
- 4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorFrontend2.h; sourceTree = "<group>"; };
+ 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteInspectorFrontend.cpp; sourceTree = "<group>"; };
+ 4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteInspectorFrontend.h; sourceTree = "<group>"; };
4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
510184670B08602A004A825F /* CachedPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedPage.h; sourceTree = "<group>"; };
@@ -6920,6 +6939,8 @@
54C50F7A0E801DF3009832A0 /* XMLDocumentParserLibxml2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLDocumentParserLibxml2.cpp; sourceTree = "<group>"; };
550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceOrientation.h; sourceTree = "<group>"; };
+ 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceOrientationEventCustom.cpp; sourceTree = "<group>"; };
5913953A110758450083EC55 /* JNIBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JNIBridge.h; sourceTree = "<group>"; };
5913953C1107584E0083EC55 /* JNIBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JNIBridge.cpp; sourceTree = "<group>"; };
596229771133EFD700DC4CBB /* GeolocationPositionCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeolocationPositionCache.cpp; sourceTree = "<group>"; };
@@ -6938,6 +6959,7 @@
59B597721108656B007159E8 /* BridgeJSC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BridgeJSC.cpp; path = bridge/jsc/BridgeJSC.cpp; sourceTree = "<group>"; };
59B5977411086579007159E8 /* BridgeJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BridgeJSC.h; path = bridge/jsc/BridgeJSC.h; sourceTree = "<group>"; };
59BC393E11054A1300FD85DB /* JavaStringJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaStringJSC.h; path = jsc/JavaStringJSC.h; sourceTree = "<group>"; };
+ 59D1C10311EB5DCF00B638C8 /* DeviceOrientation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceOrientation.cpp; sourceTree = "<group>"; };
59E560A61105336600AA1258 /* JavaClassJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JavaClassJSC.h; path = jsc/JavaClassJSC.h; sourceTree = "<group>"; };
59E560A81105336F00AA1258 /* JavaClassJSC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaClassJSC.cpp; path = jsc/JavaClassJSC.cpp; sourceTree = "<group>"; };
59E842651109E5A2000305AD /* JNIBridgeJSC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JNIBridgeJSC.h; path = jsc/JNIBridgeJSC.h; sourceTree = "<group>"; };
@@ -7089,6 +7111,11 @@
754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTimelineAgent.cpp; sourceTree = "<group>"; };
7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineRecordFactory.h; sourceTree = "<group>"; };
7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineRecordFactory.cpp; sourceTree = "<group>"; };
+ 7578F90811DDF26900D933C5 /* SpeechInput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpeechInput.cpp; sourceTree = "<group>"; };
+ 7578F90911DDF26900D933C5 /* SpeechInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInput.h; sourceTree = "<group>"; };
+ 7578F90A11DDF26900D933C5 /* SpeechInputClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputClient.h; sourceTree = "<group>"; };
+ 7578F91D11E4E32800D933C5 /* SpeechInputClientListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputClientListener.h; sourceTree = "<group>"; };
+ 7578F91E11E4E32800D933C5 /* SpeechInputListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeechInputListener.h; sourceTree = "<group>"; };
75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MessageEvent.cpp; path = dom/MessageEvent.cpp; sourceTree = SOURCE_ROOT; };
75793E810D0CE0B3007FC0AC /* MessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MessageEvent.h; path = dom/MessageEvent.h; sourceTree = SOURCE_ROOT; };
75793E820D0CE0B3007FC0AC /* MessageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = MessageEvent.idl; path = dom/MessageEvent.idl; sourceTree = SOURCE_ROOT; };
@@ -7158,6 +7185,13 @@
845E72F70FD261EE00A87D79 /* Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Filter.h; path = filters/Filter.h; sourceTree = "<group>"; };
845E72F90FD2623900A87D79 /* SVGFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFilter.cpp; sourceTree = "<group>"; };
845E72FA0FD2623900A87D79 /* SVGFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFilter.h; sourceTree = "<group>"; };
+ 8476C9E311DF6A0B00555B02 /* SVGPathSegListBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathSegListBuilder.cpp; sourceTree = "<group>"; };
+ 8476C9E411DF6A0B00555B02 /* SVGPathSegListBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegListBuilder.h; sourceTree = "<group>"; };
+ 8476C9E711DF6A2900555B02 /* SVGPathBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathBuilder.cpp; sourceTree = "<group>"; };
+ 8476C9E811DF6A2900555B02 /* SVGPathBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathBuilder.h; sourceTree = "<group>"; };
+ 8476C9E911DF6A2900555B02 /* SVGPathConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathConsumer.h; sourceTree = "<group>"; };
+ 8476C9ED11DF6A5800555B02 /* SVGPathParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathParser.cpp; sourceTree = "<group>"; };
+ 8476C9EE11DF6A5800555B02 /* SVGPathParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathParser.h; sourceTree = "<group>"; };
84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FEGaussianBlur.cpp; path = filters/FEGaussianBlur.cpp; sourceTree = "<group>"; };
84801953108BAFB300CB2B1F /* FEGaussianBlur.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FEGaussianBlur.h; path = filters/FEGaussianBlur.h; sourceTree = "<group>"; };
848522771190162C006EDC7F /* JSSVGHKernElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGHKernElement.cpp; sourceTree = "<group>"; };
@@ -8005,6 +8039,8 @@
895253DE116C4F0600CABF00 /* FileThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileThreadTask.h; sourceTree = "<group>"; };
8988E10C11A3508B00DB732E /* BlobItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobItem.cpp; sourceTree = "<group>"; };
8988E10D11A3508B00DB732E /* BlobItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobItem.h; sourceTree = "<group>"; };
+ 89B5EA9F11E8003D00F2367E /* LineEnding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LineEnding.cpp; sourceTree = "<group>"; };
+ 89B5EAA011E8003D00F2367E /* LineEnding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineEnding.h; sourceTree = "<group>"; };
89BED5E911BE11CE00448492 /* BlobBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobBuilder.cpp; sourceTree = "<group>"; };
89BED5EA11BE11CE00448492 /* BlobBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobBuilder.h; sourceTree = "<group>"; };
89CD027911C859A80070B791 /* BlobBuilder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BlobBuilder.idl; sourceTree = "<group>"; };
@@ -8026,6 +8062,8 @@
8AF4E55811DC5A63000ED3DE /* Timing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timing.cpp; sourceTree = "<group>"; };
8AF4E55911DC5A63000ED3DE /* Timing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timing.h; sourceTree = "<group>"; };
8AF4E55A11DC5A63000ED3DE /* Timing.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Timing.idl; sourceTree = "<group>"; };
+ 8C6EA61711EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuntimeEnabledFeatures.cpp; path = generic/RuntimeEnabledFeatures.cpp; sourceTree = "<group>"; };
+ 8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuntimeEnabledFeatures.h; path = generic/RuntimeEnabledFeatures.h; sourceTree = "<group>"; };
8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMainThreadExecState.h; sourceTree = "<group>"; };
8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMainThreadExecState.cpp; sourceTree = "<group>"; };
9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroup.cpp; sourceTree = "<group>"; };
@@ -9875,6 +9913,8 @@
B523CF041182675400EBB29C /* DatabaseSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseSync.h; sourceTree = "<group>"; };
B525A96311CA2340003A23A8 /* JSSQLException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLException.h; sourceTree = "<group>"; };
B525A96411CA2340003A23A8 /* JSSQLException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLException.cpp; sourceTree = "<group>"; };
+ B550B52111DC68A800923885 /* SQLStatementSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLStatementSync.cpp; sourceTree = "<group>"; };
+ B550B52211DC68A800923885 /* SQLStatementSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLStatementSync.h; sourceTree = "<group>"; };
B55D5AA2119131FC00BCC315 /* JSSQLTransactionSyncCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLTransactionSyncCallback.h; sourceTree = "<group>"; };
B55D5AA3119131FC00BCC315 /* JSSQLTransactionSyncCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLTransactionSyncCallback.cpp; sourceTree = "<group>"; };
B55D5AA61191325000BCC315 /* JSDatabaseSyncCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDatabaseSyncCustom.cpp; sourceTree = "<group>"; };
@@ -10945,8 +10985,8 @@
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
- 93F19B1A08245E5A001E9ABC /* WebCore.framework */,
5D87BB4F11E3EAEB00702B6F /* WebCoreExportFileGenerator */,
+ 93F19B1A08245E5A001E9ABC /* WebCore.framework */,
);
name = Products;
sourceTree = SOURCE_ROOT;
@@ -11052,14 +11092,6 @@
tabWidth = 4;
usesTabs = 0;
};
- 0AFDAC3610F5447400E1F3D2 /* mac */ = {
- isa = PBXGroup;
- children = (
- 0AFDAC3A10F5448300E1F3D2 /* PluginWidgetMac.mm */,
- );
- name = mac;
- sourceTree = "<group>";
- };
14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
isa = PBXGroup;
children = (
@@ -11335,6 +11367,8 @@
B59DD68E1190298E007E9684 /* SQLStatementCallback.idl */,
1A7CCB160CD9469A00B7B64E /* SQLStatementErrorCallback.h */,
B59DD68F1190298E007E9684 /* SQLStatementErrorCallback.idl */,
+ B550B52111DC68A800923885 /* SQLStatementSync.cpp */,
+ B550B52211DC68A800923885 /* SQLStatementSync.h */,
1ABFE7520CD968D000FE4834 /* SQLTransaction.cpp */,
1A7CCB220CD946FD00B7B64E /* SQLTransaction.h */,
1A7CCB230CD946FD00B7B64E /* SQLTransaction.idl */,
@@ -11394,8 +11428,8 @@
9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */,
9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */,
9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */,
- 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend2.cpp */,
- 4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend2.h */,
+ 4F4F5FFA11CBD2D200A186BF /* RemoteInspectorFrontend.cpp */,
+ 4F4F5FFC11CBD30100A186BF /* RemoteInspectorFrontend.h */,
);
name = Inspector;
sourceTree = "<group>";
@@ -11912,12 +11946,12 @@
children = (
9363B6290F8E8FE000803810 /* cf */,
5160F4920B0AA71500C1D2AF /* mac */,
- 51741D0B0B07259A00ED442C /* BackForwardList.h */,
- BCA8CA5D11E4E6D100812FB7 /* BackForwardListImpl.cpp */,
- BCA8CA5E11E4E6D100812FB7 /* BackForwardListImpl.h */,
BCA8C81D11E3D36900812FB7 /* BackForwardController.cpp */,
BCA8C81C11E3D36900812FB7 /* BackForwardController.h */,
BCA8C83011E3D53200812FB7 /* BackForwardControllerClient.h */,
+ 51741D0B0B07259A00ED442C /* BackForwardList.h */,
+ BCA8CA5D11E4E6D100812FB7 /* BackForwardListImpl.cpp */,
+ BCA8CA5E11E4E6D100812FB7 /* BackForwardListImpl.h */,
51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */,
51C0AA380F2AA10A001648C2 /* CachedFrame.h */,
51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */,
@@ -12003,7 +12037,6 @@
5DCF83690D59157800953BC6 /* plugins */ = {
isa = PBXGroup;
children = (
- 0AFDAC3610F5447400E1F3D2 /* mac */,
A9C6E4E10D745E05006442E9 /* DOMMimeType.cpp */,
A9C6E4E20D745E05006442E9 /* DOMMimeType.h */,
A9C6E65E0D7466F2006442E9 /* DOMMimeType.idl */,
@@ -12013,17 +12046,17 @@
A9C6E4E90D745E2B006442E9 /* DOMPlugin.cpp */,
A9C6E4EA0D745E2B006442E9 /* DOMPlugin.h */,
A9C6E6600D74670C006442E9 /* DOMPlugin.idl */,
- 1A219B3A0DCA87AB0040E3A0 /* npfunctions.h */,
A9C6E4ED0D745E38006442E9 /* DOMPluginArray.cpp */,
A9C6E4EE0D745E38006442E9 /* DOMPluginArray.h */,
A9C6E6610D74671E006442E9 /* DOMPluginArray.idl */,
+ 1A219B3A0DCA87AB0040E3A0 /* npfunctions.h */,
A9C6E4F10D745E48006442E9 /* PluginData.cpp */,
A9C6E4F20D745E48006442E9 /* PluginData.h */,
1ADA140E0E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp */,
1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */,
1AA8798F11CBE846003C664F /* PluginStrategy.h */,
+ 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */,
76FF17E211235673001D61B5 /* PluginViewNone.cpp */,
- 0AFDAC3C10F5448C00E1F3D2 /* PluginWidget.h */,
);
path = plugins;
sourceTree = "<group>";
@@ -12331,6 +12364,11 @@
F587863A02DE3A1401EA4122 /* Settings.h */,
626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */,
626CDE0D1140424C001E5A68 /* SpatialNavigation.h */,
+ 7578F90811DDF26900D933C5 /* SpeechInput.cpp */,
+ 7578F90911DDF26900D933C5 /* SpeechInput.h */,
+ 7578F90A11DDF26900D933C5 /* SpeechInputClient.h */,
+ 7578F91D11E4E32800D933C5 /* SpeechInputClientListener.h */,
+ 7578F91E11E4E32800D933C5 /* SpeechInputListener.h */,
62C1217A11AB9E76003C462C /* SuspendableTimer.cpp */,
62C1217B11AB9E77003C462C /* SuspendableTimer.h */,
8AF4E55811DC5A63000ED3DE /* Timing.cpp */,
@@ -13691,6 +13729,8 @@
A8DF3FC9097FA0FB0052981B /* HTMLCollection.cpp */,
A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */,
85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */,
+ 97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */,
+ 97EF560F11E40783007E026F /* HTMLConstructionSite.h */,
BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */,
BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */,
BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */,
@@ -13720,8 +13760,6 @@
1A494E290A12354300FDAFC1 /* HTMLDocument.idl */,
A871038811A2947000DBD50E /* HTMLDocumentParser.cpp */,
A871038911A2947000DBD50E /* HTMLDocumentParser.h */,
- 97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */,
- 97EF560F11E40783007E026F /* HTMLConstructionSite.h */,
F523D23E02DE4396018635CA /* HTMLElement.cpp */,
F523D23F02DE4396018635CA /* HTMLElement.h */,
1A494BBB0A122DCD00FDAFC1 /* HTMLElement.idl */,
@@ -15061,9 +15099,14 @@
B22278BF0D00BF200071B782 /* SVGPaint.idl */,
B22278C00D00BF200071B782 /* SVGParserUtilities.cpp */,
B22278C10D00BF200071B782 /* SVGParserUtilities.h */,
+ 8476C9E711DF6A2900555B02 /* SVGPathBuilder.cpp */,
+ 8476C9E811DF6A2900555B02 /* SVGPathBuilder.h */,
+ 8476C9E911DF6A2900555B02 /* SVGPathConsumer.h */,
B22278C20D00BF200071B782 /* SVGPathElement.cpp */,
B22278C30D00BF200071B782 /* SVGPathElement.h */,
B22278C40D00BF200071B782 /* SVGPathElement.idl */,
+ 8476C9ED11DF6A5800555B02 /* SVGPathParser.cpp */,
+ 8476C9EE11DF6A5800555B02 /* SVGPathParser.h */,
B22278C50D00BF200071B782 /* SVGPathSeg.h */,
B22278C60D00BF200071B782 /* SVGPathSeg.idl */,
B22278C70D00BF200071B782 /* SVGPathSegArc.cpp */,
@@ -15104,6 +15147,8 @@
B22278EA0D00BF200071B782 /* SVGPathSegList.cpp */,
B22278EB0D00BF200071B782 /* SVGPathSegList.h */,
B22278EC0D00BF210071B782 /* SVGPathSegList.idl */,
+ 8476C9E311DF6A0B00555B02 /* SVGPathSegListBuilder.cpp */,
+ 8476C9E411DF6A0B00555B02 /* SVGPathSegListBuilder.h */,
B22278ED0D00BF210071B782 /* SVGPathSegMoveto.cpp */,
B22278EE0D00BF210071B782 /* SVGPathSegMoveto.h */,
B22278EF0D00BF210071B782 /* SVGPathSegMovetoAbs.idl */,
@@ -15480,6 +15525,8 @@
B2C3D9F40D006C1D00EF6F26 /* BidiResolver.h */,
B2C3D9F50D006C1D00EF6F26 /* CharacterNames.h */,
375CD231119D43C800A2A859 /* Hyphenation.h */,
+ 89B5EA9F11E8003D00F2367E /* LineEnding.cpp */,
+ 89B5EAA011E8003D00F2367E /* LineEnding.h */,
BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */,
B2C3D9FB0D006C1D00EF6F26 /* PlatformString.h */,
B2C3D9FC0D006C1D00EF6F26 /* RegularExpression.cpp */,
@@ -15565,6 +15612,8 @@
BC1A3790097C6F970019F3D8 /* bindings */ = {
isa = PBXGroup;
children = (
+ 8C6EA61711EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp */,
+ 8C6EA61811EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h */,
BC1A3793097C6FB10019F3D8 /* js */,
BC1A3794097C6FC40019F3D8 /* objc */,
93F8B3050A300FE100F61AB8 /* CodeGenerator.pm */,
@@ -15738,12 +15787,13 @@
BC77D1510FF19C730070887B /* JSDataGridColumnListCustom.cpp */,
4162A453101145E300DFF3ED /* JSDedicatedWorkerContextCustom.cpp */,
33503CBF10179C1A003B47E1 /* JSDesktopNotificationsCustom.cpp */,
+ 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */,
49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */,
1AC226160DB69F740089B669 /* JSDOMApplicationCacheCustom.cpp */,
2E0888E5114884E200AF4265 /* JSDOMFormDataCustom.cpp */,
A9C6E6460D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp */,
- A9C6E64B0D7465E7006442E9 /* JSDOMPluginCustom.cpp */,
A9C6E64A0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp */,
+ A9C6E64B0D7465E7006442E9 /* JSDOMPluginCustom.cpp */,
BC64649B11D8238C006455B0 /* JSDOMStringMapCustom.cpp */,
BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */,
652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
@@ -16875,9 +16925,11 @@
BC64641A11D7F416006455B0 /* DatasetDOMStringMap.h */,
A8C228A011D5722E00D5A7D3 /* DecodedDataDocumentParser.cpp */,
A8C2289F11D5722E00D5A7D3 /* DecodedDataDocumentParser.h */,
+ 59D1C10311EB5DCF00B638C8 /* DeviceOrientation.cpp */,
+ 590E1B4811E4EF4B0069F784 /* DeviceOrientation.h */,
+ 59A8F1D711A69520001AC34A /* DeviceOrientationClient.h */,
59A8F1D311A69508001AC34A /* DeviceOrientationController.cpp */,
59A8F1D511A69513001AC34A /* DeviceOrientationController.h */,
- 59A8F1D711A69520001AC34A /* DeviceOrientationClient.h */,
59A85EA1119D68D900DEF1EF /* DeviceOrientationEvent.cpp */,
59A85EA3119D68EC00DEF1EF /* DeviceOrientationEvent.h */,
59A85EAA119D7B6E00DEF1EF /* DeviceOrientationEvent.idl */,
@@ -17188,7 +17240,10 @@
51E1ECB30C91C55600DC255B /* AutodrainedPool.h in Headers */,
A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */,
29A812380FBB9C1D00510293 /* AXObjectCache.h in Headers */,
+ BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
+ BCA8C83111E3D53200812FB7 /* BackForwardControllerClient.h in Headers */,
51741D0F0B07259A00ED442C /* BackForwardList.h in Headers */,
+ BCA8CA6011E4E6D100812FB7 /* BackForwardListImpl.h in Headers */,
BC124EE80C2641CD009E2349 /* BarInfo.h in Headers */,
B2C3DA220D006C1D00EF6F26 /* Base64.h in Headers */,
BC9462D8107A7B4C00857193 /* BeforeLoadEvent.h in Headers */,
@@ -17381,8 +17436,9 @@
93309DE1099E64920056E581 /* DeleteSelectionCommand.h in Headers */,
93F1998208245E59001E9ABC /* DeprecatedPtrList.h in Headers */,
93F1996D08245E59001E9ABC /* DeprecatedPtrListImpl.h in Headers */,
- 59A8F1D611A69513001AC34A /* DeviceOrientationController.h in Headers */,
+ 590E1B4911E4EF4B0069F784 /* DeviceOrientation.h in Headers */,
59A8F1D811A69520001AC34A /* DeviceOrientationClient.h in Headers */,
+ 59A8F1D611A69513001AC34A /* DeviceOrientationController.h in Headers */,
59A85EA4119D68EC00DEF1EF /* DeviceOrientationEvent.h in Headers */,
B2F34FE60E82F81400F627CD /* DNS.h in Headers */,
BCB16C2A0979C3BD00467741 /* DocLoader.h in Headers */,
@@ -17613,6 +17669,8 @@
75793ED50D0CE85B007FC0AC /* DOMMessageEventInternal.h in Headers */,
E1ACAF4D0E791AAF0087D12B /* DOMMessagePort.h in Headers */,
E1ADEDD50E76BD60004A1A5E /* DOMMessagePortInternal.h in Headers */,
+ A9C6E4E40D745E05006442E9 /* DOMMimeType.h in Headers */,
+ A9C6E4E80D745E18006442E9 /* DOMMimeTypeArray.h in Headers */,
857E0B250AB043460036E447 /* DOMMouseEvent.h in Headers */,
85989DCD0ACC8BBD00A0BC51 /* DOMMouseEventInternal.h in Headers */,
85C7F5BF0AAFB7CC004014DD /* DOMMutationEvent.h in Headers */,
@@ -17634,6 +17692,8 @@
85989DCF0ACC8BBD00A0BC51 /* DOMOverflowEventInternal.h in Headers */,
E1284BD61044A01E00EAEB52 /* DOMPageTransitionEvent.h in Headers */,
1ACE53E80A8D18E70022947D /* DOMParser.h in Headers */,
+ A9C6E4EC0D745E2B006442E9 /* DOMPlugin.h in Headers */,
+ A9C6E4F00D745E38006442E9 /* DOMPluginArray.h in Headers */,
BC1A37BB097C715F0019F3D8 /* DOMPrivate.h in Headers */,
85F56A7A0A98CE3700ADB60A /* DOMProcessingInstruction.h in Headers */,
85E711D50AC5D5350053270F /* DOMProcessingInstructionInternal.h in Headers */,
@@ -18285,6 +18345,7 @@
A81369D2097374F600D74463 /* HTMLButtonElement.h in Headers */,
93F199E508245E59001E9ABC /* HTMLCanvasElement.h in Headers */,
A8DF3FD0097FA0FC0052981B /* HTMLCollection.h in Headers */,
+ 97EF561111E40783007E026F /* HTMLConstructionSite.h in Headers */,
BC77CDBC0FEFF1420070887B /* HTMLDataGridCellElement.h in Headers */,
BC77CB870FEBF5AF0070887B /* HTMLDataGridColElement.h in Headers */,
BC212A1F0FE8333200EC3708 /* HTMLDataGridElement.h in Headers */,
@@ -18383,6 +18444,27 @@
1A2D753D0DE47FAB00F0A648 /* IconFetcher.h in Headers */,
513F14540AB634C400094DDF /* IconLoader.h in Headers */,
51E1ECC10C91C90400DC255B /* IconRecord.h in Headers */,
+ C585A6CD11D4FB3D004C3E4B /* IDBAny.h in Headers */,
+ C585A66311D4FAC5004C3E4B /* IDBBindingUtilities.h in Headers */,
+ C585A6CF11D4FB3D004C3E4B /* IDBCallbacks.h in Headers */,
+ C585A6D011D4FB3D004C3E4B /* IDBDatabase.h in Headers */,
+ C585A6D111D4FB3D004C3E4B /* IDBDatabaseError.h in Headers */,
+ C585A6D311D4FB3D004C3E4B /* IDBDatabaseException.h in Headers */,
+ C585A6D611D4FB3D004C3E4B /* IDBDatabaseImpl.h in Headers */,
+ C585A6D811D4FB3D004C3E4B /* IDBDatabaseRequest.h in Headers */,
+ C585A6DB11D4FB3D004C3E4B /* IDBErrorEvent.h in Headers */,
+ C585A6DE11D4FB3D004C3E4B /* IDBEvent.h in Headers */,
+ C585A6E011D4FB3D004C3E4B /* IDBIndex.h in Headers */,
+ C585A6E211D4FB3D004C3E4B /* IDBIndexImpl.h in Headers */,
+ C585A6E411D4FB3D004C3E4B /* IDBIndexRequest.h in Headers */,
+ C585A6E711D4FB3D004C3E4B /* IDBKey.h in Headers */,
+ C585A6EA11D4FB3D004C3E4B /* IDBKeyRange.h in Headers */,
+ C585A6EC11D4FB3D004C3E4B /* IDBKeyTree.h in Headers */,
+ C585A6ED11D4FB3D004C3E4B /* IDBObjectStore.h in Headers */,
+ C585A6EF11D4FB3D004C3E4B /* IDBObjectStoreImpl.h in Headers */,
+ C585A6F111D4FB3D004C3E4B /* IDBObjectStoreRequest.h in Headers */,
+ C585A6F411D4FB3D004C3E4B /* IDBRequest.h in Headers */,
+ C585A6F711D4FB3D004C3E4B /* IDBSuccessEvent.h in Headers */,
1A71D57C0F33819000F9CE4E /* IdentifierRep.h in Headers */,
49E911C50EF86D47009D0CAF /* IdentityTransformOperation.h in Headers */,
C0C054CD1118C8E400CE2636 /* IDLParser.pm in Headers */,
@@ -18398,6 +18480,9 @@
4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */,
316FE1180E6E1DA700BF6088 /* ImplicitAnimation.h in Headers */,
DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */,
+ C585A6FA11D4FB3D004C3E4B /* IndexedDatabase.h in Headers */,
+ C585A6FC11D4FB3D004C3E4B /* IndexedDatabaseImpl.h in Headers */,
+ C585A6FE11D4FB3D004C3E4B /* IndexedDatabaseRequest.h in Headers */,
F3644B001119805900E0D537 /* InjectedScript.h in Headers */,
7A0E76FA10BF08ED00A0276E /* InjectedScriptHost.h in Headers */,
A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */,
@@ -18411,6 +18496,7 @@
93309DEE099E64920056E581 /* InsertNodeBeforeCommand.h in Headers */,
93309DF0099E64920056E581 /* InsertParagraphSeparatorCommand.h in Headers */,
93309DF2099E64920056E581 /* InsertTextCommand.h in Headers */,
+ B885E8D511E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h in Headers */,
7A74ECBB101839A600BF939E /* InspectorBackend.h in Headers */,
1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */,
1C81B95A0E97330800266E07 /* InspectorController.h in Headers */,
@@ -18510,7 +18596,11 @@
2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */,
E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */,
65DF31F809D1CC60000BE325 /* JSDOMImplementation.h in Headers */,
+ A9D248070D757E7D00FDF959 /* JSDOMMimeType.h in Headers */,
+ A9D248090D757E7D00FDF959 /* JSDOMMimeTypeArray.h in Headers */,
1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */,
+ A9D247FF0D757E6900FDF959 /* JSDOMPlugin.h in Headers */,
+ A9D248010D757E6900FDF959 /* JSDOMPluginArray.h in Headers */,
BC5A86B60C3367E800EEA649 /* JSDOMSelection.h in Headers */,
C5137CF311A58378004ADB99 /* JSDOMStringList.h in Headers */,
BC64649811D82349006455B0 /* JSDOMStringMap.h in Headers */,
@@ -18610,8 +18700,21 @@
A80E7B0C0A19D606007FB8C5 /* JSHTMLTitleElement.h in Headers */,
1A85B2110A1B258700D8C87C /* JSHTMLUListElement.h in Headers */,
E44614170CD6826900FADA75 /* JSHTMLVideoElement.h in Headers */,
+ C585A67D11D4FB08004C3E4B /* JSIDBAny.h in Headers */,
+ C585A67F11D4FB08004C3E4B /* JSIDBDatabaseError.h in Headers */,
+ C585A68111D4FB08004C3E4B /* JSIDBDatabaseException.h in Headers */,
+ C585A68311D4FB08004C3E4B /* JSIDBDatabaseRequest.h in Headers */,
+ C585A68511D4FB08004C3E4B /* JSIDBErrorEvent.h in Headers */,
+ C585A68711D4FB08004C3E4B /* JSIDBEvent.h in Headers */,
+ C585A68911D4FB08004C3E4B /* JSIDBIndexRequest.h in Headers */,
+ C585A68B11D4FB08004C3E4B /* JSIDBKey.h in Headers */,
+ C585A68D11D4FB08004C3E4B /* JSIDBKeyRange.h in Headers */,
+ C585A68F11D4FB08004C3E4B /* JSIDBObjectStoreRequest.h in Headers */,
+ C585A69111D4FB08004C3E4B /* JSIDBRequest.h in Headers */,
+ C585A69311D4FB08004C3E4B /* JSIDBSuccessEvent.h in Headers */,
BC6C49F40D7DBA0500FFA558 /* JSImageConstructor.h in Headers */,
A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
+ C585A69711D4FB13004C3E4B /* JSIndexedDatabaseRequest.h in Headers */,
7A0E76DB10BF059800A0276E /* JSInjectedScriptHost.h in Headers */,
41F060CE0F5EEB2B00A07EAC /* JSInspectorBackend.h in Headers */,
7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
@@ -18629,11 +18732,10 @@
75793EC90D0CE72D007FC0AC /* JSMessageEvent.h in Headers */,
E1ADEDDA0E76BD93004A1A5E /* JSMessagePort.h in Headers */,
41F584C7104652CB009CAA64 /* JSMessagePortCustom.h in Headers */,
- A9D248070D757E7D00FDF959 /* JSDOMMimeType.h in Headers */,
- A9D248090D757E7D00FDF959 /* JSDOMMimeTypeArray.h in Headers */,
A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */,
65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */,
BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */,
+ 8A9A587111E84C36008ACFD1 /* JSNavigation.h in Headers */,
A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
BC9439C3116CF4940048C750 /* JSNodeCustom.h in Headers */,
14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */,
@@ -18646,8 +18748,7 @@
A826E8AE0A1A8F2300CD1BB6 /* JSOptionConstructor.h in Headers */,
1A0D57410A5C7867007EDD4C /* JSOverflowEvent.h in Headers */,
E1284BB110449FFA00EAEB52 /* JSPageTransitionEvent.h in Headers */,
- A9D247FF0D757E6900FDF959 /* JSDOMPlugin.h in Headers */,
- A9D248010D757E6900FDF959 /* JSDOMPluginArray.h in Headers */,
+ 8A9A587511E84C81008ACFD1 /* JSPerformance.h in Headers */,
93B70D6C09EB0C7C009D8468 /* JSPluginElementFunctions.h in Headers */,
5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */,
FE80DA720E9C472F000D6F75 /* JSPositionError.h in Headers */,
@@ -18820,6 +18921,7 @@
933A14B90B7D1D5200A53FFD /* JSTextEvent.h in Headers */,
BCEF45F60E687B5C001C1287 /* JSTextMetrics.h in Headers */,
E446141B0CD6826900FADA75 /* JSTimeRanges.h in Headers */,
+ 8A9A588811E84F37008ACFD1 /* JSTiming.h in Headers */,
1A750D5D0A90DEE1000FF215 /* JSTreeWalker.h in Headers */,
A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */,
49EECF0D105070C400099FAB /* JSUint16Array.h in Headers */,
@@ -18882,6 +18984,7 @@
BCFF64920EAD15C200C1D6F7 /* LengthSize.h in Headers */,
B22279650D00BF220071B782 /* LinearGradientAttributes.h in Headers */,
AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */,
+ 89B5EAA211E8003D00F2367E /* LineEnding.h in Headers */,
A7AD2F880EC89D07008AB002 /* LinkHash.h in Headers */,
BCB16C2D0979C3BD00467741 /* loader.h in Headers */,
656D37320ADBA5DE00A4554D /* LoaderNSURLExtras.h in Headers */,
@@ -18919,8 +19022,6 @@
75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */,
E1ADECBF0E76ACF1004A1A5E /* MessagePort.h in Headers */,
41BF700C0FE86F49005E8DEC /* MessagePortChannel.h in Headers */,
- A9C6E4E40D745E05006442E9 /* DOMMimeType.h in Headers */,
- A9C6E4E80D745E18006442E9 /* DOMMimeTypeArray.h in Headers */,
BC772C4F0C4EB3040083285F /* MIMETypeRegistry.h in Headers */,
C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */,
85031B460A44EFC700F992E0 /* MouseEvent.h in Headers */,
@@ -19004,15 +19105,13 @@
1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */,
B2C3DA2B0D006C1D00EF6F26 /* PlatformString.h in Headers */,
935C476B09AC4D4F00A6AAB4 /* PlatformWheelEvent.h in Headers */,
- A9C6E4EC0D745E2B006442E9 /* DOMPlugin.h in Headers */,
- A9C6E4F00D745E38006442E9 /* DOMPluginArray.h in Headers */,
A9C6E4F40D745E48006442E9 /* PluginData.h in Headers */,
1AC694C80A3B1676003F5049 /* PluginDocument.h in Headers */,
7693BAD4106C2DCA007B0823 /* PluginHalter.h in Headers */,
7693BAD5106C2DCA007B0823 /* PluginHalterClient.h in Headers */,
1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */,
1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */,
- 0AFDAC3D10F5448C00E1F3D2 /* PluginWidget.h in Headers */,
+ 0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */,
B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */,
97059978107D975200A50A7C /* PolicyCallback.h in Headers */,
9705997A107D975200A50A7C /* PolicyChecker.h in Headers */,
@@ -19188,6 +19287,7 @@
416E75CB0EDF90C700360E1D /* ScriptCallFrame.h in Headers */,
416E75BE0EDF8FD700360E1D /* ScriptCallStack.h in Headers */,
93B70D7009EB0C7C009D8468 /* ScriptController.h in Headers */,
+ CE02F0C411E83ADD00C6684A /* ScriptControllerBase.h in Headers */,
7AFD4FF4113277B60035B883 /* ScriptDebugListener.h in Headers */,
9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */,
08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */,
@@ -19253,6 +19353,10 @@
84A81F420FC7E02700955300 /* SourceGraphic.h in Headers */,
D01A27AE10C9BFD800026A42 /* SpaceSplitString.h in Headers */,
626CDE0F1140424C001E5A68 /* SpatialNavigation.h in Headers */,
+ 7578F90C11DDF26900D933C5 /* SpeechInput.h in Headers */,
+ 7578F90D11DDF26900D933C5 /* SpeechInputClient.h in Headers */,
+ 7578F91F11E4E32800D933C5 /* SpeechInputClientListener.h in Headers */,
+ 7578F92011E4E32800D933C5 /* SpeechInputListener.h in Headers */,
93309E12099E64920056E581 /* SplitElementCommand.h in Headers */,
93309E14099E64920056E581 /* SplitTextNodeCommand.h in Headers */,
93309E16099E64920056E581 /* SplitTextNodeContainingElementCommand.h in Headers */,
@@ -19267,6 +19371,7 @@
515B03990CD1642A00B7EA9C /* SQLStatement.h in Headers */,
1A7CCB190CD9469A00B7B64E /* SQLStatementCallback.h in Headers */,
1A7CCB1A0CD9469A00B7B64E /* SQLStatementErrorCallback.h in Headers */,
+ B550B52611DC68A800923885 /* SQLStatementSync.h in Headers */,
1A7CCB240CD946FD00B7B64E /* SQLTransaction.h in Headers */,
1A7CCB1B0CD9469A00B7B64E /* SQLTransactionCallback.h in Headers */,
B51BF6F1102C9E590002C15A /* SQLTransactionClient.h in Headers */,
@@ -19439,7 +19544,10 @@
B2227A510D00BF220071B782 /* SVGNumberList.h in Headers */,
B2227A540D00BF220071B782 /* SVGPaint.h in Headers */,
B2227A570D00BF220071B782 /* SVGParserUtilities.h in Headers */,
+ 8476C9EB11DF6A2900555B02 /* SVGPathBuilder.h in Headers */,
+ 8476C9EC11DF6A2900555B02 /* SVGPathConsumer.h in Headers */,
B2227A590D00BF220071B782 /* SVGPathElement.h in Headers */,
+ 8476C9F011DF6A5800555B02 /* SVGPathParser.h in Headers */,
B2227A5B0D00BF220071B782 /* SVGPathSeg.h in Headers */,
B2227A5E0D00BF220071B782 /* SVGPathSegArc.h in Headers */,
B2227A620D00BF220071B782 /* SVGPathSegClosePath.h in Headers */,
@@ -19451,6 +19559,7 @@
B2227A780D00BF220071B782 /* SVGPathSegLinetoHorizontal.h in Headers */,
B2227A7D0D00BF220071B782 /* SVGPathSegLinetoVertical.h in Headers */,
B2227A810D00BF220071B782 /* SVGPathSegList.h in Headers */,
+ 8476C9E611DF6A0B00555B02 /* SVGPathSegListBuilder.h in Headers */,
B2227A840D00BF220071B782 /* SVGPathSegMoveto.h in Headers */,
B2227A880D00BF220071B782 /* SVGPatternElement.h in Headers */,
B25599950D00D8BA00BB825C /* SVGPointLightSource.h in Headers */,
@@ -19570,6 +19679,7 @@
E4AFCFA50DAF29A300F5F55C /* UnitBezier.h in Headers */,
D086FE9809D53AAB005BC74D /* UnlinkCommand.h in Headers */,
656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */,
+ 003F1FEA11E6AB43008258D9 /* UserContentTypes.h in Headers */,
BCACF3BD1072921A00C0C8A3 /* UserContentURLPattern.h in Headers */,
2542F4DB1166C25A00E89A86 /* UserGestureIndicator.h in Headers */,
BCA2B061105047600043BD1C /* UserScript.h in Headers */,
@@ -19721,53 +19831,7 @@
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
- B885E8D511E06DD2009FFBF4 /* InspectorApplicationCacheAgent.h in Headers */,
- 97EF561111E40783007E026F /* HTMLConstructionSite.h in Headers */,
- BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */,
- BCA8C83111E3D53200812FB7 /* BackForwardControllerClient.h in Headers */,
- BCA8CA6011E4E6D100812FB7 /* BackForwardListImpl.h in Headers */,
- 003F1FEA11E6AB43008258D9 /* UserContentTypes.h in Headers */,
- CE02F0C411E83ADD00C6684A /* ScriptControllerBase.h in Headers */,
- 8A9A587111E84C36008ACFD1 /* JSNavigation.h in Headers */,
- 8A9A587511E84C81008ACFD1 /* JSPerformance.h in Headers */,
- 8A9A588811E84F37008ACFD1 /* JSTiming.h in Headers */,
- C585A66311D4FAC5004C3E4B /* IDBBindingUtilities.h in Headers */,
- C585A67D11D4FB08004C3E4B /* JSIDBAny.h in Headers */,
- C585A67F11D4FB08004C3E4B /* JSIDBDatabaseError.h in Headers */,
- C585A68111D4FB08004C3E4B /* JSIDBDatabaseException.h in Headers */,
- C585A68311D4FB08004C3E4B /* JSIDBDatabaseRequest.h in Headers */,
- C585A68511D4FB08004C3E4B /* JSIDBErrorEvent.h in Headers */,
- C585A68711D4FB08004C3E4B /* JSIDBEvent.h in Headers */,
- C585A68911D4FB08004C3E4B /* JSIDBIndexRequest.h in Headers */,
- C585A68B11D4FB08004C3E4B /* JSIDBKey.h in Headers */,
- C585A68D11D4FB08004C3E4B /* JSIDBKeyRange.h in Headers */,
- C585A68F11D4FB08004C3E4B /* JSIDBObjectStoreRequest.h in Headers */,
- C585A69111D4FB08004C3E4B /* JSIDBRequest.h in Headers */,
- C585A69311D4FB08004C3E4B /* JSIDBSuccessEvent.h in Headers */,
- C585A69711D4FB13004C3E4B /* JSIndexedDatabaseRequest.h in Headers */,
- C585A6CD11D4FB3D004C3E4B /* IDBAny.h in Headers */,
- C585A6CF11D4FB3D004C3E4B /* IDBCallbacks.h in Headers */,
- C585A6D011D4FB3D004C3E4B /* IDBDatabase.h in Headers */,
- C585A6D111D4FB3D004C3E4B /* IDBDatabaseError.h in Headers */,
- C585A6D311D4FB3D004C3E4B /* IDBDatabaseException.h in Headers */,
- C585A6D611D4FB3D004C3E4B /* IDBDatabaseImpl.h in Headers */,
- C585A6D811D4FB3D004C3E4B /* IDBDatabaseRequest.h in Headers */,
- C585A6DB11D4FB3D004C3E4B /* IDBErrorEvent.h in Headers */,
- C585A6DE11D4FB3D004C3E4B /* IDBEvent.h in Headers */,
- C585A6E011D4FB3D004C3E4B /* IDBIndex.h in Headers */,
- C585A6E211D4FB3D004C3E4B /* IDBIndexImpl.h in Headers */,
- C585A6E411D4FB3D004C3E4B /* IDBIndexRequest.h in Headers */,
- C585A6E711D4FB3D004C3E4B /* IDBKey.h in Headers */,
- C585A6EA11D4FB3D004C3E4B /* IDBKeyRange.h in Headers */,
- C585A6EC11D4FB3D004C3E4B /* IDBKeyTree.h in Headers */,
- C585A6ED11D4FB3D004C3E4B /* IDBObjectStore.h in Headers */,
- C585A6EF11D4FB3D004C3E4B /* IDBObjectStoreImpl.h in Headers */,
- C585A6F111D4FB3D004C3E4B /* IDBObjectStoreRequest.h in Headers */,
- C585A6F411D4FB3D004C3E4B /* IDBRequest.h in Headers */,
- C585A6F711D4FB3D004C3E4B /* IDBSuccessEvent.h in Headers */,
- C585A6FA11D4FB3D004C3E4B /* IndexedDatabase.h in Headers */,
- C585A6FC11D4FB3D004C3E4B /* IndexedDatabaseImpl.h in Headers */,
- C585A6FE11D4FB3D004C3E4B /* IndexedDatabaseRequest.h in Headers */,
+ 8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -19827,6 +19891,7 @@
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
compatibilityVersion = "Xcode 2.4";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -19927,7 +19992,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Copy all the Inspector front-end resources.\nditto \"${SRCROOT}/inspector/front-end\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n\n# Remove the WebKit.qrc file since it is not used on the Mac (this file is for Qt)\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/WebKit.qrc\"\n";
+ shellScript = "# Copy all the Inspector front-end resources.\nditto \"${SRCROOT}/inspector/front-end\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector\"\n\n# Remove the WebKit.qrc file since it is not used on the Mac (this file is for Qt)\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/WebKit.qrc\"\n\n# Remove *.re2js files, they are only used to generate some .js files.\nrm -f \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector/\"*.re2js\n";
};
5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */ = {
isa = PBXShellScriptBuildPhase;
@@ -19989,7 +20054,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "rsync -av --exclude \".svn\" --exclude \".DS_Store\" \"$SRCROOT/ForwardingHeaders\" \"$BUILT_PRODUCTS_DIR/$PRIVATE_HEADERS_FOLDER_PATH\"\nrsync -av --exclude \".svn\" --exclude \".DS_Store\" \"$SRCROOT/icu\" \"$BUILT_PRODUCTS_DIR/$PRIVATE_HEADERS_FOLDER_PATH\"\n";
+ shellScript = "rsync -aq --exclude \".svn\" --exclude \".DS_Store\" \"$SRCROOT/ForwardingHeaders\" \"$BUILT_PRODUCTS_DIR/$PRIVATE_HEADERS_FOLDER_PATH\"\nrsync -aq --exclude \".svn\" --exclude \".DS_Store\" \"$SRCROOT/icu\" \"$BUILT_PRODUCTS_DIR/$PRIVATE_HEADERS_FOLDER_PATH\"\n";
};
5DF50887116F3077005202AB /* Check For Inappropriate Files In Framework */ = {
isa = PBXShellScriptBuildPhase;
@@ -20117,6 +20182,8 @@
A8CFF0500A154F09000A4234 /* AutoTableLayout.cpp in Sources */,
29A812370FBB9C1D00510293 /* AXObjectCache.cpp in Sources */,
29A8124B0FBB9CA900510293 /* AXObjectCacheMac.mm in Sources */,
+ BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */,
+ BCA8CA5F11E4E6D100812FB7 /* BackForwardListImpl.cpp in Sources */,
BC124EE70C2641CD009E2349 /* BarInfo.cpp in Sources */,
B2C3DA210D006C1D00EF6F26 /* Base64.cpp in Sources */,
5172204B11D2960500638B42 /* BeforeProcessEvent.cpp in Sources */,
@@ -20272,6 +20339,7 @@
93309DDE099E64920056E581 /* DeleteFromTextNodeCommand.cpp in Sources */,
93309DE0099E64920056E581 /* DeleteSelectionCommand.cpp in Sources */,
93F19A3C08245E59001E9ABC /* DeprecatedPtrListImpl.cpp in Sources */,
+ 59D1C10411EB5DCF00B638C8 /* DeviceOrientation.cpp in Sources */,
59A8F1D411A69508001AC34A /* DeviceOrientationController.cpp in Sources */,
59A85EA2119D68D900DEF1EF /* DeviceOrientationEvent.cpp in Sources */,
B2F34FE90E82F82700F627CD /* DNSCFNet.cpp in Sources */,
@@ -20395,6 +20463,8 @@
850656FF0AAB4763002D15C0 /* DOMMediaList.mm in Sources */,
75793ED40D0CE85B007FC0AC /* DOMMessageEvent.mm in Sources */,
E1ACAF4C0E791AAF0087D12B /* DOMMessagePort.mm in Sources */,
+ A9C6E4E30D745E05006442E9 /* DOMMimeType.cpp in Sources */,
+ A9C6E4E70D745E18006442E9 /* DOMMimeTypeArray.cpp in Sources */,
857E0B260AB043460036E447 /* DOMMouseEvent.mm in Sources */,
85C7F5C00AAFB7CD004014DD /* DOMMutationEvent.mm in Sources */,
8518DD790A9CF31B0091B7A6 /* DOMNamedNodeMap.mm in Sources */,
@@ -20407,6 +20477,8 @@
85C7F5D10AAFB8D9004014DD /* DOMOverflowEvent.mm in Sources */,
E1284BD51044A01E00EAEB52 /* DOMPageTransitionEvent.mm in Sources */,
1ACE53E70A8D18E70022947D /* DOMParser.cpp in Sources */,
+ A9C6E4EB0D745E2B006442E9 /* DOMPlugin.cpp in Sources */,
+ A9C6E4EF0D745E38006442E9 /* DOMPluginArray.cpp in Sources */,
85F56A7B0A98CE3700ADB60A /* DOMProcessingInstruction.mm in Sources */,
BCC573360D695BBE006EF517 /* DOMProgressEvent.mm in Sources */,
8538F05C0AD722F1006A81D1 /* DOMRange.mm in Sources */,
@@ -20698,6 +20770,7 @@
A81369D3097374F600D74463 /* HTMLButtonElement.cpp in Sources */,
93F19AFD08245E59001E9ABC /* HTMLCanvasElement.cpp in Sources */,
A8DF3FD1097FA0FC0052981B /* HTMLCollection.cpp in Sources */,
+ 97EF561011E40783007E026F /* HTMLConstructionSite.cpp in Sources */,
BC77CDB80FEFF1210070887B /* HTMLDataGridCellElement.cpp in Sources */,
BC77CBAA0FEBF6C90070887B /* HTMLDataGridColElement.cpp in Sources */,
BCF524600FEBEE5D0095BF26 /* HTMLDataGridElement.cpp in Sources */,
@@ -20794,6 +20867,20 @@
513F14530AB634C400094DDF /* IconLoader.cpp in Sources */,
B275358E0B053A66002CE64F /* IconMac.mm in Sources */,
51E1ECC00C91C90400DC255B /* IconRecord.cpp in Sources */,
+ C585A6CC11D4FB3D004C3E4B /* IDBAny.cpp in Sources */,
+ C585A66211D4FAC5004C3E4B /* IDBBindingUtilities.cpp in Sources */,
+ C585A6D511D4FB3D004C3E4B /* IDBDatabaseImpl.cpp in Sources */,
+ C585A6D711D4FB3D004C3E4B /* IDBDatabaseRequest.cpp in Sources */,
+ C585A6DA11D4FB3D004C3E4B /* IDBErrorEvent.cpp in Sources */,
+ C585A6DD11D4FB3D004C3E4B /* IDBEvent.cpp in Sources */,
+ C585A6E111D4FB3D004C3E4B /* IDBIndexImpl.cpp in Sources */,
+ C585A6E311D4FB3D004C3E4B /* IDBIndexRequest.cpp in Sources */,
+ C585A6E611D4FB3D004C3E4B /* IDBKey.cpp in Sources */,
+ C585A6E911D4FB3D004C3E4B /* IDBKeyRange.cpp in Sources */,
+ C585A6EE11D4FB3D004C3E4B /* IDBObjectStoreImpl.cpp in Sources */,
+ C585A6F011D4FB3D004C3E4B /* IDBObjectStoreRequest.cpp in Sources */,
+ C585A6F311D4FB3D004C3E4B /* IDBRequest.cpp in Sources */,
+ C585A6F611D4FB3D004C3E4B /* IDBSuccessEvent.cpp in Sources */,
1A71D57B0F33819000F9CE4E /* IdentifierRep.cpp in Sources */,
B275356F0B053814002CE64F /* Image.cpp in Sources */,
B2A10B940B3818D700099AA4 /* ImageBufferCG.cpp in Sources */,
@@ -20807,6 +20894,9 @@
4B3480930EEF50D400AC1B41 /* ImageSourceCGMac.mm in Sources */,
316FE1170E6E1DA700BF6088 /* ImplicitAnimation.cpp in Sources */,
DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */,
+ C585A6F911D4FB3D004C3E4B /* IndexedDatabase.cpp in Sources */,
+ C585A6FB11D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp in Sources */,
+ C585A6FD11D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp in Sources */,
F3644AFF1119805900E0D537 /* InjectedScript.cpp in Sources */,
7A0E76F910BF08ED00A0276E /* InjectedScriptHost.cpp in Sources */,
A8CFF5E60A155A05000A4234 /* InlineBox.cpp in Sources */,
@@ -20819,6 +20909,7 @@
93309DED099E64920056E581 /* InsertNodeBeforeCommand.cpp in Sources */,
93309DEF099E64920056E581 /* InsertParagraphSeparatorCommand.cpp in Sources */,
93309DF1099E64920056E581 /* InsertTextCommand.cpp in Sources */,
+ B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */,
7A74ECBA101839A600BF939E /* InspectorBackend.cpp in Sources */,
1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
82B6589A1189E47600E052A1 /* InspectorCSSStore.cpp in Sources */,
@@ -20925,6 +21016,7 @@
4162A454101145E300DFF3ED /* JSDedicatedWorkerContextCustom.cpp in Sources */,
33503CC010179C1A003B47E1 /* JSDesktopNotificationsCustom.cpp in Sources */,
59A86006119DAF7F00DEF1EF /* JSDeviceOrientationEvent.cpp in Sources */,
+ 590E1B4B11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp in Sources */,
659DDC8209E198BA001BF3C6 /* JSDocument.cpp in Sources */,
49C7BA8D1042F5B10009D447 /* JSDocumentCustom.cpp in Sources */,
1A494EDE0A123F4C00FDAFC1 /* JSDocumentFragment.cpp in Sources */,
@@ -20937,7 +21029,14 @@
2E0888E6114884E200AF4265 /* JSDOMFormDataCustom.cpp in Sources */,
E1C36CBD0EB08062007410BC /* JSDOMGlobalObject.cpp in Sources */,
65DF31F709D1CC60000BE325 /* JSDOMImplementation.cpp in Sources */,
+ A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */,
+ A9D248080D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp in Sources */,
+ A9C6E6470D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp in Sources */,
1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */,
+ A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */,
+ A9D248000D757E6900FDF959 /* JSDOMPluginArray.cpp in Sources */,
+ A9C6E64C0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp in Sources */,
+ A9C6E64D0D7465E7006442E9 /* JSDOMPluginCustom.cpp in Sources */,
BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */,
C5137CF211A58378004ADB99 /* JSDOMStringList.cpp in Sources */,
BC64649711D82349006455B0 /* JSDOMStringMap.cpp in Sources */,
@@ -21059,9 +21158,24 @@
A80E7B130A19D606007FB8C5 /* JSHTMLTitleElement.cpp in Sources */,
1A85B2100A1B258700D8C87C /* JSHTMLUListElement.cpp in Sources */,
E44614160CD6826900FADA75 /* JSHTMLVideoElement.cpp in Sources */,
+ C585A67C11D4FB08004C3E4B /* JSIDBAny.cpp in Sources */,
+ C585A65E11D4FAB2004C3E4B /* JSIDBAnyCustom.cpp in Sources */,
+ C585A67E11D4FB08004C3E4B /* JSIDBDatabaseError.cpp in Sources */,
+ C585A68011D4FB08004C3E4B /* JSIDBDatabaseException.cpp in Sources */,
+ C585A68211D4FB08004C3E4B /* JSIDBDatabaseRequest.cpp in Sources */,
+ C585A68411D4FB08004C3E4B /* JSIDBErrorEvent.cpp in Sources */,
+ C585A68611D4FB08004C3E4B /* JSIDBEvent.cpp in Sources */,
+ C585A68811D4FB08004C3E4B /* JSIDBIndexRequest.cpp in Sources */,
+ C585A68A11D4FB08004C3E4B /* JSIDBKey.cpp in Sources */,
+ C585A65F11D4FAB2004C3E4B /* JSIDBKeyCustom.cpp in Sources */,
+ C585A68C11D4FB08004C3E4B /* JSIDBKeyRange.cpp in Sources */,
+ C585A68E11D4FB08004C3E4B /* JSIDBObjectStoreRequest.cpp in Sources */,
+ C585A69011D4FB08004C3E4B /* JSIDBRequest.cpp in Sources */,
+ C585A69211D4FB08004C3E4B /* JSIDBSuccessEvent.cpp in Sources */,
BC6C49F30D7DBA0500FFA558 /* JSImageConstructor.cpp in Sources */,
A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */,
A7D0318E0E93540300E24ACD /* JSImageDataCustom.cpp in Sources */,
+ C585A69611D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp in Sources */,
7A0E76DA10BF059800A0276E /* JSInjectedScriptHost.cpp in Sources */,
7A0E76D510BF050700A0276E /* JSInjectedScriptHostCustom.cpp in Sources */,
41F060CD0F5EEB2B00A07EAC /* JSInspectorBackend.cpp in Sources */,
@@ -21089,13 +21203,11 @@
410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */,
E1ADEDDB0E76BD93004A1A5E /* JSMessagePort.cpp in Sources */,
E1ADED470E76B8DD004A1A5E /* JSMessagePortCustom.cpp in Sources */,
- A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */,
- A9D248080D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp in Sources */,
- A9C6E6470D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp in Sources */,
A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */,
65DF31FB09D1CC60000BE325 /* JSMutationEvent.cpp in Sources */,
BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */,
BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */,
+ 8A9A587011E84C36008ACFD1 /* JSNavigation.cpp in Sources */,
A9D247F70D757E3400FDF959 /* JSNavigator.cpp in Sources */,
A9C6E6490D7465D8006442E9 /* JSNavigatorCustom.cpp in Sources */,
14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */,
@@ -21113,10 +21225,7 @@
A826EC480A1B0CBE00CD1BB6 /* JSOptionConstructor.cpp in Sources */,
1A0D57400A5C7867007EDD4C /* JSOverflowEvent.cpp in Sources */,
E1284BB210449FFA00EAEB52 /* JSPageTransitionEvent.cpp in Sources */,
- A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */,
- A9D248000D757E6900FDF959 /* JSDOMPluginArray.cpp in Sources */,
- A9C6E64C0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp in Sources */,
- A9C6E64D0D7465E7006442E9 /* JSDOMPluginCustom.cpp in Sources */,
+ 8A9A587411E84C81008ACFD1 /* JSPerformance.cpp in Sources */,
93B70D6B09EB0C7C009D8468 /* JSPluginElementFunctions.cpp in Sources */,
5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */,
5189F01810B3781300F3C739 /* JSPopStateEventCustom.cpp in Sources */,
@@ -21302,6 +21411,7 @@
933A14B80B7D1D5200A53FFD /* JSTextEvent.cpp in Sources */,
BCEF45F50E687B5C001C1287 /* JSTextMetrics.cpp in Sources */,
E446141A0CD6826900FADA75 /* JSTimeRanges.cpp in Sources */,
+ 8A9A588711E84F37008ACFD1 /* JSTiming.cpp in Sources */,
1A750D5C0A90DEE1000FF215 /* JSTreeWalker.cpp in Sources */,
516BB7940CE91E6800512F79 /* JSTreeWalkerCustom.cpp in Sources */,
A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */,
@@ -21376,6 +21486,7 @@
512DD8F40D91E6AF000F89EE /* LegacyWebArchive.cpp in Sources */,
51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */,
BCE65BEA0EACDF16007E4533 /* Length.cpp in Sources */,
+ 89B5EAA111E8003D00F2367E /* LineEnding.cpp in Sources */,
A7AD2F870EC89D07008AB002 /* LinkHash.cpp in Sources */,
BCB16C2C0979C3BD00467741 /* loader.cpp in Sources */,
656D37330ADBA5DE00A4554D /* LoaderNSURLExtras.mm in Sources */,
@@ -21412,8 +21523,6 @@
75793E830D0CE0B3007FC0AC /* MessageEvent.cpp in Sources */,
E1ADECC00E76ACF1004A1A5E /* MessagePort.cpp in Sources */,
41BF700B0FE86F49005E8DEC /* MessagePortChannel.cpp in Sources */,
- A9C6E4E30D745E05006442E9 /* DOMMimeType.cpp in Sources */,
- A9C6E4E70D745E18006442E9 /* DOMMimeTypeArray.cpp in Sources */,
BC772C4E0C4EB3040083285F /* MIMETypeRegistry.cpp in Sources */,
BC772C5E0C4EB3440083285F /* MIMETypeRegistryMac.mm in Sources */,
C6D74AE409AA290A000B0A52 /* ModifySelectionListLevel.cpp in Sources */,
@@ -21478,14 +21587,11 @@
935C477109AC4D7300A6AAB4 /* PlatformMouseEventMac.mm in Sources */,
BC94D1080C274F88006BC617 /* PlatformScreenMac.mm in Sources */,
1AD8F81C11CAB9E900E93E54 /* PlatformStrategies.cpp in Sources */,
- A9C6E4EB0D745E2B006442E9 /* DOMPlugin.cpp in Sources */,
- A9C6E4EF0D745E38006442E9 /* DOMPluginArray.cpp in Sources */,
A9C6E4F30D745E48006442E9 /* PluginData.cpp in Sources */,
1AC694C70A3B1676003F5049 /* PluginDocument.cpp in Sources */,
7693BAD3106C2DCA007B0823 /* PluginHalter.cpp in Sources */,
1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */,
76FF17E311235673001D61B5 /* PluginViewNone.cpp in Sources */,
- 0AFDAC3B10F5448300E1F3D2 /* PluginWidgetMac.mm in Sources */,
B2B1F7160D00CAA8004AEA64 /* PointerEventsHitRules.cpp in Sources */,
97059977107D975200A50A7C /* PolicyCallback.cpp in Sources */,
97059979107D975200A50A7C /* PolicyChecker.cpp in Sources */,
@@ -21504,6 +21610,7 @@
979F43D31075E44A0000F83B /* RedirectScheduler.cpp in Sources */,
85031B4B0A44EFC700F992E0 /* RegisteredEventListener.cpp in Sources */,
B2C3DA2C0D006C1D00EF6F26 /* RegularExpression.cpp in Sources */,
+ 4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend.cpp in Sources */,
93309E00099E64920056E581 /* RemoveCSSPropertyCommand.cpp in Sources */,
D06C0D900CFD11460065F43F /* RemoveFormatCommand.cpp in Sources */,
93309E04099E64920056E581 /* RemoveNodeCommand.cpp in Sources */,
@@ -21705,6 +21812,7 @@
84A81F410FC7E02700955300 /* SourceGraphic.cpp in Sources */,
D01A27AD10C9BFD800026A42 /* SpaceSplitString.cpp in Sources */,
626CDE0E1140424C001E5A68 /* SpatialNavigation.cpp in Sources */,
+ 7578F90B11DDF26900D933C5 /* SpeechInput.cpp in Sources */,
93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */,
93309E13099E64920056E581 /* SplitTextNodeCommand.cpp in Sources */,
93309E15099E64920056E581 /* SplitTextNodeContainingElementCommand.cpp in Sources */,
@@ -21716,6 +21824,7 @@
519611730CAC56570010A80C /* SQLResultSet.cpp in Sources */,
1AFE117D0CBFFB36003017FA /* SQLResultSetRowList.cpp in Sources */,
515B039A0CD1642A00B7EA9C /* SQLStatement.cpp in Sources */,
+ B550B52511DC68A800923885 /* SQLStatementSync.cpp in Sources */,
1ABFE7530CD968D000FE4834 /* SQLTransaction.cpp in Sources */,
B51BF6F0102C9E590002C15A /* SQLTransactionClient.cpp in Sources */,
B5C1123B102B6C4600096578 /* SQLTransactionCoordinator.cpp in Sources */,
@@ -21872,7 +21981,9 @@
B2227A500D00BF220071B782 /* SVGNumberList.cpp in Sources */,
B2227A530D00BF220071B782 /* SVGPaint.cpp in Sources */,
B2227A560D00BF220071B782 /* SVGParserUtilities.cpp in Sources */,
+ 8476C9EA11DF6A2900555B02 /* SVGPathBuilder.cpp in Sources */,
B2227A580D00BF220071B782 /* SVGPathElement.cpp in Sources */,
+ 8476C9EF11DF6A5800555B02 /* SVGPathParser.cpp in Sources */,
B2227A5D0D00BF220071B782 /* SVGPathSegArc.cpp in Sources */,
B2227A610D00BF220071B782 /* SVGPathSegClosePath.cpp in Sources */,
B2227A640D00BF220071B782 /* SVGPathSegCurvetoCubic.cpp in Sources */,
@@ -21883,6 +21994,7 @@
B2227A770D00BF220071B782 /* SVGPathSegLinetoHorizontal.cpp in Sources */,
B2227A7C0D00BF220071B782 /* SVGPathSegLinetoVertical.cpp in Sources */,
B2227A800D00BF220071B782 /* SVGPathSegList.cpp in Sources */,
+ 8476C9E511DF6A0B00555B02 /* SVGPathSegListBuilder.cpp in Sources */,
B2227A830D00BF220071B782 /* SVGPathSegMoveto.cpp in Sources */,
B2227A870D00BF220071B782 /* SVGPatternElement.cpp in Sources */,
B2227A8B0D00BF220071B782 /* SVGPointList.cpp in Sources */,
@@ -22113,46 +22225,7 @@
93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
- B885E8D411E06DD2009FFBF4 /* InspectorApplicationCacheAgent.cpp in Sources */,
- BCA8C81F11E3D36900812FB7 /* BackForwardController.cpp in Sources */,
- 4F4F5FFB11CBD2E100A186BF /* RemoteInspectorFrontend2.cpp in Sources */,
- 97EF561011E40783007E026F /* HTMLConstructionSite.cpp in Sources */,
- BCA8CA5F11E4E6D100812FB7 /* BackForwardListImpl.cpp in Sources */,
- 8A9A587011E84C36008ACFD1 /* JSNavigation.cpp in Sources */,
- 8A9A587411E84C81008ACFD1 /* JSPerformance.cpp in Sources */,
- 8A9A588711E84F37008ACFD1 /* JSTiming.cpp in Sources */,
- C585A65E11D4FAB2004C3E4B /* JSIDBAnyCustom.cpp in Sources */,
- C585A65F11D4FAB2004C3E4B /* JSIDBKeyCustom.cpp in Sources */,
- C585A66211D4FAC5004C3E4B /* IDBBindingUtilities.cpp in Sources */,
- C585A67C11D4FB08004C3E4B /* JSIDBAny.cpp in Sources */,
- C585A67E11D4FB08004C3E4B /* JSIDBDatabaseError.cpp in Sources */,
- C585A68011D4FB08004C3E4B /* JSIDBDatabaseException.cpp in Sources */,
- C585A68211D4FB08004C3E4B /* JSIDBDatabaseRequest.cpp in Sources */,
- C585A68411D4FB08004C3E4B /* JSIDBErrorEvent.cpp in Sources */,
- C585A68611D4FB08004C3E4B /* JSIDBEvent.cpp in Sources */,
- C585A68811D4FB08004C3E4B /* JSIDBIndexRequest.cpp in Sources */,
- C585A68A11D4FB08004C3E4B /* JSIDBKey.cpp in Sources */,
- C585A68C11D4FB08004C3E4B /* JSIDBKeyRange.cpp in Sources */,
- C585A68E11D4FB08004C3E4B /* JSIDBObjectStoreRequest.cpp in Sources */,
- C585A69011D4FB08004C3E4B /* JSIDBRequest.cpp in Sources */,
- C585A69211D4FB08004C3E4B /* JSIDBSuccessEvent.cpp in Sources */,
- C585A69611D4FB13004C3E4B /* JSIndexedDatabaseRequest.cpp in Sources */,
- C585A6CC11D4FB3D004C3E4B /* IDBAny.cpp in Sources */,
- C585A6D511D4FB3D004C3E4B /* IDBDatabaseImpl.cpp in Sources */,
- C585A6D711D4FB3D004C3E4B /* IDBDatabaseRequest.cpp in Sources */,
- C585A6DA11D4FB3D004C3E4B /* IDBErrorEvent.cpp in Sources */,
- C585A6DD11D4FB3D004C3E4B /* IDBEvent.cpp in Sources */,
- C585A6E111D4FB3D004C3E4B /* IDBIndexImpl.cpp in Sources */,
- C585A6E311D4FB3D004C3E4B /* IDBIndexRequest.cpp in Sources */,
- C585A6E611D4FB3D004C3E4B /* IDBKey.cpp in Sources */,
- C585A6E911D4FB3D004C3E4B /* IDBKeyRange.cpp in Sources */,
- C585A6EE11D4FB3D004C3E4B /* IDBObjectStoreImpl.cpp in Sources */,
- C585A6F011D4FB3D004C3E4B /* IDBObjectStoreRequest.cpp in Sources */,
- C585A6F311D4FB3D004C3E4B /* IDBRequest.cpp in Sources */,
- C585A6F611D4FB3D004C3E4B /* IDBSuccessEvent.cpp in Sources */,
- C585A6F911D4FB3D004C3E4B /* IndexedDatabase.cpp in Sources */,
- C585A6FB11D4FB3D004C3E4B /* IndexedDatabaseImpl.cpp in Sources */,
- C585A6FD11D4FB3D004C3E4B /* IndexedDatabaseRequest.cpp in Sources */,
+ 8C6EA61911EF7E0400FD8EE3 /* RuntimeEnabledFeatures.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/WebCorePrefix.h b/WebCore/WebCorePrefix.h
index db79bad..cde5a85 100644
--- a/WebCore/WebCorePrefix.h
+++ b/WebCore/WebCorePrefix.h
@@ -133,12 +133,20 @@
#include <windows.h>
#include <stdio.h>
#else
-#include <CoreServices/CoreServices.h>
#if defined(WIN32) || defined(_WIN32)
-/* Including CoreServices.h on Windows doesn't include CFNetwork.h, so we do
+// FIXME <rdar://problem/8208868> Remove support for obsolete ColorSync API, CoreServices header in CoreGraphics
+// We can remove this once the new ColorSync APIs are available in an internal Safari SDK.
+#include <ColorSync/ColorSync.h>
+#ifdef __COLORSYNCDEPRECATED__
+#define COREGRAPHICS_INCLUDES_CORESERVICES_HEADER
+#define OBSOLETE_COLORSYNC_API
+#endif
+/* Windows doesn't include CFNetwork.h via CoreServices.h, so we do
it explicitly here to make Windows more consistent with Mac. */
#include <CFNetwork/CFNetwork.h>
+#else
+#include <CoreServices/CoreServices.h>
#endif
#endif
diff --git a/WebCore/accessibility/AccessibilityImageMapLink.cpp b/WebCore/accessibility/AccessibilityImageMapLink.cpp
index 2eac8d3..924ba21 100644
--- a/WebCore/accessibility/AccessibilityImageMapLink.cpp
+++ b/WebCore/accessibility/AccessibilityImageMapLink.cpp
@@ -73,7 +73,7 @@ AccessibilityRole AccessibilityImageMapLink::roleValue() const
if (!m_areaElement)
return WebCoreLinkRole;
- const AtomicString& ariaRole = m_areaElement->getAttribute(roleAttr);
+ const AtomicString& ariaRole = getAttribute(roleAttr);
if (!ariaRole.isEmpty())
return AccessibilityObject::ariaRoleToWebCoreRole(ariaRole);
@@ -100,13 +100,10 @@ KURL AccessibilityImageMapLink::url() const
String AccessibilityImageMapLink::accessibilityDescription() const
{
- if (!m_areaElement)
- return String();
-
- const AtomicString& ariaLabel = m_areaElement->getAttribute(aria_labelAttr);
+ const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
if (!ariaLabel.isEmpty())
return ariaLabel;
- const AtomicString& alt = m_areaElement->getAttribute(altAttr);
+ const AtomicString& alt = getAttribute(altAttr);
if (!alt.isEmpty())
return alt;
@@ -115,13 +112,10 @@ String AccessibilityImageMapLink::accessibilityDescription() const
String AccessibilityImageMapLink::title() const
{
- if (!m_areaElement)
- return String();
-
- const AtomicString& title = m_areaElement->getAttribute(titleAttr);
+ const AtomicString& title = getAttribute(titleAttr);
if (!title.isEmpty())
return title;
- const AtomicString& summary = m_areaElement->getAttribute(summaryAttr);
+ const AtomicString& summary = getAttribute(summaryAttr);
if (!summary.isEmpty())
return summary;
diff --git a/WebCore/accessibility/AccessibilityImageMapLink.h b/WebCore/accessibility/AccessibilityImageMapLink.h
index ca4c62c..e2e1544 100644
--- a/WebCore/accessibility/AccessibilityImageMapLink.h
+++ b/WebCore/accessibility/AccessibilityImageMapLink.h
@@ -49,6 +49,7 @@ public:
void setHTMLMapElement(HTMLMapElement* element) { m_mapElement = element; }
HTMLMapElement* mapElement() const { return m_mapElement; }
+ virtual Node* node() const { return m_areaElement; }
void setParent(AccessibilityObject* parent) { m_parent = parent; }
virtual AccessibilityRole roleValue() const;
diff --git a/WebCore/accessibility/AccessibilityListBoxOption.cpp b/WebCore/accessibility/AccessibilityListBoxOption.cpp
index 57519e3..3e4dad9 100644
--- a/WebCore/accessibility/AccessibilityListBoxOption.cpp
+++ b/WebCore/accessibility/AccessibilityListBoxOption.cpp
@@ -110,17 +110,12 @@ bool AccessibilityListBoxOption::accessibilityIsIgnored() const
if (!m_optionElement)
return true;
- if (equalIgnoringCase(getAttribute(m_optionElement, aria_hiddenAttr), "true"))
+ if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "true"))
return true;
return parentObject()->accessibilityIsIgnored();
}
-String AccessibilityListBoxOption::language() const
-{
- return AccessibilityObject::language(m_optionElement);
-}
-
bool AccessibilityListBoxOption::canSetSelectedAttribute() const
{
if (!m_optionElement)
@@ -144,7 +139,7 @@ String AccessibilityListBoxOption::stringValue() const
if (!m_optionElement)
return String();
- const AtomicString& ariaLabel = getAttribute(m_optionElement, aria_labelAttr);
+ const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
if (!ariaLabel.isNull())
return ariaLabel;
diff --git a/WebCore/accessibility/AccessibilityListBoxOption.h b/WebCore/accessibility/AccessibilityListBoxOption.h
index 1da77e7..c4c9315 100644
--- a/WebCore/accessibility/AccessibilityListBoxOption.h
+++ b/WebCore/accessibility/AccessibilityListBoxOption.h
@@ -56,7 +56,7 @@ public:
virtual bool isEnabled() const;
virtual String stringValue() const;
virtual Element* actionElement() const;
-
+ virtual Node* node() const { return m_optionElement; }
virtual void setSelected(bool);
virtual bool canSetSelectedAttribute() const;
@@ -68,7 +68,6 @@ public:
private:
HTMLElement* m_optionElement;
- virtual String language() const;
virtual bool canHaveChildren() const { return false; }
HTMLSelectElement* listBoxOptionParentNode() const;
int listBoxOptionIndex() const;
diff --git a/WebCore/accessibility/AccessibilityObject.cpp b/WebCore/accessibility/AccessibilityObject.cpp
index 555ba6f..bc4e2f5 100644
--- a/WebCore/accessibility/AccessibilityObject.cpp
+++ b/WebCore/accessibility/AccessibilityObject.cpp
@@ -148,17 +148,12 @@ bool AccessibilityObject::press() const
return true;
}
-String AccessibilityObject::language(Node* node) const
-{
- const AtomicString& lang = getAttribute(node, langAttr);
- if (lang.isEmpty())
- return AccessibilityObject::language();
-
- return lang;
-}
-
String AccessibilityObject::language() const
{
+ const AtomicString& lang = getAttribute(langAttr);
+ if (!lang.isEmpty())
+ return lang;
+
AccessibilityObject* parent = parentObject();
// as a last resort, fall back to the content language specified in the meta tag
@@ -166,7 +161,7 @@ String AccessibilityObject::language() const
Document* doc = document();
if (doc)
return doc->contentLanguage();
- return String();
+ return nullAtom;
}
return parent->language();
@@ -403,7 +398,7 @@ static bool replacedNodeNeedsCharacter(Node* replacedNode)
}
// Finds a RenderListItem parent give a node.
-RenderListItem* AccessibilityObject::renderListItemContainerForNode(Node* node) const
+static RenderListItem* renderListItemContainerForNode(Node* node)
{
for (Node* stringNode = node; stringNode; stringNode = stringNode->parent()) {
RenderObject* renderObject = stringNode->renderer();
@@ -844,15 +839,16 @@ const String& AccessibilityObject::actionVerb() const
}
}
-const AtomicString& AccessibilityObject::getAttribute(Node* node, const QualifiedName& attribute)
+const AtomicString& AccessibilityObject::getAttribute(const QualifiedName& attribute) const
{
- if (!node)
+ Node* elementNode = node();
+ if (!elementNode)
return nullAtom;
- if (!node->isElementNode())
+ if (!elementNode->isElementNode())
return nullAtom;
- Element* element = static_cast<Element*>(node);
+ Element* element = static_cast<Element*>(elementNode);
return element->getAttribute(attribute);
}
@@ -980,6 +976,32 @@ bool AccessibilityObject::supportsARIALiveRegion() const
const AtomicString& liveRegion = ariaLiveRegionStatus();
return equalIgnoringCase(liveRegion, "polite") || equalIgnoringCase(liveRegion, "assertive");
}
+
+int AccessibilityObject::intValue() const
+{
+ if (isPasswordField())
+ return 0;
+
+ if (isHeading())
+ return headingLevel();
+
+ // If this is a real checkbox or radio button, AccessibilityRenderObject will handle.
+ // If it's an ARIA checkbox or radio, the aria-checked attribute should be used.
+ if (isCheckboxOrRadio())
+ return equalIgnoringCase(getAttribute(aria_checkedAttr), "true");
+
+ return 0;
+}
+bool AccessibilityObject::hasIntValue() const
+{
+ if (isHeading())
+ return true;
+
+ if (isCheckboxOrRadio())
+ return true;
+
+ return false;
+}
} // namespace WebCore
diff --git a/WebCore/accessibility/AccessibilityObject.h b/WebCore/accessibility/AccessibilityObject.h
index 3c8d392..400a200 100644
--- a/WebCore/accessibility/AccessibilityObject.h
+++ b/WebCore/accessibility/AccessibilityObject.h
@@ -264,7 +264,8 @@ public:
virtual bool isTextControl() const { return false; }
virtual bool isNativeTextControl() const { return false; }
virtual bool isWebArea() const { return false; }
- virtual bool isCheckboxOrRadio() const { return false; }
+ virtual bool isCheckbox() const { return roleValue() == CheckBoxRole; }
+ virtual bool isRadioButton() const { return roleValue() == RadioButtonRole; }
virtual bool isListBox() const { return roleValue() == ListBoxRole; }
virtual bool isMediaTimeline() const { return false; }
virtual bool isMenuRelated() const { return false; }
@@ -298,6 +299,7 @@ public:
bool isScrollbar() const { return roleValue() == ScrollBarRole; }
bool isButton() const { return roleValue() == ButtonRole; }
bool isListItem() const { return roleValue() == ListItemRole; }
+ bool isCheckboxOrRadio() const { return isCheckbox() || isRadioButton(); }
virtual bool isChecked() const { return false; }
virtual bool isEnabled() const { return false; }
@@ -325,16 +327,17 @@ public:
virtual bool canSetSelectedChildrenAttribute() const { return false; }
virtual bool canSetExpandedAttribute() const { return false; }
- virtual bool hasIntValue() const { return false; }
-
+ bool hasIntValue() const;
+ virtual int intValue() const;
+
// A programmatic way to set a name on an AccessibleObject.
virtual void setAccessibleName(String&) { }
+ virtual Node* node() const { return 0; }
bool accessibilityShouldUseUniqueId() const { return true; }
virtual bool accessibilityIsIgnored() const { return true; }
virtual int headingLevel() const { return 0; }
- virtual int intValue() const { return 0; }
virtual String valueDescription() const { return String(); }
virtual float valueForRange() const { return 0.0f; }
virtual float maxValueForRange() const { return 0.0f; }
@@ -419,8 +422,7 @@ public:
virtual Document* document() const { return 0; }
virtual FrameView* topDocumentFrameView() const { return 0; }
virtual FrameView* documentFrameView() const;
- virtual String language() const;
- String language(Node*) const;
+ String language() const;
virtual unsigned hierarchicalLevel() const { return 0; }
virtual void setFocused(bool) { }
@@ -454,7 +456,7 @@ public:
virtual void handleAriaExpandedChanged() { }
static AccessibilityRole ariaRoleToWebCoreRole(const String&);
- static const AtomicString& getAttribute(Node*, const QualifiedName&);
+ const AtomicString& getAttribute(const QualifiedName&) const;
virtual VisiblePositionRange visiblePositionRange() const { return VisiblePositionRange(); }
virtual VisiblePositionRange visiblePositionRangeForLine(unsigned) const { return VisiblePositionRange(); }
@@ -564,7 +566,6 @@ protected:
virtual void clearChildren();
virtual bool isDetached() const { return true; }
- RenderListItem* renderListItemContainerForNode(Node* node) const;
#if PLATFORM(MAC)
RetainPtr<AccessibilityObjectWrapper> m_wrapper;
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 2e53703..1b3c461 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -476,12 +476,6 @@ bool AccessibilityRenderObject::isPasswordField() const
return inputElement->isPasswordField();
}
-
-bool AccessibilityRenderObject::isCheckboxOrRadio() const
-{
- AccessibilityRole role = roleValue();
- return role == RadioButtonRole || role == CheckBoxRole;
-}
bool AccessibilityRenderObject::isFileUploadButton() const
{
@@ -660,36 +654,29 @@ bool AccessibilityRenderObject::isOffScreen() const
int AccessibilityRenderObject::headingLevel() const
{
// headings can be in block flow and non-block flow
- if (!m_renderer)
- return 0;
-
- Node* node = m_renderer->node();
- if (!node)
+ Node* element = node();
+ if (!element)
return 0;
- if (ariaRoleAttribute() == HeadingRole) {
- if (!node->isElementNode())
- return 0;
- Element* element = static_cast<Element*>(node);
- return element->getAttribute(aria_levelAttr).toInt();
- }
+ if (ariaRoleAttribute() == HeadingRole)
+ return getAttribute(aria_levelAttr).toInt();
- if (node->hasTagName(h1Tag))
+ if (element->hasTagName(h1Tag))
return 1;
- if (node->hasTagName(h2Tag))
+ if (element->hasTagName(h2Tag))
return 2;
- if (node->hasTagName(h3Tag))
+ if (element->hasTagName(h3Tag))
return 3;
- if (node->hasTagName(h4Tag))
+ if (element->hasTagName(h4Tag))
return 4;
- if (node->hasTagName(h5Tag))
+ if (element->hasTagName(h5Tag))
return 5;
- if (node->hasTagName(h6Tag))
+ if (element->hasTagName(h6Tag))
return 6;
return 0;
@@ -760,11 +747,6 @@ AccessibilityObject* AccessibilityRenderObject::selectedTabItem()
}
return 0;
}
-
-const AtomicString& AccessibilityRenderObject::getAttribute(const QualifiedName& attribute) const
-{
- return AccessibilityObject::getAttribute(m_renderer->node(), attribute);
-}
Element* AccessibilityRenderObject::anchorElement() const
{
@@ -990,14 +972,6 @@ unsigned AccessibilityRenderObject::hierarchicalLevel() const
return level;
}
-
-String AccessibilityRenderObject::language() const
-{
- if (!m_renderer)
- return String();
-
- return AccessibilityObject::language(m_renderer->node());
-}
String AccessibilityRenderObject::textUnderElement() const
{
@@ -1030,38 +1004,17 @@ String AccessibilityRenderObject::textUnderElement() const
return String();
}
-bool AccessibilityRenderObject::hasIntValue() const
-{
- if (isHeading())
- return true;
-
- if (m_renderer->node() && isCheckboxOrRadio())
- return true;
+Node* AccessibilityRenderObject::node() const
+{
+ return m_renderer ? m_renderer->node() : 0;
+}
- return false;
-}
-
int AccessibilityRenderObject::intValue() const
{
- if (!m_renderer || isPasswordField())
- return 0;
-
- if (isHeading())
- return headingLevel();
-
- Node* node = m_renderer->node();
- if (!node || !isCheckboxOrRadio())
- return 0;
+ if (isCheckboxOrRadio())
+ return isChecked() ? 1 : 0;
- // If this is an ARIA checkbox or radio, check the aria-checked attribute rather than node()->checked()
- AccessibilityRole ariaRole = ariaRoleAttribute();
- if (ariaRole == RadioButtonRole || ariaRole == CheckBoxRole) {
- if (equalIgnoringCase(getAttribute(aria_checkedAttr), "true"))
- return true;
- return false;
- }
-
- return static_cast<HTMLInputElement*>(node)->checked();
+ return AccessibilityObject::intValue();
}
String AccessibilityRenderObject::valueDescription() const
@@ -1122,9 +1075,11 @@ String AccessibilityRenderObject::stringValue() const
Element* selectedOption = 0;
if (selectedIndex >= 0 && selectedIndex < (int)listItems.size())
selectedOption = listItems[selectedIndex];
- String overridenDescription = AccessibilityObject::getAttribute(selectedOption, aria_labelAttr);
- if (!overridenDescription.isNull())
- return overridenDescription;
+ if (selectedOption) {
+ String overridenDescription = selectedOption->getAttribute(aria_labelAttr);
+ if (!overridenDescription.isNull())
+ return overridenDescription;
+ }
return toRenderMenuList(m_renderer)->text();
}
@@ -1364,9 +1319,11 @@ String AccessibilityRenderObject::accessibilityDescription() const
// Check if the HTML element has an aria-label for the webpage.
Element* documentElement = document->documentElement();
- const AtomicString& ariaLabel = AccessibilityObject::getAttribute(documentElement, aria_labelAttr);
- if (!ariaLabel.isEmpty())
- return ariaLabel;
+ if (documentElement) {
+ const AtomicString& ariaLabel = documentElement->getAttribute(aria_labelAttr);
+ if (!ariaLabel.isEmpty())
+ return ariaLabel;
+ }
Node* owner = document->ownerElement();
if (owner) {
@@ -1397,8 +1354,10 @@ IntRect AccessibilityRenderObject::boundingBoxRect() const
if (obj->node()) // If we are a continuation, we want to make sure to use the primary renderer.
obj = obj->node()->renderer();
+ // absoluteFocusRingQuads will query the hierarchy below this element, which for large webpages can be very slow.
+ // For a web area, which will have the most elements of any element, absoluteQuads should be used.
Vector<FloatQuad> quads;
- if (obj->isText())
+ if (obj->isText() || isWebArea())
obj->absoluteQuads(quads);
else
obj->absoluteFocusRingQuads(quads);
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index d4f798a..526324f 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -75,7 +75,6 @@ public:
virtual bool isTextControl() const;
virtual bool isNativeTextControl() const;
virtual bool isWebArea() const;
- virtual bool isCheckboxOrRadio() const;
virtual bool isFileUploadButton() const;
virtual bool isInputImage() const;
virtual bool isProgressIndicator() const;
@@ -106,14 +105,11 @@ public:
virtual bool isExpanded() const;
virtual void setIsExpanded(bool);
- const AtomicString& getAttribute(const QualifiedName&) const;
virtual bool canSetFocusAttribute() const;
virtual bool canSetTextRangeAttributes() const;
virtual bool canSetValueAttribute() const;
virtual bool canSetExpandedAttribute() const;
- virtual bool hasIntValue() const;
-
virtual void setAccessibleName(String&);
// Provides common logic used by all elements when determining isIgnored.
@@ -169,10 +165,7 @@ public:
void setRenderer(RenderObject* renderer) { m_renderer = renderer; }
RenderObject* renderer() const { return m_renderer; }
- Node* node() const
- {
- return m_renderer ? m_renderer->node() : 0;
- };
+ virtual Node* node() const;
RenderView* topRenderer() const;
RenderTextControl* textControl() const;
@@ -283,7 +276,6 @@ private:
bool isAllowedChildOfTree() const;
bool hasTextAlternative() const;
String positionalDescriptionForMSAA() const;
- virtual String language() const;
Element* menuElementForMenuButton() const;
Element* menuItemElementForMenu() const;
diff --git a/WebCore/accessibility/AccessibilityTable.cpp b/WebCore/accessibility/AccessibilityTable.cpp
index 437ac38..a0bb655 100644
--- a/WebCore/accessibility/AccessibilityTable.cpp
+++ b/WebCore/accessibility/AccessibilityTable.cpp
@@ -137,6 +137,9 @@ bool AccessibilityTable::isTableExposableThroughAccessibility()
unsigned borderedCellCount = 0;
unsigned backgroundDifferenceCellCount = 0;
+ Color alternatingRowColors[5];
+ int alternatingRowColorCount = 0;
+
int headersInFirstColumnCount = 0;
for (int row = 0; row < numRows; ++row) {
@@ -189,6 +192,19 @@ bool AccessibilityTable::isTableExposableThroughAccessibility()
// if we've found 10 "good" cells, we don't need to keep searching
if (borderedCellCount >= 10 || backgroundDifferenceCellCount >= 10)
return true;
+
+ // For the first 5 rows, cache the background color so we can check if this table has zebra-striped rows.
+ if (row < 5 && row == alternatingRowColorCount) {
+ RenderObject* renderRow = cell->parent();
+ if (!renderRow || !renderRow->isTableRow())
+ continue;
+ RenderStyle* rowRenderStyle = renderRow->style();
+ if (!rowRenderStyle)
+ continue;
+ Color rowColor = rowRenderStyle->visitedDependentColor(CSSPropertyBackgroundColor);
+ alternatingRowColors[alternatingRowColorCount] = rowColor;
+ alternatingRowColorCount++;
+ }
}
if (!row && headersInFirstRowCount == numCols && numCols > 1)
@@ -211,6 +227,20 @@ bool AccessibilityTable::isTableExposableThroughAccessibility()
if (backgroundDifferenceCellCount >= neededCellCount)
return true;
+ // Check if there is an alternating row background color indicating a zebra striped style pattern.
+ if (alternatingRowColorCount > 2) {
+ Color firstColor = alternatingRowColors[0];
+ for (int k = 1; k < alternatingRowColorCount; k++) {
+ // If an odd row was the same color as the first row, its not alternating.
+ if (k % 2 == 1 && alternatingRowColors[k] == firstColor)
+ return false;
+ // If an even row is not the same as the first row, its not alternating.
+ if (!(k % 2) && alternatingRowColors[k] != firstColor)
+ return false;
+ }
+ return true;
+ }
+
return false;
}
diff --git a/WebCore/accessibility/AccessibilityTableCell.cpp b/WebCore/accessibility/AccessibilityTableCell.cpp
index 7fadb88..28e66ad 100644
--- a/WebCore/accessibility/AccessibilityTableCell.cpp
+++ b/WebCore/accessibility/AccessibilityTableCell.cpp
@@ -73,7 +73,12 @@ AccessibilityObject* AccessibilityTableCell::parentTable() const
if (!m_renderer || !m_renderer->isTableCell())
return 0;
- return axObjectCache()->getOrCreate(toRenderTableCell(m_renderer)->table());
+ // Do not use getOrCreate. parentTable() can be called while the render tree is being modified
+ // by javascript, and creating a table element may try to access the render tree while in a bad state.
+ // By using only get() implies that the AXTable must be created before AXTableCells. This should
+ // always be the case when AT clients access a table.
+ // https://bugs.webkit.org/show_bug.cgi?id=42652
+ return axObjectCache()->get(toRenderTableCell(m_renderer)->table());
}
bool AccessibilityTableCell::isTableCell() const
diff --git a/WebCore/accessibility/AccessibilityTableColumn.cpp b/WebCore/accessibility/AccessibilityTableColumn.cpp
index 5872706..45137ff 100644
--- a/WebCore/accessibility/AccessibilityTableColumn.cpp
+++ b/WebCore/accessibility/AccessibilityTableColumn.cpp
@@ -130,6 +130,9 @@ AccessibilityObject* AccessibilityTableColumn::headerObjectForSection(RenderTabl
if (m_columnIndex >= numCols)
return 0;
+ if (!section->numRows())
+ return 0;
+
RenderTableCell* cell = 0;
// also account for cells that have a span
for (int testCol = m_columnIndex; testCol >= 0; --testCol) {
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
index 7d4e5c1..153f995 100644
--- a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
@@ -47,6 +47,7 @@ bool RuntimeEnabledFeatures::isIndexedDBEnabled = false;
bool RuntimeEnabledFeatures::isWebGLEnabled = false;
bool RuntimeEnabledFeatures::isPushStateEnabled = false;
bool RuntimeEnabledFeatures::isTouchEnabled = true;
+bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true;
#if ENABLE(VIDEO)
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.h b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
index 73bbf0f..d8eae23 100644
--- a/WebCore/bindings/generic/RuntimeEnabledFeatures.h
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
@@ -113,6 +113,11 @@ public:
static bool ontouchcancelEnabled() { return isTouchEnabled; }
#endif
+ static void setDeviceOrientationEnabled(bool isEnabled) { isDeviceOrientationEnabled = isEnabled; }
+ static bool deviceOrientationEnabled() { return isDeviceOrientationEnabled; }
+ static bool deviceOrientationEventEnabled() { return isDeviceOrientationEnabled; }
+ static bool ondeviceorientationEnabled() { return isDeviceOrientationEnabled; }
+
private:
// Never instantiate.
RuntimeEnabledFeatures() { }
@@ -126,6 +131,7 @@ private:
static bool isWebGLEnabled;
static bool isPushStateEnabled;
static bool isTouchEnabled;
+ static bool isDeviceOrientationEnabled;
};
} // namespace WebCore
diff --git a/WebCore/bindings/js/JSBindingsAllInOne.cpp b/WebCore/bindings/js/JSBindingsAllInOne.cpp
index 373c0e0..b517496 100644
--- a/WebCore/bindings/js/JSBindingsAllInOne.cpp
+++ b/WebCore/bindings/js/JSBindingsAllInOne.cpp
@@ -62,6 +62,7 @@
#include "JSDebugWrapperSet.cpp"
#include "JSDedicatedWorkerContextCustom.cpp"
#include "JSDesktopNotificationsCustom.cpp"
+#include "JSDeviceOrientationEventCustom.cpp"
#include "JSDocumentCustom.cpp"
#include "JSElementCustom.cpp"
#include "JSEventCustom.cpp"
diff --git a/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp b/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
index e88afc2..8221fed 100644
--- a/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
+++ b/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
@@ -51,10 +51,8 @@ static JSValue toJS(ExecState* exec, CanvasStyle* style)
return jsString(exec, style->color());
}
-static PassRefPtr<CanvasStyle> toHTMLCanvasStyle(ExecState* exec, JSValue value)
+static PassRefPtr<CanvasStyle> toHTMLCanvasStyle(ExecState*, JSValue value)
{
- if (value.isString())
- return CanvasStyle::create(ustringToString(asString(value)->value(exec)));
if (!value.isObject())
return 0;
JSObject* object = asObject(value);
@@ -74,6 +72,10 @@ JSValue JSCanvasRenderingContext2D::strokeStyle(ExecState* exec) const
void JSCanvasRenderingContext2D::setStrokeStyle(ExecState* exec, JSValue value)
{
CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
+ if (value.isString()) {
+ context->setStrokeColor(ustringToString(asString(value)->value(exec)));
+ return;
+ }
context->setStrokeStyle(toHTMLCanvasStyle(exec, value));
}
@@ -86,6 +88,10 @@ JSValue JSCanvasRenderingContext2D::fillStyle(ExecState* exec) const
void JSCanvasRenderingContext2D::setFillStyle(ExecState* exec, JSValue value)
{
CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
+ if (value.isString()) {
+ context->setFillColor(ustringToString(asString(value)->value(exec)));
+ return;
+ }
context->setFillStyle(toHTMLCanvasStyle(exec, value));
}
@@ -260,9 +266,8 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec)
return throwSyntaxError(exec);
}
#endif
- } else {
- setDOMException(exec, TYPE_MISMATCH_ERR);
- }
+ } else
+ return throwTypeError(exec);
return jsUndefined();
}
diff --git a/WebCore/bindings/js/JSConsoleCustom.cpp b/WebCore/bindings/js/JSConsoleCustom.cpp
index b9b407c..3ad34a3 100644
--- a/WebCore/bindings/js/JSConsoleCustom.cpp
+++ b/WebCore/bindings/js/JSConsoleCustom.cpp
@@ -28,9 +28,7 @@
#include "JSConsole.h"
#include "Console.h"
-#include "JSMemoryInfo.h"
#include "JSScriptProfile.h"
-#include "MemoryInfo.h"
#include "ScriptCallStack.h"
#include "ScriptProfile.h"
#include <runtime/JSArray.h>
@@ -57,9 +55,4 @@ JSValue JSConsole::profiles(ExecState* exec) const
#endif
-JSValue JSConsole::memory(ExecState* exec) const
-{
- return toJS(exec, MemoryInfo::create());
-}
-
} // namespace WebCore
diff --git a/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp b/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp
new file mode 100644
index 0000000..05f8755
--- /dev/null
+++ b/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSDeviceOrientationEvent.h"
+
+#if ENABLE(DEVICE_ORIENTATION)
+
+#include "DeviceOrientation.h"
+#include "DeviceOrientationEvent.h"
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue JSDeviceOrientationEvent::alpha(ExecState* exec) const
+{
+ DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+ if (!imp->orientation()->canProvideAlpha())
+ return jsNull();
+ return jsNumber(exec, imp->orientation()->alpha());
+}
+
+JSValue JSDeviceOrientationEvent::beta(ExecState* exec) const
+{
+ DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+ if (!imp->orientation()->canProvideBeta())
+ return jsNull();
+ return jsNumber(exec, imp->orientation()->beta());
+}
+
+JSValue JSDeviceOrientationEvent::gamma(ExecState* exec) const
+{
+ DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+ if (!imp->orientation()->canProvideGamma())
+ return jsNull();
+ return jsNumber(exec, imp->orientation()->gamma());
+}
+
+JSValue JSDeviceOrientationEvent::initDeviceOrientationEvent(ExecState* exec)
+{
+ const String& type = ustringToString(exec->argument(0).toString(exec));
+ bool bubbles = exec->argument(1).toBoolean(exec);
+ bool cancelable = exec->argument(2).toBoolean(exec);
+ // If alpha, beta or gamma are null or undefined, mark them as not provided.
+ // Otherwise, use the standard JavaScript conversion.
+ bool alphaProvided = !exec->argument(3).isUndefinedOrNull();
+ double alpha = exec->argument(3).toNumber(exec);
+ bool betaProvided = !exec->argument(4).isUndefinedOrNull();
+ double beta = exec->argument(4).toNumber(exec);
+ bool gammaProvided = !exec->argument(5).isUndefinedOrNull();
+ double gamma = exec->argument(5).toNumber(exec);
+ RefPtr<DeviceOrientation> orientation = DeviceOrientation::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma);
+ DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+ imp->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get());
+ return jsUndefined();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DEVICE_ORIENTATION)
diff --git a/WebCore/bindings/js/ScriptArray.cpp b/WebCore/bindings/js/ScriptArray.cpp
index caecc40..119d303 100644
--- a/WebCore/bindings/js/ScriptArray.cpp
+++ b/WebCore/bindings/js/ScriptArray.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "ScriptArray.h"
+#include "SerializedScriptValue.h"
+
#include <runtime/JSLock.h>
using namespace JSC;
@@ -62,6 +64,19 @@ bool ScriptArray::set(unsigned index, const ScriptObject& value)
return handleException(m_scriptState);
}
+bool ScriptArray::set(unsigned index, SerializedScriptValue* value)
+{
+ ScriptValue scriptValue = ScriptValue::deserialize(m_scriptState, value);
+ if (scriptValue.hasNoValue()) {
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+
+ JSLock lock(SilenceAssertionsOnly);
+ jsArray()->put(m_scriptState, index, scriptValue.jsValue());
+ return handleException(m_scriptState);
+}
+
bool ScriptArray::set(unsigned index, const String& value)
{
JSLock lock(SilenceAssertionsOnly);
diff --git a/WebCore/bindings/js/ScriptArray.h b/WebCore/bindings/js/ScriptArray.h
index 9240368..2badd09 100644
--- a/WebCore/bindings/js/ScriptArray.h
+++ b/WebCore/bindings/js/ScriptArray.h
@@ -37,23 +37,25 @@
#include <runtime/JSArray.h>
namespace WebCore {
-
- class ScriptArray : public ScriptObject {
- public:
- ScriptArray(ScriptState*, JSC::JSArray*);
- ScriptArray() {}
- JSC::JSArray* jsArray() const { return asArray(jsValue()); }
-
- bool set(unsigned index, const ScriptObject&);
- bool set(unsigned index, const String&);
- bool set(unsigned index, double);
- bool set(unsigned index, long long);
- bool set(unsigned index, int);
- bool set(unsigned index, bool);
- unsigned length();
-
- static ScriptArray createNew(ScriptState*);
- };
+class SerializedScriptValue;
+
+class ScriptArray : public ScriptObject {
+public:
+ ScriptArray(ScriptState*, JSC::JSArray*);
+ ScriptArray() {}
+ JSC::JSArray* jsArray() const { return asArray(jsValue()); }
+
+ bool set(unsigned index, const ScriptObject&);
+ bool set(unsigned index, SerializedScriptValue*);
+ bool set(unsigned index, const String&);
+ bool set(unsigned index, double);
+ bool set(unsigned index, long long);
+ bool set(unsigned index, int);
+ bool set(unsigned index, bool);
+ unsigned length();
+
+ static ScriptArray createNew(ScriptState*);
+};
}
#endif // ScriptArray_h
diff --git a/WebCore/bindings/js/ScriptCallStack.cpp b/WebCore/bindings/js/ScriptCallStack.cpp
index c9bb8b0..de61b07 100644
--- a/WebCore/bindings/js/ScriptCallStack.cpp
+++ b/WebCore/bindings/js/ScriptCallStack.cpp
@@ -91,11 +91,21 @@ void ScriptCallStack::initialize()
if (!m_caller || m_initialized)
return;
- JSValue func = m_exec->interpreter()->retrieveCaller(m_exec, m_caller);
- while (!func.isNull()) {
- JSFunction* jsFunction = asFunction(func);
- m_frames.append(ScriptCallFrame(jsFunction->name(m_exec), UString(), 0, 0, 0));
- func = m_exec->interpreter()->retrieveCaller(m_exec, jsFunction);
+ int signedLineNumber;
+ intptr_t sourceID;
+ UString urlString;
+ JSValue function;
+ // callFrame must exist if m_caller is not null.
+ CallFrame* callFrame = m_exec->callerFrame();
+ while (true) {
+ ASSERT(callFrame);
+ m_exec->interpreter()->retrieveLastCaller(callFrame, signedLineNumber, sourceID, urlString, function);
+ if (!function)
+ break;
+ JSFunction* jsFunction = asFunction(function);
+ unsigned lineNumber = signedLineNumber >= 0 ? signedLineNumber : 0;
+ m_frames.append(ScriptCallFrame(jsFunction->name(m_exec), urlString, lineNumber, m_exec, 0));
+ callFrame = callFrame->callerFrame();
}
m_initialized = true;
}
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index 0aa8f52..98022d9 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -379,6 +379,12 @@ PassRefPtr<Bindings::RootObject> ScriptController::createRootObject(void* native
return rootObject.release();
}
+#if ENABLE(INSPECTOR)
+void ScriptController::setCaptureCallStackForUncaughtExceptions(bool)
+{
+}
+#endif
+
#if ENABLE(NETSCAPE_PLUGIN_API)
NPObject* ScriptController::windowScriptNPObject()
diff --git a/WebCore/bindings/js/ScriptController.h b/WebCore/bindings/js/ScriptController.h
index c382a93..80155e4 100644
--- a/WebCore/bindings/js/ScriptController.h
+++ b/WebCore/bindings/js/ScriptController.h
@@ -151,6 +151,10 @@ public:
PassRefPtr<JSC::Bindings::RootObject> createRootObject(void* nativeHandle);
+#if ENABLE(INSPECTOR)
+ static void setCaptureCallStackForUncaughtExceptions(bool);
+#endif
+
#if PLATFORM(MAC)
#if ENABLE(JAVA_BRIDGE)
static void initJavaJSBindings();
diff --git a/WebCore/bindings/js/ScriptDebugServer.cpp b/WebCore/bindings/js/ScriptDebugServer.cpp
index 0a40f13..d71034b 100644
--- a/WebCore/bindings/js/ScriptDebugServer.cpp
+++ b/WebCore/bindings/js/ScriptDebugServer.cpp
@@ -200,7 +200,7 @@ void ScriptDebugServer::setPauseOnExceptionsState(PauseOnExceptionsState pause)
m_pauseOnExceptionsState = pause;
}
-void ScriptDebugServer::pauseProgram()
+void ScriptDebugServer::pause()
{
m_pauseOnNextStatement = true;
}
diff --git a/WebCore/bindings/js/ScriptDebugServer.h b/WebCore/bindings/js/ScriptDebugServer.h
index 6a8209b..fd8976b 100644
--- a/WebCore/bindings/js/ScriptDebugServer.h
+++ b/WebCore/bindings/js/ScriptDebugServer.h
@@ -67,6 +67,8 @@ public:
void removeBreakpoint(const String& sourceID, unsigned lineNumber);
void clearBreakpoints();
void setBreakpointsActivated(bool activated);
+ void activateBreakpoints() { setBreakpointsActivated(true); }
+ void deactivateBreakpoints() { setBreakpointsActivated(false); }
enum PauseOnExceptionsState {
DontPauseOnExceptions,
@@ -76,7 +78,7 @@ public:
PauseOnExceptionsState pauseOnExceptionsState() const { return m_pauseOnExceptionsState; }
void setPauseOnExceptionsState(PauseOnExceptionsState);
- void pauseProgram();
+ void pause();
void continueProgram();
void stepIntoStatement();
void stepOverStatement();
diff --git a/WebCore/bindings/js/StringSourceProvider.h b/WebCore/bindings/js/StringSourceProvider.h
index 2a18006..478c1d1 100644
--- a/WebCore/bindings/js/StringSourceProvider.h
+++ b/WebCore/bindings/js/StringSourceProvider.h
@@ -49,10 +49,6 @@ namespace WebCore {
: ScriptSourceProvider(stringToUString(url))
, m_source(source)
{
- if (m_source.length()) {
- bool scratch = false;
- m_source = String(source.impl()->copyStringWithoutBOMs(false, scratch));
- }
}
String m_source;
diff --git a/WebCore/bindings/objc/WebScriptObject.mm b/WebCore/bindings/objc/WebScriptObject.mm
index 3f224f1..37874ac 100644
--- a/WebCore/bindings/objc/WebScriptObject.mm
+++ b/WebCore/bindings/objc/WebScriptObject.mm
@@ -433,6 +433,27 @@ static void getListFromNSArray(ExecState *exec, NSArray *array, RootObject* root
_didExecute(self);
}
+- (BOOL)hasWebScriptKey:(NSString *)key
+{
+ if (![self _isSafeScript])
+ return NO;
+
+ ExecState* exec = [self _rootObject]->globalObject()->globalExec();
+ ASSERT(!exec->hadException());
+
+ JSLock lock(SilenceAssertionsOnly);
+ BOOL result = [self _imp]->hasProperty(exec, Identifier(exec, stringToUString(String(key))));
+
+ if (exec->hadException()) {
+ addExceptionToConsole(exec);
+ exec->clearException();
+ }
+
+ _didExecute(self);
+
+ return result;
+}
+
- (NSString *)stringRepresentation
{
if (![self _isSafeScript]) {
diff --git a/WebCore/bindings/objc/WebScriptObjectPrivate.h b/WebCore/bindings/objc/WebScriptObjectPrivate.h
index 3a424ce..5da1dde 100644
--- a/WebCore/bindings/objc/WebScriptObjectPrivate.h
+++ b/WebCore/bindings/objc/WebScriptObjectPrivate.h
@@ -59,6 +59,16 @@ namespace WebCore {
- (JSC::Bindings::RootObject*)_originRootObject;
@end
+@interface WebScriptObject (StagedForPublic)
+/*!
+ @method hasWebScriptKey:
+ @param name The name of the property to check for.
+ @discussion Checks for the existence of the property on the object in the script environment.
+ @result Returns YES if the property exists, NO otherwise.
+ */
+- (BOOL)hasWebScriptKey:(NSString *)name;
+@end
+
@interface WebScriptObjectPrivate : NSObject
{
@public
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index d106920..363fdc5 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -31,6 +31,7 @@ use File::Find;
my $useDocument = "";
my $useGenerator = "";
my $useOutputDir = "";
+my $useOutputHeadersDir = "";
my $useDirectories = "";
my $useLayerOnTop = 0;
my $preprocessor;
@@ -80,6 +81,7 @@ sub new
$useDirectories = shift;
$useGenerator = shift;
$useOutputDir = shift;
+ $useOutputHeadersDir = shift;
$useLayerOnTop = shift;
$preprocessor = shift;
$writeDependencies = shift;
@@ -107,7 +109,7 @@ sub ProcessDocument
require $ifaceName . ".pm";
# Dynamically load external code generation perl module
- $codeGenerator = $ifaceName->new($object, $useOutputDir, $useLayerOnTop, $preprocessor, $writeDependencies, $verbose);
+ $codeGenerator = $ifaceName->new($object, $useOutputDir, $useOutputHeadersDir, $useLayerOnTop, $preprocessor, $writeDependencies, $verbose);
unless (defined($codeGenerator)) {
my $classes = $useDocument->classes;
foreach my $class (@$classes) {
@@ -467,4 +469,28 @@ sub SetterExpressionPrefix
return "$functionName($contentAttributeName, "
}
+sub ShouldCheckEnums
+{
+ my $dataNode = shift;
+ return not $dataNode->extendedAttributes->{"DontCheckEnums"};
+}
+
+sub GenerateCompileTimeCheckForEnumsIfNeeded
+{
+ my ($object, $dataNode) = @_;
+ my $interfaceName = $dataNode->name;
+ my @checks = ();
+ # If necessary, check that all constants are available as enums with the same value.
+ if (ShouldCheckEnums($dataNode) && @{$dataNode->constants}) {
+ push(@checks, "\n");
+ foreach my $constant (@{$dataNode->constants}) {
+ my $name = $constant->name;
+ my $value = $constant->value;
+ push(@checks, "COMPILE_ASSERT($value == ${interfaceName}::$name, ${interfaceName}Enum${name}IsWrongUseDontCheckEnums);\n");
+ }
+ push(@checks, "\n");
+ }
+ return @checks;
+}
+
1;
diff --git a/WebCore/bindings/scripts/CodeGeneratorCPP.pm b/WebCore/bindings/scripts/CodeGeneratorCPP.pm
index 7df91ca..9e254af 100644
--- a/WebCore/bindings/scripts/CodeGeneratorCPP.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorCPP.pm
@@ -98,6 +98,7 @@ sub new
$codeGenerator = shift;
$outputDir = shift;
+ shift; # $outputHeadersDir
shift; # $useLayerOnTop
shift; # $preprocessor
shift; # $writeDependencies
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index a0a2098..d992d89 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -73,6 +73,7 @@ sub new
$codeGenerator = shift;
$outputDir = shift;
+ shift; # $outputHeadersDir
shift; # $useLayerOnTop
shift; # $preprocessor
$writeDependencies = shift;
@@ -1242,6 +1243,8 @@ sub GenerateImplementation
\@hashKeys, \@hashSpecials,
\@hashValue1, \@hashValue2);
+ push(@implContent, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($dataNode));
+
my $protoClassName = "${className}Prototype";
GenerateConstructorDeclaration(\@implContent, $className, $dataNode) unless $dataNode->extendedAttributes->{"CustomConstructFunction"};
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 7d66979..91cbd0b 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -199,6 +199,7 @@ sub new
$codeGenerator = shift;
$outputDir = shift;
+ shift; # $outputHeadersDir
shift; # $useLayerOnTop
shift; # $preprocessor
$writeDependencies = shift;
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 383bb74..c963e04 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -30,6 +30,7 @@ use Digest::MD5;
my $module = "";
my $outputDir = "";
+my $outputHeadersDir = "";
my @headerContent = ();
my @implContentHeader = ();
@@ -71,6 +72,7 @@ sub new
$codeGenerator = shift;
$outputDir = shift;
+ $outputHeadersDir = shift;
bless($reference, $object);
return $reference;
@@ -110,7 +112,7 @@ sub GenerateInterface
my $name = $dataNode->name;
# Open files for writing
- my $headerFileName = "$outputDir/V8$name.h";
+ my $headerFileName = "$outputHeadersDir/V8$name.h";
my $implFileName = "$outputDir/V8$name.cpp";
open($IMPL, ">$implFileName") || die "Couldn't open file $implFileName";
@@ -273,13 +275,6 @@ END
END
}
- if ($implClassName eq "HTMLDocument") {
- push(@headerContent, <<END);
- static v8::Local<v8::Object> WrapInShadowObject(v8::Local<v8::Object> wrapper, Node* impl);
- static v8::Handle<v8::Value> GetNamedProperty(HTMLDocument* htmlDocument, const AtomicString& key);
-END
- }
-
my @enabledAtRuntime;
foreach my $function (@{$dataNode->functions}) {
my $name = $function->signature->name;
@@ -367,6 +362,9 @@ sub GetInternalFields
if (IsSubType($dataNode, "Document")) {
push(@customInternalFields, "implementationIndex");
+ if ($name eq "HTMLDocument") {
+ push(@customInternalFields, ("markerIndex", "shadowIndex"));
+ }
} elsif ($name eq "DOMWindow") {
push(@customInternalFields, "enteredIsolatedWorldIndex");
}
@@ -403,6 +401,7 @@ END
my %indexerSpecialCases = (
"Storage" => 1,
"HTMLAppletElement" => 1,
+ "HTMLDocument" => 1,
"HTMLEmbedElement" => 1,
"HTMLObjectElement" => 1
);
@@ -429,10 +428,6 @@ sub GenerateHeaderNamedAndIndexedPropertyAccessors
if ($interfaceName eq "HTMLSelectElement" || $interfaceName eq "HTMLAppletElement" || $interfaceName eq "HTMLEmbedElement" || $interfaceName eq "HTMLObjectElement") {
$hasCustomNamedGetter = 1;
}
- if ($interfaceName eq "HTMLDocument") {
- $hasCustomNamedGetter = 0;
- $hasCustomIndexedGetter = 0;
- }
my $isIndexerSpecialCase = exists $indexerSpecialCases{$interfaceName};
if ($hasCustomIndexedGetter || $isIndexerSpecialCase) {
@@ -461,7 +456,7 @@ END
static v8::Handle<v8::Value> namedPropertySetter(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::AccessorInfo&);
END
}
- if ($hasCustomDeleters) {
+ if ($hasCustomDeleters || $interfaceName eq "HTMLDocument") {
push(@headerContent, <<END);
static v8::Handle<v8::Boolean> namedPropertyDeleter(v8::Local<v8::String>, const v8::AccessorInfo&);
END
@@ -1478,10 +1473,6 @@ sub GenerateImplementationNamedPropertyGetter
$hasCustomGetter = 1;
}
- if ($interfaceName eq "HTMLDocument") {
- $hasCustomGetter = 0;
- }
-
my $hasGetter = $dataNode->extendedAttributes->{"HasNameGetter"} || $hasCustomGetter || $namedPropertyGetter;
if (!$hasGetter) {
return;
@@ -1497,7 +1488,8 @@ END
}
my $hasSetter = $dataNode->extendedAttributes->{"DelegatingPutFunction"};
- my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"};
+ # FIXME: Try to remove hard-coded HTMLDocument reference by aligning handling of document.all with JSC bindings.
+ my $hasDeleter = $dataNode->extendedAttributes->{"CustomDeleteProperty"} || $interfaceName eq "HTMLDocument";
my $hasEnumerator = $dataNode->extendedAttributes->{"CustomGetPropertyNames"};
my $setOn = "Instance";
@@ -1753,6 +1745,7 @@ END
}
if ($has_constants) {
push(@implContent, "};\n");
+ push(@implContent, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($dataNode));
}
push(@implContentDecls, "} // namespace ${interfaceName}Internal\n\n");
@@ -1981,11 +1974,6 @@ END
instance->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheck, V8DOMWindow::indexedSecurityCheck, v8::External::Wrap(&V8DOMWindow::info), false);
END
}
- if ($interfaceName eq "HTMLDocument") {
- push(@implContent, <<END);
- desc->SetHiddenPrototype(true);
-END
- }
if ($interfaceName eq "Location") {
push(@implContent, <<END);
diff --git a/WebCore/bindings/scripts/IDLParser.pm b/WebCore/bindings/scripts/IDLParser.pm
index e250a4d..927deb9 100644
--- a/WebCore/bindings/scripts/IDLParser.pm
+++ b/WebCore/bindings/scripts/IDLParser.pm
@@ -329,11 +329,13 @@ sub ParseInterface
my $line = $_;
$line =~ /$IDLStructure::interfaceParameterSelector/;
- my $paramExtendedAttributes = (defined($1) ? $1 : " "); chop($paramExtendedAttributes);
- my $paramType = (defined($2) ? $2 : die("Parsing error!\nSource:\n$line\n)"));
- my $paramName = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
+ my $paramDirection = $1;
+ my $paramExtendedAttributes = (defined($2) ? $2 : " "); chop($paramExtendedAttributes);
+ my $paramType = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
+ my $paramName = (defined($4) ? $4 : die("Parsing error!\nSource:\n$line\n)"));
my $paramDataNode = new domSignature();
+ $paramDataNode->direction($paramDirection);
$paramDataNode->name($paramName);
$paramDataNode->type($paramType);
$paramDataNode->extendedAttributes(parseExtendedAttributes($paramExtendedAttributes));
diff --git a/WebCore/bindings/scripts/IDLStructure.pm b/WebCore/bindings/scripts/IDLStructure.pm
index d61fce1..2eda696 100644
--- a/WebCore/bindings/scripts/IDLStructure.pm
+++ b/WebCore/bindings/scripts/IDLStructure.pm
@@ -59,6 +59,7 @@ struct( domAttribute => {
# Used to represent a map of 'variable name' <-> 'variable type'
struct( domSignature => {
+ direction => '$', # Variable direction (in or out)
name => '$', # Variable name
type => '$', # Variable type
extendedAttributes => '$' # Extended attributes
@@ -100,7 +101,7 @@ our $exceptionSubSelector = '{\s*' . $supportedTypes . '\s*(' . $idlType . '*)\s
our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([a-zA-Z0-9_=\s(),;:\[\]&\|]*)';
our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
-our $interfaceParameterSelector = 'in\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
+our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
our $interfaceAttributeSelector = '\s*(readonly attribute|attribute)\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)';
diff --git a/WebCore/bindings/scripts/generate-bindings.pl b/WebCore/bindings/scripts/generate-bindings.pl
index b293b3c..57a3928 100755
--- a/WebCore/bindings/scripts/generate-bindings.pl
+++ b/WebCore/bindings/scripts/generate-bindings.pl
@@ -39,8 +39,10 @@ use CodeGenerator;
my @idlDirectories;
my $outputDirectory;
+my $outputHeadersDirectory;
my $generator;
my $defines;
+my $filename;
my $prefix;
my $preprocessor;
my $writeDependencies;
@@ -48,8 +50,10 @@ my $verbose;
GetOptions('include=s@' => \@idlDirectories,
'outputDir=s' => \$outputDirectory,
+ 'outputHeadersDir=s' => \$outputHeadersDirectory,
'generator=s' => \$generator,
'defines=s' => \$defines,
+ 'filename=s' => \$filename,
'prefix=s' => \$prefix,
'preprocessor=s' => \$preprocessor,
'verbose' => \$verbose,
@@ -62,6 +66,9 @@ die('Must specify generator') unless defined($generator);
die('Must specify output directory.') unless defined($outputDirectory);
die('Must specify defines') unless defined($defines);
+if (!$outputHeadersDirectory) {
+ $outputHeadersDirectory = $outputDirectory;
+}
if ($verbose) {
print "$generator: $idlFile\n";
}
@@ -72,5 +79,5 @@ my $parser = IDLParser->new(!$verbose);
my $document = $parser->Parse($idlFile, $defines, $preprocessor);
# Generate desired output for given IDL file.
-my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory, 0, $preprocessor, $writeDependencies, $verbose);
+my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory, $outputHeadersDirectory, 0, $preprocessor, $writeDependencies, $verbose);
$codeGen->ProcessDocument($document, $defines);
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index 1eb5ed3..86c7169 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -42,6 +42,14 @@ public:
WebDOMTestObj(const WebDOMTestObj&);
~WebDOMTestObj();
+ enum {
+ WEBDOM_CONST_VALUE_0 = 0,
+ WEBDOM_CONST_VALUE_1 = 1,
+ WEBDOM_CONST_VALUE_2 = 2,
+ WEBDOM_CONST_VALUE_4 = 4,
+ WEBDOM_CONST_VALUE_8 = 8
+ };
+
int readOnlyIntAttr() const;
WebDOMString readOnlyStringAttr() const;
WebDOMTestObj readOnlyTestObjAttr() const;
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 2f561f9..6e667f7 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -100,13 +100,25 @@ static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 68, 63, JSTestObjTableVa
#define THUNK_GENERATOR(generator)
#endif
-static const HashTableValue JSTestObjConstructorTableValues[1] =
+static const HashTableValue JSTestObjConstructorTableValues[6] =
{
+ { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_4", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_8", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t)0 THUNK_GENERATOR(0) },
{ 0, 0, 0, 0 THUNK_GENERATOR(0) }
};
#undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 1, 0, JSTestObjConstructorTableValues, 0 };
+static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 16, 15, JSTestObjConstructorTableValues, 0 };
+
+COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDontCheckEnums);
+
class JSTestObjConstructor : public DOMConstructorObject {
public:
JSTestObjConstructor(JSC::ExecState*, JSDOMGlobalObject*);
@@ -148,8 +160,13 @@ bool JSTestObjConstructor::getOwnPropertyDescriptor(ExecState* exec, const Ident
#define THUNK_GENERATOR(generator)
#endif
-static const HashTableValue JSTestObjPrototypeTableValues[31] =
+static const HashTableValue JSTestObjPrototypeTableValues[36] =
{
+ { "CONST_VALUE_0", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_2", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_4", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t)0 THUNK_GENERATOR(0) },
+ { "CONST_VALUE_8", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t)0 THUNK_GENERATOR(0) },
{ "voidMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t)0 THUNK_GENERATOR(0) },
{ "voidMethodWithArgs", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t)3 THUNK_GENERATOR(0) },
{ "intMethod", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionIntMethod), (intptr_t)0 THUNK_GENERATOR(0) },
@@ -184,7 +201,7 @@ static const HashTableValue JSTestObjPrototypeTableValues[31] =
};
#undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 130, 127, JSTestObjPrototypeTableValues, 0 };
+static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 132, 127, JSTestObjPrototypeTableValues, 0 };
const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", 0, &JSTestObjPrototypeTable, 0 };
JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
@@ -194,12 +211,12 @@ JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject
bool JSTestObjPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
- return getStaticFunctionSlot<JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, slot);
+ return getStaticPropertySlot<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, slot);
}
bool JSTestObjPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
- return getStaticFunctionDescriptor<JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, descriptor);
+ return getStaticPropertyDescriptor<JSTestObjPrototype, JSObject>(exec, &JSTestObjPrototypeTable, this, propertyName, descriptor);
}
const ClassInfo JSTestObj::s_info = { "TestObj", 0, &JSTestObjTable, 0 };
@@ -1228,6 +1245,33 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecStat
return throwVMTypeError(exec);
}
+// Constant getters
+
+JSValue jsTestObjCONST_VALUE_0(ExecState* exec, JSValue, const Identifier&)
+{
+ return jsNumber(exec, static_cast<int>(0));
+}
+
+JSValue jsTestObjCONST_VALUE_1(ExecState* exec, JSValue, const Identifier&)
+{
+ return jsNumber(exec, static_cast<int>(1));
+}
+
+JSValue jsTestObjCONST_VALUE_2(ExecState* exec, JSValue, const Identifier&)
+{
+ return jsNumber(exec, static_cast<int>(2));
+}
+
+JSValue jsTestObjCONST_VALUE_4(ExecState* exec, JSValue, const Identifier&)
+{
+ return jsNumber(exec, static_cast<int>(4));
+}
+
+JSValue jsTestObjCONST_VALUE_8(ExecState* exec, JSValue, const Identifier&)
+{
+ return jsNumber(exec, static_cast<int>(8));
+}
+
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* object)
{
return getDOMObjectWrapper<JSTestObj>(exec, globalObject, object);
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.h b/WebCore/bindings/scripts/test/JS/JSTestObj.h
index c83e568..84122b7 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -173,6 +173,13 @@ JSC::JSValue jsTestObjId(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsTestObjHash(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
JSC::JSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+// Constants
+
+JSC::JSValue jsTestObjCONST_VALUE_0(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_1(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_2(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_4(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsTestObjCONST_VALUE_8(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
} // namespace WebCore
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
index 1eac990..33c3a2d 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
@@ -34,6 +34,14 @@
@class NSString;
@protocol DOMEventListener;
+enum {
+ DOM_CONST_VALUE_0 = 0,
+ DOM_CONST_VALUE_1 = 1,
+ DOM_CONST_VALUE_2 = 2,
+ DOM_CONST_VALUE_4 = 4,
+ DOM_CONST_VALUE_8 = 8
+};
+
@interface DOMTestObj : DOMObject
- (int)readOnlyIntAttr;
- (NSString *)readOnlyStringAttr;
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
index 43fc211..f9d41d7 100644
--- a/WebCore/bindings/scripts/test/TestObj.idl
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -129,5 +129,12 @@ module test {
readonly attribute long description;
attribute long id;
readonly attribute DOMString hash;
+
+ // Check constants and enums.
+ const unsigned short CONST_VALUE_0 = 0;
+ const unsigned short CONST_VALUE_1 = 1;
+ const unsigned short CONST_VALUE_2 = 2;
+ const unsigned short CONST_VALUE_4 = 4;
+ const unsigned short CONST_VALUE_8 = 8;
};
}
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 0b9d034..c348726 100644
--- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -1015,6 +1015,20 @@ static const BatchedCallback TestObjCallbacks[] = {
{"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback},
{"overloadedMethod", TestObjInternal::overloadedMethodCallback},
};
+static const BatchedConstant TestObjConsts[] = {
+ {"CONST_VALUE_0", static_cast<signed int>(0)},
+ {"CONST_VALUE_1", static_cast<signed int>(1)},
+ {"CONST_VALUE_2", static_cast<signed int>(2)},
+ {"CONST_VALUE_4", static_cast<signed int>(4)},
+ {"CONST_VALUE_8", static_cast<signed int>(8)},
+};
+
+COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDontCheckEnums);
+COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDontCheckEnums);
+
static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc)
{
v8::Local<v8::Signature> defaultSignature = configureTemplate(desc, "TestObj", v8::Persistent<v8::FunctionTemplate>(), V8TestObj::internalFieldCount,
@@ -1059,6 +1073,7 @@ static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
v8::Handle<v8::FunctionTemplate> customArgsAndExceptionArgv[customArgsAndExceptionArgc] = { V8log::GetRawTemplate() };
v8::Handle<v8::Signature> customArgsAndExceptionSignature = v8::Signature::New(desc, customArgsAndExceptionArgc, customArgsAndExceptionArgv);
proto->Set(v8::String::New("customArgsAndException"), v8::FunctionTemplate::New(TestObjInternal::customArgsAndExceptionCallback, v8::Handle<v8::Value>(), customArgsAndExceptionSignature));
+ batchConfigureConstants(desc, proto, TestObjConsts, sizeof(TestObjConsts) / sizeof(*TestObjConsts));
// Custom toString template
desc->Set(getToStringName(), getToStringTemplate());
diff --git a/WebCore/bindings/v8/DOMData.h b/WebCore/bindings/v8/DOMData.h
index 4d7331b..c8b4a41 100644
--- a/WebCore/bindings/v8/DOMData.h
+++ b/WebCore/bindings/v8/DOMData.h
@@ -79,14 +79,25 @@ namespace WebCore {
template<typename T>
void DOMData::handleWeakObject(DOMDataStore::DOMWrapperMapType mapType, v8::Persistent<v8::Object> v8Object, T* domObject)
{
+ WrapperTypeInfo* type = V8DOMWrapper::domWrapperType(v8Object);
DOMDataList& list = DOMDataStore::allStores();
+ bool found = false;
for (size_t i = 0; i < list.size(); ++i) {
DOMDataStore* store = list[i];
ASSERT(store->domData()->owningThread() == WTF::currentThread());
DOMWrapperMap<T>* domMap = static_cast<DOMWrapperMap<T>*>(store->getDOMWrapperMap(mapType));
- if (domMap->removeIfPresent(domObject, v8Object))
- store->domData()->derefObject(V8DOMWrapper::domWrapperType(v8Object), domObject);
+ if (domMap->removeIfPresent(domObject, v8Object)) {
+ derefObject(type, domObject);
+ found = true;
+ }
+ }
+
+ // If not found, it means map for the wrapper has been already destroyed, just dispose the
+ // handle and deref the object to fight memory leak.
+ if (!found) {
+ v8Object.Dispose();
+ derefObject(type, domObject);
}
}
diff --git a/WebCore/bindings/v8/DOMDataStore.cpp b/WebCore/bindings/v8/DOMDataStore.cpp
index 5d609d8..0b06a69 100644
--- a/WebCore/bindings/v8/DOMDataStore.cpp
+++ b/WebCore/bindings/v8/DOMDataStore.cpp
@@ -163,10 +163,15 @@ void DOMDataStore::weakNodeCallback(v8::Persistent<v8::Value> v8Object, void* do
DOMDataStore* store = list[i];
if (store->domNodeMap().removeIfPresent(node, v8Object)) {
ASSERT(store->domData()->owningThread() == WTF::currentThread());
- node->deref(); // Nobody overrides Node::deref so it's safe
- break; // There might be at most one wrapper for the node in world's maps
+ node->deref(); // Nobody overrides Node::deref so it's safe
+ return; // There might be at most one wrapper for the node in world's maps
}
}
+
+ // If not found, it means map for the wrapper has been already destroyed, just dispose the
+ // handle and deref the object to fight memory leak.
+ v8Object.Dispose();
+ node->deref(); // Nobody overrides Node::deref so it's safe
}
bool DOMDataStore::IntrusiveDOMWrapperMap::removeIfPresent(Node* obj, v8::Persistent<v8::Data> value)
diff --git a/WebCore/bindings/v8/ScriptArray.cpp b/WebCore/bindings/v8/ScriptArray.cpp
index a199a6c..7119b27 100644
--- a/WebCore/bindings/v8/ScriptArray.cpp
+++ b/WebCore/bindings/v8/ScriptArray.cpp
@@ -31,11 +31,11 @@
#include "config.h"
#include "ScriptArray.h"
-#include "ScriptScope.h"
-#include "ScriptState.h"
-
#include "Document.h"
#include "Frame.h"
+#include "ScriptScope.h"
+#include "ScriptState.h"
+#include "SerializedScriptValue.h"
#include "V8Binding.h"
#include "V8Proxy.h"
@@ -57,6 +57,19 @@ bool ScriptArray::set(unsigned index, const ScriptObject& value)
return scope.success();
}
+bool ScriptArray::set(unsigned index, SerializedScriptValue* value)
+{
+ ScriptValue scriptValue = ScriptValue::deserialize(m_scriptState, value);
+ if (scriptValue.hasNoValue()) {
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+
+ ScriptScope scope(m_scriptState);
+ v8Object()->Set(v8::Integer::New(index), scriptValue.v8Value());
+ return scope.success();
+}
+
bool ScriptArray::set(unsigned index, const String& value)
{
ScriptScope scope(m_scriptState);
diff --git a/WebCore/bindings/v8/ScriptArray.h b/WebCore/bindings/v8/ScriptArray.h
index 9f40fbf..9aa8764 100644
--- a/WebCore/bindings/v8/ScriptArray.h
+++ b/WebCore/bindings/v8/ScriptArray.h
@@ -36,24 +36,26 @@
#include <v8.h>
namespace WebCore {
- class ScriptState;
-
- class ScriptArray : public ScriptObject {
- public:
- ScriptArray(ScriptState* scriptState, v8::Handle<v8::Array>);
- ScriptArray() {};
- virtual ~ScriptArray() {}
-
- bool set(unsigned index, const ScriptObject&);
- bool set(unsigned index, const String&);
- bool set(unsigned index, double);
- bool set(unsigned index, long long);
- bool set(unsigned index, int);
- bool set(unsigned index, bool);
- unsigned length();
-
- static ScriptArray createNew(ScriptState*);
- };
+class ScriptState;
+class SerializedScriptValue;
+
+class ScriptArray : public ScriptObject {
+public:
+ ScriptArray(ScriptState* scriptState, v8::Handle<v8::Array>);
+ ScriptArray() {};
+ virtual ~ScriptArray() {}
+
+ bool set(unsigned index, const ScriptObject&);
+ bool set(unsigned index, SerializedScriptValue*);
+ bool set(unsigned index, const String&);
+ bool set(unsigned index, double);
+ bool set(unsigned index, long long);
+ bool set(unsigned index, int);
+ bool set(unsigned index, bool);
+ unsigned length();
+
+ static ScriptArray createNew(ScriptState*);
+};
}
#endif // ScriptArray_h
diff --git a/WebCore/bindings/v8/ScriptCallFrame.cpp b/WebCore/bindings/v8/ScriptCallFrame.cpp
index 4c29814..9554f67 100644
--- a/WebCore/bindings/v8/ScriptCallFrame.cpp
+++ b/WebCore/bindings/v8/ScriptCallFrame.cpp
@@ -45,10 +45,17 @@ ScriptCallFrame::ScriptCallFrame(const String& functionName, const String& urlSt
, m_sourceURL(ParsedURLString, urlString)
, m_lineNumber(lineNumber)
{
- for (int i = 0; i < arguments.Length(); ++i)
+ for (int i = skipArgumentCount; i < arguments.Length(); ++i)
m_arguments.append(ScriptValue(arguments[i]));
}
+ScriptCallFrame::ScriptCallFrame(const String& functionName, const String& urlString, int lineNumber)
+ : m_functionName(functionName)
+ , m_sourceURL(ParsedURLString, urlString)
+ , m_lineNumber(lineNumber)
+{
+}
+
ScriptCallFrame::~ScriptCallFrame()
{
}
diff --git a/WebCore/bindings/v8/ScriptCallFrame.h b/WebCore/bindings/v8/ScriptCallFrame.h
index 50357cf..8d1972f 100644
--- a/WebCore/bindings/v8/ScriptCallFrame.h
+++ b/WebCore/bindings/v8/ScriptCallFrame.h
@@ -50,6 +50,7 @@ namespace WebCore {
class ScriptCallFrame {
public:
ScriptCallFrame(const String& functionName, const String& urlString, int lineNumber, const v8::Arguments&, unsigned skipArgumentCount);
+ ScriptCallFrame(const String& functionName, const String& urlString, int lineNumber);
~ScriptCallFrame();
const ScriptString& functionName() const { return m_functionName; }
diff --git a/WebCore/bindings/v8/ScriptCallStack.cpp b/WebCore/bindings/v8/ScriptCallStack.cpp
index d62175a..98ddb90 100644
--- a/WebCore/bindings/v8/ScriptCallStack.cpp
+++ b/WebCore/bindings/v8/ScriptCallStack.cpp
@@ -32,68 +32,122 @@
#include "ScriptCallStack.h"
#include "InspectorValues.h"
-#include "ScriptScope.h"
#include "ScriptController.h"
#include "ScriptDebugServer.h"
+#include "ScriptScope.h"
#include "V8Binding.h"
#include <v8-debug.h>
namespace WebCore {
-ScriptCallStack* ScriptCallStack::create(const v8::Arguments& arguments, unsigned skipArgumentCount) {
- String sourceName;
- int sourceLineNumber;
- String funcName;
- if (!callLocation(&sourceName, &sourceLineNumber, &funcName))
- return 0;
- return new ScriptCallStack(arguments, skipArgumentCount, sourceName, sourceLineNumber, funcName);
-}
-
-bool ScriptCallStack::callLocation(String* sourceName, int* sourceLineNumber, String* functionName)
+static void getFrameLocation(v8::Handle<v8::StackFrame> frame, String* sourceName, int* sourceLineNumber, String* functionName)
{
- v8::HandleScope scope;
- v8::Context::Scope contextScope(v8::Context::GetCurrent());
- v8::Handle<v8::StackTrace> stackTrace(v8::StackTrace::CurrentStackTrace(1));
- if (stackTrace.IsEmpty())
- return false;
- if (stackTrace->GetFrameCount() <= 0) {
- // Successfully grabbed stack trace, but there are no frames.
- // Fallback to setting lineNumber to 0, and source and function name to "undefined".
- *sourceName = toWebCoreString(v8::Undefined());
- *sourceLineNumber = 0;
- *functionName = toWebCoreString(v8::Undefined());
- return true;
- }
- v8::Handle<v8::StackFrame> frame = stackTrace->GetFrame(0);
- // There must be at least one valid frame.
ASSERT(!frame.IsEmpty());
v8::Local<v8::String> sourceNameValue(frame->GetScriptName());
v8::Local<v8::String> functionNameValue(frame->GetFunctionName());
*sourceName = sourceNameValue.IsEmpty() ? "" : toWebCoreString(sourceNameValue);
*functionName = functionNameValue.IsEmpty() ? "" : toWebCoreString(functionNameValue);
*sourceLineNumber = frame->GetLineNumber();
- return true;
}
-ScriptCallStack::ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber, String functionName)
- : m_lastCaller(functionName, sourceName, sourceLineNumber, arguments, skipArgumentCount)
- , m_scriptState(ScriptState::current())
+static void getTopFrameLocation(v8::Handle<v8::StackTrace> stackTrace, String* sourceName, int* sourceLineNumber, String* functionName)
+{
+ if (stackTrace->GetFrameCount() <= 0) {
+ // Successfully grabbed stack trace, but there are no frames. It may happen in case of a syntax error for example.
+ // Fallback to setting lineNumber to 0, and source and function name to "undefined".
+ *sourceName = "undefined";
+ *sourceLineNumber = 0;
+ *functionName = "undefined";
+ } else {
+ v8::Handle<v8::StackFrame> frame = stackTrace->GetFrame(0);
+ getFrameLocation(frame, sourceName, sourceLineNumber, functionName);
+ }
+}
+
+static PassOwnPtr<ScriptCallFrame> toScriptCallFrame(v8::Handle<v8::StackFrame> frame)
+{
+ String sourceName;
+ int sourceLineNumber;
+ String functionName;
+ getFrameLocation(frame, &sourceName, &sourceLineNumber, &functionName);
+ return new ScriptCallFrame(functionName, sourceName, sourceLineNumber);
+}
+
+static void toScriptCallFramesVector(v8::Local<v8::Context> context, v8::Handle<v8::StackTrace> stackTrace, Vector<OwnPtr<ScriptCallFrame> >& scriptCallFrames)
+{
+ v8::Context::Scope contextScope(context);
+ int frameCount = stackTrace->GetFrameCount();
+ for (int i = 0; i < frameCount; i++) {
+ v8::Local<v8::StackFrame> stackFrame = stackTrace->GetFrame(i);
+ scriptCallFrames.append(toScriptCallFrame(stackFrame));
+ }
+}
+
+const int ScriptCallStack::maxCallStackSizeToCapture = 200;
+
+PassOwnPtr<ScriptCallStack> ScriptCallStack::create(const v8::Arguments& arguments, unsigned skipArgumentCount, int framCountLimit)
+{
+ v8::HandleScope scope;
+ v8::Local<v8::Context> context = v8::Context::GetCurrent();
+ v8::Context::Scope contextScope(context);
+ v8::Handle<v8::StackTrace> stackTrace(v8::StackTrace::CurrentStackTrace(framCountLimit));
+
+ if (stackTrace.IsEmpty())
+ return 0;
+
+ String sourceName;
+ int sourceLineNumber;
+ String functionName;
+ getTopFrameLocation(stackTrace, &sourceName, &sourceLineNumber, &functionName);
+
+ Vector<OwnPtr<ScriptCallFrame> > scriptCallFrames;
+ if (framCountLimit > 1)
+ toScriptCallFramesVector(context, stackTrace, scriptCallFrames);
+
+ return new ScriptCallStack(ScriptState::forContext(context), new ScriptCallFrame(functionName, sourceName, sourceLineNumber, arguments, skipArgumentCount), scriptCallFrames);
+}
+
+PassOwnPtr<ScriptCallStack> ScriptCallStack::create(ScriptState* state, v8::Handle<v8::StackTrace> stackTrace)
+{
+ v8::HandleScope scope;
+ Vector<OwnPtr<ScriptCallFrame> > scriptCallFrames;
+ toScriptCallFramesVector(state->context(), stackTrace, scriptCallFrames);
+
+ String sourceName;
+ int sourceLineNumber;
+ String functionName;
+ getTopFrameLocation(stackTrace, &sourceName, &sourceLineNumber, &functionName);
+
+ return new ScriptCallStack(state, new ScriptCallFrame(functionName, sourceName, sourceLineNumber), scriptCallFrames);
+}
+
+ScriptCallStack::ScriptCallStack(ScriptState* scriptState, PassOwnPtr<ScriptCallFrame> topFrame, Vector<OwnPtr<ScriptCallFrame> >& scriptCallFrames)
+ : m_topFrame(topFrame)
+ , m_scriptState(scriptState)
{
+ m_scriptCallFrames.swap(scriptCallFrames);
}
ScriptCallStack::~ScriptCallStack()
{
}
-const ScriptCallFrame& ScriptCallStack::at(unsigned index) const
+const ScriptCallFrame& ScriptCallStack::at(unsigned index)
{
- // Currently, only one ScriptCallFrame is supported. When we can get
- // a full stack trace from V8, we can do this right.
- ASSERT(index == 0);
- return m_lastCaller;
+ if (!index && m_topFrame)
+ return *m_topFrame;
+ return *m_scriptCallFrames.at(index);
}
+unsigned ScriptCallStack::size()
+{
+ if (m_scriptCallFrames.isEmpty())
+ return 1;
+ return m_scriptCallFrames.size();
+}
+
+
bool ScriptCallStack::stackTrace(int frameLimit, const RefPtr<InspectorArray>& stackTrace)
{
#if ENABLE(INSPECTOR)
diff --git a/WebCore/bindings/v8/ScriptCallStack.h b/WebCore/bindings/v8/ScriptCallStack.h
index 80d5f76..b608563 100644
--- a/WebCore/bindings/v8/ScriptCallStack.h
+++ b/WebCore/bindings/v8/ScriptCallStack.h
@@ -48,7 +48,10 @@ class InspectorArray;
class ScriptCallStack : public Noncopyable {
public:
- static ScriptCallStack* create(const v8::Arguments&, unsigned skipArgumentCount = 0);
+ static const int maxCallStackSizeToCapture;
+
+ static PassOwnPtr<ScriptCallStack> create(const v8::Arguments&, unsigned skipArgumentCount = 0, int framCountLimit = 1);
+ static PassOwnPtr<ScriptCallStack> create(ScriptState*, v8::Handle<v8::StackTrace>);
~ScriptCallStack();
// Returns false if there is no running JavaScript or if fetching the stack failed.
@@ -62,20 +65,19 @@ public:
// }
static bool stackTrace(int frameLimit, const RefPtr<InspectorArray>& stackTrace);
- const ScriptCallFrame& at(unsigned) const;
- // FIXME: implement retrieving and storing call stack trace
- unsigned size() const { return 1; }
+ const ScriptCallFrame& at(unsigned);
+ unsigned size();
ScriptState* state() const { return m_scriptState; }
ScriptState* globalState() const { return m_scriptState; }
private:
- ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber, String funcName);
-
- static bool callLocation(String* sourceName, int* sourceLineNumber, String* functionName);
+ ScriptCallStack(ScriptState* scriptState, PassOwnPtr<ScriptCallFrame> topFrame, Vector<OwnPtr<ScriptCallFrame> >& scriptCallFrames);
+ ScriptCallStack(ScriptState* scriptState, v8::Handle<v8::StackTrace> stackTrace);
- ScriptCallFrame m_lastCaller;
+ OwnPtr<ScriptCallFrame> m_topFrame;
ScriptState* m_scriptState;
+ Vector<OwnPtr<ScriptCallFrame> > m_scriptCallFrames;
};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index 2396de0..a27c5cf 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -34,6 +34,7 @@
#include "PlatformBridge.h"
#include "Document.h"
+#include "ScriptCallStack.h"
#include "ScriptableDocumentParser.h"
#include "DOMWindow.h"
#include "Event.h"
@@ -464,6 +465,13 @@ void ScriptController::clearWindowShell(bool)
m_proxy->clearForNavigation();
}
+#if ENABLE(INSPECTOR)
+void ScriptController::setCaptureCallStackForUncaughtExceptions(bool)
+{
+ v8::V8::SetCaptureStackTraceForUncaughtExceptions(true, ScriptCallStack::maxCallStackSizeToCapture);
+}
+#endif
+
void ScriptController::attachDebugger(void*)
{
notImplemented();
@@ -476,12 +484,10 @@ void ScriptController::updateDocument()
void ScriptController::namedItemAdded(HTMLDocument* doc, const AtomicString& name)
{
- m_proxy->windowShell()->namedItemAdded(doc, name);
}
void ScriptController::namedItemRemoved(HTMLDocument* doc, const AtomicString& name)
{
- m_proxy->windowShell()->namedItemRemoved(doc, name);
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptController.h b/WebCore/bindings/v8/ScriptController.h
index 75ae0bf..04a15f6 100644
--- a/WebCore/bindings/v8/ScriptController.h
+++ b/WebCore/bindings/v8/ScriptController.h
@@ -116,6 +116,10 @@ public:
static bool canAccessFromCurrentOrigin(Frame*);
+#if ENABLE(INSPECTOR)
+ static void setCaptureCallStackForUncaughtExceptions(bool);
+#endif
+
bool canExecuteScripts(ReasonForCallingCanExecuteScripts);
// FIXME: void* is a compile hack.
diff --git a/WebCore/bindings/v8/ScriptDebugServer.cpp b/WebCore/bindings/v8/ScriptDebugServer.cpp
index 138237b..0a432b7 100644
--- a/WebCore/bindings/v8/ScriptDebugServer.cpp
+++ b/WebCore/bindings/v8/ScriptDebugServer.cpp
@@ -44,7 +44,6 @@
namespace WebCore {
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
static Frame* retrieveFrame(v8::Handle<v8::Context> context)
{
if (context.IsEmpty())
@@ -61,7 +60,6 @@ static Frame* retrieveFrame(v8::Handle<v8::Context> context)
return V8Proxy::retrieveFrame(context);
}
-#endif
ScriptDebugServer& ScriptDebugServer::shared()
{
@@ -83,9 +81,13 @@ void ScriptDebugServer::setDebuggerScriptSource(const String& scriptSource)
void ScriptDebugServer::addListener(ScriptDebugListener* listener, Page* page)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
if (!m_enabled)
return;
+
+ V8Proxy* proxy = V8Proxy::retrieve(page->mainFrame());
+ if (!proxy)
+ return;
+
v8::HandleScope scope;
v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
v8::Context::Scope contextScope(debuggerContext);
@@ -96,7 +98,7 @@ void ScriptDebugServer::addListener(ScriptDebugListener* listener, Page* page)
v8::Debug::SetDebugEventListener2(&ScriptDebugServer::v8DebugEventCallback);
}
m_listenersMap.set(page, listener);
- V8Proxy* proxy = V8Proxy::retrieve(page->mainFrame());
+
v8::Local<v8::Context> context = proxy->mainWorldContext();
v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getScripts")));
@@ -108,7 +110,6 @@ void ScriptDebugServer::addListener(ScriptDebugListener* listener, Page* page)
v8::Handle<v8::Array> scriptsArray = v8::Handle<v8::Array>::Cast(value);
for (unsigned i = 0; i < scriptsArray->Length(); ++i)
dispatchDidParseSource(listener, v8::Handle<v8::Object>::Cast(scriptsArray->Get(v8::Integer::New(i))));
-#endif
}
void ScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page)
@@ -128,7 +129,6 @@ void ScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page
bool ScriptDebugServer::setBreakpoint(const String& sourceID, ScriptBreakpoint breakpoint, unsigned lineNumber, unsigned* actualLineNumber)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
v8::HandleScope scope;
v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
v8::Context::Scope contextScope(debuggerContext);
@@ -146,14 +146,10 @@ bool ScriptDebugServer::setBreakpoint(const String& sourceID, ScriptBreakpoint b
ASSERT(result->Int32Value() >= 0);
*actualLineNumber = result->Int32Value();
return true;
-#else
- return false;
-#endif
}
void ScriptDebugServer::removeBreakpoint(const String& sourceID, unsigned lineNumber)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
v8::HandleScope scope;
v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
v8::Context::Scope contextScope(debuggerContext);
@@ -164,12 +160,10 @@ void ScriptDebugServer::removeBreakpoint(const String& sourceID, unsigned lineNu
v8::Handle<v8::Function> removeBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("removeBreakpoint")));
v8::Debug::Call(removeBreakpointFunction, args);
-#endif
}
void ScriptDebugServer::clearBreakpoints()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
@@ -177,12 +171,10 @@ void ScriptDebugServer::clearBreakpoints()
v8::Handle<v8::Function> clearBreakpoints = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("clearBreakpoints")));
v8::Debug::Call(clearBreakpoints);
-#endif
}
void ScriptDebugServer::setBreakpointsActivated(bool enabled)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
@@ -192,12 +184,10 @@ void ScriptDebugServer::setBreakpointsActivated(bool enabled)
args->Set(v8::String::New("enabled"), v8::Boolean::New(enabled));
v8::Handle<v8::Function> setBreakpointsActivated = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("setBreakpointsActivated")));
v8::Debug::Call(setBreakpointsActivated, args);
-#endif
}
ScriptDebugServer::PauseOnExceptionsState ScriptDebugServer::pauseOnExceptionsState()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
v8::Context::Scope contextScope(v8::Debug::GetDebugContext());
@@ -206,14 +196,10 @@ ScriptDebugServer::PauseOnExceptionsState ScriptDebugServer::pauseOnExceptionsSt
v8::Handle<v8::Value> argv[] = { v8::Handle<v8::Value>() };
v8::Handle<v8::Value> result = function->Call(m_debuggerScript.get(), 0, argv);
return static_cast<ScriptDebugServer::PauseOnExceptionsState>(result->Int32Value());
-#else
- return DontPauseOnExceptions;
-#endif
}
void ScriptDebugServer::setPauseOnExceptionsState(PauseOnExceptionsState pauseOnExceptionsState)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
v8::Context::Scope contextScope(v8::Debug::GetDebugContext());
@@ -221,54 +207,44 @@ void ScriptDebugServer::setPauseOnExceptionsState(PauseOnExceptionsState pauseOn
v8::Handle<v8::Function> setPauseOnExceptionsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("setPauseOnExceptionsState")));
v8::Handle<v8::Value> argv[] = { v8::Int32::New(pauseOnExceptionsState) };
setPauseOnExceptionsFunction->Call(m_debuggerScript.get(), 1, argv);
-#endif
}
void ScriptDebugServer::continueProgram()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
if (m_pausedPage)
m_clientMessageLoop->quitNow();
didResume();
-#endif
}
void ScriptDebugServer::stepIntoStatement()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ASSERT(m_pausedPage);
v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("stepIntoStatement")));
v8::Handle<v8::Value> argv[] = { m_executionState.get() };
function->Call(m_debuggerScript.get(), 1, argv);
continueProgram();
-#endif
}
void ScriptDebugServer::stepOverStatement()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ASSERT(m_pausedPage);
v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("stepOverStatement")));
v8::Handle<v8::Value> argv[] = { m_executionState.get() };
function->Call(m_debuggerScript.get(), 1, argv);
continueProgram();
-#endif
}
void ScriptDebugServer::stepOutOfFunction()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ASSERT(m_pausedPage);
v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("stepOutOfFunction")));
v8::Handle<v8::Value> argv[] = { m_executionState.get() };
function->Call(m_debuggerScript.get(), 1, argv);
continueProgram();
-#endif
}
bool ScriptDebugServer::editScriptSource(const String& sourceID, const String& newContent, String& newSourceOrErrorMessage)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
@@ -295,9 +271,6 @@ bool ScriptDebugServer::editScriptSource(const String& sourceID, const String& n
if (m_currentCallFrame)
m_currentCallFrame.clear();
return true;
-#else
- return false;
-#endif
}
PassRefPtr<JavaScriptCallFrame> ScriptDebugServer::currentCallFrame()
@@ -321,7 +294,6 @@ bool ScriptDebugServer::isDebuggerAlwaysEnabled()
return m_enabled;
}
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
void ScriptDebugServer::v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails)
{
ScriptDebugServer::shared().handleV8DebugEvent(eventDetails);
@@ -376,7 +348,6 @@ void ScriptDebugServer::handleV8DebugEvent(const v8::Debug::EventDetails& eventD
}
}
}
-#endif
void ScriptDebugServer::dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> object)
{
diff --git a/WebCore/bindings/v8/ScriptDebugServer.h b/WebCore/bindings/v8/ScriptDebugServer.h
index 26ca785..a55388f 100644
--- a/WebCore/bindings/v8/ScriptDebugServer.h
+++ b/WebCore/bindings/v8/ScriptDebugServer.h
@@ -59,6 +59,8 @@ public:
void removeBreakpoint(const String& sourceID, unsigned lineNumber);
void clearBreakpoints();
void setBreakpointsActivated(bool activated);
+ void activateBreakpoints() { setBreakpointsActivated(true); }
+ void deactivateBreakpoints() { setBreakpointsActivated(false); }
enum PauseOnExceptionsState {
DontPauseOnExceptions,
@@ -68,7 +70,7 @@ public:
PauseOnExceptionsState pauseOnExceptionsState();
void setPauseOnExceptionsState(PauseOnExceptionsState pauseOnExceptionsState);
- void pauseProgram() { }
+ void pause() { }
void continueProgram();
void stepIntoStatement();
void stepOverStatement();
@@ -101,10 +103,8 @@ private:
ScriptDebugServer();
~ScriptDebugServer() { }
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
static void v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails);
void handleV8DebugEvent(const v8::Debug::EventDetails& eventDetails);
-#endif
void dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> sourceObject);
diff --git a/WebCore/bindings/v8/ScriptSourceCode.h b/WebCore/bindings/v8/ScriptSourceCode.h
index 485daea..dbc9d5e 100644
--- a/WebCore/bindings/v8/ScriptSourceCode.h
+++ b/WebCore/bindings/v8/ScriptSourceCode.h
@@ -46,14 +46,6 @@ public:
, m_url(url)
, m_startLine(startLine)
{
- // FIXME: Copying the source to strip BOMs isn't strictly necessary
- // because V8 treats BOMs as whitespace. However, it is here because it
- // must be in sync with CachedScript::script() which strips the BOMs. We
- // should investigate the performance implications.
- if (m_source.length()) {
- bool scratch = false;
- m_source = String(source.impl()->copyStringWithoutBOMs(false, scratch));
- }
}
// We lose the encoding information from CachedScript.
diff --git a/WebCore/bindings/v8/V8ConsoleMessage.cpp b/WebCore/bindings/v8/V8ConsoleMessage.cpp
index d9fe069..8b6bb17 100644
--- a/WebCore/bindings/v8/V8ConsoleMessage.cpp
+++ b/WebCore/bindings/v8/V8ConsoleMessage.cpp
@@ -36,6 +36,7 @@
#include "Frame.h"
#include "OwnPtr.h"
#include "Page.h"
+#include "ScriptCallStack.h"
#include "V8Binding.h"
#include "V8Proxy.h"
@@ -52,14 +53,7 @@ V8ConsoleMessage::V8ConsoleMessage(const String& string, const String& sourceID,
void V8ConsoleMessage::dispatchNow(Page* page)
{
- ASSERT(page);
-
- // Process any delayed messages to make sure that messages
- // appear in the right order in the console.
- processDelayed();
-
- Console* console = page->mainFrame()->domWindow()->console();
- console->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, m_string, m_lineNumber, m_sourceID);
+ dispatchNow(page, 0);
}
void V8ConsoleMessage::dispatchLater()
@@ -118,11 +112,33 @@ void V8ConsoleMessage::handler(v8::Handle<v8::Message> message, v8::Handle<v8::V
ASSERT(!errorMessageString.IsEmpty());
String errorMessage = toWebCoreString(errorMessageString);
+ v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace();
+ OwnPtr<ScriptCallStack> callStack;
+ // Currently stack trace is only collected when inspector is open.
+ if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) {
+ v8::Local<v8::Context> context = v8::Context::GetEntered();
+ ScriptState* scriptState = ScriptState::forContext(context);
+ callStack = ScriptCallStack::create(scriptState, stackTrace);
+ }
+
v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
bool useURL = resourceName.IsEmpty() || !resourceName->IsString();
String resourceNameString = useURL ? frame->document()->url() : toWebCoreString(resourceName);
V8ConsoleMessage consoleMessage(errorMessage, resourceNameString, message->GetLineNumber());
- consoleMessage.dispatchNow(page);
+ consoleMessage.dispatchNow(page, callStack.get());
+}
+
+void V8ConsoleMessage::dispatchNow(Page* page, ScriptCallStack* callStack)
+{
+ ASSERT(page);
+
+ // Process any delayed messages to make sure that messages
+ // appear in the right order in the console.
+ processDelayed();
+
+ Console* console = page->mainFrame()->domWindow()->console();
+ MessageType messageType = callStack ? UncaughtExceptionMessageType : LogMessageType;
+ console->addMessage(JSMessageSource, messageType, ErrorMessageLevel, m_string, m_lineNumber, m_sourceID, callStack);
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/V8ConsoleMessage.h b/WebCore/bindings/v8/V8ConsoleMessage.h
index a8f75ee..387b5ee 100644
--- a/WebCore/bindings/v8/V8ConsoleMessage.h
+++ b/WebCore/bindings/v8/V8ConsoleMessage.h
@@ -36,8 +36,9 @@
#include <wtf/Vector.h>
namespace WebCore {
-
+
class Page;
+ class ScriptCallStack;
// V8ConsoleMessage encapsulates everything needed to
// log messages originating from JavaScript to the console.
@@ -80,6 +81,8 @@ namespace WebCore {
const String m_sourceID;
const unsigned m_lineNumber;
+ void dispatchNow(Page*, ScriptCallStack*);
+
// All delayed messages are stored in this vector. If the vector
// is 0, there are no delayed messages.
static Vector<V8ConsoleMessage>* m_delayedMessages;
diff --git a/WebCore/bindings/v8/V8DOMMap.h b/WebCore/bindings/v8/V8DOMMap.h
index a7e03a0..d8d5c04 100644
--- a/WebCore/bindings/v8/V8DOMMap.h
+++ b/WebCore/bindings/v8/V8DOMMap.h
@@ -74,13 +74,7 @@ namespace WebCore {
public:
typedef AbstractWeakReferenceMap<KeyType, ValueType> Parent;
WeakReferenceMap(v8::WeakReferenceCallback callback) : Parent(callback) { }
- virtual ~WeakReferenceMap()
- {
- #ifndef NDEBUG
- if (m_map.size() > 0)
- fprintf(stderr, "Leak %d JS wrappers.\n", m_map.size());
- #endif
- }
+ virtual ~WeakReferenceMap() { }
// Get the JS wrapper object of an object.
virtual v8::Persistent<ValueType> get(KeyType* obj)
@@ -135,7 +129,6 @@ namespace WebCore {
protected:
HashMap<KeyType*, ValueType*> m_map;
- v8::WeakReferenceCallback m_weakReferenceCallback;
};
template <class KeyType> class DOMWrapperMap : public WeakReferenceMap<KeyType, v8::Object> {
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.cpp b/WebCore/bindings/v8/V8DOMWindowShell.cpp
index 99fea4c..c7c77d3 100644
--- a/WebCore/bindings/v8/V8DOMWindowShell.cpp
+++ b/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -50,7 +50,6 @@
#include "V8DOMWindow.h"
#include "V8Document.h"
#include "V8GCForContextDispose.h"
-#include "V8HTMLDocument.h"
#include "V8HiddenPropertyName.h"
#include "V8History.h"
#include "V8Location.h"
@@ -415,12 +414,6 @@ void V8DOMWindowShell::clearDocumentWrapper()
}
}
-static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* document)
-{
- ASSERT(V8Document::toNative(wrapper) == document);
- ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::Object>::Cast(wrapper->GetPrototype())) == document));
-}
-
void V8DOMWindowShell::updateDocumentWrapperCache()
{
v8::HandleScope handleScope;
@@ -439,10 +432,6 @@ void V8DOMWindowShell::updateDocumentWrapperCache()
}
v8::Handle<v8::Value> documentWrapper = toV8(m_frame->document());
- ASSERT(documentWrapper == m_document || m_document.IsEmpty());
- if (m_document.IsEmpty())
- updateDocumentWrapper(v8::Handle<v8::Object>::Cast(documentWrapper));
- checkDocumentWrapper(m_document, m_frame->document());
// If instantiation of the document wrapper fails, clear the cache
// and let the DOMWindow accessor handle access to the document.
@@ -520,39 +509,6 @@ void V8DOMWindowShell::updateDocument()
updateSecurityOrigin();
}
-v8::Handle<v8::Value> getter(v8::Local<v8::String> property, const v8::AccessorInfo& info)
-{
- // FIXME(antonm): consider passing AtomicStringImpl directly.
- AtomicString name = v8StringToAtomicWebCoreString(property);
- HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
- ASSERT(htmlDocument);
- return V8HTMLDocument::GetNamedProperty(htmlDocument, name);
-}
-
-void V8DOMWindowShell::namedItemAdded(HTMLDocument* doc, const AtomicString& name)
-{
- initContextIfNeeded();
-
- v8::HandleScope handleScope;
- v8::Context::Scope contextScope(m_context);
-
- ASSERT(!m_document.IsEmpty());
- checkDocumentWrapper(m_document, doc);
- m_document->SetAccessor(v8String(name), getter);
-}
-
-void V8DOMWindowShell::namedItemRemoved(HTMLDocument* doc, const AtomicString& name)
-{
- initContextIfNeeded();
-
- v8::HandleScope handleScope;
- v8::Context::Scope contextScope(m_context);
-
- ASSERT(!m_document.IsEmpty());
- checkDocumentWrapper(m_document, doc);
- m_document->Delete(v8String(name));
-}
-
void V8DOMWindowShell::updateSecurityOrigin()
{
v8::HandleScope scope;
diff --git a/WebCore/bindings/v8/V8DOMWindowShell.h b/WebCore/bindings/v8/V8DOMWindowShell.h
index 3cf1b52..f4eaff2 100644
--- a/WebCore/bindings/v8/V8DOMWindowShell.h
+++ b/WebCore/bindings/v8/V8DOMWindowShell.h
@@ -31,7 +31,6 @@
#ifndef V8DOMWindowShell_h
#define V8DOMWindowShell_h
-#include "AtomicString.h"
#include "WrapperTypeInfo.h"
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
@@ -42,7 +41,6 @@ namespace WebCore {
class DOMWindow;
class Frame;
-class HTMLDocument;
class String;
// V8WindowShell represents all the per-global object state for a Frame that
@@ -56,9 +54,6 @@ public:
// Update document object of the frame.
void updateDocument();
- void namedItemAdded(HTMLDocument*, const AtomicString&);
- void namedItemRemoved(HTMLDocument*, const AtomicString&);
-
// Update the security origin of a document
// (e.g., after setting docoument.domain).
void updateSecurityOrigin();
diff --git a/WebCore/bindings/v8/V8DOMWrapper.cpp b/WebCore/bindings/v8/V8DOMWrapper.cpp
index b5703d2..4a09c34 100644
--- a/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -284,8 +284,6 @@ v8::Local<v8::Object> V8DOMWrapper::instantiateV8Object(V8Proxy* proxy, WrapperT
if (!instance.IsEmpty()) {
// Avoid setting the DOM wrapper for failed allocations.
setDOMWrapper(instance, type, impl);
- if (type == &V8HTMLDocument::info)
- instance = V8HTMLDocument::WrapInShadowObject(instance, static_cast<Node*>(impl));
}
return instance;
}
diff --git a/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp b/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
index 62838a0..baffbd4 100644
--- a/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp
@@ -33,10 +33,9 @@
#include "V8Console.h"
#include "Console.h"
-#include "MemoryInfo.h"
+#include "ScriptCallStack.h"
#include "ScriptProfile.h"
#include "V8Binding.h"
-#include "V8MemoryInfo.h"
#include "V8Proxy.h"
#include "V8ScriptProfile.h"
@@ -59,10 +58,26 @@ v8::Handle<v8::Value> V8Console::profilesAccessorGetter(v8::Local<v8::String> na
}
#endif
-v8::Handle<v8::Value> V8Console::memoryAccessorGetter(v8::Local<v8::String>, const v8::AccessorInfo&)
+v8::Handle<v8::Value> V8Console::traceCallback(const v8::Arguments& args)
{
- INC_STATS("DOM.Console.memoryAccessorGetter");
- return toV8(MemoryInfo::create());
+ INC_STATS("DOM.Console.traceCallback");
+ Console* imp = V8Console::toNative(args.Holder());
+ v8::HandleScope handleScope;
+ ScriptState* scriptState = ScriptState::current();
+ v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(ScriptCallStack::maxCallStackSizeToCapture);
+ OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(scriptState, stackTrace));
+ imp->trace(callStack.get());
+ return v8::Handle<v8::Value>();
+}
+
+v8::Handle<v8::Value> V8Console::assertCallback(const v8::Arguments& args)
+{
+ INC_STATS("DOM.Console.assertCallback");
+ Console* imp = V8Console::toNative(args.Holder());
+ OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(args, 1, ScriptCallStack::maxCallStackSizeToCapture));
+ bool condition = args[0]->BooleanValue();
+ imp->assertCondition(condition, callStack.get());
+ return v8::Handle<v8::Value>();
}
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp b/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
new file mode 100644
index 0000000..26cc6cc
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8DeviceOrientationEvent.h"
+
+#if ENABLE(DEVICE_ORIENTATION)
+
+#include "DeviceOrientation.h"
+#include "V8Binding.h"
+#include "V8Proxy.h"
+
+#include <v8.h>
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8DeviceOrientationEvent::alphaAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DeviceOrientationEvent.alpha._get");
+ v8::Handle<v8::Object> holder = info.Holder();
+ DeviceOrientationEvent* imp = V8DeviceOrientationEvent::toNative(holder);
+ if (!imp->orientation()->canProvideAlpha())
+ return v8::Null();
+ return v8::Number::New(imp->orientation()->alpha());
+}
+
+v8::Handle<v8::Value> V8DeviceOrientationEvent::betaAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DeviceOrientationEvent.beta._get");
+ v8::Handle<v8::Object> holder = info.Holder();
+ DeviceOrientationEvent* imp = V8DeviceOrientationEvent::toNative(holder);
+ if (!imp->orientation()->canProvideBeta())
+ return v8::Null();
+ return v8::Number::New(imp->orientation()->beta());
+}
+
+v8::Handle<v8::Value> V8DeviceOrientationEvent::gammaAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DeviceOrientationEvent.gamma._get");
+ v8::Handle<v8::Object> holder = info.Holder();
+ DeviceOrientationEvent* imp = V8DeviceOrientationEvent::toNative(holder);
+ if (!imp->orientation()->canProvideGamma())
+ return v8::Null();
+ return v8::Number::New(imp->orientation()->gamma());
+}
+
+v8::Handle<v8::Value> V8DeviceOrientationEvent::initDeviceOrientationEventCallback(const v8::Arguments& args)
+{
+ DeviceOrientationEvent* imp = V8DeviceOrientationEvent::toNative(args.Holder());
+ V8Parameter<> type = args[0];
+ bool bubbles = args[1]->BooleanValue();
+ bool cancelable = args[2]->BooleanValue();
+ // If alpha, beta or gamma are null or undefined, mark them as not provided.
+ // Otherwise, use the standard JavaScript conversion.
+ bool alphaProvided = !isUndefinedOrNull(args[3]);
+ double alpha = static_cast<double>(args[3]->NumberValue());
+ bool betaProvided = !isUndefinedOrNull(args[4]);
+ double beta = static_cast<double>(args[4]->NumberValue());
+ bool gammaProvided = !isUndefinedOrNull(args[5]);
+ double gamma = static_cast<double>(args[5]->NumberValue());
+ RefPtr<DeviceOrientation> orientation = DeviceOrientation::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma);
+ imp->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get());
+ return v8::Handle<v8::Value>();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DEVICE_ORIENTATION)
diff --git a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index 09f0a6f..86f2eb5 100644
--- a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -49,37 +49,48 @@
namespace WebCore {
-v8::Local<v8::Object> V8HTMLDocument::WrapInShadowObject(v8::Local<v8::Object> wrapper, Node* impl)
+v8::Handle<v8::Boolean> V8HTMLDocument::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- DEFINE_STATIC_LOCAL(v8::Persistent<v8::FunctionTemplate>, shadowTemplate, ());
- if (shadowTemplate.IsEmpty()) {
- shadowTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New());
- if (shadowTemplate.IsEmpty())
- return v8::Local<v8::Object>();
- shadowTemplate->SetClassName(v8::String::New("HTMLDocument"));
- shadowTemplate->Inherit(V8HTMLDocument::GetTemplate());
- shadowTemplate->InstanceTemplate()->SetInternalFieldCount(V8HTMLDocument::internalFieldCount);
- }
-
- v8::Local<v8::Function> shadowConstructor = shadowTemplate->GetFunction();
- if (shadowConstructor.IsEmpty())
- return v8::Local<v8::Object>();
-
- v8::Local<v8::Object> shadow = shadowConstructor->NewInstance();
- if (shadow.IsEmpty())
- return v8::Local<v8::Object>();
- V8DOMWrapper::setDOMWrapper(shadow, &V8HTMLDocument::info, impl);
- shadow->SetPrototype(wrapper);
- return shadow;
+ // Only handle document.all. Insert the marker object into the
+ // shadow internal field to signal that document.all is no longer
+ // shadowed.
+ AtomicString key = v8StringToAtomicWebCoreString(name);
+ DEFINE_STATIC_LOCAL(const AtomicString, all, ("all"));
+ if (key != all)
+ return deletionNotHandledByInterceptor();
+
+ ASSERT(info.Holder()->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ v8::Local<v8::Value> marker = info.Holder()->GetInternalField(V8HTMLDocument::markerIndex);
+ info.Holder()->SetInternalField(V8HTMLDocument::shadowIndex, marker);
+ return v8::True();
}
-v8::Handle<v8::Value> V8HTMLDocument::GetNamedProperty(HTMLDocument* htmlDocument, const AtomicString& key)
+v8::Handle<v8::Value> V8HTMLDocument::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
- ASSERT(htmlDocument->hasNamedItem(key.impl()) || htmlDocument->hasExtraNamedItem(key.impl()));
+ INC_STATS("DOM.HTMLDocument.NamedPropertyGetter");
+ AtomicString key = v8StringToAtomicWebCoreString(name);
+
+ // Special case for document.all. If the value in the shadow
+ // internal field is not the marker object, then document.all has
+ // been temporarily shadowed and we return the value.
+ DEFINE_STATIC_LOCAL(const AtomicString, all, ("all"));
+ if (key == all) {
+ ASSERT(info.Holder()->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ v8::Local<v8::Value> marker = info.Holder()->GetInternalField(V8HTMLDocument::markerIndex);
+ v8::Local<v8::Value> value = info.Holder()->GetInternalField(V8HTMLDocument::shadowIndex);
+ if (marker != value)
+ return value;
+ }
+
+ HTMLDocument* htmlDocument = V8HTMLDocument::toNative(info.Holder());
+
+ // Fast case for named elements that are not there.
+ if (!htmlDocument->hasNamedItem(key.impl()) && !htmlDocument->hasExtraNamedItem(key.impl()))
+ return v8::Handle<v8::Value>();
RefPtr<HTMLCollection> items = htmlDocument->documentNamedItems(key);
if (!items->length())
- return v8::Handle<v8::Value>();
+ return notHandledByInterceptor();
if (items->length() == 1) {
Node* node = items->firstItem();
@@ -93,6 +104,13 @@ v8::Handle<v8::Value> V8HTMLDocument::GetNamedProperty(HTMLDocument* htmlDocumen
return toV8(items.release());
}
+v8::Handle<v8::Value> V8HTMLDocument::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo &info)
+{
+ INC_STATS("DOM.HTMLDocument.IndexedPropertyGetter");
+ v8::Local<v8::Integer> indexV8 = v8::Integer::NewFromUnsigned(index);
+ return namedPropertyGetter(indexV8->ToString(), info);
+}
+
// HTMLDocument ----------------------------------------------------------------
// Concatenates "args" to a string. If args is empty, returns empty string.
@@ -175,8 +193,10 @@ v8::Handle<v8::Value> V8HTMLDocument::allAccessorGetter(v8::Local<v8::String> na
void V8HTMLDocument::allAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
- // Just emulate a normal JS behaviour---install a property on this.
- info.This()->ForceSet(name, value);
+ INC_STATS("DOM.HTMLDocument.all._set");
+ v8::Handle<v8::Object> holder = info.Holder();
+ ASSERT(info.Holder()->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ info.Holder()->SetInternalField(V8HTMLDocument::shadowIndex, value);
}
v8::Handle<v8::Value> toV8(HTMLDocument* impl, bool forceNewObject)
@@ -190,6 +210,12 @@ v8::Handle<v8::Value> toV8(HTMLDocument* impl, bool forceNewObject)
if (V8Proxy* proxy = V8Proxy::retrieve(impl->frame()))
proxy->windowShell()->updateDocumentWrapper(wrapper);
}
+ // Create marker object and insert it in two internal fields.
+ // This is used to implement temporary shadowing of document.all.
+ ASSERT(wrapper->InternalFieldCount() == V8HTMLDocument::internalFieldCount);
+ v8::Local<v8::Object> marker = v8::Object::New();
+ wrapper->SetInternalField(V8HTMLDocument::markerIndex, marker);
+ wrapper->SetInternalField(V8HTMLDocument::shadowIndex, marker);
return wrapper;
}
diff --git a/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp b/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
index 8ef11ce..495a8e4 100644
--- a/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SQLTransactionSyncCustom.cpp
@@ -41,6 +41,7 @@
#include "V8Binding.h"
#include "V8BindingMacros.h"
#include "V8Proxy.h"
+#include "V8SQLResultSet.h"
#include <wtf/Vector.h>
using namespace WTF;
@@ -90,10 +91,10 @@ v8::Handle<v8::Value> V8SQLTransactionSync::executeSqlCallback(const v8::Argumen
SQLTransactionSync* transaction = V8SQLTransactionSync::toNative(args.Holder());
ExceptionCode ec = 0;
- transaction->executeSQL(statement, sqlValues, ec);
+ v8::Handle<v8::Value> result = toV8(transaction->executeSQL(statement, sqlValues, ec));
V8Proxy::setDOMException(ec);
- return v8::Undefined();
+ return result;
}
} // namespace WebCore
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index 77a6716..cfab3a2 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -869,7 +869,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
if (type == QMetaType::QByteArray) {
QByteArray qtByteArray = variant.value<QByteArray>();
WTF::RefPtr<WTF::ByteArray> wtfByteArray = WTF::ByteArray::create(qtByteArray.length());
- qMemCopy(wtfByteArray->data(), qtByteArray.constData(), qtByteArray.length());
+ memcpy(wtfByteArray->data(), qtByteArray.constData(), qtByteArray.length());
return new (exec) JSC::JSByteArray(exec, JSC::JSByteArray::createStructure(jsNull()), wtfByteArray.get());
}
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index 2ebab06..44ff1fc 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -1482,6 +1482,14 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
break;
/* Directional properties are resolved by resolveDirectionAwareProperty() before the switch. */
+ case CSSPropertyWebkitBorderEnd:
+ case CSSPropertyWebkitBorderEndColor:
+ case CSSPropertyWebkitBorderEndStyle:
+ case CSSPropertyWebkitBorderEndWidth:
+ case CSSPropertyWebkitBorderStart:
+ case CSSPropertyWebkitBorderStartColor:
+ case CSSPropertyWebkitBorderStartStyle:
+ case CSSPropertyWebkitBorderStartWidth:
case CSSPropertyWebkitMarginEnd:
case CSSPropertyWebkitMarginStart:
case CSSPropertyWebkitPaddingEnd:
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index be410b4..6bf7751 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -812,6 +812,8 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | dashed |
case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | inset | outset
case CSSPropertyBorderLeftStyle:
+ case CSSPropertyWebkitBorderStartStyle:
+ case CSSPropertyWebkitBorderEndStyle:
case CSSPropertyWebkitColumnRuleStyle:
if (id >= CSSValueNone && id <= CSSValueDouble)
validPrimitive = true;
@@ -851,12 +853,14 @@ bool CSSParser::parseValue(int propId, bool important)
break;
}
/* nobreak */
- case CSSPropertyBackgroundColor: // <color> | inherit
- case CSSPropertyBorderTopColor: // <color> | inherit
- case CSSPropertyBorderRightColor: // <color> | inherit
- case CSSPropertyBorderBottomColor: // <color> | inherit
- case CSSPropertyBorderLeftColor: // <color> | inherit
- case CSSPropertyColor: // <color> | inherit
+ case CSSPropertyBackgroundColor: // <color> | inherit
+ case CSSPropertyBorderTopColor: // <color> | inherit
+ case CSSPropertyBorderRightColor:
+ case CSSPropertyBorderBottomColor:
+ case CSSPropertyBorderLeftColor:
+ case CSSPropertyWebkitBorderStartColor:
+ case CSSPropertyWebkitBorderEndColor:
+ case CSSPropertyColor: // <color> | inherit
case CSSPropertyTextLineThroughColor: // CSS3 text decoration colors
case CSSPropertyTextUnderlineColor:
case CSSPropertyTextOverlineColor:
@@ -1005,6 +1009,8 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderRightWidth: // Which is defined as
case CSSPropertyBorderBottomWidth: // thin | medium | thick | <length>
case CSSPropertyBorderLeftWidth:
+ case CSSPropertyWebkitBorderStartWidth:
+ case CSSPropertyWebkitBorderEndWidth:
case CSSPropertyWebkitColumnRuleWidth:
if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick)
validPrimitive = true;
@@ -1698,6 +1704,20 @@ bool CSSParser::parseValue(int propId, bool important)
CSSPropertyBorderLeftColor };
return parseShorthand(propId, properties, 3, important);
}
+ case CSSPropertyWebkitBorderStart:
+ // [ '-webkit-border-start-width' || 'border-style' || <color> ] | inherit
+ {
+ const int properties[3] = { CSSPropertyWebkitBorderStartWidth, CSSPropertyWebkitBorderStartStyle,
+ CSSPropertyWebkitBorderStartColor };
+ return parseShorthand(propId, properties, 3, important);
+ }
+ case CSSPropertyWebkitBorderEnd:
+ // [ '-webkit-border-end-width' || 'border-style' || <color> ] | inherit
+ {
+ const int properties[3] = { CSSPropertyWebkitBorderEndWidth, CSSPropertyWebkitBorderEndStyle,
+ CSSPropertyWebkitBorderEndColor };
+ return parseShorthand(propId, properties, 3, important);
+ }
case CSSPropertyOutline:
// [ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit
{
@@ -5657,31 +5677,27 @@ static int cssPropertyID(const UChar* propertyName, unsigned length)
const char* name = buffer;
if (buffer[0] == '-') {
- // If the prefix is -apple- or -khtml-, change it to -webkit-.
- // This makes the string one character longer.
- if (hasPrefix(buffer, length, "-apple-") || hasPrefix(buffer, length, "-khtml-")) {
+ if (!strcmp(buffer, "-apple-dashboard-region") || !strcmp(buffer, "-apple-line-clamp")) {
+ // Support two Apple-specific CSS properties previously used for
+ // the Dashboard and Safari RSS line clamping.
memmove(buffer + 7, buffer + 6, length + 1 - 6);
memcpy(buffer, "-webkit", 7);
++length;
- }
-
- if (hasPrefix(buffer, length, "-webkit")) {
- if (strcmp(buffer, "-webkit-opacity") == 0) {
- // Honor -webkit-opacity as a synonym for opacity.
- // This was the only syntax that worked in Safari 1.1, and may be in use on some websites and widgets.
- const char* const opacity = "opacity";
- name = opacity;
- length = strlen(opacity);
- } else if (hasPrefix(buffer + 7, length - 7, "-border-")) {
- // -webkit-border-*-*-radius worked in Safari 4 and earlier. -webkit-border-radius syntax
- // differs from border-radius, so it is remains as a distinct property.
- if (!strcmp(buffer + 15, "top-left-radius")
- || !strcmp(buffer + 15, "top-right-radius")
- || !strcmp(buffer + 15, "bottom-right-radius")
- || !strcmp(buffer + 15, "bottom-left-radius")) {
- name = buffer + 8;
- length -= 8;
- }
+ } else if (!strcmp(buffer, "-webkit-opacity")) {
+ // Honor -webkit-opacity as a synonym for opacity. This was the only
+ // syntax that worked in Safari 1.1, and may be in use on some websites and widgets.
+ const char* const opacity = "opacity";
+ name = opacity;
+ length = 7;
+ } else if (hasPrefix(buffer, length, "-webkit-border-")) {
+ // -webkit-border-*-*-radius worked in Safari 4 and earlier. -webkit-border-radius syntax
+ // differs from border-radius, so it remains as a distinct property.
+ if (!strcmp(buffer + 15, "top-left-radius")
+ || !strcmp(buffer + 15, "top-right-radius")
+ || !strcmp(buffer + 15, "bottom-right-radius")
+ || !strcmp(buffer + 15, "bottom-left-radius")) {
+ name = buffer + 8;
+ length -= 8;
}
}
}
diff --git a/WebCore/css/CSSProperty.cpp b/WebCore/css/CSSProperty.cpp
index 777c0c0..453b381 100644
--- a/WebCore/css/CSSProperty.cpp
+++ b/WebCore/css/CSSProperty.cpp
@@ -45,10 +45,30 @@ int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection dir
return direction == LTR ? CSSPropertyMarginRight : CSSPropertyMarginLeft;
case CSSPropertyWebkitMarginStart:
return direction == LTR ? CSSPropertyMarginLeft : CSSPropertyMarginRight;
+
case CSSPropertyWebkitPaddingEnd:
return direction == LTR ? CSSPropertyPaddingRight : CSSPropertyPaddingLeft;
case CSSPropertyWebkitPaddingStart:
return direction == LTR ? CSSPropertyPaddingLeft : CSSPropertyPaddingRight;
+
+ case CSSPropertyWebkitBorderEnd:
+ return direction == LTR ? CSSPropertyBorderRight : CSSPropertyBorderLeft;
+ case CSSPropertyWebkitBorderEndColor:
+ return direction == LTR ? CSSPropertyBorderRightColor : CSSPropertyBorderLeftColor;
+ case CSSPropertyWebkitBorderEndStyle:
+ return direction == LTR ? CSSPropertyBorderRightStyle : CSSPropertyBorderLeftStyle;
+ case CSSPropertyWebkitBorderEndWidth:
+ return direction == LTR ? CSSPropertyBorderRightWidth : CSSPropertyBorderLeftWidth;
+
+ case CSSPropertyWebkitBorderStart:
+ return direction == LTR ? CSSPropertyBorderLeft : CSSPropertyBorderRight;
+ case CSSPropertyWebkitBorderStartColor:
+ return direction == LTR ? CSSPropertyBorderLeftColor : CSSPropertyBorderRightColor;
+ case CSSPropertyWebkitBorderStartStyle:
+ return direction == LTR ? CSSPropertyBorderLeftStyle : CSSPropertyBorderRightStyle;
+ case CSSPropertyWebkitBorderStartWidth:
+ return direction == LTR ? CSSPropertyBorderLeftWidth : CSSPropertyBorderRightWidth;
+
default:
return propertyID;
}
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index a330abe..44216e0 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -173,14 +173,21 @@ z-index
# whereas background-size: l; is equivalent to background-size: l auto;
-webkit-background-size
-webkit-binding
+-webkit-border-end
+-webkit-border-end-color
+-webkit-border-end-style
+-webkit-border-end-width
-webkit-border-fit
-webkit-border-horizontal-spacing
-webkit-border-image
-
# -webkit-border-radius differs from border-radius only in the interpretation of
# a value consisting of two lengths: "-webkit-border-radius: l1 l2;" is equivalent
# to "border-radius: l1 / l2;"
-webkit-border-radius
+-webkit-border-start
+-webkit-border-start-color
+-webkit-border-start-style
+-webkit-border-start-width
-webkit-border-vertical-spacing
-webkit-box-align
-webkit-box-direction
diff --git a/WebCore/css/CSSSegmentedFontFace.cpp b/WebCore/css/CSSSegmentedFontFace.cpp
index b13dd9c..bda29f0 100644
--- a/WebCore/css/CSSSegmentedFontFace.cpp
+++ b/WebCore/css/CSSSegmentedFontFace.cpp
@@ -59,24 +59,15 @@ void CSSSegmentedFontFace::pruneTable()
m_fontDataTable.clear();
}
-bool CSSSegmentedFontFace::isLoaded() const
-{
- unsigned size = m_fontFaces.size();
- for (unsigned i = 0; i < size; i++) {
- if (!m_fontFaces[i]->isLoaded())
- return false;
- }
- return true;
-}
-
bool CSSSegmentedFontFace::isValid() const
{
+ // Valid if at least one font face is valid.
unsigned size = m_fontFaces.size();
for (unsigned i = 0; i < size; i++) {
- if (!m_fontFaces[i]->isValid())
- return false;
+ if (m_fontFaces[i]->isValid())
+ return true;
}
- return true;
+ return false;
}
void CSSSegmentedFontFace::fontLoaded(CSSFontFace*)
@@ -107,6 +98,8 @@ FontData* CSSSegmentedFontFace::getFontData(const FontDescription& fontDescripti
unsigned size = m_fontFaces.size();
for (unsigned i = 0; i < size; i++) {
+ if (!m_fontFaces[i]->isValid())
+ continue;
FontTraitsMask traitsMask = m_fontFaces[i]->traitsMask();
bool syntheticBold = !(traitsMask & (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask)) && (desiredTraitsMask & (FontWeight600Mask | FontWeight700Mask | FontWeight800Mask | FontWeight900Mask));
bool syntheticItalic = !(traitsMask & FontStyleItalicMask) && (desiredTraitsMask & FontStyleItalicMask);
diff --git a/WebCore/css/CSSSegmentedFontFace.h b/WebCore/css/CSSSegmentedFontFace.h
index 57a3c58..03ebe4a 100644
--- a/WebCore/css/CSSSegmentedFontFace.h
+++ b/WebCore/css/CSSSegmentedFontFace.h
@@ -45,8 +45,6 @@ public:
static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector) { return adoptRef(new CSSSegmentedFontFace(selector)); }
~CSSSegmentedFontFace();
- bool isLoaded() const;
- bool isValid() const;
CSSFontSelector* fontSelector() const { return m_fontSelector; }
void fontLoaded(CSSFontFace*);
@@ -59,6 +57,7 @@ private:
CSSSegmentedFontFace(CSSFontSelector*);
void pruneTable();
+ bool isValid() const;
CSSFontSelector* m_fontSelector;
HashMap<unsigned, SegmentedFontData*> m_fontDataTable;
diff --git a/WebCore/css/CSSSelector.cpp b/WebCore/css/CSSSelector.cpp
index 47ead5f..b1de4ec 100644
--- a/WebCore/css/CSSSelector.cpp
+++ b/WebCore/css/CSSSelector.cpp
@@ -31,11 +31,83 @@
#include <wtf/Assertions.h>
#include <wtf/HashMap.h>
#include <wtf/StdLibExtras.h>
+#include <wtf/Vector.h>
namespace WebCore {
using namespace HTMLNames;
+// A helper class to hold CSSSelectors.
+class CSSSelectorBag : public Noncopyable {
+public:
+ ~CSSSelectorBag()
+ {
+ deleteAllValues(m_stack);
+ }
+
+ bool isEmpty() const
+ {
+ return m_stack.isEmpty();
+ }
+
+ void append(PassOwnPtr<CSSSelector> selector)
+ {
+ if (selector)
+ m_stack.append(selector.leakPtr());
+ }
+
+ PassOwnPtr<CSSSelector> takeAny()
+ {
+ ASSERT(!isEmpty());
+ OwnPtr<CSSSelector> selector = adoptPtr(m_stack.last());
+ m_stack.removeLast();
+ return selector.release();
+ }
+
+private:
+ Vector<CSSSelector*, 16> m_stack;
+};
+
+CSSSelector::~CSSSelector()
+{
+ // We should avoid a recursive destructor call, which causes stack overflow
+ // if CSS Selectors are deeply nested.
+
+ // Early exit if we have already processed the children of this selector.
+ if (m_hasRareData) {
+ if (!m_data.m_rareData)
+ return;
+ } else if (!m_data.m_tagHistory)
+ return;
+
+ CSSSelectorBag selectorsToBeDeleted;
+ if (m_hasRareData) {
+ selectorsToBeDeleted.append(m_data.m_rareData->m_tagHistory.release());
+ selectorsToBeDeleted.append(m_data.m_rareData->m_simpleSelector.release());
+ delete m_data.m_rareData;
+ } else
+ selectorsToBeDeleted.append(adoptPtr(m_data.m_tagHistory));
+
+ // Traverse the tree of CSSSelector and delete each CSSSelector iteratively.
+ while (!selectorsToBeDeleted.isEmpty()) {
+ OwnPtr<CSSSelector> selector(selectorsToBeDeleted.takeAny());
+ ASSERT(selector);
+ if (selector->m_hasRareData) {
+ ASSERT(selector->m_data.m_rareData);
+ selectorsToBeDeleted.append(selector->m_data.m_rareData->m_tagHistory.release());
+ selectorsToBeDeleted.append(selector->m_data.m_rareData->m_simpleSelector.release());
+ delete selector->m_data.m_rareData;
+ // Clear the pointer so that a destructor of the selector, which is
+ // about to be called, can know the children are already processed.
+ selector->m_data.m_rareData = 0;
+ } else {
+ selectorsToBeDeleted.append(adoptPtr(selector->m_data.m_tagHistory));
+ // Clear the pointer for the same reason.
+ selector->m_data.m_tagHistory = 0;
+ }
+ }
+}
+
unsigned int CSSSelector::specificity()
{
if (m_isForPage)
@@ -63,6 +135,7 @@ unsigned int CSSSelector::specificity()
break;
}
+ // FIXME: Avoid recursive calls to prevent possible stack overflow.
if (CSSSelector* tagHistory = this->tagHistory())
s += tagHistory->specificity();
@@ -906,5 +979,5 @@ bool CSSSelector::RareData::matchNth(int count)
return (m_b - count) % (-m_a) == 0;
}
}
-
+
} // namespace WebCore
diff --git a/WebCore/css/CSSSelector.h b/WebCore/css/CSSSelector.h
index fc0dd7b..518ff2c 100644
--- a/WebCore/css/CSSSelector.h
+++ b/WebCore/css/CSSSelector.h
@@ -22,8 +22,8 @@
#ifndef CSSSelector_h
#define CSSSelector_h
-#include "RenderStyleConstants.h"
#include "QualifiedName.h"
+#include "RenderStyleConstants.h"
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
@@ -57,13 +57,7 @@ namespace WebCore {
{
}
- ~CSSSelector()
- {
- if (m_hasRareData)
- delete m_data.m_rareData;
- else
- delete m_data.m_tagHistory;
- }
+ ~CSSSelector();
/**
* Re-create selector text from selector's data
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 44d9e66..516e0e2 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -2600,11 +2600,11 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
AtomicString value;
// The language property is inherited, so we iterate over the parents
// to find the first language.
- while (n && value.isEmpty()) {
+ while (n && value.isNull()) {
if (n->isElementNode()) {
// Spec: xml:lang takes precedence -- http://www.w3.org/TR/xhtml1/#C_7
value = static_cast<Element*>(n)->fastGetAttribute(XMLNames::langAttr);
- if (value.isEmpty())
+ if (value.isNull())
value = static_cast<Element*>(n)->fastGetAttribute(langAttr);
} else if (n->isDocumentNode())
// checking the MIME content-language
@@ -2613,7 +2613,7 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
n = n->parent();
}
const AtomicString& argument = sel->argument();
- if (value.isEmpty() || !value.startsWith(argument, false))
+ if (value.isNull() || !value.startsWith(argument, false))
break;
if (value.length() != argument.length() && value[argument.length()] != '-')
break;
@@ -5479,6 +5479,23 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
case CSSPropertyInvalid:
return;
+
+ // Directional properties are resolved by resolveDirectionAwareProperty() before the switch.
+ case CSSPropertyWebkitBorderEnd:
+ case CSSPropertyWebkitBorderEndColor:
+ case CSSPropertyWebkitBorderEndStyle:
+ case CSSPropertyWebkitBorderEndWidth:
+ case CSSPropertyWebkitBorderStart:
+ case CSSPropertyWebkitBorderStartColor:
+ case CSSPropertyWebkitBorderStartStyle:
+ case CSSPropertyWebkitBorderStartWidth:
+ case CSSPropertyWebkitMarginEnd:
+ case CSSPropertyWebkitMarginStart:
+ case CSSPropertyWebkitPaddingEnd:
+ case CSSPropertyWebkitPaddingStart:
+ ASSERT_NOT_REACHED();
+ break;
+
case CSSPropertyFontStretch:
case CSSPropertyPage:
case CSSPropertyQuotes:
@@ -5498,10 +5515,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSPropertyTextUnderlineStyle:
case CSSPropertyTextUnderlineWidth:
case CSSPropertyWebkitFontSizeDelta:
- case CSSPropertyWebkitMarginEnd:
- case CSSPropertyWebkitMarginStart:
- case CSSPropertyWebkitPaddingEnd:
- case CSSPropertyWebkitPaddingStart:
case CSSPropertyWebkitTextDecorationsInEffect:
case CSSPropertyWebkitTextStroke:
case CSSPropertyWebkitVariableDeclarationBlock:
diff --git a/WebCore/css/CSSStyleSelector.h b/WebCore/css/CSSStyleSelector.h
index dca6c1c..6e4a26b 100644
--- a/WebCore/css/CSSStyleSelector.h
+++ b/WebCore/css/CSSStyleSelector.h
@@ -87,7 +87,6 @@ public:
bool strictParsing, bool matchAuthorAndUserStyles);
~CSSStyleSelector();
- void initForStyleResolve(Element*, RenderStyle* parentStyle = 0, PseudoId = NOPSEUDO);
PassRefPtr<RenderStyle> styleForElement(Element* e, RenderStyle* parentStyle = 0, bool allowSharing = true, bool resolveForRootDefault = false, bool matchVisitedPseudoClass = false);
void keyframeStylesForAnimation(Element*, const RenderStyle*, KeyframeList& list);
@@ -105,6 +104,7 @@ public:
#endif
private:
+ void initForStyleResolve(Element*, RenderStyle* parentStyle = 0, PseudoId = NOPSEUDO);
void initElement(Element*);
RenderStyle* locateSharedStyle();
Node* locateCousinList(Element* parent, unsigned depth = 1);
@@ -119,11 +119,11 @@ public:
PassRefPtr<CSSRuleList> styleRulesForElement(Element*, bool authorOnly);
PassRefPtr<CSSRuleList> pseudoStyleRulesForElement(Element*, PseudoId, bool authorOnly);
+ private:
// Given a CSS keyword in the range (xx-small to -webkit-xxx-large), this function will return
// the correct font size scaled relative to the user's default (medium).
static float fontSizeForKeyword(Document*, int keyword, bool monospace);
-
- private:
+
// When the CSS keyword "larger" is used, this function will attempt to match within the keyword
// table, and failing that, will simply multiply by 1.2.
float largerFontSize(float size, bool quirksMode) const;
@@ -133,11 +133,11 @@ public:
public:
void setStyle(PassRefPtr<RenderStyle> s) { m_style = s; } // Used by the document when setting up its root style.
- void setFontSize(FontDescription&, float size);
void applyPropertyToStyle(int id, CSSValue*, RenderStyle*);
private:
+ void setFontSize(FontDescription&, float size);
static float getComputedSizeFromSpecifiedSize(Document*, RenderStyle*, bool isAbsoluteSize, float specifiedSize, bool useSVGZoomRules);
public:
diff --git a/WebCore/css/WebKitCSSTransformValue.idl b/WebCore/css/WebKitCSSTransformValue.idl
index 087aa82..007097e 100644
--- a/WebCore/css/WebKitCSSTransformValue.idl
+++ b/WebCore/css/WebKitCSSTransformValue.idl
@@ -29,7 +29,8 @@
module css {
interface [
- HasIndexGetter
+ HasIndexGetter,
+ DontCheckEnums
] WebKitCSSTransformValue : CSSValueList {
// OperationTypes
diff --git a/WebCore/dom/CharacterData.cpp b/WebCore/dom/CharacterData.cpp
index 5fbb6f2..7accbfb 100644
--- a/WebCore/dom/CharacterData.cpp
+++ b/WebCore/dom/CharacterData.cpp
@@ -59,10 +59,10 @@ String CharacterData::substringData(unsigned offset, unsigned count, ExceptionCo
return m_data->substring(offset, count);
}
-PassRefPtr<StringImpl> CharacterData::parserAppendData(const String& arg)
+PassRefPtr<StringImpl> CharacterData::appendDataCommon(const String& data)
{
String newStr = m_data;
- newStr.append(arg);
+ newStr.append(data);
RefPtr<StringImpl> oldStr = m_data;
m_data = newStr.impl();
@@ -76,20 +76,29 @@ PassRefPtr<StringImpl> CharacterData::parserAppendData(const String& arg)
return oldStr.release();
}
-void CharacterData::appendData(const String& arg, ExceptionCode&)
+void CharacterData::parserAppendData(const String& data)
{
- RefPtr<StringImpl> oldStr = parserAppendData(arg);
+ appendDataCommon(data);
+ // We don't call dispatchModifiedEvent here because we don't want the
+ // parser to dispatch DOM mutation events.
+ if (parentNode())
+ parentNode()->childrenChanged();
+}
+
+void CharacterData::appendData(const String& data, ExceptionCode&)
+{
+ RefPtr<StringImpl> oldStr = appendDataCommon(data);
dispatchModifiedEvent(oldStr.get());
}
-void CharacterData::insertData(unsigned offset, const String& arg, ExceptionCode& ec)
+void CharacterData::insertData(unsigned offset, const String& data, ExceptionCode& ec)
{
checkCharDataOperation(offset, ec);
if (ec)
return;
String newStr = m_data;
- newStr.insert(arg, offset);
+ newStr.insert(data, offset);
RefPtr<StringImpl> oldStr = m_data;
m_data = newStr.impl();
@@ -102,7 +111,7 @@ void CharacterData::insertData(unsigned offset, const String& arg, ExceptionCode
dispatchModifiedEvent(oldStr.get());
- document()->textInserted(this, offset, arg.length());
+ document()->textInserted(this, offset, data.length());
}
void CharacterData::deleteData(unsigned offset, unsigned count, ExceptionCode& ec)
@@ -134,7 +143,7 @@ void CharacterData::deleteData(unsigned offset, unsigned count, ExceptionCode& e
document()->textRemoved(this, offset, realCount);
}
-void CharacterData::replaceData(unsigned offset, unsigned count, const String& arg, ExceptionCode& ec)
+void CharacterData::replaceData(unsigned offset, unsigned count, const String& data, ExceptionCode& ec)
{
checkCharDataOperation(offset, ec);
if (ec)
@@ -148,7 +157,7 @@ void CharacterData::replaceData(unsigned offset, unsigned count, const String& a
String newStr = m_data;
newStr.remove(offset, realCount);
- newStr.insert(arg, offset);
+ newStr.insert(data, offset);
RefPtr<StringImpl> oldStr = m_data;
m_data = newStr.impl();
@@ -163,7 +172,7 @@ void CharacterData::replaceData(unsigned offset, unsigned count, const String& a
// update the markers for spell checking and grammar checking
document()->textRemoved(this, offset, realCount);
- document()->textInserted(this, offset, arg.length());
+ document()->textInserted(this, offset, data.length());
}
String CharacterData::nodeValue() const
diff --git a/WebCore/dom/CharacterData.h b/WebCore/dom/CharacterData.h
index ecc0cf7..94e812b 100644
--- a/WebCore/dom/CharacterData.h
+++ b/WebCore/dom/CharacterData.h
@@ -43,7 +43,7 @@ public:
StringImpl* dataImpl() { return m_data.get(); }
// Like appendData, but optimized for the parser (e.g., no mutation events).
- PassRefPtr<StringImpl> parserAppendData(const String&);
+ void parserAppendData(const String&);
protected:
CharacterData(Document* document, const String& text, ConstructionType type)
@@ -66,6 +66,7 @@ private:
virtual bool offsetInCharacters() const;
void checkCharDataOperation(unsigned offset, ExceptionCode&);
+ PassRefPtr<StringImpl> appendDataCommon(const String&);
RefPtr<StringImpl> m_data;
};
diff --git a/WebCore/dom/ContainerNode.cpp b/WebCore/dom/ContainerNode.cpp
index 80bd035..23b68ba 100644
--- a/WebCore/dom/ContainerNode.cpp
+++ b/WebCore/dom/ContainerNode.cpp
@@ -215,7 +215,6 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
bool isFragment = newChild->nodeType() == DOCUMENT_FRAGMENT_NODE;
// Add the new child(ren)
- int childCountDelta = 0;
RefPtr<Node> child = isFragment ? newChild->firstChild() : newChild;
while (child) {
// If the new child is already in the right place, we're done.
@@ -240,8 +239,6 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
if (child->parentNode())
break;
- childCountDelta++;
-
ASSERT(!child->nextSibling());
ASSERT(!child->previousSibling());
@@ -269,6 +266,7 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
child->setNextSibling(next);
allowEventDispatch();
+ childrenChanged(false, prev.get(), next, 1);
notifyChildInserted(child.get());
// Add child to the rendering tree
@@ -287,8 +285,6 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
child = nextChild.release();
}
- if (childCountDelta)
- childrenChanged(false, prev.get(), next.get(), childCountDelta);
dispatchSubtreeModifiedEvent();
return true;
}
@@ -531,6 +527,7 @@ bool ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionCode& ec, bo
// Now that the child is attached to the render tree, dispatch
// the relevant mutation events.
dispatchChildInsertionEvents(child);
+ prev = child;
}
dispatchSubtreeModifiedEvent();
@@ -706,7 +703,6 @@ void ContainerNode::cloneChildNodes(ContainerNode *clone)
document()->frame()->editor()->deleteButtonController()->enable();
}
-// FIXME: This doesn't work correctly with transforms.
bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
{
if (!renderer())
@@ -716,7 +712,7 @@ bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
RenderObject *p = o;
if (!o->isInline() || o->isReplaced()) {
- point = o->localToAbsolute();
+ point = o->localToAbsolute(FloatPoint(), false, true);
return true;
}
@@ -741,14 +737,14 @@ bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
ASSERT(o);
if (!o->isInline() || o->isReplaced()) {
- point = o->localToAbsolute();
+ point = o->localToAbsolute(FloatPoint(), false, true);
return true;
}
if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toRenderText(o)->firstTextBox()) {
// do nothing - skip unrendered whitespace that is a child or next sibling of the anchor
} else if ((o->isText() && !o->isBR()) || o->isReplaced()) {
- point = o->container()->localToAbsolute();
+ point = FloatPoint();
if (o->isText() && toRenderText(o)->firstTextBox()) {
point.move(toRenderText(o)->linesBoundingBox().x(),
toRenderText(o)->firstTextBox()->root()->lineTop());
@@ -756,6 +752,7 @@ bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
RenderBox* box = toRenderBox(o);
point.move(box->x(), box->y());
}
+ point = o->container()->localToAbsolute(point, false, true);
return true;
}
}
@@ -778,7 +775,7 @@ bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
RenderObject* o = renderer();
if (!o->isInline() || o->isReplaced()) {
RenderBox* box = toRenderBox(o);
- point = o->localToAbsolute();
+ point = o->localToAbsolute(FloatPoint(), false, true);
point.move(box->width(), box->height());
return true;
}
@@ -801,7 +798,7 @@ bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
}
ASSERT(o);
if (o->isText() || o->isReplaced()) {
- point = o->container()->localToAbsolute();
+ point = FloatPoint();
if (o->isText()) {
RenderText* text = toRenderText(o);
IntRect linesBox = text->linesBoundingBox();
@@ -810,6 +807,7 @@ bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
RenderBox* box = toRenderBox(o);
point.move(box->x() + box->width(), box->y() + box->height());
}
+ point = o->container()->localToAbsolute(point, false, true);
return true;
}
}
diff --git a/WebCore/dom/DOMCoreException.idl b/WebCore/dom/DOMCoreException.idl
index 2cbc589..945712d 100644
--- a/WebCore/dom/DOMCoreException.idl
+++ b/WebCore/dom/DOMCoreException.idl
@@ -29,7 +29,8 @@
module core {
interface [
- NoStaticTables
+ NoStaticTables,
+ DontCheckEnums
] DOMCoreException {
readonly attribute unsigned short code;
diff --git a/WebCore/dom/DeviceOrientation.cpp b/WebCore/dom/DeviceOrientation.cpp
new file mode 100644
index 0000000..f1c28b1
--- /dev/null
+++ b/WebCore/dom/DeviceOrientation.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DeviceOrientation.h"
+
+namespace WebCore {
+
+PassRefPtr<DeviceOrientation> DeviceOrientation::create()
+{
+ return adoptRef(new DeviceOrientation);
+}
+
+PassRefPtr<DeviceOrientation> DeviceOrientation::create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+{
+ return adoptRef(new DeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma));
+}
+
+
+DeviceOrientation::DeviceOrientation()
+ : m_canProvideAlpha(false)
+ , m_canProvideBeta(false)
+ , m_canProvideGamma(false)
+{
+}
+
+DeviceOrientation::DeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+ : m_canProvideAlpha(canProvideAlpha)
+ , m_canProvideBeta(canProvideBeta)
+ , m_canProvideGamma(canProvideGamma)
+ , m_alpha(alpha)
+ , m_beta(beta)
+ , m_gamma(gamma)
+{
+}
+
+double DeviceOrientation::alpha() const
+{
+ return m_alpha;
+}
+
+double DeviceOrientation::beta() const
+{
+ return m_beta;
+}
+
+double DeviceOrientation::gamma() const
+{
+ return m_gamma;
+}
+
+bool DeviceOrientation::canProvideAlpha() const
+{
+ return m_canProvideAlpha;
+}
+
+bool DeviceOrientation::canProvideBeta() const
+{
+ return m_canProvideBeta;
+}
+
+bool DeviceOrientation::canProvideGamma() const
+{
+ return m_canProvideGamma;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/DeviceOrientation.h b/WebCore/dom/DeviceOrientation.h
new file mode 100644
index 0000000..c652736
--- /dev/null
+++ b/WebCore/dom/DeviceOrientation.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DeviceOrientation_h
+#define DeviceOrientation_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DeviceOrientation : public RefCounted<DeviceOrientation> {
+public:
+ static PassRefPtr<DeviceOrientation> create();
+ static PassRefPtr<DeviceOrientation> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
+
+ double alpha() const;
+ double beta() const;
+ double gamma() const;
+ bool canProvideAlpha() const;
+ bool canProvideBeta() const;
+ bool canProvideGamma() const;
+
+private:
+ DeviceOrientation();
+ DeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
+
+ bool m_canProvideAlpha;
+ bool m_canProvideBeta;
+ bool m_canProvideGamma;
+ double m_alpha;
+ double m_beta;
+ double m_gamma;
+};
+
+} // namespace WebCore
+
+#endif // DeviceOrientation_h
diff --git a/WebCore/dom/DeviceOrientationClient.h b/WebCore/dom/DeviceOrientationClient.h
index e0f14eb..427412f 100644
--- a/WebCore/dom/DeviceOrientationClient.h
+++ b/WebCore/dom/DeviceOrientationClient.h
@@ -28,10 +28,13 @@
namespace WebCore {
+class DeviceOrientation;
+
class DeviceOrientationClient {
public:
virtual void startUpdating() = 0;
virtual void stopUpdating() = 0;
+ virtual DeviceOrientation* lastOrientation() const = 0;
protected:
virtual ~DeviceOrientationClient() {}
diff --git a/WebCore/dom/DeviceOrientationController.cpp b/WebCore/dom/DeviceOrientationController.cpp
index 97ddcd8..f6867ec 100644
--- a/WebCore/dom/DeviceOrientationController.cpp
+++ b/WebCore/dom/DeviceOrientationController.cpp
@@ -28,9 +28,9 @@
#if ENABLE(DEVICE_ORIENTATION)
+#include "DeviceOrientation.h"
#include "DeviceOrientationClient.h"
#include "DeviceOrientationEvent.h"
-#include <wtf/UnusedParam.h>
namespace WebCore {
@@ -40,13 +40,49 @@ DeviceOrientationController::DeviceOrientationController(Page* page, DeviceOrien
{
}
-void DeviceOrientationController::onDeviceOrientationChange(double alpha, double beta, double gamma)
+void DeviceOrientationController::addListener(DOMWindow* window)
{
- // FIXME: Fire DeviceOrientationEvents on the window object of all frames
- // that are listening to orientation.
- UNUSED_PARAM(alpha);
- UNUSED_PARAM(beta);
- UNUSED_PARAM(gamma);
+ // If no client is present, signal that no orientation data is available.
+ // If the client already has an orientation, call back to this new listener
+ // immediately.
+ if (!m_client) {
+ RefPtr<DeviceOrientation> emptyOrientation = DeviceOrientation::create();
+ window->dispatchEvent(DeviceOrientationEvent::create(eventNames().deviceorientationEvent, emptyOrientation.get()));
+ } else if (m_client && m_client->lastOrientation())
+ window->dispatchEvent(DeviceOrientationEvent::create(eventNames().deviceorientationEvent, m_client->lastOrientation()));
+
+ // The client may call back synchronously.
+ bool wasEmpty = m_listeners.isEmpty();
+ m_listeners.add(window);
+ if (wasEmpty && m_client)
+ m_client->startUpdating();
+}
+
+void DeviceOrientationController::removeListener(DOMWindow* window)
+{
+ m_listeners.remove(window);
+ if (m_listeners.isEmpty() && m_client)
+ m_client->stopUpdating();
+}
+
+void DeviceOrientationController::removeAllListeners(DOMWindow* window)
+{
+ // May be called with a DOMWindow that's not a listener.
+ if (!m_listeners.contains(window))
+ return;
+
+ m_listeners.removeAll(window);
+ if (m_listeners.isEmpty() && m_client)
+ m_client->stopUpdating();
+}
+
+void DeviceOrientationController::didChangeDeviceOrientation(DeviceOrientation* orientation)
+{
+ RefPtr<DeviceOrientationEvent> event = DeviceOrientationEvent::create(eventNames().deviceorientationEvent, orientation);
+ Vector<DOMWindow*> listenersVector;
+ copyToVector(m_listeners, listenersVector);
+ for (size_t i = 0; i < listenersVector.size(); ++i)
+ listenersVector[i]->dispatchEvent(event);
}
} // namespace WebCore
diff --git a/WebCore/dom/DeviceOrientationController.h b/WebCore/dom/DeviceOrientationController.h
index 5f8f49a..376e14c 100644
--- a/WebCore/dom/DeviceOrientationController.h
+++ b/WebCore/dom/DeviceOrientationController.h
@@ -26,8 +26,12 @@
#ifndef DeviceOrientationController_h
#define DeviceOrientationController_h
+#include "DOMWindow.h"
+#include <wtf/HashCountedSet.h>
+
namespace WebCore {
+class DeviceOrientation;
class DeviceOrientationClient;
class Page;
@@ -35,13 +39,17 @@ class DeviceOrientationController {
public:
DeviceOrientationController(Page*, DeviceOrientationClient*);
- // FIXME: Add methods to start and stop the service.
+ void addListener(DOMWindow*);
+ void removeListener(DOMWindow*);
+ void removeAllListeners(DOMWindow*);
- void onDeviceOrientationChange(double alpha, double beta, double gamma);
+ void didChangeDeviceOrientation(DeviceOrientation*);
private:
Page* m_page;
DeviceOrientationClient* m_client;
+ typedef HashCountedSet<DOMWindow*> ListenersSet;
+ ListenersSet m_listeners;
};
} // namespace WebCore
diff --git a/WebCore/dom/DeviceOrientationEvent.cpp b/WebCore/dom/DeviceOrientationEvent.cpp
index b1aae65..992b6ce 100644
--- a/WebCore/dom/DeviceOrientationEvent.cpp
+++ b/WebCore/dom/DeviceOrientationEvent.cpp
@@ -26,35 +26,34 @@
#include "config.h"
#include "DeviceOrientationEvent.h"
+#include "DeviceOrientation.h"
+
#if ENABLE(DEVICE_ORIENTATION)
namespace WebCore {
+DeviceOrientationEvent::~DeviceOrientationEvent()
+{
+}
+
DeviceOrientationEvent::DeviceOrientationEvent()
- : m_alpha(0)
- , m_beta(0)
- , m_gamma(0)
+ : m_orientation(DeviceOrientation::create())
{
}
-DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, double alpha, double beta, double gamma)
+DeviceOrientationEvent::DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientation* orientation)
: Event(eventType, false, false) // Can't bubble, not cancelable
- , m_alpha(alpha)
- , m_beta(beta)
- , m_gamma(gamma)
+ , m_orientation(orientation)
{
}
-void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double alpha, double beta, double gamma)
+void DeviceOrientationEvent::initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, DeviceOrientation* orientation)
{
if (dispatched())
return;
- initEvent(eventType, canBubble, cancelable);
-
- m_alpha = alpha;
- m_beta = beta;
- m_gamma = gamma;
+ initEvent(type, bubbles, cancelable);
+ m_orientation = orientation;
}
} // namespace WebCore
diff --git a/WebCore/dom/DeviceOrientationEvent.h b/WebCore/dom/DeviceOrientationEvent.h
index 33ff026..bfdf8fb 100644
--- a/WebCore/dom/DeviceOrientationEvent.h
+++ b/WebCore/dom/DeviceOrientationEvent.h
@@ -30,31 +30,31 @@
namespace WebCore {
+class DeviceOrientation;
+
class DeviceOrientationEvent : public Event {
public:
+ ~DeviceOrientationEvent();
static PassRefPtr<DeviceOrientationEvent> create()
{
return adoptRef(new DeviceOrientationEvent);
}
- static PassRefPtr<DeviceOrientationEvent> create(const AtomicString& eventType, double alpha, double beta, double gamma)
+ static PassRefPtr<DeviceOrientationEvent> create(const AtomicString& eventType, DeviceOrientation* orientation)
{
- return adoptRef(new DeviceOrientationEvent(eventType, alpha, beta, gamma));
+ return adoptRef(new DeviceOrientationEvent(eventType, orientation));
}
- void initDeviceOrientationEvent(const AtomicString& eventType, bool canBubble, bool cancelable, double alpha, double beta, double gamma);
- double alpha() const { return m_alpha; }
- double beta() const { return m_beta; }
- double gamma() const { return m_gamma; }
+ void initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, DeviceOrientation*);
virtual bool isDeviceOrientationEvent() const { return true; }
+ DeviceOrientation* orientation() const { return m_orientation.get(); }
+
private:
DeviceOrientationEvent();
- DeviceOrientationEvent(const AtomicString& eventType, double alpha, double beta, double gamma);
+ DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientation*);
- double m_alpha;
- double m_beta;
- double m_gamma;
+ RefPtr<DeviceOrientation> m_orientation;
};
} // namespace WebCore
diff --git a/WebCore/dom/DeviceOrientationEvent.idl b/WebCore/dom/DeviceOrientationEvent.idl
index 95d96ec..5582f0d 100644
--- a/WebCore/dom/DeviceOrientationEvent.idl
+++ b/WebCore/dom/DeviceOrientationEvent.idl
@@ -28,10 +28,10 @@ module core {
interface [
Conditional=DEVICE_ORIENTATION
] DeviceOrientationEvent : Event {
- readonly attribute double alpha;
- readonly attribute double beta;
- readonly attribute double gamma;
- void initDeviceOrientationEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in double alpha, in double beta, in double gamma);
+ readonly attribute [Custom] double alpha;
+ readonly attribute [Custom] double beta;
+ readonly attribute [Custom] double gamma;
+ [Custom] void initDeviceOrientationEvent(in DOMString type, in boolean bubbles, in boolean cancelable, in double alpha, in double beta, in double gamma);
};
}
diff --git a/WebCore/dom/EventException.idl b/WebCore/dom/EventException.idl
index 1c8fac6..c8f2bde 100644
--- a/WebCore/dom/EventException.idl
+++ b/WebCore/dom/EventException.idl
@@ -30,7 +30,8 @@ module events {
// Introduced in DOM Level 2:
interface [
- NoStaticTables
+ NoStaticTables,
+ DontCheckEnums
] EventException {
readonly attribute unsigned short code;
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index 73eb926..2032612 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -683,9 +683,8 @@ RenderBoxModelObject* Node::renderBoxModelObject() const
IntRect Node::getRect() const
{
- // FIXME: broken with transforms
if (renderer())
- return renderer()->absoluteBoundingBoxRect();
+ return renderer()->absoluteBoundingBoxRect(true);
return IntRect();
}
diff --git a/WebCore/dom/Node.idl b/WebCore/dom/Node.idl
index 07046d1..e15b210 100644
--- a/WebCore/dom/Node.idl
+++ b/WebCore/dom/Node.idl
@@ -28,7 +28,8 @@ module core {
EventTarget,
GenerateNativeConverter,
InlineGetOwnPropertySlot,
- Polymorphic
+ Polymorphic,
+ DontCheckEnums
] Node
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
: Object, EventTarget
diff --git a/WebCore/dom/NodeRareData.h b/WebCore/dom/NodeRareData.h
index 4d80cee..531fc57 100644
--- a/WebCore/dom/NodeRareData.h
+++ b/WebCore/dom/NodeRareData.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 David Smith <catfish.man@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -29,8 +29,8 @@
#include "StringHash.h"
#include "TagNodeList.h"
#include <wtf/HashSet.h>
-#include <wtf/PassOwnPtr.h>
#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
@@ -77,6 +77,10 @@ public:
{
}
+ virtual ~NodeRareData()
+ {
+ }
+
typedef HashMap<const Node*, NodeRareData*> NodeRareDataMap;
static NodeRareDataMap& rareDataMap()
@@ -123,6 +127,6 @@ private:
bool m_needsFocusAppearanceUpdateSoonAfterAttach : 1;
};
-} //namespace
+} // namespace WebCore
-#endif
+#endif // NodeRareData_h
diff --git a/WebCore/dom/OverflowEvent.idl b/WebCore/dom/OverflowEvent.idl
index 0b4f5c6..74cf56b 100644
--- a/WebCore/dom/OverflowEvent.idl
+++ b/WebCore/dom/OverflowEvent.idl
@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module events {
-
- interface OverflowEvent : Event {
+ // FIXME: Converge these consts and OverflowEvent::orientType values and remove DontCheckEnums attribute.
+ interface [DontCheckEnums] OverflowEvent : Event {
const unsigned short HORIZONTAL = 0;
const unsigned short VERTICAL = 1;
const unsigned short BOTH = 2;
diff --git a/WebCore/dom/RangeException.idl b/WebCore/dom/RangeException.idl
index 100912d..c7c8558 100644
--- a/WebCore/dom/RangeException.idl
+++ b/WebCore/dom/RangeException.idl
@@ -19,7 +19,7 @@
module ranges {
- interface RangeException {
+ interface [DontCheckEnums] RangeException {
readonly attribute unsigned short code;
readonly attribute DOMString name;
diff --git a/WebCore/dom/TreeWalker.cpp b/WebCore/dom/TreeWalker.cpp
index de06363..9c46fb3 100644
--- a/WebCore/dom/TreeWalker.cpp
+++ b/WebCore/dom/TreeWalker.cpp
@@ -151,8 +151,8 @@ Node* TreeWalker::previousSibling(ScriptState* state)
m_current = sibling.release();
return m_current.get();
case NodeFilter::FILTER_SKIP:
- if (sibling->firstChild()) {
- sibling = sibling->firstChild();
+ if (sibling->lastChild()) {
+ sibling = sibling->lastChild();
continue;
}
break;
@@ -224,8 +224,8 @@ Node* TreeWalker::previousNode(ScriptState* state)
acceptNodeResult = acceptNode(state, node.get());
if (state && state->hadException())
return 0;
- if (acceptNodeResult == NodeFilter::FILTER_ACCEPT)
- continue;
+ if (acceptNodeResult == NodeFilter::FILTER_REJECT)
+ break;
}
if (acceptNodeResult == NodeFilter::FILTER_ACCEPT) {
m_current = node.release();
diff --git a/WebCore/editing/DeleteSelectionCommand.cpp b/WebCore/editing/DeleteSelectionCommand.cpp
index 623b188..c37b0fc 100644
--- a/WebCore/editing/DeleteSelectionCommand.cpp
+++ b/WebCore/editing/DeleteSelectionCommand.cpp
@@ -537,12 +537,12 @@ void DeleteSelectionCommand::fixupWhitespace()
{
updateLayout();
// FIXME: isRenderedCharacter should be removed, and we should use VisiblePosition::characterAfter and VisiblePosition::characterBefore
- if (m_leadingWhitespace.isNotNull() && !m_leadingWhitespace.isRenderedCharacter()) {
+ if (m_leadingWhitespace.isNotNull() && !m_leadingWhitespace.isRenderedCharacter() && m_leadingWhitespace.node()->isTextNode()) {
Text* textNode = static_cast<Text*>(m_leadingWhitespace.node());
ASSERT(!textNode->renderer() || textNode->renderer()->style()->collapseWhiteSpace());
replaceTextInNode(textNode, m_leadingWhitespace.deprecatedEditingOffset(), 1, nonBreakingSpaceString());
}
- if (m_trailingWhitespace.isNotNull() && !m_trailingWhitespace.isRenderedCharacter()) {
+ if (m_trailingWhitespace.isNotNull() && !m_trailingWhitespace.isRenderedCharacter() && m_trailingWhitespace.node()->isTextNode()) {
Text* textNode = static_cast<Text*>(m_trailingWhitespace.node());
ASSERT(!textNode->renderer() ||textNode->renderer()->style()->collapseWhiteSpace());
replaceTextInNode(textNode, m_trailingWhitespace.deprecatedEditingOffset(), 1, nonBreakingSpaceString());
diff --git a/WebCore/editing/InsertLineBreakCommand.cpp b/WebCore/editing/InsertLineBreakCommand.cpp
index d805acf..f815d98 100644
--- a/WebCore/editing/InsertLineBreakCommand.cpp
+++ b/WebCore/editing/InsertLineBreakCommand.cpp
@@ -136,11 +136,8 @@ void InsertLineBreakCommand::doApply()
} else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.node()) || !pos.node()->isTextNode()) {
insertNodeAt(nodeToInsert.get(), pos);
setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM));
- } else {
+ } else if (pos.node()->isTextNode()) {
// Split a text node
- ASSERT(pos.node()->isTextNode());
-
- // Do the split
Text* textNode = static_cast<Text*>(pos.node());
splitTextNode(textNode, pos.deprecatedEditingOffset());
insertNodeBefore(nodeToInsert, textNode);
diff --git a/WebCore/editing/InsertListCommand.cpp b/WebCore/editing/InsertListCommand.cpp
index 0f7dc77..06162c9 100644
--- a/WebCore/editing/InsertListCommand.cpp
+++ b/WebCore/editing/InsertListCommand.cpp
@@ -55,55 +55,10 @@ HTMLElement* InsertListCommand::fixOrphanedListChild(Node* node)
}
InsertListCommand::InsertListCommand(Document* document, Type type)
- : CompositeEditCommand(document), m_type(type), m_forceCreateList(false)
+ : CompositeEditCommand(document), m_type(type)
{
}
-bool InsertListCommand::modifyRange()
-{
- VisibleSelection selection = selectionForParagraphIteration(endingSelection());
- ASSERT(selection.isRange());
- VisiblePosition startOfSelection = selection.visibleStart();
- VisiblePosition endOfSelection = selection.visibleEnd();
- VisiblePosition startOfLastParagraph = startOfParagraph(endOfSelection);
-
- if (startOfParagraph(startOfSelection) == startOfLastParagraph)
- return false;
-
- Node* startList = enclosingList(startOfSelection.deepEquivalent().node());
- Node* endList = enclosingList(endOfSelection.deepEquivalent().node());
- if (!startList || startList != endList)
- m_forceCreateList = true;
-
- setEndingSelection(startOfSelection);
- doApply();
- // Fetch the start of the selection after moving the first paragraph,
- // because moving the paragraph will invalidate the original start.
- // We'll use the new start to restore the original selection after
- // we modified all selected paragraphs.
- startOfSelection = endingSelection().visibleStart();
- VisiblePosition startOfCurrentParagraph = startOfNextParagraph(startOfSelection);
- while (startOfCurrentParagraph != startOfLastParagraph) {
- // doApply() may operate on and remove the last paragraph of the selection from the document
- // if it's in the same list item as startOfCurrentParagraph. Return early to avoid an
- // infinite loop and because there is no more work to be done.
- // FIXME(<rdar://problem/5983974>): The endingSelection() may be incorrect here. Compute
- // the new location of endOfSelection and use it as the end of the new selection.
- if (!startOfLastParagraph.deepEquivalent().node()->inDocument())
- return true;
- setEndingSelection(startOfCurrentParagraph);
- doApply();
- startOfCurrentParagraph = startOfNextParagraph(endingSelection().visibleStart());
- }
- setEndingSelection(endOfSelection);
- doApply();
- // Fetch the end of the selection, for the reason mentioned above.
- endOfSelection = endingSelection().visibleEnd();
- setEndingSelection(VisibleSelection(startOfSelection, endOfSelection));
- m_forceCreateList = false;
- return true;
-}
-
void InsertListCommand::doApply()
{
if (endingSelection().isNone())
@@ -125,9 +80,53 @@ void InsertListCommand::doApply()
if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd))
setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(true)));
- if (endingSelection().isRange() && modifyRange())
- return;
-
+ if (endingSelection().isRange()) {
+ VisibleSelection selection = selectionForParagraphIteration(endingSelection());
+ ASSERT(selection.isRange());
+ VisiblePosition startOfSelection = selection.visibleStart();
+ VisiblePosition endOfSelection = selection.visibleEnd();
+ VisiblePosition startOfLastParagraph = startOfParagraph(endOfSelection);
+
+ if (startOfParagraph(startOfSelection) != startOfLastParagraph) {
+ Node* startList = enclosingList(startOfSelection.deepEquivalent().node());
+ Node* endList = enclosingList(endOfSelection.deepEquivalent().node());
+ bool forceCreateList = !startList || startList != endList;
+
+ VisiblePosition startOfCurrentParagraph = startOfSelection;
+ while (startOfCurrentParagraph != startOfLastParagraph) {
+ // doApply() may operate on and remove the last paragraph of the selection from the document
+ // if it's in the same list item as startOfCurrentParagraph. Return early to avoid an
+ // infinite loop and because there is no more work to be done.
+ // FIXME(<rdar://problem/5983974>): The endingSelection() may be incorrect here. Compute
+ // the new location of endOfSelection and use it as the end of the new selection.
+ if (!startOfLastParagraph.deepEquivalent().node()->inDocument())
+ return;
+ setEndingSelection(startOfCurrentParagraph);
+ doApplyForSingleParagraph(forceCreateList);
+
+ // Fetch the start of the selection after moving the first paragraph,
+ // because moving the paragraph will invalidate the original start.
+ // We'll use the new start to restore the original selection after
+ // we modified all selected paragraphs.
+ if (startOfCurrentParagraph == startOfSelection)
+ startOfSelection = endingSelection().visibleStart();
+
+ startOfCurrentParagraph = startOfNextParagraph(endingSelection().visibleStart());
+ }
+ setEndingSelection(endOfSelection);
+ doApplyForSingleParagraph(forceCreateList);
+ // Fetch the end of the selection, for the reason mentioned above.
+ endOfSelection = endingSelection().visibleEnd();
+ setEndingSelection(VisibleSelection(startOfSelection, endOfSelection));
+ return;
+ }
+ }
+
+ doApplyForSingleParagraph(false);
+}
+
+void InsertListCommand::doApplyForSingleParagraph(bool forceCreateList)
+{
// FIXME: This will produce unexpected results for a selection that starts just before a
// table and ends inside the first cell, selectionForParagraphIteration should probably
// be renamed and deployed inside setEndingSelection().
@@ -147,7 +146,7 @@ void InsertListCommand::doApply()
unlistifyParagraph(endingSelection().visibleStart(), listNode, listChildNode);
}
- if (!listChildNode || switchListType || m_forceCreateList)
+ if (!listChildNode || switchListType || forceCreateList)
m_listElement = listifyParagraph(endingSelection().visibleStart(), listTag);
}
diff --git a/WebCore/editing/InsertListCommand.h b/WebCore/editing/InsertListCommand.h
index 7f3b07d..7fbf936 100644
--- a/WebCore/editing/InsertListCommand.h
+++ b/WebCore/editing/InsertListCommand.h
@@ -53,11 +53,11 @@ private:
HTMLElement* fixOrphanedListChild(Node*);
bool modifyRange();
+ void doApplyForSingleParagraph(bool forceCreateList);
void unlistifyParagraph(const VisiblePosition& originalStart, HTMLElement* listNode, Node* listChildNode);
PassRefPtr<HTMLElement> listifyParagraph(const VisiblePosition& originalStart, const QualifiedName& listTag);
RefPtr<HTMLElement> m_listElement;
Type m_type;
- bool m_forceCreateList;
};
} // namespace WebCore
diff --git a/WebCore/editing/InsertParagraphSeparatorCommand.cpp b/WebCore/editing/InsertParagraphSeparatorCommand.cpp
index d8aa98f..a3dfa83 100644
--- a/WebCore/editing/InsertParagraphSeparatorCommand.cpp
+++ b/WebCore/editing/InsertParagraphSeparatorCommand.cpp
@@ -312,7 +312,7 @@ void InsertParagraphSeparatorCommand::doApply()
Position leadingWhitespace = insertionPosition.leadingWhitespacePosition(VP_DEFAULT_AFFINITY);
// FIXME: leadingWhitespacePosition is returning the position before preserved newlines for positions
// after the preserved newline, causing the newline to be turned into a nbsp.
- if (leadingWhitespace.isNotNull()) {
+ if (leadingWhitespace.isNotNull() && leadingWhitespace.node()->isTextNode()) {
Text* textNode = static_cast<Text*>(leadingWhitespace.node());
ASSERT(!textNode->renderer() || textNode->renderer()->style()->collapseWhiteSpace());
replaceTextInNode(textNode, leadingWhitespace.deprecatedEditingOffset(), 1, nonBreakingSpaceString());
@@ -385,10 +385,10 @@ void InsertParagraphSeparatorCommand::doApply()
insertionPosition = Position(insertionPosition.node(), 0);
if (!insertionPosition.isRenderedCharacter()) {
// Clear out all whitespace and insert one non-breaking space
- ASSERT(insertionPosition.node()->isTextNode());
ASSERT(!insertionPosition.node()->renderer() || insertionPosition.node()->renderer()->style()->collapseWhiteSpace());
deleteInsignificantTextDownstream(insertionPosition);
- insertTextIntoNode(static_cast<Text*>(insertionPosition.node()), 0, nonBreakingSpaceString());
+ if (insertionPosition.node()->isTextNode())
+ insertTextIntoNode(static_cast<Text*>(insertionPosition.node()), 0, nonBreakingSpaceString());
}
}
diff --git a/WebCore/html/Blob.cpp b/WebCore/html/Blob.cpp
index baf3d49..0680d82 100644
--- a/WebCore/html/Blob.cpp
+++ b/WebCore/html/Blob.cpp
@@ -43,6 +43,11 @@ Blob::Blob(const String& type, const BlobItemList& items)
m_items.append(items[i]);
}
+Blob::Blob(const PassRefPtr<BlobItem>& item)
+{
+ m_items.append(item);
+}
+
Blob::Blob(const String& path)
{
// Note: this doesn't initialize the type unlike File(path).
diff --git a/WebCore/html/Blob.h b/WebCore/html/Blob.h
index ad6c7a6..f5526c7 100644
--- a/WebCore/html/Blob.h
+++ b/WebCore/html/Blob.h
@@ -71,6 +71,7 @@ public:
protected:
Blob(const String& type, const BlobItemList&);
+ Blob(const PassRefPtr<BlobItem>&);
// FIXME: Deprecated constructor. See also the comment for Blob::create(path).
Blob(const String& path);
diff --git a/WebCore/html/BlobBuilder.cpp b/WebCore/html/BlobBuilder.cpp
index cda1568..b2684fc 100644
--- a/WebCore/html/BlobBuilder.cpp
+++ b/WebCore/html/BlobBuilder.cpp
@@ -35,35 +35,34 @@
#include "AtomicString.h"
#include "Blob.h"
#include "ExceptionCode.h"
+#include "LineEnding.h"
#include "TextEncoding.h"
namespace WebCore {
-static bool getLineEndingTypeFromString(const AtomicString& typeString, LineEnding& endingType)
+static CString convertToCString(const String& text, const String& endingType, ExceptionCode& ec)
{
DEFINE_STATIC_LOCAL(AtomicString, transparent, ("transparent"));
DEFINE_STATIC_LOCAL(AtomicString, native, ("native"));
- if (typeString.isEmpty() || typeString == transparent) {
- endingType = EndingTransparent;
- return true;
- }
- if (typeString == native) {
- endingType = EndingNative;
- return true;
- }
- return false;
+ ec = 0;
+
+ if (endingType.isEmpty() || endingType == transparent)
+ return UTF8Encoding().encode(text.characters(), text.length(), EntitiesForUnencodables);
+ if (endingType == native)
+ return normalizeLineEndingsToNative(UTF8Encoding().encode(text.characters(), text.length(), EntitiesForUnencodables));
+
+ ec = SYNTAX_ERR;
+ return CString();
}
-bool BlobBuilder::append(const String& text, const String& type, ExceptionCode& ec)
+bool BlobBuilder::append(const String& text, const String& endingType, ExceptionCode& ec)
{
- ec = 0;
- LineEnding endingType;
- if (!getLineEndingTypeFromString(type, endingType)) {
- ec = SYNTAX_ERR;
+ CString cstr = convertToCString(text, endingType, ec);
+ if (ec)
return false;
- }
- m_items.append(StringBlobItem::create(text, endingType, UTF8Encoding()));
+
+ m_items.append(StringBlobItem::create(cstr));
return true;
}
diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp
index 2c9ce53..4000dcb 100644
--- a/WebCore/html/File.cpp
+++ b/WebCore/html/File.cpp
@@ -34,6 +34,19 @@ namespace WebCore {
File::File(const String& path)
: Blob(path)
{
+ Init();
+}
+
+#if ENABLE(DIRECTORY_UPLOAD)
+File::File(const String& relativePath, const String& filePath)
+ : Blob(FileBlobItem::create(filePath, relativePath))
+{
+ Init();
+}
+#endif
+
+void File::Init()
+{
// We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure.
const String& fileName = name();
int index = fileName.reverseFind('.');
@@ -46,4 +59,11 @@ const String& File::name() const
return items().at(0)->toFileBlobItem()->name();
}
+#if ENABLE(DIRECTORY_UPLOAD)
+const String& File::webkitRelativePath() const
+{
+ return items().at(0)->toFileBlobItem()->relativePath();
+}
+#endif
+
} // namespace WebCore
diff --git a/WebCore/html/File.h b/WebCore/html/File.h
index 582db28..d685472 100644
--- a/WebCore/html/File.h
+++ b/WebCore/html/File.h
@@ -39,9 +39,20 @@ public:
return adoptRef(new File(path));
}
+#if ENABLE(DIRECTORY_UPLOAD)
+ static PassRefPtr<File> create(const String& relativePath, const String& path)
+ {
+ return adoptRef(new File(relativePath, path));
+ }
+#endif
+
virtual bool isFile() const { return true; }
const String& name() const;
+#if ENABLE(DIRECTORY_UPLOAD)
+ // Returns the relative path of this file in the context of a directory selection.
+ const String& webkitRelativePath() const;
+#endif
// FIXME: obsolete attributes. To be removed.
const String& fileName() const { return name(); }
@@ -49,6 +60,11 @@ public:
private:
File(const String& path);
+ void Init();
+
+#if ENABLE(DIRECTORY_UPLOAD)
+ File(const String& relativePath, const String& path);
+#endif
};
} // namespace WebCore
diff --git a/WebCore/html/File.idl b/WebCore/html/File.idl
index 2632a4d..5626c8e 100644
--- a/WebCore/html/File.idl
+++ b/WebCore/html/File.idl
@@ -30,6 +30,9 @@ module html {
GenerateToJS
] File : Blob {
readonly attribute DOMString name;
+#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD
+ readonly attribute DOMString webkitRelativePath;
+#endif
// FIXME: obsolete attributes. To be removed.
readonly attribute DOMString fileName;
diff --git a/WebCore/html/FileError.idl b/WebCore/html/FileError.idl
index adc25e8..555d103 100644
--- a/WebCore/html/FileError.idl
+++ b/WebCore/html/FileError.idl
@@ -30,7 +30,8 @@
module html {
interface [
- Conditional=FILE_READER|FILE_WRITER
+ Conditional=FILE_READER|FILE_WRITER,
+ DontCheckEnums
] FileError {
#if !defined(LANGUAGE_OBJECTIVE_C)
const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
diff --git a/WebCore/html/FileReader.idl b/WebCore/html/FileReader.idl
index b933f51..ad0e187 100644
--- a/WebCore/html/FileReader.idl
+++ b/WebCore/html/FileReader.idl
@@ -34,7 +34,8 @@ module html {
CanBeConstructed,
CallWith=ScriptExecutionContext,
EventTarget,
- NoStaticTables
+ NoStaticTables,
+ DontCheckEnums
] FileReader {
// ready states
const unsigned short EMPTY = 0;
diff --git a/WebCore/html/FormDataList.cpp b/WebCore/html/FormDataList.cpp
index 0f62595..94d0031 100644
--- a/WebCore/html/FormDataList.cpp
+++ b/WebCore/html/FormDataList.cpp
@@ -21,6 +21,8 @@
#include "config.h"
#include "FormDataList.h"
+#include "LineEnding.h"
+
namespace WebCore {
FormDataList::FormDataList(const TextEncoding& c)
@@ -30,7 +32,8 @@ FormDataList::FormDataList(const TextEncoding& c)
void FormDataList::appendString(const String& s)
{
- m_items.append(StringBlobItem::create(s, EndingCRLF, m_encoding));
+ CString cstr = m_encoding.encode(s.characters(), s.length(), EntitiesForUnencodables);
+ m_items.append(StringBlobItem::create(normalizeLineEndingsToCRLF(cstr)));
}
void FormDataList::appendString(const CString& s)
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
index 36770e2..b4cdb02 100644
--- a/WebCore/html/HTMLAttributeNames.in
+++ b/WebCore/html/HTMLAttributeNames.in
@@ -281,5 +281,6 @@ version
viewsource
vlink
vspace
+webkitdirectory
width
wrap
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index a14cbef..6b5a3a3 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -66,6 +66,9 @@ static const int DefaultHeight = 150;
// in exchange for a smaller maximum canvas size.
static const float MaxCanvasArea = 32768 * 8192; // Maximum canvas area in CSS pixels
+//In Skia, we will also limit width/height to 32767.
+static const float MaxSkiaDim = 32767.0F; // Maximum width/height in CSS pixels.
+
HTMLCanvasElement::HTMLCanvasElement(const QualifiedName& tagName, Document* document)
: HTMLElement(tagName, document)
, m_observer(0)
@@ -275,7 +278,7 @@ void HTMLCanvasElement::paint(GraphicsContext* context, const IntRect& r)
if (hasCreatedImageBuffer()) {
ImageBuffer* imageBuffer = buffer();
if (imageBuffer) {
- Image* image = imageBuffer->image();
+ Image* image = imageBuffer->imageForRendering();
if (image)
context->drawImage(image, DeviceColorSpace, r);
}
@@ -294,6 +297,16 @@ bool HTMLCanvasElement::is3D() const
}
#endif
+void HTMLCanvasElement::makeRenderingResultsAvailable()
+{
+#if ENABLE(3D_CANVAS)
+ if (is3D()) {
+ WebGLRenderingContext* context3d = reinterpret_cast<WebGLRenderingContext*>(renderingContext());
+ context3d->paintRenderingResultsToCanvas();
+ }
+#endif
+}
+
void HTMLCanvasElement::recalcStyle(StyleChange change)
{
HTMLElement::recalcStyle(change);
@@ -324,6 +337,8 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, const double* qualit
String lowercaseMimeType = mimeType.lower();
+ makeRenderingResultsAvailable();
+
// FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this method to be used on a worker thread).
if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(lowercaseMimeType))
return buffer()->toDataURL("image/png");
@@ -344,6 +359,11 @@ IntSize HTMLCanvasElement::convertLogicalToDevice(const FloatSize& logicalSize)
if (!(wf >= 1 && hf >= 1 && wf * hf <= MaxCanvasArea))
return IntSize();
+#if PLATFORM(SKIA)
+ if (wf > MaxSkiaDim || hf > MaxSkiaDim)
+ return IntSize();
+#endif
+
return IntSize(static_cast<unsigned>(wf), static_cast<unsigned>(hf));
}
diff --git a/WebCore/html/HTMLCanvasElement.h b/WebCore/html/HTMLCanvasElement.h
index d399d5f..ef5d289 100644
--- a/WebCore/html/HTMLCanvasElement.h
+++ b/WebCore/html/HTMLCanvasElement.h
@@ -32,10 +32,6 @@
#include "HTMLElement.h"
#include "IntSize.h"
-#if ENABLE(3D_CANVAS)
-#include "GraphicsContext3D.h"
-#endif
-
namespace WebCore {
class CanvasContextAttributes;
@@ -114,6 +110,7 @@ public:
bool is3D() const;
#endif
+<<<<<<< HEAD:WebCore/html/HTMLCanvasElement.h
#ifdef ANDROID_INSTRUMENT
void* operator new(size_t size) {
return HTMLElement::operator new(size);
@@ -129,6 +126,9 @@ public:
HTMLElement::operator delete[](p, size);
}
#endif
+=======
+ void makeRenderingResultsAvailable();
+>>>>>>> webkit.org at r63859:WebCore/html/HTMLCanvasElement.h
private:
HTMLCanvasElement(const QualifiedName&, Document*);
diff --git a/WebCore/html/HTMLConstructionSite.cpp b/WebCore/html/HTMLConstructionSite.cpp
index 5745625..e9bb762 100644
--- a/WebCore/html/HTMLConstructionSite.cpp
+++ b/WebCore/html/HTMLConstructionSite.cpp
@@ -32,6 +32,8 @@
#include "Element.h"
#include "Frame.h"
#include "HTMLDocument.h"
+#include "HTMLElementFactory.h"
+#include "HTMLFormElement.h"
#include "HTMLHtmlElement.h"
#include "HTMLNames.h"
#include "HTMLScriptElement.h"
@@ -70,6 +72,15 @@ bool hasImpliedEndTag(Element* element)
|| element->hasTagName(rtTag);
}
+bool causesFosterParenting(const QualifiedName& tagName)
+{
+ return tagName == tableTag
+ || tagName == tbodyTag
+ || tagName == tfootTag
+ || tagName == theadTag
+ || tagName == trTag;
+}
+
} // namespace
template<typename ChildType>
@@ -80,7 +91,7 @@ PassRefPtr<ChildType> HTMLConstructionSite::attach(Node* parent, PassRefPtr<Chil
// FIXME: It's confusing that HTMLConstructionSite::attach does the magic
// redirection to the foster parent but HTMLConstructionSite::attachAtSite
// doesn't. It feels like we're missing a concept somehow.
- if (m_redirectAttachToFosterParent) {
+ if (shouldFosterParent()) {
fosterParent(child.get());
ASSERT(child->attached());
return child.release();
@@ -92,9 +103,10 @@ PassRefPtr<ChildType> HTMLConstructionSite::attach(Node* parent, PassRefPtr<Chil
// |parent| to hold a ref at this point. In the common case (at least
// for elements), however, we'll get to use this ref in the stack of
// open elements.
- ASSERT(parent->attached());
- ASSERT(!child->attached());
- child->attach();
+ if (parent->attached()) {
+ ASSERT(!child->attached());
+ child->attach();
+ }
return child.release();
}
@@ -107,8 +119,7 @@ void HTMLConstructionSite::attachAtSite(const AttachmentSite& site, PassRefPtr<N
ExceptionCode ec = 0;
site.parent->insertBefore(child, site.nextChild, ec);
ASSERT(!ec);
- ASSERT(site.parent->attached());
- if (!child->attached())
+ if (site.parent->attached() && !child->attached())
child->attach();
return;
}
@@ -116,14 +127,14 @@ void HTMLConstructionSite::attachAtSite(const AttachmentSite& site, PassRefPtr<N
// It's slightly unfortunate that we need to hold a reference to child
// here to call attach(). We should investigate whether we can rely on
// |site.parent| to hold a ref at this point.
- ASSERT(site.parent->attached());
- if (!child->attached())
+ if (site.parent->attached() && !child->attached())
child->attach();
}
-HTMLConstructionSite::HTMLConstructionSite(Document* document, FragmentScriptingPermission scriptingPermission)
+HTMLConstructionSite::HTMLConstructionSite(Document* document, FragmentScriptingPermission scriptingPermission, bool isParsingFragment)
: m_document(document)
, m_fragmentScriptingPermission(scriptingPermission)
+ , m_isParsingFragment(isParsingFragment)
, m_redirectAttachToFosterParent(false)
{
}
@@ -132,11 +143,23 @@ HTMLConstructionSite::~HTMLConstructionSite()
{
}
+PassRefPtr<HTMLFormElement> HTMLConstructionSite::takeForm()
+{
+ return m_form.release();
+}
+
+void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded()
+{
+ if (m_document->frame() && !m_isParsingFragment)
+ m_document->frame()->loader()->dispatchDocumentElementAvailable();
+}
+
void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken& token)
{
RefPtr<Element> element = HTMLHtmlElement::create(m_document);
element->setAttributeMap(token.takeAtributes(), m_fragmentScriptingPermission);
m_openElements.pushHTMLHtmlElement(attach(m_document, element.release()));
+ dispatchDocumentElementAvailableIfNeeded();
}
void HTMLConstructionSite::mergeAttributesFromTokenIntoElement(AtomicHTMLToken& token, Element* element)
@@ -193,40 +216,52 @@ void HTMLConstructionSite::insertCommentOnHTMLHtmlElement(AtomicHTMLToken& token
attach(m_openElements.htmlElement(), Comment::create(m_document, token.comment()));
}
-PassRefPtr<Element> HTMLConstructionSite::createHTMLElementAndAttachToCurrent(AtomicHTMLToken& token)
+PassRefPtr<Element> HTMLConstructionSite::attachToCurrent(PassRefPtr<Element> child)
{
- ASSERT(token.type() == HTMLToken::StartTag);
- return attach(currentElement(), createHTMLElement(token));
+ return attach(currentElement(), child);
}
void HTMLConstructionSite::insertHTMLHtmlElement(AtomicHTMLToken& token)
{
- ASSERT(!m_redirectAttachToFosterParent);
- m_openElements.pushHTMLHtmlElement(createHTMLElementAndAttachToCurrent(token));
+ ASSERT(!shouldFosterParent());
+ m_openElements.pushHTMLHtmlElement(attachToCurrent(createHTMLElement(token)));
+ dispatchDocumentElementAvailableIfNeeded();
}
void HTMLConstructionSite::insertHTMLHeadElement(AtomicHTMLToken& token)
{
- ASSERT(!m_redirectAttachToFosterParent);
- m_head = createHTMLElementAndAttachToCurrent(token);
+ ASSERT(!shouldFosterParent());
+ m_head = attachToCurrent(createHTMLElement(token));
m_openElements.pushHTMLHeadElement(m_head);
}
void HTMLConstructionSite::insertHTMLBodyElement(AtomicHTMLToken& token)
{
- ASSERT(!m_redirectAttachToFosterParent);
- m_openElements.pushHTMLBodyElement(createHTMLElementAndAttachToCurrent(token));
+ ASSERT(!shouldFosterParent());
+ m_openElements.pushHTMLBodyElement(attachToCurrent(createHTMLElement(token)));
+}
+
+void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken& token)
+{
+ insertHTMLElement(token);
+ ASSERT(currentElement()->isHTMLElement());
+ ASSERT(currentElement()->hasTagName(formTag));
+ m_form = static_cast<HTMLFormElement*>(currentElement());
}
void HTMLConstructionSite::insertHTMLElement(AtomicHTMLToken& token)
{
- m_openElements.push(createHTMLElementAndAttachToCurrent(token));
+ m_openElements.push(attachToCurrent(createHTMLElement(token)));
}
void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken& token)
{
ASSERT(token.type() == HTMLToken::StartTag);
- createHTMLElementAndAttachToCurrent(token);
+ RefPtr<Element> element = attachToCurrent(createHTMLElement(token));
+ // Normally HTMLElementStack is responsible for calling finishParsingChildren,
+ // but self-closing elements are never in the element stack so the stack
+ // doesn't get a chance to tell them that we're done parsing their children.
+ element->finishParsingChildren();
// FIXME: Do we want to acknowledge the token's self-closing flag?
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#acknowledge-self-closing-flag
}
@@ -244,7 +279,7 @@ void HTMLConstructionSite::insertScriptElement(AtomicHTMLToken& token)
{
RefPtr<HTMLScriptElement> element = HTMLScriptElement::create(scriptTag, m_document, true);
element->setAttributeMap(token.takeAtributes(), m_fragmentScriptingPermission);
- m_openElements.push(attach(currentElement(), element.release()));
+ m_openElements.push(attachToCurrent(element.release()));
}
void HTMLConstructionSite::insertForeignElement(AtomicHTMLToken& token, const AtomicString& namespaceURI)
@@ -252,7 +287,7 @@ void HTMLConstructionSite::insertForeignElement(AtomicHTMLToken& token, const At
ASSERT(token.type() == HTMLToken::StartTag);
notImplemented(); // parseError when xmlns or xmlns:xlink are wrong.
- RefPtr<Element> element = attach(currentElement(), createElement(token, namespaceURI));
+ RefPtr<Element> element = attachToCurrent(createElement(token, namespaceURI));
if (!token.selfClosing())
m_openElements.push(element);
}
@@ -262,7 +297,7 @@ void HTMLConstructionSite::insertTextNode(const String& characters)
AttachmentSite site;
site.parent = currentElement();
site.nextChild = 0;
- if (m_redirectAttachToFosterParent)
+ if (shouldFosterParent())
findFosterSite(site);
Node* previousChild = site.nextChild ? site.nextChild->previousSibling() : site.parent->lastChild();
@@ -287,11 +322,54 @@ PassRefPtr<Element> HTMLConstructionSite::createElement(AtomicHTMLToken& token,
PassRefPtr<Element> HTMLConstructionSite::createHTMLElement(AtomicHTMLToken& token)
{
- RefPtr<Element> element = createElement(token, xhtmlNamespaceURI);
+ QualifiedName tagName(nullAtom, token.name(), xhtmlNamespaceURI);
+ // FIXME: This can't use HTMLConstructionSite::createElement because we
+ // have to pass the current form element. We should rework form association
+ // to occur after construction to allow better code sharing here.
+ RefPtr<Element> element = HTMLElementFactory::createHTMLElement(tagName, m_document, form(), true);
+ element->setAttributeMap(token.takeAtributes(), m_fragmentScriptingPermission);
ASSERT(element->isHTMLElement());
return element.release();
}
+PassRefPtr<Element> HTMLConstructionSite::createHTMLElementFromElementRecord(HTMLElementStack::ElementRecord* record)
+{
+ return createHTMLElementFromSavedElement(record->element());
+}
+
+namespace {
+
+PassRefPtr<NamedNodeMap> cloneAttributes(Element* element)
+{
+ NamedNodeMap* attributes = element->attributes(true);
+ if (!attributes)
+ return 0;
+
+ RefPtr<NamedNodeMap> newAttributes = NamedNodeMap::create();
+ for (size_t i = 0; i < attributes->length(); ++i) {
+ Attribute* attribute = attributes->attributeItem(i);
+ RefPtr<Attribute> clone = Attribute::createMapped(attribute->name(), attribute->value());
+ newAttributes->addAttribute(clone);
+ }
+ return newAttributes.release();
+}
+
+}
+
+PassRefPtr<Element> HTMLConstructionSite::createHTMLElementFromSavedElement(Element* element)
+{
+ // FIXME: This method is wrong. We should be using the original token.
+ // Using an Element* causes us to fail examples like this:
+ // <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
+ // When reconstructTheActiveFormattingElements calls this method to open
+ // a second <b> tag to wrap TEXT, it will have id "2", even though the HTML5
+ // spec implies it should be "1". Minefield matches the HTML5 spec here.
+
+ ASSERT(element->isHTMLElement()); // otherwise localName() might be wrong.
+ AtomicHTMLToken fakeToken(HTMLToken::StartTag, element->localName(), cloneAttributes(element));
+ return createHTMLElement(fakeToken);
+}
+
bool HTMLConstructionSite::indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex) const
{
if (m_activeFormattingElements.isEmpty())
@@ -319,9 +397,8 @@ void HTMLConstructionSite::reconstructTheActiveFormattingElements()
ASSERT(unopenEntryIndex < m_activeFormattingElements.size());
for (; unopenEntryIndex < m_activeFormattingElements.size(); ++unopenEntryIndex) {
HTMLFormattingElementList::Entry& unopenedEntry = m_activeFormattingElements.at(unopenEntryIndex);
- // FIXME: We're supposed to save the original token in the entry.
- AtomicHTMLToken fakeToken(HTMLToken::StartTag, unopenedEntry.element()->localName());
- insertHTMLElement(fakeToken);
+ RefPtr<Element> reconstructed = createHTMLElementFromSavedElement(unopenedEntry.element());
+ m_openElements.push(attachToCurrent(reconstructed.release()));
unopenedEntry.replaceElement(currentElement());
}
}
@@ -357,6 +434,12 @@ void HTMLConstructionSite::findFosterSite(AttachmentSite& site)
site.nextChild = 0;
}
+bool HTMLConstructionSite::shouldFosterParent() const
+{
+ return m_redirectAttachToFosterParent
+ && causesFosterParenting(currentElement()->tagQName());
+}
+
void HTMLConstructionSite::fosterParent(Node* node)
{
AttachmentSite site;
diff --git a/WebCore/html/HTMLConstructionSite.h b/WebCore/html/HTMLConstructionSite.h
index c0af9b3..d9c8ac5 100644
--- a/WebCore/html/HTMLConstructionSite.h
+++ b/WebCore/html/HTMLConstructionSite.h
@@ -42,7 +42,7 @@ class Element;
class HTMLConstructionSite : public Noncopyable {
public:
- HTMLConstructionSite(Document*, FragmentScriptingPermission);
+ HTMLConstructionSite(Document*, FragmentScriptingPermission, bool isParsingFragment);
~HTMLConstructionSite();
void insertDoctype(AtomicHTMLToken&);
@@ -55,6 +55,7 @@ public:
void insertHTMLHtmlElement(AtomicHTMLToken&);
void insertHTMLHeadElement(AtomicHTMLToken&);
void insertHTMLBodyElement(AtomicHTMLToken&);
+ void insertHTMLFormElement(AtomicHTMLToken&);
void insertScriptElement(AtomicHTMLToken&);
void insertTextNode(const String&);
void insertForeignElement(AtomicHTMLToken&, const AtomicString& namespaceURI);
@@ -64,7 +65,9 @@ public:
void insertHTMLBodyStartTagInBody(AtomicHTMLToken&);
PassRefPtr<Element> createHTMLElement(AtomicHTMLToken&);
+ PassRefPtr<Element> createHTMLElementFromElementRecord(HTMLElementStack::ElementRecord*);
+ bool shouldFosterParent() const;
void fosterParent(Node*);
bool indexOfFirstUnopenFormattingElement(unsigned& firstUnopenElementIndex) const;
@@ -81,18 +84,16 @@ public:
Element* head() const { return m_head.get(); }
- Element* form() const { return m_form.get(); }
- PassRefPtr<Element> takeForm() { return m_form.release(); }
-
- void setForm(PassRefPtr<Element> form) { m_form = form; }
+ HTMLFormElement* form() const { return m_form.get(); }
+ PassRefPtr<HTMLFormElement> takeForm();
class RedirectToFosterParentGuard : public Noncopyable {
public:
- RedirectToFosterParentGuard(HTMLConstructionSite& tree, bool shouldRedirect)
+ RedirectToFosterParentGuard(HTMLConstructionSite& tree)
: m_tree(tree)
, m_wasRedirectingBefore(tree.m_redirectAttachToFosterParent)
{
- m_tree.m_redirectAttachToFosterParent = shouldRedirect;
+ m_tree.m_redirectAttachToFosterParent = true;
}
~RedirectToFosterParentGuard()
@@ -113,21 +114,25 @@ private:
template<typename ChildType>
PassRefPtr<ChildType> attach(Node* parent, PassRefPtr<ChildType> child);
+ PassRefPtr<Element> attachToCurrent(PassRefPtr<Element>);
void attachAtSite(const AttachmentSite&, PassRefPtr<Node> child);
void findFosterSite(AttachmentSite&);
+ PassRefPtr<Element> createHTMLElementFromSavedElement(Element*);
PassRefPtr<Element> createElement(AtomicHTMLToken&, const AtomicString& namespaceURI);
- PassRefPtr<Element> createHTMLElementAndAttachToCurrent(AtomicHTMLToken&);
void mergeAttributesFromTokenIntoElement(AtomicHTMLToken&, Element*);
+ void dispatchDocumentElementAvailableIfNeeded();
Document* m_document;
RefPtr<Element> m_head;
- RefPtr<Element> m_form;
+ RefPtr<HTMLFormElement> m_form;
mutable HTMLElementStack m_openElements;
mutable HTMLFormattingElementList m_activeFormattingElements;
+
FragmentScriptingPermission m_fragmentScriptingPermission;
+ bool m_isParsingFragment;
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#parsing-main-intable
// In the "in table" insertion mode, we sometimes get into a state where
diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/HTMLElementStack.cpp
index d1a1752..5c325e5 100644
--- a/WebCore/html/HTMLElementStack.cpp
+++ b/WebCore/html/HTMLElementStack.cpp
@@ -137,6 +137,17 @@ void HTMLElementStack::popHTMLBodyElement()
popCommon();
}
+void HTMLElementStack::popAll()
+{
+ m_htmlElement = 0;
+ m_headElement = 0;
+ m_bodyElement = 0;
+ while (m_top) {
+ top()->finishParsingChildren();
+ m_top = m_top->releaseNext();
+ }
+}
+
void HTMLElementStack::pop()
{
ASSERT(!top()->hasTagName(HTMLNames::headTag));
@@ -325,6 +336,11 @@ bool HTMLElementStack::contains(Element* element) const
return !!find(element);
}
+bool HTMLElementStack::contains(const AtomicString& tagName) const
+{
+ return !!topmost(tagName);
+}
+
template <bool isMarker(Element*)>
bool inScopeCommon(HTMLElementStack::ElementRecord* top, const AtomicString& targetTag)
{
diff --git a/WebCore/html/HTMLElementStack.h b/WebCore/html/HTMLElementStack.h
index 8be4422..830faf0 100644
--- a/WebCore/html/HTMLElementStack.h
+++ b/WebCore/html/HTMLElementStack.h
@@ -92,11 +92,13 @@ public:
void popUntilTableRowScopeMarker(); // "clear the stack back to a table row context" in the spec.
void popHTMLHeadElement();
void popHTMLBodyElement();
+ void popAll();
void remove(Element*);
void removeHTMLHeadElement(Element*);
bool contains(Element*) const;
+ bool contains(const AtomicString& tagName) const;
bool inScope(Element*) const;
bool inScope(const AtomicString& tagName) const;
diff --git a/WebCore/html/HTMLFormElement.cpp b/WebCore/html/HTMLFormElement.cpp
index 2eface2..4d6b603 100644
--- a/WebCore/html/HTMLFormElement.cpp
+++ b/WebCore/html/HTMLFormElement.cpp
@@ -74,6 +74,7 @@ static int64_t generateFormDataIdentifier()
HTMLFormElement::HTMLFormElement(const QualifiedName& tagName, Document* document)
: HTMLElement(tagName, document)
+ , m_submissionTrigger(NotSubmittedByJavaScript)
, m_autocomplete(true)
, m_insubmit(false)
, m_doingsubmit(false)
@@ -370,6 +371,7 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool lockH
}
m_insubmit = true;
+ m_submissionTrigger = formSubmissionTrigger;
HTMLFormControlElement* firstSuccessfulSubmitButton = 0;
bool needButtonActivation = activateSubmitButton; // do we need to activate a submit button?
@@ -559,6 +561,11 @@ String HTMLFormElement::target() const
return getAttribute(targetAttr);
}
+FormSubmissionTrigger HTMLFormElement::submissionTrigger() const
+{
+ return m_submissionTrigger;
+}
+
HTMLFormControlElement* HTMLFormElement::defaultButton() const
{
for (unsigned i = 0; i < m_associatedElements.size(); ++i) {
diff --git a/WebCore/html/HTMLFormElement.h b/WebCore/html/HTMLFormElement.h
index a2a5897..5aa9a5c 100644
--- a/WebCore/html/HTMLFormElement.h
+++ b/WebCore/html/HTMLFormElement.h
@@ -98,6 +98,8 @@ public:
virtual String target() const;
+ FormSubmissionTrigger submissionTrigger() const;
+
HTMLFormControlElement* defaultButton() const;
bool checkValidity();
@@ -153,6 +155,8 @@ private:
Vector<HTMLFormControlElement*> m_associatedElements;
Vector<HTMLImageElement*> m_imageElements;
+ FormSubmissionTrigger m_submissionTrigger;
+
bool m_autocomplete : 1;
bool m_insubmit : 1;
bool m_doingsubmit : 1;
diff --git a/WebCore/html/HTMLFormattingElementList.cpp b/WebCore/html/HTMLFormattingElementList.cpp
index d71cc8c..22bf03e 100644
--- a/WebCore/html/HTMLFormattingElementList.cpp
+++ b/WebCore/html/HTMLFormattingElementList.cpp
@@ -70,36 +70,22 @@ HTMLFormattingElementList::Bookmark HTMLFormattingElementList::bookmarkFor(Eleme
{
size_t index = m_entries.reverseFind(element);
ASSERT(index != notFound);
- Element* elementBefore = (index > 1) ? m_entries[index - 1].element() : 0;
- Element* elementAfter = (index < m_entries.size() - 1) ? m_entries[index + 1].element() : 0;
- return Bookmark(elementBefore, elementAfter);
+ return Bookmark(&at(index));
}
-void HTMLFormattingElementList::insertAt(Element* element, const Bookmark& bookmark)
+void HTMLFormattingElementList::swapTo(Element* oldElement, Element* newElement, const Bookmark& bookmark)
{
- size_t beforeIndex = notFound;
- if (bookmark.elementBefore()) {
- beforeIndex = m_entries.reverseFind(bookmark.elementBefore());
- ASSERT(beforeIndex != notFound);
- }
- size_t afterIndex = notFound;
- if (bookmark.elementAfter()) {
- afterIndex = m_entries.reverseFind(bookmark.elementAfter());
- ASSERT(afterIndex != notFound);
- }
-
- if (!bookmark.elementBefore()) {
- if (bookmark.elementAfter())
- ASSERT(!afterIndex);
- m_entries.prepend(element);
- } else {
- if (bookmark.elementAfter()) {
- // Bookmarks are not general purpose. They're only for the Adoption
- // Agency. Assume the bookmarked element was already removed.
- ASSERT(beforeIndex + 1 == afterIndex);
- }
- m_entries.insert(beforeIndex + 1, element);
+ ASSERT(contains(oldElement));
+ ASSERT(!contains(newElement));
+ if (!bookmark.hasBeenMoved()) {
+ ASSERT(bookmark.mark()->element() == oldElement);
+ bookmark.mark()->replaceElement(newElement);
+ return;
}
+ size_t index = bookmark.mark() - first();
+ ASSERT(index < size());
+ m_entries.insert(index + 1, newElement);
+ remove(oldElement);
}
void HTMLFormattingElementList::append(Element* element)
@@ -121,8 +107,13 @@ void HTMLFormattingElementList::appendMarker()
void HTMLFormattingElementList::clearToLastMarker()
{
- while (m_entries.size() && !m_entries.last().isMarker())
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker
+ while (m_entries.size()) {
+ bool shouldStop = m_entries.last().isMarker();
m_entries.removeLast();
+ if (shouldStop)
+ break;
+ }
}
#ifndef NDEBUG
diff --git a/WebCore/html/HTMLFormattingElementList.h b/WebCore/html/HTMLFormattingElementList.h
index 6b41da4..135163c 100644
--- a/WebCore/html/HTMLFormattingElementList.h
+++ b/WebCore/html/HTMLFormattingElementList.h
@@ -80,24 +80,24 @@ public:
class Bookmark {
public:
- Bookmark(Element* before, Element* after)
- : m_before(before)
- , m_after(after)
+ Bookmark(Entry* entry)
+ : m_hasBeenMoved(false)
+ , m_mark(entry)
{
}
- void moveToAfter(Element* before)
+ void moveToAfter(Entry* before)
{
- m_before = before;
- m_after = 0;
+ m_hasBeenMoved = true;
+ m_mark = before;
}
- Element* elementBefore() const { return m_before; }
- Element* elementAfter() const { return m_after; }
+ bool hasBeenMoved() const { return m_hasBeenMoved; }
+ Entry* mark() const { return m_mark; }
private:
- Element* m_before;
- Element* m_after;
+ bool m_hasBeenMoved;
+ Entry* m_mark;
};
bool isEmpty() const { return !size(); }
@@ -111,9 +111,10 @@ public:
void remove(Element*);
Bookmark bookmarkFor(Element*);
- void insertAt(Element*, const Bookmark&);
+ void swapTo(Element* oldElement, Element* newElement, const Bookmark&);
void appendMarker();
+ // clearToLastMarker also clears the marker (per the HTML5 spec).
void clearToLastMarker();
const Entry& at(size_t i) const { return m_entries[i]; }
@@ -124,6 +125,8 @@ public:
#endif
private:
+ Entry* first() { return &at(0); }
+
Vector<Entry> m_entries;
};
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index 8502814..49b6f01 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -29,6 +29,7 @@
#include "AXObjectCache.h"
#include "Attribute.h"
+#include "BeforeTextInsertedEvent.h"
#include "CSSPropertyNames.h"
#include "ChromeClient.h"
#include "DateComponents.h"
@@ -40,6 +41,7 @@
#include "ExceptionCode.h"
#include "File.h"
#include "FileList.h"
+#include "FileSystem.h"
#include "FocusController.h"
#include "FormDataList.h"
#include "Frame.h"
@@ -108,6 +110,12 @@ static const double weekDefaultStepBase = -259200000.0; // The first day of 1970
static const double msecPerMinute = 60 * 1000;
static const double msecPerSecond = 1000;
+static bool isNumberCharacter(UChar ch)
+{
+ return ch == '+' || ch == '-' || ch == '.' || ch == 'e' || ch == 'E'
+ || ch >= '0' && ch <= '9';
+}
+
HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
: HTMLTextFormControlElement(tagName, document, form)
, m_xPos(0)
@@ -1187,6 +1195,13 @@ void HTMLInputElement::parseMappedAttribute(Attribute* attr)
m_hasNonEmptyList = !attr->isEmpty();
// FIXME: we need to tell this change to a renderer if the attribute affects the appearance.
#endif
+#if ENABLE(INPUT_SPEECH)
+ else if (attr->name() == speechAttr) {
+ if (renderer())
+ renderer()->updateFromElement();
+ setNeedsStyleRecalc();
+ }
+#endif
else
HTMLTextFormControlElement::parseMappedAttribute(attr);
}
@@ -1978,8 +1993,30 @@ void HTMLInputElement::setFileListFromRenderer(const Vector<String>& paths)
{
m_fileList->clear();
int size = paths.size();
+
+#if ENABLE(DIRECTORY_UPLOAD)
+ // If a directory is being selected, the UI allows a directory to be chosen
+ // and the paths provided here share a root directory somewhere up the tree;
+ // we want to store only the relative paths from that point.
+ if (webkitdirectory() && size > 0) {
+ String rootPath = directoryName(paths[0]);
+ // Find the common root path.
+ for (int i = 1; i < size; i++) {
+ while (!paths[i].startsWith(rootPath))
+ rootPath = directoryName(rootPath);
+ }
+ rootPath = directoryName(rootPath);
+ ASSERT(rootPath.length());
+ for (int i = 0; i < size; i++)
+ m_fileList->append(File::create(paths[i].substring(1 + rootPath.length()), paths[i]));
+ } else {
+ for (int i = 0; i < size; i++)
+ m_fileList->append(File::create(paths[i]));
+ }
+#else
for (int i = 0; i < size; i++)
m_fileList->append(File::create(paths[i]));
+#endif
setFormControlValueMatchesRenderer(true);
InputElement::notifyFormStateChanged(this);
@@ -2126,7 +2163,21 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
}
}
- if (isTextField()
+ if (hasSpinButton() && evt->type() == eventNames().keydownEvent && evt->isKeyboardEvent()) {
+ String key = static_cast<KeyboardEvent*>(evt)->keyIdentifier();
+ int step = 0;
+ if (key == "Up")
+ step = 1;
+ else if (key == "Down")
+ step = -1;
+ if (step) {
+ stepUpFromRenderer(step);
+ evt->setDefaultHandled();
+ return;
+ }
+ }
+
+ if (isTextField()
&& evt->type() == eventNames().keydownEvent
&& evt->isKeyboardEvent()
&& focused()
@@ -2382,7 +2433,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
}
if (evt->isBeforeTextInsertedEvent())
- InputElement::handleBeforeTextInsertedEvent(m_data, this, this, evt);
+ handleBeforeTextInsertedEvent(evt);
if (isTextField() && renderer() && (evt->isMouseEvent() || evt->isDragEvent() || evt->isWheelEvent() || evt->type() == eventNames().blurEvent || evt->type() == eventNames().focusEvent))
toRenderTextControlSingleLine(renderer())->forwardEvent(evt);
@@ -2394,6 +2445,33 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
HTMLFormControlElementWithState::defaultEventHandler(evt);
}
+void HTMLInputElement::handleBeforeTextInsertedEvent(Event* event)
+{
+ if (inputType() == NUMBER) {
+ BeforeTextInsertedEvent* textEvent = static_cast<BeforeTextInsertedEvent*>(event);
+ unsigned length = textEvent->text().length();
+ bool hasInvalidChar = false;
+ for (unsigned i = 0; i < length; ++i) {
+ if (!isNumberCharacter(textEvent->text()[i])) {
+ hasInvalidChar = true;
+ break;
+ }
+ }
+ if (hasInvalidChar) {
+ Vector<UChar> stripped;
+ stripped.reserveCapacity(length);
+ for (unsigned i = 0; i < length; ++i) {
+ UChar ch = textEvent->text()[i];
+ if (!isNumberCharacter(ch))
+ continue;
+ stripped.append(ch);
+ }
+ textEvent->setText(String::adopt(stripped));
+ }
+ }
+ InputElement::handleBeforeTextInsertedEvent(m_data, this, this, event);
+}
+
PassRefPtr<HTMLFormElement> HTMLInputElement::createTemporaryFormForIsIndex()
{
RefPtr<HTMLFormElement> form = HTMLFormElement::create(document());
@@ -2460,6 +2538,13 @@ bool HTMLInputElement::multiple() const
return !getAttribute(multipleAttr).isNull();
}
+#if ENABLE(DIRECTORY_UPLOAD)
+bool HTMLInputElement::webkitdirectory() const
+{
+ return !getAttribute(webkitdirectoryAttr).isNull();
+}
+#endif
+
void HTMLInputElement::setSize(unsigned size)
{
setAttribute(sizeAttr, String::number(size));
diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h
index b055e73..3b9ba88 100644
--- a/WebCore/html/HTMLInputElement.h
+++ b/WebCore/html/HTMLInputElement.h
@@ -180,6 +180,10 @@ public:
bool multiple() const;
+#if ENABLE(DIRECTORY_UPLOAD)
+ bool webkitdirectory() const;
+#endif
+
virtual bool isAutofilled() const { return m_autofilled; }
void setAutofilled(bool value = true);
@@ -299,6 +303,7 @@ private:
void updateCheckedRadioButtons();
+ void handleBeforeTextInsertedEvent(Event*);
PassRefPtr<HTMLFormElement> createTemporaryFormForIsIndex();
// Helper for getAllowedValueStep();
bool getStepParameters(double* defaultStep, double* stepScaleFactor) const;
diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl
index b93f05c..c66e775 100644
--- a/WebCore/html/HTMLInputElement.idl
+++ b/WebCore/html/HTMLInputElement.idl
@@ -40,6 +40,9 @@ module html {
attribute long maxLength setter raises(DOMException);
attribute [Reflect] DOMString min;
attribute [Reflect] boolean multiple;
+#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD
+ attribute [Reflect] boolean webkitdirectory;
+#endif
attribute [Reflect] DOMString name;
attribute [Reflect] DOMString pattern;
attribute [Reflect] DOMString placeholder;
@@ -95,6 +98,10 @@ module html {
readonly attribute FileList files;
readonly attribute NodeList labels;
+
+#if defined(ENABLE_INPUT_SPEECH) && ENABLE_INPUT_SPEECH
+ attribute [Reflect] boolean speech;
+#endif
};
}
diff --git a/WebCore/html/HTMLLinkElement.cpp b/WebCore/html/HTMLLinkElement.cpp
index eff250a..cce991a 100644
--- a/WebCore/html/HTMLLinkElement.cpp
+++ b/WebCore/html/HTMLLinkElement.cpp
@@ -200,6 +200,7 @@ void HTMLLinkElement::process()
if (m_relAttribute.m_isIcon && m_url.isValid() && !m_url.isEmpty())
document()->setIconURL(m_url.string(), type);
+<<<<<<< HEAD:WebCore/html/HTMLLinkElement.cpp
#ifdef ANDROID_APPLE_TOUCH_ICON
if ((m_relAttribute.m_isTouchIcon || m_relAttribute.m_isPrecomposedTouchIcon) && m_url.isValid()
&& !m_url.isEmpty() && document()->frame())
@@ -209,6 +210,9 @@ void HTMLLinkElement::process()
#endif
if (m_relAttribute.m_isDNSPrefetch && m_url.isValid() && !m_url.isEmpty())
+=======
+ if (m_relAttribute.m_isDNSPrefetch && document()->isDNSPrefetchEnabled() && m_url.isValid() && !m_url.isEmpty())
+>>>>>>> webkit.org at r63859:WebCore/html/HTMLLinkElement.cpp
ResourceHandle::prepareForURL(m_url);
#if ENABLE(LINK_PREFETCH)
diff --git a/WebCore/html/HTMLLinkElement.h b/WebCore/html/HTMLLinkElement.h
index efdfde2..057cccc 100644
--- a/WebCore/html/HTMLLinkElement.h
+++ b/WebCore/html/HTMLLinkElement.h
@@ -31,7 +31,6 @@
namespace WebCore {
class CachedCSSStyleSheet;
-class CachedLinkPrefetch;
class KURL;
class HTMLLinkElement : public HTMLElement, public CachedResourceClient {
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index b83d1cb..bf24cf9 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -130,6 +130,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc)
#endif
, m_dispatchingCanPlayEvent(false)
, m_loadInitiatedByUserGesture(false)
+ , m_completelyLoaded(false)
{
document()->registerForDocumentActivationCallbacks(this);
document()->registerForMediaVolumeCallbacks(this);
@@ -177,16 +178,19 @@ void HTMLMediaElement::attributeChanged(Attribute* attr, bool preserveDecls)
if (!getAttribute(srcAttr).isEmpty())
scheduleLoad();
}
-#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
else if (attrName == controlsAttr) {
+#if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
if (!isVideo() && attached() && (controls() != (renderer() != 0))) {
detach();
attach();
}
if (renderer())
renderer()->updateFromElement();
- }
+#else
+ if (m_player)
+ m_player->setControls(controls());
#endif
+ }
}
void HTMLMediaElement::parseMappedAttribute(Attribute* attr)
@@ -226,8 +230,6 @@ void HTMLMediaElement::parseMappedAttribute(Attribute* attr)
setAttributeEventListener(eventNames().endedEvent, createAttributeEventListener(this, attr));
else if (attrName == onerrorAttr)
setAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(this, attr));
- else if (attrName == onloadAttr)
- setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
else if (attrName == onloadeddataAttr)
setAttributeEventListener(eventNames().loadeddataEvent, createAttributeEventListener(this, attr));
else if (attrName == onloadedmetadataAttr)
@@ -285,8 +287,14 @@ RenderObject* HTMLMediaElement::createRenderer(RenderArena* arena, RenderStyle*)
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
// Setup the renderer if we already have a proxy widget.
RenderEmbeddedObject* mediaRenderer = new (arena) RenderEmbeddedObject(this);
- if (m_proxyWidget)
+ if (m_proxyWidget) {
mediaRenderer->setWidget(m_proxyWidget);
+
+ Frame* frame = document()->frame();
+ FrameLoader* loader = frame ? frame->loader() : 0;
+ if (loader)
+ loader->showMediaPlayerProxyPlugin(m_proxyWidget.get());
+ }
return mediaRenderer;
#else
return new (arena) RenderMedia(this);
@@ -321,6 +329,14 @@ void HTMLMediaElement::attach()
if (renderer())
renderer()->updateFromElement();
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ else if (m_proxyWidget) {
+ Frame* frame = document()->frame();
+ FrameLoader* loader = frame ? frame->loader() : 0;
+ if (loader)
+ loader->hideMediaPlayerProxyPlugin(m_proxyWidget.get());
+ }
+#endif
}
void HTMLMediaElement::recalcStyle(StyleChange change)
@@ -482,6 +498,7 @@ void HTMLMediaElement::prepareForLoad()
m_loadTimer.stop();
m_sentStalledEvent = false;
m_haveFiredLoadedData = false;
+ m_completelyLoaded = false;
// 1 - Abort any already-running instance of the resource selection algorithm for this element.
m_currentSourceNode = 0;
@@ -842,25 +859,15 @@ void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
}
if (state == MediaPlayer::Loaded) {
- NetworkState oldState = m_networkState;
-
- m_networkState = NETWORK_LOADED;
- if (oldState < NETWORK_LOADED || oldState == NETWORK_NO_SOURCE) {
+ if (m_networkState != NETWORK_IDLE) {
m_progressEventTimer.stop();
// Schedule one last progress event so we guarantee that at least one is fired
// for files that load very quickly.
scheduleEvent(eventNames().progressEvent);
-
- // Check to see if readyState changes need to be dealt with before sending the
- // 'load' event so we report 'canplaythrough' first. This is necessary because a
- // media engine reports readyState and networkState changes separately
- MediaPlayer::ReadyState currentState = m_player->readyState();
- if (static_cast<ReadyState>(currentState) != m_readyState)
- setReadyState(currentState);
-
- scheduleEvent(eventNames().loadEvent);
}
+ m_networkState = NETWORK_IDLE;
+ m_completelyLoaded = true;
}
}
@@ -973,7 +980,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
{
ASSERT(m_player);
- if (m_networkState == NETWORK_EMPTY || m_networkState >= NETWORK_LOADED)
+ if (m_networkState != NETWORK_LOADING)
return;
unsigned progress = m_player->bytesLoaded();
@@ -1021,49 +1028,55 @@ bool HTMLMediaElement::supportsSave() const
void HTMLMediaElement::seek(float time, ExceptionCode& ec)
{
- // 4.8.10.10. Seeking
- // 1
+ // 4.8.9.9 Seeking
+
+ // 1 - If the media element's readyState is HAVE_NOTHING, then raise an INVALID_STATE_ERR exception.
if (m_readyState == HAVE_NOTHING || !m_player) {
ec = INVALID_STATE_ERR;
return;
}
- // 2
+ // Get the current time before setting m_seeking, m_lastSeekTime is returned once it is set.
+ float now = currentTime();
+
+ // 3 - Set the seeking IDL attribute to true.
+ // The flag will be cleared when the engine tells is the time has actually changed
+ m_seeking = true;
+
+ // 4 - Queue a task to fire a simple event named timeupdate at the element.
+ scheduleTimeupdateEvent(false);
+
+ // 6 - If the new playback position is later than the end of the media resource, then let it be the end
+ // of the media resource instead.
time = min(time, duration());
- // 3
- time = max(time, 0.0f);
+ // 7 - If the new playback position is less than the earliest possible position, let it be that position instead.
+ float earliestTime = m_player->startTime();
+ time = max(time, earliestTime);
- // 4
+ // 8 - If the (possibly now changed) new playback position is not in one of the ranges given in the
+ // seekable attribute, then let it be the position in one of the ranges given in the seekable attribute
+ // that is the nearest to the new playback position. ... If there are no ranges given in the seekable
+ // attribute then set the seeking IDL attribute to false and abort these steps.
RefPtr<TimeRanges> seekableRanges = seekable();
- if (!seekableRanges->contain(time)) {
- ec = INDEX_SIZE_ERR;
+ if (!seekableRanges->length() || time == now) {
+ m_seeking = false;
return;
}
-
- // avoid generating events when the time won't actually change
- float now = currentTime();
- if (time == now)
- return;
+ time = seekableRanges->nearest(time);
- // 5
if (m_playing) {
if (m_lastSeekTime < now)
addPlayedRange(m_lastSeekTime, now);
}
m_lastSeekTime = time;
+ m_sentEndEvent = false;
- // 6 - set the seeking flag, it will be cleared when the engine tells is the time has actually changed
- m_seeking = true;
-
- // 7
- scheduleTimeupdateEvent(false);
+ // 9 - Set the current playback position to the given new playback position
+ m_player->seek(time);
- // 8 - this is covered, if necessary, when the engine signals a readystate change
+ // 10-15 are handled, if necessary, when the engine signals a readystate change.
- // 10
- m_player->seek(time);
- m_sentEndEvent = false;
}
void HTMLMediaElement::finishSeek()
@@ -1809,7 +1822,7 @@ void HTMLMediaElement::stopPeriodicTimers()
void HTMLMediaElement::userCancelledLoad()
{
- if (m_networkState == NETWORK_EMPTY || m_networkState >= NETWORK_LOADED)
+ if (m_networkState == NETWORK_EMPTY || m_completelyLoaded)
return;
// If the media data fetching process is aborted by the user:
@@ -1992,9 +2005,7 @@ void HTMLMediaElement::createMediaPlayerProxy()
{
ensureMediaPlayer();
- if (!inDocument() && m_proxyWidget)
- return;
- if (inDocument() && !m_needWidgetUpdate)
+ if (m_proxyWidget || (inDocument() && !m_needWidgetUpdate))
return;
Frame* frame = document()->frame();
diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h
index 7d83f94..051629e 100644
--- a/WebCore/html/HTMLMediaElement.h
+++ b/WebCore/html/HTMLMediaElement.h
@@ -88,7 +88,7 @@ public:
void setSrc(const String&);
String currentSrc() const;
- enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_LOADED, NETWORK_NO_SOURCE };
+ enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO_SOURCE };
NetworkState networkState() const;
String preload() const;
@@ -366,6 +366,7 @@ private:
bool m_dispatchingCanPlayEvent : 1;
bool m_loadInitiatedByUserGesture : 1;
+ bool m_completelyLoaded : 1;
};
} //namespace
diff --git a/WebCore/html/HTMLMediaElement.idl b/WebCore/html/HTMLMediaElement.idl
index baea577..28a0fbe 100644
--- a/WebCore/html/HTMLMediaElement.idl
+++ b/WebCore/html/HTMLMediaElement.idl
@@ -36,8 +36,7 @@ interface [Conditional=VIDEO] HTMLMediaElement : HTMLElement {
const unsigned short NETWORK_EMPTY = 0;
const unsigned short NETWORK_IDLE = 1;
const unsigned short NETWORK_LOADING = 2;
- const unsigned short NETWORK_LOADED = 3;
- const unsigned short NETWORK_NO_SOURCE = 4;
+ const unsigned short NETWORK_NO_SOURCE = 3;
readonly attribute unsigned short networkState;
attribute DOMString preload;
diff --git a/WebCore/html/HTMLToken.h b/WebCore/html/HTMLToken.h
index c2db87d..d2987f4 100644
--- a/WebCore/html/HTMLToken.h
+++ b/WebCore/html/HTMLToken.h
@@ -339,7 +339,7 @@ public:
m_data = String(token.comment().data(), token.comment().size());
break;
case HTMLToken::Character:
- m_data = String(token.characters().data(), token.characters().size());
+ m_externalCharacters = &token.characters();
break;
}
}
@@ -352,12 +352,6 @@ public:
ASSERT(usesName());
}
- explicit AtomicHTMLToken(const String& characters)
- : m_type(HTMLToken::Character)
- , m_data(characters)
- {
- }
-
HTMLToken::Type type() const { return m_type; }
const AtomicString& name() const
@@ -398,10 +392,10 @@ public:
return m_attributes.release();
}
- const String& characters() const
+ const HTMLToken::DataVector& characters() const
{
ASSERT(m_type == HTMLToken::Character);
- return m_data;
+ return *m_externalCharacters;
}
const String& comment() const
@@ -446,10 +440,19 @@ private:
// "name" for DOCTYPE, StartTag, and EndTag
AtomicString m_name;
- // "characters" for Character
// "data" for Comment
String m_data;
+ // "characters" for Character
+ //
+ // We don't want to copy the the characters out of the HTMLToken, so we
+ // keep a pointer to its buffer instead. This buffer is owned by the
+ // HTMLToken and causes a lifetime dependence between these objects.
+ //
+ // FIXME: Add a mechanism for "internalizing" the characters when the
+ // HTMLToken is destructed.
+ const HTMLToken::DataVector* m_externalCharacters;
+
// For DOCTYPE
OwnPtr<HTMLToken::DoctypeData> m_doctypeData;
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/HTMLTreeBuilder.cpp
index 80d4530..93da3f7 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/HTMLTreeBuilder.cpp
@@ -33,6 +33,7 @@
#include "Frame.h"
#include "HTMLDocument.h"
#include "HTMLElementFactory.h"
+#include "HTMLFormElement.h"
#include "HTMLHtmlElement.h"
#include "HTMLNames.h"
#include "HTMLScriptElement.h"
@@ -65,77 +66,6 @@ inline bool isTreeBuilderWhitepace(UChar cc)
return cc == '\t' || cc == '\x0A' || cc == '\x0C' || cc == '\x0D' || cc == ' ';
}
-class ExternalCharacterTokenBuffer : public Noncopyable {
-public:
- explicit ExternalCharacterTokenBuffer(AtomicHTMLToken& token)
- : m_current(token.characters().characters())
- , m_end(m_current + token.characters().length())
- {
- ASSERT(!isEmpty());
- }
-
- ~ExternalCharacterTokenBuffer()
- {
- ASSERT(isEmpty());
- }
-
- bool isEmpty() const { return m_current == m_end; }
-
- void skipLeadingWhitespace()
- {
- ASSERT(!isEmpty());
- while (isTreeBuilderWhitepace(*m_current)) {
- if (++m_current == m_end)
- return;
- }
- }
-
- String takeLeadingWhitespace()
- {
- ASSERT(!isEmpty());
- const UChar* start = m_current;
- skipLeadingWhitespace();
- if (start == m_current)
- return String();
- return String(start, m_current - start);
- }
-
- String takeRemaining()
- {
- ASSERT(!isEmpty());
- const UChar* start = m_current;
- m_current = m_end;
- return String(start, m_current - start);
- }
-
- void giveRemainingTo(Vector<UChar>& recipient)
- {
- recipient.append(m_current, m_end - m_current);
- m_current = m_end;
- }
-
- String takeRemainingWhitespace()
- {
- ASSERT(!isEmpty());
- Vector<UChar> whitespace;
- do {
- UChar cc = *m_current++;
- if (isTreeBuilderWhitepace(cc))
- whitespace.append(cc);
- } while (m_current < m_end);
- // Returning the null string when there aren't any whitespace
- // characters is slightly cleaner semantically because we don't want
- // to insert a text node (as opposed to inserting an empty text node).
- if (whitespace.isEmpty())
- return String();
- return String::adopt(whitespace);
- }
-
-private:
- const UChar* m_current;
- const UChar* m_end;
-};
-
inline bool hasNonWhitespace(const String& string)
{
const UChar* characters = string.characters();
@@ -285,13 +215,6 @@ bool isNonAnchorFormattingTag(const AtomicString& tagName)
|| isNonAnchorNonNobrFormattingTag(tagName);
}
-bool requiresRedirectToFosterParent(Element* element)
-{
- return element->hasTagName(tableTag)
- || isTableBodyContextTag(element->localName())
- || element->hasTagName(trTag);
-}
-
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#formatting
bool isFormattingTag(const AtomicString& tagName)
{
@@ -316,10 +239,89 @@ bool isNotFormattingAndNotPhrasing(const Element* element)
} // namespace
+class HTMLTreeBuilder::ExternalCharacterTokenBuffer : public Noncopyable {
+public:
+ explicit ExternalCharacterTokenBuffer(AtomicHTMLToken& token)
+ : m_current(token.characters().data())
+ , m_end(m_current + token.characters().size())
+ {
+ ASSERT(!isEmpty());
+ }
+
+ explicit ExternalCharacterTokenBuffer(const String& string)
+ : m_current(string.characters())
+ , m_end(m_current + string.length())
+ {
+ ASSERT(!isEmpty());
+ }
+
+ ~ExternalCharacterTokenBuffer()
+ {
+ ASSERT(isEmpty());
+ }
+
+ bool isEmpty() const { return m_current == m_end; }
+
+ void skipLeadingWhitespace()
+ {
+ ASSERT(!isEmpty());
+ while (isTreeBuilderWhitepace(*m_current)) {
+ if (++m_current == m_end)
+ return;
+ }
+ }
+
+ String takeLeadingWhitespace()
+ {
+ ASSERT(!isEmpty());
+ const UChar* start = m_current;
+ skipLeadingWhitespace();
+ if (start == m_current)
+ return String();
+ return String(start, m_current - start);
+ }
+
+ String takeRemaining()
+ {
+ ASSERT(!isEmpty());
+ const UChar* start = m_current;
+ m_current = m_end;
+ return String(start, m_current - start);
+ }
+
+ void giveRemainingTo(Vector<UChar>& recipient)
+ {
+ recipient.append(m_current, m_end - m_current);
+ m_current = m_end;
+ }
+
+ String takeRemainingWhitespace()
+ {
+ ASSERT(!isEmpty());
+ Vector<UChar> whitespace;
+ do {
+ UChar cc = *m_current++;
+ if (isTreeBuilderWhitepace(cc))
+ whitespace.append(cc);
+ } while (m_current < m_end);
+ // Returning the null string when there aren't any whitespace
+ // characters is slightly cleaner semantically because we don't want
+ // to insert a text node (as opposed to inserting an empty text node).
+ if (whitespace.isEmpty())
+ return String();
+ return String::adopt(whitespace);
+ }
+
+private:
+ const UChar* m_current;
+ const UChar* m_end;
+};
+
+
HTMLTreeBuilder::HTMLTreeBuilder(HTMLTokenizer* tokenizer, HTMLDocument* document, bool reportErrors)
: m_framesetOk(true)
, m_document(document)
- , m_tree(document, FragmentScriptingAllowed)
+ , m_tree(document, FragmentScriptingAllowed, false)
, m_reportErrors(reportErrors)
, m_isPaused(false)
, m_insertionMode(InitialMode)
@@ -339,7 +341,7 @@ HTMLTreeBuilder::HTMLTreeBuilder(HTMLTokenizer* tokenizer, HTMLDocument* documen
HTMLTreeBuilder::HTMLTreeBuilder(HTMLTokenizer* tokenizer, DocumentFragment* fragment, FragmentScriptingPermission scriptingPermission)
: m_framesetOk(true)
, m_document(fragment->document())
- , m_tree(fragment->document(), scriptingPermission)
+ , m_tree(fragment->document(), scriptingPermission, true)
, m_reportErrors(false) // FIXME: Why not report errors in fragments?
, m_isPaused(false)
, m_insertionMode(InitialMode)
@@ -386,7 +388,7 @@ static void convertToOldStyle(AtomicHTMLToken& token, Token& oldStyleToken)
break;
case HTMLToken::Character:
oldStyleToken.tagName = textAtom;
- oldStyleToken.text = token.characters().impl();
+ oldStyleToken.text = StringImpl::create(token.characters().data(), token.characters().size());
break;
}
}
@@ -542,7 +544,7 @@ void HTMLTreeBuilder::processDoctypeToken(AtomicHTMLToken& token)
return;
}
if (m_insertionMode == InTableTextMode) {
- processDefaultForInTableTextMode(token);
+ defaultForInTableText();
processDoctypeToken(token);
return;
}
@@ -565,8 +567,9 @@ void HTMLTreeBuilder::processFakeEndTag(const QualifiedName& tagName)
void HTMLTreeBuilder::processFakeCharacters(const String& characters)
{
- AtomicHTMLToken fakeToken(characters);
- processCharacter(fakeToken);
+ ASSERT(!characters.isEmpty());
+ ExternalCharacterTokenBuffer buffer(characters);
+ processCharacterBuffer(buffer);
}
void HTMLTreeBuilder::processFakePEndTagIfPInScope()
@@ -843,8 +846,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
return;
}
processFakePEndTagIfPInScope();
- m_tree.insertHTMLElement(token);
- m_tree.setForm(m_tree.currentElement());
+ m_tree.insertHTMLFormElement(token);
return;
}
if (token.name() == liTag) {
@@ -1069,12 +1071,12 @@ bool HTMLTreeBuilder::processColgroupEndTagForInColumnGroup()
void HTMLTreeBuilder::closeTheCell()
{
ASSERT(insertionMode() == InCellMode);
- if (m_tree.openElements()->inScope(tdTag)) {
- ASSERT(!m_tree.openElements()->inScope(thTag));
+ if (m_tree.openElements()->inTableScope(tdTag)) {
+ ASSERT(!m_tree.openElements()->inTableScope(thTag));
processFakeEndTag(tdTag);
return;
}
- ASSERT(m_tree.openElements()->inScope(thTag));
+ ASSERT(m_tree.openElements()->inTableScope(thTag));
processFakeEndTag(thTag);
ASSERT(insertionMode() == InRowMode);
}
@@ -1129,7 +1131,7 @@ void HTMLTreeBuilder::processStartTagForInTable(AtomicHTMLToken& token)
}
if (token.name() == inputTag) {
Attribute* typeAttribute = token.getAttributeItem(typeAttr);
- if (!typeAttribute || equalIgnoringCase(typeAttribute->value(), "hidden")) {
+ if (typeAttribute && equalIgnoringCase(typeAttribute->value(), "hidden")) {
parseError(token);
m_tree.insertSelfClosingHTMLElement(token);
return;
@@ -1140,11 +1142,14 @@ void HTMLTreeBuilder::processStartTagForInTable(AtomicHTMLToken& token)
parseError(token);
if (m_tree.form())
return;
- m_tree.insertSelfClosingHTMLElement(token);
+ // FIXME: This deviates from the spec:
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10216
+ m_tree.insertHTMLFormElement(token);
+ m_tree.openElements()->pop();
return;
}
parseError(token);
- HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree, requiresRedirectToFosterParent(m_tree.currentElement()));
+ HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
processStartTagForInBody(token);
}
@@ -1178,7 +1183,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
switch (insertionMode()) {
case InitialMode:
ASSERT(insertionMode() == InitialMode);
- processDefaultForInitialMode(token);
+ defaultForInitial();
// Fall through.
case BeforeHTMLMode:
ASSERT(insertionMode() == BeforeHTMLMode);
@@ -1187,7 +1192,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
setInsertionMode(BeforeHeadMode);
return;
}
- processDefaultForBeforeHTMLMode(token);
+ defaultForBeforeHTML();
// Fall through.
case BeforeHeadMode:
ASSERT(insertionMode() == BeforeHeadMode);
@@ -1200,13 +1205,13 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
setInsertionMode(InHeadMode);
return;
}
- processDefaultForBeforeHeadMode(token);
+ defaultForBeforeHead();
// Fall through.
case InHeadMode:
ASSERT(insertionMode() == InHeadMode);
if (processStartTagForInHead(token))
return;
- processDefaultForInHeadMode(token);
+ defaultForInHead();
// Fall through.
case AfterHeadMode:
ASSERT(insertionMode() == AfterHeadMode);
@@ -1243,7 +1248,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForAfterHeadMode(token);
+ defaultForAfterHead();
// Fall through
case InBodyMode:
ASSERT(insertionMode() == InBodyMode);
@@ -1383,7 +1388,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForInHeadNoscriptMode(token);
+ defaultForInHeadNoscript();
processToken(token);
break;
case InFramesetMode:
@@ -1482,7 +1487,7 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
}
break;
case InTableTextMode:
- processDefaultForInTableTextMode(token);
+ defaultForInTableText();
processStartTag(token);
break;
case InForeignContentMode: {
@@ -1561,7 +1566,7 @@ bool HTMLTreeBuilder::processBodyEndTagForInBody(AtomicHTMLToken& token)
parseError(token);
return false;
}
- notImplemented();
+ notImplemented(); // Emit a more specific parse error based on stack contents.
setInsertionMode(AfterBodyMode);
return true;
}
@@ -1630,7 +1635,7 @@ void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token)
while (1) {
// 1.
Element* formattingElement = m_tree.activeFormattingElements()->closestElementInScopeWithName(token.name());
- if (!formattingElement || (m_tree.openElements()->contains(formattingElement)) && !m_tree.openElements()->inScope(formattingElement)) {
+ if (!formattingElement || ((m_tree.openElements()->contains(formattingElement)) && !m_tree.openElements()->inScope(formattingElement))) {
parseError(token);
notImplemented(); // Check the stack of open elements for a more specific parse error.
return;
@@ -1675,11 +1680,7 @@ void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token)
if (node == formattingElementRecord)
break;
// 6.5
- // FIXME: We're supposed to save the original token in the entry.
- AtomicHTMLToken fakeToken(HTMLToken::StartTag, node->element()->localName());
- // Is createHTMLElement correct? (instead of insertHTMLElement)
- // Does this code ever leave newElement unattached?
- RefPtr<Element> newElement = m_tree.createHTMLElement(fakeToken);
+ RefPtr<Element> newElement = m_tree.createHTMLElementFromElementRecord(node);
HTMLFormattingElementList::Entry* nodeEntry = m_tree.activeFormattingElements()->find(node->element());
nodeEntry->replaceElement(newElement.get());
node->replaceElement(newElement.release());
@@ -1687,7 +1688,7 @@ void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token)
// was replaced in 6.5.
// http://www.w3.org/Bugs/Public/show_bug.cgi?id=10096
if (lastNode == furthestBlock)
- bookmark.moveToAfter(node->element());
+ bookmark.moveToAfter(nodeEntry);
// 6.6
// Use appendChild instead of parserAddChild to handle possible reparenting.
ExceptionCode ec;
@@ -1698,6 +1699,8 @@ void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token)
}
// 7
const AtomicString& commonAncestorTag = commonAncestor->localName();
+ // FIXME: If this moves to HTMLConstructionSite, this check should use
+ // causesFosterParenting(tagName) instead.
if (commonAncestorTag == tableTag
|| commonAncestorTag == trTag
|| isTableBodyContextTag(commonAncestorTag))
@@ -1708,16 +1711,21 @@ void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token)
ASSERT(!ec);
}
// 8
- // FIXME: We're supposed to save the original token in the entry.
- AtomicHTMLToken fakeToken(HTMLToken::StartTag, formattingElement->localName());
- RefPtr<Element> newElement = m_tree.createHTMLElement(fakeToken);
+ RefPtr<Element> newElement = m_tree.createHTMLElementFromElementRecord(formattingElementRecord);
// 9
reparentChildren(furthestBlock->element(), newElement.get());
// 10
- furthestBlock->element()->parserAddChild(newElement);
+ Element* furthestBlockElement = furthestBlock->element();
+ // FIXME: All this creation / parserAddChild / attach business should
+ // be in HTMLConstructionSite. My guess is that steps 8--12
+ // should all be in some HTMLConstructionSite function.
+ furthestBlockElement->parserAddChild(newElement);
+ if (furthestBlockElement->attached()) {
+ ASSERT(!newElement->attached());
+ newElement->attach();
+ }
// 11
- m_tree.activeFormattingElements()->remove(formattingElement);
- m_tree.activeFormattingElements()->insertAt(newElement.get(), bookmark);
+ m_tree.activeFormattingElements()->swapTo(formattingElement, newElement.get(), bookmark);
// 12
m_tree.openElements()->remove(formattingElement);
m_tree.openElements()->insertAbove(newElement, furthestBlock);
@@ -2100,7 +2108,7 @@ void HTMLTreeBuilder::processEndTagForInTable(AtomicHTMLToken& token)
return;
}
// Is this redirection necessary here?
- HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree, requiresRedirectToFosterParent(m_tree.currentElement()));
+ HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
processEndTagForInBody(token);
}
@@ -2110,7 +2118,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
switch (insertionMode()) {
case InitialMode:
ASSERT(insertionMode() == InitialMode);
- processDefaultForInitialMode(token);
+ defaultForInitial();
// Fall through.
case BeforeHTMLMode:
ASSERT(insertionMode() == BeforeHTMLMode);
@@ -2118,7 +2126,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForBeforeHTMLMode(token);
+ defaultForBeforeHTML();
// Fall through.
case BeforeHeadMode:
ASSERT(insertionMode() == BeforeHeadMode);
@@ -2126,7 +2134,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForBeforeHeadMode(token);
+ defaultForBeforeHead();
// Fall through.
case InHeadMode:
ASSERT(insertionMode() == InHeadMode);
@@ -2139,7 +2147,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForInHeadMode(token);
+ defaultForInHead();
// Fall through.
case AfterHeadMode:
ASSERT(insertionMode() == AfterHeadMode);
@@ -2147,7 +2155,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForAfterHeadMode(token);
+ defaultForAfterHead();
// Fall through
case InBodyMode:
ASSERT(insertionMode() == InBodyMode);
@@ -2242,7 +2250,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
parseError(token);
return;
}
- processDefaultForInHeadNoscriptMode(token);
+ defaultForInHeadNoscript();
processToken(token);
break;
case TextMode:
@@ -2251,6 +2259,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
m_isPaused = true;
ASSERT(m_tree.currentElement()->hasTagName(scriptTag));
m_scriptToProcess = m_tree.currentElement();
+ m_scriptToProcessStartLine = m_lastScriptElementStartLine + 1;
m_tree.openElements()->pop();
setInsertionMode(m_originalInsertionMode);
return;
@@ -2326,7 +2335,7 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
}
break;
case InTableTextMode:
- processDefaultForInTableTextMode(token);
+ defaultForInTableText();
processEndTag(token);
break;
case InForeignContentMode:
@@ -2339,9 +2348,11 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord();
if (!nodeRecord->element()->hasLocalName(token.name())) {
parseError(token);
- // FIXME: This return is not in the spec but appears to be needed.
+ // FIXME: This return is not in the spec but it needed for now
+ // to prevent walking off the bottom of the stack.
// http://www.w3.org/Bugs/Public/show_bug.cgi?id=10118
- return;
+ if (!m_tree.openElements()->contains(token.name()))
+ return;
}
while (1) {
if (nodeRecord->element()->hasLocalName(token.name())) {
@@ -2349,8 +2360,13 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
return;
}
nodeRecord = nodeRecord->next();
- if (nodeRecord->element()->namespaceURI() == xhtmlNamespaceURI)
+ if (nodeRecord->element()->namespaceURI() == xhtmlNamespaceURI) {
processUsingSecondaryInsertionModeAndAdjustInsertionMode(token);
+ // FIXME: This is a hack around a spec bug and is likely wrong.
+ // http://www.w3.org/Bugs/Public/show_bug.cgi?id=9581
+ if (nodeRecord != m_tree.openElements()->topRecord())
+ return;
+ }
}
return;
}
@@ -2408,7 +2424,7 @@ void HTMLTreeBuilder::processComment(AtomicHTMLToken& token)
return;
}
if (m_insertionMode == InTableTextMode) {
- processDefaultForInTableTextMode(token);
+ defaultForInTableText();
processComment(token);
return;
}
@@ -2418,13 +2434,16 @@ void HTMLTreeBuilder::processComment(AtomicHTMLToken& token)
void HTMLTreeBuilder::processCharacter(AtomicHTMLToken& token)
{
ASSERT(token.type() == HTMLToken::Character);
-
// FIXME: Currently this design has an extra memcpy because we copy the
// characters out of the HTMLTokenizer's buffer into the AtomicHTMLToken
// and then into the text node. What we'd really like is to copy directly
// from the HTMLTokenizer's buffer into the text node.
ExternalCharacterTokenBuffer buffer(token);
+ processCharacterBuffer(buffer);
+}
+void HTMLTreeBuilder::processCharacterBuffer(ExternalCharacterTokenBuffer& buffer)
+{
ReprocessBuffer:
switch (insertionMode()) {
case InitialMode: {
@@ -2432,7 +2451,7 @@ ReprocessBuffer:
buffer.skipLeadingWhitespace();
if (buffer.isEmpty())
return;
- processDefaultForInitialMode(token);
+ defaultForInitial();
// Fall through.
}
case BeforeHTMLMode: {
@@ -2440,7 +2459,7 @@ ReprocessBuffer:
buffer.skipLeadingWhitespace();
if (buffer.isEmpty())
return;
- processDefaultForBeforeHTMLMode(token);
+ defaultForBeforeHTML();
// Fall through.
}
case BeforeHeadMode: {
@@ -2448,7 +2467,7 @@ ReprocessBuffer:
buffer.skipLeadingWhitespace();
if (buffer.isEmpty())
return;
- processDefaultForBeforeHeadMode(token);
+ defaultForBeforeHead();
// Fall through.
}
case InHeadMode: {
@@ -2458,7 +2477,7 @@ ReprocessBuffer:
m_tree.insertTextNode(leadingWhitespace);
if (buffer.isEmpty())
return;
- processDefaultForInHeadMode(token);
+ defaultForInHead();
// Fall through.
}
case AfterHeadMode: {
@@ -2468,7 +2487,7 @@ ReprocessBuffer:
m_tree.insertTextNode(leadingWhitespace);
if (buffer.isEmpty())
return;
- processDefaultForAfterHeadMode(token);
+ defaultForAfterHead();
// Fall through.
}
case InBodyMode:
@@ -2511,7 +2530,7 @@ ReprocessBuffer:
case AfterBodyMode:
case AfterAfterBodyMode: {
ASSERT(insertionMode() == AfterBodyMode || insertionMode() == AfterAfterBodyMode);
- parseError(token);
+ // FIXME: parse error
setInsertionMode(InBodyMode);
goto ReprocessBuffer;
break;
@@ -2528,7 +2547,7 @@ ReprocessBuffer:
m_tree.insertTextNode(leadingWhitespace);
if (buffer.isEmpty())
return;
- processDefaultForInHeadNoscriptMode(token);
+ defaultForInHeadNoscript();
goto ReprocessBuffer;
break;
}
@@ -2575,28 +2594,28 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
switch (insertionMode()) {
case InitialMode:
ASSERT(insertionMode() == InitialMode);
- processDefaultForInitialMode(token);
+ defaultForInitial();
// Fall through.
case BeforeHTMLMode:
ASSERT(insertionMode() == BeforeHTMLMode);
- processDefaultForBeforeHTMLMode(token);
+ defaultForBeforeHTML();
// Fall through.
case BeforeHeadMode:
ASSERT(insertionMode() == BeforeHeadMode);
- processDefaultForBeforeHeadMode(token);
+ defaultForBeforeHead();
// Fall through.
case InHeadMode:
ASSERT(insertionMode() == InHeadMode);
- processDefaultForInHeadMode(token);
+ defaultForInHead();
// Fall through.
case AfterHeadMode:
ASSERT(insertionMode() == AfterHeadMode);
- processDefaultForAfterHeadMode(token);
+ defaultForAfterHead();
// Fall through
case InBodyMode:
case InCellMode:
ASSERT(insertionMode() == InBodyMode || insertionMode() == InCellMode);
- notImplemented();
+ notImplemented(); // Emit parse error based on what elemtns are still open.
break;
case AfterBodyMode:
case AfterAfterBodyMode:
@@ -2605,9 +2624,9 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
break;
case InHeadNoscriptMode:
ASSERT(insertionMode() == InHeadNoscriptMode);
- processDefaultForInHeadNoscriptMode(token);
- processToken(token);
- break;
+ defaultForInHeadNoscript();
+ processEndOfFile(token);
+ return;
case AfterFramesetMode:
case AfterAfterFramesetMode:
ASSERT(insertionMode() == AfterFramesetMode || insertionMode() == AfterAfterFramesetMode);
@@ -2631,7 +2650,7 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
return;
}
processEndOfFile(token);
- break;
+ return;
case InForeignContentMode:
parseError(token);
// FIXME: Following the spec would infinitely recurse on <svg><svg>
@@ -2639,64 +2658,66 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
m_tree.openElements()->popUntilElementWithNamespace(xhtmlNamespaceURI);
setInsertionMode(m_secondaryInsertionMode);
processEndOfFile(token);
- break;
+ return;
case InTableTextMode:
- processDefaultForInTableTextMode(token);
+ defaultForInTableText();
processEndOfFile(token);
- break;
+ return;
case TextMode:
case InCaptionMode:
case InRowMode:
notImplemented();
break;
}
+ ASSERT(m_tree.openElements()->top());
+ m_tree.openElements()->popAll();
}
-void HTMLTreeBuilder::processDefaultForInitialMode(AtomicHTMLToken& token)
+void HTMLTreeBuilder::defaultForInitial()
{
notImplemented();
- parseError(token);
+ // FIXME: parse error
setInsertionMode(BeforeHTMLMode);
}
-void HTMLTreeBuilder::processDefaultForBeforeHTMLMode(AtomicHTMLToken&)
+void HTMLTreeBuilder::defaultForBeforeHTML()
{
AtomicHTMLToken startHTML(HTMLToken::StartTag, htmlTag.localName());
m_tree.insertHTMLHtmlStartTagBeforeHTML(startHTML);
setInsertionMode(BeforeHeadMode);
}
-void HTMLTreeBuilder::processDefaultForBeforeHeadMode(AtomicHTMLToken&)
+void HTMLTreeBuilder::defaultForBeforeHead()
{
AtomicHTMLToken startHead(HTMLToken::StartTag, headTag.localName());
processStartTag(startHead);
}
-void HTMLTreeBuilder::processDefaultForInHeadMode(AtomicHTMLToken&)
+void HTMLTreeBuilder::defaultForInHead()
{
AtomicHTMLToken endHead(HTMLToken::EndTag, headTag.localName());
processEndTag(endHead);
}
-void HTMLTreeBuilder::processDefaultForInHeadNoscriptMode(AtomicHTMLToken&)
+void HTMLTreeBuilder::defaultForInHeadNoscript()
{
AtomicHTMLToken endNoscript(HTMLToken::EndTag, noscriptTag.localName());
processEndTag(endNoscript);
}
-void HTMLTreeBuilder::processDefaultForAfterHeadMode(AtomicHTMLToken&)
+void HTMLTreeBuilder::defaultForAfterHead()
{
AtomicHTMLToken startBody(HTMLToken::StartTag, bodyTag.localName());
processStartTag(startBody);
m_framesetOk = true;
}
-void HTMLTreeBuilder::processDefaultForInTableTextMode(AtomicHTMLToken& token)
+void HTMLTreeBuilder::defaultForInTableText()
{
String characters = String::adopt(m_pendingTableCharacters);
if (hasNonWhitespace(characters)) {
- parseError(token);
- HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree, requiresRedirectToFosterParent(m_tree.currentElement()));
+ // FIXME: parse error
+ HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
m_tree.reconstructTheActiveFormattingElements();
m_tree.insertTextNode(characters);
m_framesetOk = false;
@@ -2775,6 +2796,7 @@ void HTMLTreeBuilder::processScriptStartTag(AtomicHTMLToken& token)
m_tree.insertScriptElement(token);
m_tokenizer->setState(HTMLTokenizer::ScriptDataState);
m_originalInsertionMode = m_insertionMode;
+ m_lastScriptElementStartLine = m_tokenizer->lineNumber();
setInsertionMode(TextMode);
}
diff --git a/WebCore/html/HTMLTreeBuilder.h b/WebCore/html/HTMLTreeBuilder.h
index 74e3398..0f87cb0 100644
--- a/WebCore/html/HTMLTreeBuilder.h
+++ b/WebCore/html/HTMLTreeBuilder.h
@@ -76,6 +76,7 @@ public:
private:
class FakeInsertionMode;
+ class ExternalCharacterTokenBuffer;
// Represents HTML5 "insertion mode"
// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#insertion-mode
enum InsertionMode {
@@ -134,6 +135,8 @@ private:
// needs to assert which tokens it can be called with.
void processAnyOtherEndTagForInBody(AtomicHTMLToken&);
+ void processCharacterBuffer(ExternalCharacterTokenBuffer&);
+
void processFakeStartTag(const QualifiedName&, PassRefPtr<NamedNodeMap> attributes = 0);
void processFakeEndTag(const QualifiedName&);
void processFakeCharacters(const String&);
@@ -144,14 +147,13 @@ private:
void processScriptStartTag(AtomicHTMLToken&);
// Default processing for the different insertion modes.
- // FIXME: These functions need to be renamed to remove "process" from their names.
- void processDefaultForInitialMode(AtomicHTMLToken&);
- void processDefaultForBeforeHTMLMode(AtomicHTMLToken&);
- void processDefaultForBeforeHeadMode(AtomicHTMLToken&);
- void processDefaultForInHeadMode(AtomicHTMLToken&);
- void processDefaultForInHeadNoscriptMode(AtomicHTMLToken&);
- void processDefaultForAfterHeadMode(AtomicHTMLToken&);
- void processDefaultForInTableTextMode(AtomicHTMLToken&);
+ void defaultForInitial();
+ void defaultForBeforeHTML();
+ void defaultForBeforeHead();
+ void defaultForInHead();
+ void defaultForInHeadNoscript();
+ void defaultForAfterHead();
+ void defaultForInTableText();
void processUsingSecondaryInsertionModeAndAdjustInsertionMode(AtomicHTMLToken&);
diff --git a/WebCore/html/LegacyHTMLTreeBuilder.cpp b/WebCore/html/LegacyHTMLTreeBuilder.cpp
index afd79b6..ee0bcfc 100644
--- a/WebCore/html/LegacyHTMLTreeBuilder.cpp
+++ b/WebCore/html/LegacyHTMLTreeBuilder.cpp
@@ -277,7 +277,30 @@ PassRefPtr<Node> LegacyHTMLTreeBuilder::parseToken(Token* t)
if (m_inBody && !skipMode() && m_current->localName() != styleTag &&
m_current->localName() != titleTag && !t->text->containsOnlyWhitespace())
m_haveContent = true;
-
+
+ // HTML5 requires text node coalescing.
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#insert-a-character
+ Node* previousChild = m_current->lastChild();
+ if (previousChild && previousChild->isTextNode()) {
+ // Only coalesce text nodes if the text node wouldn't be foster parented.
+ if (!m_current->hasTagName(htmlTag)
+ && !m_current->hasTagName(tableTag)
+ && !m_current->hasTagName(trTag)
+ && !m_current->hasTagName(theadTag)
+ && !m_current->hasTagName(tbodyTag)
+ && !m_current->hasTagName(tfootTag)
+ && !m_current->hasTagName(titleTag)) {
+ // Technically we're only supposed to merge into the previous
+ // text node if it was the last node inserted by the parser.
+ // (This was a spec modification made to make it easier for
+ // mozilla to run their parser in a thread.)
+ // In practice it does not seem to matter.
+ CharacterData* textNode = static_cast<CharacterData*>(previousChild);
+ textNode->parserAppendData(t->text);
+ return textNode;
+ }
+ }
+
RefPtr<Node> n;
String text = t->text.get();
unsigned charsLeft = text.length();
@@ -566,8 +589,17 @@ bool LegacyHTMLTreeBuilder::handleError(Node* n, bool flat, const AtomicString&
} else {
if (n->isTextNode()) {
Text* t = static_cast<Text*>(n);
- if (t->containsOnlyWhitespace())
+ if (t->containsOnlyWhitespace()) {
+ if (m_head && !m_inBody) {
+ // We're between </head> and <body>. According to
+ // the HTML5 parsing algorithm, we're supposed to
+ // insert whitespace text nodes into the HTML element.
+ ExceptionCode ec;
+ m_current->appendChild(n, ec);
+ return true;
+ }
return false;
+ }
}
if (!m_haveFrameSet) {
// Ensure that head exists.
@@ -862,6 +894,15 @@ bool LegacyHTMLTreeBuilder::nestedStyleCreateErrorCheck(Token* t, RefPtr<Node>&)
return allowNestedRedundantTag(t->tagName);
}
+bool LegacyHTMLTreeBuilder::colCreateErrorCheck(Token*, RefPtr<Node>&)
+{
+ if (!m_current->hasTagName(tableTag))
+ return true;
+ RefPtr<Element> implicitColgroup = HTMLElementFactory::createHTMLElement(colgroupTag, m_document, 0, true);
+ insertNode(implicitColgroup.get());
+ return true;
+}
+
bool LegacyHTMLTreeBuilder::tableCellCreateErrorCheck(Token*, RefPtr<Node>&)
{
popBlock(tdTag);
@@ -955,6 +996,7 @@ PassRefPtr<Node> LegacyHTMLTreeBuilder::getNode(Token* t)
mapTagsToFunc(gFunctionMap, pCloserCreateErrorTags, &LegacyHTMLTreeBuilder::pCloserCreateErrorCheck);
mapTagToFunc(gFunctionMap, bodyTag, &LegacyHTMLTreeBuilder::bodyCreateErrorCheck);
+ mapTagToFunc(gFunctionMap, colTag, &LegacyHTMLTreeBuilder::colCreateErrorCheck);
mapTagToFunc(gFunctionMap, ddTag, &LegacyHTMLTreeBuilder::ddCreateErrorCheck);
mapTagToFunc(gFunctionMap, dtTag, &LegacyHTMLTreeBuilder::dtCreateErrorCheck);
mapTagToFunc(gFunctionMap, formTag, &LegacyHTMLTreeBuilder::formCreateErrorCheck);
diff --git a/WebCore/html/LegacyHTMLTreeBuilder.h b/WebCore/html/LegacyHTMLTreeBuilder.h
index cfd9519..4ac8413 100644
--- a/WebCore/html/LegacyHTMLTreeBuilder.h
+++ b/WebCore/html/LegacyHTMLTreeBuilder.h
@@ -85,6 +85,7 @@ private:
PassRefPtr<Node> getNode(Token*);
bool bodyCreateErrorCheck(Token*, RefPtr<Node>&);
bool canvasCreateErrorCheck(Token*, RefPtr<Node>&);
+ bool colCreateErrorCheck(Token*, RefPtr<Node>&);
bool commentCreateErrorCheck(Token*, RefPtr<Node>&);
bool ddCreateErrorCheck(Token*, RefPtr<Node>&);
bool dtCreateErrorCheck(Token*, RefPtr<Node>&);
diff --git a/WebCore/html/TimeRanges.cpp b/WebCore/html/TimeRanges.cpp
index e5b070d..1e18306 100644
--- a/WebCore/html/TimeRanges.cpp
+++ b/WebCore/html/TimeRanges.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,6 +27,8 @@
#include "TimeRanges.h"
+#include <math.h>
+
using namespace WebCore;
TimeRanges::TimeRanges(float start, float end)
@@ -115,3 +117,21 @@ bool TimeRanges::contain(float time) const
}
return false;
}
+
+float TimeRanges::nearest(float time) const
+{
+ ExceptionCode unused;
+ float closest = 0;
+ unsigned count = length();
+ for (unsigned ndx = 0; ndx < count; ndx++) {
+ float startTime = start(ndx, unused);
+ float endTime = end(ndx, unused);
+ if (time >= startTime && time <= endTime)
+ return time;
+ if (fabs(startTime - time) < closest)
+ closest = fabsf(startTime - time);
+ else if (fabs(endTime - time) < closest)
+ closest = fabsf(endTime - time);
+ }
+ return closest;
+}
diff --git a/WebCore/html/TimeRanges.h b/WebCore/html/TimeRanges.h
index 6be8c4e..2d7af25 100644
--- a/WebCore/html/TimeRanges.h
+++ b/WebCore/html/TimeRanges.h
@@ -55,6 +55,8 @@ public:
void add(float start, float end);
bool contain(float time) const;
+
+ float nearest(float time) const;
private:
TimeRanges() { }
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index b3d212a..acd15d2 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -172,6 +172,9 @@ void CanvasRenderingContext2D::setStrokeStyle(PassRefPtr<CanvasStyle> style)
if (!style)
return;
+ if (state().m_strokeStyle && state().m_strokeStyle->isEquivalentColor(*style))
+ return;
+
if (canvas()->originClean()) {
if (CanvasPattern* pattern = style->canvasPattern()) {
if (!pattern->originClean())
@@ -184,6 +187,7 @@ void CanvasRenderingContext2D::setStrokeStyle(PassRefPtr<CanvasStyle> style)
if (!c)
return;
state().m_strokeStyle->applyStrokeColor(c);
+ state().m_unparsedStrokeColor = String();
}
CanvasStyle* CanvasRenderingContext2D::fillStyle() const
@@ -195,6 +199,9 @@ void CanvasRenderingContext2D::setFillStyle(PassRefPtr<CanvasStyle> style)
{
if (!style)
return;
+
+ if (state().m_fillStyle && state().m_fillStyle->isEquivalentColor(*style))
+ return;
if (canvas()->originClean()) {
if (CanvasPattern* pattern = style->canvasPattern()) {
@@ -208,6 +215,7 @@ void CanvasRenderingContext2D::setFillStyle(PassRefPtr<CanvasStyle> style)
if (!c)
return;
state().m_fillStyle->applyFillColor(c);
+ state().m_unparsedFillColor = String();
}
float CanvasRenderingContext2D::lineWidth() const
@@ -478,7 +486,10 @@ void CanvasRenderingContext2D::setTransform(float m11, float m12, float m21, flo
void CanvasRenderingContext2D::setStrokeColor(const String& color)
{
+ if (color == state().m_unparsedStrokeColor)
+ return;
setStrokeStyle(CanvasStyle::create(color));
+ state().m_unparsedStrokeColor = color;
}
void CanvasRenderingContext2D::setStrokeColor(float grayLevel)
@@ -508,7 +519,10 @@ void CanvasRenderingContext2D::setStrokeColor(float c, float m, float y, float k
void CanvasRenderingContext2D::setFillColor(const String& color)
{
+ if (color == state().m_unparsedFillColor)
+ return;
setFillStyle(CanvasStyle::create(color));
+ state().m_unparsedFillColor = color;
}
void CanvasRenderingContext2D::setFillColor(float grayLevel)
@@ -543,7 +557,12 @@ void CanvasRenderingContext2D::beginPath()
void CanvasRenderingContext2D::closePath()
{
- m_path.closeSubpath();
+ if (m_path.isEmpty())
+ return;
+
+ FloatRect boundRect = m_path.boundingRect();
+ if (boundRect.width() || boundRect.height())
+ m_path.closeSubpath();
}
void CanvasRenderingContext2D::moveTo(float x, float y)
@@ -561,9 +580,11 @@ void CanvasRenderingContext2D::lineTo(float x, float y)
return;
if (!state().m_invertibleCTM)
return;
+
+ FloatPoint p1 = FloatPoint(x, y);
if (!m_path.hasCurrentPoint())
- m_path.moveTo(FloatPoint(x, y));
- else
+ m_path.moveTo(p1);
+ else if (p1 != m_path.currentPoint())
m_path.addLineTo(FloatPoint(x, y));
}
@@ -575,7 +596,10 @@ void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, f
return;
if (!m_path.hasCurrentPoint())
m_path.moveTo(FloatPoint(cpx, cpy));
- m_path.addQuadCurveTo(FloatPoint(cpx, cpy), FloatPoint(x, y));
+
+ FloatPoint p1 = FloatPoint(x, y);
+ if (p1 != m_path.currentPoint())
+ m_path.addQuadCurveTo(FloatPoint(cpx, cpy), p1);
}
void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)
@@ -586,22 +610,35 @@ void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x,
return;
if (!m_path.hasCurrentPoint())
m_path.moveTo(FloatPoint(cp1x, cp1y));
- m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), FloatPoint(x, y));
+
+ FloatPoint p1 = FloatPoint(x, y);
+ if (p1 != m_path.currentPoint())
+ m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), p1);
}
-void CanvasRenderingContext2D::arcTo(float x0, float y0, float x1, float y1, float r, ExceptionCode& ec)
+void CanvasRenderingContext2D::arcTo(float x1, float y1, float x2, float y2, float r, ExceptionCode& ec)
{
ec = 0;
- if (!isfinite(x0) | !isfinite(y0) | !isfinite(x1) | !isfinite(y1) | !isfinite(r))
+ if (!isfinite(x1) | !isfinite(y1) | !isfinite(x2) | !isfinite(y2) | !isfinite(r))
return;
if (r < 0) {
ec = INDEX_SIZE_ERR;
return;
}
+
if (!state().m_invertibleCTM)
return;
- m_path.addArcTo(FloatPoint(x0, y0), FloatPoint(x1, y1), r);
+
+ FloatPoint p1 = FloatPoint(x1, y1);
+ FloatPoint p2 = FloatPoint(x2, y2);
+
+ if (!m_path.hasCurrentPoint())
+ m_path.moveTo(p1);
+ else if (p1 == m_path.currentPoint() || p1 == p2 || !r)
+ lineTo(x1, y1);
+ else
+ m_path.addArcTo(p1, p2, r);
}
void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea, bool anticlockwise, ExceptionCode& ec)
@@ -646,10 +683,27 @@ static bool validateRectForCanvas(float& x, float& y, float& width, float& heigh
void CanvasRenderingContext2D::rect(float x, float y, float width, float height)
{
- if (!validateRectForCanvas(x, y, width, height))
- return;
if (!state().m_invertibleCTM)
return;
+
+ if (!isfinite(x) || !isfinite(y) || !isfinite(width) || !isfinite(height))
+ return;
+
+ if (!width && !height) {
+ m_path.moveTo(FloatPoint(x, y));
+ return;
+ }
+
+ if (width < 0) {
+ width = -width;
+ x -= width;
+ }
+
+ if (height < 0) {
+ height = -height;
+ y -= height;
+ }
+
m_path.addRect(FloatRect(x, y, width, height));
}
@@ -1126,6 +1180,8 @@ void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const
if (!sourceCanvas->originClean())
canvas()->setOriginTainted();
+ sourceCanvas->makeRenderingResultsAvailable();
+
c->drawImage(buffer->image(), DeviceColorSpace, destRect, sourceRect, state().m_globalComposite);
willDraw(destRect); // This call comes after drawImage, since the buffer we draw into may be our own, and we need to make sure it is dirty.
// FIXME: Arguably willDraw should become didDraw and occur after drawing calls and not before them to avoid problems like this.
@@ -1344,7 +1400,7 @@ void CanvasRenderingContext2D::willDraw(const FloatRect& r, unsigned options)
dirtyRect = ctm.mapRect(r);
}
- if (options & CanvasWillDrawApplyShadow) {
+ if (options & CanvasWillDrawApplyShadow && alphaChannel(state().m_shadowColor)) {
// The shadow gets applied after transformation
FloatRect shadowRect(dirtyRect);
shadowRect.move(state().m_shadowOffset);
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.h b/WebCore/html/canvas/CanvasRenderingContext2D.h
index 43f3b35..2eac88d 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.h
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.h
@@ -214,6 +214,8 @@ namespace WebCore {
struct State {
State();
+ String m_unparsedStrokeColor;
+ String m_unparsedFillColor;
RefPtr<CanvasStyle> m_strokeStyle;
RefPtr<CanvasStyle> m_fillStyle;
float m_lineWidth;
diff --git a/WebCore/html/canvas/CanvasStyle.cpp b/WebCore/html/canvas/CanvasStyle.cpp
index 67e8201..1ae5236 100644
--- a/WebCore/html/canvas/CanvasStyle.cpp
+++ b/WebCore/html/canvas/CanvasStyle.cpp
@@ -33,6 +33,7 @@
#include "CanvasGradient.h"
#include "CanvasPattern.h"
#include "GraphicsContext.h"
+#include <wtf/Assertions.h>
#include <wtf/PassRefPtr.h>
#if PLATFORM(CG)
@@ -120,6 +121,29 @@ PassRefPtr<CanvasStyle> CanvasStyle::create(PassRefPtr<CanvasPattern> pattern)
return adoptRef(new CanvasStyle(pattern));
}
+bool CanvasStyle::isEquivalentColor(const CanvasStyle& other) const
+{
+ if (m_type != other.m_type)
+ return false;
+
+ switch (m_type) {
+ case CanvasStyle::RGBA:
+ return m_rgba == other.m_rgba;
+ case CanvasStyle::CMYKA:
+ return m_cmyka.c == other.m_cmyka.c
+ && m_cmyka.m == other.m_cmyka.m
+ && m_cmyka.y == other.m_cmyka.y
+ && m_cmyka.k == other.m_cmyka.k
+ && m_cmyka.a == other.m_cmyka.a;
+ case CanvasStyle::Gradient:
+ case CanvasStyle::ImagePattern:
+ return false;
+ }
+
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
void CanvasStyle::applyStrokeColor(GraphicsContext* context)
{
if (!context)
diff --git a/WebCore/html/canvas/CanvasStyle.h b/WebCore/html/canvas/CanvasStyle.h
index 18e55cf..76ba6ef 100644
--- a/WebCore/html/canvas/CanvasStyle.h
+++ b/WebCore/html/canvas/CanvasStyle.h
@@ -55,6 +55,8 @@ namespace WebCore {
void applyFillColor(GraphicsContext*);
void applyStrokeColor(GraphicsContext*);
+ bool isEquivalentColor(const CanvasStyle&) const;
+
private:
CanvasStyle(RGBA32 rgba);
CanvasStyle(float grayLevel);
diff --git a/WebCore/html/canvas/Float32Array.idl b/WebCore/html/canvas/Float32Array.idl
index 651e74f..5a939ca 100644
--- a/WebCore/html/canvas/Float32Array.idl
+++ b/WebCore/html/canvas/Float32Array.idl
@@ -33,7 +33,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Float32Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 4;
diff --git a/WebCore/html/canvas/Int16Array.idl b/WebCore/html/canvas/Int16Array.idl
index 095611b..02417f8 100644
--- a/WebCore/html/canvas/Int16Array.idl
+++ b/WebCore/html/canvas/Int16Array.idl
@@ -32,7 +32,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Int16Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 2;
diff --git a/WebCore/html/canvas/Int32Array.idl b/WebCore/html/canvas/Int32Array.idl
index 9d1e8ee..6977d00 100644
--- a/WebCore/html/canvas/Int32Array.idl
+++ b/WebCore/html/canvas/Int32Array.idl
@@ -33,7 +33,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Int32Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 4;
diff --git a/WebCore/html/canvas/Int8Array.idl b/WebCore/html/canvas/Int8Array.idl
index 43c83f5..4dba9e4 100644
--- a/WebCore/html/canvas/Int8Array.idl
+++ b/WebCore/html/canvas/Int8Array.idl
@@ -33,7 +33,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Int8Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 1;
diff --git a/WebCore/html/canvas/Uint16Array.idl b/WebCore/html/canvas/Uint16Array.idl
index 4c369a0..de1e5e0 100644
--- a/WebCore/html/canvas/Uint16Array.idl
+++ b/WebCore/html/canvas/Uint16Array.idl
@@ -33,7 +33,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Uint16Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 2;
diff --git a/WebCore/html/canvas/Uint32Array.idl b/WebCore/html/canvas/Uint32Array.idl
index 25f5b71..ce632dd 100644
--- a/WebCore/html/canvas/Uint32Array.idl
+++ b/WebCore/html/canvas/Uint32Array.idl
@@ -33,7 +33,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Uint32Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 4;
diff --git a/WebCore/html/canvas/Uint8Array.idl b/WebCore/html/canvas/Uint8Array.idl
index 76b8cdd..c520844 100644
--- a/WebCore/html/canvas/Uint8Array.idl
+++ b/WebCore/html/canvas/Uint8Array.idl
@@ -33,7 +33,8 @@ module html {
HasNumericIndexGetter,
HasCustomIndexSetter,
GenerateNativeConverter,
- CustomToJS
+ CustomToJS,
+ DontCheckEnums
] Uint8Array : ArrayBufferView {
const unsigned int BYTES_PER_ELEMENT = 1;
diff --git a/WebCore/html/canvas/WebGLBuffer.cpp b/WebCore/html/canvas/WebGLBuffer.cpp
index e71a12b..e449052 100644
--- a/WebCore/html/canvas/WebGLBuffer.cpp
+++ b/WebCore/html/canvas/WebGLBuffer.cpp
@@ -74,6 +74,35 @@ bool WebGLBuffer::associateBufferData(int size)
return false;
}
+bool WebGLBuffer::associateBufferData(ArrayBuffer* array)
+{
+ if (!m_target)
+ return false;
+ if (!array)
+ return false;
+
+ if (m_target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER) {
+ clearCachedMaxIndices();
+ m_byteLength = array->byteLength();
+ // We must always clone the incoming data because client-side
+ // modifications without calling bufferData or bufferSubData
+ // must never be able to change the validation results.
+ m_elementArrayBuffer = ArrayBuffer::create(array);
+ if (!m_elementArrayBuffer) {
+ m_byteLength = 0;
+ return false;
+ }
+ return true;
+ }
+
+ if (m_target == GraphicsContext3D::ARRAY_BUFFER) {
+ m_byteLength = array->byteLength();
+ return true;
+ }
+
+ return false;
+}
+
bool WebGLBuffer::associateBufferData(ArrayBufferView* array)
{
if (!m_target)
@@ -103,6 +132,39 @@ bool WebGLBuffer::associateBufferData(ArrayBufferView* array)
return false;
}
+bool WebGLBuffer::associateBufferSubData(long offset, ArrayBuffer* array)
+{
+ if (!m_target)
+ return false;
+ if (!array)
+ return false;
+
+ if (m_target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER) {
+ clearCachedMaxIndices();
+
+ // We need to protect against integer overflow with these tests
+ if (offset < 0)
+ return false;
+
+ unsigned long uoffset = static_cast<unsigned long>(offset);
+ if (uoffset > m_byteLength || array->byteLength() > m_byteLength - uoffset)
+ return false;
+
+ if (!m_elementArrayBuffer)
+ return false;
+
+ memcpy(static_cast<unsigned char*>(m_elementArrayBuffer->data()) + offset,
+ static_cast<unsigned char*>(array->data()),
+ array->byteLength());
+ return true;
+ }
+
+ if (m_target == GraphicsContext3D::ARRAY_BUFFER)
+ return array->byteLength() + offset <= m_byteLength;
+
+ return false;
+}
+
bool WebGLBuffer::associateBufferSubData(long offset, ArrayBufferView* array)
{
if (!m_target)
diff --git a/WebCore/html/canvas/WebGLBuffer.h b/WebCore/html/canvas/WebGLBuffer.h
index e1fec47..1280cf9 100644
--- a/WebCore/html/canvas/WebGLBuffer.h
+++ b/WebCore/html/canvas/WebGLBuffer.h
@@ -41,7 +41,9 @@ namespace WebCore {
static PassRefPtr<WebGLBuffer> create(WebGLRenderingContext*);
bool associateBufferData(int size);
+ bool associateBufferData(ArrayBuffer* array);
bool associateBufferData(ArrayBufferView* array);
+ bool associateBufferSubData(long offset, ArrayBuffer* array);
bool associateBufferSubData(long offset, ArrayBufferView* array);
unsigned byteLength() const;
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index a82a4ac4..f567ac8 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -115,12 +115,12 @@ WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
m_context->getIntegerv(GraphicsContext3D::IMPLEMENTATION_COLOR_READ_TYPE, &implementationColorReadType);
m_implementationColorReadType = implementationColorReadType;
- int maxTextureSize = 0;
- m_context->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &maxTextureSize);
- m_maxTextureSize = maxTextureSize;
- int maxCubeMapTextureSize = 0;
- m_context->getIntegerv(GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE, &maxCubeMapTextureSize);
- m_maxCubeMapTextureSize = maxCubeMapTextureSize;
+ m_maxTextureSize = 0;
+ m_context->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &m_maxTextureSize);
+ m_maxTextureLevel = WebGLTexture::computeLevelCount(m_maxTextureSize, m_maxTextureSize);
+ m_maxCubeMapTextureSize = 0;
+ m_context->getIntegerv(GraphicsContext3D::MAX_CUBE_MAP_TEXTURE_SIZE, &m_maxCubeMapTextureSize);
+ m_maxCubeMapTextureLevel = WebGLTexture::computeLevelCount(m_maxCubeMapTextureSize, m_maxCubeMapTextureSize);
if (!isGLES2Compliant()) {
createFallbackBlackTextures1x1();
@@ -141,17 +141,23 @@ void WebGLRenderingContext::markContextChanged()
RenderBox* renderBox = canvas()->renderBox();
if (renderBox && renderBox->hasLayer() && renderBox->layer()->hasAcceleratedCompositing())
renderBox->layer()->rendererContentChanged();
- else {
#endif
- if (!m_markedCanvasDirty) {
- // Make sure the canvas's image buffer is allocated.
- canvas()->buffer();
- canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
- m_markedCanvasDirty = true;
- }
-#if USE(ACCELERATED_COMPOSITING)
+ if (!m_markedCanvasDirty) {
+ // Make sure the canvas's image buffer is allocated.
+ canvas()->buffer();
+ canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
+ m_markedCanvasDirty = true;
}
-#endif
+}
+
+bool WebGLRenderingContext::paintRenderingResultsToCanvas()
+{
+ if (m_markedCanvasDirty) {
+ m_markedCanvasDirty = false;
+ m_context->paintRenderingResultsToCanvas(this);
+ return true;
+ }
+ return false;
}
void WebGLRenderingContext::beginPaint()
@@ -293,17 +299,20 @@ void WebGLRenderingContext::bindTexture(unsigned long target, WebGLTexture* text
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
- if (target == GraphicsContext3D::TEXTURE_2D)
+ int maxLevel = 0;
+ if (target == GraphicsContext3D::TEXTURE_2D) {
m_textureUnits[m_activeTextureUnit].m_texture2DBinding = texture;
- else if (target == GraphicsContext3D::TEXTURE_CUBE_MAP)
+ maxLevel = m_maxTextureLevel;
+ } else if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
m_textureUnits[m_activeTextureUnit].m_textureCubeMapBinding = texture;
- else {
+ maxLevel = m_maxCubeMapTextureLevel;
+ } else {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
return;
}
m_context->bindTexture(target, texture);
if (!isGLES2Compliant() && texture)
- texture->setTarget(target);
+ texture->setTarget(target, maxLevel);
cleanupAfterGraphicsCall(false);
}
@@ -349,22 +358,11 @@ void WebGLRenderingContext::blendFuncSeparate(unsigned long srcRGB, unsigned lon
void WebGLRenderingContext::bufferData(unsigned long target, int size, unsigned long usage, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- if (!isGLES2Compliant()) {
- if (!validateBufferDataUsage(usage))
- return;
- }
- if (target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER && m_boundElementArrayBuffer) {
- if (!m_boundElementArrayBuffer->associateBufferData(size)) {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
- return;
- }
- } else if (target == GraphicsContext3D::ARRAY_BUFFER && m_boundArrayBuffer) {
- if (!m_boundArrayBuffer->associateBufferData(size)) {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
- return;
- }
- } else {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
+ WebGLBuffer* buffer = validateBufferDataParameters(target, usage);
+ if (!buffer)
+ return;
+ if (!buffer->associateBufferData(size)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return;
}
@@ -372,25 +370,29 @@ void WebGLRenderingContext::bufferData(unsigned long target, int size, unsigned
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::bufferData(unsigned long target, ArrayBufferView* data, unsigned long usage, ExceptionCode& ec)
+void WebGLRenderingContext::bufferData(unsigned long target, ArrayBuffer* data, unsigned long usage, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- if (!isGLES2Compliant()) {
- if (!validateBufferDataUsage(usage))
- return;
+ WebGLBuffer* buffer = validateBufferDataParameters(target, usage);
+ if (!buffer)
+ return;
+ if (!buffer->associateBufferData(data)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
+ return;
}
- if (target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER && m_boundElementArrayBuffer) {
- if (!m_boundElementArrayBuffer->associateBufferData(data)) {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
- return;
- }
- } else if (target == GraphicsContext3D::ARRAY_BUFFER && m_boundArrayBuffer) {
- if (!m_boundArrayBuffer->associateBufferData(data)) {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
- return;
- }
- } else {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
+
+ m_context->bufferData(target, data, usage);
+ cleanupAfterGraphicsCall(false);
+}
+
+void WebGLRenderingContext::bufferData(unsigned long target, ArrayBufferView* data, unsigned long usage, ExceptionCode& ec)
+{
+ UNUSED_PARAM(ec);
+ WebGLBuffer* buffer = validateBufferDataParameters(target, usage);
+ if (!buffer)
+ return;
+ if (!buffer->associateBufferData(data)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return;
}
@@ -398,21 +400,29 @@ void WebGLRenderingContext::bufferData(unsigned long target, ArrayBufferView* da
cleanupAfterGraphicsCall(false);
}
+void WebGLRenderingContext::bufferSubData(unsigned long target, long offset, ArrayBuffer* data, ExceptionCode& ec)
+{
+ UNUSED_PARAM(ec);
+ WebGLBuffer* buffer = validateBufferDataParameters(target, GraphicsContext3D::STATIC_DRAW);
+ if (!buffer)
+ return;
+ if (!buffer->associateBufferSubData(offset, data)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
+ return;
+ }
+
+ m_context->bufferSubData(target, offset, data);
+ cleanupAfterGraphicsCall(false);
+}
+
void WebGLRenderingContext::bufferSubData(unsigned long target, long offset, ArrayBufferView* data, ExceptionCode& ec)
{
UNUSED_PARAM(ec);
- if (target == GraphicsContext3D::ELEMENT_ARRAY_BUFFER && m_boundElementArrayBuffer) {
- if (!m_boundElementArrayBuffer->associateBufferSubData(offset, data)) {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
- return;
- }
- } else if (target == GraphicsContext3D::ARRAY_BUFFER && m_boundArrayBuffer) {
- if (!m_boundArrayBuffer->associateBufferSubData(offset, data)) {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
- return;
- }
- } else {
- m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
+ WebGLBuffer* buffer = validateBufferDataParameters(target, GraphicsContext3D::STATIC_DRAW);
+ if (!buffer)
+ return;
+ if (!buffer->associateBufferSubData(offset, data)) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return;
}
@@ -507,10 +517,8 @@ void WebGLRenderingContext::copyTexImage2D(unsigned long target, long level, uns
// FIXME: if the framebuffer is not complete, none of the below should be executed.
WebGLTexture* tex = getTextureBinding(target);
if (!isGLES2Compliant()) {
- if (tex && !level) // only for level 0
- tex->setSize(target, width, height);
if (tex)
- tex->setInternalFormat(internalformat);
+ tex->setLevelInfo(target, level, internalformat, width, height, GraphicsContext3D::UNSIGNED_BYTE);
}
if (m_framebufferBinding && tex)
m_framebufferBinding->onAttachedObjectChange(tex);
@@ -1082,18 +1090,22 @@ void WebGLRenderingContext::frontFace(unsigned long mode)
void WebGLRenderingContext::generateMipmap(unsigned long target)
{
+ RefPtr<WebGLTexture> tex;
if (!isGLES2Compliant()) {
- RefPtr<WebGLTexture> tex = 0;
if (target == GraphicsContext3D::TEXTURE_2D)
tex = m_textureUnits[m_activeTextureUnit].m_texture2DBinding;
else if (target == GraphicsContext3D::TEXTURE_CUBE_MAP)
tex = m_textureUnits[m_activeTextureUnit].m_textureCubeMapBinding;
- if (tex && tex->isNPOT()) {
+ if (tex && !tex->canGenerateMipmaps()) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
return;
}
}
m_context->generateMipmap(target);
+ if (!isGLES2Compliant()) {
+ if (tex)
+ tex->generateMipmapLevelInfo();
+ }
cleanupAfterGraphicsCall(false);
}
@@ -1337,7 +1349,8 @@ WebGLGetInfo WebGLRenderingContext::getParameter(unsigned long pname, ExceptionC
case GraphicsContext3D::MAX_VIEWPORT_DIMS:
return getWebGLIntArrayParameter(pname);
case GraphicsContext3D::NUM_COMPRESSED_TEXTURE_FORMATS:
- return getLongParameter(pname);
+ // WebGL 1.0 specifies that there are no compressed texture formats.
+ return WebGLGetInfo(static_cast<long>(0));
case GraphicsContext3D::NUM_SHADER_BINARY_FORMATS:
// FIXME: should we always return 0 for this?
return getLongParameter(pname);
@@ -2082,10 +2095,8 @@ void WebGLRenderingContext::texImage2DBase(unsigned target, unsigned level, unsi
border, format, type, pixels);
WebGLTexture* tex = getTextureBinding(target);
if (!isGLES2Compliant()) {
- if (tex && !level) // only for level 0
- tex->setSize(target, width, height);
if (tex)
- tex->setInternalFormat(internalformat);
+ tex->setLevelInfo(target, level, internalformat, width, height, type);
}
if (m_framebufferBinding && tex)
m_framebufferBinding->onAttachedObjectChange(tex);
@@ -3369,9 +3380,6 @@ bool WebGLRenderingContext::validateTexFuncParameters(unsigned long target, long
if (!validateTexFuncFormatAndType(format, type))
return false;
- if (isGLES2Compliant())
- return true;
-
if (width < 0 || height < 0 || level < 0) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return false;
@@ -3379,7 +3387,7 @@ bool WebGLRenderingContext::validateTexFuncParameters(unsigned long target, long
switch (target) {
case GraphicsContext3D::TEXTURE_2D:
- if (width > m_maxTextureSize || height > m_maxTextureSize) {
+ if (width > m_maxTextureSize || height > m_maxTextureSize || level > m_maxTextureLevel) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return false;
}
@@ -3390,7 +3398,7 @@ bool WebGLRenderingContext::validateTexFuncParameters(unsigned long target, long
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Y:
case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z:
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z:
- if (width != height || width > m_maxCubeMapTextureSize) {
+ if (width != height || width > m_maxCubeMapTextureSize || level > m_maxCubeMapTextureLevel) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
return false;
}
@@ -3592,16 +3600,32 @@ bool WebGLRenderingContext::validateUniformMatrixParameters(const WebGLUniformLo
return true;
}
-bool WebGLRenderingContext::validateBufferDataUsage(unsigned long usage)
+WebGLBuffer* WebGLRenderingContext::validateBufferDataParameters(unsigned long target, unsigned long usage)
{
+ WebGLBuffer* buffer = 0;
+ switch (target) {
+ case GraphicsContext3D::ELEMENT_ARRAY_BUFFER:
+ buffer = m_boundElementArrayBuffer.get();
+ break;
+ case GraphicsContext3D::ARRAY_BUFFER:
+ buffer = m_boundArrayBuffer.get();
+ break;
+ default:
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
+ return 0;
+ }
+ if (!buffer) {
+ m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION);
+ return 0;
+ }
switch (usage) {
case GraphicsContext3D::STREAM_DRAW:
case GraphicsContext3D::STATIC_DRAW:
case GraphicsContext3D::DYNAMIC_DRAW:
- return true;
+ return buffer;
}
m_context->synthesizeGLError(GraphicsContext3D::INVALID_ENUM);
- return false;
+ return 0;
}
void WebGLRenderingContext::vertexAttribfImpl(unsigned long index, int expectedSize, float v0, float v1, float v2, float v3)
diff --git a/WebCore/html/canvas/WebGLRenderingContext.h b/WebCore/html/canvas/WebGLRenderingContext.h
index d03d972..fa9ffdb 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/WebCore/html/canvas/WebGLRenderingContext.h
@@ -77,7 +77,9 @@ class WebKitCSSMatrix;
void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha);
void bufferData(unsigned long target, int size, unsigned long usage, ExceptionCode&);
+ void bufferData(unsigned long target, ArrayBuffer* data, unsigned long usage, ExceptionCode&);
void bufferData(unsigned long target, ArrayBufferView* data, unsigned long usage, ExceptionCode&);
+ void bufferSubData(unsigned long target, long offset, ArrayBuffer* data, ExceptionCode&);
void bufferSubData(unsigned long target, long offset, ArrayBufferView* data, ExceptionCode&);
unsigned long checkFramebufferStatus(unsigned long target);
@@ -304,6 +306,10 @@ class WebKitCSSMatrix;
void reshape(int width, int height);
+ // Return value true indicates canvas is updated during the call,
+ // false indicates no updates.
+ bool paintRenderingResultsToCanvas();
+
// Helpers for notification about paint events.
void beginPaint();
void endPaint();
@@ -410,8 +416,10 @@ class WebKitCSSMatrix;
RefPtr<WebGLTexture> m_blackTexture2D;
RefPtr<WebGLTexture> m_blackTextureCubeMap;
- long m_maxTextureSize;
- long m_maxCubeMapTextureSize;
+ int m_maxTextureSize;
+ int m_maxCubeMapTextureSize;
+ int m_maxTextureLevel;
+ int m_maxCubeMapTextureLevel;
int m_packAlignment;
int m_unpackAlignment;
@@ -501,8 +509,9 @@ class WebKitCSSMatrix;
bool validateUniformMatrixParameters(const WebGLUniformLocation* location, bool transpose, Float32Array* v, int mod);
bool validateUniformMatrixParameters(const WebGLUniformLocation* location, bool transpose, void* v, int size, int mod);
- // Helper function to validate usage for bufferData.
- bool validateBufferDataUsage(unsigned long);
+ // Helper function to validate parameters for bufferData.
+ // Return the current bound buffer to target, or 0 if parameters are invalid.
+ WebGLBuffer* validateBufferDataParameters(unsigned long target, unsigned long usage);
// Helper functions for vertexAttribNf{v}.
void vertexAttribfImpl(unsigned long index, int expectedSize, float v0, float v1, float v2, float v3);
diff --git a/WebCore/html/canvas/WebGLRenderingContext.idl b/WebCore/html/canvas/WebGLRenderingContext.idl
index 1ea4c6d..654c7aa 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.idl
+++ b/WebCore/html/canvas/WebGLRenderingContext.idl
@@ -28,7 +28,8 @@ module html {
interface [
Conditional=3D_CANVAS,
InterfaceUUID=98fb48ae-7216-489c-862b-8e1217fc4443,
- ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54
+ ImplementationUUID=ab4f0781-152f-450e-9546-5b3987491a54,
+ DontCheckEnums
] WebGLRenderingContext : CanvasRenderingContext {
/* ClearBufferMask */
@@ -477,9 +478,10 @@ module html {
void blendEquationSeparate(in unsigned long modeRGB, in unsigned long modeAlpha);
void blendFunc(in unsigned long sfactor, in unsigned long dfactor);
void blendFuncSeparate(in unsigned long srcRGB, in unsigned long dstRGB, in unsigned long srcAlpha, in unsigned long dstAlpha);
-
+ void bufferData(in unsigned long target, in ArrayBuffer data, in unsigned long usage) raises (DOMException);
void bufferData(in unsigned long target, in ArrayBufferView data, in unsigned long usage) raises (DOMException);
void bufferData(in unsigned long target, in long size, in unsigned long usage) raises (DOMException);
+ void bufferSubData(in unsigned long target, in long offset, in ArrayBuffer data) raises (DOMException);
void bufferSubData(in unsigned long target, in long offset, in ArrayBufferView data) raises (DOMException);
unsigned long checkFramebufferStatus(in unsigned long target);
diff --git a/WebCore/html/canvas/WebGLTexture.cpp b/WebCore/html/canvas/WebGLTexture.cpp
index 1cc7d5d..d832038 100644
--- a/WebCore/html/canvas/WebGLTexture.cpp
+++ b/WebCore/html/canvas/WebGLTexture.cpp
@@ -45,32 +45,39 @@ WebGLTexture::WebGLTexture(WebGLRenderingContext* ctx)
, m_magFilter(GraphicsContext3D::LINEAR)
, m_wrapS(GraphicsContext3D::REPEAT)
, m_wrapT(GraphicsContext3D::REPEAT)
- , m_internalFormat(0)
, m_isNPOT(false)
+ , m_isComplete(false)
, m_needToUseBlackTexture(false)
{
setObject(context()->graphicsContext3D()->createTexture());
- for (int ii = 0; ii < 6; ++ii) {
- m_width[ii] = 0;
- m_height[ii] = 0;
- }
}
-void WebGLTexture::setTarget(unsigned long target)
+void WebGLTexture::setTarget(unsigned long target, int maxLevel)
{
+ if (!object())
+ return;
// Target is finalized the first time bindTexture() is called.
if (m_target)
return;
switch (target) {
case GraphicsContext3D::TEXTURE_2D:
+ m_target = target;
+ m_info.resize(1);
+ m_info[0].resize(maxLevel);
+ break;
case GraphicsContext3D::TEXTURE_CUBE_MAP:
m_target = target;
+ m_info.resize(6);
+ for (int ii = 0; ii < 6; ++ii)
+ m_info[ii].resize(maxLevel);
break;
}
}
void WebGLTexture::setParameteri(unsigned long pname, int param)
{
+ if (!object() || !m_target)
+ return;
switch (pname) {
case GraphicsContext3D::TEXTURE_MIN_FILTER:
switch (param) {
@@ -113,88 +120,195 @@ void WebGLTexture::setParameteri(unsigned long pname, int param)
default:
return;
}
- updateNPOTStates();
+ update();
}
void WebGLTexture::setParameterf(unsigned long pname, float param)
{
+ if (!object() || !m_target)
+ return;
int iparam = static_cast<int>(param);
setParameteri(pname, iparam);
}
-void WebGLTexture::setSize(unsigned long target, unsigned width, unsigned height)
+void WebGLTexture::setLevelInfo(unsigned long target, int level, unsigned long internalFormat, int width, int height, unsigned long type)
{
- if (!width || !height)
+ if (!object() || !m_target)
return;
- int iTarget = -1;
+ // We assume level, internalFormat, width, height, and type have all been
+ // validated already.
+ int index = mapTargetToIndex(target);
+ if (index < 0)
+ return;
+ m_info[index][level].setInfo(internalFormat, width, height, type);
+ update();
+}
+
+void WebGLTexture::generateMipmapLevelInfo()
+{
+ if (!object() || !m_target)
+ return;
+ if (!canGenerateMipmaps())
+ return;
+ if (m_isComplete)
+ return;
+ for (size_t ii = 0; ii < m_info.size(); ++ii) {
+ const LevelInfo& info0 = m_info[ii][0];
+ int width = info0.width;
+ int height = info0.height;
+ int levelCount = computeLevelCount(width, height);
+ for (int level = 1; level < levelCount; ++level) {
+ width = std::max(1, width >> 1);
+ height = std::max(1, height >> 1);
+ LevelInfo& info = m_info[ii][level];
+ info.setInfo(info0.internalFormat, width, height, info0.type);
+ }
+ }
+ m_isComplete = true;
+}
+
+unsigned long WebGLTexture::getInternalFormat() const
+{
+ if (!object() || !m_target)
+ return 0;
+ return m_info[0][0].internalFormat;
+}
+
+bool WebGLTexture::isNPOT(unsigned width, unsigned height)
+{
+ if (!width || !height)
+ return false;
+ if ((width & (width - 1)) || (height & (height - 1)))
+ return true;
+ return false;
+}
+
+bool WebGLTexture::isNPOT() const
+{
+ if (!object())
+ return false;
+ return m_isNPOT;
+}
+
+bool WebGLTexture::needToUseBlackTexture() const
+{
+ if (!object())
+ return false;
+ return m_needToUseBlackTexture;
+}
+
+void WebGLTexture::_deleteObject(Platform3DObject object)
+{
+ context()->graphicsContext3D()->deleteTexture(object);
+}
+
+int WebGLTexture::mapTargetToIndex(unsigned long target)
+{
if (m_target == GraphicsContext3D::TEXTURE_2D) {
if (target == GraphicsContext3D::TEXTURE_2D)
- iTarget = 0;
- } else if (m_target == GraphicsContext3D::TEXTURE_CUBE_MAP && width == height) {
+ return 0;
+ } else if (m_target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
switch (target) {
case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_X:
- iTarget = 0;
- break;
+ return 0;
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_X:
- iTarget = 1;
- break;
+ return 1;
case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Y:
- iTarget = 2;
- break;
+ return 2;
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Y:
- iTarget = 3;
- break;
+ return 3;
case GraphicsContext3D::TEXTURE_CUBE_MAP_POSITIVE_Z:
- iTarget = 4;
- break;
+ return 4;
case GraphicsContext3D::TEXTURE_CUBE_MAP_NEGATIVE_Z:
- iTarget = 5;
- break;
+ return 5;
}
}
- if (iTarget < 0)
- return;
- m_width[iTarget] = width;
- m_height[iTarget] = height;
- updateNPOTStates();
+ return -1;
}
-bool WebGLTexture::isNPOT(unsigned width, unsigned height)
+bool WebGLTexture::canGenerateMipmaps()
{
- if (!width || !height)
+ if (isNPOT())
return false;
- if ((width & (width - 1)) || (height & (height - 1)))
- return true;
- return false;
+ const LevelInfo& first = m_info[0][0];
+ for (size_t ii = 0; ii < m_info.size(); ++ii) {
+ const LevelInfo& info = m_info[ii][0];
+ if (!info.valid
+ || info.width != first.width || info.height != first.height
+ || info.internalFormat != first.internalFormat || info.type != first.type)
+ return false;
+ }
+ return true;
}
-void WebGLTexture::_deleteObject(Platform3DObject object)
+int WebGLTexture::computeLevelCount(int width, int height)
{
- context()->graphicsContext3D()->deleteTexture(object);
+ // return 1 + log2Floor(std::max(width, height));
+ int n = std::max(width, height);
+ if (n <= 0)
+ return 0;
+ int log = 0;
+ int value = n;
+ for (int ii = 4; ii >= 0; --ii) {
+ int shift = (1 << ii);
+ int x = (value >> shift);
+ if (x) {
+ value = x;
+ log += shift;
+ }
+ }
+ ASSERT(value == 1);
+ return log + 1;
}
-void WebGLTexture::updateNPOTStates()
+void WebGLTexture::update()
{
- int numTargets = 0;
- if (m_target == GraphicsContext3D::TEXTURE_2D)
- numTargets = 1;
- else if (m_target == GraphicsContext3D::TEXTURE_CUBE_MAP)
- numTargets = 6;
m_isNPOT = false;
- unsigned w0 = m_width[0], h0 = m_height[0];
- for (int ii = 0; ii < numTargets; ++ii) {
- if (ii && (!m_width[ii] || !m_height[ii] || m_width[ii] != w0 || m_height[ii] != h0)) {
- // We only set NPOT for complete cube map textures.
- m_isNPOT = false;
+ for (size_t ii = 0; ii < m_info.size(); ++ii) {
+ if (isNPOT(m_info[ii][0].width, m_info[ii][0].height)) {
+ m_isNPOT = true;
break;
}
- if (isNPOT(m_width[ii], m_height[ii]))
- m_isNPOT = true;
}
+ m_isComplete = true;
+ const LevelInfo& first = m_info[0][0];
+ int levelCount = computeLevelCount(first.width, first.height);
+ if (levelCount < 1)
+ m_isComplete = false;
+ else {
+ for (size_t ii = 0; ii < m_info.size() && m_isComplete; ++ii) {
+ const LevelInfo& info0 = m_info[ii][0];
+ if (!info0.valid
+ || info0.width != first.width || info0.height != first.height
+ || info0.internalFormat != first.internalFormat || info0.type != first.type) {
+ m_isComplete = false;
+ break;
+ }
+ int width = info0.width;
+ int height = info0.height;
+ for (int level = 1; level < levelCount; ++level) {
+ width = std::max(1, width >> 1);
+ height = std::max(1, height >> 1);
+ const LevelInfo& info = m_info[ii][level];
+ if (!info.valid
+ || info.width != width || info.height != height
+ || info.internalFormat != info0.internalFormat || info.type != info0.type) {
+ m_isComplete = false;
+ break;
+ }
+
+ }
+ }
+ }
+
m_needToUseBlackTexture = false;
+ // NPOT
if (m_isNPOT && ((m_minFilter != GraphicsContext3D::NEAREST && m_minFilter != GraphicsContext3D::LINEAR)
|| m_wrapS != GraphicsContext3D::CLAMP_TO_EDGE || m_wrapT != GraphicsContext3D::CLAMP_TO_EDGE))
m_needToUseBlackTexture = true;
+ // Completeness
+ if (!m_isComplete && m_minFilter != GraphicsContext3D::NEAREST && m_minFilter != GraphicsContext3D::LINEAR)
+ m_needToUseBlackTexture = true;
}
}
diff --git a/WebCore/html/canvas/WebGLTexture.h b/WebCore/html/canvas/WebGLTexture.h
index 4d16b59..d4a32f0 100644
--- a/WebCore/html/canvas/WebGLTexture.h
+++ b/WebCore/html/canvas/WebGLTexture.h
@@ -30,6 +30,7 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
namespace WebCore {
@@ -47,19 +48,26 @@ namespace WebCore {
cubeMapRWrapModeInitialized = initialized;
}
- void setTarget(unsigned long);
+ void setTarget(unsigned long target, int maxLevel);
void setParameteri(unsigned long pname, int param);
void setParameterf(unsigned long pname, float param);
- void setSize(unsigned long target, unsigned width, unsigned height);
- void setInternalFormat(unsigned long internalformat) { m_internalFormat = internalformat; }
- unsigned long getInternalFormat() const { return m_internalFormat; }
+ void setLevelInfo(unsigned long target, int level, unsigned long internalFormat, int width, int height, unsigned long type);
+ bool canGenerateMipmaps();
+ // Generate all level information.
+ void generateMipmapLevelInfo();
+
+ unsigned long getInternalFormat() const;
+
+ // Whether width/height is NotPowerOfTwo.
static bool isNPOT(unsigned, unsigned);
- bool isNPOT() const { return m_isNPOT; }
+ bool isNPOT() const;
// Determine if texture sampling should always return [0, 0, 0, 1] (OpenGL ES 2.0 Sec 3.8.2).
- bool needToUseBlackTexture() const { return m_needToUseBlackTexture; }
+ bool needToUseBlackTexture() const;
+
+ static int computeLevelCount(int width, int height);
protected:
WebGLTexture(WebGLRenderingContext*);
@@ -69,7 +77,9 @@ namespace WebCore {
private:
virtual bool isTexture() const { return true; }
- void updateNPOTStates();
+ void update();
+
+ int mapTargetToIndex(unsigned long);
bool cubeMapRWrapModeInitialized;
@@ -80,12 +90,37 @@ namespace WebCore {
int m_wrapS;
int m_wrapT;
- unsigned long m_internalFormat;
-
- unsigned m_width[6];
- unsigned m_height[6];
+ class LevelInfo {
+ public:
+ LevelInfo()
+ : valid(false)
+ , internalFormat(0)
+ , width(0)
+ , height(0)
+ , type(0)
+ {
+ }
+
+ void setInfo(unsigned long internalFmt, int w, int h, unsigned long tp)
+ {
+ valid = true;
+ internalFormat = internalFmt;
+ width = w;
+ height = h;
+ type = tp;
+ }
+
+ bool valid;
+ unsigned long internalFormat;
+ int width;
+ int height;
+ unsigned long type;
+ };
+
+ Vector<Vector<LevelInfo> > m_info;
bool m_isNPOT;
+ bool m_isComplete;
bool m_needToUseBlackTexture;
};
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index cadfaac..afaddec 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -6,6 +6,7 @@ package CodeGeneratorInspector;
use strict;
+use Class::Struct;
use File::stat;
my %typeTransform;
@@ -21,56 +22,56 @@ $typeTransform{"Object"} = {
"retVal" => "PassRefPtr<InspectorObject>",
"forward" => "InspectorObject",
"header" => "InspectorValues.h",
- "push" => "push"
+ "accessorSuffix" => ""
};
$typeTransform{"Array"} = {
"param" => "PassRefPtr<InspectorArray>",
"retVal" => "PassRefPtr<InspectorArray>",
"forward" => "InspectorArray",
"header" => "InspectorValues.h",
- "push" => "push"
+ "accessorSuffix" => ""
};
$typeTransform{"Value"} = {
"param" => "PassRefPtr<InspectorValue>",
"retVal" => "PassRefPtr<InspectorValue>",
"forward" => "InspectorValue",
"header" => "InspectorValues.h",
- "push" => "push"
+ "accessorSuffix" => ""
};
$typeTransform{"String"} = {
"param" => "const String&",
"retVal" => "String",
"forward" => "String",
"header" => "PlatformString.h",
- "push" => "pushString"
+ "accessorSuffix" => "String"
};
$typeTransform{"long"} = {
"param" => "long",
"retVal" => "long",
"forward" => "",
"header" => "",
- "push" => "pushNumber"
+ "accessorSuffix" => "Number"
};
$typeTransform{"int"} = {
"param" => "int",
"retVal" => "int",
"forward" => "",
"header" => "",
- "push" => "pushNumber"
+ "accessorSuffix" => "Number",
};
$typeTransform{"unsigned long"} = {
"param" => "unsigned long",
"retVal" => "unsigned long",
"forward" => "",
"header" => "",
- "push" => "pushNumber"
+ "accessorSuffix" => "Number"
};
$typeTransform{"boolean"} = {
"param" => "bool",
"retVal"=> "bool",
"forward" => "",
"header" => "",
- "push" => "pushBool"
+ "accessorSuffix" => "Bool"
};
$typeTransform{"void"} = {
"retVal" => "void",
@@ -88,26 +89,22 @@ EOF
my $codeGenerator;
my $outputDir;
+my $outputHeadersDir;
my $writeDependencies;
my $verbose;
my $namespace;
-my $fileName;
-my %discoveredTypes;
-my @classDefinition;
-my @functionDefinitions;
+my $frontendClassName;
+my %frontendTypes;
+my %frontendMethods;
+my @frontendMethodsImpl;
+my $frontendConstructor;
+my $frontendFooter;
-sub typeSpec
-{
- my $param = shift;
- my $retValue = shift;
-
- my $type = $typeTransform{$param->type}->{$retValue ? "retVal" : "param"};
- $discoveredTypes{$param->type} = 1;
- $type or die "invalid type specification \"" . $param->type ."\"";
- return $type;
-}
+my $callId = new domSignature(); # it is just structure for describing parameters from IDLStructure.pm.
+$callId->type("long");
+$callId->name("callId");
# Default constructor
sub new
@@ -117,6 +114,7 @@ sub new
$codeGenerator = shift;
$outputDir = shift;
+ $outputHeadersDir = shift;
shift; # $useLayerOnTop
shift; # $preprocessor
$writeDependencies = shift;
@@ -133,6 +131,7 @@ sub GenerateModule
my $dataNode = shift;
$namespace = $dataNode->module;
+ $namespace =~ s/core/WebCore/;
}
# Params: 'idlDocument' struct
@@ -143,103 +142,126 @@ sub GenerateInterface
my $defines = shift;
my $className = $interface->name;
- $fileName = $className;
-
- $discoveredTypes{"String"} = 1;
- $discoveredTypes{"InspectorClient"} = 1;
- $discoveredTypes{"PassRefPtr"} = 1;
-
- push(@classDefinition, "class $className {");
- push(@classDefinition, "public:");
- push(@classDefinition, " $className(InspectorClient* inspectorClient) : m_inspectorClient(inspectorClient) { }");
- push(@classDefinition, "");
- push(@classDefinition, generateFunctionsDeclarations($interface, $className));
- push(@classDefinition, "");
- push(@classDefinition, "private:");
- push(@classDefinition, " void sendSimpleMessageToFrontend(const String&);");
- push(@classDefinition, " InspectorClient* m_inspectorClient;");
- push(@classDefinition, "};");
-
- push(@functionDefinitions, "void ${className}::sendSimpleMessageToFrontend(const String& functionName)");
- push(@functionDefinitions, "{");
- push(@functionDefinitions, " RefPtr<InspectorArray> arguments = InspectorArray::create();");
- push(@functionDefinitions, " arguments->pushString(functionName);");
- push(@functionDefinitions, " m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
- push(@functionDefinitions, "}");
+
+ $frontendClassName = "Remote" . $className . "Frontend";
+ $frontendConstructor = " ${frontendClassName}(InspectorClient* inspectorClient) : m_inspectorClient(inspectorClient) { }";
+ $frontendFooter = " InspectorClient* m_inspectorClient;";
+ $frontendTypes{"String"} = 1;
+ $frontendTypes{"InspectorClient"} = 1;
+ $frontendTypes{"PassRefPtr"} = 1;
+
+ generateFunctions($interface);
}
-sub generateFunctionsDeclarations
+sub generateFunctions
{
my $interface = shift;
- my $className = shift;
- my @functionDeclarations;
foreach my $function (@{$interface->functions}) {
- my $functionName = $function->signature->name;
- my $abstract = $function->signature->extendedAttributes->{"abstract"};
- my $arguments = "";
- foreach my $parameter (@{$function->parameters}) {
- $parameter->name or die "empty argument name specified for function ${className}::$functionName and argument type " . $parameter->type;
- $arguments = $arguments . ", " if ($arguments);
- $arguments = $arguments . typeSpec($parameter) . " " . $parameter->name;
- }
- my $signature = " " . typeSpec($function->signature, 1) . " $functionName($arguments)";
- push(@functionDeclarations, $abstract ? "$signature = 0;" : "$signature;");
- push(@functionDefinitions, generateFunctionsImpl($className, $function, $arguments)) if !$abstract;
+ generateFrontendFunction($function);
}
- return @functionDeclarations;
}
-sub generateHeader
+sub generateFrontendFunction
{
- my @headerContent = split("\r", $licenseTemplate);
- push(@headerContent, "#ifndef ${fileName}_h");
- push(@headerContent, "#define ${fileName}_h");
- push(@headerContent, "");
-
- my @forwardHeaders;
- foreach my $type (keys %discoveredTypes) {
- push(@forwardHeaders, "#include <" . $typeTransform{$type}->{"forwardHeader"} . ">") if !$typeTransform{$type}->{"forwardHeader"} eq "";
+ my $function = shift;
+
+ my $functionName;
+ my $notify = $function->signature->extendedAttributes->{"notify"};
+ if ($notify) {
+ $functionName = $function->signature->name;
+ } else {
+ my $customResponse = $function->signature->extendedAttributes->{"customResponse"};
+ $functionName = $customResponse ? $customResponse : "did" . ucfirst($function->signature->name);
}
- push(@headerContent, sort @forwardHeaders);
- push(@headerContent, "");
- push(@headerContent, "namespace $namespace {");
- push(@headerContent, "");
-
- my @forwardDeclarations;
- foreach my $type (keys %discoveredTypes) {
- push(@forwardDeclarations, "class " . $typeTransform{$type}->{"forward"} . ";") if !$typeTransform{$type}->{"forward"} eq "";
+
+ my @argsFiltered = grep($_->direction eq "out", @{$function->parameters}); # just keep only out parameters for frontend interface.
+ unshift(@argsFiltered, $callId) if !$notify; # Add callId as the first argument for all frontend did* methods.
+ map($frontendTypes{$_->type} = 1, @argsFiltered); # register required types.
+ my $arguments = join(", ", map($typeTransform{$_->type}->{"param"} . " " . $_->name, @argsFiltered)); # prepare arguments for function signature.
+ my @pushArguments = map(" arguments->push" . $typeTransform{$_->type}->{"accessorSuffix"} . "(" . $_->name . ");", @argsFiltered);
+
+ my $signature = " void ${functionName}(${arguments});";
+ if (!$frontendMethods{${signature}}) {
+ $frontendMethods{${signature}} = 1;
+
+ my @function;
+ push(@function, "void ${frontendClassName}::${functionName}(${arguments})");
+ push(@function, "{");
+ push(@function, " RefPtr<InspectorArray> arguments = InspectorArray::create();");
+ push(@function, " arguments->pushString(\"$functionName\");");
+ push(@function, @pushArguments);
+ push(@function, " m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
+ push(@function, "}");
+ push(@function, "");
+ push(@frontendMethodsImpl, @function);
}
- push(@headerContent, sort @forwardDeclarations);
-
- push(@headerContent, "");
- push(@headerContent, @classDefinition);
- push(@headerContent, "");
- push(@headerContent, "} // namespace $namespace");
- push(@headerContent, "");
- push(@headerContent, "#endif // !defined(${fileName}_h)");
- push(@headerContent, "");
- return @headerContent;
+}
+
+sub generateHeader
+{
+ my $className = shift;
+ my $types = shift;
+ my $constructor = shift;
+ my $methods = shift;
+ my $footer = shift;
+
+ my $forwardHeaders = join("\n", sort(map("#include <" . $typeTransform{$_}->{"forwardHeader"} . ">", grep($typeTransform{$_}->{"forwardHeader"}, keys %{$types}))));
+ my $forwardDeclarations = join("\n", sort(map("class " . $typeTransform{$_}->{"forward"} . ";", grep($typeTransform{$_}->{"forward"}, keys %{$types}))));
+ my $methodsDeclarations = join("\n", keys %{$methods});
+
+ my $headerBody = << "EOF";
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#ifndef ${className}_h
+#define ${className}_h
+
+${forwardHeaders}
+
+namespace $namespace {
+
+$forwardDeclarations
+
+class $className {
+public:
+$constructor
+
+$methodsDeclarations
+
+private:
+$footer
+};
+
+} // namespace $namespace
+#endif // !defined(${className}_h)
+
+EOF
+ return $headerBody;
}
sub generateSource
{
+ my $className = shift;
+ my $types = shift;
+ my $methods = shift;
+
my @sourceContent = split("\r", $licenseTemplate);
push(@sourceContent, "\n#include \"config.h\"");
- push(@sourceContent, "#include \"Remote$fileName.h\"");
+ push(@sourceContent, "#include \"$className.h\"");
push(@sourceContent, "");
push(@sourceContent, "#if ENABLE(INSPECTOR)");
push(@sourceContent, "");
my %headers;
- foreach my $type (keys %discoveredTypes) {
+ foreach my $type (keys %{$types}) {
$headers{"#include \"" . $typeTransform{$type}->{"header"} . "\""} = 1 if !$typeTransform{$type}->{"header"} eq "";
}
push(@sourceContent, sort keys %headers);
push(@sourceContent, "");
push(@sourceContent, "namespace $namespace {");
push(@sourceContent, "");
- push(@sourceContent, @functionDefinitions);
+ push(@sourceContent, @{$methods});
push(@sourceContent, "");
push(@sourceContent, "} // namespace $namespace");
push(@sourceContent, "");
@@ -248,51 +270,20 @@ sub generateSource
return @sourceContent;
}
-sub generateFunctionsImpl
-{
- my $className = shift;
- my $function = shift;
- my $arguments = shift;
-
- my @func;
-
- my $functionName = $function->signature->name;
-
- push(@func, typeSpec($function->signature, 1) . " " . $className . "::" . $functionName . "(" . $arguments . ")");
- push(@func, "{");
-
- my $numParameters = @{$function->parameters};
- if ($numParameters > 0) {
- push(@func, " RefPtr<InspectorArray> arguments = InspectorArray::create();");
- push(@func, " arguments->pushString(\"$functionName\");");
- foreach my $parameter (@{$function->parameters}) {
- my $pushCall = $typeTransform{$parameter->type}->{"push"};
- push(@func, " arguments->$pushCall(" . $parameter->name . ");");
- }
- push(@func, " m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
- } else {
- push(@func, " sendSimpleMessageToFrontend(\"$functionName\");");
- }
-
- push(@func, "}");
- push(@func, "");
- return @func;
-}
-
sub finish
{
my $object = shift;
- open(my $SOURCE, ">$outputDir/Remote$fileName.cpp") || die "Couldn't open file $outputDir/Remote$fileName.cpp";
- open(my $HEADER, ">$outputDir/Remote$fileName.h") || die "Couldn't open file $outputDir/Remote$fileName.h";
-
- print $SOURCE join("\n", generateSource());
+ open(my $SOURCE, ">$outputDir/$frontendClassName.cpp") || die "Couldn't open file $outputDir/$frontendClassName.cpp";
+ print $SOURCE join("\n", generateSource($frontendClassName, \%frontendTypes, \@frontendMethodsImpl));
close($SOURCE);
undef($SOURCE);
- print $HEADER join("\n", generateHeader());
+ open(my $HEADER, ">$outputHeadersDir/$frontendClassName.h") || die "Couldn't open file $outputHeadersDir/$frontendClassName.h";
+ print $HEADER generateHeader($frontendClassName, \%frontendTypes, $frontendConstructor, \%frontendMethods, $frontendFooter);
close($HEADER);
undef($HEADER);
+
}
1;
diff --git a/WebCore/inspector/ConsoleMessage.cpp b/WebCore/inspector/ConsoleMessage.cpp
index 934e2e9..79b5115 100644
--- a/WebCore/inspector/ConsoleMessage.cpp
+++ b/WebCore/inspector/ConsoleMessage.cpp
@@ -40,6 +40,34 @@
namespace WebCore {
+ConsoleMessage::CallFrame::CallFrame(const ScriptCallFrame& frame)
+ : m_functionName(frame.functionName())
+ , m_sourceURL(frame.sourceURL())
+ , m_lineNumber(frame.lineNumber())
+{
+}
+
+ConsoleMessage::CallFrame::CallFrame()
+ : m_lineNumber(0)
+{
+}
+
+bool ConsoleMessage::CallFrame::isEqual(const ConsoleMessage::CallFrame& o) const
+{
+ return m_functionName == o.m_functionName
+ && m_sourceURL == o.m_sourceURL
+ && m_lineNumber == o.m_lineNumber;
+}
+
+ScriptObject ConsoleMessage::CallFrame::buildObject(InspectorFrontend* frontend) const
+{
+ ScriptObject frame = frontend->newScriptObject();
+ frame.set("functionName", m_functionName);
+ frame.set("sourceURL", m_sourceURL.string());
+ frame.set("lineNumber", m_lineNumber);
+ return frame;
+}
+
ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, const String& m, unsigned li, const String& u, unsigned g)
: m_source(s)
, m_type(t)
@@ -52,10 +80,11 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, c
{
}
-ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, ScriptCallStack* callStack, unsigned g, bool storeTrace)
+ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, const String& m, ScriptCallStack* callStack, unsigned g, bool storeTrace)
: m_source(s)
, m_type(t)
, m_level(l)
+ , m_message(m)
#if ENABLE(INSPECTOR)
, m_arguments(callStack->at(0).argumentCount())
, m_scriptState(callStack->globalState())
@@ -68,12 +97,9 @@ ConsoleMessage::ConsoleMessage(MessageSource s, MessageType t, MessageLevel l, S
m_line = lastCaller.lineNumber();
m_url = lastCaller.sourceURL().string();
- // FIXME: For now, just store function names as strings.
- // As ScriptCallStack start storing line number and source URL for all
- // frames, refactor to use that, as well.
if (storeTrace) {
for (unsigned i = 0; i < callStack->size(); ++i)
- m_frames[i] = callStack->at(i).functionName();
+ m_frames[i] = ConsoleMessage::CallFrame(callStack->at(i));
}
#if ENABLE(INSPECTOR)
@@ -93,15 +119,26 @@ void ConsoleMessage::addToFrontend(InspectorFrontend* frontend, InjectedScriptHo
jsonObj.set("url", m_url);
jsonObj.set("groupLevel", static_cast<int>(m_groupLevel));
jsonObj.set("repeatCount", static_cast<int>(m_repeatCount));
- Vector<RefPtr<SerializedScriptValue> > arguments;
+ jsonObj.set("message", m_message);
if (!m_arguments.isEmpty()) {
+ ScriptArray jsonArgs = frontend->newScriptArray();
InjectedScript injectedScript = injectedScriptHost->injectedScriptFor(m_scriptState.get());
for (unsigned i = 0; i < m_arguments.size(); ++i) {
RefPtr<SerializedScriptValue> serializedValue = injectedScript.wrapForConsole(m_arguments[i]);
- arguments.append(serializedValue);
+ if (!jsonArgs.set(i, serializedValue.get())) {
+ ASSERT_NOT_REACHED();
+ return;
+ }
}
- }
- frontend->addConsoleMessage(jsonObj, m_frames, arguments, m_message);
+ jsonObj.set("parameters", jsonArgs);
+ }
+ if (!m_frames.isEmpty()) {
+ ScriptArray frames = frontend->newScriptArray();
+ for (unsigned i = 0; i < m_frames.size(); i++)
+ frames.set(i, m_frames.at(i).buildObject(frontend));
+ jsonObj.set("stackTrace", frames);
+ }
+ frontend->addConsoleMessage(jsonObj);
}
void ConsoleMessage::updateRepeatCountInConsole(InspectorFrontend* frontend)
@@ -133,7 +170,7 @@ bool ConsoleMessage::isEqual(ScriptState* state, ConsoleMessage* msg) const
return false;
for (size_t i = 0; i < frameCount; ++i) {
- if (m_frames[i] != msg->m_frames[i])
+ if (!m_frames[i].isEqual(msg->m_frames[i]))
return false;
}
diff --git a/WebCore/inspector/ConsoleMessage.h b/WebCore/inspector/ConsoleMessage.h
index 77a010c..3848dbf 100644
--- a/WebCore/inspector/ConsoleMessage.h
+++ b/WebCore/inspector/ConsoleMessage.h
@@ -32,6 +32,7 @@
#define ConsoleMessage_h
#include "Console.h"
+#include "KURL.h"
#include "ScriptObject.h"
#include "ScriptState.h"
@@ -40,13 +41,14 @@
namespace WebCore {
class InjectedScriptHost;
class InspectorFrontend;
+class ScriptCallFrame;
class ScriptCallStack;
class ScriptString;
class ConsoleMessage : public Noncopyable {
public:
- ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, unsigned li, const String& u, unsigned g);
- ConsoleMessage(MessageSource, MessageType, MessageLevel, ScriptCallStack*, unsigned g, bool storeTrace = false);
+ ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, unsigned li, const String& u, unsigned g);
+ ConsoleMessage(MessageSource, MessageType, MessageLevel, const String& m, ScriptCallStack*, unsigned g, bool storeTrace = false);
#if ENABLE(INSPECTOR)
void addToFrontend(InspectorFrontend*, InjectedScriptHost*);
@@ -59,6 +61,19 @@ public:
const String& message() const { return m_message; }
private:
+ class CallFrame {
+ public:
+ explicit CallFrame(const ScriptCallFrame& frame);
+ CallFrame();
+ bool isEqual(const CallFrame& o) const;
+ ScriptObject buildObject(InspectorFrontend* frontend) const;
+
+ private:
+ String m_functionName;
+ KURL m_sourceURL;
+ unsigned m_lineNumber;
+ };
+
MessageSource m_source;
MessageType m_type;
MessageLevel m_level;
@@ -67,7 +82,7 @@ private:
Vector<ScriptValue> m_arguments;
ScriptStateProtectedPtr m_scriptState;
#endif
- Vector<ScriptString> m_frames;
+ Vector<CallFrame> m_frames;
unsigned m_line;
String m_url;
unsigned m_groupLevel;
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
new file mode 100644
index 0000000..3c96db1
--- /dev/null
+++ b/WebCore/inspector/Inspector.idl
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
+ * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module core {
+ interface [Conditional=INSPECTOR] Inspector {
+ [notify] void addRecordToTimeline(out Object record);
+ [notify] void addNodesToSearchResult(out Array nodeIds);
+ [notify] void attributesUpdated(out long id, out Array attributes);
+ [notify] void childNodeCountUpdated(out long id, out int newValue);
+ [notify] void childNodeInserted(out long parentId, out long prevId, out Object node);
+ [notify] void childNodeRemoved(out long parentId, out long id);
+ [notify] void setChildNodes(out long parentId, out Array nodes);
+ [notify] void setDetachedRoot(out Object root);
+ [notify] void setDocument(out Value root);
+
+ void storeLastActivePanel(in String panelName);
+
+ void saveApplicationSettings(in String settings);
+ void saveSessionSettings(in String settings);
+
+ void enableSearchingForNode();
+ void disableSearchingForNode();
+
+ void enableMonitoringXHR();
+ void disableMonitoringXHR();
+
+ void enableResourceTracking(in boolean always);
+ void disableResourceTracking(in boolean always);
+ void getResourceContent(in long callId, in unsigned long identifier);
+ void reloadPage();
+
+ void startTimelineProfiler();
+ void stopTimelineProfiler();
+
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+ void enableDebugger(in boolean always);
+ void disableDebugger(in boolean always);
+
+ void setBreakpoint(in long callId, in String sourceID, in unsigned long lineNumber, in boolean enabled, in String condition);
+ void removeBreakpoint(in String sourceID, in unsigned long lineNumber);
+ void activateBreakpoints();
+ void deactivateBreakpoints();
+
+ void pause();
+ void resume();
+
+ void stepOverStatement();
+ void stepIntoStatement();
+ void stepOutOfFunction();
+
+ void setPauseOnExceptionsState(in long pauseOnExceptionsState);
+
+ void editScriptSource(in long callId, in String sourceID, in String newContent);
+ void getScriptSource(in long callId, in String sourceID);
+
+ void enableProfiler(in boolean always);
+ void disableProfiler(in boolean always);
+
+ void startProfiling();
+ void stopProfiling();
+
+ void getProfileHeaders(in long callId);
+ void getProfile(in long callId, in unsigned long uid);
+
+ void removeProfile(in unsigned long uid);
+ void clearProfiles();
+
+ void takeHeapSnapshot();
+#endif
+ void setInjectedScriptSource(in String scriptSource);
+ void dispatchOnInjectedScript(in long callId, in long injectedScriptId, in String methodName, in String arguments, in boolean async);
+
+ void addScriptToEvaluateOnLoad(in String scriptSource);
+ void removeAllScriptsToEvaluateOnLoad();
+
+ void getChildNodes(in long callId, in long nodeId);
+ [customResponse=didApplyDomChange] void setAttribute(in long callId, in long elementId, in String name, in String value, out boolean success);
+ [customResponse=didApplyDomChange] void removeAttribute(in long callId, in long elementId, in String name, out boolean success);
+ void setTextNodeValue(in long callId, in long nodeId, in String value);
+ void getEventListenersForNode(in long callId, in long nodeId, out long nodeId, out Array listenersArray);
+ void copyNode(in long nodeId);
+ void removeNode(in long callId, in long nodeId, out long nodeId);
+ void changeTagName(in long callId, in long nodeId, in String newTagName, out long nodeId);
+ void getOuterHTML(in long callId, in long nodeId, out String outerHTML);
+ void setOuterHTML(in long callId, in long nodeId, in String outerHTML, out long nodeId);
+ void addInspectedNode(in long nodeId);
+ void performSearch(in String query, in boolean runSynchronously);
+ void searchCanceled();
+ void pushNodeByPathToFrontend(in long callId, in String path, out long nodeId);
+
+ void clearConsoleMessages();
+
+ void highlightDOMNode(in long nodeId);
+ void hideDOMNodeHighlight();
+
+ void getStyles(in long callId, in long nodeId, in boolean authOnly, out Value styles);
+ void getAllStyles(in long callId, out Array styles);
+ void getInlineStyle(in long callId, in long nodeId, out Value style);
+ void getComputedStyle(in long callId, in long nodeId, out Value style);
+ void getStyleSheet(in long callId, in long styleSheetId, out Value styleSheet);
+ void getRuleRangesForStyleSheetId(in long callId, in long styleSheetId);
+ void applyStyleText(in long callId, in long styleId, in String styleText, in String propertyName, out boolean success, out Value style, out Array changedProperties);
+ void setStyleText(in long callId, in long styleId, in String styleText, out boolean success);
+ void setStyleProperty(in long callId, in long styleId, in String name, in String value, out boolean success);
+ void toggleStyleEnabled(in long callId, in long styleId, in String propertyName, in boolean disabled, out Value style);
+ void setRuleSelector(in long callId, in long ruleId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
+ void addRule(in long callId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
+
+ void getCookies(in long callId);
+ void deleteCookie(in String cookieName, in String domain);
+
+#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS
+ void getApplicationCaches(in long callId);
+#endif
+
+ void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
+ void didEvaluateForTestInFrontend(in long callId, in String jsonResult);
+
+#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
+ void getDatabaseTableNames(in long callId, in long databaseId);
+#endif
+
+#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
+ void getDOMStorageEntries(in long callId, in long storageId);
+ void setDOMStorageItem(in long callId, in long storageId, in String key, in String value);
+ void removeDOMStorageItem(in long callId, in long storageId, in String key);
+#endif
+ };
+}
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 57ee19f..9f71307 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -86,13 +86,13 @@ InspectorBackend::~InspectorBackend()
void InspectorBackend::saveApplicationSettings(const String& settings)
{
if (m_inspectorController)
- m_inspectorController->setSetting(InspectorController::frontendSettingsSettingName(), settings);
+ m_inspectorController->saveApplicationSettings(settings);
}
void InspectorBackend::saveSessionSettings(const String& settings)
{
if (m_inspectorController)
- m_inspectorController->setSessionSettings(settings);
+ m_inspectorController->saveSessionSettings(settings);
}
void InspectorBackend::storeLastActivePanel(const String& panelName)
@@ -104,25 +104,25 @@ void InspectorBackend::storeLastActivePanel(const String& panelName)
void InspectorBackend::enableSearchingForNode()
{
if (m_inspectorController)
- m_inspectorController->setSearchingForNode(true);
+ m_inspectorController->enableSearchingForNode();
}
void InspectorBackend::disableSearchingForNode()
{
if (m_inspectorController)
- m_inspectorController->setSearchingForNode(false);
+ m_inspectorController->disableSearchingForNode();
}
void InspectorBackend::enableMonitoringXHR()
{
if (m_inspectorController)
- m_inspectorController->setMonitoringXHR(true);
+ m_inspectorController->enableMonitoringXHR();
}
void InspectorBackend::disableMonitoringXHR()
{
if (m_inspectorController)
- m_inspectorController->setMonitoringXHR(false);
+ m_inspectorController->disableMonitoringXHR();
}
void InspectorBackend::enableResourceTracking(bool always)
@@ -139,21 +139,14 @@ void InspectorBackend::disableResourceTracking(bool always)
void InspectorBackend::getResourceContent(long callId, unsigned long identifier)
{
- InspectorFrontend* frontend = inspectorFrontend();
- if (!frontend)
- return;
-
- RefPtr<InspectorResource> resource = m_inspectorController->resources().get(identifier);
- if (resource)
- frontend->didGetResourceContent(callId, resource->sourceString());
- else
- frontend->didGetResourceContent(callId, "");
+ if (m_inspectorController)
+ m_inspectorController->getResourceContent(callId, identifier);
}
void InspectorBackend::reloadPage()
{
if (m_inspectorController)
- m_inspectorController->m_inspectedPage->mainFrame()->redirectScheduler()->scheduleRefresh(true);
+ m_inspectorController->reloadPage();
}
void InspectorBackend::startTimelineProfiler()
@@ -196,45 +189,44 @@ void InspectorBackend::removeBreakpoint(const String& sourceID, unsigned lineNum
void InspectorBackend::activateBreakpoints()
{
- ScriptDebugServer::shared().setBreakpointsActivated(true);
+ ScriptDebugServer::shared().activateBreakpoints();
}
void InspectorBackend::deactivateBreakpoints()
{
- ScriptDebugServer::shared().setBreakpointsActivated(false);
+ ScriptDebugServer::shared().deactivateBreakpoints();
}
-void InspectorBackend::pauseInDebugger()
+void InspectorBackend::pause()
{
- ScriptDebugServer::shared().pauseProgram();
+ ScriptDebugServer::shared().pause();
}
-void InspectorBackend::resumeDebugger()
+void InspectorBackend::resume()
{
if (m_inspectorController)
- m_inspectorController->resumeDebugger();
+ m_inspectorController->resume();
}
-void InspectorBackend::stepOverStatementInDebugger()
+void InspectorBackend::stepOverStatement()
{
ScriptDebugServer::shared().stepOverStatement();
}
-void InspectorBackend::stepIntoStatementInDebugger()
+void InspectorBackend::stepIntoStatement()
{
ScriptDebugServer::shared().stepIntoStatement();
}
-void InspectorBackend::stepOutOfFunctionInDebugger()
+void InspectorBackend::stepOutOfFunction()
{
ScriptDebugServer::shared().stepOutOfFunction();
}
void InspectorBackend::setPauseOnExceptionsState(long pauseState)
{
- ScriptDebugServer::shared().setPauseOnExceptionsState(static_cast<ScriptDebugServer::PauseOnExceptionsState>(pauseState));
- if (InspectorFrontend* frontend = inspectorFrontend())
- frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
+ if (m_inspectorController)
+ m_inspectorController->setPauseOnExceptionsState(pauseState);
}
void InspectorBackend::editScriptSource(long callId, const String& sourceID, const String& newContent)
@@ -368,11 +360,8 @@ void InspectorBackend::getEventListenersForNode(long callId, long nodeId)
void InspectorBackend::copyNode(long nodeId)
{
- Node* node = nodeForId(nodeId);
- if (!node)
- return;
- String markup = createMarkup(node);
- Pasteboard::generalPasteboard()->writePlainText(markup);
+ if (InspectorDOMAgent* domAgent = inspectorDOMAgent())
+ domAgent->copyNode(nodeId);
}
void InspectorBackend::removeNode(long callId, long nodeId)
@@ -419,13 +408,8 @@ void InspectorBackend::searchCanceled()
void InspectorBackend::pushNodeByPathToFrontend(long callId, const String& path)
{
- InspectorDOMAgent* domAgent = inspectorDOMAgent();
- InspectorFrontend* frontend = inspectorFrontend();
- if (!domAgent || !frontend)
- return;
-
- long id = domAgent->pushNodeByPathToFrontend(path);
- frontend->didPushNodeByPathToFrontend(callId, id);
+ if (InspectorDOMAgent* domAgent = inspectorDOMAgent())
+ domAgent->pushNodeByPathToFrontend(callId, path);
}
void InspectorBackend::clearConsoleMessages()
@@ -508,14 +492,14 @@ void InspectorBackend::addRule(long callId, const String& selector, long selecte
void InspectorBackend::highlightDOMNode(long nodeId)
{
- if (Node* node = nodeForId(nodeId))
- m_inspectorController->highlight(node);
+ if (m_inspectorController)
+ m_inspectorController->highlightDOMNode(nodeId);
}
void InspectorBackend::hideDOMNodeHighlight()
{
if (m_inspectorController)
- m_inspectorController->hideHighlight();
+ m_inspectorController->hideDOMNodeHighlight();
}
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
@@ -613,13 +597,6 @@ InspectorFrontend* InspectorBackend::inspectorFrontend()
return m_inspectorController->m_frontend.get();
}
-Node* InspectorBackend::nodeForId(long nodeId)
-{
- if (InspectorDOMAgent* domAgent = inspectorDOMAgent())
- return domAgent->nodeForId(nodeId);
- return 0;
-}
-
void InspectorBackend::addScriptToEvaluateOnLoad(const String& source)
{
if (m_inspectorController)
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index 47cfdc7..78d34b6 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -86,12 +86,12 @@ public:
void activateBreakpoints();
void deactivateBreakpoints();
- void pauseInDebugger();
- void resumeDebugger();
+ void pause();
+ void resume();
- void stepOverStatementInDebugger();
- void stepIntoStatementInDebugger();
- void stepOutOfFunctionInDebugger();
+ void stepOverStatement();
+ void stepIntoStatement();
+ void stepOutOfFunction();
void setPauseOnExceptionsState(long pauseState);
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
index 1fc8a16..3c460a1 100644
--- a/WebCore/inspector/InspectorBackend.idl
+++ b/WebCore/inspector/InspectorBackend.idl
@@ -60,12 +60,12 @@ module core {
void activateBreakpoints();
void deactivateBreakpoints();
- void pauseInDebugger();
- void resumeDebugger();
+ void pause();
+ void resume();
- void stepOverStatementInDebugger();
- void stepIntoStatementInDebugger();
- void stepOutOfFunctionInDebugger();
+ void stepOverStatement();
+ void stepIntoStatement();
+ void stepOutOfFunction();
void setPauseOnExceptionsState(in long pauseOnExceptionsState);
diff --git a/WebCore/inspector/InspectorCSSStore.cpp b/WebCore/inspector/InspectorCSSStore.cpp
index 413fb8b..9dffef9 100644
--- a/WebCore/inspector/InspectorCSSStore.cpp
+++ b/WebCore/inspector/InspectorCSSStore.cpp
@@ -41,7 +41,7 @@
#include "InspectorController.h"
#include "InspectorResource.h"
#include "PlatformString.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
#include "StyleSheetList.h"
namespace WebCore {
@@ -95,13 +95,13 @@ CSSStyleSheet* InspectorCSSStore::inspectorStyleSheet(Document* ownerDocument, b
if (!ec)
ownerDocument->head()->appendChild(styleElement, ec);
if (ec) {
- m_inspectorController->inspectorFrontend2()->didAddRule(callId, InspectorValue::null(), false);
+ m_inspectorController->remoteInspectorFrontend()->didAddRule(callId, InspectorValue::null(), false);
return 0;
}
StyleSheetList* styleSheets = ownerDocument->styleSheets();
StyleSheet* styleSheet = styleSheets->item(styleSheets->length() - 1);
if (!styleSheet->isCSSStyleSheet()) {
- m_inspectorController->inspectorFrontend2()->didAddRule(callId, InspectorValue::null(), false);
+ m_inspectorController->remoteInspectorFrontend()->didAddRule(callId, InspectorValue::null(), false);
return 0;
}
CSSStyleSheet* inspectorStyleSheet = static_cast<CSSStyleSheet*>(styleSheet);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index ed25696..8879b8e 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -68,7 +68,7 @@
#include "Page.h"
#include "ProgressTracker.h"
#include "Range.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
#include "RenderInline.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
@@ -129,6 +129,8 @@ static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight"
static const char* const lastActivePanelSettingName = "lastActivePanel";
static const char* const monitoringXHRSettingName = "xhrMonitor";
+int connectedFrontendCount = 0;
+
const String& InspectorController::frontendSettingsSettingName()
{
DEFINE_STATIC_LOCAL(String, settingName, ("frontendSettings"));
@@ -216,7 +218,6 @@ InspectorController::~InspectorController()
ASSERT(!m_highlightedNode);
deleteAllValues(m_frameResources);
- deleteAllValues(m_consoleMessages);
ASSERT(s_inspectorControllerCount);
--s_inspectorControllerCount;
@@ -266,7 +267,12 @@ void InspectorController::setSetting(const String& key, const String& value)
m_client->storeSetting(key, value);
}
-void InspectorController::setSessionSettings(const String& settingsJSON)
+void InspectorController::saveApplicationSettings(const String& settings)
+{
+ setSetting(InspectorController::frontendSettingsSettingName(), settings);
+}
+
+void InspectorController::saveSessionSettings(const String& settingsJSON)
{
m_sessionSettings = InspectorValue::parseJSON(settingsJSON);
}
@@ -312,6 +318,13 @@ void InspectorController::highlight(Node* node)
m_client->highlight(node);
}
+void InspectorController::highlightDOMNode(long nodeId)
+{
+ Node* node = 0;
+ if (m_domAgent && (node = m_domAgent->nodeForId(nodeId)))
+ highlight(node);
+}
+
void InspectorController::hideHighlight()
{
if (!enabled())
@@ -325,12 +338,13 @@ bool InspectorController::windowVisible()
return m_frontend;
}
-void InspectorController::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, ScriptCallStack* callStack)
+void InspectorController::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, ScriptCallStack* callStack, const String& message)
{
if (!enabled())
return;
- addConsoleMessage(callStack->state(), new ConsoleMessage(source, type, level, callStack, m_groupLevel, type == TraceMessageType));
+ bool storeStackTrace = type == TraceMessageType || type == UncaughtExceptionMessageType || type == AssertMessageType;
+ addConsoleMessage(callStack->state(), new ConsoleMessage(source, type, level, message, callStack, m_groupLevel, storeStackTrace));
}
void InspectorController::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID)
@@ -341,18 +355,17 @@ void InspectorController::addMessageToConsole(MessageSource source, MessageType
addConsoleMessage(0, new ConsoleMessage(source, type, level, message, lineNumber, sourceID, m_groupLevel));
}
-void InspectorController::addConsoleMessage(ScriptState* scriptState, ConsoleMessage* consoleMessage)
+void InspectorController::addConsoleMessage(ScriptState* scriptState, PassOwnPtr<ConsoleMessage> consoleMessage)
{
ASSERT(enabled());
ASSERT_ARG(consoleMessage, consoleMessage);
- if (m_previousMessage && m_previousMessage->isEqual(scriptState, consoleMessage)) {
+ if (m_previousMessage && m_previousMessage->isEqual(scriptState, consoleMessage.get())) {
m_previousMessage->incrementCount();
- delete consoleMessage;
if (m_frontend)
m_previousMessage->updateRepeatCountInConsole(m_frontend.get());
} else {
- m_previousMessage = consoleMessage;
+ m_previousMessage = consoleMessage.get();
m_consoleMessages.append(consoleMessage);
if (m_frontend)
m_previousMessage->addToFrontend(m_frontend.get(), m_injectedScriptHost.get());
@@ -360,15 +373,12 @@ void InspectorController::addConsoleMessage(ScriptState* scriptState, ConsoleMes
if (!m_frontend && m_consoleMessages.size() >= maximumConsoleMessages) {
m_expiredConsoleMessageCount += expireConsoleMessagesStep;
- for (size_t i = 0; i < expireConsoleMessagesStep; ++i)
- delete m_consoleMessages[i];
m_consoleMessages.remove(0, expireConsoleMessagesStep);
}
}
void InspectorController::clearConsoleMessages()
{
- deleteAllValues(m_consoleMessages);
m_consoleMessages.clear();
m_expiredConsoleMessageCount = 0;
m_previousMessage = 0;
@@ -384,7 +394,7 @@ void InspectorController::startGroup(MessageSource source, ScriptCallStack* call
{
++m_groupLevel;
- addConsoleMessage(callStack->state(), new ConsoleMessage(source, collapsed ? StartGroupCollapsedMessageType : StartGroupMessageType, LogMessageLevel, callStack, m_groupLevel));
+ addConsoleMessage(callStack->state(), new ConsoleMessage(source, collapsed ? StartGroupCollapsedMessageType : StartGroupMessageType, LogMessageLevel, String(), callStack, m_groupLevel));
}
void InspectorController::endGroup(MessageSource source, unsigned lineNumber, const String& sourceURL)
@@ -486,10 +496,10 @@ void InspectorController::connectFrontend(const ScriptObject& webInspector)
m_openingFrontend = false;
releaseFrontendLifetimeAgents();
m_frontend = new InspectorFrontend(webInspector, m_client);
- m_frontend2 = new InspectorFrontend2(m_client);
- m_domAgent = InspectorDOMAgent::create(m_cssStore.get(), m_frontend2.get());
+ m_remoteFrontend = new RemoteInspectorFrontend(m_client);
+ m_domAgent = InspectorDOMAgent::create(m_cssStore.get(), m_remoteFrontend.get());
if (m_timelineAgent)
- m_timelineAgent->resetFrontendProxyObject(m_frontend2.get());
+ m_timelineAgent->resetFrontendProxyObject(m_remoteFrontend.get());
// Initialize Web Inspector title.
m_frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
@@ -523,6 +533,10 @@ void InspectorController::connectFrontend(const ScriptObject& webInspector)
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
m_applicationCacheAgent = new InspectorApplicationCacheAgent(this, m_frontend.get());
#endif
+
+ if (!connectedFrontendCount)
+ ScriptController::setCaptureCallStackForUncaughtExceptions(true);
+ connectedFrontendCount++;
}
void InspectorController::show()
@@ -572,6 +586,10 @@ void InspectorController::disconnectFrontend()
return;
m_frontend.clear();
+ connectedFrontendCount--;
+ if (!connectedFrontendCount)
+ ScriptController::setCaptureCallStackForUncaughtExceptions(false);
+
#if ENABLE(JAVASCRIPT_DEBUGGER)
// If the window is being closed with the debugger enabled,
// remember this state to re-enable debugger on the next window
@@ -1163,7 +1181,7 @@ void InspectorController::startTimelineProfiler()
if (m_timelineAgent)
return;
- m_timelineAgent = new InspectorTimelineAgent(m_frontend2.get());
+ m_timelineAgent = new InspectorTimelineAgent(m_remoteFrontend.get());
if (m_frontend)
m_frontend->timelineProfilerWasStarted();
m_client->timelineProfilerWasStarted();
@@ -1746,13 +1764,20 @@ void InspectorController::getScriptSource(long callId, const String& sourceID)
m_frontend->didGetScriptSource(callId, scriptSource);
}
-void InspectorController::resumeDebugger()
+void InspectorController::resume()
{
if (!m_debuggerEnabled)
return;
ScriptDebugServer::shared().continueProgram();
}
+void InspectorController::setPauseOnExceptionsState(long pauseState)
+{
+ ScriptDebugServer::shared().setPauseOnExceptionsState(static_cast<ScriptDebugServer::PauseOnExceptionsState>(pauseState));
+ if (m_frontend)
+ m_frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
+}
+
PassRefPtr<SerializedScriptValue> InspectorController::currentCallFrames()
{
if (!m_pausedScriptState)
@@ -2159,6 +2184,23 @@ void InspectorController::removeAllScriptsToEvaluateOnLoad()
m_scriptsToEvaluateOnLoad.clear();
}
+void InspectorController::getResourceContent(long callId, unsigned long identifier)
+{
+ if (!m_frontend)
+ return;
+
+ RefPtr<InspectorResource> resource = m_resources.get(identifier);
+ if (resource)
+ m_frontend->didGetResourceContent(callId, resource->sourceString());
+ else
+ m_frontend->didGetResourceContent(callId, "");
+}
+
+void InspectorController::reloadPage()
+{
+ m_inspectedPage->mainFrame()->redirectScheduler()->scheduleRefresh(true);
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 9bb6c7d..76b88f1 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -69,7 +69,6 @@ class InspectorCSSStore;
class InspectorDOMStorageResource;
class InspectorDatabaseResource;
class InspectorFrontend;
-class InspectorFrontend2;
class InspectorFrontendClient;
class InspectorResource;
class InspectorTimelineAgent;
@@ -78,6 +77,7 @@ class InspectorWorkerResource;
class KURL;
class Node;
class Page;
+class RemoteInspectorFrontend;
class ResourceRequest;
class ResourceResponse;
class ResourceError;
@@ -127,14 +127,19 @@ public:
bool enabled() const;
Page* inspectedPage() const { return m_inspectedPage; }
+ void reloadPage();
String setting(const String& key) const;
void setSetting(const String& key, const String& value);
- void setSessionSettings(const String&);
+ void saveApplicationSettings(const String& settings);
+ void saveSessionSettings(const String&);
+
void inspect(Node*);
void highlight(Node*);
void hideHighlight();
+ void highlightDOMNode(long nodeId);
+ void hideDOMNodeHighlight() { hideHighlight(); }
void show();
void showPanel(SpecialPanels);
@@ -146,10 +151,10 @@ public:
void connectFrontend(const ScriptObject& webInspector);
void disconnectFrontend();
- void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*);
+ void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*, const String& message = String());
void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID);
void clearConsoleMessages();
- const Vector<ConsoleMessage*>& consoleMessages() const { return m_consoleMessages; }
+ const Vector<OwnPtr<ConsoleMessage> >& consoleMessages() const { return m_consoleMessages; }
bool searchingForNodeInPage() const { return m_searchingForNode; }
void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
@@ -220,7 +225,7 @@ public:
const ResourcesMap& resources() const { return m_resources; }
InspectorResource* resourceForURL(const String& url);
InspectorFrontend* inspectorFrontend() { return m_frontend.get(); }
- InspectorFrontend2* inspectorFrontend2() { return m_frontend2.get(); }
+ RemoteInspectorFrontend* remoteInspectorFrontend() { return m_remoteFrontend.get(); }
void drawNodeHighlight(GraphicsContext&) const;
@@ -246,6 +251,8 @@ public:
String getCurrentUserInitiatedProfileName(bool incrementProfileNumber);
void startUserInitiatedProfiling(Timer<InspectorController>* = 0);
void stopUserInitiatedProfiling();
+ void startProfiling() { startUserInitiatedProfiling(); }
+ void stopProfiling() { stopUserInitiatedProfiling(); }
void enableProfiler(bool always = false, bool skipRecompile = false);
void disableProfiler(bool always = false);
@@ -260,7 +267,8 @@ public:
void editScriptSource(long callId, const String& sourceID, const String& newContent);
void getScriptSource(long callId, const String& sourceID);
- void resumeDebugger();
+ void resume();
+ void setPauseOnExceptionsState(long pauseState);
PassRefPtr<SerializedScriptValue> currentCallFrames();
virtual void didParseSource(const String& sourceID, const String& url, const String& data, int firstLine, ScriptWorldType);
@@ -288,7 +296,12 @@ private:
// Following are used from InspectorBackend and internally.
void setSearchingForNode(bool enabled);
+ void enableSearchingForNode() { setSearchingForNode(true); }
+ void disableSearchingForNode() { setSearchingForNode(false); }
+
void setMonitoringXHR(bool enabled);
+ void enableMonitoringXHR() { setMonitoringXHR(true); }
+ void disableMonitoringXHR() { setMonitoringXHR(false); }
void storeLastActivePanel(const String& panelName);
InspectorDOMAgent* domAgent() { return m_domAgent.get(); }
void releaseFrontendLifetimeAgents();
@@ -319,11 +332,12 @@ private:
void focusNode();
- void addConsoleMessage(ScriptState*, ConsoleMessage*);
+ void addConsoleMessage(ScriptState*, PassOwnPtr<ConsoleMessage>);
void addResource(InspectorResource*);
void removeResource(InspectorResource*);
InspectorResource* getTrackedResource(unsigned long identifier);
+ void getResourceContent(long callId, unsigned long identifier);
void pruneResources(ResourcesMap*, DocumentLoader* loaderToKeep = 0);
void removeAllResources(ResourcesMap* map) { pruneResources(map); }
@@ -345,7 +359,7 @@ private:
OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient;
bool m_openingFrontend;
OwnPtr<InspectorFrontend> m_frontend;
- OwnPtr<InspectorFrontend2> m_frontend2;
+ OwnPtr<RemoteInspectorFrontend> m_remoteFrontend;
RefPtr<InspectorDOMAgent> m_domAgent;
OwnPtr<InspectorCSSStore> m_cssStore;
OwnPtr<InspectorTimelineAgent> m_timelineAgent;
@@ -359,7 +373,7 @@ private:
ResourcesMap m_resources;
HashSet<String> m_knownResources;
FrameResourcesMap m_frameResources;
- Vector<ConsoleMessage*> m_consoleMessages;
+ Vector<OwnPtr<ConsoleMessage> > m_consoleMessages;
unsigned m_expiredConsoleMessageCount;
HashMap<String, double> m_times;
HashMap<String, unsigned> m_counts;
diff --git a/WebCore/inspector/InspectorDOMAgent.cpp b/WebCore/inspector/InspectorDOMAgent.cpp
index 46bc938..e3d1bf5 100644
--- a/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/WebCore/inspector/InspectorDOMAgent.cpp
@@ -58,8 +58,9 @@
#include "MutationEvent.h"
#include "Node.h"
#include "NodeList.h"
+#include "Pasteboard.h"
#include "PlatformString.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
#include "RenderStyle.h"
#include "RenderStyleConstants.h"
#include "ScriptEventListener.h"
@@ -70,6 +71,8 @@
#include "XPathResult.h"
#endif
+#include "markup.h"
+
#include <wtf/text/CString.h>
#include <wtf/HashSet.h>
#include <wtf/ListHashSet.h>
@@ -195,7 +198,7 @@ public:
}
-InspectorDOMAgent::InspectorDOMAgent(InspectorCSSStore* cssStore, InspectorFrontend2* frontend)
+InspectorDOMAgent::InspectorDOMAgent(InspectorCSSStore* cssStore, RemoteInspectorFrontend* frontend)
: EventListener(InspectorDOMAgentType)
, m_cssStore(cssStore)
, m_frontend(frontend)
@@ -354,14 +357,6 @@ void InspectorDOMAgent::pushChildNodesToFrontend(long nodeId)
m_frontend->setChildNodes(nodeId, children.release());
}
-long InspectorDOMAgent::pushNodeByPathToFrontend(const String& path)
-{
- Node* node = nodeForPath(path);
- if (!node)
- return 0;
- return pushNodePathToFrontend(node);
-}
-
long InspectorDOMAgent::inspectedNode(unsigned long num)
{
if (num < m_inspectedNodes.size())
@@ -1635,6 +1630,28 @@ void InspectorDOMAgent::reportNodesAsSearchResults(ListHashSet<Node*>& resultCol
m_frontend->addNodesToSearchResult(nodeIds.release());
}
+void InspectorDOMAgent::copyNode(long nodeId)
+{
+ Node* node = nodeForId(nodeId);
+ if (!node)
+ return;
+ String markup = createMarkup(node);
+ Pasteboard::generalPasteboard()->writePlainText(markup);
+}
+
+void InspectorDOMAgent::pushNodeByPathToFrontend(long callId, const String& path)
+{
+ if (!m_frontend)
+ return;
+
+ long id = 0;
+ Node* node = nodeForPath(path);
+ if (node)
+ id = pushNodePathToFrontend(node);
+
+ m_frontend->didPushNodeByPathToFrontend(callId, id);
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InspectorDOMAgent.h b/WebCore/inspector/InspectorDOMAgent.h
index 33c5f64..efa27e0 100644
--- a/WebCore/inspector/InspectorDOMAgent.h
+++ b/WebCore/inspector/InspectorDOMAgent.h
@@ -57,7 +57,11 @@ namespace WebCore {
class Element;
class Event;
class InspectorDOMAgent;
+<<<<<<< HEAD:WebCore/inspector/InspectorDOMAgent.h
class InspectorFrontend2;
+=======
+ class RemoteInspectorFrontend;
+>>>>>>> webkit.org at r63859:WebCore/inspector/InspectorDOMAgent.h
class MatchJob;
class NameNodeMap;
class Node;
@@ -80,7 +84,7 @@ namespace WebCore {
class InspectorDOMAgent : public EventListener {
public:
- static PassRefPtr<InspectorDOMAgent> create(InspectorCSSStore* cssStore, InspectorFrontend2* frontend)
+ static PassRefPtr<InspectorDOMAgent> create(InspectorCSSStore* cssStore, RemoteInspectorFrontend* frontend)
{
return adoptRef(new InspectorDOMAgent(cssStore, frontend));
}
@@ -92,7 +96,7 @@ namespace WebCore {
: 0;
}
- InspectorDOMAgent(InspectorCSSStore* cssStore, InspectorFrontend2* frontend);
+ InspectorDOMAgent(InspectorCSSStore* cssStore, RemoteInspectorFrontend* frontend);
~InspectorDOMAgent();
void reset();
@@ -138,8 +142,9 @@ namespace WebCore {
Node* nodeForId(long nodeId);
long pushNodePathToFrontend(Node* node);
void pushChildNodesToFrontend(long nodeId);
- long pushNodeByPathToFrontend(const String& path);
+ void pushNodeByPathToFrontend(long callId, const String& path);
long inspectedNode(unsigned long num);
+ void copyNode(long nodeId);
private:
static CSSStyleSheet* getParentStyleSheet(CSSStyleDeclaration*);
@@ -195,7 +200,7 @@ namespace WebCore {
void discardBindings();
InspectorCSSStore* m_cssStore;
- InspectorFrontend2* m_frontend;
+ RemoteInspectorFrontend* m_frontend;
NodeToIdMap m_documentNodeToIdMap;
// Owns node mappings for dangling nodes.
Vector<NodeToIdMap*> m_danglingNodeToIdMaps;
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index f9a29b6..5925741 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -32,7 +32,6 @@
#if ENABLE(INSPECTOR)
-#include "ConsoleMessage.h"
#include "Frame.h"
#include "InjectedScript.h"
#include "InjectedScriptHost.h"
@@ -112,26 +111,11 @@ void InspectorFrontend::updateConsoleMessageExpiredCount(unsigned count)
function.call();
}
-void InspectorFrontend::addConsoleMessage(const ScriptObject& messageObj, const Vector<ScriptString>& frames, const Vector<RefPtr<SerializedScriptValue> >& arguments, const String& message)
+void InspectorFrontend::addConsoleMessage(const ScriptObject& messageObj)
{
ScriptFunctionCall function(m_webInspector, "dispatch");
function.appendArgument("addConsoleMessage");
function.appendArgument(messageObj);
- if (!frames.isEmpty()) {
- for (unsigned i = 0; i < frames.size(); ++i)
- function.appendArgument(frames[i]);
- } else if (!arguments.isEmpty()) {
- for (unsigned i = 0; i < arguments.size(); ++i) {
- ScriptValue scriptValue = ScriptValue::deserialize(scriptState(), arguments[i].get());
- if (scriptValue.hasNoValue()) {
- ASSERT_NOT_REACHED();
- return;
- }
- function.appendArgument(scriptValue);
- }
- } else {
- function.appendArgument(message);
- }
function.call();
}
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index e32f40c..e6567be 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -68,7 +68,7 @@ namespace WebCore {
void populateSessionSettings(const String& settings);
void updateConsoleMessageExpiredCount(unsigned count);
- void addConsoleMessage(const ScriptObject& messageObj, const Vector<ScriptString>& frames, const Vector<RefPtr<SerializedScriptValue> >& arguments, const String& message);
+ void addConsoleMessage(const ScriptObject& messageObj);
void updateConsoleMessageRepeatCount(unsigned count);
void clearConsoleMessages();
diff --git a/WebCore/inspector/InspectorFrontend2.idl b/WebCore/inspector/InspectorFrontend2.idl
deleted file mode 100644
index b96d715..0000000
--- a/WebCore/inspector/InspectorFrontend2.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module WebCore {
-
- interface [Conditional=INSPECTOR, JS] InspectorFrontend2 {
- // TimelineAgent
- void addRecordToTimeline(in Object record);
-
- // DOMAgent
- void addNodesToSearchResult(in Array nodeIds);
- void attributesUpdated(in long id, in Array attributes);
- void childNodeCountUpdated(in long id, in int newValue);
- void childNodeInserted(in long parentId, in long prevId, in Object node);
- void childNodeRemoved(in long parentId, in long id);
- void didAddRule(in long callId, in Value rule, in boolean selectorAffectsNode);
- void didApplyDomChange(in long callId, in boolean success);
- void didApplyStyleText(in long callId, in boolean success, in Value style, in Array changedProperties);
- void didChangeTagName(in long callId, in long nodeId);
- void didGetAllStyles(in long callId, in Array styles);
- void didGetChildNodes(in long callId);
- void didGetComputedStyle(in long callId, in Value style);
- void didGetEventListenersForNode(in long callId, in long nodeId, in Array listenersArray);
- void didGetInlineStyle(in long callId, in Value style);
- void didGetOuterHTML(in long callId, in String outerHTML);
- void didGetStyleSheet(in long callId, in Value styleSheet);
- void didGetStyles(in long callId, in Value styles);
- void didRemoveNode(in long callId, in long nodeId);
- void didSetOuterHTML(in long callId, in long nodeId);
- void didSetRuleSelector(in long callId, in Value rule, in boolean selectorAffectsNode);
- void didSetStyleProperty(in long callId, in boolean success);
- void didSetStyleText(in long callId, in boolean success);
- void didToggleStyleEnabled(in long callId, in Value style);
- void setChildNodes(in long parentId, in Array nodes);
- void setDetachedRoot(in Object root);
- void setDocument(in Value root);
- };
-}
diff --git a/WebCore/inspector/InspectorResource.cpp b/WebCore/inspector/InspectorResource.cpp
index 91a57e0..6a5919c 100644
--- a/WebCore/inspector/InspectorResource.cpp
+++ b/WebCore/inspector/InspectorResource.cpp
@@ -64,6 +64,7 @@ InspectorResource::InspectorResource(unsigned long identifier, DocumentLoader* l
, m_loadEventTime(-1.0)
, m_domContentEventTime(-1.0)
, m_connectionID(0)
+ , m_connectionReused(false)
, m_isMainResource(false)
{
}
@@ -131,6 +132,7 @@ void InspectorResource::updateResponse(const ResourceResponse& response)
m_suggestedFilename = response.suggestedFilename();
m_connectionID = response.connectionID();
+ m_connectionReused = response.connectionReused();
m_loadTiming = response.resourceLoadTiming();
m_cached = response.wasCached();
@@ -183,6 +185,7 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
populateHeadersObject(&responseHeaders, m_responseHeaderFields);
jsonObject.set("responseHeaders", responseHeaders);
jsonObject.set("connectionID", m_connectionID);
+ jsonObject.set("connectionReused", m_connectionReused);
jsonObject.set("cached", m_cached);
if (m_loadTiming && !m_cached)
jsonObject.set("timing", buildObjectForTiming(frontend, m_loadTiming.get()));
@@ -394,9 +397,9 @@ ScriptObject InspectorResource::buildObjectForTiming(InspectorFrontend* frontend
jsonObject.set("proxyDuration", timing->proxyStart == -1 ? -1 : (timing->proxyEnd - timing->proxyStart) / 1000.0);
jsonObject.set("dnsDuration", timing->dnsStart == -1 ? -1 : (timing->dnsEnd - timing->dnsStart) / 1000.0);
jsonObject.set("connectDuration", timing->connectStart == -1 ? -1 : (timing->connectEnd - timing->connectStart) / 1000.0);
+ jsonObject.set("sslDuration", timing->sslStart == -1 ? -1 : (timing->sslEnd - timing->sslStart) / 1000.0);
jsonObject.set("sendDuration", (timing->sendEnd - timing->sendStart) / 1000.0);
jsonObject.set("waitDuration", (timing->receiveHeadersEnd - timing->sendEnd) / 1000.0);
- jsonObject.set("sslDuration", (timing->sslEnd - timing->sslStart) / 1000.0);
return jsonObject;
}
diff --git a/WebCore/inspector/InspectorResource.h b/WebCore/inspector/InspectorResource.h
index ed9ec37..48e1a20 100644
--- a/WebCore/inspector/InspectorResource.h
+++ b/WebCore/inspector/InspectorResource.h
@@ -174,6 +174,7 @@ namespace WebCore {
double m_loadEventTime;
double m_domContentEventTime;
unsigned m_connectionID;
+ bool m_connectionReused;
RefPtr<ResourceLoadTiming> m_loadTiming;
ScriptString m_overrideContent;
Type m_overrideContentType;
diff --git a/WebCore/inspector/InspectorTimelineAgent.cpp b/WebCore/inspector/InspectorTimelineAgent.cpp
index 31513d1..b5cff68 100644
--- a/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -35,7 +35,7 @@
#include "Event.h"
#include "IntRect.h"
-#include "RemoteInspectorFrontend2.h"
+#include "RemoteInspectorFrontend.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include "TimelineRecordFactory.h"
@@ -46,7 +46,7 @@ namespace WebCore {
int InspectorTimelineAgent::s_instanceCount = 0;
-InspectorTimelineAgent::InspectorTimelineAgent(InspectorFrontend2* frontend)
+InspectorTimelineAgent::InspectorTimelineAgent(RemoteInspectorFrontend* frontend)
: m_frontend(frontend)
{
++s_instanceCount;
@@ -279,7 +279,7 @@ void InspectorTimelineAgent::reset()
m_recordStack.clear();
}
-void InspectorTimelineAgent::resetFrontendProxyObject(InspectorFrontend2* frontend)
+void InspectorTimelineAgent::resetFrontendProxyObject(RemoteInspectorFrontend* frontend)
{
ASSERT(frontend);
reset();
diff --git a/WebCore/inspector/InspectorTimelineAgent.h b/WebCore/inspector/InspectorTimelineAgent.h
index 9a5cb98..16d7b83 100644
--- a/WebCore/inspector/InspectorTimelineAgent.h
+++ b/WebCore/inspector/InspectorTimelineAgent.h
@@ -42,7 +42,7 @@
namespace WebCore {
class Event;
-class InspectorFrontend2;
+class RemoteInspectorFrontend;
class IntRect;
class ResourceRequest;
class ResourceResponse;
@@ -74,11 +74,11 @@ enum TimelineRecordType {
class InspectorTimelineAgent : ScriptGCEventListener, public Noncopyable {
public:
- InspectorTimelineAgent(InspectorFrontend2* frontend);
+ InspectorTimelineAgent(RemoteInspectorFrontend* frontend);
~InspectorTimelineAgent();
void reset();
- void resetFrontendProxyObject(InspectorFrontend2*);
+ void resetFrontendProxyObject(RemoteInspectorFrontend*);
// Methods called from WebCore.
void willCallFunction(const String& scriptName, int scriptLine);
@@ -152,7 +152,7 @@ private:
void pushGCEventRecords();
- InspectorFrontend2* m_frontend;
+ RemoteInspectorFrontend* m_frontend;
Vector<TimelineRecordEntry> m_recordStack;
static int s_instanceCount;
diff --git a/WebCore/inspector/InspectorValues.cpp b/WebCore/inspector/InspectorValues.cpp
index f95116c..90a40f9 100644
--- a/WebCore/inspector/InspectorValues.cpp
+++ b/WebCore/inspector/InspectorValues.cpp
@@ -550,6 +550,7 @@ void InspectorBasicValue::writeJSON(Vector<UChar>* output) const
output->append(falseString, 5);
} else if (type() == TypeDouble) {
String value = String::format("%f", m_doubleValue);
+ value.replace(',', '.');
output->append(value.characters(), value.length());
}
}
@@ -650,6 +651,12 @@ void InspectorArray::writeJSON(Vector<UChar>* output) const
output->append(']');
}
+PassRefPtr<InspectorValue> InspectorArray::get(size_t index)
+{
+ ASSERT(index < m_data.size());
+ return m_data[index];
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/InspectorValues.h b/WebCore/inspector/InspectorValues.h
index 30ba95a..a0c0c2d 100644
--- a/WebCore/inspector/InspectorValues.h
+++ b/WebCore/inspector/InspectorValues.h
@@ -198,7 +198,9 @@ public:
void pushNumber(double);
void pushString(const String&);
void push(PassRefPtr<InspectorValue>);
- unsigned length() { return m_data.size(); }
+ unsigned length() const { return m_data.size(); }
+
+ PassRefPtr<InspectorValue> get(size_t index);
virtual void writeJSON(Vector<UChar>* output) const;
diff --git a/WebCore/inspector/JavaScriptCallFrame.idl b/WebCore/inspector/JavaScriptCallFrame.idl
index 28f4f34..225059d 100644
--- a/WebCore/inspector/JavaScriptCallFrame.idl
+++ b/WebCore/inspector/JavaScriptCallFrame.idl
@@ -25,7 +25,11 @@
module inspector {
- interface [Conditional=JAVASCRIPT_DEBUGGER, OmitConstructor] JavaScriptCallFrame {
+ interface [
+ Conditional=JAVASCRIPT_DEBUGGER,
+ OmitConstructor,
+ DontCheckEnums
+ ] JavaScriptCallFrame {
// Scope type
const unsigned short GLOBAL_SCOPE = 0;
diff --git a/WebCore/inspector/front-end/AbstractTimelinePanel.js b/WebCore/inspector/front-end/AbstractTimelinePanel.js
index 1b5f6ce..187ef86 100644
--- a/WebCore/inspector/front-end/AbstractTimelinePanel.js
+++ b/WebCore/inspector/front-end/AbstractTimelinePanel.js
@@ -202,6 +202,9 @@ WebInspector.AbstractTimelinePanel.prototype = {
// When we are updating our filtering, scroll to the top so we don't end up
// in blank graph under all the resources.
this.containerElement.scrollTop = 0;
+
+ var searchField = document.getElementById("search");
+ WebInspector.doPerformSearch(searchField.value, WebInspector.shortSearchWasForcedByKeyEvent, false, true);
},
updateGraphDividersIfNeeded: function(force)
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 8bb71e6..d4119a1 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -275,9 +275,9 @@ WebInspector.ConsoleView.prototype = {
msg._updateRepeatCount();
this._incrementErrorWarningCount(msg);
} else {
- msgCopy = new WebInspector.ConsoleMessage(msg.source, msg.type, msg.level, msg.line, msg.url, msg.groupLevel, count - prevRepeatCount);
+ var msgCopy = new WebInspector.ConsoleMessage(msg.source, msg.type, msg.level, msg.line, msg.url, msg.groupLevel, count - prevRepeatCount, msg._messageText, msg._parameters, msg._stackTrace);
msgCopy.totalRepeatCount = count;
- msgCopy.setMessageBody(msg.args);
+ msgCopy._formatMessage();
this.addMessage(msgCopy);
}
},
@@ -645,7 +645,7 @@ WebInspector.ConsoleView.prototype = {
WebInspector.ConsoleView.prototype.__proto__ = WebInspector.View.prototype;
-WebInspector.ConsoleMessage = function(source, type, level, line, url, groupLevel, repeatCount)
+WebInspector.ConsoleMessage = function(source, type, level, line, url, groupLevel, repeatCount, message, parameters, stackTrace)
{
this.source = source;
this.type = type;
@@ -656,29 +656,56 @@ WebInspector.ConsoleMessage = function(source, type, level, line, url, groupLeve
this.repeatCount = repeatCount;
this.repeatDelta = repeatCount;
this.totalRepeatCount = repeatCount;
- if (arguments.length > 7)
- this.setMessageBody(Array.prototype.slice.call(arguments, 7));
+ this._messageText = message;
+ this._parameters = parameters;
+ this._stackTrace = stackTrace;
+ this._formatMessage();
+}
+
+WebInspector.ConsoleMessage.createTextMessage = function(text, level)
+{
+ level = level || WebInspector.ConsoleMessage.MessageLevel.Log;
+ return new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, null, 1, null, [text], null);
}
WebInspector.ConsoleMessage.prototype = {
- setMessageBody: function(args)
+ _formatMessage: function()
{
- this.args = args;
switch (this.type) {
+ case WebInspector.ConsoleMessage.MessageType.Assert:
case WebInspector.ConsoleMessage.MessageType.Trace:
- var span = document.createElement("span");
- span.className = "console-formatted-trace source-code";
- var stack = Array.prototype.slice.call(args);
- var funcNames = stack.map(function(f) {
- return f || WebInspector.UIString("(anonymous function)");
- });
- span.appendChild(document.createTextNode(funcNames.join("\n")));
- this.formattedMessage = span;
+ case WebInspector.ConsoleMessage.MessageType.UncaughtException:
+ var ol = document.createElement("ol");
+ ol.addStyleClass("stack-trace");
+ if (this.type === WebInspector.ConsoleMessage.MessageType.Trace)
+ ol.addStyleClass("trace-message");
+ var treeOutline = new TreeOutline(ol);
+
+ var root = treeOutline;
+ if (this.type === WebInspector.ConsoleMessage.MessageType.UncaughtException ||
+ this.type === WebInspector.ConsoleMessage.MessageType.Assert) {
+ var messageText;
+ if (this.type === WebInspector.ConsoleMessage.MessageType.Assert)
+ messageText = this._format(this._parameters);
+ else
+ messageText = document.createTextNode(this._messageText);
+
+ var content = document.createElement("div");
+ this._addMessageHeader(content, messageText);
+ root = new TreeElement(content, null, true);
+ content.treeElementForTest = root;
+ treeOutline.appendChild(root);
+ }
+
+ this._populateStackTraceTreeElement(root);
+ this.formattedMessage = ol;
break;
case WebInspector.ConsoleMessage.MessageType.Object:
- this.formattedMessage = this._format(["%O", args[0]]);
+ var obj = this._parameters ? this._parameters[0] : undefined;
+ this.formattedMessage = this._format(["%O", obj]);
break;
default:
+ var args = this._parameters || [this._messageText];
this.formattedMessage = this._format(args);
break;
}
@@ -822,34 +849,52 @@ WebInspector.ConsoleMessage.prototype = {
return element;
}
- if (this.url && this.url !== "undefined") {
- var urlElement = document.createElement("a");
- urlElement.className = "console-message-url webkit-html-resource-link";
- urlElement.href = this.url;
- urlElement.lineNumber = this.line;
+ if (this.type === WebInspector.ConsoleMessage.MessageType.Trace ||
+ this.type === WebInspector.ConsoleMessage.MessageType.Assert ||
+ this.type === WebInspector.ConsoleMessage.MessageType.UncaughtException)
+ element.appendChild(this.formattedMessage);
+ else
+ this._addMessageHeader(element, this.formattedMessage);
+
+ if (this.repeatCount > 1)
+ this._updateRepeatCount();
+
+ return element;
+ },
+
+ _populateStackTraceTreeElement: function(parentTreeElement)
+ {
+ for (var i = 0; i < this._stackTrace.length; i++) {
+ var frame = this._stackTrace[i];
- if (this.source === WebInspector.ConsoleMessage.MessageSource.JS)
- urlElement.preferredPanel = "scripts";
+ var content = document.createElement("div");
+ var messageTextElement = document.createElement("span");
+ messageTextElement.className = "console-message-text source-code";
+ var functionName = frame.functionName || WebInspector.UIString("(anonymous function)");
+ messageTextElement.appendChild(document.createTextNode(functionName));
+ content.appendChild(messageTextElement);
- if (this.line > 0)
- urlElement.textContent = WebInspector.displayNameForURL(this.url) + ":" + this.line;
- else
- urlElement.textContent = WebInspector.displayNameForURL(this.url);
+ var urlElement = WebInspector.linkifyResourceAsNode(frame.sourceURL, "scripts", frame.lineNumber, "console-message-url");
+ content.appendChild(urlElement);
- element.appendChild(urlElement);
+ var treeElement = new TreeElement(content);
+ parentTreeElement.appendChild(treeElement);
+ }
+ },
+
+ _addMessageHeader: function(parentElement, formattedMessage)
+ {
+ if (this.url && this.url !== "undefined") {
+ var urlElement = WebInspector.linkifyResourceAsNode(this.url, "scripts", this.line, "console-message-url");
+ parentElement.appendChild(urlElement);
}
var messageTextElement = document.createElement("span");
messageTextElement.className = "console-message-text source-code";
if (this.type === WebInspector.ConsoleMessage.MessageType.Assert)
messageTextElement.appendChild(document.createTextNode(WebInspector.UIString("Assertion failed: ")));
- messageTextElement.appendChild(this.formattedMessage);
- element.appendChild(messageTextElement);
-
- if (this.repeatCount > 1)
- this._updateRepeatCount();
-
- return element;
+ messageTextElement.appendChild(formattedMessage);
+ parentElement.appendChild(messageTextElement);
},
_updateRepeatCount: function() {
@@ -890,6 +935,7 @@ WebInspector.ConsoleMessage.prototype = {
var typeString;
switch (this.type) {
case WebInspector.ConsoleMessage.MessageType.Log:
+ case WebInspector.ConsoleMessage.MessageType.UncaughtException:
typeString = "Log";
break;
case WebInspector.ConsoleMessage.MessageType.Object:
@@ -969,7 +1015,8 @@ WebInspector.ConsoleMessage.MessageType = {
StartGroupCollapsed: 4,
EndGroup: 5,
Assert: 6,
- Result: 7
+ UncaughtException: 7,
+ Result: 8
}
WebInspector.ConsoleMessage.MessageLevel = {
@@ -1001,14 +1048,6 @@ WebInspector.ConsoleCommand.prototype = {
}
}
-WebInspector.ConsoleTextMessage = function(text, level)
-{
- level = level || WebInspector.ConsoleMessage.MessageLevel.Log;
- WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, null, 1, text);
-}
-
-WebInspector.ConsoleTextMessage.prototype.__proto__ = WebInspector.ConsoleMessage.prototype;
-
WebInspector.ConsoleCommandResult = function(result, exception, originatingCommand)
{
var level = (exception ? WebInspector.ConsoleMessage.MessageLevel.Error : WebInspector.ConsoleMessage.MessageLevel.Log);
@@ -1023,7 +1062,7 @@ WebInspector.ConsoleCommandResult = function(result, exception, originatingComma
this.originatingCommand = originatingCommand;
- WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, line, url, null, 1, message);
+ WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, line, url, null, 1, null, [message]);
}
WebInspector.ConsoleCommandResult.prototype = {
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index cd7cbd2..48eb4c0 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -99,7 +99,7 @@ WebInspector.ElementsPanel = function()
this.sidebarResizeElement.addEventListener("mousedown", this.rightSidebarResizerDragStart.bind(this), false);
this._nodeSearchButton = new WebInspector.StatusBarButton(WebInspector.UIString("Select an element in the page to inspect it."), "node-search-status-bar-item");
- this._nodeSearchButton.addEventListener("click", this._nodeSearchButtonClicked.bind(this), false);
+ this._nodeSearchButton.addEventListener("click", this.toggleSearchingForNode.bind(this), false);
this.element.appendChild(this.contentElement);
this.element.appendChild(this.sidebarElement);
@@ -453,7 +453,7 @@ WebInspector.ElementsPanel.prototype = {
}
WebInspector.showConsole();
- WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(builder.join("\n")));
+ WebInspector.console.addMessage(WebInspector.ConsoleMessage.createTextMessage(builder.join("\n")));
},
get rootDOMNode()
@@ -1092,7 +1092,7 @@ WebInspector.ElementsPanel.prototype = {
var isNodeSearchKey = event.ctrlKey && !event.metaKey && !event.altKey && event.shiftKey;
if (isNodeSearchKey) {
- this._nodeSearchButtonClicked(event);
+ this.toggleSearchingForNode();
event.handled = true;
return;
}
@@ -1136,7 +1136,7 @@ WebInspector.ElementsPanel.prototype = {
this.treeOutline.updateSelection();
},
- _nodeSearchButtonClicked: function(event)
+ toggleSearchingForNode: function()
{
if (!this._nodeSearchButton.toggled)
InspectorBackend.enableSearchingForNode();
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index 1b84b83..7247ba0 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -1205,8 +1205,9 @@ WebInspector.ElementsTreeElement.prototype = {
html += "=&#8203;\"";
if (linkify && (name === "src" || name === "href")) {
+ var rewrittenHref = this._rewriteAttrHref(node, value);
value = value.replace(/([\/;:\)\]\}])/g, "$1\u200B");
- html += linkify(this._rewriteAttrHref(node, value), value, "webkit-html-attribute-value", node.nodeName.toLowerCase() === "a");
+ html += linkify(rewrittenHref, value, "webkit-html-attribute-value", node.nodeName.toLowerCase() === "a");
} else {
value = value.escapeHTML().replace(/([\/;:\)\]\}])/g, "$1&#8203;");
html += "<span class=\"webkit-html-attribute-value\">" + value + "</span>";
diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js
index 5d9d065..9e16dad 100644
--- a/WebCore/inspector/front-end/InjectedScript.js
+++ b/WebCore/inspector/front-end/InjectedScript.js
@@ -544,6 +544,8 @@ InjectedScript._type = function(obj)
return "array";
if (obj instanceof inspectedWindow.HTMLCollection)
return "array";
+ if (inspectedWindow.jQuery && obj instanceof inspectedWindow.jQuery)
+ return "array";
if (obj instanceof inspectedWindow.Error)
return "error";
return type;
diff --git a/WebCore/inspector/front-end/InjectedScriptAccess.js b/WebCore/inspector/front-end/InjectedScriptAccess.js
index 90daab7..0e4cc2e 100644
--- a/WebCore/inspector/front-end/InjectedScriptAccess.js
+++ b/WebCore/inspector/front-end/InjectedScriptAccess.js
@@ -58,7 +58,7 @@ InjectedScriptAccess._installHandler = function(methodName, async)
if (!isException)
callback(result);
else
- WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage("Error dispatching: " + methodName));
+ WebInspector.console.addMessage(WebInspector.ConsoleMessage.createTextMessage("Error dispatching: " + methodName));
}
var callId = WebInspector.Callback.wrap(myCallback);
diff --git a/WebCore/inspector/front-end/InspectorBackendStub.js b/WebCore/inspector/front-end/InspectorBackendStub.js
index 761e876..857e026 100644
--- a/WebCore/inspector/front-end/InspectorBackendStub.js
+++ b/WebCore/inspector/front-end/InspectorBackendStub.js
@@ -184,7 +184,7 @@ WebInspector.InspectorBackendStub.prototype = {
this._breakpointsActivated = false;
},
- pauseInDebugger: function()
+ pause: function()
{
},
@@ -203,7 +203,7 @@ WebInspector.InspectorBackendStub.prototype = {
WebInspector.didGetScriptSource(callId, null);
},
- resumeDebugger: function()
+ resume: function()
{
},
@@ -243,15 +243,15 @@ WebInspector.InspectorBackendStub.prototype = {
return [];
},
- stepIntoStatementInDebugger: function()
+ stepIntoStatement: function()
{
},
- stepOutOfFunctionInDebugger: function()
+ stepOutOfFunction: function()
{
},
- stepOverStatementInDebugger: function()
+ stepOverStatement: function()
{
},
diff --git a/WebCore/inspector/front-end/Resource.js b/WebCore/inspector/front-end/Resource.js
index 2ae23a0..06a610d 100644
--- a/WebCore/inspector/front-end/Resource.js
+++ b/WebCore/inspector/front-end/Resource.js
@@ -308,6 +308,17 @@ WebInspector.Resource.prototype = {
}
},
+ get cached()
+ {
+ return this._cached;
+ },
+
+ set cached(x)
+ {
+ this._cached = x;
+ this.dispatchEventToListeners("cached changed");
+ },
+
get mimeType()
{
return this._mimeType;
@@ -587,9 +598,14 @@ WebInspector.Resource.prototype = {
if (!this._mimeTypeIsConsistentWithType())
msg = new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,
WebInspector.ConsoleMessage.MessageType.Log,
- WebInspector.ConsoleMessage.MessageLevel.Warning, -1, this.url, null, 1,
- String.sprintf(WebInspector.Warnings.IncorrectMIMEType.message,
- WebInspector.Resource.Type.toString(this.type), this.mimeType));
+ WebInspector.ConsoleMessage.MessageLevel.Warning,
+ -1,
+ this.url,
+ null,
+ 1,
+ String.sprintf(WebInspector.Warnings.IncorrectMIMEType.message, WebInspector.Resource.Type.toString(this.type), this.mimeType),
+ null,
+ null);
break;
}
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 8af1505..b02a277 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -228,7 +228,7 @@ WebInspector.ResourcesPanel.prototype = {
var resourcesLength = this._resources.length;
for (var i = 0; i < resourcesLength; ++i) {
var resource = this._resources[i];
- if (!resource._itemsTreeElement)
+ if (!resource._itemsTreeElement || !resource._itemsTreeElement.selectable)
continue;
var resourceView = this.resourceViewForResource(resource);
if (!resourceView.performSearch || resourceView === visibleView)
@@ -751,13 +751,49 @@ WebInspector.ResourcesPanel.prototype = {
{
var tableElement = document.createElement("table");
var resource = anchor.parentElement.resource;
- var data = [WebInspector.UIString("Blocking"), resource.timing.requestTime === 0 ? "?" : Number.secondsToString(Math.max(resource.timing.requestTime - resource.startTime, 0)),
- WebInspector.UIString("Proxy"), resource.timing.proxyDuration == -1 ? WebInspector.UIString("(none)") : Number.secondsToString(resource.timing.proxyDuration),
- WebInspector.UIString("DNS Lookup"), resource.timing.dnsDuration == -1 ? WebInspector.UIString("(reused)") : Number.secondsToString(resource.timing.dnsDuration),
- WebInspector.UIString("Connecting"), resource.timing.connectDuration == -1 ? WebInspector.UIString("(reused)") : Number.secondsToString(resource.timing.connectDuration),
- WebInspector.UIString("Sending"), Number.secondsToString(resource.timing.sendDuration),
- WebInspector.UIString("Waiting"), Number.secondsToString(resource.timing.waitDuration),
- WebInspector.UIString("Receiving"), Number.secondsToString(resource.endTime - resource.responseReceivedTime)];
+ var data = [];
+
+ if (resource.timing.proxyDuration !== -1) {
+ data.push(WebInspector.UIString("Proxy"));
+ data.push(Number.secondsToString(resource.timing.proxyDuration));
+ }
+
+ if (resource.timing.dnsDuration !== -1) {
+ data.push(WebInspector.UIString("DNS Lookup"));
+ data.push(Number.secondsToString(resource.timing.dnsDuration));
+ }
+
+ if (resource.timing.connectDuration !== -1) {
+ if (resource.connectionReused) {
+ data.push(WebInspector.UIString("Blocking"));
+ data.push(Number.secondsToString(resource.timing.connectDuration));
+ } else {
+ data.push(WebInspector.UIString("Connecting"));
+ // Connection includes DNS, subtract it here.
+ var connectDuration = resource.timing.connectDuration;
+ if (resource.timing.dnsDuration !== -1)
+ connectDuration -= resource.timing.dnsDuration;
+ data.push(Number.secondsToString(connectDuration));
+ }
+ }
+
+ if (resource.timing.sslDuration !== -1) {
+ data.push(WebInspector.UIString("SSL"));
+ data.push(Number.secondsToString(resource.timing.sslDuration));
+ }
+
+ data.push(WebInspector.UIString("Sending"));
+ data.push(Number.secondsToString(resource.timing.sendDuration));
+
+ data.push(WebInspector.UIString("Waiting"));
+ // Waiting includes SSL, subtract it here.
+ var waitDuration = resource.timing.waitDuration;
+ if (resource.timing.sslDuration !== -1)
+ waitDuration -= resource.timing.sslDuration;
+ data.push(Number.secondsToString(waitDuration));
+
+ data.push(WebInspector.UIString("Receiving"));
+ data.push(Number.secondsToString(resource.endTime - resource.responseReceivedTime));
for (var i = 0; i < data.length; i += 2) {
var tr = document.createElement("tr");
@@ -1252,8 +1288,7 @@ WebInspector.ResourceGraph = function(resource)
this._graphElement.className = "resources-graph-side";
this._graphElement.addEventListener("mouseover", this.refreshLabelPositions.bind(this), false);
- if (resource.cached)
- this._graphElement.addStyleClass("resource-cached");
+ this._cachedChanged();
this._barAreaElement = document.createElement("div");
this._barAreaElement.className = "resources-graph-bar-area hidden";
@@ -1277,6 +1312,8 @@ WebInspector.ResourceGraph = function(resource)
this._barAreaElement.appendChild(this._labelRightElement);
this._graphElement.addStyleClass("resources-category-" + resource.category.name);
+
+ resource.addEventListener("cached changed", this._cachedChanged, this);
}
WebInspector.ResourceGraph.prototype = {
@@ -1400,5 +1437,11 @@ WebInspector.ResourceGraph.prototype = {
this._labelLeftElement.title = tooltip;
this._labelRightElement.title = tooltip;
this._barRightElement.title = tooltip;
+ },
+
+ _cachedChanged: function()
+ {
+ if (this.resource.cached)
+ this._graphElement.addStyleClass("resource-cached");
}
}
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 3c4a0be..7a1a4d5 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -158,6 +158,8 @@ WebInspector.ScriptsPanel = function()
this.enableToggleButton = new WebInspector.StatusBarButton("", "enable-toggle-status-bar-item");
this.enableToggleButton.addEventListener("click", this._toggleDebugging.bind(this), false);
+ if (Preferences.debuggerAlwaysEnabled)
+ this.enableToggleButton.element.addStyleClass("hidden");
this._pauseOnExceptionButton = new WebInspector.StatusBarButton("", "scripts-pause-on-exceptions-status-bar-item", 3);
this._pauseOnExceptionButton.addEventListener("click", this._togglePauseOnExceptions.bind(this), false);
@@ -931,11 +933,11 @@ WebInspector.ScriptsPanel.prototype = {
if (this._paused) {
this._paused = false;
this._waitingToPause = false;
- InspectorBackend.resumeDebugger();
+ InspectorBackend.resume();
} else {
this._stepping = false;
this._waitingToPause = true;
- InspectorBackend.pauseInDebugger();
+ InspectorBackend.pause();
}
this._clearInterface();
@@ -948,7 +950,7 @@ WebInspector.ScriptsPanel.prototype = {
this._clearInterface();
- InspectorBackend.stepOverStatementInDebugger();
+ InspectorBackend.stepOverStatement();
},
_stepIntoClicked: function()
@@ -958,7 +960,7 @@ WebInspector.ScriptsPanel.prototype = {
this._clearInterface();
- InspectorBackend.stepIntoStatementInDebugger();
+ InspectorBackend.stepIntoStatement();
},
_stepOutClicked: function()
@@ -968,7 +970,7 @@ WebInspector.ScriptsPanel.prototype = {
this._clearInterface();
- InspectorBackend.stepOutOfFunctionInDebugger();
+ InspectorBackend.stepOutOfFunction();
},
_toggleBreakpointsClicked: function()
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index 11f456c..39c1e1e 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -42,7 +42,8 @@ var Preferences = {
showColorNicknames: true,
debuggerAlwaysEnabled: false,
profilerAlwaysEnabled: false,
- auditsPanelEnabled: true
+ auditsPanelEnabled: true,
+ appCacheEnabled: true
}
WebInspector.populateApplicationSettings = function(settingsString)
diff --git a/WebCore/inspector/front-end/SourceCSSTokenizer.js b/WebCore/inspector/front-end/SourceCSSTokenizer.js
index 1d8a784..2179982 100644
--- a/WebCore/inspector/front-end/SourceCSSTokenizer.js
+++ b/WebCore/inspector/front-end/SourceCSSTokenizer.js
@@ -73,8 +73,10 @@ WebInspector.SourceCSSTokenizer = function()
"-webkit-animation-iteration-count", "-webkit-animation-name", "-webkit-animation-play-state",
"-webkit-animation-timing-function", "-webkit-appearance", "-webkit-backface-visibility",
"-webkit-background-clip", "-webkit-background-composite", "-webkit-background-origin", "-webkit-background-size",
- "-webkit-binding", "-webkit-border-fit", "-webkit-border-horizontal-spacing", "-webkit-border-image",
- "-webkit-border-radius", "-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-direction",
+ "-webkit-binding", "-webkit-border-end", "-webkit-border-end-color", "-webkit-border-end-style", "-webkit-border-end-width",
+ "-webkit-border-fit", "-webkit-border-horizontal-spacing", "-webkit-border-image",
+ "-webkit-border-radius", "-webkit-border-start", "-webkit-border-start-color", "-webkit-border-start-style",
+ "-webkit-border-start-width","-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-direction",
"-webkit-box-flex", "-webkit-box-flex-group", "-webkit-box-lines", "-webkit-box-ordinal-group",
"-webkit-box-orient", "-webkit-box-pack", "-webkit-box-reflect", "-webkit-box-shadow", "-webkit-box-sizing",
"-webkit-column-break-after", "-webkit-column-break-before", "-webkit-column-break-inside", "-webkit-column-count",
diff --git a/WebCore/inspector/front-end/StoragePanel.js b/WebCore/inspector/front-end/StoragePanel.js
index 2733907..03a099f 100644
--- a/WebCore/inspector/front-end/StoragePanel.js
+++ b/WebCore/inspector/front-end/StoragePanel.js
@@ -49,9 +49,11 @@ WebInspector.StoragePanel = function(database)
this.sidebarTree.appendChild(this.cookieListTreeElement);
this.cookieListTreeElement.expand();
- this.applicationCacheListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("APPLICATION CACHE"), {}, true);
- this.sidebarTree.appendChild(this.applicationCacheListTreeElement);
- this.applicationCacheListTreeElement.expand();
+ if (Preferences.appCacheEnabled) {
+ this.applicationCacheListTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("APPLICATION CACHE"), {}, true);
+ this.sidebarTree.appendChild(this.applicationCacheListTreeElement);
+ this.applicationCacheListTreeElement.expand();
+ }
this.storageViews = document.createElement("div");
this.storageViews.id = "storage-views";
@@ -108,7 +110,9 @@ WebInspector.StoragePanel.prototype = {
this.localStorageListTreeElement.removeChildren();
this.sessionStorageListTreeElement.removeChildren();
this.cookieListTreeElement.removeChildren();
- this.applicationCacheListTreeElement.removeChildren();
+
+ if (Preferences.appCacheEnabled)
+ this.applicationCacheListTreeElement.removeChildren();
this.storageViews.removeChildren();
@@ -146,6 +150,8 @@ WebInspector.StoragePanel.prototype = {
addApplicationCache: function(domain)
{
+ if (!Preferences.appCacheEnabled)
+ return;
var applicationCacheTreeElement = new WebInspector.ApplicationCacheSidebarTreeElement(domain);
this.applicationCacheListTreeElement.appendChild(applicationCacheTreeElement);
},
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index 1f12625..8900d8d 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -841,10 +841,8 @@ WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, pane
this._selfTime = this.endTime - this.startTime;
this._lastChildEndTime = this.endTime;
this.originalRecordForTests = record;
- if (record.stackTrace && record.stackTrace.length) {
- this.callerScriptName = record.stackTrace[0].scriptName;
- this.callerScriptLine = record.stackTrace[0].lineNumber;
- }
+ if (record.stackTrace && record.stackTrace.length)
+ this.stackTrace = record.stackTrace;
this.totalHeapSize = record.totalHeapSize;
this.usedHeapSize = record.usedHeapSize;
@@ -877,8 +875,7 @@ WebInspector.TimelinePanel.FormattedRecord = function(record, parentRecord, pane
} else if (record.type === recordTypes.TimerFire) {
var timerInstalledRecord = panel._timerRecords[record.data.timerId];
if (timerInstalledRecord) {
- this.callSiteScriptName = timerInstalledRecord.callerScriptName;
- this.callSiteScriptLine = timerInstalledRecord.callerScriptLine;
+ this.callSiteStackTrace = timerInstalledRecord.stackTrace;
this.timeout = timerInstalledRecord.timeout;
this.singleShot = timerInstalledRecord.singleShot;
}
@@ -940,8 +937,6 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = {
contentHelper._appendTextRow(WebInspector.UIString("Timeout"), Number.secondsToString(this.timeout / 1000, WebInspector.UIString));
contentHelper._appendTextRow(WebInspector.UIString("Repeats"), !this.singleShot);
}
- if (typeof this.callSiteScriptLine === "number")
- contentHelper._appendLinkRow(WebInspector.UIString("Call Site"), this.callSiteScriptName, this.callSiteScriptLine);
break;
case recordTypes.FunctionCall:
contentHelper._appendLinkRow(WebInspector.UIString("Location"), this.data.scriptName, this.data.scriptLine);
@@ -979,12 +974,15 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = {
if (this.data.scriptName && this.type !== recordTypes.FunctionCall)
contentHelper._appendLinkRow(WebInspector.UIString("Function Call"), this.data.scriptName, this.data.scriptLine);
- if (this.callerScriptName && this.type !== recordTypes.GCEvent)
- contentHelper._appendLinkRow(WebInspector.UIString("Caller"), this.callerScriptName, this.callerScriptLine);
-
if (this.usedHeapSize)
contentHelper._appendTextRow(WebInspector.UIString("Used Heap Size"), WebInspector.UIString("%s of %s", Number.bytesToString(this.usedHeapSize, WebInspector.UIString), Number.bytesToString(this.totalHeapSize, WebInspector.UIString)));
+ if (this.callSiteStackTrace && this.callSiteStackTrace.length)
+ contentHelper._appendStackTrace(WebInspector.UIString("Call Site stack"), this.callSiteStackTrace);
+
+ if (this.stackTrace)
+ contentHelper._appendStackTrace(WebInspector.UIString("Call Stack"), this.stackTrace);
+
return contentHelper._contentTable;
},
@@ -1003,10 +1001,10 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = {
return record.data.width + "\u2009\u00d7\u2009" + record.data.height;
case WebInspector.TimelineAgent.RecordType.TimerInstall:
case WebInspector.TimelineAgent.RecordType.TimerRemove:
- return this.callerScriptName ? WebInspector.linkifyResourceAsNode(this.callerScriptName, "scripts", this.callerScriptLine, "", "") : record.data.timerId;
+ return this.stackTrace ? WebInspector.linkifyResourceAsNode(this.stackTrace[0].scriptName, "scripts", this.stackTrace[0].lineNumber, "", "") : record.data.timerId;
case WebInspector.TimelineAgent.RecordType.ParseHTML:
case WebInspector.TimelineAgent.RecordType.RecalculateStyles:
- return this.callerScriptName ? WebInspector.linkifyResourceAsNode(this.callerScriptName, "scripts", this.callerScriptLine, "", "") : null;
+ return this.stackTrace ? WebInspector.linkifyResourceAsNode(this.stackTrace[0].scriptName, "scripts", this.stackTrace[0].lineNumber, "", "") : null;
case WebInspector.TimelineAgent.RecordType.EvaluateScript:
return record.data.url ? WebInspector.linkifyResourceAsNode(record.data.url, "scripts", record.data.lineNumber, "", "") : null;
case WebInspector.TimelineAgent.RecordType.XHRReadyStateChange:
@@ -1075,11 +1073,15 @@ WebInspector.TimelinePanel.PopupContentHelper.prototype = {
this._contentTable.appendChild(row);
},
- _appendElementRow: function(title, content)
+ _appendElementRow: function(title, content, titleStyle)
{
var row = document.createElement("tr");
- row.appendChild(this._createCell(title, "timeline-details-row-title"));
+ var titleCell = this._createCell(title, "timeline-details-row-title");
+ if (titleStyle)
+ titleCell.addStyleClass(titleStyle);
+ row.appendChild(titleCell);
var cell = document.createElement("td");
+ cell.className = "timeline-details";
cell.appendChild(content);
row.appendChild(cell);
this._contentTable.appendChild(row);
@@ -1089,6 +1091,24 @@ WebInspector.TimelinePanel.PopupContentHelper.prototype = {
{
var link = WebInspector.linkifyResourceAsNode(scriptName, "scripts", scriptLine, "timeline-details");
this._appendElementRow(title, link);
+ },
+
+ _appendStackTrace: function(title, stackTrace)
+ {
+ this._appendTextRow("", "");
+ var framesTable = document.createElement("table");
+ for (var i = 0; i < stackTrace.length; ++i) {
+ var stackFrame = stackTrace[i];
+ var row = document.createElement("tr");
+ row.className = "timeline-details";
+ row.appendChild(this._createCell(stackFrame.functionName ? stackFrame.functionName : WebInspector.UIString("(anonymous function)"), "timeline-function-name"));
+ row.appendChild(this._createCell(" @ "));
+ var linkCell = document.createElement("td");
+ linkCell.appendChild(WebInspector.linkifyResourceAsNode(stackFrame.scriptName, "scripts", stackFrame.lineNumber, "timeline-details"));
+ row.appendChild(linkCell);
+ framesTable.appendChild(row);
+ }
+ this._appendElementRow(title, framesTable, "timeline-stacktrace-title");
}
}
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index d8e29e8..f1ee49f 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -711,6 +711,11 @@ body.platform-linux .monospace, body.platform-linux .source-code {
content: url(Images/treeDownTriangleBlack.png);
}
+.console-message.repeated-message > ol.stack-trace {
+ margin-top: -14px;
+ margin-left: 18px;
+}
+
.console-group-messages .section .header .title {
color: black;
font-weight: normal;
@@ -1164,6 +1169,7 @@ body.platform-linux .monospace, body.platform-linux .source-code {
margin-left: -12px;
}
+.stack-trace li.parent::before,
.outline-disclosure li.parent::before {
content: url(Images/treeRightTriangleBlack.png);
float: left;
@@ -1173,26 +1179,32 @@ body.platform-linux .monospace, body.platform-linux .source-code {
padding-right: 2px;
}
+.stack-trace li.parent::before,
.outline-disclosure li.parent::before {
content: url(Images/treeRightTriangleBlack.png);
}
+.stack-trace ol:focus li.parent.selected::before,
.outline-disclosure ol:focus li.parent.selected::before {
content: url(Images/treeRightTriangleWhite.png);
}
+.stack-trace li.parent.expanded::before,
.outline-disclosure li.parent.expanded::before {
content: url(Images/treeDownTriangleBlack.png);
}
+.stack-trace ol:focus li.parent.expanded.selected::before,
.outline-disclosure ol:focus li.parent.expanded.selected::before {
content: url(Images/treeDownTriangleWhite.png);
}
+.stack-trace ol.children,
.outline-disclosure ol.children {
display: none;
}
+.stack-trace ol.children.expanded,
.outline-disclosure ol.children.expanded {
display: block;
}
@@ -1372,14 +1384,18 @@ body.inactive .placard.selected {
margin-left: 1px;
}
-.section .properties ol, .event-properties ol {
+.section .properties ol, .event-properties ol, .stack-trace ol, ol.stack-trace {
display: none;
margin: 0;
-webkit-padding-start: 12px;
list-style: none;
}
-.section .properties ol.expanded, .event-properties ol.expanded {
+ol.stack-trace {
+ -webkit-padding-start: 0px;
+}
+
+.section .properties ol.expanded, .event-properties ol.expanded, .stack-trace ol, ol.stack-trace {
display: block;
}
@@ -1474,7 +1490,7 @@ body.inactive .placard.selected {
outline: 1px solid rgb(66%, 66%, 66%) !important;
background-color: white;
-webkit-user-modify: read-write-plaintext-only;
- text-overflow: clip;
+ text-overflow: clip !important;
padding-left: 2px;
margin-left: -2px;
padding-right: 2px;
@@ -3677,6 +3693,15 @@ body.inactive .sidebar-tree-item.selected .bubble.search-matches {
.timeline-details {
-webkit-user-select: text;
+ vertical-align: top;
+}
+
+.timeline-function-name {
+ text-align: right;
+}
+
+.timeline-stacktrace-title {
+ padding-top: 4px;
}
.timeline-details-row-title {
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 89d1ae0..5ec7081 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -1071,6 +1071,14 @@ WebInspector.elementDragEnd = function(event)
event.preventDefault();
}
+WebInspector.toggleSearchingForNode = function()
+{
+ if (this.panels.elements) {
+ this.showElementsPanel();
+ this.panels.elements.toggleSearchingForNode();
+ }
+}
+
WebInspector.showConsole = function()
{
this.drawer.showView(this.console);
@@ -1159,7 +1167,6 @@ WebInspector.updateResource = function(identifier, payload)
resource.mainResource = payload.mainResource;
resource.requestMethod = payload.requestMethod;
resource.requestFormData = payload.requestFormData;
- resource.cached = payload.cached;
resource.documentURL = payload.documentURL;
if (resource.mainResource)
@@ -1182,7 +1189,9 @@ WebInspector.updateResource = function(identifier, payload)
resource.suggestedFilename = payload.suggestedFilename;
resource.responseHeaders = payload.responseHeaders;
resource.connectionID = payload.connectionID;
+ resource.connectionReused = payload.connectionReused;
resource.timing = payload.timing;
+ resource.cached = payload.cached;
}
if (payload.didTypeChange) {
@@ -1455,10 +1464,10 @@ WebInspector.didCommitLoad = function()
WebInspector.updateConsoleMessageExpiredCount = function(count)
{
var message = String.sprintf(WebInspector.UIString("%d console messages are not shown."), count);
- WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning));
+ WebInspector.console.addMessage(WebInspector.ConsoleMessage.createTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning));
}
-WebInspector.addConsoleMessage = function(payload, opt_args)
+WebInspector.addConsoleMessage = function(payload)
{
var consoleMessage = new WebInspector.ConsoleMessage(
payload.source,
@@ -1467,8 +1476,10 @@ WebInspector.addConsoleMessage = function(payload, opt_args)
payload.line,
payload.url,
payload.groupLevel,
- payload.repeatCount);
- consoleMessage.setMessageBody(Array.prototype.slice.call(arguments, 1));
+ payload.repeatCount,
+ payload.message,
+ payload.parameters,
+ payload.stackTrace);
this.console.addMessage(consoleMessage);
}
@@ -1536,7 +1547,9 @@ WebInspector.log = function(message, messageLevel)
null,
null,
repeatCount,
- message);
+ null,
+ [message],
+ null);
self.console.addMessage(msg);
}
@@ -1830,8 +1843,12 @@ WebInspector._searchKeyDown = function(event)
WebInspector.performSearch = function(event)
{
- var query = event.target.value;
var forceSearch = event.keyIdentifier === "Enter";
+ this.doPerformSearch(event.target.value, forceSearch, event.shiftKey, false);
+}
+
+WebInspector.doPerformSearch = function(query, forceSearch, isBackwardSearch, repeatSearch)
+{
var isShortSearch = (query.length < 3);
// Clear a leftover short search flag due to a non-conflicting forced search.
@@ -1863,11 +1880,15 @@ WebInspector.performSearch = function(event)
return;
}
- if (query === this.currentPanel.currentQuery && this.currentPanel.currentQuery === this.currentQuery) {
+ if (!repeatSearch && query === this.currentPanel.currentQuery && this.currentPanel.currentQuery === this.currentQuery) {
// When this is the same query and a forced search, jump to the next
// search result for a good user experience.
- if (forceSearch && this.currentPanel.jumpToNextSearchResult)
- this.currentPanel.jumpToNextSearchResult();
+ if (forceSearch) {
+ if (!isBackwardSearch && this.currentPanel.jumpToNextSearchResult)
+ this.currentPanel.jumpToNextSearchResult();
+ else if (isBackwardSearch && this.currentPanel.jumpToPreviousSearchResult)
+ this.currentPanel.jumpToPreviousSearchResult();
+ }
return;
}
diff --git a/WebCore/inspector/front-end/treeoutline.js b/WebCore/inspector/front-end/treeoutline.js
index 297bbab..5891401 100644
--- a/WebCore/inspector/front-end/treeoutline.js
+++ b/WebCore/inspector/front-end/treeoutline.js
@@ -482,8 +482,7 @@ TreeElement.prototype = {
set title(x) {
this._title = x;
- if (this._listItemNode)
- this._listItemNode.innerHTML = x;
+ this._setListItemNodeContent();
},
get tooltip() {
@@ -548,6 +547,20 @@ TreeElement.prototype = {
this._shouldRefreshChildren = x;
if (x && this.expanded)
this.expand();
+ },
+
+ _setListItemNodeContent: function()
+ {
+ if (!this._listItemNode)
+ return;
+ if (!this._title || typeof this._title === "string")
+ this._listItemNode.innerHTML = this._title;
+ else {
+ this._listItemNode.removeChildren();
+ if (this._title.parentNode)
+ this._title.parentNode.removeChild(this._title);
+ this._listItemNode.appendChild(this._title);
+ }
}
}
@@ -566,7 +579,7 @@ TreeElement.prototype._attach = function()
this._listItemNode = this.treeOutline._childrenListNode.ownerDocument.createElement("li");
this._listItemNode.treeElement = this;
- this._listItemNode.innerHTML = this._title;
+ this._setListItemNodeContent();
this._listItemNode.title = this._tooltip ? this._tooltip : "";
if (this.hidden)
diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js
index 1312e5b..6e7c725 100644
--- a/WebCore/inspector/front-end/utilities.js
+++ b/WebCore/inspector/front-end/utilities.js
@@ -188,8 +188,9 @@ Element.prototype.removeStyleClass = function(className)
if (index === -1)
return;
- var newClassName = " " + this.className + " ";
- this.className = newClassName.replace(" " + className + " ", " ");
+ this.className = this.className.split(" ").filter(function(s) {
+ return s && s !== className;
+ }).join(" ");
}
Element.prototype.removeMatchingStyleClasses = function(classNameRegex)
diff --git a/WebCore/loader/CachedScript.cpp b/WebCore/loader/CachedScript.cpp
index e3d618a..58895d6 100644
--- a/WebCore/loader/CachedScript.cpp
+++ b/WebCore/loader/CachedScript.cpp
@@ -37,7 +37,6 @@ namespace WebCore {
CachedScript::CachedScript(const String& url, const String& charset)
: CachedResource(url, Script)
- , m_scriptHasBOMs(SourceCouldHaveBOMs)
, m_decoder(TextResourceDecoder::create("application/javascript", charset))
, m_decodedDataDeletionTimer(this, &CachedScript::decodedDataDeletionTimerFired)
{
@@ -73,14 +72,8 @@ const String& CachedScript::script()
if (!m_script && m_data) {
m_script = m_decoder->decode(m_data->data(), encodedSize());
m_script += m_decoder->flush();
- if (m_scriptHasBOMs != SourceHasNoBOMs && m_script.length()) {
- bool hasBOMs = false;
- m_script = String(m_script.impl()->copyStringWithoutBOMs(m_scriptHasBOMs == SourceHasBOMs, hasBOMs));
- m_scriptHasBOMs = hasBOMs ? SourceHasBOMs : SourceHasNoBOMs;
- }
setDecodedSize(m_script.length() * sizeof(UChar));
}
-
m_decodedDataDeletionTimer.startOneShot(0);
return m_script;
}
diff --git a/WebCore/loader/CachedScript.h b/WebCore/loader/CachedScript.h
index a36d735..beab508 100644
--- a/WebCore/loader/CachedScript.h
+++ b/WebCore/loader/CachedScript.h
@@ -56,7 +56,6 @@ namespace WebCore {
void decodedDataDeletionTimerFired(Timer<CachedScript>*);
String m_script;
- enum { SourceHasNoBOMs, SourceCouldHaveBOMs, SourceHasBOMs } m_scriptHasBOMs;
RefPtr<TextResourceDecoder> m_decoder;
Timer<CachedScript> m_decodedDataDeletionTimer;
};
diff --git a/WebCore/loader/DocumentLoader.h b/WebCore/loader/DocumentLoader.h
index ea6f58b..f5935c9 100644
--- a/WebCore/loader/DocumentLoader.h
+++ b/WebCore/loader/DocumentLoader.h
@@ -209,6 +209,8 @@ namespace WebCore {
void recordMemoryCacheLoadForFutureClientNotification(const String& url);
void takeMemoryCacheLoadsForClientNotification(Vector<String>& loads);
+ DocumentLoadTiming* timing() { return &m_documentLoadTiming; }
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); }
#endif
@@ -300,6 +302,8 @@ namespace WebCore {
String m_clientRedirectSourceForHistory;
bool m_didCreateGlobalHistoryEntry;
+ DocumentLoadTiming m_documentLoadTiming;
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
friend class ApplicationCacheHost; // for substitute resource delivery
OwnPtr<ApplicationCacheHost> m_applicationCacheHost;
diff --git a/WebCore/loader/DocumentThreadableLoader.cpp b/WebCore/loader/DocumentThreadableLoader.cpp
index 4a7a88b..16f114d 100644
--- a/WebCore/loader/DocumentThreadableLoader.cpp
+++ b/WebCore/loader/DocumentThreadableLoader.cpp
@@ -37,10 +37,12 @@
#include "Document.h"
#include "Frame.h"
#include "FrameLoader.h"
+#include "ResourceHandle.h"
#include "ResourceRequest.h"
#include "SecurityOrigin.h"
#include "SubresourceLoader.h"
#include "ThreadableLoaderClient.h"
+#include <wtf/UnusedParam.h>
namespace WebCore {
@@ -264,14 +266,20 @@ bool DocumentThreadableLoader::getShouldUseCredentialStorage(SubresourceLoader*
return false; // Only FrameLoaderClient can ultimately permit credential use.
}
-void DocumentThreadableLoader::didReceiveAuthenticationChallenge(SubresourceLoader* loader, const AuthenticationChallenge&)
+void DocumentThreadableLoader::didReceiveAuthenticationChallenge(SubresourceLoader* loader, const AuthenticationChallenge& challenge)
{
ASSERT(loader == m_loader);
// Users are not prompted for credentials for cross-origin requests.
if (!m_sameOriginRequest) {
+#if PLATFORM(MAC) || USE(CFNETWORK) || USE(CURL)
+ loader->handle()->receivedRequestToContinueWithoutCredential(challenge);
+#else
+ // These platforms don't provide a way to continue without credentials, cancel the load altogether.
+ UNUSED_PARAM(challenge);
RefPtr<DocumentThreadableLoader> protect(this);
m_client->didFail(loader->blockedError());
cancel();
+#endif
}
}
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 869de22..aab30fc 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -157,7 +157,7 @@ public:
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
- virtual bool setCursor(PlatformCursorHandle) { return false; }
+ virtual void setCursor(const Cursor&) { }
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
@@ -170,6 +170,9 @@ public:
virtual void scheduleCompositingLayerSync() {};
#endif
+#if PLATFORM(WIN)
+ virtual void setLastSetCursorToCurrentCursor() { }
+#endif
#if ENABLE(TOUCH_EVENTS)
virtual void needTouchEvents(bool) { }
#endif
@@ -309,6 +312,8 @@ public:
virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) { return 0; }
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
virtual PassRefPtr<Widget> createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&) { return 0; }
+ virtual void hideMediaPlayerProxyPlugin(Widget*) { }
+ virtual void showMediaPlayerProxyPlugin(Widget*) { }
#endif
virtual ObjectContentType objectContentType(const KURL&, const String&) { return ObjectContentType(); }
@@ -439,6 +444,7 @@ public:
virtual void showSpellingUI(bool) { }
virtual bool spellingUIIsShowing() { return false; }
virtual void getGuessesForWord(const String&, Vector<String>&) { }
+ virtual void willSetInputMethodState() { }
virtual void setInputMethodState(bool) { }
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index 7b7487f..0ec4c98 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -66,6 +66,9 @@
#endif // PLATFORM(ANDROID)
#include "HTMLAnchorElement.h"
#include "HTMLFormElement.h"
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#include "HTMLMediaElement.h"
+#endif
#include "HTMLNames.h"
#include "HTMLObjectElement.h"
#include "HTTPParsers.h"
@@ -104,11 +107,6 @@
#include <wtf/StdLibExtras.h>
#include <wtf/text/CString.h>
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-#include "HTMLMediaElement.h"
-#include "RenderVideo.h"
-#endif
-
#if ENABLE(SHARED_WORKERS)
#include "SharedWorkerRepository.h"
#endif
@@ -460,9 +458,18 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic
if (m_frame->domWindow()) {
if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide)
m_frame->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame->document()->inPageCache()), m_frame->document());
- if (!m_frame->document()->inPageCache())
+ if (!m_frame->document()->inPageCache()) {
m_frame->domWindow()->dispatchEvent(Event::create(eventNames().unloadEvent, false, false), m_frame->domWindow()->document());
- m_frameLoadTimeline.unloadEventEnd = currentTime();
+
+ if (m_provisionalDocumentLoader) {
+ DocumentLoadTiming* timing = m_provisionalDocumentLoader->timing();
+ ASSERT(timing->navigationStart);
+ // FIXME: This fails in Safari (https://bugs.webkit.org/show_bug.cgi?id=42772). Understand why.
+ // ASSERT(!timing->unloadEventEnd);
+ timing->unloadEventEnd = currentTime();
+ ASSERT(timing->unloadEventEnd >= timing->navigationStart);
+ }
+ }
}
m_pageDismissalEventBeingDispatched = false;
if (m_frame->document())
@@ -1531,9 +1538,6 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
if (m_pageDismissalEventBeingDispatched)
return;
- m_frameLoadTimeline = FrameLoadTimeline();
- m_frameLoadTimeline.navigationStart = currentTime();
-
policyChecker()->setLoadType(type);
RefPtr<FormState> formState = prpFormState;
bool isFormSubmission = formState;
@@ -2249,6 +2253,8 @@ void FrameLoader::finishedLoading()
RefPtr<Frame> protect(m_frame);
RefPtr<DocumentLoader> dl = activeDocumentLoader();
+ ASSERT(!dl->timing()->responseEnd);
+ dl->timing()->responseEnd = currentTime();
dl->finishedLoading();
if (!dl->mainDocumentError().isNull() || !dl->frameLoader())
return;
@@ -2367,6 +2373,9 @@ bool FrameLoader::subframeIsLoading() const
documentLoader = childLoader->provisionalDocumentLoader();
if (documentLoader && documentLoader->isLoadingInAPISense())
return true;
+ documentLoader = childLoader->policyDocumentLoader();
+ if (documentLoader)
+ return true;
}
return false;
}
@@ -2546,6 +2555,9 @@ void FrameLoader::continueLoadAfterWillSubmitForm()
notifier()->assignIdentifierToInitialRequest(identifier, m_provisionalDocumentLoader.get(), m_provisionalDocumentLoader->originalRequest());
}
+ ASSERT(!m_provisionalDocumentLoader->timing()->navigationStart);
+ m_provisionalDocumentLoader->timing()->navigationStart = currentTime();
+
if (!m_provisionalDocumentLoader->startLoadingMainResource(identifier))
m_provisionalDocumentLoader->updateLoading();
}
@@ -2649,8 +2661,6 @@ void FrameLoader::handledOnloadEvents()
{
m_client->dispatchDidHandleOnloadEvents();
- m_loadType = FrameLoadTypeStandard;
-
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
if (documentLoader())
documentLoader()->applicationCacheHost()->stopDeferringEvents();
@@ -2730,7 +2740,14 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
// 2. Delegates that modify the cache policy using willSendRequest: should
// not affect any other resources. Such changes need to be done
// per request.
- if (loadType == FrameLoadTypeReload) {
+ if (!mainResource) {
+ if (request.isConditional())
+ request.setCachePolicy(ReloadIgnoringCacheData);
+ else if (documentLoader()->isLoadingInAPISense())
+ request.setCachePolicy(documentLoader()->originalRequest().cachePolicy());
+ else
+ request.setCachePolicy(UseProtocolCachePolicy);
+ } else if (loadType == FrameLoadTypeReload) {
request.setCachePolicy(ReloadIgnoringCacheData);
request.setHTTPHeaderField("Cache-Control", "max-age=0");
} else if (loadType == FrameLoadTypeReloadFromOrigin) {
@@ -2739,10 +2756,8 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
request.setHTTPHeaderField("Pragma", "no-cache");
} else if (request.isConditional())
request.setCachePolicy(ReloadIgnoringCacheData);
- else if (isBackForwardLoadType(loadType) && !request.url().protocolIs("https"))
+ else if (isBackForwardLoadType(loadType) && m_stateMachine.committedFirstRealDocumentLoad() && !request.url().protocolIs("https"))
request.setCachePolicy(ReturnCacheDataElseLoad);
- else if (!mainResource && documentLoader()->isLoadingInAPISense())
- request.setCachePolicy(documentLoader()->originalRequest().cachePolicy());
if (mainResource)
request.setHTTPAccept(defaultAcceptHeader);
@@ -3038,7 +3053,7 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) && USE(JSC)
if (Page* page = m_frame->page()) {
if (page->mainFrame() == m_frame)
- page->inspectorController()->resumeDebugger();
+ page->inspectorController()->resume();
}
#endif
@@ -3114,14 +3129,13 @@ void FrameLoader::loadedResourceFromMemoryCache(const CachedResource* resource)
if (!page)
return;
-#if ENABLE(INSPECTOR)
- page->inspectorController()->didLoadResourceFromMemoryCache(m_documentLoader.get(), resource);
-#endif
-
if (!resource->sendResourceLoadCallbacks() || m_documentLoader->haveToldClientAboutLoad(resource->url()))
return;
if (!page->areMemoryCacheClientCallsEnabled()) {
+#if ENABLE(INSPECTOR)
+ page->inspectorController()->didLoadResourceFromMemoryCache(m_documentLoader.get(), resource);
+#endif
m_documentLoader->recordMemoryCacheLoadForFutureClientNotification(resource->url());
m_documentLoader->didTellClientAboutLoad(resource->url());
return;
@@ -3129,6 +3143,9 @@ void FrameLoader::loadedResourceFromMemoryCache(const CachedResource* resource)
ResourceRequest request(resource->url());
if (m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, resource->response(), resource->encodedSize())) {
+#if ENABLE(INSPECTOR)
+ page->inspectorController()->didLoadResourceFromMemoryCache(m_documentLoader.get(), resource);
+#endif
m_documentLoader->didTellClientAboutLoad(resource->url());
return;
}
@@ -3289,7 +3306,9 @@ void FrameLoader::navigateToDifferentDocument(HistoryItem* item, FrameLoadType l
case FrameLoadTypeBackWMLDeckNotAccessible:
case FrameLoadTypeForward:
case FrameLoadTypeIndexedBackForward:
- if (!itemURL.protocolIs("https"))
+ // If the first load within a frame is a navigation within a back/forward list that was attached
+ // without any of the items being loaded then we should use the default caching policy (<rdar://problem/8131355>).
+ if (m_stateMachine.committedFirstRealDocumentLoad() && !itemURL.protocolIs("https"))
request.setCachePolicy(ReturnCacheDataElseLoad);
break;
case FrameLoadTypeStandard:
diff --git a/WebCore/loader/FrameLoader.h b/WebCore/loader/FrameLoader.h
index 491e6ef..de043d2 100644
--- a/WebCore/loader/FrameLoader.h
+++ b/WebCore/loader/FrameLoader.h
@@ -197,7 +197,6 @@ public:
void didChangeIcons(DocumentLoader*);
FrameLoadType loadType() const;
- FrameLoadTimeline* frameLoadTimeline() { return &m_frameLoadTimeline; }
CachePolicy subresourceCachePolicy() const;
@@ -450,7 +449,6 @@ private:
FrameState m_state;
FrameLoadType m_loadType;
- FrameLoadTimeline m_frameLoadTimeline;
// Document loaders for the three phases of frame loading. Note that while
// a new request is being loaded, the old document loader may still be referenced.
diff --git a/WebCore/loader/FrameLoaderClient.h b/WebCore/loader/FrameLoaderClient.h
index c74933b..c7bd456 100644
--- a/WebCore/loader/FrameLoaderClient.h
+++ b/WebCore/loader/FrameLoaderClient.h
@@ -237,6 +237,8 @@ namespace WebCore {
virtual void dispatchDidFailToStartPlugin(const PluginView*) const { }
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
virtual PassRefPtr<Widget> createMediaPlayerProxyPlugin(const IntSize&, HTMLMediaElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&) = 0;
+ virtual void hideMediaPlayerProxyPlugin(Widget*) = 0;
+ virtual void showMediaPlayerProxyPlugin(Widget*) = 0;
#endif
virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0;
diff --git a/WebCore/loader/FrameLoaderTypes.h b/WebCore/loader/FrameLoaderTypes.h
index b1388a5..387b067 100644
--- a/WebCore/loader/FrameLoaderTypes.h
+++ b/WebCore/loader/FrameLoaderTypes.h
@@ -60,17 +60,28 @@ namespace WebCore {
FrameLoadTypeBackWMLDeckNotAccessible
};
- struct FrameLoadTimeline {
- FrameLoadTimeline()
- : navigationStart(0)
- , unloadEventEnd(0)
- , loadEventStart(0)
- , loadEventEnd(0)
+ // FIXME: Move to DocumentLoadTiming.h.
+ struct DocumentLoadTiming {
+ DocumentLoadTiming()
+ : navigationStart(0.0)
+ , unloadEventEnd(0.0)
+ , redirectStart(0.0)
+ , redirectEnd(0.0)
+ , redirectCount(0)
+ , fetchStart(0.0)
+ , responseEnd(0.0)
+ , loadEventStart(0.0)
+ , loadEventEnd(0.0)
{
}
double navigationStart;
double unloadEventEnd;
+ double redirectStart;
+ double redirectEnd;
+ short redirectCount;
+ double fetchStart;
+ double responseEnd;
double loadEventStart;
double loadEventEnd;
};
diff --git a/WebCore/loader/MainResourceLoader.cpp b/WebCore/loader/MainResourceLoader.cpp
index 0a5bf40..504a5ea 100644
--- a/WebCore/loader/MainResourceLoader.cpp
+++ b/WebCore/loader/MainResourceLoader.cpp
@@ -44,6 +44,7 @@
#include "ResourceError.h"
#include "ResourceHandle.h"
#include "Settings.h"
+#include <wtf/CurrentTime.h>
// FIXME: More that is in common with SubresourceLoader should move up into ResourceLoader.
@@ -157,7 +158,17 @@ void MainResourceLoader::willSendRequest(ResourceRequest& newRequest, const Reso
// The additional processing can do anything including possibly removing the last
// reference to this object; one example of this is 3266216.
RefPtr<MainResourceLoader> protect(this);
-
+
+ ASSERT(documentLoader()->timing()->fetchStart);
+ if (!redirectResponse.isNull()) {
+ DocumentLoadTiming* documentLoadTiming = documentLoader()->timing();
+ documentLoadTiming->redirectCount++;
+ if (!documentLoadTiming->redirectStart)
+ documentLoadTiming->redirectStart = documentLoadTiming->fetchStart;
+ documentLoadTiming->redirectEnd = currentTime();
+ documentLoadTiming->fetchStart = documentLoadTiming->redirectEnd;
+ }
+
// Update cookie policy base URL as URL changes, except for subframes, which use the
// URL of the main frame which doesn't change when we redirect.
if (frameLoader()->isLoadingMainFrame())
@@ -223,7 +234,7 @@ void MainResourceLoader::continueAfterContentPolicy(PolicyAction contentPolicy,
receivedError(cannotShowURLError());
return;
}
- frameLoader()->client()->download(m_handle.get(), request(), m_handle.get()->request(), r);
+ frameLoader()->client()->download(m_handle.get(), request(), m_handle.get()->firstRequest(), r);
// It might have gone missing
if (frameLoader())
receivedError(interruptionForPolicyChangeError());
@@ -464,6 +475,10 @@ void MainResourceLoader::handleDataLoadNow(MainResourceLoaderTimer*)
KURL url = m_substituteData.responseURL();
if (url.isEmpty())
url = m_initialRequest.url();
+
+ // Clear the initial request here so that subsequent entries into the
+ // loader will not think there's still a deferred load left to do.
+ m_initialRequest = ResourceRequest();
ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), "");
didReceiveResponse(response);
@@ -528,6 +543,9 @@ bool MainResourceLoader::load(const ResourceRequest& r, const SubstituteData& su
m_substituteData = substituteData;
+ ASSERT(documentLoader()->timing()->navigationStart);
+ ASSERT(!documentLoader()->timing()->fetchStart);
+ documentLoader()->timing()->fetchStart = currentTime();
ResourceRequest request(r);
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
diff --git a/WebCore/loader/SubframeLoader.cpp b/WebCore/loader/SubframeLoader.cpp
index f5a4c18..2206b4e 100644
--- a/WebCore/loader/SubframeLoader.cpp
+++ b/WebCore/loader/SubframeLoader.cpp
@@ -179,12 +179,23 @@ PassRefPtr<Widget> FrameLoader::loadMediaPlayerProxyPlugin(Node* node, const KUR
if (widget && renderer) {
renderer->setWidget(widget);
- m_containsPlugIns = true;
renderer->node()->setNeedsStyleRecalc(SyntheticStyleChange);
}
+ m_containsPlugIns = true;
return widget ? widget.release() : 0;
}
+
+void FrameLoader::hideMediaPlayerProxyPlugin(Widget* widget)
+{
+ m_client->hideMediaPlayerProxyPlugin(widget);
+}
+
+void FrameLoader::showMediaPlayerProxyPlugin(Widget* widget)
+{
+ m_client->showMediaPlayerProxyPlugin(widget);
+}
+
#endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)
PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
@@ -272,7 +283,7 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
// FIXME: In this case the Frame will have finished loading before
// it's being added to the child list. It would be a good idea to
// create the child first, then invoke the loader separately.
- if (frame->loader()->state() == FrameStateComplete)
+ if (frame->loader()->state() == FrameStateComplete && !frame->loader()->policyDocumentLoader())
frame->loader()->checkCompleted();
return frame.get();
diff --git a/WebCore/loader/SubresourceLoader.cpp b/WebCore/loader/SubresourceLoader.cpp
index 7aef353..1e22fb1 100644
--- a/WebCore/loader/SubresourceLoader.cpp
+++ b/WebCore/loader/SubresourceLoader.cpp
@@ -248,14 +248,20 @@ void SubresourceLoader::didReceiveAuthenticationChallenge(const AuthenticationCh
{
RefPtr<SubresourceLoader> protect(this);
+ ASSERT(handle()->hasAuthenticationChallenge());
+
if (m_client)
m_client->didReceiveAuthenticationChallenge(this, challenge);
// The SubResourceLoaderClient may have cancelled this ResourceLoader in response to the challenge.
- // If that's the case, don't call didReceiveAuthenticationChallenge
+ // If that's the case, don't call didReceiveAuthenticationChallenge.
if (reachedTerminalState())
return;
-
+
+ // It may have also handled authentication on its own.
+ if (!handle()->hasAuthenticationChallenge())
+ return;
+
ResourceLoader::didReceiveAuthenticationChallenge(challenge);
}
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index 2effba7..9b05e0d 100644
--- a/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -481,7 +481,7 @@ PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KUR
m_currentResourceIdentifier = m_frame->page()->progress()->createUniqueIdentifier();
if (Page* page = m_frame->page()) {
InspectorController* inspectorController = page->inspectorController();
- inspectorController->identifierForInitialRequest(m_currentResourceIdentifier, m_frame->loader()->documentLoader(), handle->request());
+ inspectorController->identifierForInitialRequest(m_currentResourceIdentifier, m_frame->loader()->documentLoader(), handle->firstRequest());
ResourceResponse redirectResponse = ResourceResponse();
inspectorController->willSendRequest(m_currentResourceIdentifier, request, redirectResponse);
}
@@ -517,7 +517,7 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
ASSERT(handle == m_currentHandle);
- KURL url(handle->request().url());
+ KURL url(handle->firstRequest().url());
if (url.hasFragmentIdentifier())
url.removeFragmentIdentifier();
@@ -534,7 +534,7 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
ApplicationCacheResource* newestCachedResource = m_newestCache->resourceForURL(url);
if (newestCachedResource) {
m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data()));
- m_pendingEntries.remove(m_currentHandle->request().url());
+ m_pendingEntries.remove(m_currentHandle->firstRequest().url());
m_currentHandle->cancel();
m_currentHandle = 0;
// Load the next resource, if any.
@@ -544,7 +544,7 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
// The server could return 304 for an unconditional request - in this case, we handle the response as a normal error.
}
- if (response.httpStatusCode() / 100 != 2 || response.url() != m_currentHandle->request().url()) {
+ if (response.httpStatusCode() / 100 != 2 || response.url() != m_currentHandle->firstRequest().url()) {
if ((type & ApplicationCacheResource::Explicit) || (type & ApplicationCacheResource::Fallback)) {
// Note that cacheUpdateFailed() can cause the cache group to be deleted.
cacheUpdateFailed();
@@ -559,10 +559,10 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
// Copy the resource and its metadata from the newest application cache in cache group whose completeness flag is complete, and act
// as if that was the fetched resource, ignoring the resource obtained from the network.
ASSERT(m_newestCache);
- ApplicationCacheResource* newestCachedResource = m_newestCache->resourceForURL(handle->request().url());
+ ApplicationCacheResource* newestCachedResource = m_newestCache->resourceForURL(handle->firstRequest().url());
ASSERT(newestCachedResource);
m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data()));
- m_pendingEntries.remove(m_currentHandle->request().url());
+ m_pendingEntries.remove(m_currentHandle->firstRequest().url());
m_currentHandle->cancel();
m_currentHandle = 0;
// Load the next resource, if any.
@@ -607,9 +607,9 @@ void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle)
}
ASSERT(m_currentHandle == handle);
- ASSERT(m_pendingEntries.contains(handle->request().url()));
+ ASSERT(m_pendingEntries.contains(handle->firstRequest().url()));
- m_pendingEntries.remove(handle->request().url());
+ m_pendingEntries.remove(handle->firstRequest().url());
ASSERT(m_cacheBeingUpdated);
@@ -634,8 +634,8 @@ void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError&
return;
}
- unsigned type = m_currentResource ? m_currentResource->type() : m_pendingEntries.get(handle->request().url());
- KURL url(handle->request().url());
+ unsigned type = m_currentResource ? m_currentResource->type() : m_pendingEntries.get(handle->firstRequest().url());
+ KURL url(handle->firstRequest().url());
if (url.hasFragmentIdentifier())
url.removeFragmentIdentifier();
@@ -671,13 +671,12 @@ void ApplicationCacheGroup::didReceiveManifestResponse(const ResourceResponse& r
if (response.httpStatusCode() == 304)
return;
- if (response.httpStatusCode() / 100 != 2 || response.url() != m_manifestHandle->request().url() || !equalIgnoringCase(response.mimeType(), "text/cache-manifest")) {
+ if (response.httpStatusCode() / 100 != 2 || response.url() != m_manifestHandle->firstRequest().url() || !equalIgnoringCase(response.mimeType(), "text/cache-manifest")) {
cacheUpdateFailed();
return;
}
- m_manifestResource = ApplicationCacheResource::create(m_manifestHandle->request().url(), response,
- ApplicationCacheResource::Manifest);
+ m_manifestResource = ApplicationCacheResource::create(m_manifestHandle->firstRequest().url(), response, ApplicationCacheResource::Manifest);
}
void ApplicationCacheGroup::didReceiveManifestData(const char* data, int length)
diff --git a/WebCore/loader/appcache/DOMApplicationCache.idl b/WebCore/loader/appcache/DOMApplicationCache.idl
index 8525fe6..9113ffa 100644
--- a/WebCore/loader/appcache/DOMApplicationCache.idl
+++ b/WebCore/loader/appcache/DOMApplicationCache.idl
@@ -28,7 +28,8 @@ module offline {
interface [
Conditional=OFFLINE_WEB_APPLICATIONS,
EventTarget,
- OmitConstructor
+ OmitConstructor,
+ DontCheckEnums
] DOMApplicationCache {
// update status
const unsigned short UNCACHED = 0;
diff --git a/WebCore/loader/icon/IconLoader.cpp b/WebCore/loader/icon/IconLoader.cpp
index eb49087..6e2762f 100644
--- a/WebCore/loader/icon/IconLoader.cpp
+++ b/WebCore/loader/icon/IconLoader.cpp
@@ -91,7 +91,7 @@ void IconLoader::didReceiveResponse(SubresourceLoader* resourceLoader, const Res
if (status && (status < 200 || status > 299)) {
ResourceHandle* handle = resourceLoader->handle();
- finishLoading(handle ? handle->request().url() : KURL(), 0);
+ finishLoading(handle ? handle->firstRequest().url() : KURL(), 0);
}
}
@@ -115,7 +115,7 @@ void IconLoader::didFail(SubresourceLoader* resourceLoader, const ResourceError&
if (m_loadIsInProgress) {
ASSERT(resourceLoader == m_resourceLoader);
ResourceHandle* handle = resourceLoader->handle();
- finishLoading(handle ? handle->request().url() : KURL(), 0);
+ finishLoading(handle ? handle->firstRequest().url() : KURL(), 0);
}
}
@@ -137,7 +137,7 @@ void IconLoader::didFinishLoading(SubresourceLoader* resourceLoader)
if (m_loadIsInProgress) {
ASSERT(resourceLoader == m_resourceLoader);
ResourceHandle* handle = resourceLoader->handle();
- finishLoading(handle ? handle->request().url() : KURL(), m_resourceLoader->resourceData());
+ finishLoading(handle ? handle->firstRequest().url() : KURL(), m_resourceLoader->resourceData());
}
}
diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp
index e137a5f..230d6ea 100644
--- a/WebCore/loader/loader.cpp
+++ b/WebCore/loader/loader.cpp
@@ -590,8 +590,8 @@ void Loader::Host::cancelPendingRequests(RequestQueue& requestsPending, DocLoade
Request* request = *it;
if (request->docLoader() == docLoader) {
cache()->remove(request->cachedResource());
- delete request;
docLoader->decrementRequestCount(request->cachedResource());
+ delete request;
} else
remaining.append(request);
}
diff --git a/WebCore/manual-tests/css3-background-layer-count.html b/WebCore/manual-tests/css3-background-layer-count.html
new file mode 100644
index 0000000..fc21fd7
--- /dev/null
+++ b/WebCore/manual-tests/css3-background-layer-count.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: Number of background properties greater than number of background images</title>
+ <style type="text/css">
+ div
+ {
+ margin: 10px;
+ width: 250px;
+ height: 250px;
+ border: thick solid black;
+ }
+ #test
+ {
+ background-image: url("resources/non-animated.gif"), url("resources/non-animated.gif"), url("resources/non-animated.gif");
+ background-position: right bottom, right top, left bottom, left center, right center;
+ background-repeat: no-repeat, no-repeat, repeat-x, repeat, repeat-y;
+ }
+ #reference
+ {
+ background-image: url("resources/non-animated.gif"), url("resources/non-animated.gif"), url("resources/non-animated.gif");
+ background-position: right bottom, right top, left bottom;
+ background-repeat: no-repeat, no-repeat, repeat-x;
+ }
+ </style>
+ </head>
+ <body>
+ <p>Test passes if the contents of the black boxes look exactly the same.</p>
+ <table>
+ <td>
+ <div id="test"></div>
+ </td>
+ <td>
+ <div id="reference"></div>
+ </td>
+ </table>
+ </body>
+</html>
diff --git a/WebCore/manual-tests/win/contextmenu-key2.html b/WebCore/manual-tests/win/contextmenu-key2.html
new file mode 100644
index 0000000..2833e58
--- /dev/null
+++ b/WebCore/manual-tests/win/contextmenu-key2.html
@@ -0,0 +1,13 @@
+<div oncontextmenu="contextmenu(event)">
+Select some text in the contenteditable below and press the context menu key
+(or shift+F10). The browser should not crash.
+<div contenteditable id="a">
+<p>|content editable|</p>
+</div>
+After content editable.
+</div>
+<script>
+function contextmenu(event) {
+ document.getElementById("a").style.visibility = "hidden";
+}
+</script>
diff --git a/WebCore/notifications/NotificationCenter.cpp b/WebCore/notifications/NotificationCenter.cpp
index f9672ad..ec70f0a 100644
--- a/WebCore/notifications/NotificationCenter.cpp
+++ b/WebCore/notifications/NotificationCenter.cpp
@@ -61,6 +61,11 @@ void NotificationCenter::requestPermission(PassRefPtr<VoidCallback> callback)
void NotificationCenter::disconnectFrame()
{
+ // m_notificationPresenter should never be 0. But just to be safe, we check it here.
+ // Due to the mysterious bug http://code.google.com/p/chromium/issues/detail?id=49323.
+ ASSERT(m_notificationPresenter);
+ if (!m_notificationPresenter)
+ return;
m_notificationPresenter->cancelRequestsForPermission(m_scriptExecutionContext);
m_notificationPresenter = 0;
}
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp
index f2e1d9d..0c66925 100644
--- a/WebCore/page/Chrome.cpp
+++ b/WebCore/page/Chrome.cpp
@@ -426,9 +426,9 @@ void Chrome::chooseIconForFiles(const Vector<String>& filenames, FileChooser* fi
m_client->chooseIconForFiles(filenames, fileChooser);
}
-bool Chrome::setCursor(PlatformCursorHandle cursor)
+void Chrome::setCursor(const Cursor& cursor)
{
- return m_client->setCursor(cursor);
+ m_client->setCursor(cursor);
}
#if ENABLE(NOTIFICATIONS)
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index 27bde83..537468a 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -69,6 +69,7 @@ namespace WebCore {
virtual IntRect windowToScreen(const IntRect&) const;
virtual PlatformPageClient platformPageClient() const;
virtual void scrollbarsModeDidChange() const;
+ virtual void setCursor(const Cursor&);
void scrollRectIntoView(const IntRect&) const;
@@ -135,8 +136,6 @@ namespace WebCore {
void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
void chooseIconForFiles(const Vector<String>&, FileChooser*);
- bool setCursor(PlatformCursorHandle);
-
#if PLATFORM(MAC)
void focusNSView(NSView*);
#endif
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index 8101c52..1b2d1cc 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -135,11 +135,13 @@ namespace WebCore {
virtual IntPoint screenToWindow(const IntPoint&) const = 0;
virtual IntRect windowToScreen(const IntRect&) const = 0;
virtual PlatformPageClient platformPageClient() const = 0;
- virtual void contentsSizeChanged(Frame*, const IntSize&) const = 0;
- virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const = 0; // Currently only Mac has a non empty implementation.
+ virtual void scrollbarsModeDidChange() const = 0;
+ virtual void setCursor(const Cursor&) = 0;
// End methods used by HostWindow.
- virtual void scrollbarsModeDidChange() const = 0;
+ virtual void contentsSizeChanged(Frame*, const IntSize&) const = 0;
+ virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const = 0; // Currently only Mac has a non empty implementation.
+
virtual bool shouldMissingPluginMessageBeButton() const { return false; }
virtual void missingPluginButtonClicked(Element*) const { }
virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags) = 0;
@@ -194,8 +196,6 @@ namespace WebCore {
// Asynchronous request to load an icon for specified filenames.
virtual void chooseIconForFiles(const Vector<String>&, FileChooser*) = 0;
- virtual bool setCursor(PlatformCursorHandle) = 0;
-
// Notification that the given form element has changed. This function
// will be called frequently, so handling should be very fast.
virtual void formStateDidChange(const Node*) = 0;
@@ -236,6 +236,10 @@ namespace WebCore {
virtual void willPopUpMenu(NSMenu *) { }
#endif
+#if PLATFORM(WIN)
+ virtual void setLastSetCursorToCurrentCursor() = 0;
+#endif
+
#if ENABLE(TOUCH_EVENTS)
virtual void needTouchEvents(bool) = 0;
#endif
diff --git a/WebCore/page/Console.cpp b/WebCore/page/Console.cpp
index 1d6c095..3d8a7de 100644
--- a/WebCore/page/Console.cpp
+++ b/WebCore/page/Console.cpp
@@ -36,6 +36,7 @@
#include "FrameLoader.h"
#include "FrameTree.h"
#include "InspectorController.h"
+#include "MemoryInfo.h"
#include "Page.h"
#include "PageGroup.h"
#include "PlatformString.h"
@@ -61,6 +62,8 @@ Frame* Console::frame() const
void Console::disconnectFrame()
{
+ if (m_memory)
+ m_memory = 0;
m_frame = 0;
}
@@ -141,7 +144,7 @@ static void printMessageSourceAndLevelPrefix(MessageSource source, MessageLevel
printf("%s %s:", sourceString, levelString);
}
-void Console::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL)
+void Console::addMessage(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceURL, ScriptCallStack* callStack)
{
Page* page = this->page();
if (!page)
@@ -151,7 +154,10 @@ void Console::addMessage(MessageSource source, MessageType type, MessageLevel le
page->chrome()->client()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL);
#if ENABLE(INSPECTOR)
- page->inspectorController()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL);
+ if (callStack)
+ page->inspectorController()->addMessageToConsole(source, type, level, callStack, message);
+ else
+ page->inspectorController()->addMessageToConsole(source, type, level, message, lineNumber, sourceURL);
#endif
if (!Console::shouldPrintExceptions())
@@ -294,15 +300,15 @@ String Console::lastWMLErrorMessage() const
if (!page)
return String();
- const Vector<ConsoleMessage*>& consoleMessages = page->inspectorController()->consoleMessages();
+ const Vector<OwnPtr<ConsoleMessage> >& consoleMessages = page->inspectorController()->consoleMessages();
if (consoleMessages.isEmpty())
return String();
- Vector<ConsoleMessage*>::const_iterator it = consoleMessages.begin();
- const Vector<ConsoleMessage*>::const_iterator end = consoleMessages.end();
+ Vector<OwnPtr<ConsoleMessage> >::const_iterator it = consoleMessages.begin();
+ const Vector<OwnPtr<ConsoleMessage> >::const_iterator end = consoleMessages.end();
for (; it != end; ++it) {
- ConsoleMessage* message = *it;
+ ConsoleMessage* message = it->get();
if (message->source() != WMLMessageSource)
continue;
@@ -456,6 +462,12 @@ void Console::warn(ScriptCallStack* callStack)
addMessage(LogMessageType, WarningMessageLevel, callStack);
}
+MemoryInfo* Console::memory() const
+{
+ m_memory = MemoryInfo::create(m_frame);
+ return m_memory.get();
+}
+
static bool printExceptions = false;
bool Console::shouldPrintExceptions()
diff --git a/WebCore/page/Console.h b/WebCore/page/Console.h
index 04e743e..d057ff9 100644
--- a/WebCore/page/Console.h
+++ b/WebCore/page/Console.h
@@ -29,8 +29,8 @@
#ifndef Console_h
#define Console_h
+#include "MemoryInfo.h"
#include "PlatformString.h"
-
#include "ScriptProfile.h"
#include <wtf/PassRefPtr.h>
@@ -43,7 +43,6 @@ typedef Vector<RefPtr<ScriptProfile> > ProfilesArray;
#endif
class Frame;
-class MemoryInfo;
class Page;
class String;
class ScriptCallStack;
@@ -65,7 +64,8 @@ enum MessageType {
StartGroupMessageType,
StartGroupCollapsedMessageType,
EndGroupMessageType,
- AssertMessageType
+ AssertMessageType,
+ UncaughtExceptionMessageType
};
enum MessageLevel {
@@ -83,7 +83,7 @@ public:
Frame* frame() const;
void disconnectFrame();
- void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
+ void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL, ScriptCallStack* callStack = 0);
void debug(ScriptCallStack*);
void error(ScriptCallStack*);
@@ -116,6 +116,8 @@ public:
const ProfilesArray& profiles() const { return m_profiles; }
#endif
+ MemoryInfo* memory() const;
+
private:
inline Page* page() const;
void addMessage(MessageType, MessageLevel, ScriptCallStack*, bool acceptNoArguments = false);
@@ -126,6 +128,7 @@ private:
#if ENABLE(JAVASCRIPT_DEBUGGER)
ProfilesArray m_profiles;
#endif
+ mutable RefPtr<MemoryInfo> m_memory;
};
} // namespace WebCore
diff --git a/WebCore/page/Console.idl b/WebCore/page/Console.idl
index 1506210..52528f1 100644
--- a/WebCore/page/Console.idl
+++ b/WebCore/page/Console.idl
@@ -41,8 +41,8 @@ module window {
[CustomArgumentHandling] void warn();
[CustomArgumentHandling] void dir();
[CustomArgumentHandling] void dirxml();
- [CustomArgumentHandling] void trace();
- [CustomArgumentHandling, ImplementationFunction=assertCondition] void assert(in boolean condition);
+ [V8Custom, CustomArgumentHandling] void trace();
+ [V8Custom, CustomArgumentHandling, ImplementationFunction=assertCondition] void assert(in boolean condition);
[CustomArgumentHandling] void count();
[CustomArgumentHandling] void markTimeline();
@@ -61,7 +61,7 @@ module window {
[CustomArgumentHandling] void groupCollapsed();
void groupEnd();
- readonly attribute [CustomGetter] MemoryInfo memory;
+ readonly attribute MemoryInfo memory;
};
}
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 18eef41..6498042 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -35,11 +35,13 @@
#include "CSSStyleSelector.h"
#include "Chrome.h"
#include "Console.h"
-#include "Database.h"
-#include "DatabaseCallback.h"
+#include "DocumentLoader.h"
#include "DOMApplicationCache.h"
#include "DOMSelection.h"
#include "DOMTimer.h"
+#include "Database.h"
+#include "DatabaseCallback.h"
+#include "DeviceOrientationController.h"
#include "PageTransitionEvent.h"
#include "Document.h"
#include "Element.h"
@@ -671,6 +673,17 @@ NotificationCenter* DOMWindow::webkitNotifications() const
}
#endif
+void DOMWindow::pageDestroyed()
+{
+#if ENABLE(NOTIFICATIONS)
+ // Clearing Notifications requests involves accessing the client so it must be done
+ // before the frame is detached.
+ if (m_notifications)
+ m_notifications->disconnectFrame();
+ m_notifications = 0;
+#endif
+}
+
#if ENABLE(INDEXED_DATABASE)
IndexedDatabaseRequest* DOMWindow::indexedDB() const
{
@@ -1426,6 +1439,10 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<Event
addUnloadEventListener(this);
else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
addBeforeUnloadEventListener(this);
+#if ENABLE(DEVICE_ORIENTATION)
+ else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page() && frame()->page()->deviceOrientationController())
+ frame()->page()->deviceOrientationController()->addListener(this);
+#endif
return true;
}
@@ -1439,17 +1456,21 @@ bool DOMWindow::removeEventListener(const AtomicString& eventType, EventListener
removeUnloadEventListener(this);
else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
removeBeforeUnloadEventListener(this);
+#if ENABLE(DEVICE_ORIENTATION)
+ else if (eventType == eventNames().deviceorientationEvent && frame() && frame()->page() && frame()->page()->deviceOrientationController())
+ frame()->page()->deviceOrientationController()->removeListener(this);
+#endif
return true;
}
void DOMWindow::dispatchLoadEvent()
{
- if (m_frame)
- m_frame->loader()->frameLoadTimeline()->loadEventStart = currentTime();
+ if (DocumentLoader* documentLoader = m_frame ? m_frame->loader()->documentLoader() : 0)
+ documentLoader->timing()->loadEventStart = currentTime();
dispatchEvent(Event::create(eventNames().loadEvent, false, false), document());
- if (m_frame)
- m_frame->loader()->frameLoadTimeline()->loadEventEnd = currentTime();
+ if (DocumentLoader* documentLoader = m_frame ? m_frame->loader()->documentLoader() : 0)
+ documentLoader->timing()->loadEventEnd = currentTime();
// For load events, send a separate load event to the enclosing frame only.
// This is a DOM extension and is independent of bubbling/capturing rules of
@@ -1513,6 +1534,11 @@ void DOMWindow::removeAllEventListeners()
{
EventTarget::removeAllEventListeners();
+#if ENABLE(DEVICE_ORIENTATION)
+ if (frame() && frame()->page() && frame()->page()->deviceOrientationController())
+ frame()->page()->deviceOrientationController()->removeAllListeners(this);
+#endif
+
removeAllUnloadEventListeners(this);
removeAllBeforeUnloadEventListeners(this);
}
diff --git a/WebCore/page/DOMWindow.h b/WebCore/page/DOMWindow.h
index beb2f7d..69d7428 100644
--- a/WebCore/page/DOMWindow.h
+++ b/WebCore/page/DOMWindow.h
@@ -228,6 +228,8 @@ namespace WebCore {
NotificationCenter* webkitNotifications() const;
#endif
+ void pageDestroyed();
+
#if ENABLE(INDEXED_DATABASE)
IndexedDatabaseRequest* indexedDB() const;
#endif
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index f3cf9fe..f6b9feb 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -305,8 +305,8 @@ module window {
attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
attribute [Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
- attribute [Conditional=DEVICE_ORIENTATION] DeviceOrientationEventConstructor DeviceOrientationEvent;
- attribute [Conditional=DEVICE_ORIENTATION] EventListener ondeviceorientation;
+ attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] DeviceOrientationEventConstructor DeviceOrientationEvent;
+ attribute [Conditional=DEVICE_ORIENTATION, EnabledAtRuntime] EventListener ondeviceorientation;
// EventTarget interface
[Custom] void addEventListener(in DOMString type,
diff --git a/WebCore/page/EditorClient.h b/WebCore/page/EditorClient.h
index 69f48e7..ff5bf94 100644
--- a/WebCore/page/EditorClient.h
+++ b/WebCore/page/EditorClient.h
@@ -183,10 +183,10 @@ public:
virtual void showSpellingUI(bool show) = 0;
virtual bool spellingUIIsShowing() = 0;
virtual void getGuessesForWord(const String&, Vector<String>& guesses) = 0;
+ virtual void willSetInputMethodState() = 0;
virtual void setInputMethodState(bool enabled) = 0;
};
}
#endif // EditorClient_h
-
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 08b8257..4d7771d 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -197,6 +197,9 @@ EventHandler::EventHandler(Frame* frame)
, m_sendingEventToSubview(false)
, m_activationEventNumber(0)
#endif
+#if ENABLE(TOUCH_EVENTS)
+ , m_touchPressed(false)
+#endif
{
}
@@ -866,11 +869,15 @@ void EventHandler::allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const
}
#endif // ENABLE(DRAG_SUPPORT)
+<<<<<<< HEAD:WebCore/page/EventHandler.cpp
#ifdef ANDROID_HITTEST_WITHSIZE
HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, const IntSize& pointPadding)
#else
HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars)
#endif
+=======
+HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, int hitType)
+>>>>>>> webkit.org at r63859:WebCore/page/EventHandler.cpp
{
#ifdef ANDROID_HITTEST_WITHSIZE
HitTestResult result(point, pointPadding);
@@ -879,7 +886,6 @@ HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool all
#endif
if (!m_frame->contentRenderer())
return result;
- int hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
if (ignoreClipping)
hitType |= HitTestRequest::IgnoreClipping;
m_frame->contentRenderer()->layer()->hitTest(HitTestRequest(hitType), result);
@@ -1460,6 +1466,12 @@ bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, Hi
hitType |= HitTestRequest::ReadOnly;
if (m_mousePressed)
hitType |= HitTestRequest::Active;
+
+#if ENABLE(TOUCH_EVENTS)
+ // Treat any mouse move events as readonly if the user is currently touching the screen.
+ if (m_touchPressed)
+ hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly;
+#endif
HitTestRequest request(hitType);
MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
if (hoveredNode)
@@ -2064,10 +2076,6 @@ bool EventHandler::sendContextMenuEventForKey()
Position start = selectionController->selection().start();
if (start.node() && (selectionController->rootEditableElement() || selectionController->isRange())) {
- RenderObject* renderer = start.node()->renderer();
- if (!renderer)
- return false;
-
RefPtr<Range> selection = selectionController->toNormalizedRange();
IntRect firstRect = m_frame->firstRectForRange(selection.get());
@@ -2867,7 +2875,29 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
for (unsigned i = 0; i < points.size(); ++i) {
const PlatformTouchPoint& point = points[i];
IntPoint pagePoint = documentPointForWindowPoint(m_frame, point.pos());
- HitTestResult result = hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ false);
+
+ int hitType = HitTestRequest::Active | HitTestRequest::ReadOnly;
+ // The HitTestRequest types used for mouse events map quite adequately
+ // to touch events. Note that in addition to meaning that the hit test
+ // should affect the active state of the current node if necessary,
+ // HitTestRequest::Active signifies that the hit test is taking place
+ // with the mouse (or finger in this case) being pressed.
+ switch (point.state()) {
+ case PlatformTouchPoint::TouchPressed:
+ hitType = HitTestRequest::Active;
+ break;
+ case PlatformTouchPoint::TouchMoved:
+ hitType = HitTestRequest::Active | HitTestRequest::MouseMove | HitTestRequest::ReadOnly;
+ break;
+ case PlatformTouchPoint::TouchReleased:
+ case PlatformTouchPoint::TouchCancelled:
+ hitType = HitTestRequest::MouseUp;
+ break;
+ default:
+ break;
+ }
+
+ HitTestResult result = hitTestResultAtPoint(pagePoint, /*allowShadowContent*/ false, false, DontHitTestScrollbars, hitType);
Node* target = result.innerNode();
// Touch events should not go to text nodes
@@ -2930,6 +2960,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
movedTouches->append(touch);
}
+ m_touchPressed = touches->length() > 0;
+
bool defaultPrevented = false;
Touch* changedTouch = 0;
EventTarget* touchEventTarget = 0;
diff --git a/WebCore/page/EventHandler.h b/WebCore/page/EventHandler.h
index d24d803..55c6b20 100644
--- a/WebCore/page/EventHandler.h
+++ b/WebCore/page/EventHandler.h
@@ -28,6 +28,7 @@
#include "DragActions.h"
#include "FocusDirection.h"
+#include "HitTestRequest.h"
#include "PlatformMouseEvent.h"
#include "ScrollTypes.h"
#include "Timer.h"
@@ -105,11 +106,15 @@ public:
void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&);
+<<<<<<< HEAD:WebCore/page/EventHandler.h
#ifdef ANDROID_HITTEST_WITHSIZE
HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars, const IntSize& pointPadding = IntSize());
#else
HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars);
#endif
+=======
+ HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars, int hitType = HitTestRequest::ReadOnly | HitTestRequest::Active);
+>>>>>>> webkit.org at r63859:WebCore/page/EventHandler.h
bool mousePressed() const { return m_mousePressed; }
void setMousePressed(bool pressed) { m_mousePressed = pressed; }
@@ -435,6 +440,7 @@ private:
#if ENABLE(TOUCH_EVENTS)
typedef HashMap<int, RefPtr<EventTarget> > TouchTargetMap;
TouchTargetMap m_originatingTouchPointTargets;
+ bool m_touchPressed;
#endif
};
diff --git a/WebCore/page/FocusController.cpp b/WebCore/page/FocusController.cpp
index 6ecdffd..53a4fa8 100644
--- a/WebCore/page/FocusController.cpp
+++ b/WebCore/page/FocusController.cpp
@@ -595,22 +595,21 @@ bool FocusController::setFocusedNode(Node* node, PassRefPtr<Frame> newFocusedFra
if (oldFocusedNode && oldFocusedNode->rootEditableElement() == oldFocusedNode && !relinquishesEditingFocus(oldFocusedNode))
return false;
- // Set input method state before changing the focused node, so that the
- // input method can still have a chance to finish the ongoing composition
- // session.
- m_page->editorClient()->setInputMethodState(node ? node->shouldUseInputMethod() : false);
+ m_page->editorClient()->willSetInputMethodState();
clearSelectionIfNeeded(oldFocusedFrame.get(), newFocusedFrame.get(), node);
if (!node) {
if (oldDocument)
oldDocument->setFocusedNode(0);
+ m_page->editorClient()->setInputMethodState(false);
return true;
}
RefPtr<Document> newDocument = node->document();
if (newDocument && newDocument->focusedNode() == node) {
+ m_page->editorClient()->setInputMethodState(node->shouldUseInputMethod());
return true;
}
@@ -622,6 +621,8 @@ bool FocusController::setFocusedNode(Node* node, PassRefPtr<Frame> newFocusedFra
if (newDocument)
newDocument->setFocusedNode(node);
+ m_page->editorClient()->setInputMethodState(node->shouldUseInputMethod());
+
return true;
}
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index 46917fd..a8d0f15 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -298,24 +298,31 @@ String Frame::selectedText() const
IntRect Frame::firstRectForRange(Range* range) const
{
int extraWidthToEndOfLine = 0;
- ExceptionCode ec = 0;
- ASSERT(range->startContainer(ec));
- ASSERT(range->endContainer(ec));
+ ASSERT(range->startContainer());
+ ASSERT(range->endContainer());
InlineBox* startInlineBox;
int startCaretOffset;
- range->startPosition().getInlineBoxAndOffset(DOWNSTREAM, startInlineBox, startCaretOffset);
+ Position startPosition = VisiblePosition(range->startPosition()).deepEquivalent();
+ if (startPosition.isNull())
+ return IntRect();
+ startPosition.getInlineBoxAndOffset(DOWNSTREAM, startInlineBox, startCaretOffset);
- RenderObject* startRenderer = range->startContainer(ec)->renderer();
+ RenderObject* startRenderer = startPosition.node()->renderer();
+ ASSERT(startRenderer);
IntRect startCaretRect = startRenderer->localCaretRect(startInlineBox, startCaretOffset, &extraWidthToEndOfLine);
if (startCaretRect != IntRect())
startCaretRect = startRenderer->localToAbsoluteQuad(FloatRect(startCaretRect)).enclosingBoundingBox();
InlineBox* endInlineBox;
int endCaretOffset;
- range->endPosition().getInlineBoxAndOffset(UPSTREAM, endInlineBox, endCaretOffset);
+ Position endPosition = VisiblePosition(range->endPosition()).deepEquivalent();
+ if (endPosition.isNull())
+ return IntRect();
+ endPosition.getInlineBoxAndOffset(UPSTREAM, endInlineBox, endCaretOffset);
- RenderObject* endRenderer = range->endContainer(ec)->renderer();
+ RenderObject* endRenderer = endPosition.node()->renderer();
+ ASSERT(endRenderer);
IntRect endCaretRect = endRenderer->localCaretRect(endInlineBox, endCaretOffset);
if (endCaretRect != IntRect())
endCaretRect = endRenderer->localToAbsoluteQuad(FloatRect(endCaretRect)).enclosingBoundingBox();
@@ -1344,6 +1351,9 @@ void Frame::pageDestroyed()
if (Frame* parent = tree()->parent())
parent->loader()->checkLoadComplete();
+ if (m_domWindow)
+ m_domWindow->pageDestroyed();
+
// FIXME: It's unclear as to why this is called more than once, but it is,
// so page() could be NULL.
if (page() && page()->focusController()->focusedFrame() == this)
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index defb34a..31f9910 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -1129,7 +1129,7 @@ void FrameView::setScrollPosition(const IntPoint& scrollPoint)
m_inProgrammaticScroll = wasInProgrammaticScroll;
}
-void FrameView::scrollPositionChanged()
+void FrameView::scrollPositionChangedViaPlatformWidget()
{
frame()->eventHandler()->sendScrollEvent();
repaintFixedElementsAfterScrolling();
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index b047db0..868a15f 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -143,7 +143,7 @@ public:
virtual IntRect windowResizerRect() const;
void setScrollPosition(const IntPoint&);
- void scrollPositionChanged();
+ void scrollPositionChangedViaPlatformWidget();
virtual void repaintFixedElementsAfterScrolling();
String mediaType() const;
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 13bc02a..abdb8bf 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -295,7 +295,7 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
else if (haveSuitableCachedPosition(notifier->m_options.get()))
notifier->setUseCachedPosition();
else if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) {
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if USE(PREEMPT_GEOLOCATION_PERMISSION)
// Only start timer if we're not waiting for user permission.
if (!m_startRequestPermissionNotifier)
#endif
@@ -416,18 +416,22 @@ void Geolocation::setIsAllowed(bool allowed)
// position.
m_allowGeolocation = allowed ? Yes : No;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if USE(PREEMPT_GEOLOCATION_PERMISSION)
if (m_startRequestPermissionNotifier) {
if (isAllowed()) {
// Permission request was made during the startUpdating process
m_startRequestPermissionNotifier->startTimerIfNeeded();
m_startRequestPermissionNotifier = 0;
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_frame)
return;
Page* page = m_frame->page();
if (!page)
return;
page->geolocationController()->addObserver(this);
+#else
+ // TODO: Handle startUpdate() for non-client based implementations using pre-emptive policy
+#endif
} else {
m_startRequestPermissionNotifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
m_oneShots.add(m_startRequestPermissionNotifier);
@@ -628,15 +632,15 @@ void Geolocation::geolocationServiceErrorOccurred(GeolocationService* service)
bool Geolocation::startUpdating(GeoNotifier* notifier)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- // FIXME: Pass options to client.
-
+#if USE(PREEMPT_GEOLOCATION_PERMISSION)
if (!isAllowed()) {
m_startRequestPermissionNotifier = notifier;
requestPermission();
return true;
}
-
+#endif
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_frame)
return false;
@@ -644,6 +648,7 @@ bool Geolocation::startUpdating(GeoNotifier* notifier)
if (!page)
return false;
+ // FIXME: Pass options to client.
page->geolocationController()->addObserver(this);
return true;
#else
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index f831b87..af10632 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -169,7 +169,8 @@ private:
Frame* m_frame;
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
OwnPtr<GeolocationService> m_service;
-#else
+#endif
+#if USE(PREEMPT_GEOLOCATION_PERMISSION)
RefPtr<GeoNotifier> m_startRequestPermissionNotifier;
#endif
RefPtr<Geoposition> m_lastPosition;
diff --git a/WebCore/page/MemoryInfo.cpp b/WebCore/page/MemoryInfo.cpp
index 010a19c..c2247b9 100644
--- a/WebCore/page/MemoryInfo.cpp
+++ b/WebCore/page/MemoryInfo.cpp
@@ -31,17 +31,21 @@
#include "config.h"
#include "MemoryInfo.h"
+#include "Frame.h"
#include "ScriptGCEvent.h"
+#include "Settings.h"
namespace WebCore {
-MemoryInfo::MemoryInfo()
+MemoryInfo::MemoryInfo(Frame* frame)
: m_totalJSHeapSize(0),
m_usedJSHeapSize(0)
{
+ if (frame && frame->settings() && frame->settings()->memoryInfoEnabled()) {
#if ENABLE(INSPECTOR)
- ScriptGCEvent::getHeapSize(m_usedJSHeapSize, m_totalJSHeapSize);
+ ScriptGCEvent::getHeapSize(m_usedJSHeapSize, m_totalJSHeapSize);
#endif
+ }
}
} // namespace WebCore
diff --git a/WebCore/page/MemoryInfo.h b/WebCore/page/MemoryInfo.h
index e9e0fa5..615e952 100644
--- a/WebCore/page/MemoryInfo.h
+++ b/WebCore/page/MemoryInfo.h
@@ -36,15 +36,17 @@
namespace WebCore {
+class Frame;
+
class MemoryInfo : public RefCounted<MemoryInfo> {
public:
- static PassRefPtr<MemoryInfo> create() { return adoptRef(new MemoryInfo()); }
+ static PassRefPtr<MemoryInfo> create(Frame* frame) { return adoptRef(new MemoryInfo(frame)); }
size_t totalJSHeapSize() const { return m_totalJSHeapSize; }
size_t usedJSHeapSize() const { return m_usedJSHeapSize; }
private:
- MemoryInfo();
+ MemoryInfo(Frame*);
size_t m_totalJSHeapSize;
size_t m_usedJSHeapSize;
diff --git a/WebCore/page/Navigation.cpp b/WebCore/page/Navigation.cpp
index efda924..ad93b47 100644
--- a/WebCore/page/Navigation.cpp
+++ b/WebCore/page/Navigation.cpp
@@ -57,20 +57,20 @@ void Navigation::disconnectFrame()
unsigned short Navigation::type() const
{
if (!m_frame)
- return Navigate;
+ return NAVIGATE;
DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
if (!documentLoader)
- return Navigate;
+ return NAVIGATE;
WebCore::NavigationType navigationType = documentLoader->triggeringAction().type();
switch (navigationType) {
case NavigationTypeReload:
- return Reload;
+ return RELOAD;
case NavigationTypeBackForward:
- return BackForward;
+ return BACK_FORWARD;
default:
- return Navigate;
+ return NAVIGATE;
}
}
@@ -79,7 +79,11 @@ unsigned short Navigation::redirectCount() const
if (!m_frame)
return 0;
- return 0; // FIXME
+ DocumentLoader* loader = m_frame->loader()->documentLoader();
+ if (!loader)
+ return 0;
+
+ return loader->timing()->redirectCount;
}
} // namespace WebCore
diff --git a/WebCore/page/Navigation.h b/WebCore/page/Navigation.h
index 85c7b55..ba68ff3 100644
--- a/WebCore/page/Navigation.h
+++ b/WebCore/page/Navigation.h
@@ -47,17 +47,16 @@ public:
Frame* frame() const;
void disconnectFrame();
+ enum NavigationType {
+ NAVIGATE,
+ RELOAD,
+ BACK_FORWARD
+ };
+
unsigned short type() const;
unsigned short redirectCount() const;
private:
- // Keep in sync with what's in the .idl file.
- enum NavigationType {
- Navigate = 0,
- Reload = 1,
- BackForward = 2,
- };
-
Navigation(Frame*);
Frame* m_frame;
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index ee99c43..8e471fc 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -57,10 +57,12 @@
#include "ProgressTracker.h"
#include "RenderTheme.h"
#include "RenderWidget.h"
+#include "RuntimeEnabledFeatures.h"
#include "ScriptController.h"
#include "SelectionController.h"
#include "Settings.h"
#include "SharedBuffer.h"
+#include "SpeechInputClient.h"
#include "StringHash.h"
#include "TextResourceDecoder.h"
#include "Widget.h"
@@ -153,7 +155,10 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
, m_geolocationController(new GeolocationController(this, geolocationControllerClient))
#endif
#if ENABLE(DEVICE_ORIENTATION)
- , m_deviceOrientationController(new DeviceOrientationController(this, deviceOrientationClient))
+ , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, deviceOrientationClient) : 0)
+#endif
+#if ENABLE(INPUT_SPEECH)
+ , m_speechInputClient(0)
#endif
, m_settings(new Settings(this))
, m_progress(new ProgressTracker)
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index 56a25eb..8599a83 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -70,6 +70,7 @@ namespace WebCore {
class VisibleSelection;
class SelectionController;
class Settings;
+ class SpeechInputClient;
#if ENABLE(DOM_STORAGE)
class StorageNamespace;
@@ -152,6 +153,10 @@ namespace WebCore {
#if ENABLE(DEVICE_ORIENTATION)
DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); }
#endif
+#if ENABLE(INPUT_SPEECH)
+ void setSpeechInputClient(SpeechInputClient* client) { m_speechInputClient = client; }
+ SpeechInputClient* speechInputClient() const { return m_speechInputClient; }
+#endif
Settings* settings() const { return m_settings.get(); }
ProgressTracker* progress() const { return m_progress.get(); }
@@ -269,6 +274,9 @@ namespace WebCore {
#if ENABLE(DEVICE_ORIENTATION)
OwnPtr<DeviceOrientationController> m_deviceOrientationController;
#endif
+#if ENABLE(INPUT_SPEECH)
+ SpeechInputClient* m_speechInputClient;
+#endif
OwnPtr<Settings> m_settings;
OwnPtr<ProgressTracker> m_progress;
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index b45b9ea..e0502c5 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -242,12 +242,7 @@ void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& s
styleSheetsInWorld = new UserStyleSheetVector;
styleSheetsInWorld->append(userStyleSheet.release());
- // Clear our cached sheets and have them just reparse.
- HashSet<Page*>::const_iterator end = m_pages.end();
- for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->document()->clearPageGroupUserSheets();
- }
+ resetUserStyleCacheInAllFrames();
}
void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const KURL& url)
@@ -301,13 +296,8 @@ void PageGroup::removeUserStyleSheetFromWorld(DOMWrapperWorld* world, const KURL
delete it->second;
m_userStyleSheets->remove(it);
}
-
- // Clear our cached sheets and have them just reparse.
- HashSet<Page*>::const_iterator end = m_pages.end();
- for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->document()->clearPageGroupUserSheets();
- }
+
+ resetUserStyleCacheInAllFrames();
}
void PageGroup::removeUserScriptsFromWorld(DOMWrapperWorld* world)
@@ -339,12 +329,7 @@ void PageGroup::removeUserStyleSheetsFromWorld(DOMWrapperWorld* world)
delete it->second;
m_userStyleSheets->remove(it);
- // Clear our cached sheets and have them just reparse.
- HashSet<Page*>::const_iterator end = m_pages.end();
- for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->document()->clearPageGroupUserSheets();
- }
+ resetUserStyleCacheInAllFrames();
}
void PageGroup::removeAllUserContent()
@@ -353,12 +338,24 @@ void PageGroup::removeAllUserContent()
deleteAllValues(*m_userScripts);
m_userScripts.clear();
}
-
-
+
if (m_userStyleSheets) {
deleteAllValues(*m_userStyleSheets);
m_userStyleSheets.clear();
+ resetUserStyleCacheInAllFrames();
}
}
+void PageGroup::resetUserStyleCacheInAllFrames()
+{
+#if !PLATFORM(CHROMIUM)
+ // Clear our cached sheets and have them just reparse.
+ HashSet<Page*>::const_iterator end = m_pages.end();
+ for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
+ frame->document()->clearPageGroupUserSheets();
+ }
+#endif
+}
+
} // namespace WebCore
diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h
index 545df78..77aa281 100644
--- a/WebCore/page/PageGroup.h
+++ b/WebCore/page/PageGroup.h
@@ -94,7 +94,8 @@ namespace WebCore {
private:
void addVisitedLink(LinkHash stringHash);
-
+ void resetUserStyleCacheInAllFrames();
+
String m_name;
HashSet<Page*> m_pages;
diff --git a/WebCore/page/Performance.cpp b/WebCore/page/Performance.cpp
index c19ce8f..c4234a7 100644
--- a/WebCore/page/Performance.cpp
+++ b/WebCore/page/Performance.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "Performance.h"
+#include "MemoryInfo.h"
#include "Navigation.h"
#include "Timing.h"
@@ -52,6 +53,8 @@ Frame* Performance::frame() const
void Performance::disconnectFrame()
{
+ if (m_memory)
+ m_memory = 0;
if (m_navigation) {
m_navigation->disconnectFrame();
m_navigation = 0;
@@ -63,6 +66,12 @@ void Performance::disconnectFrame()
m_frame = 0;
}
+MemoryInfo* Performance::memory() const
+{
+ m_memory = MemoryInfo::create(m_frame);
+ return m_memory.get();
+}
+
Navigation* Performance::navigation() const
{
if (!m_navigation)
diff --git a/WebCore/page/Performance.h b/WebCore/page/Performance.h
index f317076..9736fe7 100644
--- a/WebCore/page/Performance.h
+++ b/WebCore/page/Performance.h
@@ -33,6 +33,7 @@
#if ENABLE(WEB_TIMING)
+#include "MemoryInfo.h"
#include "Navigation.h"
#include "Timing.h"
#include <wtf/PassRefPtr.h>
@@ -48,12 +49,14 @@ public:
Frame* frame() const;
void disconnectFrame();
+ MemoryInfo* memory() const;
Navigation* navigation() const;
Timing* timing() const;
private:
Performance(Frame*);
+ mutable RefPtr<MemoryInfo> m_memory;
mutable RefPtr<Navigation> m_navigation;
mutable RefPtr<Timing> m_timing;
Frame* m_frame;
diff --git a/WebCore/page/Performance.idl b/WebCore/page/Performance.idl
index 3885e2c..ffe8b6f 100644
--- a/WebCore/page/Performance.idl
+++ b/WebCore/page/Performance.idl
@@ -34,6 +34,7 @@ module window {
interface [Conditional=WEB_TIMING, OmitConstructor] Performance {
readonly attribute Navigation navigation;
readonly attribute Timing timing;
+ readonly attribute MemoryInfo memory;
};
}
diff --git a/WebCore/page/PrintContext.cpp b/WebCore/page/PrintContext.cpp
index cc3707e..2bbc63a 100644
--- a/WebCore/page/PrintContext.cpp
+++ b/WebCore/page/PrintContext.cpp
@@ -245,4 +245,52 @@ int PrintContext::numberOfPages(Frame* frame, const FloatSize& pageSizeInPixels)
return printContext.pageCount();
}
+void PrintContext::spoolAllPagesWithBoundaries(Frame* frame, GraphicsContext& graphicsContext, const FloatSize& pageSizeInPixels)
+{
+ if (!frame->document() || !frame->view() || !frame->document()->renderer())
+ return;
+
+ frame->document()->updateLayout();
+
+ PrintContext printContext(frame);
+ printContext.begin(pageSizeInPixels.width());
+
+ float pageHeight;
+ printContext.computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1, pageHeight);
+
+ const float pageWidth = pageSizeInPixels.width();
+ const Vector<IntRect>& pageRects = printContext.pageRects();
+ int totalHeight = pageRects.size() * (pageSizeInPixels.height() + 1) - 1;
+
+ // Fill the whole background by white.
+ graphicsContext.setFillColor(Color(255, 255, 255), DeviceColorSpace);
+ graphicsContext.fillRect(FloatRect(0, 0, pageWidth, totalHeight));
+
+ graphicsContext.save();
+ graphicsContext.translate(0, totalHeight);
+ graphicsContext.scale(FloatSize(1, -1));
+
+ int currentHeight = 0;
+ for (size_t pageIndex = 0; pageIndex < pageRects.size(); pageIndex++) {
+ // Draw a line for a page boundary if this isn't the first page.
+ if (pageIndex > 0) {
+ graphicsContext.save();
+ graphicsContext.setStrokeColor(Color(0, 0, 255), DeviceColorSpace);
+ graphicsContext.setFillColor(Color(0, 0, 255), DeviceColorSpace);
+ graphicsContext.drawLine(IntPoint(0, currentHeight),
+ IntPoint(pageWidth, currentHeight));
+ graphicsContext.restore();
+ }
+
+ graphicsContext.save();
+ graphicsContext.translate(0, currentHeight);
+ printContext.spoolPage(graphicsContext, pageIndex, pageWidth);
+ graphicsContext.restore();
+
+ currentHeight += pageSizeInPixels.height() + 1;
+ }
+
+ graphicsContext.restore();
+}
+
}
diff --git a/WebCore/page/PrintContext.h b/WebCore/page/PrintContext.h
index 1080c29..8492718 100644
--- a/WebCore/page/PrintContext.h
+++ b/WebCore/page/PrintContext.h
@@ -59,6 +59,10 @@ public:
static bool isPageBoxVisible(Frame* frame, int pageNumber);
static String pageSizeAndMarginsInPixels(Frame* frame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
static int numberOfPages(Frame*, const FloatSize& pageSizeInPixels);
+ // Draw all pages into a graphics context with lines which mean page boundaries.
+ // The height of the graphics context should be
+ // (pageSizeInPixels.height() + 1) * number-of-pages - 1
+ static void spoolAllPagesWithBoundaries(Frame*, GraphicsContext&, const FloatSize& pageSizeInPixels);
protected:
Frame* m_frame;
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 51d387a..bca2c7b 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -148,9 +148,13 @@ Settings::Settings(Page* page)
, m_html5TreeBuilderEnabled(false) // Will be deleted soon, do not use.
, m_paginateDuringLayoutEnabled(false)
, m_dnsPrefetchingEnabled(true)
+<<<<<<< HEAD:WebCore/page/Settings.cpp
#ifdef ANDROID_PLUGINS
, m_pluginsOnDemand(false)
#endif
+=======
+ , m_memoryInfoEnabled(false)
+>>>>>>> webkit.org at r63859:WebCore/page/Settings.cpp
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index abf0699..d1ffdbe 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -376,6 +376,9 @@ namespace WebCore {
void setPaginateDuringLayoutEnabled(bool flag) { m_paginateDuringLayoutEnabled = flag; }
bool paginateDuringLayoutEnabled() const { return m_paginateDuringLayoutEnabled; }
+ void setMemoryInfoEnabled(bool flag) { m_memoryInfoEnabled = flag; }
+ bool memoryInfoEnabled() const { return m_memoryInfoEnabled; }
+
private:
Page* m_page;
@@ -496,9 +499,13 @@ namespace WebCore {
bool m_html5TreeBuilderEnabled: 1; // Will be deleted soon, do not use.
bool m_paginateDuringLayoutEnabled : 1;
bool m_dnsPrefetchingEnabled : 1;
+<<<<<<< HEAD:WebCore/page/Settings.h
#ifdef ANDROID_PLUGINS
bool m_pluginsOnDemand : 1;
#endif
+=======
+ bool m_memoryInfoEnabled: 1;
+>>>>>>> webkit.org at r63859:WebCore/page/Settings.h
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
diff --git a/WebCore/page/SpatialNavigation.cpp b/WebCore/page/SpatialNavigation.cpp
index e748d12..40aa52b 100644
--- a/WebCore/page/SpatialNavigation.cpp
+++ b/WebCore/page/SpatialNavigation.cpp
@@ -103,14 +103,9 @@ void distanceDataForNode(FocusDirection direction, Node* start, FocusCandidate&
// FIXME: This function does not behave correctly with transformed frames.
static IntRect renderRectRelativeToRootDocument(RenderObject* render)
{
- ASSERT(render);
+ ASSERT(render && render->node());
- IntRect rect(render->absoluteClippedOverflowRect());
-
- if (rect.isEmpty()) {
- Element* e = static_cast<Element*>(render->node());
- rect = e->getRect();
- }
+ IntRect rect = render->node()->getRect();
// In cases when the |render|'s associated node is in a scrollable inner
// document, we only consider its scrollOffset if it is not offscreen.
@@ -517,7 +512,7 @@ static bool checkNegativeCoordsForNode(Node* node, const IntRect& curRect)
{
ASSERT(node || node->renderer());
- if (curRect.x() > 0 && curRect.y() > 0)
+ if (curRect.x() >= 0 && curRect.y() >= 0)
return true;
bool canBeScrolled = false;
diff --git a/WebCore/page/SpeechInput.cpp b/WebCore/page/SpeechInput.cpp
new file mode 100644
index 0000000..92df70e
--- /dev/null
+++ b/WebCore/page/SpeechInput.cpp
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SpeechInput.h"
+
+#if ENABLE(INPUT_SPEECH)
+
+#include "Frame.h"
+#include "SpeechInputClient.h"
+#include "SpeechInputListener.h"
+
+namespace WebCore {
+
+SpeechInput::SpeechInput(SpeechInputClient* client, SpeechInputListener* listener)
+ : m_client(client)
+ , m_listener(listener)
+{
+}
+
+void SpeechInput::recordingComplete()
+{
+ m_listener->recordingComplete();
+}
+
+void SpeechInput::setRecognitionResult(const String& result)
+{
+ m_listener->setRecognitionResult(result);
+}
+
+bool SpeechInput::startRecognition()
+{
+ if (m_client)
+ return m_client->startRecognition(this);
+ return false;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INPUT_SPEECH)
diff --git a/WebCore/page/SpeechInput.h b/WebCore/page/SpeechInput.h
new file mode 100644
index 0000000..201be99
--- /dev/null
+++ b/WebCore/page/SpeechInput.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SpeechInput_h
+#define SpeechInput_h
+
+#if ENABLE(INPUT_SPEECH)
+
+#include "SpeechInputClientListener.h"
+#include <wtf/Noncopyable.h>
+
+namespace WebCore {
+
+class SpeechInputClient;
+class SpeechInputListener;
+class String;
+
+// This class connects the input elements requiring speech input with the platform specific
+// speech recognition engine. It provides methods for the input elements to activate speech
+// recognition and methods for the speech recognition engine to return back the results.
+class SpeechInput : public Noncopyable, public SpeechInputClientListener {
+public:
+ SpeechInput(SpeechInputClient*, SpeechInputListener*);
+ virtual ~SpeechInput() { }
+
+ // Methods invoked by the input elements.
+ virtual bool startRecognition();
+
+ // SpeechInputClient::Listener methods.
+ virtual void recordingComplete();
+ virtual void setRecognitionResult(const String&);
+
+protected:
+ SpeechInputClient* client() const { return m_client; }
+
+private:
+ SpeechInputClient* m_client;
+ SpeechInputListener* m_listener;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INPUT_SPEECH)
+
+#endif // SpeechInput_h
diff --git a/WebCore/page/SpeechInputClient.h b/WebCore/page/SpeechInputClient.h
new file mode 100644
index 0000000..be68f46
--- /dev/null
+++ b/WebCore/page/SpeechInputClient.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SpeechInputClient_h
+#define SpeechInputClient_h
+
+#if ENABLE(INPUT_SPEECH)
+
+namespace WebCore {
+
+class SpeechInputClientListener;
+
+// Provides an interface for SpeechInput to call into the embedder.
+class SpeechInputClient {
+public:
+ virtual bool startRecognition(SpeechInputClientListener* listener) = 0;
+
+protected:
+ virtual ~SpeechInputClient() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INPUT_SPEECH)
+
+#endif // SpeechInputClient_h
diff --git a/WebCore/page/SpeechInputClientListener.h b/WebCore/page/SpeechInputClientListener.h
new file mode 100644
index 0000000..a9a897e
--- /dev/null
+++ b/WebCore/page/SpeechInputClientListener.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SpeechInputClientListener_h
+#define SpeechInputClientListener_h
+
+#if ENABLE(INPUT_SPEECH)
+
+namespace WebCore {
+
+class String;
+
+// Provides an interface for the embedder to call into WebCore.
+class SpeechInputClientListener {
+public:
+ virtual void recordingComplete() = 0;
+ virtual void setRecognitionResult(const String& result) = 0;
+
+protected:
+ virtual ~SpeechInputClientListener() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INPUT_SPEECH)
+
+#endif // SpeechInputClientListener_h
diff --git a/WebCore/page/SpeechInputListener.h b/WebCore/page/SpeechInputListener.h
new file mode 100644
index 0000000..d087d36
--- /dev/null
+++ b/WebCore/page/SpeechInputListener.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SpeechInputListener_h
+#define SpeechInputListener_h
+
+#if ENABLE(INPUT_SPEECH)
+
+namespace WebCore {
+
+class String;
+
+// Interface to be implemented by the element which invokes SpeechInput.
+class SpeechInputListener {
+public:
+ virtual void recordingComplete() = 0;
+ virtual void setRecognitionResult(const String& result) = 0;
+
+protected:
+ virtual ~SpeechInputListener() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INPUT_SPEECH)
+
+#endif // SpeechInputListener_h
diff --git a/WebCore/page/Timing.cpp b/WebCore/page/Timing.cpp
index af00441..527390a 100644
--- a/WebCore/page/Timing.cpp
+++ b/WebCore/page/Timing.cpp
@@ -33,10 +33,40 @@
#if ENABLE(WEB_TIMING)
+#include "DocumentLoader.h"
#include "Frame.h"
+#include "ResourceLoadTiming.h"
+#include "ResourceResponse.h"
namespace WebCore {
+static unsigned long long toIntegerMilliseconds(double seconds)
+{
+ ASSERT(seconds >= 0);
+ return static_cast<unsigned long long>(seconds * 1000.0);
+}
+
+static double getPossiblySkewedTimeInKnownRange(double skewedTime, double lowerBound, double upperBound)
+{
+#if PLATFORM(CHROMIUM)
+ // The chromium port's currentTime() implementation only syncs with the
+ // system clock every 60 seconds. So it is possible for timing marks
+ // collected in different threads or processes to have a small skew.
+ // FIXME: It may be possible to add a currentTimeFromSystemTime() method
+ // that eliminates the skew.
+ if (skewedTime <= lowerBound)
+ return lowerBound;
+
+ if (skewedTime >= upperBound)
+ return upperBound;
+#else
+ ASSERT_UNUSED(lowerBound, skewedTime >= lowerBound);
+ ASSERT_UNUSED(upperBound, skewedTime <= upperBound);
+#endif
+
+ return skewedTime;
+}
+
Timing::Timing(Frame* frame)
: m_frame(frame)
{
@@ -54,34 +84,214 @@ void Timing::disconnectFrame()
unsigned long long Timing::navigationStart() const
{
- if (!m_frame)
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->navigationStart * 1000);
+ return toIntegerMilliseconds(timing->navigationStart);
}
unsigned long long Timing::unloadEventEnd() const
{
- if (!m_frame)
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->unloadEventEnd);
+}
+
+unsigned long long Timing::redirectStart() const
+{
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->redirectStart);
+}
+
+unsigned long long Timing::redirectEnd() const
+{
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->redirectEnd);
+}
+
+unsigned long long Timing::fetchStart() const
+{
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->fetchStart);
+}
+
+unsigned long long Timing::domainLookupStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ // This will be -1 when a DNS request is not performed.
+ // Rather than exposing a special value that indicates no DNS, we "backfill" with fetchStart.
+ int dnsStart = timing->dnsStart;
+ if (dnsStart < 0)
+ return fetchStart();
+
+ return resourceLoadTimeRelativeToAbsolute(dnsStart);
+}
+
+unsigned long long Timing::domainLookupEnd() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->unloadEventEnd * 1000);
+ // This will be -1 when a DNS request is not performed.
+ // Rather than exposing a special value that indicates no DNS, we "backfill" with domainLookupStart.
+ int dnsEnd = timing->dnsEnd;
+ if (dnsEnd < 0)
+ return domainLookupStart();
+
+ return resourceLoadTimeRelativeToAbsolute(dnsEnd);
+}
+
+unsigned long long Timing::connectStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ // This will be -1 when a new connection is not established.
+ // Rather than exposing a special value that indicates no new connection, we "backfill" with domainLookupEnd.
+ int connectStart = timing->connectStart;
+ if (connectStart < 0)
+ return domainLookupEnd();
+
+ return resourceLoadTimeRelativeToAbsolute(connectStart);
+}
+
+unsigned long long Timing::connectEnd() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ // This will be -1 when a new connection is not established.
+ // Rather than exposing a special value that indicates no new connection, we "backfill" with connectStart.
+ int connectEnd = timing->connectEnd;
+ if (connectEnd < 0)
+ return connectStart();
+
+ return resourceLoadTimeRelativeToAbsolute(connectEnd);
+}
+
+unsigned long long Timing::requestStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ ASSERT(timing->sendStart >= 0);
+ return resourceLoadTimeRelativeToAbsolute(timing->sendStart);
+}
+
+unsigned long long Timing::requestEnd() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ ASSERT(timing->sendEnd >= 0);
+ return resourceLoadTimeRelativeToAbsolute(timing->sendEnd);
+}
+
+unsigned long long Timing::responseStart() const
+{
+ ResourceLoadTiming* timing = resourceLoadTiming();
+ if (!timing)
+ return 0;
+
+ // FIXME: Response start needs to be the time of the first received byte.
+ // However, the ResourceLoadTiming API currently only supports the time
+ // the last header byte was received. For many responses with reasonable
+ // sized cookies, the HTTP headers fit into a single packet so this time
+ // is basically equivalent. But for some responses, particularly those with
+ // headers larger than a single packet, this time will be too late.
+ ASSERT(timing->receiveHeadersEnd >= 0);
+ return resourceLoadTimeRelativeToAbsolute(timing->receiveHeadersEnd);
+}
+
+unsigned long long Timing::responseEnd() const
+{
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->responseEnd);
}
unsigned long long Timing::loadEventStart() const
{
- if (!m_frame)
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->loadEventStart * 1000);
+ return toIntegerMilliseconds(timing->loadEventStart);
}
unsigned long long Timing::loadEventEnd() const
{
+ DocumentLoadTiming* timing = documentLoadTiming();
+ if (!timing)
+ return 0;
+
+ return toIntegerMilliseconds(timing->loadEventEnd);
+}
+
+DocumentLoader* Timing::documentLoader() const
+{
if (!m_frame)
return 0;
- return static_cast<unsigned long long>(m_frame->loader()->frameLoadTimeline()->loadEventEnd * 1000);
+ return m_frame->loader()->documentLoader();
+}
+
+DocumentLoadTiming* Timing::documentLoadTiming() const
+{
+ DocumentLoader* loader = documentLoader();
+ if (!loader)
+ return 0;
+
+ return loader->timing();
+}
+
+ResourceLoadTiming* Timing::resourceLoadTiming() const
+{
+ DocumentLoader* loader = documentLoader();
+ if (!loader)
+ return 0;
+
+ return loader->response().resourceLoadTiming();
+}
+
+unsigned long long Timing::resourceLoadTimeRelativeToAbsolute(int relativeSeconds) const
+{
+ ASSERT(relativeSeconds >= 0);
+ ResourceLoadTiming* resourceTiming = resourceLoadTiming();
+ ASSERT(resourceTiming);
+ DocumentLoadTiming* documentTiming = documentLoadTiming();
+ ASSERT(documentTiming);
+
+ // The ResourceLoadTiming API's requestTime is the base time to which all
+ // other marks are relative. So to get an absolute time, we must add it to
+ // the relative marks.
+ //
+ // Since ResourceLoadTimings came from the network platform layer, we must
+ // check them for skew because they may be from another thread/process.
+ double baseTime = getPossiblySkewedTimeInKnownRange(resourceTiming->requestTime, documentTiming->fetchStart, documentTiming->responseEnd);
+ return toIntegerMilliseconds(baseTime) + relativeSeconds;
}
} // namespace WebCore
diff --git a/WebCore/page/Timing.h b/WebCore/page/Timing.h
index 47ce478..f48f525 100644
--- a/WebCore/page/Timing.h
+++ b/WebCore/page/Timing.h
@@ -38,7 +38,10 @@
namespace WebCore {
+struct DocumentLoadTiming;
+class DocumentLoader;
class Frame;
+class ResourceLoadTiming;
class Timing : public RefCounted<Timing> {
public:
@@ -49,12 +52,28 @@ public:
unsigned long long navigationStart() const;
unsigned long long unloadEventEnd() const;
+ unsigned long long redirectStart() const;
+ unsigned long long redirectEnd() const;
+ unsigned long long fetchStart() const;
+ unsigned long long domainLookupStart() const;
+ unsigned long long domainLookupEnd() const;
+ unsigned long long connectStart() const;
+ unsigned long long connectEnd() const;
+ unsigned long long requestStart() const;
+ unsigned long long requestEnd() const;
+ unsigned long long responseStart() const;
+ unsigned long long responseEnd() const;
unsigned long long loadEventStart() const;
unsigned long long loadEventEnd() const;
private:
Timing(Frame*);
+ DocumentLoader* documentLoader() const;
+ DocumentLoadTiming* documentLoadTiming() const;
+ ResourceLoadTiming* resourceLoadTiming() const;
+ unsigned long long resourceLoadTimeRelativeToAbsolute(int) const;
+
Frame* m_frame;
};
diff --git a/WebCore/page/Timing.idl b/WebCore/page/Timing.idl
index dbe996e..e7e46cc 100644
--- a/WebCore/page/Timing.idl
+++ b/WebCore/page/Timing.idl
@@ -32,20 +32,19 @@ module window {
// See: http://dev.w3.org/2006/webapi/WebTiming/
interface [Conditional=WEB_TIMING, OmitConstructor] Timing {
- // FIXME: Implement remainder of interface.
readonly attribute unsigned long long navigationStart;
- // readonly attribute unsigned long long fetchStart;
readonly attribute unsigned long long unloadEventEnd;
- // readonly attribute unsigned long long redirectStart;
- // readonly attribute unsigned long long redirectEnd;
- // readonly attribute unsigned long long domainLookupStart;
- // readonly attribute unsigned long long domainLookupEnd;
- // readonly attribute unsigned long long connectStart;
- // readonly attribute unsigned long long connectEnd;
- // readonly attribute unsigned long long requestStart;
- // readonly attribute unsigned long long requestEnd;
- // readonly attribute unsigned long long responseStart;
- // readonly attribute unsigned long long responseEnd;
+ readonly attribute unsigned long long redirectStart;
+ readonly attribute unsigned long long redirectEnd;
+ readonly attribute unsigned long long fetchStart;
+ readonly attribute unsigned long long domainLookupStart;
+ readonly attribute unsigned long long domainLookupEnd;
+ readonly attribute unsigned long long connectStart;
+ readonly attribute unsigned long long connectEnd;
+ readonly attribute unsigned long long requestStart;
+ readonly attribute unsigned long long requestEnd;
+ readonly attribute unsigned long long responseStart;
+ readonly attribute unsigned long long responseEnd;
readonly attribute unsigned long long loadEventStart;
readonly attribute unsigned long long loadEventEnd;
};
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp
index 7195d1f..83fd039 100644
--- a/WebCore/page/animation/AnimationBase.cpp
+++ b/WebCore/page/animation/AnimationBase.cpp
@@ -774,7 +774,7 @@ AnimationBase::AnimationBase(const Animation* transition, RenderObject* renderer
, m_object(renderer)
, m_animation(const_cast<Animation*>(transition))
, m_compAnim(compAnim)
- , m_fallbackAnimating(false)
+ , m_isAccelerated(false)
, m_transformFunctionListValid(false)
, m_nextIterationDuration(-1)
, m_next(0)
@@ -837,7 +837,7 @@ bool AnimationBase::blendProperties(const AnimationBase* anim, int prop, RenderS
if (wrapper) {
wrapper->blend(anim, dst, a, b, progress);
#if USE(ACCELERATED_COMPOSITING)
- return !wrapper->animationIsAccelerated() || anim->isFallbackAnimating();
+ return !wrapper->animationIsAccelerated() || !anim->isAccelerated();
#else
return true;
#endif
@@ -974,7 +974,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
// We won't try to start accelerated animations if we are overridden and
// just move on to the next state.
m_animState = AnimationStateStartWaitResponse;
- m_fallbackAnimating = true;
+ m_isAccelerated = false;
updateStateMachine(AnimationStateInputStartTimeSet, beginAnimationUpdateTime());
}
else {
@@ -985,7 +985,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
bool started = startAnimation(timeOffset);
m_compAnim->animationController()->addToStartTimeResponseWaitList(this, started);
- m_fallbackAnimating = !started;
+ m_isAccelerated = started;
}
break;
case AnimationStateStartWaitResponse:
@@ -1108,11 +1108,11 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
// We won't try to start accelerated animations if we are overridden and
// just move on to the next state.
updateStateMachine(AnimationStateInputStartTimeSet, beginAnimationUpdateTime());
- m_fallbackAnimating = true;
+ m_isAccelerated = false;
} else {
bool started = startAnimation(beginAnimationUpdateTime() - m_startTime);
m_compAnim->animationController()->addToStartTimeResponseWaitList(this, started);
- m_fallbackAnimating = !started;
+ m_isAccelerated = started;
}
break;
case AnimationStateFillingForwards:
diff --git a/WebCore/page/animation/AnimationBase.h b/WebCore/page/animation/AnimationBase.h
index 91ef8cf..9bdca3a 100644
--- a/WebCore/page/animation/AnimationBase.h
+++ b/WebCore/page/animation/AnimationBase.h
@@ -144,9 +144,10 @@ public:
// Does this animation/transition involve the given property?
virtual bool affectsProperty(int /*property*/) const { return false; }
- bool isAnimatingProperty(int property, bool isRunningNow) const
+
+ bool isAnimatingProperty(int property, bool acceleratedOnly, bool isRunningNow) const
{
- if (m_fallbackAnimating)
+ if (acceleratedOnly && !m_isAccelerated)
return false;
if (isRunningNow)
@@ -197,7 +198,7 @@ protected:
void goIntoEndingOrLoopingState();
- bool isFallbackAnimating() const { return m_fallbackAnimating; }
+ bool isAccelerated() const { return m_isAccelerated; }
static bool propertiesEqual(int prop, const RenderStyle* a, const RenderStyle* b);
static int getPropertyAtIndex(int, bool& isShorthand);
@@ -220,7 +221,7 @@ protected:
RefPtr<Animation> m_animation;
CompositeAnimation* m_compAnim;
- bool m_fallbackAnimating; // true when animating an accelerated property but have to fall back to software
+ bool m_isAccelerated;
bool m_transformFunctionListValid;
double m_totalDuration, m_nextIterationDuration;
diff --git a/WebCore/page/animation/AnimationController.cpp b/WebCore/page/animation/AnimationController.cpp
index 3761c5a..b5d87e6 100644
--- a/WebCore/page/animation/AnimationController.cpp
+++ b/WebCore/page/animation/AnimationController.cpp
@@ -209,13 +209,22 @@ void AnimationControllerPrivate::animationTimerFired(Timer<AnimationControllerPr
fireEventsAndUpdateStyle();
}
-bool AnimationControllerPrivate::isAnimatingPropertyOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+bool AnimationControllerPrivate::isRunningAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
if (!animation)
return false;
- return animation->isAnimatingProperty(property, isRunningNow);
+ return animation->isAnimatingProperty(property, false, isRunningNow);
+}
+
+bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+{
+ RefPtr<CompositeAnimation> animation = m_compositeAnimations.get(renderer);
+ if (!animation)
+ return false;
+
+ return animation->isAnimatingProperty(property, true, isRunningNow);
}
void AnimationControllerPrivate::suspendAnimations(Document* document)
@@ -532,9 +541,14 @@ bool AnimationController::pauseTransitionAtTime(RenderObject* renderer, const St
return m_data->pauseTransitionAtTime(renderer, property, t);
}
-bool AnimationController::isAnimatingPropertyOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+bool AnimationController::isRunningAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
+{
+ return m_data->isRunningAnimationOnRenderer(renderer, property, isRunningNow);
+}
+
+bool AnimationController::isRunningAcceleratedAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
- return m_data->isAnimatingPropertyOnRenderer(renderer, property, isRunningNow);
+ return m_data->isRunningAcceleratedAnimationOnRenderer(renderer, property, isRunningNow);
}
void AnimationController::suspendAnimations(Document* document)
diff --git a/WebCore/page/animation/AnimationController.h b/WebCore/page/animation/AnimationController.h
index db82618..d184b45 100644
--- a/WebCore/page/animation/AnimationController.h
+++ b/WebCore/page/animation/AnimationController.h
@@ -61,7 +61,8 @@ public:
bool pauseTransitionAtTime(RenderObject*, const String& property, double t); // To be used only for testing
unsigned numberOfActiveAnimations() const; // To be used only for testing
- bool isAnimatingPropertyOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow = true) const;
+ bool isRunningAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow = true) const;
+ bool isRunningAcceleratedAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow = true) const;
void suspendAnimations(Document*);
void resumeAnimations(Document*);
diff --git a/WebCore/page/animation/AnimationControllerPrivate.h b/WebCore/page/animation/AnimationControllerPrivate.h
index 5ef9098..3ae15a5 100644
--- a/WebCore/page/animation/AnimationControllerPrivate.h
+++ b/WebCore/page/animation/AnimationControllerPrivate.h
@@ -70,7 +70,8 @@ public:
void suspendAnimations(Document*);
void resumeAnimations(Document*);
- bool isAnimatingPropertyOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow) const;
+ bool isRunningAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow) const;
+ bool isRunningAcceleratedAnimationOnRenderer(RenderObject*, CSSPropertyID, bool isRunningNow) const;
bool pauseAnimationAtTime(RenderObject*, const String& name, double t);
bool pauseTransitionAtTime(RenderObject*, const String& property, double t);
diff --git a/WebCore/page/animation/CompositeAnimation.cpp b/WebCore/page/animation/CompositeAnimation.cpp
index 7619b1f..57c2aa4 100644
--- a/WebCore/page/animation/CompositeAnimation.cpp
+++ b/WebCore/page/animation/CompositeAnimation.cpp
@@ -136,7 +136,7 @@ void CompositeAnimation::updateTransitions(RenderObject* renderer, RenderStyle*
#if USE(ACCELERATED_COMPOSITING)
// For accelerated animations we need to return a new RenderStyle with the _current_ value
// of the property, so that restarted transitions use the correct starting point.
- if (AnimationBase::animationOfPropertyIsAccelerated(prop) && !implAnim->isFallbackAnimating()) {
+ if (AnimationBase::animationOfPropertyIsAccelerated(prop) && implAnim->isAccelerated()) {
if (!modifiedCurrentStyle)
modifiedCurrentStyle = RenderStyle::clone(currentStyle);
@@ -460,14 +460,14 @@ void CompositeAnimation::resumeOverriddenImplicitAnimations(int property)
}
}
-bool CompositeAnimation::isAnimatingProperty(int property, bool isRunningNow) const
+bool CompositeAnimation::isAnimatingProperty(int property, bool acceleratedOnly, bool isRunningNow) const
{
if (!m_keyframeAnimations.isEmpty()) {
m_keyframeAnimations.checkConsistency();
AnimationNameMap::const_iterator animationsEnd = m_keyframeAnimations.end();
for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != animationsEnd; ++it) {
KeyframeAnimation* anim = it->second.get();
- if (anim && anim->isAnimatingProperty(property, isRunningNow))
+ if (anim && anim->isAnimatingProperty(property, acceleratedOnly, isRunningNow))
return true;
}
}
@@ -476,7 +476,7 @@ bool CompositeAnimation::isAnimatingProperty(int property, bool isRunningNow) co
CSSPropertyTransitionsMap::const_iterator transitionsEnd = m_transitions.end();
for (CSSPropertyTransitionsMap::const_iterator it = m_transitions.begin(); it != transitionsEnd; ++it) {
ImplicitAnimation* anim = it->second.get();
- if (anim && anim->isAnimatingProperty(property, isRunningNow))
+ if (anim && anim->isAnimatingProperty(property, acceleratedOnly, isRunningNow))
return true;
}
}
diff --git a/WebCore/page/animation/CompositeAnimation.h b/WebCore/page/animation/CompositeAnimation.h
index b7db442..51ba565 100644
--- a/WebCore/page/animation/CompositeAnimation.h
+++ b/WebCore/page/animation/CompositeAnimation.h
@@ -70,8 +70,8 @@ public:
bool hasAnimations() const { return !m_transitions.isEmpty() || !m_keyframeAnimations.isEmpty(); }
void setAnimating(bool);
- bool isAnimatingProperty(int property, bool isRunningNow) const;
-
+ bool isAnimatingProperty(int property, bool acceleratedOnly, bool isRunningNow) const;
+
PassRefPtr<KeyframeAnimation> getAnimationForProperty(int property) const;
void overrideImplicitAnimations(int property);
diff --git a/WebCore/page/animation/ImplicitAnimation.cpp b/WebCore/page/animation/ImplicitAnimation.cpp
index 328fe0e..da0a810 100644
--- a/WebCore/page/animation/ImplicitAnimation.cpp
+++ b/WebCore/page/animation/ImplicitAnimation.cpp
@@ -273,7 +273,7 @@ double ImplicitAnimation::timeToNextService()
// A return value of 0 means we need service. But if this is an accelerated animation we
// only need service at the end of the transition.
- if (animationOfPropertyIsAccelerated(m_animatingProperty) && !isFallbackAnimating()) {
+ if (animationOfPropertyIsAccelerated(m_animatingProperty) && isAccelerated()) {
bool isLooping;
getTimeToNextEvent(t, isLooping);
}
diff --git a/WebCore/page/animation/KeyframeAnimation.cpp b/WebCore/page/animation/KeyframeAnimation.cpp
index 4c2cbc8..2f2cfc0 100644
--- a/WebCore/page/animation/KeyframeAnimation.cpp
+++ b/WebCore/page/animation/KeyframeAnimation.cpp
@@ -400,7 +400,7 @@ double KeyframeAnimation::timeToNextService()
bool acceleratedPropertiesOnly = true;
for (HashSet<int>::const_iterator it = m_keyframes.beginProperties(); it != endProperties; ++it) {
- if (!animationOfPropertyIsAccelerated(*it) || isFallbackAnimating()) {
+ if (!animationOfPropertyIsAccelerated(*it) || !isAccelerated()) {
acceleratedPropertiesOnly = false;
break;
}
diff --git a/WebCore/page/chromium/ChromeClientChromium.h b/WebCore/page/chromium/ChromeClientChromium.h
index e897c15..46985b1 100644
--- a/WebCore/page/chromium/ChromeClientChromium.h
+++ b/WebCore/page/chromium/ChromeClientChromium.h
@@ -39,6 +39,10 @@ class AccessibilityObject;
class IntRect;
class PopupContainer;
+#if USE(ACCELERATED_COMPOSITING)
+class GLES2Context;
+#endif
+
// Contains Chromium-specific extensions to the ChromeClient. Only put
// things here that don't make sense for other ports.
class ChromeClientChromium : public ChromeClient {
@@ -55,6 +59,12 @@ public:
// Notifies embedder that the state of an accessibility object has changed.
virtual void didChangeAccessibilityObjectState(AccessibilityObject*) = 0;
+
+#if USE(ACCELERATED_COMPOSITING)
+ // Request a GL ES 2 context to use for compositing this page's content.
+ virtual PassOwnPtr<GLES2Context> getOnscreenGLES2Context() = 0;
+ virtual PassOwnPtr<GLES2Context> getOffscreenGLES2Context() = 0;
+#endif
};
} // namespace WebCore
diff --git a/WebCore/page/mac/EventHandlerMac.mm b/WebCore/page/mac/EventHandlerMac.mm
index 8842e31..bb466db 100644
--- a/WebCore/page/mac/EventHandlerMac.mm
+++ b/WebCore/page/mac/EventHandlerMac.mm
@@ -215,10 +215,14 @@ bool EventHandler::passMouseDownEventToWidget(Widget* pWidget)
return true;
}
+ // In WebKit2 we will never have an NSView. Just return early and let the regular event handler machinery take care of
+ // dispatching the event.
+ if (!widget->platformWidget())
+ return false;
+
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSView *nodeView = widget->platformWidget();
- ASSERT(nodeView);
ASSERT([nodeView superview]);
NSView *view = [nodeView hitTest:[[nodeView superview] convertPoint:[currentNSEvent() locationInWindow] fromView:nil]];
if (!view) {
diff --git a/WebCore/platform/BlobItem.cpp b/WebCore/platform/BlobItem.cpp
index a12dd08..cc5e6c7 100644
--- a/WebCore/platform/BlobItem.cpp
+++ b/WebCore/platform/BlobItem.cpp
@@ -78,6 +78,20 @@ FileBlobItem::FileBlobItem(const String& path)
{
}
+#if ENABLE(DIRECTORY_UPLOAD)
+PassRefPtr<BlobItem> FileBlobItem::create(const String& path, const String& relativePath)
+{
+ return adoptRef(static_cast<BlobItem*>(new FileBlobItem(path, relativePath)));
+}
+
+FileBlobItem::FileBlobItem(const String& path, const String& relativePath)
+ : m_path(path)
+ , m_fileName(pathGetFileName(m_path))
+ , m_relativePath(relativePath)
+{
+}
+#endif
+
unsigned long long FileBlobItem::size() const
{
// FIXME: synchronized file call
@@ -105,144 +119,16 @@ PassRefPtr<BlobItem> FileBlobItem::slice(long long start, long long length)
// StringBlobItem --------------------------------------------------------------
-PassRefPtr<BlobItem> StringBlobItem::create(const String& text, LineEnding ending, TextEncoding encoding)
-{
- return adoptRef(static_cast<BlobItem*>(new StringBlobItem(text, ending, encoding)));
-}
-
PassRefPtr<BlobItem> StringBlobItem::create(const CString& text)
{
return adoptRef(static_cast<BlobItem*>(new StringBlobItem(text)));
}
-StringBlobItem::StringBlobItem(const String& text, LineEnding ending, TextEncoding encoding)
- : m_data(StringBlobItem::convertToCString(text, ending, encoding))
-{
-}
-
StringBlobItem::StringBlobItem(const CString& text)
: m_data(text)
{
}
-// Normalize all line-endings to CRLF.
-static CString convertToCRLF(const CString& from)
-{
- unsigned newLen = 0;
- const char* p = from.data();
- while (char c = *p++) {
- if (c == '\r') {
- // Safe to look ahead because of trailing '\0'.
- if (*p != '\n') {
- // Turn CR into CRLF.
- newLen += 2;
- }
- } else if (c == '\n') {
- // Turn LF into CRLF.
- newLen += 2;
- } else {
- // Leave other characters alone.
- newLen += 1;
- }
- }
- if (newLen == from.length())
- return from;
-
- // Make a copy of the string.
- p = from.data();
- char* q;
- CString result = CString::newUninitialized(newLen, q);
- while (char c = *p++) {
- if (c == '\r') {
- // Safe to look ahead because of trailing '\0'.
- if (*p != '\n') {
- // Turn CR into CRLF.
- *q++ = '\r';
- *q++ = '\n';
- }
- } else if (c == '\n') {
- // Turn LF into CRLF.
- *q++ = '\r';
- *q++ = '\n';
- } else {
- // Leave other characters alone.
- *q++ = c;
- }
- }
- return result;
-}
-
-// Normalize all line-endings to CR or LF.
-static CString convertToCROrLF(const CString& from, bool toCR)
-{
- unsigned newLen = 0;
- bool needFix = false;
- const char* p = from.data();
- char fromEndingChar = toCR ? '\n' : '\r';
- char toEndingChar = toCR ? '\r' : '\n';
- while (char c = *p++) {
- if (c == '\r' && *p == '\n') {
- // Turn CRLF into CR or LF.
- p++;
- needFix = true;
- } else if (c == fromEndingChar) {
- // Turn CR/LF into LF/CR.
- needFix = true;
- }
- newLen += 1;
- }
- if (!needFix)
- return from;
-
- // Make a copy of the string.
- p = from.data();
- char* q;
- CString result = CString::newUninitialized(newLen, q);
- while (char c = *p++) {
- if (c == '\r' && *p == '\n') {
- // Turn CRLF or CR into CR or LF.
- p++;
- *q++ = toEndingChar;
- } else if (c == fromEndingChar) {
- // Turn CR/LF into LF/CR.
- *q++ = toEndingChar;
- } else {
- // Leave other characters alone.
- *q++ = c;
- }
- }
- return result;
-}
-
-CString StringBlobItem::convertToCString(const String& text, LineEnding ending, TextEncoding encoding)
-{
- CString from = encoding.encode(text.characters(), text.length(), EntitiesForUnencodables);
-
- if (ending == EndingNative) {
-#if OS(WINDOWS)
- ending = EndingCRLF;
-#else
- ending = EndingLF;
-#endif
- }
-
- switch (ending) {
- case EndingTransparent:
- return from;
- case EndingCRLF:
- return convertToCRLF(from);
- case EndingCR:
- return convertToCROrLF(from, true);
- case EndingLF:
- return convertToCROrLF(from, false);
- default:
- ASSERT_NOT_REACHED();
- }
-
- ASSERT_NOT_REACHED();
- return from;
-}
-
// ByteArrayBlobItem ----------------------------------------------------------
PassRefPtr<BlobItem> ByteArrayBlobItem::create(const char* data, size_t size)
diff --git a/WebCore/platform/BlobItem.h b/WebCore/platform/BlobItem.h
index 1d34c59..3741f3f 100644
--- a/WebCore/platform/BlobItem.h
+++ b/WebCore/platform/BlobItem.h
@@ -32,7 +32,6 @@
#define BlobItem_h
#include "PlatformString.h"
-#include "TextEncoding.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -41,15 +40,6 @@
namespace WebCore {
-// String ending types.
-enum LineEnding {
- EndingTransparent = 0,
- EndingNative,
- EndingLF,
- EndingCR,
- EndingCRLF,
-};
-
class ByteArrayBlobItem;
class DataBlobItem;
class DataRangeBlobItem;
@@ -108,8 +98,14 @@ public:
class FileBlobItem : public BlobItem {
public:
static PassRefPtr<BlobItem> create(const String& path);
+#if ENABLE(DIRECTORY_UPLOAD)
+ static PassRefPtr<BlobItem> create(const String& path, const String& relativePath);
+#endif
virtual const String& name() const { return m_fileName; }
virtual const String& path() const { return m_path; }
+#if ENABLE(DIRECTORY_UPLOAD)
+ const String& relativePath() const { return m_relativePath; }
+#endif
// BlobItem methods.
virtual unsigned long long size() const;
@@ -120,13 +116,18 @@ public:
protected:
FileBlobItem(const String& path);
+#if ENABLE(DIRECTORY_UPLOAD)
+ FileBlobItem(const String& path, const String& relativePath);
+#endif
String m_path;
String m_fileName;
+#if ENABLE(DIRECTORY_UPLOAD)
+ String m_relativePath;
+#endif
};
class StringBlobItem : public DataBlobItem {
public:
- static PassRefPtr<BlobItem> create(const String&, LineEnding, TextEncoding);
static PassRefPtr<BlobItem> create(const CString&);
const CString& cstr() const { return m_data; }
@@ -138,9 +139,7 @@ public:
virtual const char* data() const { return m_data.data(); }
private:
- StringBlobItem(const String&, LineEnding, TextEncoding);
StringBlobItem(const CString&);
- static CString convertToCString(const String&, LineEnding, TextEncoding);
CString m_data;
};
diff --git a/WebCore/platform/Cursor.cpp b/WebCore/platform/Cursor.cpp
index 794a9dc..3f17ad9 100644
--- a/WebCore/platform/Cursor.cpp
+++ b/WebCore/platform/Cursor.cpp
@@ -46,4 +46,477 @@ IntPoint determineHotSpot(Image* image, const IntPoint& specifiedHotSpot)
return IntPoint();
}
+const Cursor& Cursor::fromType(Cursor::Type type)
+{
+ switch (type) {
+ case Cursor::Pointer:
+ return pointerCursor();
+ case Cursor::Cross:
+ return crossCursor();
+ case Cursor::Hand:
+ return handCursor();
+ case Cursor::IBeam:
+ return iBeamCursor();
+ case Cursor::Wait:
+ return waitCursor();
+ case Cursor::Help:
+ return helpCursor();
+ case Cursor::EastResize:
+ return eastResizeCursor();
+ case Cursor::NorthResize:
+ return northResizeCursor();
+ case Cursor::NorthEastResize:
+ return northEastResizeCursor();
+ case Cursor::NorthWestResize:
+ return northWestResizeCursor();
+ case Cursor::SouthResize:
+ return southResizeCursor();
+ case Cursor::SouthEastResize:
+ return southEastResizeCursor();
+ case Cursor::SouthWestResize:
+ return southWestResizeCursor();
+ case Cursor::WestResize:
+ return westResizeCursor();
+ case Cursor::NorthSouthResize:
+ return northSouthResizeCursor();
+ case Cursor::EastWestResize:
+ return eastWestResizeCursor();
+ case Cursor::NorthEastSouthWestResize:
+ return northEastSouthWestResizeCursor();
+ case Cursor::NorthWestSouthEastResize:
+ return northWestSouthEastResizeCursor();
+ case Cursor::ColumnResize:
+ return columnResizeCursor();
+ case Cursor::RowResize:
+ return rowResizeCursor();
+ case Cursor::MiddlePanning:
+ return middlePanningCursor();
+ case Cursor::EastPanning:
+ return eastPanningCursor();
+ case Cursor::NorthPanning:
+ return northPanningCursor();
+ case Cursor::NorthEastPanning:
+ return northEastPanningCursor();
+ case Cursor::NorthWestPanning:
+ return northWestPanningCursor();
+ case Cursor::SouthPanning:
+ return southPanningCursor();
+ case Cursor::SouthEastPanning:
+ return southEastPanningCursor();
+ case Cursor::SouthWestPanning:
+ return southWestPanningCursor();
+ case Cursor::WestPanning:
+ return westPanningCursor();
+ case Cursor::Move:
+ return moveCursor();
+ case Cursor::VerticalText:
+ return verticalTextCursor();
+ case Cursor::Cell:
+ return cellCursor();
+ case Cursor::ContextMenu:
+ return contextMenuCursor();
+ case Cursor::Alias:
+ return aliasCursor();
+ case Cursor::Progress:
+ return progressCursor();
+ case Cursor::NoDrop:
+ return noDropCursor();
+ case Cursor::Copy:
+ return copyCursor();
+ case Cursor::None:
+ return noneCursor();
+ case Cursor::NotAllowed:
+ return notAllowedCursor();
+ case Cursor::ZoomIn:
+ return zoomInCursor();
+ case Cursor::ZoomOut:
+ return zoomOutCursor();
+ case Cursor::Grab:
+ return grabCursor();
+ case Cursor::Grabbing:
+ return grabbingCursor();
+ case Cursor::Custom:
+ ASSERT_NOT_REACHED();
+ }
+ return pointerCursor();
+}
+
+const char* nameForCursorType(Cursor::Type type)
+{
+ switch (type) {
+ case Cursor::Pointer:
+ return "Pointer";
+ case Cursor::Cross:
+ return "Cross";
+ case Cursor::Hand:
+ return "Hand";
+ case Cursor::IBeam:
+ return "IBeam";
+ case Cursor::Wait:
+ return "Wait";
+ case Cursor::Help:
+ return "Help";
+ case Cursor::EastResize:
+ return "EastResize";
+ case Cursor::NorthResize:
+ return "NorthResize";
+ case Cursor::NorthEastResize:
+ return "NorthEastResize";
+ case Cursor::NorthWestResize:
+ return "NorthWestResize";
+ case Cursor::SouthResize:
+ return "SouthResize";
+ case Cursor::SouthEastResize:
+ return "SouthEastResize";
+ case Cursor::SouthWestResize:
+ return "SouthWestResize";
+ case Cursor::WestResize:
+ return "WestResize";
+ case Cursor::NorthSouthResize:
+ return "NorthSouthResize";
+ case Cursor::EastWestResize:
+ return "EastWestResize";
+ case Cursor::NorthEastSouthWestResize:
+ return "NorthEastSouthWestResize";
+ case Cursor::NorthWestSouthEastResize:
+ return "NorthWestSouthEastResize";
+ case Cursor::ColumnResize:
+ return "ColumnResize";
+ case Cursor::RowResize:
+ return "RowResize";
+ case Cursor::MiddlePanning:
+ return "MiddlePanning";
+ case Cursor::EastPanning:
+ return "EastPanning";
+ case Cursor::NorthPanning:
+ return "NorthPanning";
+ case Cursor::NorthEastPanning:
+ return "NorthEastPanning";
+ case Cursor::NorthWestPanning:
+ return "NorthWestPanning";
+ case Cursor::SouthPanning:
+ return "SouthPanning";
+ case Cursor::SouthEastPanning:
+ return "SouthEastPanning";
+ case Cursor::SouthWestPanning:
+ return "SouthWestPanning";
+ case Cursor::WestPanning:
+ return "WestPanning";
+ case Cursor::Move:
+ return "Move";
+ case Cursor::VerticalText:
+ return "VerticalText";
+ case Cursor::Cell:
+ return "Cell";
+ case Cursor::ContextMenu:
+ return "ContextMenu";
+ case Cursor::Alias:
+ return "Alias";
+ case Cursor::Progress:
+ return "Progress";
+ case Cursor::NoDrop:
+ return "NoDrop";
+ case Cursor::Copy:
+ return "Copy";
+ case Cursor::None:
+ return "None";
+ case Cursor::NotAllowed:
+ return "NotAllowed";
+ case Cursor::ZoomIn:
+ return "ZoomIn";
+ case Cursor::ZoomOut:
+ return "ZoomOut";
+ case Cursor::Grab:
+ return "Grab";
+ case Cursor::Grabbing:
+ return "Grabbing";
+ case Cursor::Custom:
+ return "Custom";
+ }
+
+ return "ERROR";
+}
+
+#if USE(LAZY_NATIVE_CURSOR)
+
+Cursor::Cursor(Image* image, const IntPoint& hotSpot)
+ : m_type(Custom)
+ , m_image(image)
+ , m_hotSpot(determineHotSpot(image, hotSpot))
+ , m_platformCursor(0)
+{
+}
+
+Cursor::Cursor(Type type)
+ : m_type(type)
+ , m_platformCursor(0)
+{
+}
+
+PlatformCursor Cursor::platformCursor() const
+{
+ ensurePlatformCursor();
+ return m_platformCursor;
+}
+
+const Cursor& pointerCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Pointer));
+ return c;
+}
+
+const Cursor& crossCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Cross));
+ return c;
+}
+
+const Cursor& handCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Hand));
+ return c;
+}
+
+const Cursor& moveCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Move));
+ return c;
+}
+
+const Cursor& verticalTextCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::VerticalText));
+ return c;
+}
+
+const Cursor& cellCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Cell));
+ return c;
+}
+
+const Cursor& contextMenuCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ContextMenu));
+ return c;
+}
+
+const Cursor& aliasCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Alias));
+ return c;
+}
+
+const Cursor& zoomInCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ZoomIn));
+ return c;
+}
+
+const Cursor& zoomOutCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ZoomOut));
+ return c;
+}
+
+const Cursor& copyCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Copy));
+ return c;
+}
+
+const Cursor& noneCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::None));
+ return c;
+}
+
+const Cursor& progressCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Progress));
+ return c;
+}
+
+const Cursor& noDropCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NoDrop));
+ return c;
+}
+
+const Cursor& notAllowedCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NotAllowed));
+ return c;
+}
+
+const Cursor& iBeamCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::IBeam));
+ return c;
+}
+
+const Cursor& waitCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Wait));
+ return c;
+}
+
+const Cursor& helpCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Help));
+ return c;
}
+
+const Cursor& eastResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::EastResize));
+ return c;
+}
+
+const Cursor& northResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthResize));
+ return c;
+}
+
+const Cursor& northEastResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthEastResize));
+ return c;
+}
+
+const Cursor& northWestResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthWestResize));
+ return c;
+}
+
+const Cursor& southResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthResize));
+ return c;
+}
+
+const Cursor& southEastResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthEastResize));
+ return c;
+}
+
+const Cursor& southWestResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthWestResize));
+ return c;
+}
+
+const Cursor& westResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::WestResize));
+ return c;
+}
+
+const Cursor& northSouthResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthSouthResize));
+ return c;
+}
+
+const Cursor& eastWestResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::EastWestResize));
+ return c;
+}
+
+const Cursor& northEastSouthWestResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthEastSouthWestResize));
+ return c;
+}
+
+const Cursor& northWestSouthEastResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthWestSouthEastResize));
+ return c;
+}
+
+const Cursor& columnResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::ColumnResize));
+ return c;
+}
+
+const Cursor& rowResizeCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::RowResize));
+ return c;
+}
+
+const Cursor& middlePanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::MiddlePanning));
+ return c;
+}
+
+const Cursor& eastPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::EastPanning));
+ return c;
+}
+
+const Cursor& northPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthPanning));
+ return c;
+}
+
+const Cursor& northEastPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthEastPanning));
+ return c;
+}
+
+const Cursor& northWestPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::NorthWestPanning));
+ return c;
+}
+
+const Cursor& southPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthPanning));
+ return c;
+}
+
+const Cursor& southEastPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthEastPanning));
+ return c;
+}
+
+const Cursor& southWestPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::SouthWestPanning));
+ return c;
+}
+
+const Cursor& westPanningCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::WestPanning));
+ return c;
+}
+
+const Cursor& grabCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Grab));
+ return c;
+}
+
+const Cursor& grabbingCursor()
+{
+ DEFINE_STATIC_LOCAL(Cursor, c, (Cursor::Grabbing));
+ return c;
+}
+
+#endif
+
+} // namespace WebCore
diff --git a/WebCore/platform/Cursor.h b/WebCore/platform/Cursor.h
index 12b1614..98d69b9 100644
--- a/WebCore/platform/Cursor.h
+++ b/WebCore/platform/Cursor.h
@@ -26,12 +26,15 @@
#ifndef Cursor_h
#define Cursor_h
+#include "Image.h"
+#include "IntPoint.h"
+#include <wtf/RefPtr.h>
+
#if PLATFORM(WIN)
typedef struct HICON__* HICON;
typedef HICON HCURSOR;
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
#elif PLATFORM(GTK)
typedef struct _GdkCursor GdkCursor;
#elif PLATFORM(QT)
@@ -59,10 +62,13 @@ typedef struct HICON__ *HICON;
typedef HICON HCURSOR;
#endif
+#if PLATFORM(WIN) || PLATFORM(MAC)
+#define WTF_USE_LAZY_NATIVE_CURSOR 1
+#endif
+
namespace WebCore {
class Image;
- class IntPoint;
#if PLATFORM(WIN)
class SharedCursor : public RefCounted<SharedCursor> {
@@ -75,55 +81,113 @@ namespace WebCore {
HCURSOR m_nativeCursor;
};
typedef RefPtr<SharedCursor> PlatformCursor;
- typedef HCURSOR PlatformCursorHandle;
#elif PLATFORM(MAC)
typedef NSCursor* PlatformCursor;
- typedef NSCursor* PlatformCursorHandle;
#elif PLATFORM(GTK)
typedef GdkCursor* PlatformCursor;
- typedef GdkCursor* PlatformCursorHandle;
#elif PLATFORM(EFL)
typedef const char* PlatformCursor;
- typedef const char* PlatformCursorHandle;
#elif PLATFORM(QT) && !defined(QT_NO_CURSOR)
typedef QCursor PlatformCursor;
- typedef QCursor* PlatformCursorHandle;
#elif PLATFORM(WX)
typedef wxCursor* PlatformCursor;
- typedef wxCursor* PlatformCursorHandle;
#elif PLATFORM(CHROMIUM)
// See PlatformCursor.h
- typedef void* PlatformCursorHandle;
#elif PLATFORM(HAIKU)
typedef BCursor* PlatformCursor;
- typedef BCursor* PlatformCursorHandle;
#else
typedef void* PlatformCursor;
- typedef void* PlatformCursorHandle;
#endif
class Cursor {
public:
+ enum Type {
+ Pointer,
+ Cross,
+ Hand,
+ IBeam,
+ Wait,
+ Help,
+ EastResize,
+ NorthResize,
+ NorthEastResize,
+ NorthWestResize,
+ SouthResize,
+ SouthEastResize,
+ SouthWestResize,
+ WestResize,
+ NorthSouthResize,
+ EastWestResize,
+ NorthEastSouthWestResize,
+ NorthWestSouthEastResize,
+ ColumnResize,
+ RowResize,
+ MiddlePanning,
+ EastPanning,
+ NorthPanning,
+ NorthEastPanning,
+ NorthWestPanning,
+ SouthPanning,
+ SouthEastPanning,
+ SouthWestPanning,
+ WestPanning,
+ Move,
+ VerticalText,
+ Cell,
+ ContextMenu,
+ Alias,
+ Progress,
+ NoDrop,
+ Copy,
+ None,
+ NotAllowed,
+ ZoomIn,
+ ZoomOut,
+ Grab,
+ Grabbing,
+ Custom
+ };
+
+ static const Cursor& fromType(Cursor::Type);
+
Cursor()
#if !PLATFORM(QT) && !PLATFORM(EFL)
- : m_impl(0)
+ : m_platformCursor(0)
#endif
- { }
+ {
+ }
Cursor(Image*, const IntPoint& hotSpot);
Cursor(const Cursor&);
~Cursor();
Cursor& operator=(const Cursor&);
+#if USE(LAZY_NATIVE_CURSOR)
+ Cursor(Type);
+ Type type() const { return m_type; }
+ Image* image() const { return m_image.get(); }
+ const IntPoint& hotSpot() const { return m_hotSpot; }
+ PlatformCursor platformCursor() const;
+#else
Cursor(PlatformCursor);
- PlatformCursor impl() const { return m_impl; }
+ PlatformCursor impl() const { return m_platformCursor; }
+#endif
private:
- PlatformCursor m_impl;
+#if USE(LAZY_NATIVE_CURSOR)
+ void ensurePlatformCursor() const;
+
+ Type m_type;
+ RefPtr<Image> m_image;
+ IntPoint m_hotSpot;
+#endif
+
+ mutable PlatformCursor m_platformCursor;
};
IntPoint determineHotSpot(Image*, const IntPoint& specifiedHotSpot);
-
+ const char* nameForCursorType(Cursor::Type);
+
const Cursor& pointerCursor();
const Cursor& crossCursor();
const Cursor& handCursor();
diff --git a/WebCore/platform/FileChooser.h b/WebCore/platform/FileChooser.h
index e93b9ac..fa25406 100644
--- a/WebCore/platform/FileChooser.h
+++ b/WebCore/platform/FileChooser.h
@@ -44,6 +44,9 @@ public:
virtual void valueChanged() = 0;
virtual void repaint() = 0;
virtual bool allowsMultipleFiles() = 0;
+#if ENABLE(DIRECTORY_UPLOAD)
+ virtual bool allowsDirectoryUpload() = 0;
+#endif
virtual String acceptTypes() = 0;
virtual void chooseIconForFiles(FileChooser*, const Vector<String>&) = 0;
virtual ~FileChooserClient();
@@ -70,6 +73,9 @@ public:
void iconLoaded(PassRefPtr<Icon>);
bool allowsMultipleFiles() const { return m_client ? m_client->allowsMultipleFiles() : false; }
+#if ENABLE(DIRECTORY_UPLOAD)
+ bool allowsDirectoryUpload() const { return m_client ? m_client->allowsDirectoryUpload() : false; }
+#endif
// Acceptable MIME types. It's an 'accept' attribute value of the corresponding INPUT element.
String acceptTypes() const { return m_client ? m_client->acceptTypes() : String(); }
diff --git a/WebCore/platform/HostWindow.h b/WebCore/platform/HostWindow.h
index e7316a7..b0ee653 100644
--- a/WebCore/platform/HostWindow.h
+++ b/WebCore/platform/HostWindow.h
@@ -31,6 +31,8 @@
namespace WebCore {
+class Cursor;
+
class HostWindow : public Noncopyable {
public:
virtual ~HostWindow() { }
@@ -56,6 +58,9 @@ public:
// To notify WebKit of scrollbar mode changes.
virtual void scrollbarsModeDidChange() const = 0;
+
+ // Request that the cursor change.
+ virtual void setCursor(const Cursor&) = 0;
};
} // namespace WebCore
diff --git a/WebCore/platform/KURLGoogle.cpp b/WebCore/platform/KURLGoogle.cpp
index b4c84a6..ac02630 100644
--- a/WebCore/platform/KURLGoogle.cpp
+++ b/WebCore/platform/KURLGoogle.cpp
@@ -48,7 +48,6 @@
#include <wtf/StdLibExtras.h>
#include <wtf/text/CString.h>
-#include <googleurl/src/url_canon_internal.h>
#include <googleurl/src/url_util.h>
using WTF::isASCIILower;
@@ -943,55 +942,13 @@ String decodeURLEscapeSequences(const String& str, const TextEncoding& encoding)
const char* input = cstr.data();
int inputLength = cstr.length();
- url_canon::RawCanonOutputT<char> unescaped;
- for (int i = 0; i < inputLength; i++) {
- if (input[i] == '%') {
- unsigned char ch;
- if (url_canon::DecodeEscaped(input, &i, inputLength, &ch))
- unescaped.push_back(ch);
- else {
- // Invalid escape sequence, copy the percent literal.
- unescaped.push_back('%');
- }
- } else {
- // Regular non-escaped 8-bit character.
- unescaped.push_back(input[i]);
- }
- }
- // Convert that 8-bit to UTF-16. It's not clear IE does this at all to
- // JavaScript URLs, but Firefox and Safari do.
- url_canon::RawCanonOutputT<url_parse::UTF16Char> utf16;
- for (int i = 0; i < unescaped.length(); i++) {
- unsigned char uch = static_cast<unsigned char>(unescaped.at(i));
- if (uch < 0x80) {
- // Non-UTF-8, just append directly
- utf16.push_back(uch);
- } else {
- // next_ch will point to the last character of the decoded
- // character.
- int nextCharacter = i;
- unsigned codePoint;
- if (url_canon::ReadUTFChar(unescaped.data(), &nextCharacter,
- unescaped.length(), &codePoint)) {
- // Valid UTF-8 character, convert to UTF-16.
- url_canon::AppendUTF16Value(codePoint, &utf16);
- i = nextCharacter;
- } else {
- // KURL.cpp strips any sequences that are not valid UTF-8. This
- // sounds scary. Instead, we just keep those invalid code
- // points and promote to UTF-16. We copy all characters from
- // the current position to the end of the identified sqeuqnce.
- while (i < nextCharacter) {
- utf16.push_back(static_cast<unsigned char>(unescaped.at(i)));
- i++;
- }
- utf16.push_back(static_cast<unsigned char>(unescaped.at(i)));
- }
- }
- }
+ url_canon::RawCanonOutputT<url_parse::UTF16Char> unescaped;
+
+ url_util::DecodeURLEscapeSequences(input, inputLength, &unescaped);
- return String(reinterpret_cast<UChar*>(utf16.data()), utf16.length());
+ return String(reinterpret_cast<UChar*>(unescaped.data()),
+ unescaped.length());
}
bool KURL::protocolIs(const char* protocol) const
diff --git a/WebCore/platform/MIMETypeRegistry.cpp b/WebCore/platform/MIMETypeRegistry.cpp
index d6ff588..e6eb209 100644
--- a/WebCore/platform/MIMETypeRegistry.cpp
+++ b/WebCore/platform/MIMETypeRegistry.cpp
@@ -302,6 +302,7 @@ static MediaMIMETypeMap& mediaMIMETypeMap()
{ "audio/x-m4a", "m4a" },
{ "audio/x-m4b", "m4b" },
{ "audio/x-m4p", "m4p" },
+ { "audio/mp4", "m4a" },
// MP3
{ "audio/mp3", "mp3" },
diff --git a/WebCore/platform/PopupMenuClient.h b/WebCore/platform/PopupMenuClient.h
index bffde92..a1396e8 100644
--- a/WebCore/platform/PopupMenuClient.h
+++ b/WebCore/platform/PopupMenuClient.h
@@ -42,6 +42,7 @@ public:
virtual void selectionCleared() = 0;
virtual String itemText(unsigned listIndex) const = 0;
+ virtual String itemLabel(unsigned listIndex) const = 0;
virtual String itemToolTip(unsigned listIndex) const = 0;
virtual String itemAccessibilityText(unsigned listIndex) const = 0;
virtual bool itemIsEnabled(unsigned listIndex) const = 0;
diff --git a/WebCore/platform/Widget.h b/WebCore/platform/Widget.h
index 45da67a..6303c6a 100644
--- a/WebCore/platform/Widget.h
+++ b/WebCore/platform/Widget.h
@@ -187,8 +187,8 @@ public:
virtual bool isFrameView() const { return false; }
virtual bool isPluginView() const { return false; }
- // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginWidget and PluginView can become one class.
- virtual bool isPluginWidget() const { return false; }
+ // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginViewBase and PluginView can become one class.
+ virtual bool isPluginViewBase() const { return false; }
virtual bool isScrollbar() const { return false; }
void removeFromParent();
diff --git a/WebCore/platform/brew/PopupMenuBrew.cpp b/WebCore/platform/brew/PopupMenuBrew.cpp
index 89f3fa1..eb03c66 100644
--- a/WebCore/platform/brew/PopupMenuBrew.cpp
+++ b/WebCore/platform/brew/PopupMenuBrew.cpp
@@ -40,6 +40,9 @@ PopupMenu::PopupMenu(PopupMenuClient* menuList)
PopupMenu::~PopupMenu()
{
+ // Tell client to destroy data related to this popup since this object is
+ // going away.
+ hide();
}
void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h
index 3284aae..2d9695e 100644
--- a/WebCore/platform/chromium/ChromiumBridge.h
+++ b/WebCore/platform/chromium/ChromiumBridge.h
@@ -241,6 +241,8 @@ namespace WebCore {
GraphicsContext*, int part, int state, int classicState, const IntRect&);
static void paintScrollbarTrack(
GraphicsContext*, int part, int state, int classicState, const IntRect&, const IntRect& alignRect);
+ static void paintSpinButton(
+ GraphicsContext*, int part, int state, int classicState, const IntRect&);
static void paintTextField(
GraphicsContext*, int part, int state, int classicState, const IntRect&, const Color&, bool fillContentArea, bool drawEdges);
static void paintTrackbar(
diff --git a/WebCore/platform/chromium/CursorChromium.cpp b/WebCore/platform/chromium/CursorChromium.cpp
index 16fa634..0119f07 100644
--- a/WebCore/platform/chromium/CursorChromium.cpp
+++ b/WebCore/platform/chromium/CursorChromium.cpp
@@ -34,12 +34,12 @@
namespace WebCore {
Cursor::Cursor(const Cursor& other)
- : m_impl(other.m_impl)
+ : m_platformCursor(other.m_platformCursor)
{
}
Cursor::Cursor(Image* image, const IntPoint& hotSpot)
- : m_impl(image, hotSpot)
+ : m_platformCursor(image, hotSpot)
{
}
@@ -49,12 +49,12 @@ Cursor::~Cursor()
Cursor& Cursor::operator=(const Cursor& other)
{
- m_impl = other.m_impl;
+ m_platformCursor = other.m_platformCursor;
return *this;
}
Cursor::Cursor(PlatformCursor c)
- : m_impl(c)
+ : m_platformCursor(c)
{
}
diff --git a/WebCore/platform/chromium/GLES2Context.h b/WebCore/platform/chromium/GLES2Context.h
index b72329a..d37885a 100644
--- a/WebCore/platform/chromium/GLES2Context.h
+++ b/WebCore/platform/chromium/GLES2Context.h
@@ -43,14 +43,8 @@ class Page;
class GLES2Context : public Noncopyable {
public:
- // Creates a GL ES context that draws directly to the window associated with
- // the Page.
- static PassOwnPtr<GLES2Context> createOnscreen(Page*);
-
- // Creates a GL ES context that renders offscreen, optionally as a child
- // of the given parent if specified.
- static PassOwnPtr<GLES2Context> createOffscreen(GLES2Context* parent);
-
+ // Used by the implementation only
+ static PassOwnPtr<GLES2Context> create(PassOwnPtr<GLES2ContextInternal>);
~GLES2Context();
bool makeCurrent();
@@ -65,6 +59,8 @@ public:
unsigned getOffscreenContentParentTextureId();
private:
+ GLES2Context();
+
friend class GLES2ContextInternal;
OwnPtr<GLES2ContextInternal> m_internal;
};
diff --git a/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp b/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp
new file mode 100644
index 0000000..1f74840
--- /dev/null
+++ b/WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformThemeChromiumGtk.h"
+
+namespace WebCore {
+
+unsigned PlatformThemeChromiumGtk::s_thumbInactiveColor = 0xeaeaea;
+unsigned PlatformThemeChromiumGtk::s_thumbActiveColor = 0xf4f4f4;
+unsigned PlatformThemeChromiumGtk::s_trackColor = 0xd3d3d3;
+
+void PlatformThemeChromiumGtk::setScrollbarColors(
+ SkColor inactiveColor, SkColor activeColor, SkColor trackColor)
+{
+ s_thumbInactiveColor = inactiveColor;
+ s_thumbActiveColor = activeColor;
+ s_trackColor = trackColor;
+}
+
+static SkScalar clamp(SkScalar value, SkScalar min, SkScalar max)
+{
+ return std::min(std::max(value, min), max);
+}
+
+SkColor PlatformThemeChromiumGtk::saturateAndBrighten(const SkScalar hsv[3], SkScalar saturateAmount, SkScalar brightenAmount)
+{
+ SkScalar color[3];
+ color[0] = hsv[0];
+ color[1] = clamp(hsv[1] + saturateAmount, 0.0, 1.0);
+ color[2] = clamp(hsv[2] + brightenAmount, 0.0, 1.0);
+ return SkHSVToColor(color);
+}
+
+SkColor PlatformThemeChromiumGtk::outlineColor(const SkScalar hsv1[3], const SkScalar hsv2[3])
+{
+ // GTK Theme engines have way too much control over the layout of
+ // the scrollbar. We might be able to more closely approximate its
+ // look-and-feel, if we sent whole images instead of just colors
+ // from the browser to the renderer. But even then, some themes
+ // would just break.
+ //
+ // So, instead, we don't even try to 100% replicate the look of
+ // the native scrollbar. We render our own version, but we make
+ // sure to pick colors that blend in nicely with the system GTK
+ // theme. In most cases, we can just sample a couple of pixels
+ // from the system scrollbar and use those colors to draw our
+ // scrollbar.
+ //
+ // This works fine for the track color and the overall thumb
+ // color. But it fails spectacularly for the outline color used
+ // around the thumb piece. Not all themes have a clearly defined
+ // outline. For some of them it is partially transparent, and for
+ // others the thickness is very unpredictable.
+ //
+ // So, instead of trying to approximate the system theme, we
+ // instead try to compute a reasonable looking choice based on the
+ // known color of the track and the thumb piece. This is difficult
+ // when trying to deal both with high- and low-contrast themes,
+ // and both with positive and inverted themes.
+ //
+ // The following code has been tested to look OK with all of the
+ // default GTK themes.
+ SkScalar minDiff = clamp((hsv1[1] + hsv2[1]) * 1.2, 0.28, 0.5);
+ SkScalar diff = clamp(fabs(hsv1[2] - hsv2[2]) / 2, minDiff, 0.5);
+
+ if (hsv1[2] + hsv2[2] > 1.0)
+ diff = -diff;
+
+ return saturateAndBrighten(hsv2, -0.2, diff);
+}
+
+void PlatformThemeChromiumGtk::paintArrowButton(GraphicsContext* gc, const IntRect& rect, ArrowDirection direction, ControlStates states)
+{
+ SkCanvas* const canvas = gc->platformContext()->canvas();
+ int widthMiddle, lengthMiddle;
+ SkPaint paint;
+ if (direction == North || direction == South) {
+ widthMiddle = rect.width() / 2 + 1;
+ lengthMiddle = rect.height() / 2 + 1;
+ } else {
+ lengthMiddle = rect.width() / 2 + 1;
+ widthMiddle = rect.height() / 2 + 1;
+ }
+
+ // Calculate button color.
+ SkScalar trackHSV[3];
+ SkColorToHSV(trackColor(), trackHSV);
+ SkColor buttonColor = saturateAndBrighten(trackHSV, 0, 0.2);
+ SkColor backgroundColor = buttonColor;
+ if (states & PressedState) {
+ SkScalar buttonHSV[3];
+ SkColorToHSV(buttonColor, buttonHSV);
+ buttonColor = saturateAndBrighten(buttonHSV, 0, -0.1);
+ } else if (states & HoverState) {
+ SkScalar buttonHSV[3];
+ SkColorToHSV(buttonColor, buttonHSV);
+ buttonColor = saturateAndBrighten(buttonHSV, 0, 0.05);
+ }
+
+ SkIRect skrect;
+ skrect.set(rect.x(), rect.y(), rect.x() + rect.width(), rect.y() + rect.height());
+ // Paint the background (the area visible behind the rounded corners).
+ paint.setColor(backgroundColor);
+ canvas->drawIRect(skrect, paint);
+
+ // Paint the button's outline and fill the middle
+ SkPath outline;
+ switch (direction) {
+ case North:
+ outline.moveTo(rect.x() + 0.5, rect.y() + rect.height() + 0.5);
+ outline.rLineTo(0, -(rect.height() - 2));
+ outline.rLineTo(2, -2);
+ outline.rLineTo(rect.width() - 5, 0);
+ outline.rLineTo(2, 2);
+ outline.rLineTo(0, rect.height() - 2);
+ break;
+ case South:
+ outline.moveTo(rect.x() + 0.5, rect.y() - 0.5);
+ outline.rLineTo(0, rect.height() - 2);
+ outline.rLineTo(2, 2);
+ outline.rLineTo(rect.width() - 5, 0);
+ outline.rLineTo(2, -2);
+ outline.rLineTo(0, -(rect.height() - 2));
+ break;
+ case East:
+ outline.moveTo(rect.x() - 0.5, rect.y() + 0.5);
+ outline.rLineTo(rect.width() - 2, 0);
+ outline.rLineTo(2, 2);
+ outline.rLineTo(0, rect.height() - 5);
+ outline.rLineTo(-2, 2);
+ outline.rLineTo(-(rect.width() - 2), 0);
+ break;
+ case West:
+ outline.moveTo(rect.x() + rect.width() + 0.5, rect.y() + 0.5);
+ outline.rLineTo(-(rect.width() - 2), 0);
+ outline.rLineTo(-2, 2);
+ outline.rLineTo(0, rect.height() - 5);
+ outline.rLineTo(2, 2);
+ outline.rLineTo(rect.width() - 2, 0);
+ break;
+ }
+ outline.close();
+
+ paint.setStyle(SkPaint::kFill_Style);
+ paint.setColor(buttonColor);
+ canvas->drawPath(outline, paint);
+
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkScalar thumbHSV[3];
+ SkColorToHSV(thumbInactiveColor(), thumbHSV);
+ paint.setColor(outlineColor(trackHSV, thumbHSV));
+ canvas->drawPath(outline, paint);
+
+ // If the button is disabled, the arrow is drawn with the outline color.
+ if (states & EnabledState)
+ paint.setColor(SK_ColorBLACK);
+
+ paint.setAntiAlias(false);
+ paint.setStyle(SkPaint::kFill_Style);
+
+ SkPath path;
+ // The constants in this block of code are hand-tailored to produce good
+ // looking arrows without anti-aliasing.
+ switch (direction) {
+ case North:
+ path.moveTo(rect.x() + widthMiddle - 4, rect.y() + lengthMiddle + 2);
+ path.rLineTo(7, 0);
+ path.rLineTo(-4, -4);
+ break;
+ case South:
+ path.moveTo(rect.x() + widthMiddle - 4, rect.y() + lengthMiddle - 3);
+ path.rLineTo(7, 0);
+ path.rLineTo(-4, 4);
+ break;
+ case East:
+ path.moveTo(rect.x() + lengthMiddle - 3, rect.y() + widthMiddle - 4);
+ path.rLineTo(0, 7);
+ path.rLineTo(4, -4);
+ break;
+ case West:
+ path.moveTo(rect.x() + lengthMiddle + 1, rect.y() + widthMiddle - 5);
+ path.rLineTo(0, 9);
+ path.rLineTo(-4, -4);
+ break;
+ }
+ path.close();
+
+ canvas->drawPath(path, paint);
+}
+
+} // namespace WebCore
+
diff --git a/WebCore/platform/chromium/PlatformThemeChromiumGtk.h b/WebCore/platform/chromium/PlatformThemeChromiumGtk.h
new file mode 100644
index 0000000..bdc2683
--- /dev/null
+++ b/WebCore/platform/chromium/PlatformThemeChromiumGtk.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PlatformThemeChromiumGtk_h
+#define PlatformThemeChromiumGtk_h
+
+#include "PlatformContextSkia.h"
+#include "SkColor.h"
+#include "SkScalar.h"
+#include "ThemeTypes.h"
+
+namespace WebCore {
+
+class PlatformThemeChromiumGtk {
+public:
+ enum ArrowDirection {
+ North,
+ East,
+ South,
+ West,
+ };
+
+ static void setScrollbarColors(unsigned inactiveColor,
+ unsigned activeColor,
+ unsigned trackColor);
+ static unsigned thumbInactiveColor() { return s_thumbInactiveColor; }
+ static unsigned thumbActiveColor() { return s_thumbActiveColor; }
+ static unsigned trackColor() { return s_trackColor; }
+
+ static SkColor saturateAndBrighten(const SkScalar hsv[3], SkScalar saturateAmount, SkScalar brightenAmount);
+ static SkColor outlineColor(const SkScalar hsv1[3], const SkScalar hsv2[3]);
+ static void paintArrowButton(GraphicsContext*, const IntRect&, ArrowDirection, ControlStates);
+
+private:
+ PlatformThemeChromiumGtk() {}
+
+ static unsigned s_thumbInactiveColor;
+ static unsigned s_thumbActiveColor;
+ static unsigned s_trackColor;
+};
+
+} // namespace WebCore
+
+#endif // PlatformThemeChromiumGtk_h
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 7e3a2a0..4701a75 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -70,6 +70,7 @@ typedef unsigned long long TimeStamp;
static const int kMaxVisibleRows = 20;
static const int kMaxHeight = 500;
static const int kBorderSize = 1;
+static const int kTextToLabelPadding = 10;
static const TimeStamp kTypeAheadTimeoutMs = 1000;
// The settings used for the drop down menu.
@@ -751,8 +752,11 @@ bool PopupListBox::handleKeyEvent(const PlatformKeyboardEvent& event)
if (event.windowsVirtualKeyCode() == VKEY_TAB) {
// TAB is a special case as it should select the current item if any and
// advance focus.
- if (m_selectedIndex >= 0)
- m_popupClient->setTextFromItem(m_selectedIndex);
+ if (m_selectedIndex >= 0) {
+ acceptIndex(m_selectedIndex); // May delete us.
+ // Return false so the TAB key event is propagated to the page.
+ return false;
+ }
// Call abandon() so we honor m_acceptedIndexOnAbandon if set.
abandon();
// Return false so the TAB key event is propagated to the page.
@@ -873,13 +877,17 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd
PopupMenuStyle style = m_popupClient->itemStyle(rowIndex);
// Paint background
- Color backColor, textColor;
+ Color backColor, textColor, labelColor;
if (rowIndex == m_selectedIndex) {
backColor = RenderTheme::defaultTheme()->activeListBoxSelectionBackgroundColor();
textColor = RenderTheme::defaultTheme()->activeListBoxSelectionForegroundColor();
+ labelColor = textColor;
} else {
backColor = style.backgroundColor();
textColor = style.foregroundColor();
+ // FIXME: for now the label color is hard-coded. It should be added to
+ // the PopupMenuStyle.
+ labelColor = Color(115, 115, 115);
}
// If we have a transparent background, make sure it has a color to blend
@@ -917,10 +925,23 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd
}
// Prepare text to be drawn.
String itemText = m_popupClient->itemText(rowIndex);
- if (m_settings.restrictWidthOfListBox) // truncate string to fit in.
- itemText = StringTruncator::rightTruncate(itemText, maxWidth, itemFont);
- unsigned length = itemText.length();
- const UChar* str = itemText.characters();
+ String itemLabel = m_popupClient->itemLabel(rowIndex);
+ if (m_settings.restrictWidthOfListBox) { // Truncate strings to fit in.
+ // FIXME: We should leftTruncate for the rtl case.
+ // StringTruncator::leftTruncate would have to be implemented.
+ String str = StringTruncator::rightTruncate(itemText, maxWidth, itemFont);
+ if (str != itemText) {
+ itemText = str;
+ // Don't display the label, we already don't have enough room for the
+ // item text.
+ itemLabel = "";
+ } else if (!itemLabel.isEmpty()) {
+ int availableWidth = maxWidth - kTextToLabelPadding -
+ StringTruncator::width(itemText, itemFont);
+ itemLabel = StringTruncator::rightTruncate(itemLabel, availableWidth, itemFont);
+ }
+ }
+
// Prepare the directionality to draw text.
bool rtl = false;
if (m_settings.itemTextDirectionalityHint == PopupContainerSettings::DOMElementDirection)
@@ -928,14 +949,31 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd
else if (m_settings.itemTextDirectionalityHint ==
PopupContainerSettings::FirstStrongDirectionalCharacterDirection)
rtl = itemText.defaultWritingDirection() == WTF::Unicode::RightToLeft;
- TextRun textRun(str, length, false, 0, 0, rtl);
+ TextRun textRun(itemText.characters(), itemText.length(), false, 0, 0, rtl);
// If the text is right-to-left, make it right-aligned by adjusting its
// beginning position.
if (rightAligned)
textX += maxWidth - itemFont.width(textRun);
+
// Draw the item text.
int textY = rowRect.y() + itemFont.ascent() + (rowRect.height() - itemFont.height()) / 2;
gc->drawBidiText(itemFont, textRun, IntPoint(textX, textY));
+
+ // Draw the the label if applicable.
+ if (itemLabel.isEmpty())
+ return;
+ TextRun labelTextRun(itemLabel.characters(), itemLabel.length(), false, 0, 0, rtl);
+ if (rightAligned)
+ textX = max(0, m_popupClient->clientPaddingLeft() - m_popupClient->clientInsetLeft());
+ else {
+ // We are using the left padding as the right padding includes room for the scroll-bar which
+ // does not show in this case.
+ int rightPadding = max(0, m_popupClient->clientPaddingLeft() - m_popupClient->clientInsetLeft());
+ textX = rowRect.width() - rightPadding - itemFont.width(labelTextRun);
+ }
+
+ gc->setFillColor(labelColor, DeviceColorSpace);
+ gc->drawBidiText(itemFont, labelTextRun, IntPoint(textX, textY));
}
Font PopupListBox::getRowFont(int rowIndex)
diff --git a/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp b/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
index a9cff9f..19b4a54 100644
--- a/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
+++ b/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp
@@ -33,8 +33,7 @@
#include "PlatformContextSkia.h"
#include "PlatformMouseEvent.h"
-#include "RenderTheme.h"
-#include "RenderThemeChromiumLinux.h"
+#include "PlatformThemeChromiumGtk.h"
#include "Scrollbar.h"
#include "TransformationMatrix.h"
@@ -78,60 +77,6 @@ static void drawBox(SkCanvas* canvas, const IntRect& rect, const SkPaint& paint)
drawVertLine(canvas, rect.x(), rect.y(), bottom, paint);
}
-static SkScalar clamp(SkScalar value, SkScalar min, SkScalar max)
-{
- return std::min(std::max(value, min), max);
-}
-
-static SkColor saturateAndBrighten(SkScalar* hsv,
- SkScalar saturateAmount,
- SkScalar brightenAmount)
-{
- SkScalar color[3];
- color[0] = hsv[0];
- color[1] = clamp(hsv[1] + saturateAmount, 0.0, 1.0);
- color[2] = clamp(hsv[2] + brightenAmount, 0.0, 1.0);
- return SkHSVToColor(color);
-}
-
-static SkColor outlineColor(SkScalar* hsv1, SkScalar* hsv2)
-{
- // GTK Theme engines have way too much control over the layout of
- // the scrollbar. We might be able to more closely approximate its
- // look-and-feel, if we sent whole images instead of just colors
- // from the browser to the renderer. But even then, some themes
- // would just break.
- //
- // So, instead, we don't even try to 100% replicate the look of
- // the native scrollbar. We render our own version, but we make
- // sure to pick colors that blend in nicely with the system GTK
- // theme. In most cases, we can just sample a couple of pixels
- // from the system scrollbar and use those colors to draw our
- // scrollbar.
- //
- // This works fine for the track color and the overall thumb
- // color. But it fails spectacularly for the outline color used
- // around the thumb piece. Not all themes have a clearly defined
- // outline. For some of them it is partially transparent, and for
- // others the thickness is very unpredictable.
- //
- // So, instead of trying to approximate the system theme, we
- // instead try to compute a reasonable looking choice based on the
- // known color of the track and the thumb piece. This is difficult
- // when trying to deal both with high- and low-contrast themes,
- // and both with positive and inverted themes.
- //
- // The following code has been tested to look OK with all of the
- // default GTK themes.
- SkScalar minDiff = clamp((hsv1[1] + hsv2[1]) * 1.2, 0.28, 0.5);
- SkScalar diff = clamp(fabs(hsv1[2] - hsv2[2]) / 2, minDiff, 0.5);
-
- if (hsv1[2] + hsv2[2] > 1.0)
- diff = -diff;
-
- return saturateAndBrighten(hsv2, -0.2, diff);
-}
-
void ScrollbarThemeChromiumLinux::paintTrackPiece(GraphicsContext* gc, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart partType)
{
SkCanvas* const canvas = gc->platformContext()->canvas();
@@ -140,154 +85,47 @@ void ScrollbarThemeChromiumLinux::paintTrackPiece(GraphicsContext* gc, Scrollbar
skrect.set(rect.x(), rect.y(), rect.x() + rect.width(), rect.y() + rect.height());
SkScalar trackHSV[3];
- SkColorToHSV(RenderThemeChromiumLinux::trackColor(), trackHSV);
- paint.setColor(saturateAndBrighten(trackHSV, 0, 0));
+ SkColorToHSV(PlatformThemeChromiumGtk::trackColor(), trackHSV);
+ paint.setColor(PlatformThemeChromiumGtk::saturateAndBrighten(trackHSV, 0, 0));
canvas->drawIRect(skrect, paint);
SkScalar thumbHSV[3];
- SkColorToHSV(RenderThemeChromiumLinux::thumbInactiveColor(),
+ SkColorToHSV(PlatformThemeChromiumGtk::thumbInactiveColor(),
thumbHSV);
- paint.setColor(outlineColor(trackHSV, thumbHSV));
+ paint.setColor(PlatformThemeChromiumGtk::outlineColor(trackHSV, thumbHSV));
drawBox(canvas, rect, paint);
}
void ScrollbarThemeChromiumLinux::paintButton(GraphicsContext* gc, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart part)
{
- SkCanvas* const canvas = gc->platformContext()->canvas();
- static const int widthMiddle = scrollbarThicknessValue / 2 + 1;
- static const int lengthMiddle = buttonLength / 2 + 1;
- SkPaint paint;
- enum {
- North,
- East,
- South,
- West,
- } direction;
-
+ PlatformThemeChromiumGtk::ArrowDirection direction;
if (scrollbar->orientation() == HorizontalScrollbar) {
if (part == BackButtonStartPart)
- direction = West;
+ direction = PlatformThemeChromiumGtk::West;
else
- direction = East;
+ direction = PlatformThemeChromiumGtk::East;
} else {
if (part == BackButtonStartPart)
- direction = North;
+ direction = PlatformThemeChromiumGtk::North;
else
- direction = South;
+ direction = PlatformThemeChromiumGtk::South;
}
+ ControlStates states = 0;
// Determine if the button can be pressed.
- bool enabled = false;
- if (((direction == West || direction == North) && scrollbar->currentPos())
- || (direction == East || direction == South) && scrollbar->currentPos() != scrollbar->maximum())
- enabled = true;
-
- // Calculate button color.
- SkScalar trackHSV[3];
- SkColorToHSV(RenderThemeChromiumLinux::trackColor(), trackHSV);
- SkColor buttonColor = saturateAndBrighten(trackHSV, 0, 0.2);
- SkColor backgroundColor = buttonColor;
- if (part == scrollbar->pressedPart()) {
- SkScalar buttonHSV[3];
- SkColorToHSV(buttonColor, buttonHSV);
- buttonColor = saturateAndBrighten(buttonHSV, 0, -0.1);
- } else if (part == scrollbar->hoveredPart() && enabled) {
- SkScalar buttonHSV[3];
- SkColorToHSV(buttonColor, buttonHSV);
- buttonColor = saturateAndBrighten(buttonHSV, 0, 0.05);
- }
-
- SkIRect skrect;
- skrect.set(rect.x(), rect.y(), rect.x() + rect.width(), rect.y() + rect.height());
- // Paint the background (the area visible behind the rounded corners).
- paint.setColor(backgroundColor);
- canvas->drawIRect(skrect, paint);
-
- // Paint the button's outline and fill the middle
- SkPath outline;
- switch (direction) {
- case North:
- outline.moveTo(rect.x() + 0.5, rect.y() + rect.height() + 0.5);
- outline.rLineTo(0, -(rect.height() - 2));
- outline.rLineTo(2, -2);
- outline.rLineTo(rect.width() - 5, 0);
- outline.rLineTo(2, 2);
- outline.rLineTo(0, rect.height() - 2);
- break;
- case South:
- outline.moveTo(rect.x() + 0.5, rect.y() - 0.5);
- outline.rLineTo(0, rect.height() - 2);
- outline.rLineTo(2, 2);
- outline.rLineTo(rect.width() - 5, 0);
- outline.rLineTo(2, -2);
- outline.rLineTo(0, -(rect.height() - 2));
- break;
- case East:
- outline.moveTo(rect.x() - 0.5, rect.y() + 0.5);
- outline.rLineTo(rect.width() - 2, 0);
- outline.rLineTo(2, 2);
- outline.rLineTo(0, rect.height() - 5);
- outline.rLineTo(-2, 2);
- outline.rLineTo(-(rect.width() - 2), 0);
- break;
- case West:
- outline.moveTo(rect.x() + rect.width() + 0.5, rect.y() + 0.5);
- outline.rLineTo(-(rect.width() - 2), 0);
- outline.rLineTo(-2, 2);
- outline.rLineTo(0, rect.height() - 5);
- outline.rLineTo(2, 2);
- outline.rLineTo(rect.width() - 2, 0);
- break;
- }
- outline.close();
-
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(buttonColor);
- canvas->drawPath(outline, paint);
-
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- SkScalar thumbHSV[3];
- SkColorToHSV(RenderThemeChromiumLinux::thumbInactiveColor(), thumbHSV);
- paint.setColor(outlineColor(trackHSV, thumbHSV));
- canvas->drawPath(outline, paint);
-
- // If the button is disabled, the arrow is drawn with the outline color.
- if (enabled)
- paint.setColor(SK_ColorBLACK);
-
- paint.setAntiAlias(false);
- paint.setStyle(SkPaint::kFill_Style);
-
- SkPath path;
- // The constants in this block of code are hand-tailored to produce good
- // looking arrows without anti-aliasing.
- switch (direction) {
- case North:
- path.moveTo(rect.x() + widthMiddle - 4, rect.y() + lengthMiddle + 2);
- path.rLineTo(7, 0);
- path.rLineTo(-4, -4);
- break;
- case South:
- path.moveTo(rect.x() + widthMiddle - 4, rect.y() + lengthMiddle - 3);
- path.rLineTo(7, 0);
- path.rLineTo(-4, 4);
- break;
- case East:
- path.moveTo(rect.x() + lengthMiddle - 3, rect.y() + widthMiddle - 4);
- path.rLineTo(0, 7);
- path.rLineTo(4, -4);
- break;
- case West:
- path.moveTo(rect.x() + lengthMiddle + 1, rect.y() + widthMiddle - 5);
- path.rLineTo(0, 9);
- path.rLineTo(-4, -4);
- break;
+ if (((direction == PlatformThemeChromiumGtk::West || direction == PlatformThemeChromiumGtk::North) && scrollbar->currentPos())
+ || (direction == PlatformThemeChromiumGtk::East || direction == PlatformThemeChromiumGtk::South) && scrollbar->currentPos() != scrollbar->maximum())
+ states |= EnabledState;
+
+ if (states & EnabledState) {
+ if (part == scrollbar->pressedPart())
+ states |= PressedState;
+ else if (part == scrollbar->hoveredPart())
+ states |= HoverState;
}
- path.close();
- canvas->drawPath(path, paint);
+ PlatformThemeChromiumGtk::paintArrowButton(gc, rect, direction, states);
}
void ScrollbarThemeChromiumLinux::paintThumb(GraphicsContext* gc, Scrollbar* scrollbar, const IntRect& rect)
@@ -300,12 +138,12 @@ void ScrollbarThemeChromiumLinux::paintThumb(GraphicsContext* gc, Scrollbar* scr
SkScalar thumb[3];
SkColorToHSV(hovered
- ? RenderThemeChromiumLinux::thumbActiveColor()
- : RenderThemeChromiumLinux::thumbInactiveColor(),
+ ? PlatformThemeChromiumGtk::thumbActiveColor()
+ : PlatformThemeChromiumGtk::thumbInactiveColor(),
thumb);
SkPaint paint;
- paint.setColor(saturateAndBrighten(thumb, 0, 0.02));
+ paint.setColor(PlatformThemeChromiumGtk::saturateAndBrighten(thumb, 0, 0.02));
SkIRect skrect;
if (vertical)
@@ -315,7 +153,7 @@ void ScrollbarThemeChromiumLinux::paintThumb(GraphicsContext* gc, Scrollbar* scr
canvas->drawIRect(skrect, paint);
- paint.setColor(saturateAndBrighten(thumb, 0, -0.02));
+ paint.setColor(PlatformThemeChromiumGtk::saturateAndBrighten(thumb, 0, -0.02));
if (vertical)
skrect.set(midx + 1, rect.y(), rect.x() + rect.width(), rect.y() + rect.height());
@@ -325,8 +163,8 @@ void ScrollbarThemeChromiumLinux::paintThumb(GraphicsContext* gc, Scrollbar* scr
canvas->drawIRect(skrect, paint);
SkScalar track[3];
- SkColorToHSV(RenderThemeChromiumLinux::trackColor(), track);
- paint.setColor(outlineColor(track, thumb));
+ SkColorToHSV(PlatformThemeChromiumGtk::trackColor(), track);
+ paint.setColor(PlatformThemeChromiumGtk::outlineColor(track, thumb));
drawBox(canvas, rect, paint);
if (rect.height() > 10 && rect.width() > 10) {
diff --git a/WebCore/platform/chromium/ThemeChromiumMac.mm b/WebCore/platform/chromium/ThemeChromiumMac.mm
index 5769e38..68fd7b7 100644
--- a/WebCore/platform/chromium/ThemeChromiumMac.mm
+++ b/WebCore/platform/chromium/ThemeChromiumMac.mm
@@ -32,6 +32,7 @@
#import "LocalCurrentGraphicsContext.h"
#import "ScrollView.h"
#import "WebCoreSystemInterface.h"
+#import <Carbon/Carbon.h>
#include <wtf/StdLibExtras.h>
#import <objc/runtime.h>
@@ -210,9 +211,9 @@ static NSControlSize controlSizeForFont(const Font& font)
return NSMiniControlSize;
}
-static LengthSize sizeFromFont(const Font& font, const LengthSize& zoomedSize, float zoomFactor, const IntSize* sizes)
+static LengthSize sizeFromNSControlSize(NSControlSize nsControlSize, const LengthSize& zoomedSize, float zoomFactor, const IntSize* sizes)
{
- IntSize controlSize = sizes[controlSizeForFont(font)];
+ IntSize controlSize = sizes[nsControlSize];
if (zoomFactor != 1.0f)
controlSize = IntSize(controlSize.width() * zoomFactor, controlSize.height() * zoomFactor);
LengthSize result = zoomedSize;
@@ -223,19 +224,27 @@ static LengthSize sizeFromFont(const Font& font, const LengthSize& zoomedSize, f
return result;
}
-static void setControlSize(NSCell* cell, const IntSize* sizes, const IntSize& minZoomedSize, float zoomFactor)
+static LengthSize sizeFromFont(const Font& font, const LengthSize& zoomedSize, float zoomFactor, const IntSize* sizes)
+{
+ return sizeFromNSControlSize(controlSizeForFont(font), zoomedSize, zoomFactor, sizes);
+}
+
+static ControlSize controlSizeFromPixelSize(const IntSize* sizes, const IntSize& minZoomedSize, float zoomFactor)
{
- NSControlSize size;
if (minZoomedSize.width() >= static_cast<int>(sizes[NSRegularControlSize].width() * zoomFactor) &&
minZoomedSize.height() >= static_cast<int>(sizes[NSRegularControlSize].height() * zoomFactor))
- size = NSRegularControlSize;
- else if (minZoomedSize.width() >= static_cast<int>(sizes[NSSmallControlSize].width() * zoomFactor) &&
- minZoomedSize.height() >= static_cast<int>(sizes[NSSmallControlSize].height() * zoomFactor))
- size = NSSmallControlSize;
- else
- size = NSMiniControlSize;
+ return NSRegularControlSize;
+ if (minZoomedSize.width() >= static_cast<int>(sizes[NSSmallControlSize].width() * zoomFactor) &&
+ minZoomedSize.height() >= static_cast<int>(sizes[NSSmallControlSize].height() * zoomFactor))
+ return NSSmallControlSize;
+ return NSMiniControlSize;
+}
+
+static void setControlSize(NSCell* cell, const IntSize* sizes, const IntSize& minZoomedSize, float zoomFactor)
+{
+ ControlSize size = controlSizeFromPixelSize(sizes, minZoomedSize, zoomFactor);
if (size != [cell controlSize]) // Only update if we have to, since AppKit does work even if the size is the same.
- [cell setControlSize:size];
+ [cell setControlSize:(NSControlSize)size];
}
static void updateStates(NSCell* cell, ControlStates states)
@@ -277,6 +286,22 @@ static void updateStates(NSCell* cell, ControlStates states)
[cell setControlTint:tint];
}
+static ThemeDrawState convertControlStatesToThemeDrawState(ThemeButtonKind kind, ControlStates states)
+{
+ if (states & ReadOnlyState)
+ return kThemeStateUnavailableInactive;
+ if (!(states & EnabledState))
+ return kThemeStateUnavailableInactive;
+
+ // Do not process PressedState if !EnabledState or ReadOnlyState.
+ if (states & PressedState) {
+ if (kind == kThemeIncDecButton || kind == kThemeIncDecButtonSmall || kind == kThemeIncDecButtonMini)
+ return states & SpinUpState ? kThemeStatePressedUp : kThemeStatePressedDown;
+ return kThemeStatePressed;
+ }
+ return kThemeStateActive;
+}
+
static IntRect inflateRect(const IntRect& zoomedRect, const IntSize& zoomedSize, const int* margins, float zoomFactor)
{
// Only do the inflation if the available width/height are too small. Otherwise try to
@@ -571,6 +596,64 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
END_BLOCK_OBJC_EXCEPTIONS
}
+// Stepper
+
+static const IntSize* stepperSizes()
+{
+ static const IntSize sizes[3] = { IntSize(19, 27), IntSize(15, 22), IntSize(13, 15) };
+ return sizes;
+}
+
+// We don't use controlSizeForFont() for steppers because the stepper height
+// should be equal to or less than the corresponding text field height,
+static NSControlSize stepperControlSizeForFont(const Font& font)
+{
+ int fontSize = font.pixelSize();
+ if (fontSize >= 18)
+ return NSRegularControlSize;
+ if (fontSize >= 13)
+ return NSSmallControlSize;
+ return NSMiniControlSize;
+}
+
+static void paintStepper(ControlStates states, GraphicsContext* context, const IntRect& zoomedRect, float zoomFactor, ScrollView*)
+{
+ // We don't use NSStepperCell because there are no ways to draw an
+ // NSStepperCell with the up button highlighted.
+
+ HIThemeButtonDrawInfo drawInfo;
+ drawInfo.version = 0;
+ drawInfo.state = convertControlStatesToThemeDrawState(kThemeIncDecButton, states);
+ drawInfo.adornment = kThemeAdornmentDefault;
+ ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), zoomedRect.size(), zoomFactor);
+ if (controlSize == NSSmallControlSize)
+ drawInfo.kind = kThemeIncDecButtonSmall;
+ else if (controlSize == NSMiniControlSize)
+ drawInfo.kind = kThemeIncDecButtonMini;
+ else
+ drawInfo.kind = kThemeIncDecButton;
+
+ IntRect rect(zoomedRect);
+ context->save();
+ if (zoomFactor != 1.0f) {
+ rect.setWidth(rect.width() / zoomFactor);
+ rect.setHeight(rect.height() / zoomFactor);
+ context->translate(rect.x(), rect.y());
+ context->scale(FloatSize(zoomFactor, zoomFactor));
+ context->translate(-rect.x(), -rect.y());
+ }
+ CGRect bounds(rect);
+ // Adjust 'bounds' so that HIThemeDrawButton(bounds,...) draws exactly on 'rect'.
+ CGRect backgroundBounds;
+ HIThemeGetButtonBackgroundBounds(&bounds, &drawInfo, &backgroundBounds);
+ if (bounds.origin.x != backgroundBounds.origin.x)
+ bounds.origin.x += bounds.origin.x - backgroundBounds.origin.x;
+ if (bounds.origin.y != backgroundBounds.origin.y)
+ bounds.origin.y += bounds.origin.y - backgroundBounds.origin.y;
+ HIThemeDrawButton(&bounds, &drawInfo, context->platformContext(), kHIThemeOrientationNormal, 0);
+ context->restore();
+}
+
// Theme overrides
int ThemeChromiumMac::baselinePositionAdjustment(ControlPart part) const
@@ -613,6 +696,13 @@ LengthSize ThemeChromiumMac::controlSize(ControlPart part, const Font& font, con
case ListButtonPart:
return sizeFromFont(font, LengthSize(zoomedSize.width(), Length()), zoomFactor, listButtonSizes());
#endif
+ case InnerSpinButtonPart:
+ // We don't use inner spin buttons on Mac.
+ return LengthSize(Length(Fixed), Length(Fixed));
+ case OuterSpinButtonPart:
+ if (!zoomedSize.width().isIntrinsicOrAuto() && !zoomedSize.height().isIntrinsicOrAuto())
+ return zoomedSize;
+ return sizeFromNSControlSize(stepperControlSizeForFont(font), zoomedSize, zoomFactor, stepperSizes());
default:
return zoomedSize;
}
@@ -626,6 +716,14 @@ LengthSize ThemeChromiumMac::minimumControlSize(ControlPart part, const Font& fo
case ButtonPart:
case ListButtonPart:
return LengthSize(Length(0, Fixed), Length(static_cast<int>(15 * zoomFactor), Fixed));
+ case InnerSpinButtonPart:
+ // We don't use inner spin buttons on Mac.
+ return LengthSize(Length(Fixed), Length(Fixed));
+ case OuterSpinButtonPart: {
+ IntSize base = stepperSizes()[NSMiniControlSize];
+ return LengthSize(Length(static_cast<int>(base.width() * zoomFactor), Fixed),
+ Length(static_cast<int>(base.height() * zoomFactor), Fixed));
+ }
default:
return Theme::minimumControlSize(part, font, zoomFactor);
}
@@ -702,6 +800,15 @@ void ThemeChromiumMac::inflateControlPaintRect(ControlPart part, ControlStates s
}
break;
}
+ case OuterSpinButtonPart: {
+ static const int stepperMargin[4] = { 0, 0, 0, 0 };
+ ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), zoomedRect.size(), zoomFactor);
+ IntSize zoomedSize = stepperSizes()[controlSize];
+ zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
+ zoomedSize.setWidth(zoomedSize.width() * zoomFactor);
+ zoomedRect = inflateRect(zoomedRect, zoomedSize, stepperMargin, zoomFactor);
+ break;
+ }
default:
break;
}
@@ -724,6 +831,9 @@ void ThemeChromiumMac::paint(ControlPart part, ControlStates states, GraphicsCon
case ListButtonPart:
paintButton(part, states, context, zoomedRect, zoomFactor, scrollView);
break;
+ case OuterSpinButtonPart:
+ paintStepper(states, context, zoomedRect, zoomFactor, scrollView);
+ break;
default:
break;
}
diff --git a/WebCore/platform/efl/CursorEfl.cpp b/WebCore/platform/efl/CursorEfl.cpp
index c88830e..47141f9 100644
--- a/WebCore/platform/efl/CursorEfl.cpp
+++ b/WebCore/platform/efl/CursorEfl.cpp
@@ -45,33 +45,33 @@ namespace WebCore {
Cursor::Cursor(PlatformCursor p)
{
- m_impl = eina_stringshare_add(p);
+ m_platformCursor = eina_stringshare_add(p);
}
Cursor::Cursor(const Cursor& other)
{
- m_impl = eina_stringshare_ref(other.m_impl);
+ m_platformCursor = eina_stringshare_ref(other.m_platformCursor);
}
Cursor::~Cursor()
{
- if (m_impl) {
- eina_stringshare_del(m_impl);
- m_impl = 0;
+ if (m_platformCursor) {
+ eina_stringshare_del(m_platformCursor);
+ m_platformCursor = 0;
}
}
Cursor::Cursor(Image* image, const IntPoint& hotspot)
- : m_impl(0)
+ : m_platformCursor(0)
{
notImplemented();
}
Cursor& Cursor::operator=(const Cursor& other)
{
- eina_stringshare_ref(other.m_impl);
- eina_stringshare_del(m_impl);
- m_impl = other.m_impl;
+ eina_stringshare_ref(other.m_platformCursor);
+ eina_stringshare_del(m_platformCursor);
+ m_platformCursor = other.m_platformCursor;
return *this;
}
diff --git a/WebCore/platform/efl/PopupMenuEfl.cpp b/WebCore/platform/efl/PopupMenuEfl.cpp
index 4d9677b..9dc6986 100644
--- a/WebCore/platform/efl/PopupMenuEfl.cpp
+++ b/WebCore/platform/efl/PopupMenuEfl.cpp
@@ -39,6 +39,9 @@ PopupMenu::PopupMenu(PopupMenuClient* client)
PopupMenu::~PopupMenu()
{
+ // Tell client to destroy data related to this popup since this object is
+ // going away.
+ hide();
}
void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
diff --git a/WebCore/platform/efl/SoundEfl.cpp b/WebCore/platform/efl/SoundEfl.cpp
index c3b1eb3..091de7a 100644
--- a/WebCore/platform/efl/SoundEfl.cpp
+++ b/WebCore/platform/efl/SoundEfl.cpp
@@ -32,7 +32,6 @@
#ifdef HAVE_ECORE_X
#include <Ecore_X.h>
-#include <X11/Xlib.h>
#endif
namespace WebCore {
@@ -40,8 +39,7 @@ namespace WebCore {
void systemBeep()
{
#ifdef HAVE_ECORE_X
- Display* display = (Display*) ecore_x_display_get();
- XBell(display, 0);
+ ecore_x_bell(0);
#endif
}
diff --git a/WebCore/platform/efl/WidgetEfl.cpp b/WebCore/platform/efl/WidgetEfl.cpp
index 725e56f..6dbf2c2 100644
--- a/WebCore/platform/efl/WidgetEfl.cpp
+++ b/WebCore/platform/efl/WidgetEfl.cpp
@@ -211,8 +211,8 @@ void Widget::applyFallbackCursor()
int shape = cursorStringMap.cursor(m_data->m_cursorGroup.utf8().data());
if (shape < ECORE_X_CURSOR_X || shape > ECORE_X_CURSOR_XTERM) {
- fprintf(stderr, "ERROR: cannot map an equivalent X cursor for"
- " cursor group %s", m_data->m_cursorGroup.utf8().data());
+ LOG_ERROR("cannot map an equivalent X cursor for"
+ " c ursor group %s", m_data->m_cursorGroup.utf8().data());
shape = ECORE_X_CURSOR_LEFT_PTR;
}
@@ -221,29 +221,23 @@ void Widget::applyFallbackCursor()
ecore_x_window_cursor_set(win, cur);
return;
}
-#else
- fprintf(stderr, "ERROR: Ooops, no fallback to set cursor %s!\n",
- m_data->m_cursorGroup.utf8().data());
#endif
+ LOG("Ooops, no fallback to set cursor %s!\n",
+ m_data->m_cursorGroup.utf8().data());
}
void Widget::applyCursor()
{
- const char *file = 0;
- Evas_Coord x, y;
-
- String theme = edjeThemeRecursive();
- if (!theme.isNull())
- file = edjeThemeRecursive().utf8().data();
+ CString file = edjeThemeRecursive().utf8();
m_data->m_cursorObject = edje_object_add(evas());
- if (file && !edje_object_file_set(m_data->m_cursorObject, file, m_data->m_cursorGroup.utf8().data())) {
+ if (!file.isNull() && !edje_object_file_set(m_data->m_cursorObject, file.data(), m_data->m_cursorGroup.utf8().data())) {
evas_object_del(m_data->m_cursorObject);
m_data->m_cursorObject = 0;
ecore_evas_object_cursor_set(ecoreEvas(), 0, 0, 0, 0);
applyFallbackCursor();
} else {
- Evas_Coord w, h;
+ Evas_Coord x, y, w, h;
const char *d;
edje_object_size_min_get(m_data->m_cursorObject, &w, &h);
@@ -266,7 +260,7 @@ void Widget::applyCursor()
void Widget::setCursor(const Cursor& cursor)
{
- if (!platformWidget() || !evas())
+ if (!evas())
return;
const char *group = cursor.impl();
@@ -347,7 +341,9 @@ void Widget::setEvasObject(Evas_Object *o)
m_data->m_evasObject = o;
if (!o) {
m_data->m_evas = 0;
+#ifdef HAVE_ECORE_X
m_data->m_isUsingEcoreX = false;
+#endif
return;
}
diff --git a/WebCore/platform/graphics/Color.h b/WebCore/platform/graphics/Color.h
index 089d061..9335bc4 100644
--- a/WebCore/platform/graphics/Color.h
+++ b/WebCore/platform/graphics/Color.h
@@ -69,6 +69,11 @@ RGBA32 makeRGBAFromCMYKA(float c, float m, float y, float k, float a);
int differenceSquared(const Color&, const Color&);
+inline int redChannel(RGBA32 color) { return (color >> 16) & 0xFF; }
+inline int greenChannel(RGBA32 color) { return (color >> 8) & 0xFF; }
+inline int blueChannel(RGBA32 color) { return color & 0xFF; }
+inline int alphaChannel(RGBA32 color) { return (color >> 24) & 0xFF; }
+
class Color : public FastAllocBase {
public:
Color() : m_color(0), m_valid(false) { }
@@ -93,10 +98,10 @@ public:
bool hasAlpha() const { return alpha() < 255; }
- int red() const { return (m_color >> 16) & 0xFF; }
- int green() const { return (m_color >> 8) & 0xFF; }
- int blue() const { return m_color & 0xFF; }
- int alpha() const { return (m_color >> 24) & 0xFF; }
+ int red() const { return redChannel(m_color); }
+ int green() const { return greenChannel(m_color); }
+ int blue() const { return blueChannel(m_color); }
+ int alpha() const { return alphaChannel(m_color); }
RGBA32 rgb() const { return m_color; } // Preserve the alpha.
void setRGB(int r, int g, int b) { m_color = makeRGB(r, g, b); m_valid = true; }
diff --git a/WebCore/platform/graphics/FloatPoint.h b/WebCore/platform/graphics/FloatPoint.h
index 7443e97..5018f1d 100644
--- a/WebCore/platform/graphics/FloatPoint.h
+++ b/WebCore/platform/graphics/FloatPoint.h
@@ -80,7 +80,16 @@ public:
void setX(float x) { m_x = x; }
void setY(float y) { m_y = y; }
- void move(float dx, float dy) { m_x += dx; m_y += dy; }
+ void move(float dx, float dy)
+ {
+ m_x += dx;
+ m_y += dy;
+ }
+ void scale(float sx, float sy)
+ {
+ m_x *= sx;
+ m_y *= sy;
+ }
#if PLATFORM(CG)
FloatPoint(const CGPoint&);
@@ -122,6 +131,12 @@ inline FloatPoint& operator+=(FloatPoint& a, const FloatSize& b)
return a;
}
+inline FloatPoint& operator+=(FloatPoint& a, const FloatPoint& b)
+{
+ a.move(b.x(), b.y());
+ return a;
+}
+
inline FloatPoint& operator-=(FloatPoint& a, const FloatSize& b)
{
a.move(-b.width(), -b.height());
@@ -133,6 +148,11 @@ inline FloatPoint operator+(const FloatPoint& a, const FloatSize& b)
return FloatPoint(a.x() + b.width(), a.y() + b.height());
}
+inline FloatPoint operator+(const FloatPoint& a, const FloatPoint& b)
+{
+ return FloatPoint(a.x() + b.x(), a.y() + b.y());
+}
+
inline FloatSize operator-(const FloatPoint& a, const FloatPoint& b)
{
return FloatSize(a.x() - b.x(), a.y() - b.y());
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index 0351f7b..61f5707 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -72,7 +72,7 @@ Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
{
}
-Font::Font(const FontPlatformData& fontData, bool isPrinterFont)
+Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMode fontSmoothingMode)
: m_fontList(FontFallbackList::create())
, m_letterSpacing(0)
, m_wordSpacing(0)
@@ -80,6 +80,7 @@ Font::Font(const FontPlatformData& fontData, bool isPrinterFont)
, m_needsTranscoding(fontTranscoder().needsTranscoding(family().family().string()))
{
m_fontDescription.setUsePrinterFont(isPrinterFont);
+ m_fontDescription.setFontSmoothing(fontSmoothingMode);
m_fontList->setPlatformFont(fontData);
}
diff --git a/WebCore/platform/graphics/Font.h b/WebCore/platform/graphics/Font.h
index ecfde98..d6cf140 100644
--- a/WebCore/platform/graphics/Font.h
+++ b/WebCore/platform/graphics/Font.h
@@ -76,7 +76,7 @@ public:
Font();
Font(const FontDescription&, short letterSpacing, short wordSpacing);
// This constructor is only used if the platform wants to start with a native font.
- Font(const FontPlatformData&, bool isPrinting);
+ Font(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoothing);
~Font();
Font(const Font&);
@@ -135,7 +135,7 @@ public:
float xHeight() const { return primaryFont()->xHeight(); }
unsigned unitsPerEm() const { return primaryFont()->unitsPerEm(); }
int spaceWidth() const { return (int)ceilf(primaryFont()->adjustedSpaceWidth() + m_letterSpacing); }
- int tabWidth() const { return 8 * spaceWidth(); }
+ float tabWidth(const SimpleFontData& fontData) const { return 8 * ceilf(fontData.adjustedSpaceWidth() + letterSpacing()); }
const SimpleFontData* primaryFont() const;
const FontData* fontDataAt(unsigned) const;
diff --git a/WebCore/platform/graphics/GraphicsContext3D.h b/WebCore/platform/graphics/GraphicsContext3D.h
index 882362f..28388f4 100644
--- a/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/WebCore/platform/graphics/GraphicsContext3D.h
@@ -68,8 +68,13 @@ typedef int Platform3DObject;
const Platform3DObject NullPlatform3DObject = 0;
#endif
+#if PLATFORM(CG)
+#include <CoreGraphics/CGContext.h>
+#endif
+
namespace WebCore {
class WebGLActiveInfo;
+ class ArrayBuffer;
class ArrayBufferView;
class WebGLBuffer;
class Uint8Array;
@@ -551,7 +556,9 @@ namespace WebCore {
void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha);
void bufferData(unsigned long target, int size, unsigned long usage);
+ void bufferData(unsigned long target, ArrayBuffer* data, unsigned long usage);
void bufferData(unsigned long target, ArrayBufferView* data, unsigned long usage);
+ void bufferSubData(unsigned long target, long offset, ArrayBuffer* data);
void bufferSubData(unsigned long target, long offset, ArrayBufferView* data);
unsigned long checkFramebufferStatus(unsigned long target);
@@ -707,7 +714,14 @@ namespace WebCore {
void viewport(long x, long y, unsigned long width, unsigned long height);
void reshape(int width, int height);
-
+
+#if PLATFORM(CG)
+ void paintToCanvas(const unsigned char* imagePixels, int imageWidth, int imageHeight,
+ int canvasWidth, int canvasHeight, CGContextRef context);
+#endif
+
+ void paintRenderingResultsToCanvas(WebGLRenderingContext* context);
+
// Helpers for notification about paint events
void beginPaint(WebGLRenderingContext* context);
void endPaint();
diff --git a/WebCore/platform/graphics/GraphicsLayer.h b/WebCore/platform/graphics/GraphicsLayer.h
index 8fcebce..a5819f4 100644
--- a/WebCore/platform/graphics/GraphicsLayer.h
+++ b/WebCore/platform/graphics/GraphicsLayer.h
@@ -298,10 +298,11 @@ public:
virtual void setContentsToImage(Image*) { }
virtual void setContentsToMedia(PlatformLayer*) { } // video or plug-in
virtual void setContentsBackgroundColor(const Color&) { }
-
#if ENABLE(3D_CANVAS)
virtual void setContentsToWebGL(PlatformLayer*) { }
#endif
+ virtual bool hasContentsLayer() const { return false; }
+
// Callback from the underlying graphics system to draw layer contents.
void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip);
// Callback from the underlying graphics system when the layer has been displayed
@@ -351,6 +352,8 @@ public:
// pointers for the layers and timing data will be included in the returned string.
String layerTreeAsText(LayerTreeAsTextBehavior = LayerTreeAsTextBehaviorNormal) const;
+ bool usingTiledLayer() const { return m_usingTiledLayer; }
+
protected:
typedef Vector<TransformOperation::OperationType> TransformOperationList;
diff --git a/WebCore/platform/graphics/ImageBuffer.h b/WebCore/platform/graphics/ImageBuffer.h
index 9f9ba7e..cb5d63f 100644
--- a/WebCore/platform/graphics/ImageBuffer.h
+++ b/WebCore/platform/graphics/ImageBuffer.h
@@ -74,6 +74,11 @@ namespace WebCore {
GraphicsContext* context() const;
Image* image() const;
+#if PLATFORM(QT)
+ Image* imageForRendering() const;
+#else
+ Image* imageForRendering() const { return image(); }
+#endif
void clearImage() { m_image.clear(); }
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index 3915713..9290dfe 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -130,6 +130,7 @@ public:
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
virtual void deliverNotification(MediaPlayerProxyNotificationType) { }
virtual void setMediaPlayerProxy(WebMediaPlayerProxy*) { }
+ virtual void setControls(bool) { }
#endif
virtual bool hasSingleSecurityOrigin() const { return true; }
@@ -563,6 +564,21 @@ void MediaPlayer::setMediaPlayerProxy(WebMediaPlayerProxy* proxy)
m_playerProxy = proxy;
m_private->setMediaPlayerProxy(proxy);
}
+
+void MediaPlayer::setControls(bool controls)
+{
+ m_private->setControls(controls);
+}
+
+void MediaPlayer::enterFullscreen()
+{
+ m_private->enterFullscreen();
+}
+
+void MediaPlayer::exitFullscreen()
+{
+ m_private->exitFullscreen();
+}
#endif
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/MediaPlayer.h b/WebCore/platform/graphics/MediaPlayer.h
index 87f8fb4..dea5100 100644
--- a/WebCore/platform/graphics/MediaPlayer.h
+++ b/WebCore/platform/graphics/MediaPlayer.h
@@ -55,6 +55,7 @@ class QTMovieVisualContext;
namespace WebCore {
class GStreamerGWorld;
+class MediaPlayerPrivateInterface;
// Structure that will hold every native
// types supported by the current media player.
@@ -67,6 +68,7 @@ struct PlatformMedia {
QTMovieGWorldType,
QTMovieVisualContextType,
GStreamerGWorldType,
+ ChromiumMediaPlayerType,
} type;
union {
@@ -74,6 +76,7 @@ struct PlatformMedia {
QTMovieGWorld* qtMovieGWorld;
QTMovieVisualContext* qtMovieVisualContext;
GStreamerGWorld* gstreamerGWorld;
+ MediaPlayerPrivateInterface* chromiumMediaPlayer;
} media;
};
@@ -85,7 +88,6 @@ class GraphicsContext;
class IntRect;
class IntSize;
class MediaPlayer;
-class MediaPlayerPrivateInterface;
class String;
class TimeRanges;
@@ -256,6 +258,9 @@ public:
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
void deliverNotification(MediaPlayerProxyNotificationType notification);
void setMediaPlayerProxy(WebMediaPlayerProxy* proxy);
+ void setControls(bool);
+ void enterFullscreen();
+ void exitFullscreen();
#endif
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/MediaPlayerPrivate.h b/WebCore/platform/graphics/MediaPlayerPrivate.h
index 16ff543..40aeacb 100644
--- a/WebCore/platform/graphics/MediaPlayerPrivate.h
+++ b/WebCore/platform/graphics/MediaPlayerPrivate.h
@@ -107,6 +107,9 @@ public:
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
virtual void deliverNotification(MediaPlayerProxyNotificationType) = 0;
virtual void setMediaPlayerProxy(WebMediaPlayerProxy*) = 0;
+ virtual void setControls(bool) { }
+ virtual void enterFullscreen() { }
+ virtual void exitFullscreen() { }
#endif
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index b69670f..f2ae2df 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -124,6 +124,7 @@ namespace WebCore {
// Gets the current point of the current path, which is conceptually the final point reached by the path so far.
// Note the Path can be empty (isEmpty() == true) and still have a current point.
bool hasCurrentPoint() const;
+ FloatPoint currentPoint() const;
void moveTo(const FloatPoint&);
void addLineTo(const FloatPoint&);
diff --git a/WebCore/platform/graphics/WidthIterator.cpp b/WebCore/platform/graphics/WidthIterator.cpp
index 827cd10..ef047e8 100644
--- a/WebCore/platform/graphics/WidthIterator.cpp
+++ b/WebCore/platform/graphics/WidthIterator.cpp
@@ -84,7 +84,10 @@ void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
bool rtl = m_run.rtl();
bool hasExtraSpacing = (m_font->letterSpacing() || m_font->wordSpacing() || m_padding) && !m_run.spacingDisabled();
- float runWidthSoFar = m_runWidthSoFar;
+ float widthSinceLastRounding = m_runWidthSoFar;
+ m_runWidthSoFar = floorf(m_runWidthSoFar);
+ widthSinceLastRounding -= m_runWidthSoFar;
+
float lastRoundingWidth = m_finalRoundingWidth;
FloatRect bounds;
@@ -130,8 +133,8 @@ void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
// Now that we have a glyph and font data, get its width.
float width;
if (c == '\t' && m_run.allowTabs()) {
- float tabWidth = m_font->tabWidth();
- width = tabWidth - fmodf(m_run.xPos() + runWidthSoFar, tabWidth);
+ float tabWidth = m_font->tabWidth(*fontData);
+ width = tabWidth - fmodf(m_run.xPos() + m_runWidthSoFar + widthSinceLastRounding, tabWidth);
} else {
width = fontData->widthForGlyph(glyph);
@@ -216,11 +219,13 @@ void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
// width so that the total run width will be on an integer boundary.
if ((m_run.applyWordRounding() && currentCharacter < m_run.length() && Font::isRoundingHackCharacter(*cp))
|| (m_run.applyRunRounding() && currentCharacter >= m_end)) {
- float totalWidth = runWidthSoFar + width;
- width += ceilf(totalWidth) - totalWidth;
- }
-
- runWidthSoFar += width;
+ float totalWidth = widthSinceLastRounding + width;
+ widthSinceLastRounding = ceilf(totalWidth);
+ width += widthSinceLastRounding - totalWidth;
+ m_runWidthSoFar += widthSinceLastRounding;
+ widthSinceLastRounding = 0;
+ } else
+ widthSinceLastRounding += width;
if (glyphBuffer)
glyphBuffer->add(glyph, fontData, (rtl ? oldWidth + lastRoundingWidth : width));
@@ -235,7 +240,7 @@ void WidthIterator::advance(int offset, GlyphBuffer* glyphBuffer)
}
m_currentCharacter = currentCharacter;
- m_runWidthSoFar = runWidthSoFar;
+ m_runWidthSoFar += widthSinceLastRounding;
m_finalRoundingWidth = lastRoundingWidth;
}
diff --git a/WebCore/platform/graphics/cairo/FontCairo.cpp b/WebCore/platform/graphics/cairo/FontCairo.cpp
index 93051cb..9217a81 100644
--- a/WebCore/platform/graphics/cairo/FontCairo.cpp
+++ b/WebCore/platform/graphics/cairo/FontCairo.cpp
@@ -73,8 +73,8 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
FloatSize shadowSize;
float shadowBlur = 0;
Color shadowColor;
- bool hasShadow = context->textDrawingMode() == cTextFill &&
- context->getShadow(shadowSize, shadowBlur, shadowColor);
+ bool hasShadow = context->textDrawingMode() & cTextFill
+ && context->getShadow(shadowSize, shadowBlur, shadowColor);
// TODO: Blur support
if (hasShadow) {
diff --git a/WebCore/platform/graphics/cairo/PathCairo.cpp b/WebCore/platform/graphics/cairo/PathCairo.cpp
index 91cecd3..d880626 100644
--- a/WebCore/platform/graphics/cairo/PathCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PathCairo.cpp
@@ -86,6 +86,15 @@ bool Path::hasCurrentPoint() const
return !isEmpty();
}
+FloatPoint Path::currentPoint() const
+{
+ // FIXME: Is this the correct way?
+ double x;
+ double y;
+ cairo_get_current_point(platformPath()->m_cr, &x, &y);
+ return FloatPoint(x, y);
+}
+
void Path::translate(const FloatSize& p)
{
cairo_t* cr = platformPath()->m_cr;
diff --git a/WebCore/platform/graphics/cg/ColorCG.cpp b/WebCore/platform/graphics/cg/ColorCG.cpp
index e514fa3..9257642 100644
--- a/WebCore/platform/graphics/cg/ColorCG.cpp
+++ b/WebCore/platform/graphics/cg/ColorCG.cpp
@@ -73,10 +73,14 @@ Color::Color(CGColorRef color)
CGColorRef createCGColor(const Color& c)
{
CGColorRef color = NULL;
+#ifdef OBSOLETE_COLORSYNC_API
CMProfileRef prof = NULL;
CMGetSystemProfile(&prof);
-
RetainPtr<CGColorSpaceRef> rgbSpace(AdoptCF, CGColorSpaceCreateWithPlatformColorSpace(prof));
+#else
+ ColorSyncProfileRef prof = ColorSyncProfileCreateWithDisplayID(0);
+ RetainPtr<CGColorSpaceRef> rgbSpace(AdoptCF, CGColorSpaceCreateWithPlatformColorSpace(const_cast<void*>(reinterpret_cast<const void*>(prof))));
+#endif
if (rgbSpace) {
CGFloat components[4] = { static_cast<CGFloat>(c.red()) / 255, static_cast<CGFloat>(c.green()) / 255,
@@ -84,7 +88,12 @@ CGColorRef createCGColor(const Color& c)
color = CGColorCreate(rgbSpace.get(), components);
}
+#ifdef OBSOLETE_COLORSYNC_API
CMCloseProfile(prof);
+#else
+ if (prof)
+ CFRelease(prof);
+#endif
return color;
}
diff --git a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
index 9f0f353..8af3d0e 100644
--- a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
@@ -36,6 +36,8 @@
#include <CoreGraphics/CGContext.h>
#include <CoreGraphics/CGImage.h>
+#include <wtf/RetainPtr.h>
+
namespace WebCore {
bool GraphicsContext3D::getImageData(Image* image,
@@ -104,6 +106,41 @@ bool GraphicsContext3D::getImageData(Image* image,
format, type, neededAlphaOp, outputVector.data());
}
+void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, int imageWidth, int imageHeight, int canvasWidth, int canvasHeight, CGContextRef context)
+{
+ if (!imagePixels || imageWidth <= 0 || imageHeight <= 0 || canvasWidth <= 0 || canvasHeight <= 0 || !context)
+ return;
+ int rowBytes = imageWidth * 4;
+ RetainPtr<CGDataProviderRef> dataProvider = CGDataProviderCreateWithData(0, imagePixels, rowBytes * imageHeight, 0);
+ RetainPtr<CGColorSpaceRef> colorSpace = CGColorSpaceCreateDeviceRGB();
+ RetainPtr<CGImageRef> cgImage = CGImageCreate(imageWidth,
+ imageHeight,
+ 8,
+ 32,
+ rowBytes,
+ colorSpace.get(),
+ kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
+ dataProvider.get(),
+ 0,
+ false,
+ kCGRenderingIntentDefault);
+ // CSS styling may cause the canvas's content to be resized on
+ // the page. Go back to the Canvas to figure out the correct
+ // width and height to draw.
+ CGRect rect = CGRectMake(0, 0,
+ canvasWidth,
+ canvasHeight);
+ // We want to completely overwrite the previous frame's
+ // rendering results.
+ CGContextSaveGState(context);
+ CGContextSetBlendMode(context,
+ kCGBlendModeCopy);
+ CGContextSetInterpolationQuality(context,
+ kCGInterpolationNone);
+ CGContextDrawImage(context,
+ rect, cgImage.get());
+ CGContextRestoreGState(context);
+}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/cg/PathCG.cpp b/WebCore/platform/graphics/cg/PathCG.cpp
index eb196d9..90d4b8a 100644
--- a/WebCore/platform/graphics/cg/PathCG.cpp
+++ b/WebCore/platform/graphics/cg/PathCG.cpp
@@ -213,8 +213,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
void Path::closeSubpath()
{
- if (!CGPathIsEmpty(m_path)) // to silence a warning when trying to close an empty path
- CGPathCloseSubpath(m_path);
+ CGPathCloseSubpath(m_path);
}
void Path::addArc(const FloatPoint& p, float r, float sa, float ea, bool clockwise)
@@ -249,6 +248,11 @@ bool Path::hasCurrentPoint() const
{
return !isEmpty();
}
+
+FloatPoint Path::currentPoint() const
+{
+ return CGPathGetCurrentPoint(m_path);
+}
static void CGPathToCFStringApplierFunction(void* info, const CGPathElement *element)
{
diff --git a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
index dda10b7..9b54732 100644
--- a/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
+++ b/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp
@@ -43,7 +43,8 @@
namespace WebCore {
static SkPaint::Hinting skiaHinting = SkPaint::kNormal_Hinting;
-static bool isSkiaAntiAlias = true, isSkiaSubpixelGlyphs;
+static bool isSkiaAntiAlias = true;
+static bool isSkiaSubpixelGlyphs = false;
void FontPlatformData::setHinting(SkPaint::Hinting hinting)
{
diff --git a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
index 9b65346..a01a17f 100644
--- a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
@@ -363,9 +363,30 @@ void GraphicsLayerChromium::setContentsToWebGL(PlatformLayer* platformLayer)
}
#endif
-void GraphicsLayerChromium::setContentsToVideo(PlatformLayer* videoLayer)
+void GraphicsLayerChromium::setContentsToMedia(PlatformLayer* layer)
{
- // FIXME: Implement
+ bool childrenChanged = false;
+ if (layer) {
+ if (!m_contentsLayer.get() || m_contentsLayerPurpose != ContentsLayerForVideo) {
+ setupContentsLayer(layer);
+ m_contentsLayer = layer;
+ m_contentsLayerPurpose = ContentsLayerForVideo;
+ childrenChanged = true;
+ }
+ layer->setOwner(this);
+ layer->setNeedsDisplay();
+ updateContentsRect();
+ } else {
+ if (m_contentsLayer) {
+ childrenChanged = true;
+
+ // The old contents layer will be removed via updateSublayerList.
+ m_contentsLayer = 0;
+ }
+ }
+
+ if (childrenChanged)
+ updateSublayerList();
}
void GraphicsLayerChromium::setGeometryOrientation(CompositingCoordinatesOrientation orientation)
diff --git a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
index ccd02eb..cd5e479 100644
--- a/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
+++ b/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
@@ -85,7 +85,7 @@ public:
virtual void setContentsRect(const IntRect&);
virtual void setContentsToImage(Image*);
- virtual void setContentsToVideo(PlatformLayer*);
+ virtual void setContentsToMedia(PlatformLayer*);
virtual void setContentsToWebGL(PlatformLayer*);
virtual PlatformLayer* platformLayer() const;
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
index 9ac506c..b071385 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
@@ -37,7 +37,6 @@
#include "GLES2Context.h"
#include "LayerChromium.h"
#include "NotImplemented.h"
-#include "Page.h"
#include "TransformLayerChromium.h"
#include "WebGLLayerChromium.h"
#if PLATFORM(SKIA)
@@ -190,24 +189,24 @@ ShaderProgram::ShaderProgram()
{
}
-PassOwnPtr<LayerRendererChromium> LayerRendererChromium::create(Page* page)
+PassOwnPtr<LayerRendererChromium> LayerRendererChromium::create(PassOwnPtr<GLES2Context> gles2Context)
{
- return new LayerRendererChromium(page);
+ return new LayerRendererChromium(gles2Context);
}
-LayerRendererChromium::LayerRendererChromium(Page* page)
+LayerRendererChromium::LayerRendererChromium(PassOwnPtr<GLES2Context> gles2Context)
: m_rootLayer(0)
, m_needsDisplay(false)
, m_positionLocation(0)
, m_texCoordLocation(1)
- , m_page(page)
, m_rootLayerTextureWidth(0)
, m_rootLayerTextureHeight(0)
, m_scrollPosition(IntPoint(-1, -1))
, m_currentShaderProgramType(NumShaderProgramTypes)
+ , m_gles2Context(gles2Context)
{
m_quadVboIds[Vertices] = m_quadVboIds[LayerElements] = 0;
- m_hardwareCompositing = (initGL() && initializeSharedGLObjects());
+ m_hardwareCompositing = (m_gles2Context && initializeSharedGLObjects());
}
LayerRendererChromium::~LayerRendererChromium()
@@ -645,16 +644,6 @@ bool LayerRendererChromium::makeContextCurrent()
return m_gles2Context->makeCurrent();
}
-bool LayerRendererChromium::initGL()
-{
- m_gles2Context = GLES2Context::createOnscreen(m_page);
-
- if (!m_gles2Context)
- return false;
-
- return true;
-}
-
void LayerRendererChromium::bindCommonAttribLocations(ShaderProgramType program)
{
unsigned programId = m_shaderPrograms[program].m_shaderProgramId;
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.h b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
index dc7ea70..3b89dc6 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.h
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
@@ -45,7 +45,6 @@
namespace WebCore {
class GLES2Context;
-class Page;
class ShaderProgram {
public:
@@ -60,9 +59,9 @@ public:
// Class that handles drawing of composited render layers using GL.
class LayerRendererChromium : public Noncopyable {
public:
- static PassOwnPtr<LayerRendererChromium> create(Page* page);
+ static PassOwnPtr<LayerRendererChromium> create(PassOwnPtr<GLES2Context> gles2Context);
- LayerRendererChromium(Page* page);
+ LayerRendererChromium(PassOwnPtr<GLES2Context> gles2Context);
~LayerRendererChromium();
// Updates the contents of the root layer that fall inside the updateRect and recomposites
@@ -105,7 +104,6 @@ private:
enum VboIds { Vertices, LayerElements };
// These are here only temporarily and should be removed once we switch over to GGL
- bool initGL();
bool makeContextCurrent();
bool initializeSharedGLObjects();
@@ -151,9 +149,6 @@ private:
IntSize m_rootLayerCanvasSize;
OwnPtr<GLES2Context> m_gles2Context;
-
- // The WebCore Page that the compositor renders into.
- Page* m_page;
};
}
diff --git a/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp b/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp
new file mode 100644
index 0000000..5ac0e57
--- /dev/null
+++ b/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "VideoLayerChromium.h"
+
+namespace WebCore {
+
+PassRefPtr<VideoLayerChromium> VideoLayerChromium::create(GraphicsLayerChromium* owner)
+{
+ return adoptRef(new VideoLayerChromium(owner));
+}
+
+VideoLayerChromium::VideoLayerChromium(GraphicsLayerChromium* owner)
+ : LayerChromium(owner)
+{
+}
+
+}
+#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/chromium/VideoLayerChromium.h b/WebCore/platform/graphics/chromium/VideoLayerChromium.h
new file mode 100644
index 0000000..1fa8009
--- /dev/null
+++ b/WebCore/platform/graphics/chromium/VideoLayerChromium.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef VideoLayerChromium_h
+#define VideoLayerChromium_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "LayerChromium.h"
+
+namespace WebCore {
+
+// A Layer that contains a Video element.
+class VideoLayerChromium : public LayerChromium {
+public:
+ static PassRefPtr<VideoLayerChromium> create(GraphicsLayerChromium* owner = 0);
+ virtual bool drawsContent() { return true; }
+
+private:
+ VideoLayerChromium(GraphicsLayerChromium* owner);
+};
+
+}
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#endif
diff --git a/WebCore/platform/graphics/haiku/PathHaiku.cpp b/WebCore/platform/graphics/haiku/PathHaiku.cpp
index d8b6932..c5b8c98 100644
--- a/WebCore/platform/graphics/haiku/PathHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/PathHaiku.cpp
@@ -65,6 +65,14 @@ bool Path::hasCurrentPoint() const
return !isEmpty();
}
+FloatPoint Path::currentPoint() const
+{
+ // FIXME: implement safe way to return current point of subpath.
+ notImplemented();
+ float quietNaN = std::numeric_limits<float>::quiet_NaN();
+ return FloatPoint(quietNaN, quietNaN);
+}
+
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
return m_path->Contains(point);
diff --git a/WebCore/platform/graphics/mac/ComplexTextController.cpp b/WebCore/platform/graphics/mac/ComplexTextController.cpp
index 61c9a59..da381f2 100644
--- a/WebCore/platform/graphics/mac/ComplexTextController.cpp
+++ b/WebCore/platform/graphics/mac/ComplexTextController.cpp
@@ -431,6 +431,7 @@ void ComplexTextController::advance(unsigned offset, GlyphBuffer* glyphBuffer)
void ComplexTextController::adjustGlyphsAndAdvances()
{
+ CGFloat widthSinceLastRounding = 0;
size_t runCount = m_complexTextRuns.size();
for (size_t r = 0; r < runCount; ++r) {
ComplexTextRun& complexTextRun = *m_complexTextRuns[r];
@@ -473,8 +474,8 @@ void ComplexTextController::adjustGlyphsAndAdvances()
CGSize advance = treatAsSpace ? CGSizeMake(fontData->spaceWidth(), advances[i].height) : advances[i];
if (ch == '\t' && m_run.allowTabs()) {
- float tabWidth = m_font.tabWidth();
- advance.width = tabWidth - fmodf(m_run.xPos() + m_totalWidth, tabWidth);
+ float tabWidth = m_font.tabWidth(*fontData);
+ advance.width = tabWidth - fmodf(m_run.xPos() + m_totalWidth + widthSinceLastRounding, tabWidth);
} else if (ch == zeroWidthSpace || Font::treatAsZeroWidthSpace(ch) && !treatAsSpace) {
advance.width = 0;
glyph = fontData->spaceGlyph();
@@ -532,21 +533,23 @@ void ComplexTextController::adjustGlyphsAndAdvances()
// Check to see if the next character is a "rounding hack character", if so, adjust the
// width so that the total run width will be on an integer boundary.
if (m_run.applyWordRounding() && !lastGlyph && Font::isRoundingHackCharacter(nextCh) || m_run.applyRunRounding() && lastGlyph) {
- CGFloat totalWidth = m_totalWidth + advance.width;
- CGFloat extraWidth = ceilCGFloat(totalWidth) - totalWidth;
+ CGFloat totalWidth = widthSinceLastRounding + advance.width;
+ widthSinceLastRounding = ceilCGFloat(totalWidth);
+ CGFloat extraWidth = widthSinceLastRounding - totalWidth;
if (m_run.ltr())
advance.width += extraWidth;
else {
- m_totalWidth += extraWidth;
if (m_lastRoundingGlyph)
m_adjustedAdvances[m_lastRoundingGlyph - 1].width += extraWidth;
else
m_finalRoundingWidth = extraWidth;
m_lastRoundingGlyph = m_adjustedAdvances.size() + 1;
}
- }
+ m_totalWidth += widthSinceLastRounding;
+ widthSinceLastRounding = 0;
+ } else
+ widthSinceLastRounding += advance.width;
- m_totalWidth += advance.width;
advance.height *= -1;
m_adjustedAdvances.append(advance);
m_adjustedGlyphs.append(glyph);
@@ -565,6 +568,7 @@ void ComplexTextController::adjustGlyphsAndAdvances()
if (!isMonotonic)
complexTextRun.setIsNonMonotonic();
}
+ m_totalWidth += widthSinceLastRounding;
}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm b/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
index 961ec45..30c3b8e 100644
--- a/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
+++ b/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
@@ -34,14 +34,18 @@
#include "ImageBuffer.h"
#include "NotImplemented.h"
#include "WebGLActiveInfo.h"
+#include "ArrayBuffer.h"
#include "ArrayBufferView.h"
#include "WebGLBuffer.h"
#include "Float32Array.h"
#include "WebGLFramebuffer.h"
+#include "GraphicsContext.h"
+#include "HTMLCanvasElement.h"
#include "Int32Array.h"
#include "WebGLLayer.h"
#include "WebGLProgram.h"
#include "WebGLRenderbuffer.h"
+#include "WebGLRenderingContext.h"
#include "WebGLShader.h"
#include "WebGLTexture.h"
#include "Uint8Array.h"
@@ -236,6 +240,54 @@ void GraphicsContext3D::makeContextCurrent()
CGLSetCurrentContext(m_contextObj);
}
+void GraphicsContext3D::paintRenderingResultsToCanvas(WebGLRenderingContext* context)
+{
+ HTMLCanvasElement* canvas = context->canvas();
+ ImageBuffer* imageBuffer = canvas->buffer();
+
+ int rowBytes = m_currentWidth * 4;
+ int totalBytes = rowBytes * m_currentHeight;
+
+ OwnArrayPtr<unsigned char> pixels(new unsigned char[totalBytes]);
+ if (!pixels)
+ return;
+
+ CGLSetCurrentContext(m_contextObj);
+
+ bool mustRestoreFBO = false;
+ if (m_attrs.antialias) {
+ ::glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
+ ::glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
+ ::glBlitFramebufferEXT(0, 0, m_currentWidth, m_currentHeight, 0, 0, m_currentWidth, m_currentHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ ::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
+ mustRestoreFBO = true;
+ } else {
+ if (m_boundFBO != m_fbo) {
+ mustRestoreFBO = true;
+ ::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
+ }
+ }
+
+ GLint packAlignment = 4;
+ bool mustRestorePackAlignment = false;
+ ::glGetIntegerv(GL_PACK_ALIGNMENT, &packAlignment);
+ if (packAlignment > 4) {
+ ::glPixelStorei(GL_PACK_ALIGNMENT, 4);
+ mustRestorePackAlignment = true;
+ }
+
+ ::glReadPixels(0, 0, m_currentWidth, m_currentHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels.get());
+
+ if (mustRestorePackAlignment)
+ ::glPixelStorei(GL_PACK_ALIGNMENT, packAlignment);
+
+ if (mustRestoreFBO)
+ ::glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
+
+ paintToCanvas(pixels.get(), m_currentWidth, m_currentHeight,
+ canvas->width(), canvas->height(), imageBuffer->context()->platformContext());
+}
+
void GraphicsContext3D::beginPaint(WebGLRenderingContext* context)
{
UNUSED_PARAM(context);
@@ -494,6 +546,16 @@ void GraphicsContext3D::bufferData(unsigned long target, int size, unsigned long
ensureContext(m_contextObj);
::glBufferData(target, size, 0, usage);
}
+
+void GraphicsContext3D::bufferData(unsigned long target, ArrayBuffer* array, unsigned long usage)
+{
+ if (!array || !array->byteLength())
+ return;
+
+ ensureContext(m_contextObj);
+ ::glBufferData(target, array->byteLength(), array->data(), usage);
+}
+
void GraphicsContext3D::bufferData(unsigned long target, ArrayBufferView* array, unsigned long usage)
{
if (!array || !array->length())
@@ -503,6 +565,15 @@ void GraphicsContext3D::bufferData(unsigned long target, ArrayBufferView* array,
::glBufferData(target, array->byteLength(), array->baseAddress(), usage);
}
+void GraphicsContext3D::bufferSubData(unsigned long target, long offset, ArrayBuffer* array)
+{
+ if (!array || !array->byteLength())
+ return;
+
+ ensureContext(m_contextObj);
+ ::glBufferSubData(target, offset, array->byteLength(), array->data());
+}
+
void GraphicsContext3D::bufferSubData(unsigned long target, long offset, ArrayBufferView* array)
{
if (!array || !array->length())
@@ -1216,6 +1287,10 @@ void GraphicsContext3D::getIntegerv(unsigned long pname, int* value)
// Need to emulate IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for GL. Any valid
// combination should work, but GL_RGB/GL_UNSIGNED_BYTE might be the most
// useful for desktop WebGL users.
+ // Need to emulate MAX_FRAGMENT/VERTEX_UNIFORM_VECTORS and MAX_VARYING_VECTORS
+ // because desktop GL's corresponding queries return the number of components
+ // whereas GLES2 return the number of vectors (each vector has 4 components).
+ // Therefore, the value returned by desktop GL needs to be divided by 4.
ensureContext(m_contextObj);
switch (pname) {
case IMPLEMENTATION_COLOR_READ_FORMAT:
@@ -1224,6 +1299,18 @@ void GraphicsContext3D::getIntegerv(unsigned long pname, int* value)
case IMPLEMENTATION_COLOR_READ_TYPE:
*value = GL_UNSIGNED_BYTE;
break;
+ case MAX_FRAGMENT_UNIFORM_VECTORS:
+ ::glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, value);
+ *value /= 4;
+ break;
+ case MAX_VERTEX_UNIFORM_VECTORS:
+ ::glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, value);
+ *value /= 4;
+ break;
+ case MAX_VARYING_VECTORS:
+ ::glGetIntegerv(GL_MAX_VARYING_FLOATS, value);
+ *value /= 4;
+ break;
default:
::glGetIntegerv(pname, value);
}
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.h b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
index 7d78dee..80c822c 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.h
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.h
@@ -106,6 +106,7 @@ public:
#if ENABLE(3D_CANVAS)
virtual void setContentsToWebGL(PlatformLayer*);
#endif
+ virtual bool hasContentsLayer() const { return m_contentsLayer; }
virtual PlatformLayer* platformLayer() const;
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index 43b3f3e..9f1ac83 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -1057,11 +1057,11 @@ void GraphicsLayerCA::updateSublayerList()
void GraphicsLayerCA::updateLayerPosition()
{
- // FIXME: if constrained the size, the position will be wrong. Fixing this is not trivial.
+ FloatSize usedSize = m_usingTiledLayer ? constrainedSize() : m_size;
// Position is offset on the layer by the layer anchor point.
- CGPoint posPoint = CGPointMake(m_position.x() + m_anchorPoint.x() * m_size.width(),
- m_position.y() + m_anchorPoint.y() * m_size.height());
+ CGPoint posPoint = CGPointMake(m_position.x() + m_anchorPoint.x() * usedSize.width(),
+ m_position.y() + m_anchorPoint.y() * usedSize.height());
[primaryLayer() setPosition:posPoint];
@@ -2271,8 +2271,6 @@ void GraphicsLayerCA::updateContentsTransform()
contentsTransform = CGAffineTransformTranslate(contentsTransform, 0, -[m_layer.get() bounds].size.height);
[m_layer.get() setContentsTransform:contentsTransform];
}
-#else
- ASSERT(contentsOrientation() == CompositingCoordinatesTopDown);
#endif
}
diff --git a/WebCore/platform/graphics/mac/WebLayer.h b/WebCore/platform/graphics/mac/WebLayer.h
index af53ae6..3a91f04 100644
--- a/WebCore/platform/graphics/mac/WebLayer.h
+++ b/WebCore/platform/graphics/mac/WebLayer.h
@@ -53,12 +53,12 @@ namespace WebCore {
{
WebCore::GraphicsLayer* m_layerOwner;
}
-
-// Class method allows us to share implementation across TiledLayerMac and WebLayer
-+ (void)drawContents:(WebCore::GraphicsLayer*)layerContents ofLayer:(CALayer*)layer intoContext:(CGContextRef)context;
-
@end
+// Functions allows us to share implementation across WebTiledLayer and WebLayer
+void drawLayerContents(CGContextRef, CALayer *, WebCore::GraphicsLayer*);
+void setLayerNeedsDisplayInRect(CALayer *, WebCore::GraphicsLayer*, CGRect);
+
#endif // USE(ACCELERATED_COMPOSITING)
#endif // WebLayer_h
diff --git a/WebCore/platform/graphics/mac/WebLayer.mm b/WebCore/platform/graphics/mac/WebLayer.mm
index 0c9925e..9bb8212 100644
--- a/WebCore/platform/graphics/mac/WebLayer.mm
+++ b/WebCore/platform/graphics/mac/WebLayer.mm
@@ -31,6 +31,7 @@
#import "GraphicsContext.h"
#import "GraphicsLayer.h"
+#import <objc/objc-runtime.h>
#import <QuartzCore/QuartzCore.h>
#import <wtf/UnusedParam.h>
@@ -38,7 +39,7 @@ using namespace WebCore;
@implementation WebLayer
-+ (void)drawContents:(WebCore::GraphicsLayer*)layerContents ofLayer:(CALayer*)layer intoContext:(CGContextRef)context
+void drawLayerContents(CGContextRef context, CALayer *layer, WebCore::GraphicsLayer* layerContents)
{
if (!layerContents)
return;
@@ -110,6 +111,34 @@ using namespace WebCore;
CGContextRestoreGState(context);
}
+void setLayerNeedsDisplayInRect(CALayer *layer, WebCore::GraphicsLayer* layerContents, CGRect rect)
+{
+ if (layerContents && layerContents->client() && layerContents->drawsContent()) {
+ struct objc_super layerSuper = { layer, class_getSuperclass(object_getClass(layer)) };
+#if defined(BUILDING_ON_LEOPARD)
+ rect = CGRectApplyAffineTransform(rect, [layer contentsTransform]);
+#else
+ if (layerContents->contentsOrientation() == WebCore::GraphicsLayer::CompositingCoordinatesBottomUp)
+ rect.origin.y = [layer bounds].size.height - rect.origin.y - rect.size.height;
+#endif
+ objc_msgSendSuper(&layerSuper, @selector(setNeedsDisplayInRect:), rect);
+
+#ifndef NDEBUG
+ if (layerContents->showRepaintCounter()) {
+ CGRect bounds = [layer bounds];
+ CGRect indicatorRect = CGRectMake(bounds.origin.x, bounds.origin.y, 46, 25);
+#if defined(BUILDING_ON_LEOPARD)
+ indicatorRect = CGRectApplyAffineTransform(indicatorRect, [layer contentsTransform]);
+#else
+ if (layerContents->contentsOrientation() == WebCore::GraphicsLayer::CompositingCoordinatesBottomUp)
+ indicatorRect.origin.y = [layer bounds].size.height - indicatorRect.origin.y - indicatorRect.size.height;
+#endif
+ objc_msgSendSuper(&layerSuper, @selector(setNeedsDisplayInRect:), indicatorRect);
+ }
+#endif
+ }
+}
+
// Disable default animations
- (id<CAAction>)actionForKey:(NSString *)key
{
@@ -134,23 +163,7 @@ using namespace WebCore;
- (void)setNeedsDisplayInRect:(CGRect)dirtyRect
{
- if (m_layerOwner && m_layerOwner->client() && m_layerOwner->drawsContent()) {
-#if defined(BUILDING_ON_LEOPARD)
- dirtyRect = CGRectApplyAffineTransform(dirtyRect, [self contentsTransform]);
-#endif
- [super setNeedsDisplayInRect:dirtyRect];
-
-#ifndef NDEBUG
- if (m_layerOwner->showRepaintCounter()) {
- CGRect bounds = [self bounds];
- CGRect indicatorRect = CGRectMake(bounds.origin.x, bounds.origin.y, 46, 25);
-#if defined(BUILDING_ON_LEOPARD)
- indicatorRect = CGRectApplyAffineTransform(indicatorRect, [self contentsTransform]);
-#endif
- [super setNeedsDisplayInRect:indicatorRect];
- }
-#endif
- }
+ setLayerNeedsDisplayInRect(self, m_layerOwner, dirtyRect);
}
- (void)display
@@ -162,7 +175,7 @@ using namespace WebCore;
- (void)drawInContext:(CGContextRef)context
{
- [WebLayer drawContents:m_layerOwner ofLayer:self intoContext:context];
+ drawLayerContents(context, self, m_layerOwner);
}
@end // implementation WebLayer
diff --git a/WebCore/platform/graphics/mac/WebTiledLayer.mm b/WebCore/platform/graphics/mac/WebTiledLayer.mm
index 97ba233..72128ad 100644
--- a/WebCore/platform/graphics/mac/WebTiledLayer.mm
+++ b/WebCore/platform/graphics/mac/WebTiledLayer.mm
@@ -73,23 +73,7 @@ using namespace WebCore;
- (void)setNeedsDisplayInRect:(CGRect)dirtyRect
{
- if (m_layerOwner && m_layerOwner->client() && m_layerOwner->drawsContent()) {
-#if defined(BUILDING_ON_LEOPARD)
- dirtyRect = CGRectApplyAffineTransform(dirtyRect, [self contentsTransform]);
-#endif
- [super setNeedsDisplayInRect:dirtyRect];
-
-#ifndef NDEBUG
- if (m_layerOwner->showRepaintCounter()) {
- CGRect bounds = [self bounds];
- CGRect indicatorRect = CGRectMake(bounds.origin.x, bounds.origin.y, 46, 25);
-#if defined(BUILDING_ON_LEOPARD)
- indicatorRect = CGRectApplyAffineTransform(indicatorRect, [self contentsTransform]);
-#endif
- [super setNeedsDisplayInRect:indicatorRect];
- }
-#endif
- }
+ setLayerNeedsDisplayInRect(self, m_layerOwner, dirtyRect);
}
- (void)display
@@ -99,9 +83,9 @@ using namespace WebCore;
m_layerOwner->didDisplay(self);
}
-- (void)drawInContext:(CGContextRef)ctx
+- (void)drawInContext:(CGContextRef)context
{
- [WebLayer drawContents:m_layerOwner ofLayer:self intoContext:ctx];
+ drawLayerContents(context, self, m_layerOwner);
}
@end // implementation WebTiledLayer
diff --git a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
index 12ae09d..7f4547d 100644
--- a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
+++ b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
@@ -70,8 +70,8 @@ struct TableDirectoryEntry {
BigEndianULong length;
};
-#if !PLATFORM(CG)
-// Fixed type is not defined on non-CG platforms. |version| in sfntHeader
+#if !PLATFORM(CG) || !defined(COREGRAPHICS_INCLUDES_CORESERVICES_HEADER)
+// Fixed type is not defined on non-CG and Windows platforms. |version| in sfntHeader
// and headTable and |fontRevision| in headTable are of Fixed, but they're
// not actually refered to anywhere. Therefore, we just have to match
// the size (4 bytes). For the definition of Fixed type, see
diff --git a/WebCore/platform/graphics/openvg/PathOpenVG.cpp b/WebCore/platform/graphics/openvg/PathOpenVG.cpp
index 7e67036..e74ea57 100644
--- a/WebCore/platform/graphics/openvg/PathOpenVG.cpp
+++ b/WebCore/platform/graphics/openvg/PathOpenVG.cpp
@@ -123,6 +123,13 @@ Path& Path::operator=(const Path& other)
return *this;
}
+FloatPoint Path::currentPoint() const
+{
+ // FIXME: is this the way to return the current point of the subpath?
+ return m_currentPoint;
+}
+
+
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
notImplemented();
diff --git a/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp b/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
index 002765f..311d3a3 100644
--- a/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
@@ -521,6 +521,15 @@ void GraphicsContext3D::makeContextCurrent()
void GraphicsContext3D::beginPaint(WebGLRenderingContext* context)
{
+ paintRenderingResultsToCanvas();
+}
+
+void GraphicsContext3D::endPaint()
+{
+}
+
+void GraphicsContext3D::paintRenderingResultsToCanvas(WebGLRenderingContext* context)
+{
m_internal->m_glWidget->makeCurrent();
HTMLCanvasElement* canvas = context->canvas();
ImageBuffer* imageBuffer = canvas->buffer();
@@ -528,10 +537,6 @@ void GraphicsContext3D::beginPaint(WebGLRenderingContext* context)
paint(painter, QRect(QPoint(0, 0), QSize(m_currentWidth, m_currentHeight)));
}
-void GraphicsContext3D::endPaint()
-{
-}
-
void GraphicsContext3D::paint(QPainter* painter, const QRect& rect) const
{
#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 913a764..a828070 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -358,7 +358,7 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
StrokeStyle style = strokeStyle();
Color color = strokeColor();
- if (style == NoStroke || !color.alpha())
+ if (style == NoStroke)
return;
float width = strokeThickness();
@@ -467,7 +467,7 @@ void GraphicsContext::drawEllipse(const IntRect& rect)
void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSpan)
{
- if (paintingDisabled() || strokeStyle() == NoStroke || strokeThickness() <= 0.0f || !strokeColor().alpha())
+ if (paintingDisabled() || strokeStyle() == NoStroke || strokeThickness() <= 0.0f)
return;
QPainter* p = m_data->p();
@@ -567,23 +567,20 @@ void GraphicsContext::fillPath()
return;
QPainter* p = m_data->p();
- QPainterPath path = m_data->currentPath;
+ QPainterPath& path = m_data->currentPath; // Avoid detaching the QPainterPath
path.setFillRule(toQtFillRule(fillRule()));
- if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
- drawFilledShadowPath(this, p, path);
- if (m_common->state.fillPattern) {
- AffineTransform affine;
- p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
- } else if (m_common->state.fillGradient) {
- QBrush brush(*m_common->state.fillGradient->platformGradient());
- brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
- p->fillPath(path, brush);
- } else {
- if (fillColor().alpha())
- p->fillPath(path, p->brush());
- }
- }
+ drawFilledShadowPath(this, p, path);
+ if (m_common->state.fillPattern) {
+ AffineTransform affine;
+ p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
+ } else if (m_common->state.fillGradient) {
+ QBrush brush(*m_common->state.fillGradient->platformGradient());
+ brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
+ p->fillPath(path, brush);
+ } else
+ p->fillPath(path, p->brush());
+
m_data->currentPath = QPainterPath();
}
@@ -594,37 +591,33 @@ void GraphicsContext::strokePath()
QPainter* p = m_data->p();
QPen pen(p->pen());
- QPainterPath path = m_data->currentPath;
+ QPainterPath& path = m_data->currentPath; // Avoid detaching the QPainterPath
path.setFillRule(toQtFillRule(fillRule()));
- if (m_common->state.strokePattern || m_common->state.strokeGradient || strokeColor().alpha()) {
- FloatSize shadowSize;
- float shadowBlur;
- Color shadowColor;
- if (getShadow(shadowSize, shadowBlur, shadowColor)) {
- QTransform t(p->worldTransform());
- p->translate(shadowSize.width(), shadowSize.height());
- QPen shadowPen(pen);
- shadowPen.setColor(shadowColor);
- p->strokePath(path, shadowPen);
- p->setWorldTransform(t);
- }
- if (m_common->state.strokePattern) {
- AffineTransform affine;
- pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine)));
- p->setPen(pen);
- p->strokePath(path, pen);
- } else if (m_common->state.strokeGradient) {
- QBrush brush(*m_common->state.strokeGradient->platformGradient());
- brush.setTransform(m_common->state.strokeGradient->gradientSpaceTransform());
- pen.setBrush(brush);
- p->setPen(pen);
- p->strokePath(path, pen);
- } else {
- if (strokeColor().alpha())
- p->strokePath(path, pen);
- }
+ FloatSize shadowSize;
+ float shadowBlur;
+ Color shadowColor;
+ if (getShadow(shadowSize, shadowBlur, shadowColor)) {
+ QTransform t(p->worldTransform());
+ p->translate(shadowSize.width(), shadowSize.height());
+ QPen shadowPen(pen);
+ shadowPen.setColor(shadowColor);
+ p->strokePath(path, shadowPen);
+ p->setWorldTransform(t);
}
+ if (m_common->state.strokePattern) {
+ AffineTransform affine;
+ pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine)));
+ p->setPen(pen);
+ p->strokePath(path, pen);
+ } else if (m_common->state.strokeGradient) {
+ QBrush brush(*m_common->state.strokeGradient->platformGradient());
+ brush.setTransform(m_common->state.strokeGradient->gradientSpaceTransform());
+ pen.setBrush(brush);
+ p->setPen(pen);
+ p->strokePath(path, pen);
+ } else
+ p->strokePath(path, pen);
m_data->currentPath = QPainterPath();
}
@@ -713,28 +706,63 @@ void GraphicsContext::fillRect(const FloatRect& rect)
return;
QPainter* p = m_data->p();
+ FloatRect normalizedRect = rect.normalized();
- if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
- if (m_common->state.shadowColor.isValid())
- drawBorderlessRectShadow(this, p, rect);
- if (m_common->state.fillPattern) {
- AffineTransform affine;
- FloatRect rectM(rect);
- QBrush brush(m_common->state.fillPattern->createPlatformPattern(affine));
- QPixmap* image = m_common->state.fillPattern->tileImage()->nativeImageForCurrentFrame();
-
- drawRepeatPattern(p, image, rect, m_common->state.fillPattern->repeatX(), m_common->state.fillPattern->repeatY());
- } else if (m_common->state.fillGradient) {
- QBrush brush(*m_common->state.fillGradient->platformGradient());
- brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
- p->fillRect(rect, brush);
- } else {
- if (fillColor().alpha())
- p->fillRect(rect, p->brush());
+ FloatSize shadowSize;
+ float shadowBlur;
+ Color shadowColor;
+ bool hasShadow = getShadow(shadowSize, shadowBlur, shadowColor);
+ FloatRect shadowDestRect;
+ QImage* shadowImage = 0;
+ QPainter* pShadow = 0;
+
+ if (hasShadow) {
+ shadowImage = new QImage(roundedIntSize(normalizedRect.size()), QImage::Format_ARGB32_Premultiplied);
+ pShadow = new QPainter(shadowImage);
+ shadowDestRect = normalizedRect;
+ shadowDestRect.move(shadowSize.width(), shadowSize.height());
+
+ pShadow->setCompositionMode(QPainter::CompositionMode_Source);
+ pShadow->fillRect(shadowImage->rect(), shadowColor);
+ pShadow->setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ }
+
+ if (m_common->state.fillPattern) {
+ AffineTransform affine;
+ FloatRect rectM(rect);
+ QBrush brush(m_common->state.fillPattern->createPlatformPattern(affine));
+ QPixmap* image = m_common->state.fillPattern->tileImage()->nativeImageForCurrentFrame();
+
+ if (hasShadow) {
+ drawRepeatPattern(pShadow, image, FloatRect(static_cast<QRectF>(shadowImage->rect())), m_common->state.fillPattern->repeatX(), m_common->state.fillPattern->repeatY());
+ pShadow->end();
+ p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
+ }
+ drawRepeatPattern(p, image, normalizedRect, m_common->state.fillPattern->repeatX(), m_common->state.fillPattern->repeatY());
+ } else if (m_common->state.fillGradient) {
+ QBrush brush(*m_common->state.fillGradient->platformGradient());
+ brush.setTransform(m_common->state.fillGradient->gradientSpaceTransform());
+
+ if (hasShadow) {
+ pShadow->fillRect(shadowImage->rect(), brush);
+ pShadow->end();
+ p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
}
+ p->fillRect(normalizedRect, brush);
+ } else {
+ if (hasShadow) {
+ pShadow->fillRect(shadowImage->rect(), p->brush());
+ pShadow->end();
+ p->drawImage(shadowDestRect, *shadowImage, shadowImage->rect());
+ }
+ p->fillRect(normalizedRect, p->brush());
}
+
+ delete shadowImage;
+ delete pShadow;
}
+
void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace)
{
if (paintingDisabled() || !color.isValid())
@@ -749,7 +777,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorS
void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled() || !color.isValid() || !color.alpha())
+ if (paintingDisabled() || !color.isValid())
return;
Path path = Path::createRoundedRectangle(rect, topLeft, topRight, bottomLeft, bottomRight);
@@ -1015,7 +1043,8 @@ void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
pen.setDashPattern(pattern);
pen.setDashOffset(dashOffset);
- }
+ } else
+ pen.setStyle(Qt::SolidLine);
p->setPen(pen);
}
diff --git a/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index a546def..b4ca617 100644
--- a/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -98,6 +98,14 @@ GraphicsContext* ImageBuffer::context() const
return m_context.get();
}
+Image* ImageBuffer::imageForRendering() const
+{
+ if (!m_image)
+ m_image = StillImage::createForRendering(&m_data.m_pixmap);
+
+ return m_image.get();
+}
+
Image* ImageBuffer::image() const
{
if (!m_image) {
@@ -178,8 +186,13 @@ PassRefPtr<ImageData> getImageData(const IntRect& rect, const ImageBufferData& i
unsigned destBytesPerRow = 4 * rect.width();
unsigned char* destRows = data + desty * destBytesPerRow + destx * 4;
for (int y = 0; y < numRows; ++y) {
+#if QT_VERSION >= 0x040700
+ const quint32* scanLine = reinterpret_cast<const quint32*>(image.constScanLine(y + originy));
+#else
+ quint32* scanLine = reinterpret_cast<quint32*>(image.scanLine(y + originy));
+#endif
for (int x = 0; x < numColumns; x++) {
- QRgb value = image.pixel(x + originx, y + originy);
+ QRgb value = scanLine[x + originx];
int basex = x * 4;
destRows[basex] = qRed(value);
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index dd97873..e0ac574 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -180,8 +180,6 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
return;
}
- IntSize selfSize = size();
-
QPainter* painter(ctxt->platformContext());
QPainter::CompositionMode compositionMode = GraphicsContext::toQtCompositionMode(op);
@@ -204,7 +202,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
p.setCompositionMode(QPainter::CompositionMode_Source);
p.fillRect(shadowImage.rect(), shadowColor);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
- p.drawPixmap(normalizedDst, *image, normalizedSrc);
+ p.drawPixmap(QRect(0, 0, normalizedDst.width(), normalizedDst.height()), *image, normalizedSrc);
p.end();
painter->drawImage(shadowImageRect, shadowImage, normalizedSrc);
}
diff --git a/WebCore/platform/graphics/qt/PathQt.cpp b/WebCore/platform/graphics/qt/PathQt.cpp
index a367212..a8adb31 100644
--- a/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/WebCore/platform/graphics/qt/PathQt.cpp
@@ -121,15 +121,18 @@ bool Path::contains(const FloatPoint& point, WindRule rule) const
return contains;
}
+static GraphicsContext* scratchContext()
+{
+ static ImageBuffer* scratch = ImageBuffer::create(IntSize(1, 1)).leakPtr();
+ return scratch->context();
+}
+
bool Path::strokeContains(StrokeStyleApplier* applier, const FloatPoint& point) const
{
ASSERT(applier);
- // FIXME: We should try to use a 'shared Context' instead of creating a new ImageBuffer
- // on each call.
- OwnPtr<ImageBuffer> scratchImage = ImageBuffer::create(IntSize(1, 1));
- GraphicsContext* gc = scratchImage->context();
QPainterPathStroker stroke;
+ GraphicsContext* gc = scratchContext();
applier->strokeStyle(gc);
QPen pen = gc->pen();
@@ -157,10 +160,7 @@ FloatRect Path::boundingRect() const
FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
{
- // FIXME: We should try to use a 'shared Context' instead of creating a new ImageBuffer
- // on each call.
- OwnPtr<ImageBuffer> scratchImage = ImageBuffer::create(IntSize(1, 1));
- GraphicsContext* gc = scratchImage->context();
+ GraphicsContext* gc = scratchContext();
QPainterPathStroker stroke;
if (applier) {
applier->strokeStyle(gc);
@@ -198,22 +198,8 @@ void Path::addBezierCurveTo(const FloatPoint& cp1, const FloatPoint& cp2, const
void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
{
- // Make sure there is a subpath for p1, the behavior depend on the last element of the subpath.
- // When the user agent is to ensure there is a subpath for a coordinate (x, y), the user agent must
- // check to see if the context has any subpaths, and if it does not, then the user agent must create
- // a new subpath with the point (x, y) as its first (and only) point, as if the moveTo() method had been called.
- if (!m_path.elementCount()) {
- m_path.moveTo(p1);
- return;
- }
-
FloatPoint p0(m_path.currentPosition());
- if ((p1.x() == p0.x() && p1.y() == p0.y()) || (p1.x() == p2.x() && p1.y() == p2.y()) || radius == 0.f) {
- m_path.lineTo(p1);
- return;
- }
-
FloatPoint p1p0((p0.x() - p1.x()), (p0.y() - p1.y()));
FloatPoint p1p2((p2.x() - p1.x()), (p2.y() - p1.y()));
float p1p0_length = sqrtf(p1p0.x() * p1p0.x() + p1p0.y() * p1p0.y());
@@ -362,6 +348,11 @@ bool Path::hasCurrentPoint() const
return !isEmpty();
}
+FloatPoint Path::currentPoint() const
+{
+ return m_path.currentPosition();
+}
+
String Path::debugString() const
{
QString ret;
diff --git a/WebCore/platform/graphics/qt/StillImageQt.cpp b/WebCore/platform/graphics/qt/StillImageQt.cpp
index 4653c58..9c6acab 100644
--- a/WebCore/platform/graphics/qt/StillImageQt.cpp
+++ b/WebCore/platform/graphics/qt/StillImageQt.cpp
@@ -36,65 +36,65 @@
namespace WebCore {
StillImage::StillImage(const QPixmap& pixmap)
+ : m_pixmap(new QPixmap(pixmap))
+ , m_ownsPixmap(true)
+{}
+
+StillImage::StillImage(const QPixmap* pixmap)
: m_pixmap(pixmap)
+ , m_ownsPixmap(false)
{}
+StillImage::~StillImage()
+{
+ if (m_ownsPixmap)
+ delete m_pixmap;
+}
+
IntSize StillImage::size() const
{
- return IntSize(m_pixmap.width(), m_pixmap.height());
+ return IntSize(m_pixmap->width(), m_pixmap->height());
}
NativeImagePtr StillImage::nativeImageForCurrentFrame()
{
- return const_cast<NativeImagePtr>(&m_pixmap);
+ return const_cast<NativeImagePtr>(m_pixmap);
}
void StillImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
const FloatRect& src, ColorSpace, CompositeOperator op)
{
- if (m_pixmap.isNull())
+ if (m_pixmap->isNull())
return;
- ctxt->save();
- ctxt->setCompositeOperation(op);
- // To support width or height is negative
- float sx = src.x();
- float sy = src.y();
- float sw = src.width();
- float sh = src.height();
+ FloatRect normalizedSrc = src.normalized();
+ FloatRect normalizedDst = dst.normalized();
- if (sw < 0) {
- sx = sx + sw;
- sw = -sw;
- }
+ QPainter* painter = ctxt->platformContext();
+ QPainter::CompositionMode oldCompositionMode = painter->compositionMode();
- if (sh < 0) {
- sy = sy + sh;
- sh = -sh;
- }
-
- float dx = dst.x();
- float dy = dst.y();
- float dw = dst.width();
- float dh = dst.height();
-
- if (dw < 0) {
- dx = dx + dw;
- dw = -dw;
- }
+ ctxt->setCompositeOperation(op);
- if (dh < 0) {
- dy = dy + dh;
- dh = -dh;
+ FloatSize shadowSize;
+ float shadowBlur;
+ Color shadowColor;
+ if (ctxt->getShadow(shadowSize, shadowBlur, shadowColor)) {
+ FloatRect shadowImageRect(normalizedDst);
+ shadowImageRect.move(shadowSize.width(), shadowSize.height());
+
+ QImage shadowImage(QSize(static_cast<int>(normalizedSrc.width()), static_cast<int>(normalizedSrc.height())), QImage::Format_ARGB32_Premultiplied);
+ QPainter p(&shadowImage);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.fillRect(shadowImage.rect(), shadowColor);
+ p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
+ p.drawPixmap(QRect(0, 0, normalizedDst.width(), normalizedDst.height()), *m_pixmap, normalizedSrc);
+ p.end();
+ painter->drawImage(shadowImageRect, shadowImage, normalizedSrc);
}
- FloatRect srcM(sx, sy, sw, sh);
- FloatRect dstM(dx, dy, dw, dh);
- QPainter* painter(ctxt->platformContext());
-
- painter->drawPixmap(dstM, m_pixmap, srcM);
- ctxt->restore();
+ painter->drawPixmap(normalizedDst, *m_pixmap, normalizedSrc);
+ painter->setCompositionMode(oldCompositionMode);
}
}
diff --git a/WebCore/platform/graphics/qt/StillImageQt.h b/WebCore/platform/graphics/qt/StillImageQt.h
index 7be9136..58071d9 100644
--- a/WebCore/platform/graphics/qt/StillImageQt.h
+++ b/WebCore/platform/graphics/qt/StillImageQt.h
@@ -39,6 +39,11 @@ namespace WebCore {
return adoptRef(new StillImage(pixmap));
}
+ static PassRefPtr<StillImage> createForRendering(const QPixmap* pixmap)
+ {
+ return adoptRef(new StillImage(pixmap));
+ }
+
// FIXME: StillImages are underreporting decoded sizes and will be unable
// to prune because these functions are not implemented yet.
virtual void destroyDecodedData(bool destroyAll = true) { Q_UNUSED(destroyAll); }
@@ -50,8 +55,11 @@ namespace WebCore {
private:
StillImage(const QPixmap& pixmap);
+ StillImage(const QPixmap* pixmap);
+ ~StillImage();
- QPixmap m_pixmap;
+ const QPixmap* m_pixmap;
+ bool m_ownsPixmap;
};
}
diff --git a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index 912fd12..f8192fe 100644
--- a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -74,7 +74,10 @@ ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace imageColorSpace, b
// Make the background transparent. It would be nice if this wasn't
// required, but the canvas is currently filled with the magic transparency
// color. Can we have another way to manage this?
- m_data.m_canvas.drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
+ //
+ // Avoid drawing on a zero-sized canvas. Skia can't handle it.
+ if (!size.isZero())
+ m_data.m_canvas.drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
success = true;
}
diff --git a/WebCore/platform/graphics/skia/PathSkia.cpp b/WebCore/platform/graphics/skia/PathSkia.cpp
index a0d4c79..12241f8 100644
--- a/WebCore/platform/graphics/skia/PathSkia.cpp
+++ b/WebCore/platform/graphics/skia/PathSkia.cpp
@@ -74,6 +74,13 @@ bool Path::hasCurrentPoint() const
return m_path->getPoints(NULL, 0) != 0;
}
+FloatPoint Path::currentPoint() const
+{
+ // FIXME: return current point of subpath.
+ float quietNaN = std::numeric_limits<float>::quiet_NaN();
+ return FloatPoint(quietNaN, quietNaN);
+}
+
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
return SkPathContainsPoint(m_path, point,
diff --git a/WebCore/platform/graphics/skia/SkiaUtils.cpp b/WebCore/platform/graphics/skia/SkiaUtils.cpp
index 0c6b2d6..b16a344 100644
--- a/WebCore/platform/graphics/skia/SkiaUtils.cpp
+++ b/WebCore/platform/graphics/skia/SkiaUtils.cpp
@@ -129,10 +129,18 @@ static U8CPU InvScaleByte(U8CPU component, uint32_t scale)
SkColor SkPMColorToColor(SkPMColor pm)
{
- if (0 == pm)
+ if (!pm)
return 0;
-
unsigned a = SkGetPackedA32(pm);
+ if (!a) {
+ // A zero alpha value when there are non-zero R, G, or B channels is an
+ // invalid premultiplied color (since all channels should have been
+ // multiplied by 0 if a=0).
+ SkASSERT(false);
+ // In production, return 0 to protect against division by zero.
+ return 0;
+ }
+
uint32_t scale = (255 << 16) / a;
return SkColorSetARGB(a,
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
index 20d76ef..96ac0c1 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
@@ -669,7 +669,7 @@ void GraphicsLayerCACF::updateLayerDrawsContent()
if (m_drawsContent)
m_layer->setNeedsDisplay();
else
- m_layer->setContents(nil);
+ m_layer->setContents(0);
updateDebugIndicators();
}
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
index aa7bdd4..e0ecf78 100644
--- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
+++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
@@ -46,6 +46,7 @@
#include "StringHash.h"
#include "TimeRanges.h"
#include "Timer.h"
+#include <AssertMacros.h>
#include <CoreGraphics/CGContext.h>
#include <Wininet.h>
#include <wtf/CurrentTime.h>
diff --git a/WebCore/platform/graphics/wince/PathWince.cpp b/WebCore/platform/graphics/wince/PathWince.cpp
index 00d03b1..747e650 100644
--- a/WebCore/platform/graphics/wince/PathWince.cpp
+++ b/WebCore/platform/graphics/wince/PathWince.cpp
@@ -160,4 +160,11 @@ bool Path::hasCurrentPoint() const
return !isEmpty();
}
+FloatPoint Path::currentPoint() const
+{
+ // FIXME: return current point of subpath.
+ float quietNaN = std::numeric_limits<float>::quiet_NaN();
+ return FloatPoint(quietNaN, quietNaN);
+}
+
}
diff --git a/WebCore/platform/graphics/wx/PathWx.cpp b/WebCore/platform/graphics/wx/PathWx.cpp
index 2305be0..3006e27 100644
--- a/WebCore/platform/graphics/wx/PathWx.cpp
+++ b/WebCore/platform/graphics/wx/PathWx.cpp
@@ -245,4 +245,11 @@ bool Path::hasCurrentPoint() const
return !isEmpty();
}
+FloatPoint Path::currentPoint() const
+{
+ // FIXME: return current point of subpath.
+ float quietNaN = std::numeric_limits<float>::quiet_NaN();
+ return FloatPoint(quietNaN, quietNaN);
+}
+
}
diff --git a/WebCore/platform/gtk/CursorGtk.cpp b/WebCore/platform/gtk/CursorGtk.cpp
index 017e486..a535f0c 100644
--- a/WebCore/platform/gtk/CursorGtk.cpp
+++ b/WebCore/platform/gtk/CursorGtk.cpp
@@ -57,38 +57,38 @@ static GdkCursor* customCursorNew(CustomCursorType cursorType)
Cursor::Cursor(const Cursor& other)
- : m_impl(other.m_impl)
+ : m_platformCursor(other.m_platformCursor)
{
- if (m_impl)
- gdk_cursor_ref(m_impl);
+ if (m_platformCursor)
+ gdk_cursor_ref(m_platformCursor);
}
Cursor::Cursor(Image* image, const IntPoint& hotSpot)
{
IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
GdkPixbuf* pixbuf = image->getGdkPixbuf();
- m_impl = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, effectiveHotSpot.x(), effectiveHotSpot.y());
+ m_platformCursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, effectiveHotSpot.x(), effectiveHotSpot.y());
g_object_unref(pixbuf);
}
Cursor::~Cursor()
{
- if (m_impl)
- gdk_cursor_unref(m_impl);
+ if (m_platformCursor)
+ gdk_cursor_unref(m_platformCursor);
}
Cursor& Cursor::operator=(const Cursor& other)
{
- gdk_cursor_ref(other.m_impl);
- gdk_cursor_unref(m_impl);
- m_impl = other.m_impl;
+ gdk_cursor_ref(other.m_platformCursor);
+ gdk_cursor_unref(m_platformCursor);
+ m_platformCursor = other.m_platformCursor;
return *this;
}
Cursor::Cursor(GdkCursor* c)
- : m_impl(c)
+ : m_platformCursor(c)
{
- m_impl = c;
+ m_platformCursor = c;
// The GdkCursor may be NULL - the default cursor for the window.
if (c)
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp
index 401bd4a..7ad2a39 100644
--- a/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -24,12 +24,13 @@
#include "GOwnPtr.h"
#include "PlatformString.h"
-#include <wtf/text/CString.h>
+#include <errno.h>
+#include <fcntl.h>
#include <glib.h>
#include <glib/gstdio.h>
-
#include <unistd.h>
+#include <wtf/text/CString.h>
namespace WebCore {
@@ -233,6 +234,22 @@ CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
return tempFilePath;
}
+PlatformFileHandle openFile(const String& path, FileOpenMode mode)
+{
+ CString fsRep = fileSystemRepresentation(path);
+
+ if (fsRep.isNull())
+ return invalidPlatformFileHandle;
+
+ int platformFlag = 0;
+ if (mode == OpenForRead)
+ platformFlag |= O_RDONLY;
+ else if (mode == OpenForWrite)
+ platformFlag |= (O_WRONLY | O_CREAT | O_TRUNC);
+
+ return g_open(fsRep.data(), platformFlag, 0666);
+}
+
void closeFile(PlatformFileHandle& handle)
{
if (isHandleValid(handle)) {
@@ -255,6 +272,17 @@ int writeToFile(PlatformFileHandle handle, const char* data, int length)
return totalBytesWritten;
}
+int readFromFile(PlatformFileHandle handle, char* data, int length)
+{
+ do {
+ int bytesRead = read(handle, data, static_cast<size_t>(length));
+ if (bytesRead >= 0)
+ return bytesRead;
+ } while (errno == EINTR);
+
+ return -1;
+}
+
bool unloadModule(PlatformModule module)
{
return g_module_close(module);
diff --git a/WebCore/platform/gtk/PasteboardHelper.cpp b/WebCore/platform/gtk/PasteboardHelper.cpp
index 111fb4e..2babe91 100644
--- a/WebCore/platform/gtk/PasteboardHelper.cpp
+++ b/WebCore/platform/gtk/PasteboardHelper.cpp
@@ -296,6 +296,7 @@ void PasteboardHelper::writeClipboardContents(GtkClipboard* clipboard, GClosure*
gtk_clipboard_set_with_data(clipboard, table, numberOfTargets,
getClipboardContentsCallback, clearClipboardContentsCallback, callback);
+ gtk_clipboard_set_can_store(clipboard, 0, 0);
settingClipboardDataObject = 0;
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index b70773e..bc0d147 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -762,11 +762,12 @@ bool RenderThemeGtk::paintMediaMuteButton(RenderObject* o, const PaintInfo& pain
bool RenderThemeGtk::paintMediaPlayButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
- HTMLMediaElement* mediaElement = getMediaElementFromRenderObject(o);
- if (!mediaElement)
+ Node* node = o->node();
+ if (!node)
return false;
- return paintMediaButton(paintInfo.context, r, mediaElement->canPlay() ? m_playButton.get() : m_pauseButton.get(), m_panelColor, m_mediaIconSize);
+ MediaControlPlayButtonElement* button = static_cast<MediaControlPlayButtonElement*>(node);
+ return paintMediaButton(paintInfo.context, r, button->displayType() == MediaPlayButton ? m_playButton.get() : m_pauseButton.get(), m_panelColor, m_mediaIconSize);
}
bool RenderThemeGtk::paintMediaSeekBackButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
diff --git a/WebCore/platform/haiku/CursorHaiku.cpp b/WebCore/platform/haiku/CursorHaiku.cpp
index 21d678a..58833bc 100644
--- a/WebCore/platform/haiku/CursorHaiku.cpp
+++ b/WebCore/platform/haiku/CursorHaiku.cpp
@@ -34,31 +34,31 @@
namespace WebCore {
Cursor::Cursor(PlatformCursor cursor)
- : m_impl(cursor)
+ : m_platformCursor(cursor)
{
}
Cursor::Cursor(const Cursor& other)
- : m_impl(0)
+ : m_platformCursor(0)
{
*this = other;
}
Cursor::~Cursor()
{
- delete m_impl;
+ delete m_platformCursor;
}
Cursor::Cursor(Image*, const IntPoint&)
- : m_impl(0)
+ : m_platformCursor(0)
{
notImplemented();
}
Cursor& Cursor::operator=(const Cursor& other)
{
- delete m_impl;
- m_impl = other.m_impl ? new BCursor(*other.m_impl) : 0;
+ delete m_platformCursor;
+ m_platformCursor = other.m_platformCursor ? new BCursor(*other.m_platformCursor) : 0;
return *this;
}
diff --git a/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp b/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp
index 19363c8..a2e8760 100644
--- a/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp
+++ b/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp
@@ -36,6 +36,7 @@
#include "Vector.h"
#include "SkBitmap.h"
+#include "SkUnPreMultiply.h"
extern "C" {
#include "png.h"
@@ -57,6 +58,25 @@ static void convertBetweenBGRAandRGBA(const unsigned char* input, int numberOfPi
}
}
+// Converts BGRA->RGBA and RGBA->BGRA and undoes alpha premultiplication.
+static void preMultipliedBGRAtoRGBA(const unsigned char* input, int numberOfPixels,
+ unsigned char* output)
+{
+ SkBitmap inputBitmap;
+ inputBitmap.setConfig(SkBitmap::kARGB_8888_Config, numberOfPixels, 1);
+ inputBitmap.setPixels(const_cast<unsigned char*>(input));
+ for (int x = 0; x < numberOfPixels; x++) {
+ uint32_t srcPixel = *inputBitmap.getAddr32(x, 0);
+ SkColor unmultiplied = SkUnPreMultiply::PMColorToColor(srcPixel);
+ unsigned char* pixelOut = &output[x * 4];
+ pixelOut[0] = SkColorGetR(unmultiplied);
+ pixelOut[1] = SkColorGetG(unmultiplied);
+ pixelOut[2] = SkColorGetB(unmultiplied);
+ pixelOut[3] = SkColorGetA(unmultiplied);
+ }
+}
+
+
// Encoder --------------------------------------------------------------------
//
// This section of the code is based on nsPNGEncoder.cpp in Mozilla
@@ -98,24 +118,12 @@ private:
png_info** m_pngInfo;
};
-// static
-bool PNGImageEncoder::encode(const SkBitmap& image, Vector<unsigned char>* output)
-{
- if (image.config() != SkBitmap::kARGB_8888_Config)
- return false; // Only support ARGB at 8 bpp now.
-
- image.lockPixels();
- bool result = PNGImageEncoder::encode(static_cast<unsigned char*>(
- image.getPixels()), IntSize(image.width(), image.height()),
- image.rowBytes(), output);
- image.unlockPixels();
- return result;
-}
-
-// static
-bool PNGImageEncoder::encode(const unsigned char* input, const IntSize& size,
- int bytesPerRow,
- Vector<unsigned char>* output)
+static bool encodeImpl(const unsigned char* input,
+ const IntSize& size,
+ int bytesPerRow,
+ Vector<unsigned char>* output,
+ void (*conversionFunc)(const unsigned char*, int, unsigned char*)
+ )
{
int inputColorComponents = 4;
int outputColorComponents = 4;
@@ -158,7 +166,7 @@ bool PNGImageEncoder::encode(const unsigned char* input, const IntSize& size,
OwnArrayPtr<unsigned char> rowPixels(new unsigned char[imageSize.width() * outputColorComponents]);
for (int y = 0; y < imageSize.height(); y ++) {
- convertBetweenBGRAandRGBA(&input[y * bytesPerRow], imageSize.width(), rowPixels.get());
+ conversionFunc(&input[y * bytesPerRow], imageSize.width(), rowPixels.get());
png_write_row(pngPtr, rowPixels.get());
}
@@ -166,4 +174,27 @@ bool PNGImageEncoder::encode(const unsigned char* input, const IntSize& size,
return true;
}
+
+// static
+bool PNGImageEncoder::encode(const SkBitmap& image, Vector<unsigned char>* output)
+{
+ if (image.config() != SkBitmap::kARGB_8888_Config)
+ return false; // Only support ARGB at 8 bpp now.
+
+ image.lockPixels();
+ bool result = encodeImpl(static_cast<unsigned char*>(
+ image.getPixels()), IntSize(image.width(), image.height()),
+ image.rowBytes(), output, preMultipliedBGRAtoRGBA);
+ image.unlockPixels();
+ return result;
+}
+
+// static
+bool PNGImageEncoder::encode(const unsigned char* input, const IntSize& size,
+ int bytesPerRow,
+ Vector<unsigned char>* output)
+{
+ return encodeImpl(input, size, bytesPerRow, output, convertBetweenBGRAandRGBA);
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/mac/CursorMac.mm b/WebCore/platform/mac/CursorMac.mm
index 8cd54a1..1b4c1b1 100644
--- a/WebCore/platform/mac/CursorMac.mm
+++ b/WebCore/platform/mac/CursorMac.mm
@@ -28,8 +28,6 @@
#import "BlockExceptions.h"
#import "FoundationExtras.h"
-#import "Image.h"
-#import "IntPoint.h"
#import <wtf/StdLibExtras.h>
@interface WebCoreCursorBundle : NSObject { }
@@ -50,7 +48,7 @@ static NSCursor* createCustomCursor(Image* image, const IntPoint& hotSpot)
if (!img)
return 0;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
- return [[NSCursor alloc] initWithImage:img hotSpot:determineHotSpot(image, hotSpot)];
+ return [[NSCursor alloc] initWithImage:img hotSpot:hotSpot];
END_BLOCK_OBJC_EXCEPTIONS;
return 0;
}
@@ -76,281 +74,152 @@ static NSCursor* leakNamedCursor(const char* name, int x, int y)
return nil;
}
-Cursor::Cursor(Image* image, const IntPoint& hotSpot)
- : m_impl(HardRetainWithNSRelease(createCustomCursor(image, hotSpot)))
-{
+void Cursor::ensurePlatformCursor() const
+{
+ if (m_platformCursor)
+ return;
+
+ switch (m_type) {
+ case Cursor::Pointer:
+ m_platformCursor = HardRetain([NSCursor arrowCursor]);
+ break;
+ case Cursor::Cross:
+ m_platformCursor = HardRetain(leakNamedCursor("crossHairCursor", 11, 11));
+ break;
+ case Cursor::Hand:
+ m_platformCursor = HardRetain(leakNamedCursor("linkCursor", 6, 1));
+ break;
+ case Cursor::IBeam:
+ m_platformCursor = HardRetain([NSCursor IBeamCursor]);
+ break;
+ case Cursor::Wait:
+ m_platformCursor = HardRetain(leakNamedCursor("waitCursor", 7, 7));
+ break;
+ case Cursor::Help:
+ m_platformCursor = HardRetain(leakNamedCursor("helpCursor", 8, 8));
+ break;
+ case Cursor::Move:
+ case Cursor::MiddlePanning:
+ m_platformCursor = HardRetain(leakNamedCursor("moveCursor", 7, 7));
+ break;
+ case Cursor::EastResize:
+ case Cursor::EastPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("eastResizeCursor", 14, 7));
+ break;
+ case Cursor::NorthResize:
+ case Cursor::NorthPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("northResizeCursor", 7, 1));
+ break;
+ case Cursor::NorthEastResize:
+ case Cursor::NorthEastPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("northEastResizeCursor", 14, 1));
+ break;
+ case Cursor::NorthWestResize:
+ case Cursor::NorthWestPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("northWestResizeCursor", 0, 0));
+ break;
+ case Cursor::SouthResize:
+ case Cursor::SouthPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("southResizeCursor", 7, 14));
+ break;
+ case Cursor::SouthEastResize:
+ case Cursor::SouthEastPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("southEastResizeCursor", 14, 14));
+ break;
+ case Cursor::SouthWestResize:
+ case Cursor::SouthWestPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("southWestResizeCursor", 1, 14));
+ break;
+ case Cursor::WestResize:
+ m_platformCursor = HardRetain(leakNamedCursor("westResizeCursor", 1, 7));
+ break;
+ case Cursor::NorthSouthResize:
+ m_platformCursor = HardRetain(leakNamedCursor("northSouthResizeCursor", 7, 7));
+ break;
+ case Cursor::EastWestResize:
+ case Cursor::WestPanning:
+ m_platformCursor = HardRetain(leakNamedCursor("eastWestResizeCursor", 7, 7));
+ break;
+ case Cursor::NorthEastSouthWestResize:
+ m_platformCursor = HardRetain(leakNamedCursor("northEastSouthWestResizeCursor", 7, 7));
+ break;
+ case Cursor::NorthWestSouthEastResize:
+ m_platformCursor = HardRetain(leakNamedCursor("northWestSouthEastResizeCursor", 7, 7));
+ break;
+ case Cursor::ColumnResize:
+ m_platformCursor = HardRetain([NSCursor resizeLeftRightCursor]);
+ break;
+ case Cursor::RowResize:
+ m_platformCursor = HardRetain([NSCursor resizeUpDownCursor]);
+ break;
+ case Cursor::VerticalText:
+ m_platformCursor = HardRetain(leakNamedCursor("verticalTextCursor", 7, 7));
+ break;
+ case Cursor::Cell:
+ m_platformCursor = HardRetain(leakNamedCursor("cellCursor", 7, 7));
+ break;
+ case Cursor::ContextMenu:
+ m_platformCursor = HardRetain(leakNamedCursor("contextMenuCursor", 3, 2));
+ break;
+ case Cursor::Alias:
+ m_platformCursor = HardRetain(leakNamedCursor("aliasCursor", 11, 3));
+ break;
+ case Cursor::Progress:
+ m_platformCursor = HardRetain(leakNamedCursor("progressCursor", 3, 2));
+ break;
+ case Cursor::NoDrop:
+ m_platformCursor = HardRetain(leakNamedCursor("noDropCursor", 3, 1));
+ break;
+ case Cursor::Copy:
+ m_platformCursor = HardRetain(leakNamedCursor("copyCursor", 3, 2));
+ break;
+ case Cursor::None:
+ m_platformCursor = HardRetain(leakNamedCursor("noneCursor", 7, 7));
+ break;
+ case Cursor::NotAllowed:
+ m_platformCursor = HardRetain(leakNamedCursor("notAllowedCursor", 11, 11));
+ break;
+ case Cursor::ZoomIn:
+ m_platformCursor = HardRetain(leakNamedCursor("zoomInCursor", 7, 7));
+ break;
+ case Cursor::ZoomOut:
+ m_platformCursor = HardRetain(leakNamedCursor("zoomOutCursor", 7, 7));
+ break;
+ case Cursor::Grab:
+ m_platformCursor = HardRetain([NSCursor openHandCursor]);
+ break;
+ case Cursor::Grabbing:
+ m_platformCursor = HardRetain([NSCursor closedHandCursor]);
+ break;
+ case Cursor::Custom:
+ m_platformCursor = HardRetainWithNSRelease(createCustomCursor(m_image.get(), m_hotSpot));
+ break;
+ }
}
Cursor::Cursor(const Cursor& other)
- : m_impl(HardRetain(other.m_impl))
+ : m_type(other.m_type)
+ , m_image(other.m_image)
+ , m_hotSpot(other.m_hotSpot)
+ , m_platformCursor(HardRetain(other.m_platformCursor))
{
}
-Cursor::~Cursor()
-{
- HardRelease(m_impl);
-}
-
Cursor& Cursor::operator=(const Cursor& other)
{
- HardRetain(other.m_impl);
- HardRelease(m_impl);
- m_impl = other.m_impl;
- return *this;
-}
-
-Cursor::Cursor(NSCursor* c)
- : m_impl(HardRetain(c))
-{
-}
-
-const Cursor& pointerCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, ([NSCursor arrowCursor]));
- return c;
-}
-
-const Cursor& crossCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("crossHairCursor", 11, 11)));
- return c;
-}
-
-const Cursor& handCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("linkCursor", 6, 1)));
- return c;
-}
-
-const Cursor& moveCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("moveCursor", 7, 7)));
- return c;
-}
-
-const Cursor& verticalTextCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("verticalTextCursor", 7, 7)));
- return c;
-}
-
-const Cursor& cellCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("cellCursor", 7, 7)));
- return c;
-}
-
-const Cursor& contextMenuCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("contextMenuCursor", 3, 2)));
- return c;
-}
-
-const Cursor& aliasCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("aliasCursor", 11, 3)));
- return c;
-}
-
-const Cursor& zoomInCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("zoomInCursor", 7, 7)));
- return c;
-}
-
-const Cursor& zoomOutCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("zoomOutCursor", 7, 7)));
- return c;
-}
-
-const Cursor& copyCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("copyCursor", 3, 2)));
- return c;
-}
-
-const Cursor& noneCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("noneCursor", 7, 7)));
- return c;
-}
-
-const Cursor& progressCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("progressCursor", 3, 2)));
- return c;
-}
-
-const Cursor& noDropCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("noDropCursor", 3, 1)));
- return c;
-}
-
-const Cursor& notAllowedCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("notAllowedCursor", 11, 11)));
- return c;
-}
-
-const Cursor& iBeamCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, ([NSCursor IBeamCursor]));
- return c;
-}
-
-const Cursor& waitCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("waitCursor", 7, 7)));
- return c;
-}
-
-const Cursor& helpCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("helpCursor", 8, 8)));
- return c;
-}
-
-const Cursor& eastResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("eastResizeCursor", 14, 7)));
- return c;
-}
-
-const Cursor& northResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("northResizeCursor", 7, 1)));
- return c;
-}
-
-const Cursor& northEastResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("northEastResizeCursor", 14, 1)));
- return c;
-}
-
-const Cursor& northWestResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("northWestResizeCursor", 0, 0)));
- return c;
-}
-
-const Cursor& southResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("southResizeCursor", 7, 14)));
- return c;
-}
-
-const Cursor& southEastResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("southEastResizeCursor", 14, 14)));
- return c;
-}
-
-const Cursor& southWestResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("southWestResizeCursor", 1, 14)));
- return c;
-}
-
-const Cursor& westResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("westResizeCursor", 1, 7)));
- return c;
-}
-
-const Cursor& northSouthResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("northSouthResizeCursor", 7, 7)));
- return c;
-}
-
-const Cursor& eastWestResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("eastWestResizeCursor", 7, 7)));
- return c;
-}
-
-const Cursor& northEastSouthWestResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("northEastSouthWestResizeCursor", 7, 7)));
- return c;
-}
+ m_type = other.m_type;
+ m_image = other.m_image;
+ m_hotSpot = other.m_hotSpot;
-const Cursor& northWestSouthEastResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, (leakNamedCursor("northWestSouthEastResizeCursor", 7, 7)));
- return c;
-}
-
-const Cursor& columnResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, ([NSCursor resizeLeftRightCursor]));
- return c;
-}
-
-const Cursor& rowResizeCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, ([NSCursor resizeUpDownCursor]));
- return c;
-}
-
-const Cursor& middlePanningCursor()
-{
- return moveCursor();
-}
-
-const Cursor& eastPanningCursor()
-{
- return eastResizeCursor();
-}
-
-const Cursor& northPanningCursor()
-{
- return northResizeCursor();
-}
-
-const Cursor& northEastPanningCursor()
-{
- return northEastResizeCursor();
-}
-
-const Cursor& northWestPanningCursor()
-{
- return northWestResizeCursor();
-}
-
-const Cursor& southPanningCursor()
-{
- return southResizeCursor();
-}
-
-const Cursor& southEastPanningCursor()
-{
- return southEastResizeCursor();
-}
-
-const Cursor& southWestPanningCursor()
-{
- return southWestResizeCursor();
-}
-
-const Cursor& westPanningCursor()
-{
- return westResizeCursor();
-}
-
-const Cursor& grabCursor()
-{
- DEFINE_STATIC_LOCAL(Cursor, c, ([NSCursor openHandCursor]));
- return c;
+ HardRetain(other.m_platformCursor);
+ HardRelease(m_platformCursor);
+ m_platformCursor = other.m_platformCursor;
+ return *this;
}
-const Cursor& grabbingCursor()
+Cursor::~Cursor()
{
- DEFINE_STATIC_LOCAL(Cursor, c, ([NSCursor closedHandCursor]));
- return c;
+ HardRelease(m_platformCursor);
}
-}
+} // namespace WebCore
diff --git a/WebCore/platform/mac/FileSystemMac.mm b/WebCore/platform/mac/FileSystemMac.mm
index 98f85bb..0df3c89 100644
--- a/WebCore/platform/mac/FileSystemMac.mm
+++ b/WebCore/platform/mac/FileSystemMac.mm
@@ -29,6 +29,7 @@
#import "FileSystem.h"
#import "PlatformString.h"
+#import <wtf/text/CString.h>
namespace WebCore {
@@ -37,4 +38,28 @@ String homeDirectoryPath()
return NSHomeDirectory();
}
+CString openTemporaryFile(const char* prefix, PlatformFileHandle& platformFileHandle)
+{
+ platformFileHandle = invalidPlatformFileHandle;
+
+ Vector<char> temporaryFilePath(PATH_MAX);
+ if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryFilePath.data(), temporaryFilePath.size()))
+ return CString();
+
+ // Shrink the vector.
+ temporaryFilePath.shrink(strlen(temporaryFilePath.data()));
+ ASSERT(temporaryFilePath.last() == '/');
+
+ // Append the file name.
+ temporaryFilePath.append(prefix, strlen(prefix));
+ temporaryFilePath.append("XXXXXX", 6);
+ temporaryFilePath.append('\0');
+
+ platformFileHandle = mkstemp(temporaryFilePath.data());
+ if (platformFileHandle == invalidPlatformFileHandle)
+ return CString();
+
+ return CString(temporaryFilePath.data());
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/mac/ThemeMac.mm b/WebCore/platform/mac/ThemeMac.mm
index 20b662f..c57e8df 100644
--- a/WebCore/platform/mac/ThemeMac.mm
+++ b/WebCore/platform/mac/ThemeMac.mm
@@ -687,7 +687,7 @@ void ThemeMac::inflateControlPaintRect(ControlPart part, ControlStates states, I
break;
}
case OuterSpinButtonPart: {
- static const int stepperMargin[4] = { 0, 0, 0, 0};
+ static const int stepperMargin[4] = { 0, 0, 0, 0 };
ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), zoomedRect.size(), zoomFactor);
IntSize zoomedSize = stepperSizes()[controlSize];
zoomedSize.setHeight(zoomedSize.height() * zoomFactor);
diff --git a/WebCore/platform/mac/WidgetMac.mm b/WebCore/platform/mac/WidgetMac.mm
index 37c9e9f..2598591 100644
--- a/WebCore/platform/mac/WidgetMac.mm
+++ b/WebCore/platform/mac/WidgetMac.mm
@@ -123,11 +123,12 @@ void Widget::setFocus(bool focused)
END_BLOCK_OBJC_EXCEPTIONS;
}
- void Widget::setCursor(const Cursor& cursor)
- {
- if ([NSCursor currentCursor] == cursor.impl())
+void Widget::setCursor(const Cursor& cursor)
+{
+ ScrollView* view = root();
+ if (!view)
return;
- [cursor.impl() set];
+ view->hostWindow()->setCursor(cursor);
}
void Widget::show()
diff --git a/WebCore/platform/network/Credential.cpp b/WebCore/platform/network/Credential.cpp
index 87cd7ff..4b24403 100644
--- a/WebCore/platform/network/Credential.cpp
+++ b/WebCore/platform/network/Credential.cpp
@@ -114,7 +114,7 @@ CFArrayRef Credential::certificates() const
return m_certificates.get();
}
-const CredentialType Credential::type() const
+CredentialType Credential::type() const
{
return m_type;
}
diff --git a/WebCore/platform/network/Credential.h b/WebCore/platform/network/Credential.h
index 199817c..4fb8bfd 100644
--- a/WebCore/platform/network/Credential.h
+++ b/WebCore/platform/network/Credential.h
@@ -69,7 +69,7 @@ public:
#if CERTIFICATE_CREDENTIALS_SUPPORTED
SecIdentityRef identity() const;
CFArrayRef certificates() const;
- const CredentialType type() const;
+ CredentialType type() const;
#endif
private:
diff --git a/WebCore/platform/network/CredentialStorage.cpp b/WebCore/platform/network/CredentialStorage.cpp
index a48af77..14f4086 100644
--- a/WebCore/platform/network/CredentialStorage.cpp
+++ b/WebCore/platform/network/CredentialStorage.cpp
@@ -106,6 +106,11 @@ Credential CredentialStorage::get(const ProtectionSpace& protectionSpace)
return protectionSpaceToCredentialMap().get(protectionSpace);
}
+void CredentialStorage::remove(const ProtectionSpace& protectionSpace)
+{
+ protectionSpaceToCredentialMap().remove(protectionSpace);
+}
+
static PathToDefaultProtectionSpaceMap::iterator findDefaultProtectionSpaceForURL(const KURL& url)
{
ASSERT(url.protocolInHTTPFamily());
diff --git a/WebCore/platform/network/CredentialStorage.h b/WebCore/platform/network/CredentialStorage.h
index ff7b5ee..d11384d 100644
--- a/WebCore/platform/network/CredentialStorage.h
+++ b/WebCore/platform/network/CredentialStorage.h
@@ -37,6 +37,7 @@ public:
// WebCore session credential storage.
static void set(const Credential&, const ProtectionSpace&, const KURL&);
static Credential get(const ProtectionSpace&);
+ static void remove(const ProtectionSpace&);
// OS persistent storage.
static Credential getFromPersistentStorage(const ProtectionSpace&);
diff --git a/WebCore/platform/network/FormData.cpp b/WebCore/platform/network/FormData.cpp
index 9e4a227..80f17da 100644
--- a/WebCore/platform/network/FormData.cpp
+++ b/WebCore/platform/network/FormData.cpp
@@ -224,7 +224,12 @@ void FormData::appendKeyValuePairItems(const BlobItemList& items, const TextEnco
const FileBlobItem* fileItem = value->toFileBlobItem();
if (fileItem) {
const String& path = fileItem->path();
+
+#if ENABLE(DIRECTORY_UPLOAD)
+ String fileName = !fileItem->relativePath().isEmpty() ? fileItem->relativePath() : fileItem->name();
+#else
String fileName = fileItem->name();
+#endif
// Let the application specify a filename if it's going to generate a replacement file for the upload.
if (!path.isEmpty()) {
diff --git a/WebCore/platform/network/ResourceHandle.cpp b/WebCore/platform/network/ResourceHandle.cpp
index d3ee3f2..0575523 100644
--- a/WebCore/platform/network/ResourceHandle.cpp
+++ b/WebCore/platform/network/ResourceHandle.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,30 +37,28 @@ namespace WebCore {
static bool shouldForceContentSniffing;
-ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client, bool defersLoading,
- bool shouldContentSniff)
- : d(new ResourceHandleInternal(this, request, client, defersLoading, shouldContentSniff))
+ResourceHandle::ResourceHandle(const ResourceRequest& request, ResourceHandleClient* client, bool defersLoading, bool shouldContentSniff)
+ : d(new ResourceHandleInternal(this, request, client, defersLoading, shouldContentSniff && shouldContentSniffURL(request.url())))
{
+ if (!request.url().isValid()) {
+ scheduleFailure(InvalidURLFailure);
+ return;
+ }
+
+ if (!portAllowed(request.url())) {
+ scheduleFailure(BlockedFailure);
+ return;
+ }
}
PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request, ResourceHandleClient* client,
Frame* frame, bool defersLoading, bool shouldContentSniff)
{
- if (shouldContentSniff)
- shouldContentSniff = shouldContentSniffURL(request.url());
-
RefPtr<ResourceHandle> newHandle(adoptRef(new ResourceHandle(request, client, defersLoading, shouldContentSniff)));
- if (!request.url().isValid()) {
- newHandle->scheduleFailure(InvalidURLFailure);
+ if (newHandle->d->m_scheduledFailureType != NoFailure)
return newHandle.release();
- }
- if (!portAllowed(request.url())) {
- newHandle->scheduleFailure(BlockedFailure);
- return newHandle.release();
- }
-
if (newHandle->start(frame))
return newHandle.release();
@@ -105,9 +103,9 @@ void ResourceHandle::setClient(ResourceHandleClient* client)
d->m_client = client;
}
-const ResourceRequest& ResourceHandle::request() const
+ResourceRequest& ResourceHandle::firstRequest()
{
- return d->m_request;
+ return d->m_firstRequest;
}
const String& ResourceHandle::lastHTTPMethod() const
@@ -115,6 +113,11 @@ const String& ResourceHandle::lastHTTPMethod() const
return d->m_lastHTTPMethod;
}
+bool ResourceHandle::hasAuthenticationChallenge() const
+{
+ return !d->m_currentWebChallenge.isNull();
+}
+
void ResourceHandle::clearAuthentication()
{
#if PLATFORM(MAC)
diff --git a/WebCore/platform/network/ResourceHandle.h b/WebCore/platform/network/ResourceHandle.h
index e1c889a..867e974 100644
--- a/WebCore/platform/network/ResourceHandle.h
+++ b/WebCore/platform/network/ResourceHandle.h
@@ -110,8 +110,8 @@ private:
public:
// FIXME: should not need the Frame
static PassRefPtr<ResourceHandle> create(const ResourceRequest&, ResourceHandleClient*, Frame*, bool defersLoading, bool shouldContentSniff);
-
static void loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data, Frame* frame);
+
static void prepareForURL(const KURL&);
static bool willLoadFromCache(ResourceRequest&, Frame*);
static void cacheMetadata(const ResourceResponse&, const Vector<char>&);
@@ -187,7 +187,8 @@ public:
// Used to work around the fact that you don't get any more NSURLConnection callbacks until you return from the one you're in.
static bool loadsBlocked();
-
+
+ bool hasAuthenticationChallenge() const;
void clearAuthentication();
void cancel();
@@ -196,12 +197,17 @@ public:
void setClient(ResourceHandleClient*);
void setDefersLoading(bool);
+<<<<<<< HEAD:WebCore/platform/network/ResourceHandle.h
#if PLATFORM(ANDROID)
// TODO: this needs upstreaming.
void pauseLoad(bool);
#endif
const ResourceRequest& request() const;
+=======
+
+ ResourceRequest& firstRequest();
+>>>>>>> webkit.org at r63859:WebCore/platform/network/ResourceHandle.h
const String& lastHTTPMethod() const;
void fireFailure(Timer<ResourceHandle>*);
@@ -219,6 +225,12 @@ private:
virtual void refAuthenticationClient() { ref(); }
virtual void derefAuthenticationClient() { deref(); }
+#if PLATFORM(MAC)
+ void createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff);
+#elif PLATFORM(CF)
+ void createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff);
+#endif
+
friend class ResourceHandleInternal;
OwnPtr<ResourceHandleInternal> d;
};
diff --git a/WebCore/platform/network/ResourceHandleInternal.h b/WebCore/platform/network/ResourceHandleInternal.h
index 92b24cb..7b6e960 100644
--- a/WebCore/platform/network/ResourceHandleInternal.h
+++ b/WebCore/platform/network/ResourceHandleInternal.h
@@ -83,7 +83,7 @@ namespace WebCore {
public:
ResourceHandleInternal(ResourceHandle* loader, const ResourceRequest& request, ResourceHandleClient* c, bool defersLoading, bool shouldContentSniff)
: m_client(c)
- , m_request(request)
+ , m_firstRequest(request)
, m_lastHTTPMethod(request.httpMethod())
, status(0)
, m_defersLoading(defersLoading)
@@ -136,10 +136,10 @@ namespace WebCore {
, m_scheduledFailureType(ResourceHandle::NoFailure)
, m_failureTimer(loader, &ResourceHandle::fireFailure)
{
- const KURL& url = m_request.url();
+ const KURL& url = m_firstRequest.url();
m_user = url.user();
m_pass = url.pass();
- m_request.removeCredentials();
+ m_firstRequest.removeCredentials();
}
~ResourceHandleInternal();
@@ -147,7 +147,7 @@ namespace WebCore {
ResourceHandleClient* client() { return m_client; }
ResourceHandleClient* m_client;
- ResourceRequest m_request;
+ ResourceRequest m_firstRequest;
String m_lastHTTPMethod;
// Suggested credentials for the current redirection step.
diff --git a/WebCore/platform/network/ResourceResponseBase.cpp b/WebCore/platform/network/ResourceResponseBase.cpp
index 89d31d7..f30344e 100644
--- a/WebCore/platform/network/ResourceResponseBase.cpp
+++ b/WebCore/platform/network/ResourceResponseBase.cpp
@@ -45,6 +45,7 @@ ResourceResponseBase::ResourceResponseBase()
, m_lastModifiedDate(0)
, m_wasCached(false)
, m_connectionID(0)
+ , m_connectionReused(false)
, m_isNull(true)
, m_haveParsedCacheControlHeader(false)
, m_haveParsedAgeHeader(false)
@@ -72,6 +73,7 @@ ResourceResponseBase::ResourceResponseBase(const KURL& url, const String& mimeTy
, m_lastModifiedDate(0)
, m_wasCached(false)
, m_connectionID(0)
+ , m_connectionReused(false)
, m_isNull(false)
, m_haveParsedCacheControlHeader(false)
, m_haveParsedAgeHeader(false)
@@ -471,6 +473,20 @@ void ResourceResponseBase::setWasCached(bool value)
m_wasCached = value;
}
+bool ResourceResponseBase::connectionReused() const
+{
+ lazyInit();
+
+ return m_connectionReused;
+}
+
+void ResourceResponseBase::setConnectionReused(bool connectionReused)
+{
+ lazyInit();
+
+ m_connectionReused = connectionReused;
+}
+
unsigned ResourceResponseBase::connectionID() const
{
lazyInit();
diff --git a/WebCore/platform/network/ResourceResponseBase.h b/WebCore/platform/network/ResourceResponseBase.h
index 858a612..65e24ad 100644
--- a/WebCore/platform/network/ResourceResponseBase.h
+++ b/WebCore/platform/network/ResourceResponseBase.h
@@ -100,6 +100,9 @@ public:
unsigned connectionID() const;
void setConnectionID(unsigned);
+ bool connectionReused() const;
+ void setConnectionReused(bool);
+
bool wasCached() const;
void setWasCached(bool);
@@ -136,8 +139,9 @@ protected:
String m_httpStatusText;
HTTPHeaderMap m_httpHeaderFields;
time_t m_lastModifiedDate;
- bool m_wasCached;
+ bool m_wasCached : 1;
unsigned m_connectionID;
+ bool m_connectionReused : 1;
RefPtr<ResourceLoadTiming> m_resourceLoadTiming;
bool m_isNull : 1;
diff --git a/WebCore/platform/network/cf/ResourceErrorCF.cpp b/WebCore/platform/network/cf/ResourceErrorCF.cpp
index dacc68b..1eba97e 100644
--- a/WebCore/platform/network/cf/ResourceErrorCF.cpp
+++ b/WebCore/platform/network/cf/ResourceErrorCF.cpp
@@ -115,7 +115,7 @@ ResourceError::operator CFErrorRef() const
{
if (m_isNull) {
ASSERT(!m_platformError);
- return nil;
+ return 0;
}
if (!m_platformError) {
diff --git a/WebCore/platform/network/cf/ResourceHandleCFNet.cpp b/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
index 1139126..419e397 100644
--- a/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
+++ b/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
@@ -66,36 +66,40 @@ namespace WebCore {
static CFStringRef WebCoreSynchronousLoaderRunLoopMode = CFSTR("WebCoreSynchronousLoaderRunLoopMode");
-class WebCoreSynchronousLoader {
+class WebCoreSynchronousLoaderClient : public ResourceHandleClient {
public:
- static RetainPtr<CFDataRef> load(const ResourceRequest&, StoredCredentials, ResourceResponse&, ResourceError&);
+ static PassOwnPtr<WebCoreSynchronousLoaderClient> create(ResourceResponse& response, ResourceError& error)
+ {
+ return adoptPtr(new WebCoreSynchronousLoaderClient(response, error));
+ }
+
+ void setAllowStoredCredentials(bool allow) { m_allowStoredCredentials = allow; }
+ bool isDone() { return m_isDone; }
+
+ CFMutableDataRef data() { return m_data.get(); }
private:
- WebCoreSynchronousLoader(ResourceResponse& response, ResourceError& error)
- : m_isDone(false)
+ WebCoreSynchronousLoaderClient(ResourceResponse& response, ResourceError& error)
+ : m_allowStoredCredentials(false)
, m_response(response)
, m_error(error)
+ , m_isDone(false)
{
}
- static CFURLRequestRef willSendRequest(CFURLConnectionRef, CFURLRequestRef, CFURLResponseRef, const void* clientInfo);
- static void didReceiveResponse(CFURLConnectionRef, CFURLResponseRef, const void* clientInfo);
- static void didReceiveData(CFURLConnectionRef, CFDataRef, CFIndex, const void* clientInfo);
- static void didFinishLoading(CFURLConnectionRef, const void* clientInfo);
- static void didFail(CFURLConnectionRef, CFErrorRef, const void* clientInfo);
- static void didReceiveChallenge(CFURLConnectionRef, CFURLAuthChallengeRef, const void* clientInfo);
- static Boolean shouldUseCredentialStorage(CFURLConnectionRef, const void* clientInfo);
+ virtual void willSendRequest(ResourceHandle*, ResourceRequest&, const ResourceResponse& /*redirectResponse*/);
+ virtual bool shouldUseCredentialStorage(ResourceHandle*);
+ virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&);
+ virtual void didReceiveResponse(ResourceHandle*, const ResourceResponse&);
+ virtual void didReceiveData(ResourceHandle*, const char*, int, int /*lengthReceived*/);
+ virtual void didFinishLoading(ResourceHandle*);
+ virtual void didFail(ResourceHandle*, const ResourceError&);
- bool m_isDone;
- RetainPtr<CFURLRef> m_url;
- RetainPtr<CFStringRef> m_user;
- RetainPtr<CFStringRef> m_pass;
- // Store the preemptively used initial credential so that if we get an authentication challenge, we won't use the same one again.
- Credential m_initialCredential;
bool m_allowStoredCredentials;
ResourceResponse& m_response;
RetainPtr<CFMutableDataRef> m_data;
ResourceError& m_error;
+ bool m_isDone;
};
static HashSet<String>& allowsAnyHTTPSCertificateHosts()
@@ -137,7 +141,7 @@ CFURLRequestRef willSendRequest(CFURLConnectionRef conn, CFURLRequestRef cfReque
return cfRequest;
}
- LOG(Network, "CFNet - willSendRequest(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - willSendRequest(conn=%p, handle=%p) (%s)", conn, handle, handle->firstRequest().url().string().utf8().data());
ResourceRequest request;
if (cfRedirectResponse) {
@@ -149,11 +153,11 @@ CFURLRequestRef willSendRequest(CFURLConnectionRef conn, CFURLRequestRef cfReque
RetainPtr<CFMutableURLRequestRef> mutableRequest(AdoptCF, CFURLRequestCreateMutableCopy(0, cfRequest));
CFURLRequestSetHTTPRequestMethod(mutableRequest.get(), lastHTTPMethod.get());
- FormData* body = handle->request().httpBody();
- if (!equalIgnoringCase(handle->request().httpMethod(), "GET") && body && !body->isEmpty())
+ FormData* body = handle->firstRequest().httpBody();
+ if (!equalIgnoringCase(handle->firstRequest().httpMethod(), "GET") && body && !body->isEmpty())
WebCore::setHTTPBody(mutableRequest.get(), body);
- String originalContentType = handle->request().httpContentType();
+ String originalContentType = handle->firstRequest().httpContentType();
RetainPtr<CFStringRef> originalContentTypeCF(AdoptCF, originalContentType.createCFString());
if (!originalContentType.isEmpty())
CFURLRequestSetHTTPHeaderFieldValue(mutableRequest.get(), CFSTR("Content-Type"), originalContentTypeCF.get());
@@ -184,7 +188,7 @@ void didReceiveResponse(CFURLConnectionRef conn, CFURLResponseRef cfResponse, co
{
ResourceHandle* handle = static_cast<ResourceHandle*>(const_cast<void*>(clientInfo));
- LOG(Network, "CFNet - didReceiveResponse(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - didReceiveResponse(conn=%p, handle=%p) (%s)", conn, handle, handle->firstRequest().url().string().utf8().data());
if (!handle->client())
return;
@@ -204,7 +208,7 @@ void didReceiveData(CFURLConnectionRef conn, CFDataRef data, CFIndex originalLen
const UInt8* bytes = CFDataGetBytePtr(data);
CFIndex length = CFDataGetLength(data);
- LOG(Network, "CFNet - didReceiveData(conn=%p, handle=%p, bytes=%d) (%s)", conn, handle, length, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - didReceiveData(conn=%p, handle=%p, bytes=%d) (%s)", conn, handle, length, handle->firstRequest().url().string().utf8().data());
if (handle->client())
handle->client()->didReceiveData(handle, (const char*)bytes, length, originalLength);
@@ -222,7 +226,7 @@ static Boolean shouldUseCredentialStorageCallback(CFURLConnectionRef conn, const
{
ResourceHandle* handle = const_cast<ResourceHandle*>(static_cast<const ResourceHandle*>(clientInfo));
- LOG(Network, "CFNet - shouldUseCredentialStorage(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - shouldUseCredentialStorage(conn=%p, handle=%p) (%s)", conn, handle, handle->firstRequest().url().string().utf8().data());
if (!handle)
return false;
@@ -234,7 +238,7 @@ void didFinishLoading(CFURLConnectionRef conn, const void* clientInfo)
{
ResourceHandle* handle = static_cast<ResourceHandle*>(const_cast<void*>(clientInfo));
- LOG(Network, "CFNet - didFinishLoading(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - didFinishLoading(conn=%p, handle=%p) (%s)", conn, handle, handle->firstRequest().url().string().utf8().data());
if (handle->client())
handle->client()->didFinishLoading(handle);
@@ -244,7 +248,7 @@ void didFail(CFURLConnectionRef conn, CFErrorRef error, const void* clientInfo)
{
ResourceHandle* handle = static_cast<ResourceHandle*>(const_cast<void*>(clientInfo));
- LOG(Network, "CFNet - didFail(conn=%p, handle=%p, error = %p) (%s)", conn, handle, error, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - didFail(conn=%p, handle=%p, error = %p) (%s)", conn, handle, error, handle->firstRequest().url().string().utf8().data());
if (handle->client())
handle->client()->didFail(handle, ResourceError(error));
@@ -277,7 +281,7 @@ void didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challeng
{
ResourceHandle* handle = static_cast<ResourceHandle*>(const_cast<void*>(clientInfo));
ASSERT(handle);
- LOG(Network, "CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)", conn, handle, handle->request().url().string().utf8().data());
+ LOG(Network, "CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)", conn, handle, handle->firstRequest().url().string().utf8().data());
handle->didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, handle));
}
@@ -300,14 +304,14 @@ void addHeadersFromHashMap(CFMutableURLRequestRef request, const HTTPHeaderMap&
ResourceHandleInternal::~ResourceHandleInternal()
{
if (m_connection) {
- LOG(Network, "CFNet - Cancelling connection %p (%s)", m_connection, m_request.url().string().utf8().data());
+ LOG(Network, "CFNet - Cancelling connection %p (%s)", m_connection, m_firstRequest.url().string().utf8().data());
CFURLConnectionCancel(m_connection.get());
}
}
ResourceHandle::~ResourceHandle()
{
- LOG(Network, "CFNet - Destroying job %p (%s)", this, d->m_request.url().string().utf8().data());
+ LOG(Network, "CFNet - Destroying job %p (%s)", this, d->m_firstRequest.url().string().utf8().data());
}
CFArrayRef arrayFromFormData(const FormData& d)
@@ -390,56 +394,60 @@ static CFDictionaryRef createConnectionProperties(bool shouldUseCredentialStorag
return propertiesDictionary;
}
-bool ResourceHandle::start(Frame* frame)
+void ResourceHandle::createCFURLConnection(bool shouldUseCredentialStorage, bool shouldContentSniff)
{
- // If we are no longer attached to a Page, this must be an attempted load from an
- // onUnload handler, so let's just block it.
- if (!frame->page())
- return false;
-
- if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !d->m_request.url().protocolInHTTPFamily()) {
+ if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty()) && !firstRequest().url().protocolInHTTPFamily()) {
// Credentials for ftp can only be passed in URL, the didReceiveAuthenticationChallenge delegate call won't be made.
- KURL urlWithCredentials(d->m_request.url());
+ KURL urlWithCredentials(firstRequest().url());
urlWithCredentials.setUser(d->m_user);
urlWithCredentials.setPass(d->m_pass);
- d->m_request.setURL(urlWithCredentials);
+ firstRequest().setURL(urlWithCredentials);
}
- bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this);
-
// <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
// try and reuse the credential preemptively, as allowed by RFC 2617.
- if (shouldUseCredentialStorage && d->m_request.url().protocolInHTTPFamily()) {
+ if (shouldUseCredentialStorage && firstRequest().url().protocolInHTTPFamily()) {
if (d->m_user.isEmpty() && d->m_pass.isEmpty()) {
// <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
// try and reuse the credential preemptively, as allowed by RFC 2617.
- d->m_initialCredential = CredentialStorage::get(d->m_request.url());
+ d->m_initialCredential = CredentialStorage::get(firstRequest().url());
} else {
// If there is already a protection space known for the URL, update stored credentials before sending a request.
// This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately
// (so that an authentication dialog doesn't pop up).
- CredentialStorage::set(Credential(d->m_user, d->m_pass, CredentialPersistenceNone), d->m_request.url());
+ CredentialStorage::set(Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url());
}
}
if (!d->m_initialCredential.isEmpty()) {
String authHeader = "Basic " + encodeBasicAuthorization(d->m_initialCredential.user(), d->m_initialCredential.password());
- d->m_request.addHTTPHeaderField("Authorization", authHeader);
+ firstRequest().addHTTPHeaderField("Authorization", authHeader);
}
- RetainPtr<CFURLRequestRef> request(AdoptCF, makeFinalRequest(d->m_request, d->m_shouldContentSniff));
-
- CFURLConnectionClient_V3 client = { 3, this, 0, 0, 0, WebCore::willSendRequest, didReceiveResponse, didReceiveData, NULL, didFinishLoading, didFail, willCacheResponse, didReceiveChallenge, didSendBodyData, shouldUseCredentialStorageCallback, 0};
+ RetainPtr<CFURLRequestRef> request(AdoptCF, makeFinalRequest(firstRequest(), shouldContentSniff));
+ CFURLConnectionClient_V3 client = { 3, this, 0, 0, 0, WebCore::willSendRequest, didReceiveResponse, didReceiveData, 0, didFinishLoading, didFail, willCacheResponse, didReceiveChallenge, didSendBodyData, shouldUseCredentialStorageCallback, 0};
RetainPtr<CFDictionaryRef> connectionProperties(AdoptCF, createConnectionProperties(shouldUseCredentialStorage));
d->m_connection.adoptCF(CFURLConnectionCreateWithProperties(0, request.get(), reinterpret_cast<CFURLConnectionClient*>(&client), connectionProperties.get()));
+}
+
+bool ResourceHandle::start(Frame* frame)
+{
+ // If we are no longer attached to a Page, this must be an attempted load from an
+ // onUnload handler, so let's just block it.
+ if (!frame->page())
+ return false;
+
+ bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this);
+
+ createCFURLConnection(shouldUseCredentialStorage, d->m_shouldContentSniff);
CFURLConnectionScheduleWithCurrentMessageQueue(d->m_connection.get());
CFURLConnectionScheduleDownloadWithRunLoop(d->m_connection.get(), loaderRunLoop(), kCFRunLoopDefaultMode);
CFURLConnectionStart(d->m_connection.get());
- LOG(Network, "CFNet - Starting URL %s (handle=%p, conn=%p)", d->m_request.url().string().utf8().data(), this, d->m_connection);
+ LOG(Network, "CFNet - Starting URL %s (handle=%p, conn=%p)", firstRequest().url().string().utf8().data(), this, d->m_connection);
return true;
}
@@ -500,7 +508,7 @@ void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChall
KURL urlToStore;
if (challenge.failureResponse().httpStatusCode() == 401)
- urlToStore = d->m_request.url();
+ urlToStore = firstRequest().url();
CredentialStorage::set(core(credential.get()), challenge.protectionSpace(), urlToStore);
CFURLConnectionUseCredential(d->m_connection.get(), credential.get(), challenge.cfURLAuthChallengeRef());
@@ -510,17 +518,26 @@ void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChall
return;
}
- if (!challenge.previousFailureCount() && (!client() || client()->shouldUseCredentialStorage(this))) {
- Credential credential = CredentialStorage::get(challenge.protectionSpace());
- if (!credential.isEmpty() && credential != d->m_initialCredential) {
- ASSERT(credential.persistence() == CredentialPersistenceNone);
- if (challenge.failureResponse().httpStatusCode() == 401) {
- // Store the credential back, possibly adding it as a default for this directory.
- CredentialStorage::set(credential, challenge.protectionSpace(), d->m_request.url());
+ if (!client() || client()->shouldUseCredentialStorage(this)) {
+ if (!d->m_initialCredential.isEmpty() || challenge.previousFailureCount()) {
+ // The stored credential wasn't accepted, stop using it.
+ // There is a race condition here, since a different credential might have already been stored by another ResourceHandle,
+ // but the observable effect should be very minor, if any.
+ CredentialStorage::remove(challenge.protectionSpace());
+ }
+
+ if (!challenge.previousFailureCount()) {
+ Credential credential = CredentialStorage::get(challenge.protectionSpace());
+ if (!credential.isEmpty() && credential != d->m_initialCredential) {
+ ASSERT(credential.persistence() == CredentialPersistenceNone);
+ if (challenge.failureResponse().httpStatusCode() == 401) {
+ // Store the credential back, possibly adding it as a default for this directory.
+ CredentialStorage::set(credential, challenge.protectionSpace(), firstRequest().url());
+ }
+ RetainPtr<CFURLCredentialRef> cfCredential(AdoptCF, createCF(credential));
+ CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
+ return;
}
- RetainPtr<CFURLCredentialRef> cfCredential(AdoptCF, createCF(credential));
- CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
- return;
}
}
@@ -552,7 +569,7 @@ void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge
KURL urlToStore;
if (challenge.failureResponse().httpStatusCode() == 401)
- urlToStore = d->m_request.url();
+ urlToStore = firstRequest().url();
CredentialStorage::set(webCredential, challenge.protectionSpace(), urlToStore);
CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef());
@@ -598,12 +615,43 @@ CFURLConnectionRef ResourceHandle::releaseConnectionForDownload()
return d->m_connection.releaseRef();
}
-void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& vector, Frame*)
+void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& vector, Frame* frame)
{
+ LOG(Network, "ResourceHandle::loadResourceSynchronously:%s allowStoredCredentials:%u", request.url().string().utf8().data(), storedCredentials);
+
ASSERT(!request.isEmpty());
- RetainPtr<CFDataRef> data = WebCoreSynchronousLoader::load(request, storedCredentials, response, error);
+ ASSERT(response.isNull());
+ ASSERT(error.isNull());
+
+ OwnPtr<WebCoreSynchronousLoaderClient> client = WebCoreSynchronousLoaderClient::create(response, error);
+ client->setAllowStoredCredentials(storedCredentials == AllowStoredCredentials);
+
+ RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, client.get(), false /*defersLoading*/, true /*shouldContentSniff*/));
+
+ if (handle->d->m_scheduledFailureType != NoFailure) {
+ error = frame->loader()->blockedError(request);
+ return;
+ }
+
+ RetainPtr<CFDictionaryRef> connectionProperties(AdoptCF, createConnectionProperties(storedCredentials == AllowStoredCredentials));
+ handle->createCFURLConnection(storedCredentials == AllowStoredCredentials, ResourceHandle::shouldContentSniffURL(request.url()));
+
+ CFURLConnectionScheduleWithRunLoop(handle->connection(), CFRunLoopGetCurrent(), WebCoreSynchronousLoaderRunLoopMode);
+ CFURLConnectionScheduleDownloadWithRunLoop(handle->connection(), CFRunLoopGetCurrent(), WebCoreSynchronousLoaderRunLoopMode);
+ CFURLConnectionStart(handle->connection());
+
+ while (!client->isDone())
+ CFRunLoopRunInMode(WebCoreSynchronousLoaderRunLoopMode, UINT_MAX, true);
+
+ CFURLConnectionCancel(handle->connection());
+
+ if (error.isNull() && response.mimeType().isNull())
+ setDefaultMIMEType(response.cfURLResponse());
+
+ RetainPtr<CFDataRef> data = client->data();
+
if (!error.isNull()) {
response = ResourceResponse(request.url(), String(), 0, String(), String());
@@ -666,173 +714,51 @@ bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame* frame)
return cached;
}
-CFURLRequestRef WebCoreSynchronousLoader::willSendRequest(CFURLConnectionRef, CFURLRequestRef cfRequest, CFURLResponseRef cfRedirectResponse, const void* clientInfo)
+void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
// FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.
- if (loader->m_url && !protocolHostAndPortAreEqual(loader->m_url.get(), CFURLRequestGetURL(cfRequest))) {
+ if (!protocolHostAndPortAreEqual(handle->firstRequest().url(), request.url())) {
+ ASSERT(!m_error);
RetainPtr<CFErrorRef> cfError(AdoptCF, CFErrorCreate(kCFAllocatorDefault, kCFErrorDomainCFNetwork, kCFURLErrorBadServerResponse, 0));
- loader->m_error = cfError.get();
- loader->m_isDone = true;
- return 0;
- }
-
- loader->m_url = CFURLRequestGetURL(cfRequest);
-
- if (cfRedirectResponse) {
- // Take user/pass out of the URL.
- loader->m_user.adoptCF(CFURLCopyUserName(loader->m_url.get()));
- loader->m_pass.adoptCF(CFURLCopyPassword(loader->m_url.get()));
- if (loader->m_user || loader->m_pass) {
- ResourceRequest requestWithoutCredentials = cfRequest;
- requestWithoutCredentials.removeCredentials();
- cfRequest = requestWithoutCredentials.cfURLRequest();
- }
+ m_error = cfError.get();
+ m_isDone = true;
+ request = 0;
+ return;
}
-
- CFRetain(cfRequest);
- return cfRequest;
}
-
-void WebCoreSynchronousLoader::didReceiveResponse(CFURLConnectionRef, CFURLResponseRef cfResponse, const void* clientInfo)
+void WebCoreSynchronousLoaderClient::didReceiveResponse(ResourceHandle*, const ResourceResponse& response)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
- loader->m_response = cfResponse;
+ m_response = response;
}
-void WebCoreSynchronousLoader::didReceiveData(CFURLConnectionRef, CFDataRef data, CFIndex originalLength, const void* clientInfo)
+void WebCoreSynchronousLoaderClient::didReceiveData(ResourceHandle*, const char* data, int length, int /*lengthReceived*/)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
- if (!loader->m_data)
- loader->m_data.adoptCF(CFDataCreateMutable(kCFAllocatorDefault, 0));
-
- const UInt8* bytes = CFDataGetBytePtr(data);
- CFIndex length = CFDataGetLength(data);
-
- CFDataAppendBytes(loader->m_data.get(), bytes, length);
+ if (!m_data)
+ m_data.adoptCF(CFDataCreateMutable(kCFAllocatorDefault, 0));
+ CFDataAppendBytes(m_data.get(), reinterpret_cast<const UInt8*>(data), length);
}
-void WebCoreSynchronousLoader::didFinishLoading(CFURLConnectionRef, const void* clientInfo)
+void WebCoreSynchronousLoaderClient::didFinishLoading(ResourceHandle*)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
- loader->m_isDone = true;
+ m_isDone = true;
}
-void WebCoreSynchronousLoader::didFail(CFURLConnectionRef, CFErrorRef error, const void* clientInfo)
+void WebCoreSynchronousLoaderClient::didFail(ResourceHandle*, const ResourceError& error)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
- loader->m_error = error;
- loader->m_isDone = true;
+ m_error = error;
+ m_isDone = true;
}
-void WebCoreSynchronousLoader::didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challenge, const void* clientInfo)
+void WebCoreSynchronousLoaderClient::didReceiveAuthenticationChallenge(ResourceHandle* handle, const AuthenticationChallenge& challenge)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
- CFURLResponseRef urlResponse = (CFURLResponseRef)CFURLAuthChallengeGetFailureResponse(challenge);
- CFHTTPMessageRef httpResponse = urlResponse ? CFURLResponseGetHTTPResponse(urlResponse) : 0;
-
- if (loader->m_user && loader->m_pass) {
- Credential credential(loader->m_user.get(), loader->m_pass.get(), CredentialPersistenceNone);
- RetainPtr<CFURLCredentialRef> cfCredential(AdoptCF, createCF(credential));
-
- KURL urlToStore;
- if (httpResponse && CFHTTPMessageGetResponseStatusCode(httpResponse) == 401)
- urlToStore = loader->m_url.get();
-
- CredentialStorage::set(credential, core(CFURLAuthChallengeGetProtectionSpace(challenge)), urlToStore);
-
- CFURLConnectionUseCredential(conn, cfCredential.get(), challenge);
- loader->m_user = 0;
- loader->m_pass = 0;
- return;
- }
- if (!CFURLAuthChallengeGetPreviousFailureCount(challenge) && loader->m_allowStoredCredentials) {
- Credential credential = CredentialStorage::get(core(CFURLAuthChallengeGetProtectionSpace(challenge)));
- if (!credential.isEmpty() && credential != loader->m_initialCredential) {
- ASSERT(credential.persistence() == CredentialPersistenceNone);
- if (httpResponse && CFHTTPMessageGetResponseStatusCode(httpResponse) == 401) {
- // Store the credential back, possibly adding it as a default for this directory.
- CredentialStorage::set(credential, core(CFURLAuthChallengeGetProtectionSpace(challenge)), loader->m_url.get());
- }
- RetainPtr<CFURLCredentialRef> cfCredential(AdoptCF, createCF(credential));
- CFURLConnectionUseCredential(conn, cfCredential.get(), challenge);
- return;
- }
- }
// FIXME: The user should be asked for credentials, as in async case.
- CFURLConnectionUseCredential(conn, 0, challenge);
+ CFURLConnectionUseCredential(handle->connection(), 0, challenge.cfURLAuthChallengeRef());
}
-Boolean WebCoreSynchronousLoader::shouldUseCredentialStorage(CFURLConnectionRef, const void* clientInfo)
+bool WebCoreSynchronousLoaderClient::shouldUseCredentialStorage(ResourceHandle*)
{
- WebCoreSynchronousLoader* loader = static_cast<WebCoreSynchronousLoader*>(const_cast<void*>(clientInfo));
-
// FIXME: We should ask FrameLoaderClient whether using credential storage is globally forbidden.
- return loader->m_allowStoredCredentials;
-}
-
-RetainPtr<CFDataRef> WebCoreSynchronousLoader::load(const ResourceRequest& request, StoredCredentials storedCredentials, ResourceResponse& response, ResourceError& error)
-{
- ASSERT(response.isNull());
- ASSERT(error.isNull());
-
- WebCoreSynchronousLoader loader(response, error);
-
- KURL url = request.url();
-
- if (url.user().length())
- loader.m_user.adoptCF(url.user().createCFString());
- if (url.pass().length())
- loader.m_pass.adoptCF(url.pass().createCFString());
- loader.m_allowStoredCredentials = (storedCredentials == AllowStoredCredentials);
-
- // Take user/pass out of the URL.
- // Credentials for ftp can only be passed in URL, the didReceiveAuthenticationChallenge delegate call won't be made.
- RetainPtr<CFURLRequestRef> cfRequest;
- if ((loader.m_user || loader.m_pass) && url.protocolInHTTPFamily()) {
- ResourceRequest requestWithoutCredentials(request);
- requestWithoutCredentials.removeCredentials();
- cfRequest.adoptCF(makeFinalRequest(requestWithoutCredentials, ResourceHandle::shouldContentSniffURL(requestWithoutCredentials.url())));
- } else {
- // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
- // try and reuse the credential preemptively, as allowed by RFC 2617.
- ResourceRequest requestWithInitialCredential(request);
- if (loader.m_allowStoredCredentials && url.protocolInHTTPFamily())
- loader.m_initialCredential = CredentialStorage::get(url);
-
- if (!loader.m_initialCredential.isEmpty()) {
- String authHeader = "Basic " + encodeBasicAuthorization(loader.m_initialCredential.user(), loader.m_initialCredential.password());
- requestWithInitialCredential.addHTTPHeaderField("Authorization", authHeader);
- }
-
- cfRequest.adoptCF(makeFinalRequest(requestWithInitialCredential, ResourceHandle::shouldContentSniffURL(requestWithInitialCredential.url())));
- }
-
- CFURLConnectionClient_V3 client = { 3, &loader, 0, 0, 0, willSendRequest, didReceiveResponse, didReceiveData, 0, didFinishLoading, didFail, 0, didReceiveChallenge, 0, shouldUseCredentialStorage, 0 };
-
- RetainPtr<CFDictionaryRef> connectionProperties(AdoptCF, createConnectionProperties(loader.m_allowStoredCredentials));
-
- RetainPtr<CFURLConnectionRef> connection(AdoptCF, CFURLConnectionCreateWithProperties(kCFAllocatorDefault, cfRequest.get(), reinterpret_cast<CFURLConnectionClient*>(&client), connectionProperties.get()));
-
- CFURLConnectionScheduleWithRunLoop(connection.get(), CFRunLoopGetCurrent(), WebCoreSynchronousLoaderRunLoopMode);
- CFURLConnectionScheduleDownloadWithRunLoop(connection.get(), CFRunLoopGetCurrent(), WebCoreSynchronousLoaderRunLoopMode);
- CFURLConnectionStart(connection.get());
-
- while (!loader.m_isDone)
- CFRunLoopRunInMode(WebCoreSynchronousLoaderRunLoopMode, UINT_MAX, true);
-
- CFURLConnectionCancel(connection.get());
-
- if (error.isNull() && loader.m_response.mimeType().isNull())
- setDefaultMIMEType(loader.m_response.cfURLResponse());
-
- return loader.m_data;
+ return m_allowStoredCredentials;
}
} // namespace WebCore
diff --git a/WebCore/platform/network/cf/ResourceRequestCFNet.cpp b/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
index cc0220e..8e15040 100644
--- a/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
+++ b/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
@@ -146,6 +146,11 @@ void ResourceRequest::doUpdatePlatformRequest()
void ResourceRequest::doUpdateResourceRequest()
{
+ if (!m_cfRequest) {
+ *this = ResourceRequest();
+ return;
+ }
+
m_url = CFURLRequestGetURL(m_cfRequest.get());
m_cachePolicy = (ResourceRequestCachePolicy)CFURLRequestGetCachePolicy(m_cfRequest.get());
diff --git a/WebCore/platform/network/curl/FormDataStreamCurl.cpp b/WebCore/platform/network/curl/FormDataStreamCurl.cpp
index 0f94d63..e47eb07 100644
--- a/WebCore/platform/network/curl/FormDataStreamCurl.cpp
+++ b/WebCore/platform/network/curl/FormDataStreamCurl.cpp
@@ -50,8 +50,8 @@ size_t FormDataStream::read(void* ptr, size_t blockSize, size_t numberOfBlocks)
return 0;
Vector<FormDataElement> elements;
- if (m_resourceHandle->request().httpBody())
- elements = m_resourceHandle->request().httpBody()->elements();
+ if (m_resourceHandle->firstRequest().httpBody())
+ elements = m_resourceHandle->firstRequest().httpBody()->elements();
if (m_formDataElementIndex >= elements.size())
return 0;
@@ -104,8 +104,8 @@ size_t FormDataStream::read(void* ptr, size_t blockSize, size_t numberOfBlocks)
bool FormDataStream::hasMoreElements() const
{
Vector<FormDataElement> elements;
- if (m_resourceHandle->request().httpBody())
- elements = m_resourceHandle->request().httpBody()->elements();
+ if (m_resourceHandle->firstRequest().httpBody())
+ elements = m_resourceHandle->firstRequest().httpBody()->elements();
return m_formDataElementIndex < elements.size();
}
diff --git a/WebCore/platform/network/curl/ResourceHandleManager.cpp b/WebCore/platform/network/curl/ResourceHandleManager.cpp
index c621d5c..ba68351 100644
--- a/WebCore/platform/network/curl/ResourceHandleManager.cpp
+++ b/WebCore/platform/network/curl/ResourceHandleManager.cpp
@@ -264,14 +264,14 @@ static size_t headerCallback(char* ptr, size_t size, size_t nmemb, void* data)
if (httpCode >= 300 && httpCode < 400) {
String location = d->m_response.httpHeaderField("location");
if (!location.isEmpty()) {
- KURL newURL = KURL(job->request().url(), location);
+ KURL newURL = KURL(job->firstRequest().url(), location);
- ResourceRequest redirectedRequest = job->request();
+ ResourceRequest redirectedRequest = job->firstRequest();
redirectedRequest.setURL(newURL);
if (client)
client->willSendRequest(job, redirectedRequest, d->m_response);
- d->m_request.setURL(newURL);
+ d->m_firstRequest.setURL(newURL);
return totalSize;
}
@@ -463,17 +463,17 @@ void ResourceHandleManager::setupPOST(ResourceHandle* job, struct curl_slist** h
curl_easy_setopt(d->m_handle, CURLOPT_POST, TRUE);
curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDSIZE, 0);
- if (!job->request().httpBody())
+ if (!job->firstRequest().httpBody())
return;
- Vector<FormDataElement> elements = job->request().httpBody()->elements();
+ Vector<FormDataElement> elements = job->firstRequest().httpBody()->elements();
size_t numElements = elements.size();
if (!numElements)
return;
// Do not stream for simple POST data
if (numElements == 1) {
- job->request().httpBody()->flatten(d->m_postBytes);
+ job->firstRequest().httpBody()->flatten(d->m_postBytes);
if (d->m_postBytes.size() != 0) {
curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDSIZE, d->m_postBytes.size());
curl_easy_setopt(d->m_handle, CURLOPT_POSTFIELDS, d->m_postBytes.data());
@@ -580,7 +580,7 @@ static void parseDataUrl(ResourceHandle* handle)
if (!client)
return;
- String url = handle->request().url().string();
+ String url = handle->firstRequest().url().string();
ASSERT(url.startsWith("data:", false));
int index = url.find(',');
@@ -628,7 +628,7 @@ static void parseDataUrl(ResourceHandle* handle)
void ResourceHandleManager::dispatchSynchronousJob(ResourceHandle* job)
{
- KURL kurl = job->request().url();
+ KURL kurl = job->firstRequest().url();
if (kurl.protocolIs("data")) {
parseDataUrl(job);
@@ -659,7 +659,7 @@ void ResourceHandleManager::dispatchSynchronousJob(ResourceHandle* job)
void ResourceHandleManager::startJob(ResourceHandle* job)
{
- KURL kurl = job->request().url();
+ KURL kurl = job->firstRequest().url();
if (kurl.protocolIs("data")) {
parseDataUrl(job);
@@ -674,7 +674,7 @@ void ResourceHandleManager::startJob(ResourceHandle* job)
// timeout will occur and do curl_multi_perform
if (ret && ret != CURLM_CALL_MULTI_PERFORM) {
#ifndef NDEBUG
- fprintf(stderr, "Error %d starting job %s\n", ret, encodeWithURLEscapeSequences(job->request().url().string()).latin1().data());
+ fprintf(stderr, "Error %d starting job %s\n", ret, encodeWithURLEscapeSequences(job->firstRequest().url().string()).latin1().data());
#endif
job->cancel();
return;
@@ -683,7 +683,7 @@ void ResourceHandleManager::startJob(ResourceHandle* job)
void ResourceHandleManager::initializeHandle(ResourceHandle* job)
{
- KURL kurl = job->request().url();
+ KURL kurl = job->firstRequest().url();
// Remove any fragment part, otherwise curl will send it as part of the request.
kurl.removeFragmentIdentifier();
@@ -753,8 +753,8 @@ void ResourceHandleManager::initializeHandle(ResourceHandle* job)
}
struct curl_slist* headers = 0;
- if (job->request().httpHeaderFields().size() > 0) {
- HTTPHeaderMap customHeaders = job->request().httpHeaderFields();
+ if (job->firstRequest().httpHeaderFields().size() > 0) {
+ HTTPHeaderMap customHeaders = job->firstRequest().httpHeaderFields();
HTTPHeaderMap::const_iterator end = customHeaders.end();
for (HTTPHeaderMap::const_iterator it = customHeaders.begin(); it != end; ++it) {
String key = it->first;
@@ -767,13 +767,13 @@ void ResourceHandleManager::initializeHandle(ResourceHandle* job)
}
}
- if ("GET" == job->request().httpMethod())
+ if ("GET" == job->firstRequest().httpMethod())
curl_easy_setopt(d->m_handle, CURLOPT_HTTPGET, TRUE);
- else if ("POST" == job->request().httpMethod())
+ else if ("POST" == job->firstRequest().httpMethod())
setupPOST(job, &headers);
- else if ("PUT" == job->request().httpMethod())
+ else if ("PUT" == job->firstRequest().httpMethod())
setupPUT(job, &headers);
- else if ("HEAD" == job->request().httpMethod())
+ else if ("HEAD" == job->firstRequest().httpMethod())
curl_easy_setopt(d->m_handle, CURLOPT_NOBODY, TRUE);
if (headers) {
diff --git a/WebCore/platform/network/mac/ResourceHandleMac.mm b/WebCore/platform/network/mac/ResourceHandleMac.mm
index 9f64d4e..f7161ec 100644
--- a/WebCore/platform/network/mac/ResourceHandleMac.mm
+++ b/WebCore/platform/network/mac/ResourceHandleMac.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2006-2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -56,8 +56,7 @@ typedef int NSInteger;
using namespace WebCore;
-@interface WebCoreResourceHandleAsDelegate : NSObject <NSURLConnectionDelegate>
-{
+@interface WebCoreResourceHandleAsDelegate : NSObject <NSURLConnectionDelegate> {
ResourceHandle* m_handle;
}
- (id)initWithHandle:(ResourceHandle*)handle;
@@ -85,20 +84,48 @@ using namespace WebCore;
#ifndef BUILDING_ON_TIGER
-@interface WebCoreSynchronousLoader : NSObject <NSURLConnectionDelegate> {
- NSURL *m_url;
- NSString *m_user;
- NSString *m_pass;
- // Store the preemptively used initial credential so that if we get an authentication challenge, we won't use the same one again.
- Credential m_initialCredential;
- BOOL m_allowStoredCredentials;
+class WebCoreSynchronousLoaderClient : public ResourceHandleClient {
+public:
+ static PassOwnPtr<WebCoreSynchronousLoaderClient> create()
+ {
+ return adoptPtr(new WebCoreSynchronousLoaderClient);
+ }
+
+ virtual ~WebCoreSynchronousLoaderClient();
+
+ void setAllowStoredCredentials(bool allow) { m_allowStoredCredentials = allow; }
+ NSURLResponse *response() { return m_response; }
+ NSMutableData *data() { return m_data; }
+ NSError *error() { return m_error; }
+ bool isDone() { return m_isDone; }
+
+private:
+ WebCoreSynchronousLoaderClient()
+ : m_allowStoredCredentials(false)
+ , m_response(0)
+ , m_data(0)
+ , m_error(0)
+ , m_isDone(false)
+ {
+ }
+
+ virtual void willSendRequest(ResourceHandle*, ResourceRequest&, const ResourceResponse& /*redirectResponse*/);
+ virtual bool shouldUseCredentialStorage(ResourceHandle*);
+ virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&);
+ virtual void didReceiveResponse(ResourceHandle*, const ResourceResponse&);
+ virtual void didReceiveData(ResourceHandle*, const char*, int, int /*lengthReceived*/);
+ virtual void didFinishLoading(ResourceHandle*);
+ virtual void didFail(ResourceHandle*, const ResourceError&);
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+ virtual bool canAuthenticateAgainstProtectionSpace(ResourceHandle*, const ProtectionSpace&);
+#endif
+
+ bool m_allowStoredCredentials;
NSURLResponse *m_response;
NSMutableData *m_data;
NSError *m_error;
- BOOL m_isDone;
-}
-+ (NSData *)loadRequest:(NSURLRequest *)request allowStoredCredentials:(BOOL)allowStoredCredentials returningResponse:(NSURLResponse **)response error:(NSError **)error;
-@end
+ bool m_isDone;
+};
static NSString *WebCoreSynchronousLoaderRunLoopMode = @"WebCoreSynchronousLoaderRunLoopMode";
@@ -161,12 +188,51 @@ bool ResourceHandle::didSendBodyDataDelegateExists()
return NSFoundationVersionNumber > MaxFoundationVersionWithoutdidSendBodyDataDelegate;
}
-static NSURLConnection *createNSURLConnection(NSURLRequest *request, id delegate, bool shouldUseCredentialStorage)
+void ResourceHandle::createNSURLConnection(id delegate, bool shouldUseCredentialStorage, bool shouldContentSniff)
{
-#if defined(BUILDING_ON_TIGER)
- UNUSED_PARAM(shouldUseCredentialStorage);
- return [[NSURLConnection alloc] initWithRequest:request delegate:delegate];
-#else
+ // Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
+ if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty())
+#ifndef BUILDING_ON_TIGER
+ && !firstRequest().url().protocolInHTTPFamily() // On Tiger, always pass credentials in URL, so that they get stored even if the request gets cancelled right away.
+#endif
+ ) {
+ KURL urlWithCredentials(firstRequest().url());
+ urlWithCredentials.setUser(d->m_user);
+ urlWithCredentials.setPass(d->m_pass);
+ firstRequest().setURL(urlWithCredentials);
+ }
+
+ // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
+ NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+ if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain && [[sharedStorage cookiesForURL:firstRequest().url()] count])
+ firstRequest().setFirstPartyForCookies(firstRequest().url());
+
+#if !defined(BUILDING_ON_TIGER)
+ if (shouldUseCredentialStorage && firstRequest().url().protocolInHTTPFamily()) {
+ if (d->m_user.isEmpty() && d->m_pass.isEmpty()) {
+ // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
+ // try and reuse the credential preemptively, as allowed by RFC 2617.
+ d->m_initialCredential = CredentialStorage::get(firstRequest().url());
+ } else {
+ // If there is already a protection space known for the URL, update stored credentials before sending a request.
+ // This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately
+ // (so that an authentication dialog doesn't pop up).
+ CredentialStorage::set(Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url());
+ }
+ }
+
+ if (!d->m_initialCredential.isEmpty()) {
+ // FIXME: Support Digest authentication, and Proxy-Authorization.
+ String authHeader = "Basic " + encodeBasicAuthorization(d->m_initialCredential.user(), d->m_initialCredential.password());
+ firstRequest().addHTTPHeaderField("Authorization", authHeader);
+ }
+
+ NSURLRequest *nsRequest = firstRequest().nsURLRequest();
+ if (!shouldContentSniff) {
+ NSMutableURLRequest *mutableRequest = [[nsRequest copy] autorelease];
+ wkSetNSURLRequestShouldContentSniff(mutableRequest, NO);
+ nsRequest = mutableRequest;
+ }
#if !defined(BUILDING_ON_LEOPARD)
ASSERT([NSURLConnection instancesRespondToSelector:@selector(_initWithRequest:delegate:usesCache:maxContentLength:startImmediately:connectionProperties:)]);
@@ -178,10 +244,18 @@ static NSURLConnection *createNSURLConnection(NSURLRequest *request, id delegate
if (supportsSettingConnectionProperties) {
NSDictionary *sessionID = shouldUseCredentialStorage ? [NSDictionary dictionary] : [NSDictionary dictionaryWithObject:@"WebKitPrivateSession" forKey:@"_kCFURLConnectionSessionID"];
NSDictionary *propertyDictionary = [NSDictionary dictionaryWithObject:sessionID forKey:@"kCFURLConnectionSocketStreamProperties"];
- return [[NSURLConnection alloc] _initWithRequest:request delegate:delegate usesCache:YES maxContentLength:0 startImmediately:NO connectionProperties:propertyDictionary];
+ d->m_connection.adoptNS([[NSURLConnection alloc] _initWithRequest:nsRequest delegate:delegate usesCache:YES maxContentLength:0 startImmediately:NO connectionProperties:propertyDictionary]);
+ return;
}
- return [[NSURLConnection alloc] initWithRequest:request delegate:delegate startImmediately:NO];
+ d->m_connection.adoptNS([[NSURLConnection alloc] initWithRequest:nsRequest delegate:delegate startImmediately:NO]);
+ return;
+
+#else
+ // Building on Tiger. Don't use WebCore credential storage, don't try to disable content sniffing.
+ UNUSED_PARAM(shouldUseCredentialStorage);
+ UNUSED_PARAM(shouldContentSniff);
+ d->m_connection.adoptNS([[NSURLConnection alloc] initWithRequest:firstRequest().nsURLRequest() delegate:delegate]);
#endif
}
@@ -206,69 +280,24 @@ bool ResourceHandle::start(Frame* frame)
d->m_proxy.adoptNS(wkCreateNSURLConnectionDelegateProxy());
[static_cast<WebCoreNSURLConnectionDelegateProxy*>(d->m_proxy.get()) setDelegate:ResourceHandle::delegate()];
- if ((!d->m_user.isEmpty() || !d->m_pass.isEmpty())
-#ifndef BUILDING_ON_TIGER
- && !d->m_request.url().protocolInHTTPFamily() // On Tiger, always pass credentials in URL, so that they get stored even if the request gets cancelled right away.
-#endif
- ) {
- // Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
- KURL urlWithCredentials(d->m_request.url());
- urlWithCredentials.setUser(d->m_user);
- urlWithCredentials.setPass(d->m_pass);
- d->m_request.setURL(urlWithCredentials);
- }
-
bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this);
-#ifndef BUILDING_ON_TIGER
- if (shouldUseCredentialStorage && d->m_request.url().protocolInHTTPFamily()) {
- if (d->m_user.isEmpty() && d->m_pass.isEmpty()) {
- // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
- // try and reuse the credential preemptively, as allowed by RFC 2617.
- d->m_initialCredential = CredentialStorage::get(d->m_request.url());
- } else {
- // If there is already a protection space known for the URL, update stored credentials before sending a request.
- // This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately
- // (so that an authentication dialog doesn't pop up).
- CredentialStorage::set(Credential(d->m_user, d->m_pass, CredentialPersistenceNone), d->m_request.url());
- }
- }
-
- if (!d->m_initialCredential.isEmpty()) {
- // FIXME: Support Digest authentication, and Proxy-Authorization.
- String authHeader = "Basic " + encodeBasicAuthorization(d->m_initialCredential.user(), d->m_initialCredential.password());
- d->m_request.addHTTPHeaderField("Authorization", authHeader);
- }
-#endif
-
if (!ResourceHandle::didSendBodyDataDelegateExists())
- associateStreamWithResourceHandle([d->m_request.nsURLRequest() HTTPBodyStream], this);
+ associateStreamWithResourceHandle([firstRequest().nsURLRequest() HTTPBodyStream], this);
#ifdef BUILDING_ON_TIGER
// A conditional request sent by WebCore (e.g. to update appcache) can be for a resource that is not cacheable by NSURLConnection,
// which can get confused and fail to load it in this case.
- if (d->m_request.isConditional())
- d->m_request.setCachePolicy(ReloadIgnoringCacheData);
+ if (firstRequest().isConditional())
+ firstRequest().setCachePolicy(ReloadIgnoringCacheData);
#endif
d->m_needsSiteSpecificQuirks = frame->settings() && frame->settings()->needsSiteSpecificQuirks();
- // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
- NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
- && [[sharedStorage cookiesForURL:d->m_request.url()] count])
- d->m_request.setFirstPartyForCookies(d->m_request.url());
-
- NSURLConnection *connection;
-
- if (d->m_shouldContentSniff || frame->settings()->localFileContentSniffingEnabled())
- connection = createNSURLConnection(d->m_request.nsURLRequest(), d->m_proxy.get(), shouldUseCredentialStorage);
- else {
- NSMutableURLRequest *request = [d->m_request.nsURLRequest() mutableCopy];
- wkSetNSURLRequestShouldContentSniff(request, NO);
- connection = createNSURLConnection(request, d->m_proxy.get(), shouldUseCredentialStorage);
- [request release];
- }
+ createNSURLConnection(
+ d->m_proxy.get(),
+ shouldUseCredentialStorage,
+ d->m_shouldContentSniff || frame->settings()->localFileContentSniffingEnabled());
#ifndef BUILDING_ON_TIGER
bool scheduled = false;
@@ -276,7 +305,7 @@ bool ResourceHandle::start(Frame* frame)
SchedulePairHashSet::iterator end = scheduledPairs->end();
for (SchedulePairHashSet::iterator it = scheduledPairs->begin(); it != end; ++it) {
if (NSRunLoop *runLoop = (*it)->nsRunLoop()) {
- [connection scheduleInRunLoop:runLoop forMode:(NSString *)(*it)->mode()];
+ [connection() scheduleInRunLoop:runLoop forMode:(NSString *)(*it)->mode()];
scheduled = true;
}
}
@@ -285,7 +314,7 @@ bool ResourceHandle::start(Frame* frame)
// Start the connection if we did schedule with at least one runloop.
// We can't start the connection until we have one runloop scheduled.
if (scheduled)
- [connection start];
+ [connection() start];
else
d->m_startWhenScheduled = true;
#endif
@@ -294,15 +323,11 @@ bool ResourceHandle::start(Frame* frame)
isInitializingConnection = NO;
#endif
- LOG(Network, "Handle %p starting connection %p for %@", this, connection, d->m_request.nsURLRequest());
+ LOG(Network, "Handle %p starting connection %p for %@", this, connection(), firstRequest().nsURLRequest());
- d->m_connection = connection;
-
if (d->m_connection) {
- [connection release];
-
if (d->m_defersLoading)
- wkSetNSURLConnectionDefersCallbacks(d->m_connection.get(), YES);
+ wkSetNSURLConnectionDefersCallbacks(connection(), YES);
return true;
}
@@ -321,7 +346,7 @@ void ResourceHandle::cancel()
[[d->m_currentMacChallenge sender] cancelAuthenticationChallenge:d->m_currentMacChallenge];
if (!ResourceHandle::didSendBodyDataDelegateExists())
- disassociateStreamWithResourceHandle([d->m_request.nsURLRequest() HTTPBodyStream]);
+ disassociateStreamWithResourceHandle([firstRequest().nsURLRequest() HTTPBodyStream]);
[d->m_connection.get() cancel];
}
@@ -435,43 +460,63 @@ bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*)
#endif
}
-void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data, Frame*)
+void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data, Frame* frame)
{
+ LOG(Network, "ResourceHandle::loadResourceSynchronously:%@ allowStoredCredentials:%u", request.nsURLRequest(), storedCredentials);
+
NSError *nsError = nil;
-
NSURLResponse *nsURLResponse = nil;
NSData *result = nil;
ASSERT(!request.isEmpty());
- NSMutableURLRequest *mutableRequest = nil;
- if (!shouldContentSniffURL(request.url())) {
- mutableRequest = [[request.nsURLRequest() mutableCopy] autorelease];
- wkSetNSURLRequestShouldContentSniff(mutableRequest, NO);
- }
+#ifndef BUILDING_ON_TIGER
+ OwnPtr<WebCoreSynchronousLoaderClient> client = WebCoreSynchronousLoaderClient::create();
+ client->setAllowStoredCredentials(storedCredentials == AllowStoredCredentials);
- // If a URL already has cookies, then we'll ignore the 3rd party cookie policy and accept new cookies.
- NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
- && [[sharedStorage cookiesForURL:request.url()] count]) {
- if (!mutableRequest)
- mutableRequest = [[request.nsURLRequest() mutableCopy] autorelease];
- [mutableRequest setMainDocumentURL:[mutableRequest URL]];
+ RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(request, client.get(), false /*defersLoading*/, true /*shouldContentSniff*/));
+
+ if (handle->d->m_scheduledFailureType != NoFailure) {
+ error = frame->loader()->blockedError(request);
+ return;
}
+
+ handle->createNSURLConnection(
+ handle->delegate(), // A synchronous request cannot turn into a download, so there is no need to proxy the delegate.
+ storedCredentials == AllowStoredCredentials,
+ handle->shouldContentSniff() || frame->settings()->localFileContentSniffingEnabled());
+
+ [handle->connection() scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:WebCoreSynchronousLoaderRunLoopMode];
+ [handle->connection() start];
- NSURLRequest *nsRequest = mutableRequest ? mutableRequest : request.nsURLRequest();
-
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ while (!client->isDone())
+ [[NSRunLoop currentRunLoop] runMode:WebCoreSynchronousLoaderRunLoopMode beforeDate:[NSDate distantFuture]];
+
+ result = client->data();
+ nsURLResponse = client->response();
+ nsError = client->error();
-#ifndef BUILDING_ON_TIGER
- result = [WebCoreSynchronousLoader loadRequest:nsRequest allowStoredCredentials:(storedCredentials == AllowStoredCredentials) returningResponse:&nsURLResponse error:&nsError];
+ [handle->connection() cancel];
+
#else
UNUSED_PARAM(storedCredentials);
- result = [NSURLConnection sendSynchronousRequest:nsRequest returningResponse:&nsURLResponse error:&nsError];
-#endif
+ UNUSED_PARAM(frame);
+ NSURLRequest *firstRequest = request.nsURLRequest();
+
+ // If a URL already has cookies, then we'll relax the 3rd party cookie policy and accept new cookies.
+ NSHTTPCookieStorage *sharedStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+ if ([sharedStorage cookieAcceptPolicy] == NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain && [[sharedStorage cookiesForURL:[firstRequest URL]] count]) {
+ NSMutableURLRequest *mutableRequest = [[firstRequest mutableCopy] autorelease];
+ [mutableRequest setMainDocumentURL:[mutableRequest URL]];
+ firstRequest = mutableRequest;
+ }
+
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ result = [NSURLConnection sendSynchronousRequest:firstRequest returningResponse:&nsURLResponse error:&nsError];
END_BLOCK_OBJC_EXCEPTIONS;
+#endif
- if (nsError == nil)
+ if (!nsError)
response = nsURLResponse;
else {
response = ResourceResponse(request.url(), String(), 0, String(), String());
@@ -536,16 +581,25 @@ void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChall
}
#ifndef BUILDING_ON_TIGER
- if (!challenge.previousFailureCount() && (!client() || client()->shouldUseCredentialStorage(this))) {
- Credential credential = CredentialStorage::get(challenge.protectionSpace());
- if (!credential.isEmpty() && credential != d->m_initialCredential) {
- ASSERT(credential.persistence() == CredentialPersistenceNone);
- if (challenge.failureResponse().httpStatusCode() == 401) {
- // Store the credential back, possibly adding it as a default for this directory.
- CredentialStorage::set(credential, challenge.protectionSpace(), d->m_request.url());
+ if (!client() || client()->shouldUseCredentialStorage(this)) {
+ if (!d->m_initialCredential.isEmpty() || challenge.previousFailureCount()) {
+ // The stored credential wasn't accepted, stop using it.
+ // There is a race condition here, since a different credential might have already been stored by another ResourceHandle,
+ // but the observable effect should be very minor, if any.
+ CredentialStorage::remove(challenge.protectionSpace());
+ }
+
+ if (!challenge.previousFailureCount()) {
+ Credential credential = CredentialStorage::get(challenge.protectionSpace());
+ if (!credential.isEmpty() && credential != d->m_initialCredential) {
+ ASSERT(credential.persistence() == CredentialPersistenceNone);
+ if (challenge.failureResponse().httpStatusCode() == 401) {
+ // Store the credential back, possibly adding it as a default for this directory.
+ CredentialStorage::set(credential, challenge.protectionSpace(), firstRequest().url());
+ }
+ [challenge.sender() useCredential:mac(credential) forAuthenticationChallenge:mac(challenge)];
+ return;
}
- [challenge.sender() useCredential:mac(credential) forAuthenticationChallenge:mac(challenge)];
- return;
}
}
#endif
@@ -604,7 +658,7 @@ void ResourceHandle::receivedCredential(const AuthenticationChallenge& challenge
Credential webCredential(credential, CredentialPersistenceNone);
KURL urlToStore;
if (challenge.failureResponse().httpStatusCode() == 401)
- urlToStore = d->m_request.url();
+ urlToStore = firstRequest().url();
CredentialStorage::set(webCredential, core([d->m_currentMacChallenge protectionSpace]), urlToStore);
[[d->m_currentMacChallenge sender] useCredential:mac(webCredential) forAuthenticationChallenge:d->m_currentMacChallenge];
} else
@@ -679,11 +733,11 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
NSMutableURLRequest *mutableRequest = [newRequest mutableCopy];
[mutableRequest setHTTPMethod:lastHTTPMethod];
- FormData* body = m_handle->request().httpBody();
+ FormData* body = m_handle->firstRequest().httpBody();
if (!equalIgnoringCase(lastHTTPMethod, "GET") && body && !body->isEmpty())
WebCore::setHTTPBody(mutableRequest, body);
- String originalContentType = m_handle->request().httpContentType();
+ String originalContentType = m_handle->firstRequest().httpContentType();
if (!originalContentType.isEmpty())
[mutableRequest setValue:originalContentType forHTTPHeaderField:@"Content-Type"];
@@ -779,7 +833,7 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
if (statusCode != 304)
[r adjustMIMETypeIfNecessary];
- if ([m_handle->request().nsURLRequest() _propertyForKey:@"ForceHTMLMIMEType"])
+ if ([m_handle->firstRequest().nsURLRequest() _propertyForKey:@"ForceHTMLMIMEType"])
[r _setMIMEType:@"text/html"];
#if ENABLE(WML)
@@ -855,7 +909,7 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
CallbackGuard guard;
if (!ResourceHandle::didSendBodyDataDelegateExists())
- disassociateStreamWithResourceHandle([m_handle->request().nsURLRequest() HTTPBodyStream]);
+ disassociateStreamWithResourceHandle([m_handle->firstRequest().nsURLRequest() HTTPBodyStream]);
m_handle->client()->didFinishLoading(m_handle);
}
@@ -871,7 +925,7 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
CallbackGuard guard;
if (!ResourceHandle::didSendBodyDataDelegateExists())
- disassociateStreamWithResourceHandle([m_handle->request().nsURLRequest() HTTPBodyStream]);
+ disassociateStreamWithResourceHandle([m_handle->firstRequest().nsURLRequest() HTTPBodyStream]);
m_handle->client()->didFail(m_handle, error);
}
@@ -947,220 +1001,69 @@ void ResourceHandle::receivedCancellation(const AuthenticationChallenge& challen
#ifndef BUILDING_ON_TIGER
-@implementation WebCoreSynchronousLoader
-
-- (BOOL)_isDone
-{
- return m_isDone;
-}
-
-- (void)dealloc
+WebCoreSynchronousLoaderClient::~WebCoreSynchronousLoaderClient()
{
- [m_url release];
- [m_user release];
- [m_pass release];
[m_response release];
[m_data release];
[m_error release];
-
- [super dealloc];
}
-- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)newRequest redirectResponse:(NSURLResponse *)redirectResponse
+void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connection:%p willSendRequest:%@ redirectResponse:%p", connection, [newRequest description], redirectResponse);
-
// FIXME: This needs to be fixed to follow the redirect correctly even for cross-domain requests.
- if (m_url && !protocolHostAndPortAreEqual(m_url, [newRequest URL])) {
+ if (!protocolHostAndPortAreEqual(handle->firstRequest().url(), request.url())) {
+ ASSERT(!m_error);
m_error = [[NSError alloc] initWithDomain:NSURLErrorDomain code:NSURLErrorBadServerResponse userInfo:nil];
- m_isDone = YES;
- return nil;
- }
-
- NSURL *copy = [[newRequest URL] copy];
- [m_url release];
- m_url = copy;
-
- if (redirectResponse) {
- // Take user/pass out of the URL.
- [m_user release];
- [m_pass release];
- m_user = [[m_url user] copy];
- m_pass = [[m_url password] copy];
- if (m_user || m_pass) {
- ResourceRequest requestWithoutCredentials = newRequest;
- requestWithoutCredentials.removeCredentials();
- return requestWithoutCredentials.nsURLRequest();
- }
+ m_isDone = true;
+ request = 0;
+ return;
}
-
- return newRequest;
}
-- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection
+bool WebCoreSynchronousLoaderClient::shouldUseCredentialStorage(ResourceHandle*)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connectionShouldUseCredentialStorage:%p", connection);
-
// FIXME: We should ask FrameLoaderClient whether using credential storage is globally forbidden.
return m_allowStoredCredentials;
}
-- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+bool WebCoreSynchronousLoaderClient::canAuthenticateAgainstProtectionSpace(ResourceHandle*, const ProtectionSpace&)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connection:%p didReceiveAuthenticationChallenge:%p", connection, challenge);
+ // FIXME: We should ask FrameLoaderClient.
+ return true;
+}
+#endif
- if (m_user && m_pass) {
- NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:m_user
- password:m_pass
- persistence:NSURLCredentialPersistenceNone];
- KURL urlToStore;
- if ([[challenge failureResponse] isKindOfClass:[NSHTTPURLResponse class]] && [(NSHTTPURLResponse*)[challenge failureResponse] statusCode] == 401)
- urlToStore = m_url;
- CredentialStorage::set(core(credential), core([challenge protectionSpace]), urlToStore);
-
- [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
- [credential release];
- [m_user release];
- [m_pass release];
- m_user = 0;
- m_pass = 0;
- return;
- }
- if ([challenge previousFailureCount] == 0 && m_allowStoredCredentials) {
- Credential credential = CredentialStorage::get(core([challenge protectionSpace]));
- if (!credential.isEmpty() && credential != m_initialCredential) {
- ASSERT(credential.persistence() == CredentialPersistenceNone);
- if ([[challenge failureResponse] isKindOfClass:[NSHTTPURLResponse class]] && [(NSHTTPURLResponse *)[challenge failureResponse] statusCode] == 401) {
- // Store the credential back, possibly adding it as a default for this directory.
- CredentialStorage::set(credential, core([challenge protectionSpace]), m_url);
- }
- [[challenge sender] useCredential:mac(credential) forAuthenticationChallenge:challenge];
- return;
- }
- }
+void WebCoreSynchronousLoaderClient::didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge)
+{
// FIXME: The user should be asked for credentials, as in async case.
- [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
+ [challenge.sender() continueWithoutCredentialForAuthenticationChallenge:challenge.nsURLAuthenticationChallenge()];
}
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
+void WebCoreSynchronousLoaderClient::didReceiveResponse(ResourceHandle*, const ResourceResponse& response)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connection:%p didReceiveResponse:%p (HTTP status %d, reported MIMEType '%s')", connection, response, [response respondsToSelector:@selector(statusCode)] ? [(id)response statusCode] : 0, [[response MIMEType] UTF8String]);
-
- NSURLResponse *r = [response copy];
-
[m_response release];
- m_response = r;
+ m_response = [response.nsURLResponse() copy];
}
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
+void WebCoreSynchronousLoaderClient::didReceiveData(ResourceHandle*, const char* data, int length, int /*lengthReceived*/)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connection:%p didReceiveData:%p", connection, data);
-
if (!m_data)
m_data = [[NSMutableData alloc] init];
-
- [m_data appendData:data];
+ [m_data appendBytes:data length:length];
}
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+void WebCoreSynchronousLoaderClient::didFinishLoading(ResourceHandle*)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connectionDidFinishLoading:%p", connection);
-
- m_isDone = YES;
+ m_isDone = true;
}
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
+void WebCoreSynchronousLoaderClient::didFail(ResourceHandle*, const ResourceError& error)
{
- UNUSED_PARAM(connection);
-
- LOG(Network, "WebCoreSynchronousLoader delegate connection:%p didFailWithError:%@", connection, error);
-
ASSERT(!m_error);
-
- m_error = [error retain];
- m_isDone = YES;
-}
-
-- (NSData *)_data
-{
- return [[m_data retain] autorelease];
-}
-
-- (NSURLResponse *)_response
-{
- return [[m_response retain] autorelease];
-}
-- (NSError *)_error
-{
- return [[m_error retain] autorelease];
+ m_error = [error copy];
+ m_isDone = true;
}
-+ (NSData *)loadRequest:(NSURLRequest *)request allowStoredCredentials:(BOOL)allowStoredCredentials returningResponse:(NSURLResponse **)response error:(NSError **)error
-{
- LOG(Network, "WebCoreSynchronousLoader loadRequest:%@ allowStoredCredentials:%u", request, allowStoredCredentials);
-
- WebCoreSynchronousLoader *delegate = [[WebCoreSynchronousLoader alloc] init];
-
- KURL url([request URL]);
- delegate->m_user = [nsStringNilIfEmpty(url.user()) retain];
- delegate->m_pass = [nsStringNilIfEmpty(url.pass()) retain];
- delegate->m_allowStoredCredentials = allowStoredCredentials;
-
- NSURLConnection *connection;
-
- // Take user/pass out of the URL.
- // Credentials for ftp can only be passed in URL, the connection:didReceiveAuthenticationChallenge: delegate call won't be made.
- if ((delegate->m_user || delegate->m_pass) && url.protocolInHTTPFamily()) {
- ResourceRequest requestWithoutCredentials = request;
- requestWithoutCredentials.removeCredentials();
- connection = createNSURLConnection(requestWithoutCredentials.nsURLRequest(), delegate, allowStoredCredentials);
- } else {
- // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
- // try and reuse the credential preemptively, as allowed by RFC 2617.
- ResourceRequest requestWithInitialCredentials = request;
- if (allowStoredCredentials && url.protocolInHTTPFamily())
- delegate->m_initialCredential = CredentialStorage::get(url);
-
- if (!delegate->m_initialCredential.isEmpty()) {
- String authHeader = "Basic " + encodeBasicAuthorization(delegate->m_initialCredential.user(), delegate->m_initialCredential.password());
- requestWithInitialCredentials.addHTTPHeaderField("Authorization", authHeader);
- }
- connection = createNSURLConnection(requestWithInitialCredentials.nsURLRequest(), delegate, allowStoredCredentials);
- }
-
- [connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:WebCoreSynchronousLoaderRunLoopMode];
- [connection start];
-
- while (![delegate _isDone])
- [[NSRunLoop currentRunLoop] runMode:WebCoreSynchronousLoaderRunLoopMode beforeDate:[NSDate distantFuture]];
-
- NSData *data = [delegate _data];
- *response = [delegate _response];
- *error = [delegate _error];
-
- [connection cancel];
-
- [connection release];
- [delegate release];
-
- LOG(Network, "WebCoreSynchronousLoader done");
-
- return data;
-}
-
-@end
-
#endif
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 1ae24ff..131f924 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -150,7 +150,7 @@ QNetworkReplyHandler::QNetworkReplyHandler(ResourceHandle* handle, LoadMode load
, m_shouldForwardData(false)
, m_redirectionTries(gMaxRecursionLimit)
{
- const ResourceRequest &r = m_resourceHandle->request();
+ const ResourceRequest &r = m_resourceHandle->firstRequest();
if (r.httpMethod() == "GET")
m_method = QNetworkAccessManager::GetOperation;
@@ -309,7 +309,7 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
}
KURL url(m_reply->url());
- ResourceResponse response(url, mimeType,
+ ResourceResponse response(url, mimeType.lower(),
m_reply->header(QNetworkRequest::ContentLengthHeader).toLongLong(),
encoding, String());
@@ -358,7 +358,7 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
}
m_redirected = true;
- ResourceRequest newRequest = m_resourceHandle->request();
+ ResourceRequest newRequest = m_resourceHandle->firstRequest();
newRequest.setURL(newUrl);
if (((statusCode >= 301 && statusCode <= 303) || statusCode == 307) && newRequest.httpMethod() == "POST") {
@@ -442,7 +442,7 @@ void QNetworkReplyHandler::start()
m_reply = manager->get(m_request);
break;
case QNetworkAccessManager::PostOperation: {
- FormDataIODevice* postDevice = new FormDataIODevice(d->m_request.httpBody());
+ FormDataIODevice* postDevice = new FormDataIODevice(d->m_firstRequest.httpBody());
m_reply = manager->post(m_request, postDevice);
postDevice->setParent(m_reply);
break;
@@ -451,7 +451,7 @@ void QNetworkReplyHandler::start()
m_reply = manager->head(m_request);
break;
case QNetworkAccessManager::PutOperation: {
- FormDataIODevice* putDevice = new FormDataIODevice(d->m_request.httpBody());
+ FormDataIODevice* putDevice = new FormDataIODevice(d->m_firstRequest.httpBody());
m_reply = manager->put(m_request, putDevice);
putDevice->setParent(m_reply);
break;
@@ -464,7 +464,7 @@ void QNetworkReplyHandler::start()
#endif
#if QT_VERSION >= 0x040700
case QNetworkAccessManager::CustomOperation:
- m_reply = manager->sendCustomRequest(m_request, m_resourceHandle->request().httpMethod().latin1().data());
+ m_reply = manager->sendCustomRequest(m_request, m_resourceHandle->firstRequest().httpMethod().latin1().data());
break;
#endif
case QNetworkAccessManager::UnknownOperation: {
@@ -494,7 +494,7 @@ void QNetworkReplyHandler::start()
connect(m_reply, SIGNAL(readyRead()),
this, SLOT(forwardData()), SIGNAL_CONN);
- if (m_resourceHandle->request().reportUploadProgress()) {
+ if (m_resourceHandle->firstRequest().reportUploadProgress()) {
connect(m_reply, SIGNAL(uploadProgress(qint64, qint64)),
this, SLOT(uploadProgress(qint64, qint64)), SIGNAL_CONN);
}
diff --git a/WebCore/platform/network/qt/ResourceHandleQt.cpp b/WebCore/platform/network/qt/ResourceHandleQt.cpp
index ff75a94..f91eecb 100644
--- a/WebCore/platform/network/qt/ResourceHandleQt.cpp
+++ b/WebCore/platform/network/qt/ResourceHandleQt.cpp
@@ -43,7 +43,6 @@
// FIXME: WebCore including these headers from WebKit is a massive layering violation.
#include "qwebframe_p.h"
-#include "qwebpage_p.h"
#include <QAbstractNetworkCache>
#include <QCoreApplication>
@@ -130,10 +129,10 @@ bool ResourceHandle::start(Frame* frame)
if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) {
// If credentials were specified for this request, add them to the url,
// so that they will be passed to QNetworkRequest.
- KURL urlWithCredentials(d->m_request.url());
+ KURL urlWithCredentials(firstRequest().url());
urlWithCredentials.setUser(d->m_user);
urlWithCredentials.setPass(d->m_pass);
- d->m_request.setURL(urlWithCredentials);
+ d->m_firstRequest.setURL(urlWithCredentials);
}
getInternal()->m_frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();
@@ -195,10 +194,10 @@ void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, S
if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) {
// If credentials were specified for this request, add them to the url,
// so that they will be passed to QNetworkRequest.
- KURL urlWithCredentials(d->m_request.url());
+ KURL urlWithCredentials(d->m_firstRequest.url());
urlWithCredentials.setUser(d->m_user);
urlWithCredentials.setPass(d->m_pass);
- d->m_request.setURL(urlWithCredentials);
+ d->m_firstRequest.setURL(urlWithCredentials);
}
d->m_frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();
d->m_job = new QNetworkReplyHandler(handle.get(), QNetworkReplyHandler::LoadNormal);
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index e4f2a4b..96a2f25 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -188,9 +188,9 @@ static void restartedCallback(SoupMessage* msg, gpointer data)
char* uri = soup_uri_to_string(soup_message_get_uri(msg), false);
String location = String(uri);
g_free(uri);
- KURL newURL = KURL(handle->request().url(), location);
+ KURL newURL = KURL(handle->firstRequest().url(), location);
- ResourceRequest request = handle->request();
+ ResourceRequest request = handle->firstRequest();
ResourceResponse response;
request.setURL(newURL);
request.setHTTPMethod(msg->method);
@@ -354,7 +354,7 @@ static gboolean parseDataUrl(gpointer callbackData)
if (!client)
return false;
- String url = handle->request().url().string();
+ String url = handle->firstRequest().url().string();
ASSERT(url.startsWith("data:", false));
int index = url.find(',');
@@ -377,7 +377,7 @@ static gboolean parseDataUrl(gpointer callbackData)
String charset = extractCharsetFromMediaType(mediaType);
ResourceResponse response;
- response.setURL(handle->request().url());
+ response.setURL(handle->firstRequest().url());
response.setMimeType(mimeType);
if (isBase64) {
@@ -478,7 +478,7 @@ static bool startHttp(ResourceHandle* handle)
ResourceHandleInternal* d = handle->getInternal();
- ResourceRequest request(handle->request());
+ ResourceRequest request(handle->firstRequest());
KURL url(request.url());
url.removeFragmentIdentifier();
request.setURL(url);
@@ -504,7 +504,7 @@ static bool startHttp(ResourceHandle* handle)
#endif
g_object_set_data(G_OBJECT(d->m_msg), "resourceHandle", reinterpret_cast<void*>(handle));
- FormData* httpBody = d->m_request.httpBody();
+ FormData* httpBody = d->m_firstRequest.httpBody();
if (httpBody && !httpBody->isEmpty()) {
size_t numElements = httpBody->elements().size();
@@ -512,7 +512,7 @@ static bool startHttp(ResourceHandle* handle)
if (numElements < 2) {
Vector<char> body;
httpBody->flatten(body);
- soup_message_set_request(d->m_msg, d->m_request.httpContentType().utf8().data(),
+ soup_message_set_request(d->m_msg, d->m_firstRequest.httpContentType().utf8().data(),
SOUP_MEMORY_COPY, body.data(), body.size());
} else {
/*
@@ -590,7 +590,7 @@ bool ResourceHandle::start(Frame* frame)
if (frame && !frame->page())
return false;
- KURL url = request().url();
+ KURL url = firstRequest().url();
String urlString = url.string();
String protocol = url.protocol();
@@ -889,7 +889,7 @@ static bool startGio(ResourceHandle* handle, KURL url)
ResourceHandleInternal* d = handle->getInternal();
- if (handle->request().httpMethod() != "GET" && handle->request().httpMethod() != "POST")
+ if (handle->firstRequest().httpMethod() != "GET" && handle->firstRequest().httpMethod() != "POST")
return false;
// GIO doesn't know how to handle refs and queries, so remove them
diff --git a/WebCore/platform/qt/CursorQt.cpp b/WebCore/platform/qt/CursorQt.cpp
index 2e495e7..6017daa 100644
--- a/WebCore/platform/qt/CursorQt.cpp
+++ b/WebCore/platform/qt/CursorQt.cpp
@@ -44,12 +44,12 @@
namespace WebCore {
Cursor::Cursor(PlatformCursor p)
- : m_impl(p)
+ : m_platformCursor(p)
{
}
Cursor::Cursor(const Cursor& other)
- : m_impl(other.m_impl)
+ : m_platformCursor(other.m_platformCursor)
{
}
@@ -61,13 +61,13 @@ Cursor::Cursor(Image* image, const IntPoint& hotSpot)
{
#ifndef QT_NO_CURSOR
IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
- m_impl = QCursor(*(image->nativeImageForCurrentFrame()), effectiveHotSpot.x(), effectiveHotSpot.y());
+ m_platformCursor = QCursor(*(image->nativeImageForCurrentFrame()), effectiveHotSpot.x(), effectiveHotSpot.y());
#endif
}
Cursor& Cursor::operator=(const Cursor& other)
{
- m_impl = other.m_impl;
+ m_platformCursor = other.m_platformCursor;
return *this;
}
diff --git a/WebCore/platform/qt/GeolocationServiceQt.cpp b/WebCore/platform/qt/GeolocationServiceQt.cpp
index e24d497..3562eb9 100644
--- a/WebCore/platform/qt/GeolocationServiceQt.cpp
+++ b/WebCore/platform/qt/GeolocationServiceQt.cpp
@@ -55,6 +55,7 @@ GeolocationServiceQt::GeolocationServiceQt(GeolocationServiceClient* client)
GeolocationServiceQt::~GeolocationServiceQt()
{
+ delete m_location;
}
void GeolocationServiceQt::positionUpdated(const QGeoPositionInfo &geoPosition)
@@ -65,20 +66,19 @@ void GeolocationServiceQt::positionUpdated(const QGeoPositionInfo &geoPosition)
QGeoCoordinate coord = geoPosition.coordinate();
double latitude = coord.latitude();
double longitude = coord.longitude();
- bool providesAltitude = true;
+ bool providesAltitude = (geoPosition.coordinate().type() == QGeoCoordinate::Coordinate3D);
double altitude = coord.altitude();
- double accuracy = geoPosition.hasAttribute(QGeoPositionInfo::HorizontalAccuracy) ?
- geoPosition.attribute(QGeoPositionInfo::HorizontalAccuracy) : 0.0;
+ double accuracy = geoPosition.attribute(QGeoPositionInfo::HorizontalAccuracy);
bool providesAltitudeAccuracy = geoPosition.hasAttribute(QGeoPositionInfo::VerticalAccuracy);
- double altitudeAccuracy = providesAltitudeAccuracy ? geoPosition.attribute(QGeoPositionInfo::VerticalAccuracy) : 0.0;
+ double altitudeAccuracy = geoPosition.attribute(QGeoPositionInfo::VerticalAccuracy);
bool providesHeading = geoPosition.hasAttribute(QGeoPositionInfo::Direction);
- double heading = providesHeading ? geoPosition.attribute(QGeoPositionInfo::Direction) : 0.0;
+ double heading = geoPosition.attribute(QGeoPositionInfo::Direction);
bool providesSpeed = geoPosition.hasAttribute(QGeoPositionInfo::GroundSpeed);
- double speed = providesSpeed ? geoPosition.attribute(QGeoPositionInfo::GroundSpeed) : 0.0;
+ double speed = geoPosition.attribute(QGeoPositionInfo::GroundSpeed);
RefPtr<Coordinates> coordinates = Coordinates::create(latitude, longitude, providesAltitude, altitude,
accuracy, providesAltitudeAccuracy, altitudeAccuracy,
diff --git a/WebCore/platform/qt/RenderThemeQt.cpp b/WebCore/platform/qt/RenderThemeQt.cpp
index deb9037..22d99a1 100644
--- a/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/WebCore/platform/qt/RenderThemeQt.cpp
@@ -58,8 +58,6 @@
#include "ScrollbarThemeQt.h"
#include "TimeRanges.h"
#include "UserAgentStyleSheets.h"
-#include "qwebpage.h"
-
#include <QApplication>
#include <QColor>
diff --git a/WebCore/platform/qt/WidgetQt.cpp b/WebCore/platform/qt/WidgetQt.cpp
index 00a58a4..0903b6e 100644
--- a/WebCore/platform/qt/WidgetQt.cpp
+++ b/WebCore/platform/qt/WidgetQt.cpp
@@ -41,14 +41,11 @@
#include "QWebPageClient.h"
#include "ScrollView.h"
-#include "qwebframe.h"
-#include "qwebframe_p.h"
-#include "qwebpage.h"
-
#include <QCoreApplication>
#include <QDebug>
#include <QPaintEngine>
#include <QPainter>
+#include <QWidget>
namespace WebCore {
diff --git a/WebCore/platform/text/LineEnding.cpp b/WebCore/platform/text/LineEnding.cpp
new file mode 100644
index 0000000..545f22b
--- /dev/null
+++ b/WebCore/platform/text/LineEnding.cpp
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LineEnding.h"
+
+#include "PlatformString.h"
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+// Normalize all line-endings to CRLF.
+CString normalizeLineEndingsToCRLF(const CString& from)
+{
+ unsigned newLen = 0;
+ const char* p = from.data();
+ while (char c = *p++) {
+ if (c == '\r') {
+ // Safe to look ahead because of trailing '\0'.
+ if (*p != '\n') {
+ // Turn CR into CRLF.
+ newLen += 2;
+ }
+ } else if (c == '\n') {
+ // Turn LF into CRLF.
+ newLen += 2;
+ } else {
+ // Leave other characters alone.
+ newLen += 1;
+ }
+ }
+ if (newLen == from.length())
+ return from;
+
+ // Make a copy of the string.
+ p = from.data();
+ char* q;
+ CString result = CString::newUninitialized(newLen, q);
+ while (char c = *p++) {
+ if (c == '\r') {
+ // Safe to look ahead because of trailing '\0'.
+ if (*p != '\n') {
+ // Turn CR into CRLF.
+ *q++ = '\r';
+ *q++ = '\n';
+ }
+ } else if (c == '\n') {
+ // Turn LF into CRLF.
+ *q++ = '\r';
+ *q++ = '\n';
+ } else {
+ // Leave other characters alone.
+ *q++ = c;
+ }
+ }
+ return result;
+}
+
+// Normalize all line-endings to CR or LF.
+static CString normalizeToCROrLF(const CString& from, bool toCR)
+{
+ unsigned newLen = 0;
+ bool needFix = false;
+ const char* p = from.data();
+ char fromEndingChar = toCR ? '\n' : '\r';
+ char toEndingChar = toCR ? '\r' : '\n';
+ while (char c = *p++) {
+ if (c == '\r' && *p == '\n') {
+ // Turn CRLF into CR or LF.
+ p++;
+ needFix = true;
+ } else if (c == fromEndingChar) {
+ // Turn CR/LF into LF/CR.
+ needFix = true;
+ }
+ newLen += 1;
+ }
+ if (!needFix)
+ return from;
+
+ // Make a copy of the string.
+ p = from.data();
+ char* q;
+ CString result = CString::newUninitialized(newLen, q);
+ while (char c = *p++) {
+ if (c == '\r' && *p == '\n') {
+ // Turn CRLF or CR into CR or LF.
+ p++;
+ *q++ = toEndingChar;
+ } else if (c == fromEndingChar) {
+ // Turn CR/LF into LF/CR.
+ *q++ = toEndingChar;
+ } else {
+ // Leave other characters alone.
+ *q++ = c;
+ }
+ }
+ return result;
+}
+
+// Normalize all line-endings to CR.
+CString normalizeLineEndingsToCR(const CString& from)
+{
+ return normalizeToCROrLF(from, true);
+}
+
+// Normalize all line-endings to LF.
+CString normalizeLineEndingsToLF(const CString& from)
+{
+ return normalizeToCROrLF(from, false);
+}
+
+CString normalizeLineEndingsToNative(const CString& from)
+{
+#if OS(WINDOWS)
+ return normalizeLineEndingsToCRLF(from);
+#else
+ return normalizeLineEndingsToLF(from);
+#endif
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/text/LineEnding.h b/WebCore/platform/text/LineEnding.h
new file mode 100644
index 0000000..9c3e2aa
--- /dev/null
+++ b/WebCore/platform/text/LineEnding.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LineEnding_h
+#define LineEnding_h
+
+namespace WTF {
+class CString;
+}
+
+namespace WebCore {
+
+// Normalize all line-endings in the given string to CRLF.
+WTF::CString normalizeLineEndingsToCRLF(const WTF::CString&);
+
+// Normalize all line-endings in the given string to CR.
+WTF::CString normalizeLineEndingsToCR(const WTF::CString&);
+
+// Normalize all line-endings in the given string to LF.
+WTF::CString normalizeLineEndingsToLF(const WTF::CString&);
+
+// Normalize all line-endings in the given string to the native line-endings.
+// (Normalize to CRLF on Windows and normalize to LF on all other platforms.)
+WTF::CString normalizeLineEndingsToNative(const WTF::CString&);
+
+} // namespace WebCore
+
+#endif // LineEnding_h
diff --git a/WebCore/platform/win/ClipboardUtilitiesWin.cpp b/WebCore/platform/win/ClipboardUtilitiesWin.cpp
index fbd0011..e6af7ef 100644
--- a/WebCore/platform/win/ClipboardUtilitiesWin.cpp
+++ b/WebCore/platform/win/ClipboardUtilitiesWin.cpp
@@ -32,10 +32,10 @@
#include "TextEncoding.h"
#include "markup.h"
#include <CoreFoundation/CoreFoundation.h>
+#include <shlwapi.h>
+#include <wininet.h> // for INTERNET_MAX_URL_LENGTH
#include <wtf/RetainPtr.h>
#include <wtf/text/CString.h>
-#include <shlwapi.h>
-#include <wininet.h> // for INTERNET_MAX_URL_LENGTH
namespace WebCore {
@@ -97,7 +97,7 @@ static String extractURL(const String &inURL, String* title)
return url;
}
-//Firefox text/html
+// Firefox text/html
static FORMATETC* texthtmlFormat()
{
static UINT cf = RegisterClipboardFormat(L"text/html");
@@ -109,7 +109,7 @@ HGLOBAL createGlobalData(const KURL& url, const String& title)
{
String mutableURL(url.string());
String mutableTitle(title);
- SIZE_T size = mutableURL.length() + mutableTitle.length() + 2; // +1 for "\n" and +1 for null terminator
+ SIZE_T size = mutableURL.length() + mutableTitle.length() + 2; // +1 for "\n" and +1 for null terminator
HGLOBAL cbData = ::GlobalAlloc(GPTR, size * sizeof(UChar));
if (cbData) {
@@ -155,7 +155,7 @@ static void append(Vector<char>& vector, const CString& string)
}
// Documentation for the CF_HTML format is available at http://msdn.microsoft.com/workshop/networking/clipboard/htmlclipboard.asp
-void markupToCF_HTML(const String& markup, const String& srcURL, Vector<char>& result)
+void markupToCFHTML(const String& markup, const String& srcURL, Vector<char>& result)
{
if (markup.isEmpty())
return;
@@ -256,7 +256,7 @@ FORMATETC* filenameFormat()
return &urlFormat;
}
-//MSIE HTML Format
+// MSIE HTML Format
FORMATETC* htmlFormat()
{
static UINT cf = RegisterClipboardFormat(L"HTML Format");
@@ -294,18 +294,17 @@ String getURL(IDataObject* dataObject, DragData::FilenameConversionPolicy filena
STGMEDIUM store;
String url;
success = false;
- if (getWebLocData(dataObject, url, title)) {
+ if (getWebLocData(dataObject, url, title))
success = true;
- return url;
- } else if (SUCCEEDED(dataObject->GetData(urlWFormat(), &store))) {
- //URL using unicode
+ else if (SUCCEEDED(dataObject->GetData(urlWFormat(), &store))) {
+ // URL using Unicode
UChar* data = (UChar*)GlobalLock(store.hGlobal);
url = extractURL(String(data), title);
GlobalUnlock(store.hGlobal);
ReleaseStgMedium(&store);
success = true;
} else if (SUCCEEDED(dataObject->GetData(urlFormat(), &store))) {
- //URL using ascii
+ // URL using ASCII
char* data = (char*)GlobalLock(store.hGlobal);
url = extractURL(String(data), title);
GlobalUnlock(store.hGlobal);
@@ -349,14 +348,14 @@ String getPlainText(IDataObject* dataObject, bool& success)
String text;
success = false;
if (SUCCEEDED(dataObject->GetData(plainTextWFormat(), &store))) {
- //unicode text
+ // Unicode text
UChar* data = (UChar*)GlobalLock(store.hGlobal);
text = String(data);
GlobalUnlock(store.hGlobal);
ReleaseStgMedium(&store);
success = true;
} else if (SUCCEEDED(dataObject->GetData(plainTextFormat(), &store))) {
- //ascii text
+ // ASCII text
char* data = (char*)GlobalLock(store.hGlobal);
text = String(data);
GlobalUnlock(store.hGlobal);
@@ -372,40 +371,55 @@ String getPlainText(IDataObject* dataObject, bool& success)
return text;
}
+String getTextHTML(IDataObject* data, bool& success)
+{
+ STGMEDIUM store;
+ String html;
+ success = false;
+ if (SUCCEEDED(data->GetData(texthtmlFormat(), &store))) {
+ UChar* data = static_cast<UChar*>(GlobalLock(store.hGlobal));
+ html = String(data);
+ GlobalUnlock(store.hGlobal);
+ ReleaseStgMedium(&store);
+ success = true;
+ }
+ return html;
+}
+
PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const IDataObject*)
{
- //FIXME: We should be able to create fragments from files
+ // FIXME: We should be able to create fragments from files
return 0;
}
bool containsFilenames(const IDataObject*)
{
- //FIXME: We'll want to update this once we can produce fragments from files
+ // FIXME: We'll want to update this once we can produce fragments from files
return false;
}
-//Convert a String containing CF_HTML formatted text to a DocumentFragment
-PassRefPtr<DocumentFragment> fragmentFromCF_HTML(Document* doc, const String& cf_html)
+// Convert a String containing CF_HTML formatted text to a DocumentFragment
+PassRefPtr<DocumentFragment> fragmentFromCFHTML(Document* doc, const String& cfhtml)
{
// obtain baseURL if present
String srcURLStr("sourceURL:");
String srcURL;
- unsigned lineStart = cf_html.find(srcURLStr, 0, false);
+ unsigned lineStart = cfhtml.find(srcURLStr, 0, false);
if (lineStart != -1) {
- unsigned srcEnd = cf_html.find("\n", lineStart, false);
+ unsigned srcEnd = cfhtml.find("\n", lineStart, false);
unsigned srcStart = lineStart+srcURLStr.length();
- String rawSrcURL = cf_html.substring(srcStart, srcEnd-srcStart);
+ String rawSrcURL = cfhtml.substring(srcStart, srcEnd-srcStart);
replaceNBSPWithSpace(rawSrcURL);
srcURL = rawSrcURL.stripWhiteSpace();
}
// find the markup between "<!--StartFragment -->" and "<!--EndFragment -->", accounting for browser quirks
- unsigned markupStart = cf_html.find("<html", 0, false);
- unsigned tagStart = cf_html.find("startfragment", markupStart, false);
- unsigned fragmentStart = cf_html.find('>', tagStart) + 1;
- unsigned tagEnd = cf_html.find("endfragment", fragmentStart, false);
- unsigned fragmentEnd = cf_html.reverseFind('<', tagEnd);
- String markup = cf_html.substring(fragmentStart, fragmentEnd - fragmentStart).stripWhiteSpace();
+ unsigned markupStart = cfhtml.find("<html", 0, false);
+ unsigned tagStart = cfhtml.find("startfragment", markupStart, false);
+ unsigned fragmentStart = cfhtml.find('>', tagStart) + 1;
+ unsigned tagEnd = cfhtml.find("endfragment", fragmentStart, false);
+ unsigned fragmentEnd = cfhtml.reverseFind('<', tagEnd);
+ String markup = cfhtml.substring(fragmentStart, fragmentEnd - fragmentStart).stripWhiteSpace();
return createFragmentFromMarkup(doc, markup, srcURL, FragmentScriptingNotAllowed);
}
@@ -420,23 +434,19 @@ PassRefPtr<DocumentFragment> fragmentFromHTML(Document* doc, IDataObject* data)
String html;
String srcURL;
if (SUCCEEDED(data->GetData(htmlFormat(), &store))) {
- //MS HTML Format parsing
+ // MS HTML Format parsing
char* data = (char*)GlobalLock(store.hGlobal);
SIZE_T dataSize = ::GlobalSize(store.hGlobal);
- String cf_html(UTF8Encoding().decode(data, dataSize));
+ String cfhtml(UTF8Encoding().decode(data, dataSize));
GlobalUnlock(store.hGlobal);
ReleaseStgMedium(&store);
- if (PassRefPtr<DocumentFragment> fragment = fragmentFromCF_HTML(doc, cf_html))
+ if (PassRefPtr<DocumentFragment> fragment = fragmentFromCFHTML(doc, cfhtml))
return fragment;
}
- if (SUCCEEDED(data->GetData(texthtmlFormat(), &store))) {
- //raw html
- UChar* data = (UChar*)GlobalLock(store.hGlobal);
- html = String(data);
- GlobalUnlock(store.hGlobal);
- ReleaseStgMedium(&store);
+ bool success = false;
+ html = getTextHTML(data, success);
+ if (success)
return createFragmentFromMarkup(doc, html, srcURL, FragmentScriptingNotAllowed);
- }
return 0;
}
diff --git a/WebCore/platform/win/ClipboardUtilitiesWin.h b/WebCore/platform/win/ClipboardUtilitiesWin.h
index ac5efd8..4ca46f9 100644
--- a/WebCore/platform/win/ClipboardUtilitiesWin.h
+++ b/WebCore/platform/win/ClipboardUtilitiesWin.h
@@ -49,7 +49,7 @@ FORMATETC* htmlFormat();
FORMATETC* cfHDropFormat();
FORMATETC* smartPasteFormat();
-void markupToCF_HTML(const String& markup, const String& srcURL, Vector<char>& result);
+void markupToCFHTML(const String& markup, const String& srcURL, Vector<char>& result);
void replaceNewlinesWithWindowsStyleNewlines(String&);
void replaceNBSPWithSpace(String&);
@@ -59,12 +59,12 @@ bool containsHTML(IDataObject*);
PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const IDataObject*);
PassRefPtr<DocumentFragment> fragmentFromHTML(Document*, IDataObject*);
-PassRefPtr<DocumentFragment> fragmentFromCF_HTML(Document*, const String& cf_html);
+PassRefPtr<DocumentFragment> fragmentFromCFHTML(Document*, const String& cfhtml);
String getURL(IDataObject*, DragData::FilenameConversionPolicy, bool& success, String* title = 0);
String getPlainText(IDataObject*, bool& success);
+String getTextHTML(IDataObject*, bool& success);
} // namespace WebCore
#endif // ClipboardUtilitiesWin_h
-
diff --git a/WebCore/platform/win/ClipboardWin.cpp b/WebCore/platform/win/ClipboardWin.cpp
index 3c3a205..2cd6feb 100644
--- a/WebCore/platform/win/ClipboardWin.cpp
+++ b/WebCore/platform/win/ClipboardWin.cpp
@@ -105,9 +105,8 @@ static inline void pathRemoveBadFSCharacters(PWSTR psz, size_t length)
size_t readFrom = 0;
while (readFrom < length) {
UINT type = PathGetCharType(psz[readFrom]);
- if (psz[readFrom] == 0 || type & (GCT_LFNCHAR | GCT_SHORTCHAR)) {
+ if (!psz[readFrom] || type & (GCT_LFNCHAR | GCT_SHORTCHAR))
psz[writeTo++] = psz[readFrom];
- }
readFrom++;
}
@@ -215,7 +214,7 @@ static HGLOBAL createGlobalImageFileContent(SharedBuffer* data)
static HGLOBAL createGlobalHDropContent(const KURL& url, String& fileName, SharedBuffer* data)
{
- if (fileName.isEmpty() || !data )
+ if (fileName.isEmpty() || !data)
return 0;
WCHAR filePath[MAX_PATH];
@@ -290,7 +289,7 @@ static HGLOBAL createGlobalUrlFileDescriptor(const String& url, const String& ti
fgd->cItems = 1;
fgd->fgd[0].dwFlags = FD_FILESIZE;
int fileSize = ::WideCharToMultiByte(CP_ACP, 0, url.characters(), url.length(), 0, 0, 0, 0);
- fileSize += strlen(szShellDotUrlTemplate) - 2; // -2 is for getting rid of %s in the template string
+ fileSize += strlen(szShellDotUrlTemplate) - 2; // -2 is for getting rid of %s in the template string
fgd->fgd[0].nFileSizeLow = fileSize;
estimatedSize = fileSize;
fsPath = filesystemPathFromUrlOrTitle(url, title, L".URL", true);
@@ -437,7 +436,7 @@ static bool writeURL(WCDataObject *data, const KURL& url, String title, bool wit
if (withHTML) {
Vector<char> cfhtmlData;
- markupToCF_HTML(urlToMarkup(url, title), "", cfhtmlData);
+ markupToCFHTML(urlToMarkup(url, title), "", cfhtmlData);
medium.hGlobal = createGlobalData(cfhtmlData);
if (medium.hGlobal && FAILED(data->SetData(htmlFormat(), &medium, TRUE)))
::GlobalFree(medium.hGlobal);
@@ -458,7 +457,7 @@ static bool writeURL(WCDataObject *data, const KURL& url, String title, bool wit
void ClipboardWin::clearData(const String& type)
{
- //FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
+ // FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
ASSERT(isForDragging());
if (policy() != ClipboardWritable || !m_writableDataObject)
return;
@@ -478,7 +477,7 @@ void ClipboardWin::clearData(const String& type)
void ClipboardWin::clearAllData()
{
- //FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
+ // FIXME: Need to be able to write to the system clipboard <rdar://problem/5015941>
ASSERT(isForDragging());
if (policy() != ClipboardWritable)
return;
@@ -491,14 +490,13 @@ void ClipboardWin::clearAllData()
String ClipboardWin::getData(const String& type, bool& success) const
{
success = false;
- if (policy() != ClipboardReadable || !m_dataObject) {
+ if (policy() != ClipboardReadable || !m_dataObject)
return "";
- }
ClipboardDataType dataType = clipboardTypeFromMIMEType(type);
if (dataType == ClipboardDataTypeText)
return getPlainText(m_dataObject.get(), success);
- else if (dataType == ClipboardDataTypeURL)
+ if (dataType == ClipboardDataTypeURL)
return getURL(m_dataObject.get(), DragData::DoNotConvertFilenames, success);
return "";
@@ -568,9 +566,8 @@ HashSet<String> ClipboardWin::types() const
FORMATETC data;
// IEnumFORMATETC::Next returns S_FALSE if there are no more items.
- while (itr->Next(1, &data, 0) == S_OK) {
+ while (itr->Next(1, &data, 0) == S_OK)
addMimeTypesForFormat(results, data);
- }
return results;
}
@@ -720,7 +717,7 @@ void ClipboardWin::declareAndWriteDragImage(Element* element, const KURL& url, c
// Put img tag on the clipboard referencing the image
Vector<char> data;
- markupToCF_HTML(imageToMarkup(fullURL), "", data);
+ markupToCFHTML(imageToMarkup(fullURL), "", data);
medium.hGlobal = createGlobalData(data);
if (medium.hGlobal && FAILED(m_writableDataObject->SetData(htmlFormat(), &medium, TRUE)))
::GlobalFree(medium.hGlobal);
@@ -757,7 +754,7 @@ void ClipboardWin::writeRange(Range* selectedRange, Frame* frame)
ExceptionCode ec = 0;
Vector<char> data;
- markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
+ markupToCFHTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
selectedRange->startContainer(ec)->document()->url().string(), data);
medium.hGlobal = createGlobalData(data);
if (medium.hGlobal && FAILED(m_writableDataObject->SetData(htmlFormat(), &medium, TRUE)))
diff --git a/WebCore/platform/win/ClipboardWin.h b/WebCore/platform/win/ClipboardWin.h
index 49fdcfe..1b139ed 100644
--- a/WebCore/platform/win/ClipboardWin.h
+++ b/WebCore/platform/win/ClipboardWin.h
@@ -26,66 +26,66 @@
#ifndef ClipboardWin_h
#define ClipboardWin_h
+#include "COMPtr.h"
#include "CachedResourceClient.h"
#include "Clipboard.h"
-#include "COMPtr.h"
struct IDataObject;
namespace WebCore {
- class CachedImage;
- class IntPoint;
- class WCDataObject;
-
- // State available during IE's events for drag and drop and copy/paste
- class ClipboardWin : public Clipboard, public CachedResourceClient {
- public:
- static PassRefPtr<ClipboardWin> create(bool isForDragging, IDataObject* dataObject, ClipboardAccessPolicy policy)
- {
- return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
- }
- static PassRefPtr<ClipboardWin> create(bool isForDragging, WCDataObject* dataObject, ClipboardAccessPolicy policy)
- {
- return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
- }
- ~ClipboardWin();
-
- void clearData(const String& type);
- void clearAllData();
- String getData(const String& type, bool& success) const;
- bool setData(const String& type, const String& data);
-
- // extensions beyond IE's API
- virtual HashSet<String> types() const;
- virtual PassRefPtr<FileList> files() const;
-
- void setDragImage(CachedImage*, const IntPoint&);
- void setDragImageElement(Node*, const IntPoint&);
-
- virtual DragImageRef createDragImage(IntPoint& dragLoc) const;
- virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*);
- virtual void writeURL(const KURL&, const String&, Frame*);
- virtual void writeRange(Range*, Frame*);
- virtual void writePlainText(const String&);
-
- virtual bool hasData();
-
- COMPtr<IDataObject> dataObject() { return m_dataObject; }
-
- void setExternalDataObject(IDataObject *dataObject);
-
- private:
- ClipboardWin(bool isForDragging, IDataObject*, ClipboardAccessPolicy);
- ClipboardWin(bool isForDragging, WCDataObject*, ClipboardAccessPolicy);
-
- void resetFromClipboard();
- void setDragImage(CachedImage*, Node*, const IntPoint&);
-
- COMPtr<IDataObject> m_dataObject;
- COMPtr<WCDataObject> m_writableDataObject;
- Frame* m_frame;
- };
+class CachedImage;
+class IntPoint;
+class WCDataObject;
+
+// State available during IE's events for drag and drop and copy/paste
+class ClipboardWin : public Clipboard, public CachedResourceClient {
+public:
+ static PassRefPtr<ClipboardWin> create(bool isForDragging, IDataObject* dataObject, ClipboardAccessPolicy policy)
+ {
+ return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
+ }
+ static PassRefPtr<ClipboardWin> create(bool isForDragging, WCDataObject* dataObject, ClipboardAccessPolicy policy)
+ {
+ return adoptRef(new ClipboardWin(isForDragging, dataObject, policy));
+ }
+ ~ClipboardWin();
+
+ void clearData(const String& type);
+ void clearAllData();
+ String getData(const String& type, bool& success) const;
+ bool setData(const String& type, const String& data);
+
+ // extensions beyond IE's API
+ virtual HashSet<String> types() const;
+ virtual PassRefPtr<FileList> files() const;
+
+ void setDragImage(CachedImage*, const IntPoint&);
+ void setDragImageElement(Node*, const IntPoint&);
+
+ virtual DragImageRef createDragImage(IntPoint& dragLoc) const;
+ virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*);
+ virtual void writeURL(const KURL&, const String&, Frame*);
+ virtual void writeRange(Range*, Frame*);
+ virtual void writePlainText(const String&);
+
+ virtual bool hasData();
+
+ COMPtr<IDataObject> dataObject() { return m_dataObject; }
+
+ void setExternalDataObject(IDataObject *dataObject);
+
+private:
+ ClipboardWin(bool isForDragging, IDataObject*, ClipboardAccessPolicy);
+ ClipboardWin(bool isForDragging, WCDataObject*, ClipboardAccessPolicy);
+
+ void resetFromClipboard();
+ void setDragImage(CachedImage*, Node*, const IntPoint&);
+
+ COMPtr<IDataObject> m_dataObject;
+ COMPtr<WCDataObject> m_writableDataObject;
+ Frame* m_frame;
+};
} // namespace WebCore
diff --git a/WebCore/platform/win/CursorWin.cpp b/WebCore/platform/win/CursorWin.cpp
index 22a535d..2dd1452 100644
--- a/WebCore/platform/win/CursorWin.cpp
+++ b/WebCore/platform/win/CursorWin.cpp
@@ -39,11 +39,6 @@
namespace WebCore {
-Cursor::Cursor(const Cursor& other)
- : m_impl(other.m_impl)
-{
-}
-
static inline bool supportsAlphaCursors()
{
OSVERSIONINFO osinfo = {0};
@@ -52,8 +47,10 @@ static inline bool supportsAlphaCursors()
return osinfo.dwMajorVersion > 5 || (osinfo.dwMajorVersion == 5 && osinfo.dwMinorVersion > 0);
}
-Cursor::Cursor(Image* img, const IntPoint& hotSpot)
+static PassRefPtr<SharedCursor> createSharedCursor(Image* img, const IntPoint& hotSpot)
{
+ RefPtr<SharedCursor> impl;
+
IntPoint effectiveHotSpot = determineHotSpot(img, hotSpot);
static bool doAlpha = supportsAlphaCursors();
BitmapInfo cursorImage = BitmapInfo::create(IntSize(img->width(), img->height()));
@@ -80,7 +77,7 @@ Cursor::Cursor(Image* img, const IntPoint& hotSpot)
ii.hbmMask = hMask.get();
ii.hbmColor = hCursor.get();
- m_impl = SharedCursor::create(CreateIconIndirect(&ii));
+ impl = SharedCursor::create(CreateIconIndirect(&ii));
} else {
// Platform doesn't support alpha blended cursors, so we need
// to create the mask manually
@@ -115,303 +112,183 @@ Cursor::Cursor(Image* img, const IntPoint& hotSpot)
icon.yHotspot = effectiveHotSpot.y();
icon.hbmMask = andMask.get();
icon.hbmColor = xorMask.get();
- m_impl = SharedCursor::create(CreateIconIndirect(&icon));
+ impl = SharedCursor::create(CreateIconIndirect(&icon));
DeleteDC(xorMaskDC);
DeleteDC(andMaskDC);
}
DeleteDC(workingDC);
ReleaseDC(0, dc);
-}
-Cursor::~Cursor()
-{
+ return impl.release();
}
-Cursor& Cursor::operator=(const Cursor& other)
-{
- m_impl = other.m_impl;
- return *this;
-}
-
-Cursor::Cursor(PlatformCursor c)
- : m_impl(c)
+static PassRefPtr<SharedCursor> loadSharedCursor(HINSTANCE hInstance, LPCTSTR lpCursorName)
{
+ return SharedCursor::create(::LoadCursor(hInstance, lpCursorName));
}
-static Cursor loadCursorByName(char* name, int x, int y)
+static PassRefPtr<SharedCursor> loadCursorByName(char* name, int x, int y)
{
IntPoint hotSpot(x, y);
- Cursor c;
RefPtr<Image> cursorImage(Image::loadPlatformResource(name));
- if (cursorImage && !cursorImage->isNull())
- c = Cursor(cursorImage.get(), hotSpot);
- else
- c = pointerCursor();
- return c;
-}
-
-static PassRefPtr<SharedCursor> loadSharedCursor(HINSTANCE hInstance, LPCTSTR lpCursorName)
-{
- return SharedCursor::create(LoadCursor(hInstance, lpCursorName));
-}
-
-const Cursor& pointerCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_ARROW);
- return c;
-}
-
-const Cursor& crossCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_CROSS);
- return c;
-}
-
-const Cursor& handCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_HAND);
- return c;
-}
-
-const Cursor& iBeamCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_IBEAM);
- return c;
-}
-
-const Cursor& waitCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_WAIT);
- return c;
-}
-
-const Cursor& helpCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_HELP);
- return c;
-}
-
-const Cursor& eastResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZEWE);
- return c;
-}
-
-const Cursor& northResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENS);
- return c;
-}
-
-const Cursor& northEastResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENESW);
- return c;
-}
-
-const Cursor& northWestResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENWSE);
- return c;
-}
-
-const Cursor& southResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENS);
- return c;
-}
-
-const Cursor& southEastResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENWSE);
- return c;
-}
-
-const Cursor& southWestResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENESW);
- return c;
-}
-
-const Cursor& westResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZEWE);
- return c;
-}
-
-const Cursor& northSouthResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENS);
- return c;
-}
-
-const Cursor& eastWestResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZEWE);
- return c;
-}
-
-const Cursor& northEastSouthWestResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENESW);
- return c;
-}
-
-const Cursor& northWestSouthEastResizeCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZENWSE);
- return c;
-}
-
-const Cursor& columnResizeCursor()
-{
- // FIXME: Windows does not have a standard column resize cursor <rdar://problem/5018591>
- static Cursor c = loadSharedCursor(0, IDC_SIZEWE);
- return c;
-}
-
-const Cursor& rowResizeCursor()
-{
- // FIXME: Windows does not have a standard row resize cursor <rdar://problem/5018591>
- static Cursor c = loadSharedCursor(0, IDC_SIZENS);
- return c;
-}
-
-const Cursor& middlePanningCursor()
-{
- static const Cursor c = loadCursorByName("panIcon", 8, 8);
- return c;
-}
-
-const Cursor& eastPanningCursor()
-{
- static const Cursor c = loadCursorByName("panEastCursor", 7, 7);
- return c;
-}
-
-const Cursor& northPanningCursor()
-{
- static const Cursor c = loadCursorByName("panNorthCursor", 7, 7);
- return c;
-}
-
-const Cursor& northEastPanningCursor()
-{
- static const Cursor c = loadCursorByName("panNorthEastCursor", 7, 7);
- return c;
-}
-
-const Cursor& northWestPanningCursor()
-{
- static const Cursor c = loadCursorByName("panNorthWestCursor", 7, 7);
- return c;
-}
-
-const Cursor& southPanningCursor()
-{
- static const Cursor c = loadCursorByName("panSouthCursor", 7, 7);
- return c;
-}
-
-const Cursor& southEastPanningCursor()
-{
- static const Cursor c = loadCursorByName("panSouthEastCursor", 7, 7);
- return c;
-}
-
-const Cursor& southWestPanningCursor()
-{
- static const Cursor c = loadCursorByName("panSouthWestCursor", 7, 7);
- return c;
-}
-
-const Cursor& westPanningCursor()
-{
- static const Cursor c = loadCursorByName("panWestCursor", 7, 7);
- return c;
-}
-
-const Cursor& moveCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_SIZEALL);
- return c;
-}
-
-const Cursor& verticalTextCursor()
-{
- static const Cursor c = loadCursorByName("verticalTextCursor", 7, 7);
- return c;
-}
-
-const Cursor& cellCursor()
-{
- return pointerCursor();
-}
-
-const Cursor& contextMenuCursor()
-{
- return pointerCursor();
-}
-
-const Cursor& aliasCursor()
-{
- return pointerCursor();
-}
-
-const Cursor& progressCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_APPSTARTING);
- return c;
-}
-
-const Cursor& noDropCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_NO);
- return c;
-}
-
-const Cursor& copyCursor()
-{
- return pointerCursor();
-}
-
-const Cursor& noneCursor()
-{
- return pointerCursor();
-}
-
-const Cursor& notAllowedCursor()
-{
- static Cursor c = loadSharedCursor(0, IDC_NO);
- return c;
-}
-
-const Cursor& zoomInCursor()
-{
- static const Cursor c = loadCursorByName("zoomInCursor", 7, 7);
- return c;
+ if (cursorImage && !cursorImage->isNull())
+ return createSharedCursor(cursorImage.get(), hotSpot);
+ return loadSharedCursor(0, IDC_ARROW);
+}
+
+void Cursor::ensurePlatformCursor() const
+{
+ if (m_platformCursor)
+ return;
+
+ switch (m_type) {
+ case Cursor::Pointer:
+ case Cursor::Cell:
+ case Cursor::ContextMenu:
+ case Cursor::Alias:
+ case Cursor::Copy:
+ case Cursor::None:
+ case Cursor::Grab:
+ case Cursor::Grabbing:
+ m_platformCursor = loadSharedCursor(0, IDC_ARROW);
+ break;
+ case Cursor::Cross:
+ m_platformCursor = loadSharedCursor(0, IDC_CROSS);
+ break;
+ case Cursor::Hand:
+ m_platformCursor = loadSharedCursor(0, IDC_HAND);
+ break;
+ case Cursor::IBeam:
+ m_platformCursor = loadSharedCursor(0, IDC_IBEAM);
+ break;
+ case Cursor::Wait:
+ m_platformCursor = loadSharedCursor(0, IDC_WAIT);
+ break;
+ case Cursor::Help:
+ m_platformCursor = loadSharedCursor(0, IDC_HELP);
+ break;
+ case Cursor::Move:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZEALL);
+ break;
+ case Cursor::MiddlePanning:
+ m_platformCursor = loadCursorByName("panIcon", 8, 8);
+ break;
+ case Cursor::EastResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
+ break;
+ case Cursor::EastPanning:
+ m_platformCursor = loadCursorByName("panEastCursor", 7, 7);
+ break;
+ case Cursor::NorthResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
+ break;
+ case Cursor::NorthPanning:
+ m_platformCursor = loadCursorByName("panNorthCursor", 7, 7);
+ break;
+ case Cursor::NorthEastResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENESW);
+ break;
+ case Cursor::NorthEastPanning:
+ m_platformCursor = loadCursorByName("panNorthEastCursor", 7, 7);
+ break;
+ case Cursor::NorthWestResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENWSE);
+ break;
+ case Cursor::NorthWestPanning:
+ m_platformCursor = loadCursorByName("panNorthWestCursor", 7, 7);
+ break;
+ case Cursor::SouthResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
+ break;
+ case Cursor::SouthPanning:
+ m_platformCursor = loadCursorByName("panSouthCursor", 7, 7);
+ break;
+ case Cursor::SouthEastResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENWSE);
+ break;
+ case Cursor::SouthEastPanning:
+ m_platformCursor = loadCursorByName("panSouthEastCursor", 7, 7);
+ break;
+ case Cursor::SouthWestResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENESW);
+ break;
+ case Cursor::SouthWestPanning:
+ m_platformCursor = loadCursorByName("panSouthWestCursor", 7, 7);
+ break;
+ case Cursor::WestResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
+ break;
+ case Cursor::NorthSouthResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
+ break;
+ case Cursor::EastWestResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
+ break;
+ case Cursor::WestPanning:
+ m_platformCursor = loadCursorByName("panWestCursor", 7, 7);
+ break;
+ case Cursor::NorthEastSouthWestResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENESW);
+ break;
+ case Cursor::NorthWestSouthEastResize:
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENWSE);
+ break;
+ case Cursor::ColumnResize:
+ // FIXME: Windows does not have a standard column resize cursor <rdar://problem/5018591>
+ m_platformCursor = loadSharedCursor(0, IDC_SIZEWE);
+ break;
+ case Cursor::RowResize:
+ // FIXME: Windows does not have a standard row resize cursor <rdar://problem/5018591>
+ m_platformCursor = loadSharedCursor(0, IDC_SIZENS);
+ break;
+ case Cursor::VerticalText:
+ m_platformCursor = loadCursorByName("verticalTextCursor", 7, 7);
+ break;
+ case Cursor::Progress:
+ m_platformCursor = loadSharedCursor(0, IDC_APPSTARTING);
+ break;
+ case Cursor::NoDrop:
+ break;
+ case Cursor::NotAllowed:
+ m_platformCursor = loadSharedCursor(0, IDC_NO);
+ break;
+ case Cursor::ZoomIn:
+ m_platformCursor = loadCursorByName("zoomInCursor", 7, 7);
+ break;
+ case Cursor::ZoomOut:
+ m_platformCursor = loadCursorByName("zoomOutCursor", 7, 7);
+ break;
+ case Cursor::Custom:
+ m_platformCursor = createSharedCursor(m_image.get(), m_hotSpot);
+ break;
+ }
}
-const Cursor& zoomOutCursor()
+SharedCursor::~SharedCursor()
{
- static const Cursor c = loadCursorByName("zoomOutCursor", 7, 7);
- return c;
+ DestroyIcon(m_nativeCursor);
}
-const Cursor& grabCursor()
+Cursor::Cursor(const Cursor& other)
+ : m_type(other.m_type)
+ , m_image(other.m_image)
+ , m_hotSpot(other.m_hotSpot)
+ , m_platformCursor(other.m_platformCursor)
{
- return pointerCursor();
}
-const Cursor& grabbingCursor()
+Cursor& Cursor::operator=(const Cursor& other)
{
- return pointerCursor();
+ m_type = other.m_type;
+ m_image = other.m_image;
+ m_hotSpot = other.m_hotSpot;
+ m_platformCursor = other.m_platformCursor;
+ return *this;
}
-SharedCursor::~SharedCursor()
+Cursor::~Cursor()
{
- DestroyIcon(m_nativeCursor);
}
-}
+} // namespace WebCore
diff --git a/WebCore/platform/win/PasteboardWin.cpp b/WebCore/platform/win/PasteboardWin.cpp
index 512f6cf..808c863 100644
--- a/WebCore/platform/win/PasteboardWin.cpp
+++ b/WebCore/platform/win/PasteboardWin.cpp
@@ -54,7 +54,7 @@ static LRESULT CALLBACK PasteboardOwnerWndProc(HWND hWnd, UINT message, WPARAM w
LRESULT lresult = 0;
LONG_PTR longPtr = GetWindowLongPtr(hWnd, 0);
- switch(message) {
+ switch (message) {
case WM_RENDERFORMAT:
// This message comes when SetClipboardData was sent a null data handle
// and now it's come time to put the data on the clipboard.
@@ -117,7 +117,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
if (::OpenClipboard(m_owner)) {
ExceptionCode ec = 0;
Vector<char> data;
- markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
+ markupToCFHTML(createMarkup(selectedRange, 0, AnnotateForInterchange),
selectedRange->startContainer(ec)->document()->url().string(), data);
HGLOBAL cbData = createGlobalData(data);
if (!::SetClipboardData(HTMLClipboardFormat, cbData))
@@ -139,7 +139,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
// enable smart-replacing later on by putting dummy data on the pasteboard
if (canSmartCopyOrDelete) {
if (::OpenClipboard(m_owner)) {
- ::SetClipboardData(WebSmartPasteFormat, NULL);
+ ::SetClipboardData(WebSmartPasteFormat, 0);
::CloseClipboard();
}
@@ -185,7 +185,7 @@ void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame)
// write to clipboard in format CF_HTML to be able to paste into contenteditable areas as a link
if (::OpenClipboard(m_owner)) {
Vector<char> data;
- markupToCF_HTML(urlToMarkup(url, title), "", data);
+ markupToCFHTML(urlToMarkup(url, title), "", data);
HGLOBAL cbData = createGlobalData(data);
if (!::SetClipboardData(HTMLClipboardFormat, cbData))
::GlobalFree(cbData);
@@ -260,8 +260,8 @@ String Pasteboard::plainText(Frame* frame)
::GlobalUnlock(cbData);
::CloseClipboard();
return fromClipboard;
- } else
- ::CloseClipboard();
+ }
+ ::CloseClipboard();
}
if (::IsClipboardFormatAvailable(CF_TEXT) && ::OpenClipboard(m_owner)) {
@@ -272,8 +272,8 @@ String Pasteboard::plainText(Frame* frame)
::GlobalUnlock(cbData);
::CloseClipboard();
return fromClipboard;
- } else
- ::CloseClipboard();
+ }
+ ::CloseClipboard();
}
return String();
@@ -288,11 +288,11 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
HANDLE cbData = ::GetClipboardData(HTMLClipboardFormat);
if (cbData) {
SIZE_T dataSize = ::GlobalSize(cbData);
- String cf_html(UTF8Encoding().decode((char*)::GlobalLock(cbData), dataSize));
+ String cfhtml(UTF8Encoding().decode((char*)::GlobalLock(cbData), dataSize));
::GlobalUnlock(cbData);
::CloseClipboard();
- PassRefPtr<DocumentFragment> fragment = fragmentFromCF_HTML(frame->document(), cf_html);
+ PassRefPtr<DocumentFragment> fragment = fragmentFromCFHTML(frame->document(), cfhtml);
if (fragment)
return fragment;
} else
@@ -306,7 +306,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
if (cbData) {
UChar* buffer = (UChar*)GlobalLock(cbData);
String str(buffer);
- ::GlobalUnlock( cbData );
+ ::GlobalUnlock(cbData);
::CloseClipboard();
RefPtr<DocumentFragment> fragment = createFragmentFromText(context.get(), str);
if (fragment)
@@ -323,7 +323,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
if (cbData) {
char* buffer = (char*)GlobalLock(cbData);
String str(buffer);
- ::GlobalUnlock( cbData );
+ ::GlobalUnlock(cbData);
::CloseClipboard();
RefPtr<DocumentFragment> fragment = createFragmentFromText(context.get(), str);
if (fragment)
diff --git a/WebCore/platform/win/WidgetWin.cpp b/WebCore/platform/win/WidgetWin.cpp
index 607c0d8..416260b 100644
--- a/WebCore/platform/win/WidgetWin.cpp
+++ b/WebCore/platform/win/WidgetWin.cpp
@@ -59,7 +59,6 @@ void Widget::hide()
{
}
-HCURSOR lastSetCursor = 0;
bool ignoreNextSetCursor = false;
void Widget::setCursor(const Cursor& cursor)
@@ -71,30 +70,10 @@ void Widget::setCursor(const Cursor& cursor)
return;
}
- if (!cursor.impl()->nativeCursor())
- return;
-
- lastSetCursor = cursor.impl()->nativeCursor();
-
ScrollView* view = root();
- if (!view || !view->isFrameView()) {
- SetCursor(lastSetCursor);
- return;
- }
-
- Frame* frame = static_cast<FrameView*>(view)->frame();
- if (!frame) {
- SetCursor(lastSetCursor);
+ if (!view)
return;
- }
-
- Page* page = frame->page();
- if (!page) {
- SetCursor(lastSetCursor);
- return;
- }
-
- page->chrome()->setCursor(lastSetCursor);
+ view->hostWindow()->setCursor(cursor);
}
void Widget::paint(GraphicsContext*, const IntRect&)
diff --git a/WebCore/platform/wince/CursorWince.cpp b/WebCore/platform/wince/CursorWince.cpp
index e35f1f9..d7dcfb4 100644
--- a/WebCore/platform/wince/CursorWince.cpp
+++ b/WebCore/platform/wince/CursorWince.cpp
@@ -38,12 +38,12 @@ static const Cursor& getCursor(CursorType type)
}
Cursor::Cursor(const Cursor& other)
-: m_impl(other.m_impl)
+: m_platformCursor(other.m_platformCursor)
{
}
Cursor::Cursor(Image* img, const IntPoint& hotspot)
-: m_impl(CursorNone)
+: m_platformCursor(CursorNone)
{
}
@@ -53,12 +53,12 @@ Cursor::~Cursor()
Cursor& Cursor::operator=(const Cursor& other)
{
- m_impl = other.m_impl;
+ m_platformCursor = other.m_platformCursor;
return *this;
}
Cursor::Cursor(PlatformCursor c)
-: m_impl(c)
+: m_platformCursor(c)
{
}
diff --git a/WebCore/platform/wx/CursorWx.cpp b/WebCore/platform/wx/CursorWx.cpp
index ed7f86b..dd61f1e 100644
--- a/WebCore/platform/wx/CursorWx.cpp
+++ b/WebCore/platform/wx/CursorWx.cpp
@@ -34,15 +34,15 @@
namespace WebCore {
Cursor::Cursor(const Cursor& other)
- : m_impl(other.m_impl)
+ : m_platformCursor(other.m_platformCursor)
{
}
Cursor::Cursor(Image* image, const IntPoint&)
{
- m_impl = 0;
+ m_platformCursor = 0;
// FIXME: figure out why the below code causes a crash
- //m_impl = new wxCursor( image->getWxBitmap()->ConvertToImage() );
+ //m_platformCursor = new wxCursor( image->getWxBitmap()->ConvertToImage() );
}
Cursor::~Cursor()
@@ -51,12 +51,12 @@ Cursor::~Cursor()
Cursor& Cursor::operator=(const Cursor& other)
{
- m_impl = other.m_impl;
+ m_platformCursor = other.m_platformCursor;
return *this;
}
Cursor::Cursor(wxCursor* c)
- : m_impl(c)
+ : m_platformCursor(c)
{
}
diff --git a/WebCore/plugins/PluginStream.cpp b/WebCore/plugins/PluginStream.cpp
index bdf7a40..8d7a561 100644
--- a/WebCore/plugins/PluginStream.cpp
+++ b/WebCore/plugins/PluginStream.cpp
@@ -366,6 +366,8 @@ void PluginStream::deliverData()
deliveryBytes = m_pluginFuncs->write(m_instance, &m_stream, m_offset, dataLength, (void*)data);
if (deliveryBytes < 0) {
LOG_PLUGIN_NET_ERROR();
+ if (m_loader)
+ m_loader->setDefersLoading(false);
cancelAndDestroyStream(NPRES_NETWORK_ERR);
return;
}
diff --git a/WebCore/plugins/PluginWidget.h b/WebCore/plugins/PluginViewBase.h
index 7a76fc1..9d3f463 100644
--- a/WebCore/plugins/PluginWidget.h
+++ b/WebCore/plugins/PluginViewBase.h
@@ -30,26 +30,21 @@
namespace WebCore {
-class PluginWidget : public Widget {
-
+// PluginViewBase is a widget that all plug-in views inherit from, both in Webkit and WebKit2.
+// It's intended as a stopgap measure until we can merge all plug-in views into a single plug-in view.
+class PluginViewBase : public Widget {
public:
- PluginWidget(PlatformWidget widget = 0) : Widget(widget) { }
#if USE(ACCELERATED_COMPOSITING)
- PlatformLayer* platformLayer() const;
+ virtual PlatformLayer* platformLayer() const { return 0; }
#endif
+
+protected:
+ PluginViewBase(PlatformWidget widget) : Widget(widget) { }
private:
- virtual void invalidateRect(const IntRect&);
- virtual bool isPluginWidget() const { return true; }
+ virtual bool isPluginViewBase() const { return true; }
};
-#if USE(ACCELERATED_COMPOSITING) && !PLATFORM(MAC)
-inline PlatformLayer* PluginWidget::platformLayer() const
-{
- return 0;
-}
-#endif
-
} // namespace WebCore
#endif // PluginWidget_h
diff --git a/WebCore/plugins/mac/PluginWidgetMac.mm b/WebCore/plugins/mac/PluginWidgetMac.mm
deleted file mode 100644
index f407928..0000000
--- a/WebCore/plugins/mac/PluginWidgetMac.mm
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010 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 "PluginWidget.h"
-
-#if USE(ACCELERATED_COMPOSITING)
-@interface NSView (WebKitSecretsWebCoreKnowsAbout)
-- (CALayer *)pluginLayer;
-@end
-#endif
-namespace WebCore {
-
-void PluginWidget::invalidateRect(const IntRect& rect)
-{
- [platformWidget() setNeedsDisplayInRect:rect];
-}
-
-#if USE(ACCELERATED_COMPOSITING)
-PlatformLayer* PluginWidget::platformLayer() const
-{
- if (![platformWidget() respondsToSelector:@selector(pluginLayer)])
- return 0;
-
- return [platformWidget() pluginLayer];
-}
-#endif
-} // namespace WebCore
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
index 1765939..8dbb04b 100644
--- a/WebCore/plugins/win/PluginViewWin.cpp
+++ b/WebCore/plugins/win/PluginViewWin.cpp
@@ -30,6 +30,8 @@
#include "BitmapImage.h"
#include "Bridge.h"
+#include "Chrome.h"
+#include "ChromeClient.h"
#include "Document.h"
#include "DocumentLoader.h"
#include "Element.h"
@@ -656,7 +658,6 @@ void PluginView::handleKeyboardEvent(KeyboardEvent* event)
}
#if !OS(WINCE)
-extern HCURSOR lastSetCursor;
extern bool ignoreNextSetCursor;
#endif
@@ -727,7 +728,8 @@ void PluginView::handleMouseEvent(MouseEvent* event)
// Currently, Widget::setCursor is always called after this function in EventHandler.cpp
// and since we don't want that we set ignoreNextSetCursor to true here to prevent that.
ignoreNextSetCursor = true;
- lastSetCursor = ::GetCursor();
+ if (Page* page = m_parentFrame->page())
+ page->chrome()->client()->setLastSetCursorToCurrentCursor();
#endif
}
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index c97d965..1b855d4 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -3,6 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2007 David Smith (catfish.man@gmail.com)
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -940,6 +941,10 @@ static bool canMergeContiguousAnonymousBlocks(RenderObject* oldChild, RenderObje
|| (next && (!next->isAnonymousBlock() || toRenderBlock(next)->continuation())))
return false;
+ // FIXME: This check isn't required when inline run-ins can't be split into continuations.
+ if (prev && prev->firstChild() && prev->firstChild()->isInline() && prev->firstChild()->isRunIn())
+ return false;
+
#if ENABLE(RUBY)
if ((prev && (prev->isRubyRun() || prev->isRubyBase()))
|| (next && (next->isRubyRun() || next->isRubyBase())))
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index d4c691f..8d18440 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -3,7 +3,7 @@
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
* (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -155,7 +155,9 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyl
if (isFloating() && !isPositioned() && (newStyle->position() == AbsolutePosition || newStyle->position() == FixedPosition))
removeFloatingOrPositionedChildFromBlockLists();
}
- }
+ } else if (newStyle && isBody())
+ view()->repaint();
+
if (FrameView *frameView = view()->frameView()) {
bool newStyleIsFixed = newStyle && newStyle->position() == FixedPosition;
bool oldStyleIsFixed = style() && style()->position() == FixedPosition;
diff --git a/WebCore/rendering/RenderEmbeddedObject.cpp b/WebCore/rendering/RenderEmbeddedObject.cpp
index de9ca17..e72825e 100644
--- a/WebCore/rendering/RenderEmbeddedObject.cpp
+++ b/WebCore/rendering/RenderEmbeddedObject.cpp
@@ -42,7 +42,7 @@
#include "MouseEvent.h"
#include "Page.h"
#include "Path.h"
-#include "PluginWidget.h"
+#include "PluginViewBase.h"
#include "RenderTheme.h"
#include "RenderView.h"
#include "RenderWidgetProtector.h"
@@ -53,10 +53,6 @@
#include "HTMLVideoElement.h"
#endif
-#if USE(ACCELERATED_COMPOSITING)
-#include "PluginWidget.h"
-#endif
-
namespace WebCore {
using namespace HTMLNames;
@@ -102,7 +98,7 @@ bool RenderEmbeddedObject::requiresLayer() const
bool RenderEmbeddedObject::allowsAcceleratedCompositing() const
{
- return widget() && widget()->isPluginWidget() && static_cast<PluginWidget*>(widget())->platformLayer();
+ return widget() && widget()->isPluginViewBase() && static_cast<PluginViewBase*>(widget())->platformLayer();
}
#endif
diff --git a/WebCore/rendering/RenderFileUploadControl.cpp b/WebCore/rendering/RenderFileUploadControl.cpp
index c652276..f31ca20 100644
--- a/WebCore/rendering/RenderFileUploadControl.cpp
+++ b/WebCore/rendering/RenderFileUploadControl.cpp
@@ -94,10 +94,23 @@ void RenderFileUploadControl::valueChanged()
bool RenderFileUploadControl::allowsMultipleFiles()
{
+#if ENABLE(DIRECTORY_UPLOAD)
+ if (allowsDirectoryUpload())
+ return true;
+#endif
+
HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
return !input->getAttribute(multipleAttr).isNull();
}
+#if ENABLE(DIRECTORY_UPLOAD)
+bool RenderFileUploadControl::allowsDirectoryUpload()
+{
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(node());
+ return !input->getAttribute(webkitdirectoryAttr).isNull();
+}
+#endif
+
String RenderFileUploadControl::acceptTypes()
{
return static_cast<HTMLInputElement*>(node())->accept();
diff --git a/WebCore/rendering/RenderFileUploadControl.h b/WebCore/rendering/RenderFileUploadControl.h
index 25d2639..205ba47 100644
--- a/WebCore/rendering/RenderFileUploadControl.h
+++ b/WebCore/rendering/RenderFileUploadControl.h
@@ -62,6 +62,9 @@ private:
void valueChanged();
void repaint() { RenderBlock::repaint(); }
bool allowsMultipleFiles();
+#if ENABLE(DIRECTORY_UPLOAD)
+ bool allowsDirectoryUpload();
+#endif
String acceptTypes();
void chooseIconForFiles(FileChooser*, const Vector<String>&);
diff --git a/WebCore/rendering/RenderForeignObject.cpp b/WebCore/rendering/RenderForeignObject.cpp
index 4b94bab..8b84f97 100644
--- a/WebCore/rendering/RenderForeignObject.cpp
+++ b/WebCore/rendering/RenderForeignObject.cpp
@@ -26,6 +26,7 @@
#include "RenderForeignObject.h"
#include "GraphicsContext.h"
+#include "RenderSVGResource.h"
#include "RenderView.h"
#include "SVGForeignObjectElement.h"
#include "SVGRenderSupport.h"
@@ -98,7 +99,7 @@ void RenderForeignObject::layout()
ASSERT(needsLayout());
ASSERT(!view()->layoutStateEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree.
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node());
if (m_needsTransformUpdate) {
@@ -118,6 +119,10 @@ void RenderForeignObject::layout()
setLocation(roundedIntPoint(viewportLocation));
RenderBlock::layout();
+ // Invalidate all resources of this client, if we changed something.
+ if (m_everHadLayout && selfNeedsLayout())
+ RenderSVGResource::invalidateAllResourcesOfRenderer(this);
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 756073e..f0c6333 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -3933,7 +3933,7 @@ void showLayerTree(const WebCore::RenderLayer* layer)
return;
if (WebCore::Frame* frame = layer->renderer()->frame()) {
- WebCore::String output = externalRepresentation(frame, WebCore::RenderAsTextShowAllLayers | WebCore::RenderAsTextShowLayerNesting | WebCore::RenderAsTextShowCompositedLayers | WebCore::RenderAsTextShowAddresses);
+ WebCore::String output = externalRepresentation(frame, WebCore::RenderAsTextShowAllLayers | WebCore::RenderAsTextShowLayerNesting | WebCore::RenderAsTextShowCompositedLayers | WebCore::RenderAsTextShowAddresses | WebCore::RenderAsTextShowIDAndClass);
fprintf(stderr, "%s\n", output.utf8().data());
}
}
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index 1153727..2bc6a88 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -43,7 +43,7 @@
#include "HTMLNames.h"
#include "InspectorTimelineAgent.h"
#include "KeyframeList.h"
-#include "PluginWidget.h"
+#include "PluginViewBase.h"
#include "RenderBox.h"
#include "RenderIFrame.h"
#include "RenderImage.h"
@@ -68,6 +68,7 @@ using namespace HTMLNames;
static bool hasBorderOutlineOrShadow(const RenderStyle*);
static bool hasBoxDecorationsOrBackground(const RenderObject*);
static bool hasBoxDecorationsOrBackgroundImage(const RenderStyle*);
+static IntRect clipBox(RenderBox* renderer);
static inline bool is3DCanvas(RenderObject* renderer)
{
@@ -143,10 +144,60 @@ static bool hasNonZeroTransformOrigin(const RenderObject* renderer)
|| (style->transformOriginY().type() == Fixed && style->transformOriginY().value());
}
+static RenderLayer* enclosingOverflowClipAncestor(RenderLayer* layer, bool& crossesTransform)
+{
+ crossesTransform = false;
+
+ for (RenderLayer* curr = layer->parent(); curr; curr = curr->parent()) {
+ if (curr->renderer()->hasOverflowClip())
+ return curr;
+
+ if (curr->hasTransform())
+ crossesTransform = true;
+ }
+
+ return 0;
+}
+
void RenderLayerBacking::updateCompositedBounds()
{
IntRect layerBounds = compositor()->calculateCompositedBounds(m_owningLayer, m_owningLayer);
+ // Clip to the size of the document or enclosing overflow-scroll layer.
+ if (compositor()->compositingConsultsOverlap() && !m_owningLayer->hasTransform()) {
+ bool crossesTransform;
+ RenderLayer* overflowAncestor = enclosingOverflowClipAncestor(m_owningLayer, crossesTransform);
+ // If an ancestor is transformed, we can't currently compute the correct rect to intersect with.
+ // We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist.
+ if (!crossesTransform) {
+ IntRect clippingBounds;
+ RenderLayer* boundsRelativeLayer;
+
+ if (overflowAncestor) {
+ RenderBox* overflowBox = toRenderBox(overflowAncestor->renderer());
+ // If scrollbars are visible, then constrain the layer to the scrollable area, so we can avoid redraws
+ // on scrolling. Otherwise just clip to the visible area (it can still be scrolled via JS, but we'll come
+ // back through this code when the scroll offset changes).
+ if (overflowBox->scrollsOverflow())
+ clippingBounds = IntRect(-overflowAncestor->scrollXOffset(), -overflowAncestor->scrollYOffset(), overflowBox->scrollWidth(), overflowBox->scrollHeight());
+ else
+ clippingBounds = clipBox(overflowBox);
+
+ boundsRelativeLayer = overflowAncestor;
+ } else {
+ RenderView* view = m_owningLayer->renderer()->view();
+ clippingBounds = view->layoutOverflowRect();
+ boundsRelativeLayer = view->layer();
+ }
+
+ int deltaX = 0;
+ int deltaY = 0;
+ m_owningLayer->convertToLayerCoords(boundsRelativeLayer, deltaX, deltaY);
+ clippingBounds.move(-deltaX, -deltaY);
+ layerBounds.intersect(clippingBounds);
+ }
+ }
+
// If the element has a transform-origin that has fixed lengths, and the renderer has zero size,
// then we need to ensure that the compositing layer has non-zero size so that we can apply
// the transform-origin via the GraphicsLayer anchorPoint (which is expressed as a fractional value).
@@ -215,8 +266,8 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
updateImageContents();
if (renderer()->isEmbeddedObject() && toRenderEmbeddedObject(renderer())->allowsAcceleratedCompositing()) {
- PluginWidget* pluginWidget = static_cast<PluginWidget*>(toRenderEmbeddedObject(renderer())->widget());
- m_graphicsLayer->setContentsToMedia(pluginWidget->platformLayer());
+ PluginViewBase* pluginViewBase = static_cast<PluginViewBase*>(toRenderEmbeddedObject(renderer())->widget());
+ m_graphicsLayer->setContentsToMedia(pluginViewBase->platformLayer());
}
#if ENABLE(VIDEO)
else if (renderer()->isVideo()) {
@@ -259,11 +310,11 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
// Set transform property, if it is not animating. We have to do this here because the transform
// is affected by the layer dimensions.
- if (!renderer()->animation()->isAnimatingPropertyOnRenderer(renderer(), CSSPropertyWebkitTransform))
+ if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitTransform))
updateLayerTransform(renderer()->style());
// Set opacity, if it is not animating.
- if (!renderer()->animation()->isAnimatingPropertyOnRenderer(renderer(), CSSPropertyOpacity))
+ if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity))
updateLayerOpacity(renderer()->style());
RenderStyle* style = renderer()->style();
@@ -312,7 +363,12 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
}
m_graphicsLayer->setPosition(FloatPoint() + (relativeCompositingBounds.location() - graphicsLayerParentLocation));
+
+ IntSize oldOffsetFromRenderer = m_graphicsLayer->offsetFromRenderer();
m_graphicsLayer->setOffsetFromRenderer(localCompositingBounds.location() - IntPoint());
+ // If the compositing layer offset changes, we need to repaint.
+ if (oldOffsetFromRenderer != m_graphicsLayer->offsetFromRenderer())
+ m_graphicsLayer->setNeedsDisplay();
FloatSize oldSize = m_graphicsLayer->size();
FloatSize newSize = relativeCompositingBounds.size();
@@ -961,38 +1017,11 @@ void RenderLayerBacking::paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*
bool shouldPaint = (m_owningLayer->hasVisibleContent() || m_owningLayer->hasVisibleDescendant()) && m_owningLayer->isSelfPaintingLayer();
if (shouldPaint && (paintingPhase & GraphicsLayerPaintBackground)) {
- // If this is the root then we need to send in a bigger bounding box
- // because we'll be painting the background as well (see RenderBox::paintRootBoxDecorations()).
- IntRect paintBox = clipRectToApply;
-
- // FIXME: do we need this code?
- if (renderer()->node() && renderer()->node()->isDocumentNode() && renderer()->document()->isHTMLDocument()) {
- RenderBox* box = toRenderBox(renderer());
- int w = box->width();
- int h = box->height();
-
- int rw;
- int rh;
- if (FrameView* frameView = box->view()->frameView()) {
- rw = frameView->contentsWidth();
- rh = frameView->contentsHeight();
- } else {
- rw = box->view()->width();
- rh = box->view()->height();
- }
-
- int bx = tx - box->marginLeft();
- int by = ty - box->marginTop();
- int bw = max(w + box->marginLeft() + box->marginRight() + box->borderLeft() + box->borderRight(), rw);
- int bh = max(h + box->marginTop() + box->marginBottom() + box->borderTop() + box->borderBottom(), rh);
- paintBox = IntRect(bx, by, bw, bh);
- }
-
// Paint our background first, before painting any child layers.
// Establish the clip used to paint our background.
setClip(context, paintDirtyRect, damageRect);
- PaintInfo info(context, paintBox, PaintPhaseBlockBackground, false, paintingRootForRenderer, 0);
+ PaintInfo info(context, damageRect, PaintPhaseBlockBackground, false, paintingRootForRenderer, 0);
renderer()->paint(info, tx, ty);
// Our scrollbar widgets paint exactly when we tell them to, so that they work properly with
@@ -1307,6 +1336,17 @@ String RenderLayerBacking::nameForLayer() const
}
#endif
+CompositingLayerType RenderLayerBacking::compositingLayerType() const
+{
+ if (m_graphicsLayer->hasContentsLayer())
+ return MediaCompositingLayer;
+
+ if (m_graphicsLayer->drawsContent())
+ return m_graphicsLayer->usingTiledLayer() ? TiledCompositingLayer : NormalCompositingLayer;
+
+ return ContainerCompositingLayer;
+}
+
} // namespace WebCore
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/rendering/RenderLayerBacking.h b/WebCore/rendering/RenderLayerBacking.h
index 16c39da..852fc04 100644
--- a/WebCore/rendering/RenderLayerBacking.h
+++ b/WebCore/rendering/RenderLayerBacking.h
@@ -40,6 +40,13 @@ namespace WebCore {
class KeyframeList;
class RenderLayerCompositor;
+enum CompositingLayerType {
+ NormalCompositingLayer, // non-tiled layer with backing store
+ TiledCompositingLayer, // tiled layer (always has backing store)
+ MediaCompositingLayer, // layer that contains an image, video, webGL or plugin
+ ContainerCompositingLayer // layer with no backing store
+};
+
// RenderLayerBacking controls the compositing behavior for a single RenderLayer.
// It holds the various GraphicsLayers, and makes decisions about intra-layer rendering
// optimizations.
@@ -127,6 +134,9 @@ public:
IntRect contentsBox() const;
+ // For informative purposes only.
+ CompositingLayerType compositingLayerType() const;
+
private:
void createGraphicsLayer();
void destroyGraphicsLayer();
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index fe0d4e8..46278a2 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -643,9 +643,11 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* layer, O
}
}
- // If we just entered compositing mode, the root will have become composited.
- if (layer->isRootLayer() && inCompositingMode())
- willBeComposited = true;
+ // If we just entered compositing mode, the root will have become composited (as long as accelerated compositing is enabled).
+ if (layer->isRootLayer()) {
+ if (inCompositingMode() && m_hasAcceleratedCompositing)
+ willBeComposited = true;
+ }
ASSERT(willBeComposited == needsToBeComposited(layer));
@@ -1337,8 +1339,8 @@ bool RenderLayerCompositor::requiresCompositingForIFrame(RenderObject* renderer)
bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* renderer) const
{
if (AnimationController* animController = renderer->animation()) {
- return (animController->isAnimatingPropertyOnRenderer(renderer, CSSPropertyOpacity) && inCompositingMode())
- || animController->isAnimatingPropertyOnRenderer(renderer, CSSPropertyWebkitTransform);
+ return (animController->isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity) && inCompositingMode())
+ || animController->isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
}
return false;
}
diff --git a/WebCore/rendering/RenderMenuList.cpp b/WebCore/rendering/RenderMenuList.cpp
index 77fe3c2..177921c 100644
--- a/WebCore/rendering/RenderMenuList.cpp
+++ b/WebCore/rendering/RenderMenuList.cpp
@@ -26,7 +26,6 @@
#include "RenderMenuList.h"
#include "AXObjectCache.h"
-#include "AccessibilityObject.h"
#include "CSSStyleSelector.h"
#include "Frame.h"
#include "FrameView.h"
@@ -350,6 +349,11 @@ String RenderMenuList::itemText(unsigned listIndex) const
return String();
}
+String RenderMenuList::itemLabel(unsigned) const
+{
+ return String();
+}
+
String RenderMenuList::itemAccessibilityText(unsigned listIndex) const
{
// Allow the accessible name be changed if necessary.
@@ -358,7 +362,7 @@ String RenderMenuList::itemAccessibilityText(unsigned listIndex) const
if (listIndex >= listItems.size())
return String();
- return AccessibilityObject::getAttribute(listItems[listIndex], aria_labelAttr);
+ return listItems[listIndex]->getAttribute(aria_labelAttr);
}
String RenderMenuList::itemToolTip(unsigned listIndex) const
diff --git a/WebCore/rendering/RenderMenuList.h b/WebCore/rendering/RenderMenuList.h
index 9e51996..d72e1a9 100644
--- a/WebCore/rendering/RenderMenuList.h
+++ b/WebCore/rendering/RenderMenuList.h
@@ -82,6 +82,7 @@ private:
// PopupMenuClient methods
virtual String itemText(unsigned listIndex) const;
+ virtual String itemLabel(unsigned listIndex) const;
virtual String itemToolTip(unsigned listIndex) const;
virtual String itemAccessibilityText(unsigned listIndex) const;
virtual bool itemIsEnabled(unsigned listIndex) const;
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index 4ff35eb..783ed63 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -944,10 +944,10 @@ void RenderObject::drawBoxSideFromPath(GraphicsContext* graphicsContext, IntRect
whiteSpaceWidth += (patWidth / numberOfWhitespaceDashes);
}
- DashArray* lineDash = new DashArray();
- lineDash->append(patWidth);
- lineDash->append(whiteSpaceWidth);
- graphicsContext->setLineDash(*lineDash, patWidth);
+ DashArray lineDash;
+ lineDash.append(patWidth);
+ lineDash.append(whiteSpaceWidth);
+ graphicsContext->setLineDash(lineDash, patWidth);
graphicsContext->addPath(borderPath);
graphicsContext->strokePath();
return;
@@ -1357,7 +1357,8 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
if (v->printing())
return false; // Don't repaint if we're printing.
- ASSERT(!newBoundsPtr || *newBoundsPtr == clippedOverflowRectForRepaint(repaintContainer));
+ // This ASSERT fails due to animations. See https://bugs.webkit.org/show_bug.cgi?id=37048
+ // ASSERT(!newBoundsPtr || *newBoundsPtr == clippedOverflowRectForRepaint(repaintContainer));
IntRect newBounds = newBoundsPtr ? *newBoundsPtr : clippedOverflowRectForRepaint(repaintContainer);
IntRect newOutlineBox;
@@ -1366,7 +1367,8 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
if (!fullRepaint && style()->borderFit() == BorderFitLines)
fullRepaint = true;
if (!fullRepaint) {
- ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBoundsForRepaint(repaintContainer));
+ // This ASSERT fails due to animations. See https://bugs.webkit.org/show_bug.cgi?id=37048
+ // ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBoundsForRepaint(repaintContainer));
newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBoundsForRepaint(repaintContainer);
if (newOutlineBox.location() != oldOutlineBox.location() || (mustRepaintBackgroundOrBorder() && (newBounds != oldBounds || newOutlineBox != oldOutlineBox)))
fullRepaint = true;
diff --git a/WebCore/rendering/RenderObjectChildList.cpp b/WebCore/rendering/RenderObjectChildList.cpp
index 6775537..68e392c 100644
--- a/WebCore/rendering/RenderObjectChildList.cpp
+++ b/WebCore/rendering/RenderObjectChildList.cpp
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,7 +45,11 @@ void RenderObjectChildList::destroyLeftoverChildren()
while (firstChild()) {
if (firstChild()->isListMarker() || (firstChild()->style()->styleType() == FIRST_LETTER && !firstChild()->isText()))
firstChild()->remove(); // List markers are owned by their enclosing list and so don't get destroyed by this container. Similarly, first letters are destroyed by their remaining text fragment.
- else {
+ else if (firstChild()->isRunIn() && firstChild()->node()) {
+ firstChild()->node()->setRenderer(0);
+ firstChild()->node()->setNeedsStyleRecalc();
+ firstChild()->destroy();
+ } else {
// Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based text fields.
if (firstChild()->node())
firstChild()->node()->setRenderer(0);
@@ -62,9 +67,12 @@ RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
// disappears gets repainted properly.
if (!owner->documentBeingDestroyed() && fullRemove && oldChild->m_everHadLayout) {
oldChild->setNeedsLayoutAndPrefWidthsRecalc();
- oldChild->repaint();
+ if (oldChild->isBody())
+ owner->view()->repaint();
+ else
+ oldChild->repaint();
}
-
+
// If we have a line box wrapper, delete it.
if (oldChild->isBox())
toRenderBox(oldChild)->deleteLineBoxWrapper();
diff --git a/WebCore/rendering/RenderPath.cpp b/WebCore/rendering/RenderPath.cpp
index 27d480d..dd79397 100644
--- a/WebCore/rendering/RenderPath.cpp
+++ b/WebCore/rendering/RenderPath.cpp
@@ -97,7 +97,7 @@ bool RenderPath::strokeContains(const FloatPoint& point, bool requiresStroke) co
void RenderPath::layout()
{
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && selfNeedsLayout());
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(node());
bool needsPathUpdate = m_needsPathUpdate;
@@ -111,6 +111,10 @@ void RenderPath::layout()
m_needsTransformUpdate = false;
}
+ // Invalidate all resources of this client, if we changed something.
+ if (m_everHadLayout && selfNeedsLayout())
+ RenderSVGResource::invalidateAllResourcesOfRenderer(this);
+
// At this point LayoutRepainter already grabbed the old bounds,
// recalculate them now so repaintAfterLayout() uses the new bounds
if (needsPathUpdate || m_needsBoundariesUpdate) {
diff --git a/WebCore/rendering/RenderSVGContainer.cpp b/WebCore/rendering/RenderSVGContainer.cpp
index d4ca69f..f82ec95 100644
--- a/WebCore/rendering/RenderSVGContainer.cpp
+++ b/WebCore/rendering/RenderSVGContainer.cpp
@@ -50,13 +50,17 @@ void RenderSVGContainer::layout()
// Allow RenderSVGViewportContainer to update its viewport.
calcViewport();
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout() || selfWillPaint());
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
// Allow RenderSVGTransformableContainer to update its transform.
calculateLocalTransform();
SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
+ // Invalidate all resources of this client, if we changed something.
+ if (m_everHadLayout && selfNeedsLayout())
+ RenderSVGResource::invalidateAllResourcesOfRenderer(this);
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
diff --git a/WebCore/rendering/RenderSVGImage.cpp b/WebCore/rendering/RenderSVGImage.cpp
index a4572e6..44b68b1 100644
--- a/WebCore/rendering/RenderSVGImage.cpp
+++ b/WebCore/rendering/RenderSVGImage.cpp
@@ -52,7 +52,7 @@ void RenderSVGImage::layout()
{
ASSERT(needsLayout());
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGImageElement* image = static_cast<SVGImageElement*>(node());
if (m_needsTransformUpdate) {
@@ -66,11 +66,15 @@ void RenderSVGImage::layout()
calcWidth();
calcHeight();
+ // FIXME: Optimize caching the repaint rects.
m_localBounds = FloatRect(image->x().value(image), image->y().value(image), image->width().value(image), image->height().value(image));
m_cachedLocalRepaintRect = FloatRect();
+ // Invalidate all resources of this client, if we changed something.
+ if (m_everHadLayout && selfNeedsLayout())
+ RenderSVGResource::invalidateAllResourcesOfRenderer(this);
+
repainter.repaintAfterLayout();
-
setNeedsLayout(false);
}
diff --git a/WebCore/rendering/RenderSVGModelObject.cpp b/WebCore/rendering/RenderSVGModelObject.cpp
index 3d22e7a..49404cb 100644
--- a/WebCore/rendering/RenderSVGModelObject.cpp
+++ b/WebCore/rendering/RenderSVGModelObject.cpp
@@ -87,6 +87,14 @@ void RenderSVGModelObject::destroy()
RenderObject::destroy();
}
+void RenderSVGModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+{
+ RenderObject::styleDidChange(diff, oldStyle);
+
+ if (style() && (diff == StyleDifferenceLayout || diff == StyleDifferenceRepaint))
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(this, false);
+}
+
bool RenderSVGModelObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction)
{
ASSERT_NOT_REACHED();
diff --git a/WebCore/rendering/RenderSVGModelObject.h b/WebCore/rendering/RenderSVGModelObject.h
index 82c08c0..741cd61 100644
--- a/WebCore/rendering/RenderSVGModelObject.h
+++ b/WebCore/rendering/RenderSVGModelObject.h
@@ -61,6 +61,7 @@ public:
virtual void destroy();
virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
+ virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
private:
// This method should never be called, SVG uses a different nodeAtPoint method
diff --git a/WebCore/rendering/RenderSVGResource.cpp b/WebCore/rendering/RenderSVGResource.cpp
index 0aa7182..b4f499e 100644
--- a/WebCore/rendering/RenderSVGResource.cpp
+++ b/WebCore/rendering/RenderSVGResource.cpp
@@ -184,21 +184,17 @@ RenderSVGResourceSolidColor* RenderSVGResource::sharedSolidPaintingResource()
return s_sharedSolidPaintingResource;
}
-void RenderSVGResource::markForLayoutAndResourceInvalidation(RenderObject* object)
+void RenderSVGResource::markForLayoutAndResourceInvalidation(RenderObject* object, bool needsBoundariesUpdate)
{
ASSERT(object);
ASSERT(object->node());
ASSERT(object->node()->isSVGElement());
- // Mark the renderer for layout
- object->setNeedsLayout(true);
+ // Eventually mark the renderer needing a boundaries update
+ if (needsBoundariesUpdate)
+ object->setNeedsBoundariesUpdate();
- // Notify any resources in the ancestor chain, that we've been invalidated
- SVGElement* element = static_cast<SVGElement*>(object->node());
- if (!element->isStyled())
- return;
-
- static_cast<SVGStyledElement*>(element)->invalidateResourcesInAncestorChain();
+ markForLayoutAndParentResourceInvalidation(object);
}
static inline void invalidatePaintingResource(SVGPaint* paint, RenderObject* object)
@@ -254,6 +250,22 @@ void RenderSVGResource::invalidateAllResourcesOfRenderer(RenderObject* object)
invalidatePaintingResource(svgStyle->strokePaint(), object);
}
+void RenderSVGResource::markForLayoutAndParentResourceInvalidation(RenderObject* object, bool needsLayout)
+{
+ ASSERT(object);
+ if (needsLayout)
+ object->setNeedsLayout(true);
+
+ // Invalidate resources in ancestor chain, if needed.
+ RenderObject* current = object->parent();
+ while (current) {
+ if (current->isSVGResourceContainer())
+ current->toRenderSVGResourceContainer()->invalidateClients();
+
+ current = current->parent();
+ }
+}
+
}
#endif
diff --git a/WebCore/rendering/RenderSVGResource.h b/WebCore/rendering/RenderSVGResource.h
index 34ff14e..b3ea6fb 100644
--- a/WebCore/rendering/RenderSVGResource.h
+++ b/WebCore/rendering/RenderSVGResource.h
@@ -80,12 +80,13 @@ public:
static RenderSVGResourceSolidColor* sharedSolidPaintingResource();
static void invalidateAllResourcesOfRenderer(RenderObject*);
+ static void markForLayoutAndParentResourceInvalidation(RenderObject*, bool needsLayout = true);
private:
static void adjustColorForPseudoRules(const RenderStyle*, bool useFillPaint, Color&);
protected:
- void markForLayoutAndResourceInvalidation(RenderObject*);
+ void markForLayoutAndResourceInvalidation(RenderObject*, bool needsBoundariesUpdate = true);
};
}
diff --git a/WebCore/rendering/RenderSVGResourceClipper.cpp b/WebCore/rendering/RenderSVGResourceClipper.cpp
index cc499bf..e923f7e 100644
--- a/WebCore/rendering/RenderSVGResourceClipper.cpp
+++ b/WebCore/rendering/RenderSVGResourceClipper.cpp
@@ -49,6 +49,7 @@ RenderSVGResourceType RenderSVGResourceClipper::s_resourceType = ClipperResource
RenderSVGResourceClipper::RenderSVGResourceClipper(SVGClipPathElement* node)
: RenderSVGResourceContainer(node)
+ , m_invalidationBlocked(false)
{
}
@@ -60,12 +61,13 @@ RenderSVGResourceClipper::~RenderSVGResourceClipper()
void RenderSVGResourceClipper::invalidateClients()
{
+ if (m_invalidationBlocked)
+ return;
+
HashMap<RenderObject*, ClipperData*>::const_iterator end = m_clipper.end();
- for (HashMap<RenderObject*, ClipperData*>::const_iterator it = m_clipper.begin(); it != end; ++it) {
- RenderObject* renderer = it->first;
- renderer->setNeedsBoundariesUpdate();
- renderer->setNeedsLayout(true);
- }
+ for (HashMap<RenderObject*, ClipperData*>::const_iterator it = m_clipper.begin(); it != end; ++it)
+ markForLayoutAndResourceInvalidation(it->first);
+
deleteAllValues(m_clipper);
m_clipper.clear();
m_clipBoundaries = FloatRect();
@@ -73,12 +75,10 @@ void RenderSVGResourceClipper::invalidateClients()
void RenderSVGResourceClipper::invalidateClient(RenderObject* object)
{
- ASSERT(object);
+ if (m_invalidationBlocked)
+ return;
- // FIXME: The HashSet should always contain the object on calling invalidateClient. A race condition
- // during the parsing can causes a call of invalidateClient right before the call of applyResource.
- // We return earlier for the moment. This bug should be fixed in:
- // https://bugs.webkit.org/show_bug.cgi?id=35181
+ ASSERT(object);
if (!m_clipper.contains(object))
return;
@@ -95,6 +95,11 @@ bool RenderSVGResourceClipper::applyResource(RenderObject* object, RenderStyle*,
#else
UNUSED_PARAM(resourceMode);
#endif
+
+ // Early exit, if this resource contains a child which references ourselves.
+ if (containsCyclicReference(node()))
+ return false;
+
applyClippingToContext(object, object->objectBoundingBox(), object->repaintRectInLocalCoordinates(), context);
return true;
}
@@ -237,6 +242,10 @@ bool RenderSVGResourceClipper::createClipData(ClipperData* clipperData, const Fl
svgStyle->setStrokeOpacity(1.0f);
svgStyle->setFilterResource(String());
svgStyle->setMaskerResource(String());
+
+ // The setStyle() call results in a styleDidChange() call, which in turn invalidations the resources.
+ // As we're mutating the resource on purpose, block updates until we've resetted the style again.
+ m_invalidationBlocked = true;
renderer->setStyle(newRenderStyle.release());
// In the case of a <use> element, we obtained its renderere above, to retrieve its clipRule.
@@ -245,6 +254,7 @@ bool RenderSVGResourceClipper::createClipData(ClipperData* clipperData, const Fl
SVGRenderSupport::renderSubtreeToImage(clipperData->clipMaskImage.get(), isUseElement ? childNode->renderer() : renderer);
renderer->setStyle(oldRenderStyle.release());
+ m_invalidationBlocked = false;
}
maskContext->restore();
@@ -270,6 +280,12 @@ void RenderSVGResourceClipper::calculateClipContentRepaintRect()
bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundingBox, const FloatPoint& nodeAtPoint)
{
+ // FIXME: We should be able to check whether m_clipper.contains(object) - this doesn't work at the moment
+ // as resourceBoundingBox() has already created ClipperData, even if applyResource() returned false.
+ // Early exit, if this resource contains a child which references ourselves.
+ if (containsCyclicReference(node()))
+ return false;
+
FloatPoint point = nodeAtPoint;
if (!SVGRenderSupport::pointInClippingArea(this, point))
return false;
@@ -296,12 +312,16 @@ bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundin
return false;
}
-FloatRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object)
+bool RenderSVGResourceClipper::childElementReferencesResource(const SVGRenderStyle* style, const String& referenceId) const
{
- // Save the reference to the calling object for relayouting it on changing resource properties.
- if (!m_clipper.contains(object))
- m_clipper.set(object, new ClipperData);
+ if (!style->hasClipper())
+ return false;
+
+ return style->clipperResource() == referenceId;
+}
+FloatRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object)
+{
// Resource was not layouted yet. Give back the boundingBox of the object.
if (selfNeedsLayout())
return object->objectBoundingBox();
diff --git a/WebCore/rendering/RenderSVGResourceClipper.h b/WebCore/rendering/RenderSVGResourceClipper.h
index 78ec75b..7128aa1 100644
--- a/WebCore/rendering/RenderSVGResourceClipper.h
+++ b/WebCore/rendering/RenderSVGResourceClipper.h
@@ -68,6 +68,9 @@ private:
bool createClipData(ClipperData*, const FloatRect&, const FloatRect&);
void calculateClipContentRepaintRect();
+ virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const;
+
+ bool m_invalidationBlocked;
FloatRect m_clipBoundaries;
HashMap<RenderObject*, ClipperData*> m_clipper;
};
diff --git a/WebCore/rendering/RenderSVGResourceContainer.h b/WebCore/rendering/RenderSVGResourceContainer.h
index 54617bb..5f1c828 100644
--- a/WebCore/rendering/RenderSVGResourceContainer.h
+++ b/WebCore/rendering/RenderSVGResourceContainer.h
@@ -26,6 +26,7 @@
#include "SVGStyledTransformableElement.h"
#include "RenderSVGResource.h"
+#include "RenderSVGShadowTreeRootContainer.h"
namespace WebCore {
@@ -35,8 +36,7 @@ public:
RenderSVGResourceContainer(SVGStyledElement* node)
: RenderSVGHiddenContainer(node)
, RenderSVGResource()
- // FIXME: Should probably be using getIdAttribute rather than idForStyleResolution.
- , m_id(node->hasID() ? node->idForStyleResolution() : nullAtom)
+ , m_id(node->hasID() ? node->getIdAttribute() : nullAtom)
{
ASSERT(node->document());
node->document()->accessSVGExtensions()->addResource(m_id, this);
@@ -57,9 +57,7 @@ public:
// Remove old id, that is guaranteed to be present in cache
extensions->removeResource(m_id);
-
- // FIXME: Should probably be using getIdAttribute rather than idForStyleResolution.
- m_id = node()->hasID() ? static_cast<Element*>(node())->idForStyleResolution() : nullAtom;
+ m_id = static_cast<Element*>(node())->getIdAttribute();
// It's possible that an element is referencing us with the new id, and has to be notified that we're existing now
if (extensions->isPendingResource(m_id)) {
@@ -84,7 +82,8 @@ public:
virtual bool drawsContents() { return false; }
virtual RenderSVGResourceContainer* toRenderSVGResourceContainer() { return this; }
-
+ virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const { return false; }
+
static AffineTransform transformOnNonScalingStroke(RenderObject* object, const AffineTransform resourceTransform)
{
if (!object->isRenderPath())
@@ -96,6 +95,48 @@ public:
return transform;
}
+ bool containsCyclicReference(const Node* startNode) const
+ {
+ ASSERT(startNode->document());
+
+ for (Node* node = startNode->firstChild(); node; node = node->nextSibling()) {
+ if (!node->isSVGElement())
+ continue;
+
+ RenderObject* renderer = node->renderer();
+ if (!renderer)
+ continue;
+
+ RenderStyle* style = renderer->style();
+ if (!style)
+ continue;
+
+ const SVGRenderStyle* svgStyle = style->svgStyle();
+ ASSERT(svgStyle);
+
+ // Let the class inheriting from us decide whether the child element references ourselves.
+ if (childElementReferencesResource(svgStyle, m_id))
+ return true;
+
+ // Dive into shadow tree to check for cycles there.
+ if (node->hasTagName(SVGNames::useTag)) {
+ ASSERT(renderer->isSVGShadowTreeRootContainer());
+ if (Node* shadowRoot = static_cast<RenderSVGShadowTreeRootContainer*>(renderer)->rootElement()) {
+ if (containsCyclicReference(shadowRoot))
+ return true;
+ }
+
+ }
+
+ if (node->hasChildNodes()) {
+ if (containsCyclicReference(node))
+ return true;
+ }
+ }
+
+ return false;
+ }
+
private:
AtomicString m_id;
};
diff --git a/WebCore/rendering/RenderSVGResourceFilter.cpp b/WebCore/rendering/RenderSVGResourceFilter.cpp
index 19a6ccb..a6358f0 100644
--- a/WebCore/rendering/RenderSVGResourceFilter.cpp
+++ b/WebCore/rendering/RenderSVGResourceFilter.cpp
@@ -67,11 +67,9 @@ RenderSVGResourceFilter::~RenderSVGResourceFilter()
void RenderSVGResourceFilter::invalidateClients()
{
HashMap<RenderObject*, FilterData*>::const_iterator end = m_filter.end();
- for (HashMap<RenderObject*, FilterData*>::const_iterator it = m_filter.begin(); it != end; ++it) {
- RenderObject* renderer = it->first;
- renderer->setNeedsBoundariesUpdate();
- renderer->setNeedsLayout(true);
- }
+ for (HashMap<RenderObject*, FilterData*>::const_iterator it = m_filter.begin(); it != end; ++it)
+ markForLayoutAndResourceInvalidation(it->first);
+
deleteAllValues(m_filter);
m_filter.clear();
}
@@ -79,11 +77,6 @@ void RenderSVGResourceFilter::invalidateClients()
void RenderSVGResourceFilter::invalidateClient(RenderObject* object)
{
ASSERT(object);
-
- // FIXME: The HashMap should always contain the object on calling invalidateClient. A race condition
- // during the parsing can causes a call of invalidateClient right before the call of applyResource.
- // We return earlier for the moment. This bug should be fixed in:
- // https://bugs.webkit.org/show_bug.cgi?id=35181
if (!m_filter.contains(object))
return;
diff --git a/WebCore/rendering/RenderSVGResourceGradient.cpp b/WebCore/rendering/RenderSVGResourceGradient.cpp
index 74f5b13..ce51369 100644
--- a/WebCore/rendering/RenderSVGResourceGradient.cpp
+++ b/WebCore/rendering/RenderSVGResourceGradient.cpp
@@ -51,7 +51,7 @@ void RenderSVGResourceGradient::invalidateClients()
{
const HashMap<RenderObject*, GradientData*>::const_iterator end = m_gradient.end();
for (HashMap<RenderObject*, GradientData*>::const_iterator it = m_gradient.begin(); it != end; ++it)
- markForLayoutAndResourceInvalidation(it->first);
+ markForLayoutAndResourceInvalidation(it->first, false);
deleteAllValues(m_gradient);
m_gradient.clear();
@@ -60,16 +60,11 @@ void RenderSVGResourceGradient::invalidateClients()
void RenderSVGResourceGradient::invalidateClient(RenderObject* object)
{
ASSERT(object);
-
- // FIXME: The HashMap should always contain the object on calling invalidateClient. A race condition
- // during the parsing can causes a call of invalidateClient right before the call of applyResource.
- // We return earlier for the moment. This bug should be fixed in:
- // https://bugs.webkit.org/show_bug.cgi?id=35181
if (!m_gradient.contains(object))
return;
delete m_gradient.take(object);
- markForLayoutAndResourceInvalidation(object);
+ markForLayoutAndResourceInvalidation(object, false);
}
#if PLATFORM(CG)
@@ -133,7 +128,7 @@ static inline AffineTransform clipToTextMask(GraphicsContext* context,
matrix.translate(maskBoundingBox.x(), maskBoundingBox.y());
matrix.scaleNonUniform(maskBoundingBox.width(), maskBoundingBox.height());
}
- matrix.multiply(gradientData->transform);
+ matrix.multLeft(gradientData->transform);
return matrix;
}
#endif
@@ -179,7 +174,7 @@ bool RenderSVGResourceGradient::applyResource(RenderObject* object, RenderStyle*
gradientData->userspaceTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
}
- gradientData->userspaceTransform.multiply(gradientData->transform);
+ gradientData->userspaceTransform.multLeft(gradientData->transform);
gradientData->gradient->setGradientSpaceTransform(gradientData->userspaceTransform);
}
diff --git a/WebCore/rendering/RenderSVGResourceMarker.cpp b/WebCore/rendering/RenderSVGResourceMarker.cpp
index ce331a7..4f0cace 100644
--- a/WebCore/rendering/RenderSVGResourceMarker.cpp
+++ b/WebCore/rendering/RenderSVGResourceMarker.cpp
@@ -62,11 +62,8 @@ void RenderSVGResourceMarker::addClient(const RenderObject* object)
void RenderSVGResourceMarker::invalidateClients()
{
const HashSet<const RenderObject*>::const_iterator end = m_marker.end();
- for (HashSet<const RenderObject*>::const_iterator it = m_marker.begin(); it != end; ++it) {
- RenderObject* renderer = const_cast<RenderObject*>(*it);
- renderer->setNeedsBoundariesUpdate();
- renderer->setNeedsLayout(true);
- }
+ for (HashSet<const RenderObject*>::const_iterator it = m_marker.begin(); it != end; ++it)
+ markForLayoutAndResourceInvalidation(const_cast<RenderObject*>(*it));
m_marker.clear();
}
@@ -74,11 +71,6 @@ void RenderSVGResourceMarker::invalidateClients()
void RenderSVGResourceMarker::invalidateClient(RenderObject* object)
{
ASSERT(object);
-
- // FIXME: The HashSet should always contain the object on calling invalidateClient. A race condition
- // during the parsing can causes a call of invalidateClient right before the call of applyResource.
- // We return earlier for the moment. This bug should be fixed in:
- // https://bugs.webkit.org/show_bug.cgi?id=35181
if (!m_marker.contains(object))
return;
diff --git a/WebCore/rendering/RenderSVGResourceMasker.cpp b/WebCore/rendering/RenderSVGResourceMasker.cpp
index 74d3fe6..83a64b5 100644
--- a/WebCore/rendering/RenderSVGResourceMasker.cpp
+++ b/WebCore/rendering/RenderSVGResourceMasker.cpp
@@ -58,11 +58,8 @@ RenderSVGResourceMasker::~RenderSVGResourceMasker()
void RenderSVGResourceMasker::invalidateClients()
{
HashMap<RenderObject*, MaskerData*>::const_iterator end = m_masker.end();
- for (HashMap<RenderObject*, MaskerData*>::const_iterator it = m_masker.begin(); it != end; ++it) {
- RenderObject* renderer = it->first;
- renderer->setNeedsBoundariesUpdate();
- renderer->setNeedsLayout(true);
- }
+ for (HashMap<RenderObject*, MaskerData*>::const_iterator it = m_masker.begin(); it != end; ++it)
+ markForLayoutAndResourceInvalidation(it->first);
deleteAllValues(m_masker);
m_masker.clear();
@@ -72,11 +69,6 @@ void RenderSVGResourceMasker::invalidateClients()
void RenderSVGResourceMasker::invalidateClient(RenderObject* object)
{
ASSERT(object);
-
- // FIXME: The HashMap should always contain the object on calling invalidateClient. A race condition
- // during the parsing can causes a call of invalidateClient right before the call of applyResource.
- // We return earlier for the moment. This bug should be fixed in:
- // https://bugs.webkit.org/show_bug.cgi?id=35181
if (!m_masker.contains(object))
return;
@@ -84,6 +76,14 @@ void RenderSVGResourceMasker::invalidateClient(RenderObject* object)
markForLayoutAndResourceInvalidation(object);
}
+bool RenderSVGResourceMasker::childElementReferencesResource(const SVGRenderStyle* style, const String& referenceId) const
+{
+ if (!style->hasMasker())
+ return false;
+
+ return style->maskerResource() == referenceId;
+}
+
bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*, GraphicsContext*& context, unsigned short resourceMode)
{
ASSERT(object);
@@ -103,6 +103,10 @@ bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*,
if (!maskElement)
return false;
+ // Early exit, if this resource contains a child which references ourselves.
+ if (containsCyclicReference(node()))
+ return false;
+
createMaskImage(maskerData, maskElement, object);
}
@@ -178,6 +182,10 @@ void RenderSVGResourceMasker::createMaskImage(MaskerData* maskerData, const SVGM
maskImageContext->restore();
+#if !PLATFORM(CG)
+ maskerData->maskImage->transformColorSpace(DeviceRGB, LinearRGB);
+#endif
+
// create the luminance mask
RefPtr<ImageData> imageData(maskerData->maskImage->getUnmultipliedImageData(maskImageRect));
CanvasPixelArray* srcPixelArray(imageData->data());
@@ -212,10 +220,6 @@ void RenderSVGResourceMasker::calculateMaskContentRepaintRect()
FloatRect RenderSVGResourceMasker::resourceBoundingBox(RenderObject* object)
{
- // Save the reference to the calling object for relayouting it on changing resource properties.
- if (!m_masker.contains(object))
- m_masker.set(object, new MaskerData);
-
// Resource was not layouted yet. Give back clipping rect of the mask.
SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
FloatRect objectBoundingBox = object->objectBoundingBox();
diff --git a/WebCore/rendering/RenderSVGResourceMasker.h b/WebCore/rendering/RenderSVGResourceMasker.h
index f6301cb..56f657b 100644
--- a/WebCore/rendering/RenderSVGResourceMasker.h
+++ b/WebCore/rendering/RenderSVGResourceMasker.h
@@ -69,6 +69,8 @@ private:
void createMaskImage(MaskerData*, const SVGMaskElement*, RenderObject*);
void calculateMaskContentRepaintRect();
+ virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const;
+
FloatRect m_maskBoundaries;
HashMap<RenderObject*, MaskerData*> m_masker;
};
diff --git a/WebCore/rendering/RenderSVGResourcePattern.cpp b/WebCore/rendering/RenderSVGResourcePattern.cpp
index ba24fcf..a2234c8 100644
--- a/WebCore/rendering/RenderSVGResourcePattern.cpp
+++ b/WebCore/rendering/RenderSVGResourcePattern.cpp
@@ -48,7 +48,7 @@ void RenderSVGResourcePattern::invalidateClients()
{
const HashMap<RenderObject*, PatternData*>::const_iterator end = m_pattern.end();
for (HashMap<RenderObject*, PatternData*>::const_iterator it = m_pattern.begin(); it != end; ++it)
- markForLayoutAndResourceInvalidation(it->first);
+ markForLayoutAndResourceInvalidation(it->first, false);
deleteAllValues(m_pattern);
m_pattern.clear();
@@ -57,16 +57,26 @@ void RenderSVGResourcePattern::invalidateClients()
void RenderSVGResourcePattern::invalidateClient(RenderObject* object)
{
ASSERT(object);
-
- // FIXME: The HashMap should always contain the object on calling invalidateClient. A race condition
- // during the parsing can causes a call of invalidateClient right before the call of applyResource.
- // We return earlier for the moment. This bug should be fixed in:
- // https://bugs.webkit.org/show_bug.cgi?id=35181
if (!m_pattern.contains(object))
return;
delete m_pattern.take(object);
- markForLayoutAndResourceInvalidation(object);
+ markForLayoutAndResourceInvalidation(object, false);
+}
+
+bool RenderSVGResourcePattern::childElementReferencesResource(const SVGRenderStyle* style, const String& referenceId) const
+{
+ if (style->hasFill()) {
+ if (style->fillPaint()->matchesTargetURI(referenceId))
+ return true;
+ }
+
+ if (style->hasStroke()) {
+ if (style->strokePaint()->matchesTargetURI(referenceId))
+ return true;
+ }
+
+ return false;
}
bool RenderSVGResourcePattern::applyResource(RenderObject* object, RenderStyle* style, GraphicsContext*& context, unsigned short resourceMode)
@@ -91,7 +101,6 @@ bool RenderSVGResourcePattern::applyResource(RenderObject* object, RenderStyle*
PatternData* patternData = m_pattern.get(object);
if (!patternData->pattern) {
-
// Create tile image
OwnPtr<ImageBuffer> tileImage = createTileImage(patternData, patternElement, object);
if (!tileImage)
@@ -235,6 +244,10 @@ PassOwnPtr<ImageBuffer> RenderSVGResourcePattern::createTileImage(PatternData* p
if (!attributes.patternContentElement())
return 0;
+ // Early exit, if this resource contains a child which references ourselves.
+ if (containsCyclicReference(attributes.patternContentElement()))
+ return 0;
+
FloatRect objectBoundingBox = object->objectBoundingBox();
FloatRect patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement);
AffineTransform patternTransform = attributes.patternTransform();
diff --git a/WebCore/rendering/RenderSVGResourcePattern.h b/WebCore/rendering/RenderSVGResourcePattern.h
index 690b0de..ec89777 100644
--- a/WebCore/rendering/RenderSVGResourcePattern.h
+++ b/WebCore/rendering/RenderSVGResourcePattern.h
@@ -67,6 +67,8 @@ private:
FloatRect calculatePatternBoundariesIncludingOverflow(PatternAttributes&, const FloatRect& objectBoundingBox,
const AffineTransform& viewBoxCTM, const FloatRect& patternBoundaries) const;
+ virtual bool childElementReferencesResource(const SVGRenderStyle*, const String&) const;
+
HashMap<RenderObject*, PatternData*> m_pattern;
};
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index 396df19..1659e40 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -112,7 +112,7 @@ void RenderSVGRoot::layout()
view()->disableLayoutState();
bool needsLayout = selfNeedsLayout();
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
+ LayoutRepainter repainter(*this, needsLayout && m_everHadLayout && checkForRepaintDuringLayout());
IntSize oldSize(width(), height());
calcWidth();
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
index 9d3d26f..888dd57 100644
--- a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
@@ -96,6 +96,11 @@ void RenderSVGShadowTreeRootContainer::styleDidChange(StyleDifference diff, cons
shadowRootRenderer->setStyle(style());
}
+Node* RenderSVGShadowTreeRootContainer::rootElement() const
+{
+ return m_shadowRoot.get();
+}
+
}
#endif
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.h b/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
index 81ae44b..bff2a87 100644
--- a/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.h
@@ -39,6 +39,8 @@ public:
void updateStyle(Node::StyleChange);
virtual void updateFromElement();
+ Node* rootElement() const;
+
private:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
diff --git a/WebCore/rendering/RenderSVGText.cpp b/WebCore/rendering/RenderSVGText.cpp
index 12f3cb5..58348db 100644
--- a/WebCore/rendering/RenderSVGText.cpp
+++ b/WebCore/rendering/RenderSVGText.cpp
@@ -73,7 +73,7 @@ void RenderSVGText::mapLocalToContainer(RenderBoxModelObject* repaintContainer,
void RenderSVGText::layout()
{
ASSERT(needsLayout());
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+ LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
if (m_needsTransformUpdate) {
SVGTextElement* text = static_cast<SVGTextElement*>(node());
@@ -98,6 +98,10 @@ void RenderSVGText::layout()
ASSERT(childrenInline());
forceLayoutInlineChildren();
+ // Invalidate all resources of this client, if we changed something.
+ if (m_everHadLayout && selfNeedsLayout())
+ RenderSVGResource::invalidateAllResourcesOfRenderer(this);
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
diff --git a/WebCore/rendering/RenderTextControlSingleLine.cpp b/WebCore/rendering/RenderTextControlSingleLine.cpp
index b6c2916..71d5a86 100644
--- a/WebCore/rendering/RenderTextControlSingleLine.cpp
+++ b/WebCore/rendering/RenderTextControlSingleLine.cpp
@@ -69,6 +69,8 @@ RenderTextControlSingleLine::~RenderTextControlSingleLine()
if (m_innerBlock)
m_innerBlock->detach();
+ if (m_innerSpinButton)
+ m_innerSpinButton->detach();
if (m_outerSpinButton)
m_outerSpinButton->detach();
}
@@ -261,6 +263,12 @@ void RenderTextControlSingleLine::layout()
if (currentHeight < height())
childBlock->setY((height() - currentHeight) / 2);
+ // Ignores the paddings for the inner spin button.
+ if (RenderBox* spinBox = m_innerSpinButton ? m_innerSpinButton->renderBox() : 0) {
+ spinBox->setLocation(spinBox->x() + paddingRight(), borderTop());
+ spinBox->setHeight(height() - borderTop() - borderBottom());
+ }
+
// Center the spin button vertically, and move it to the right by
// padding + border of the text fields.
if (RenderBox* spinBox = m_outerSpinButton ? m_outerSpinButton->renderBox() : 0) {
@@ -292,6 +300,8 @@ bool RenderTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, Hit
hitInnerTextElement(result, xPos, yPos, tx, ty);
// If we found a spin button, we're done.
+ if (m_innerSpinButton && result.innerNode() == m_innerSpinButton)
+ return true;
if (m_outerSpinButton && result.innerNode() == m_outerSpinButton)
return true;
// If we're not a search field, or we already found the speech, results or cancel buttons, we're done.
@@ -376,6 +386,8 @@ void RenderTextControlSingleLine::forwardEvent(Event* event)
m_resultsButton->defaultEventHandler(event);
else if (m_cancelButton && localPoint.x() > textRight)
m_cancelButton->defaultEventHandler(event);
+ else if (m_innerSpinButton && localPoint.x() > textRight && localPoint.x() < textRight + m_innerSpinButton->renderBox()->width())
+ m_innerSpinButton->defaultEventHandler(event);
else if (m_outerSpinButton && localPoint.x() > textRight)
m_outerSpinButton->defaultEventHandler(event);
else
@@ -469,6 +481,11 @@ int RenderTextControlSingleLine::textBlockWidth() const
width -= cancelRenderer->width() + cancelRenderer->marginLeft() + cancelRenderer->marginRight();
}
+ if (RenderBox* spinRenderer = m_innerSpinButton ? m_innerSpinButton->renderBox() : 0) {
+ spinRenderer->calcWidth();
+ width -= spinRenderer->width() + spinRenderer->marginLeft() + spinRenderer->marginRight();
+ }
+
#if ENABLE(INPUT_SPEECH)
if (RenderBox* speechRenderer = m_speechButton ? m_speechButton->renderBox() : 0) {
speechRenderer->calcWidth();
@@ -534,6 +551,9 @@ int RenderTextControlSingleLine::preferredContentWidth(float charWidth) const
result += cancelRenderer->borderLeft() + cancelRenderer->borderRight() +
cancelRenderer->paddingLeft() + cancelRenderer->paddingRight();
+ if (RenderBox* spinRenderer = m_innerSpinButton ? m_innerSpinButton->renderBox() : 0)
+ result += spinRenderer->minPrefWidth();
+
#if ENABLE(INPUT_SPEECH)
if (RenderBox* speechRenderer = m_speechButton ? m_speechButton->renderBox() : 0) {
result += speechRenderer->borderLeft() + speechRenderer->borderRight() +
@@ -598,7 +618,12 @@ void RenderTextControlSingleLine::createSubtreeIfNeeded()
#endif
if (!createSubtree) {
RenderTextControl::createSubtreeIfNeeded(m_innerBlock.get());
- if (inputElement()->hasSpinButton() && !m_outerSpinButton) {
+ bool hasSpinButton = inputElement()->hasSpinButton();
+ if (hasSpinButton && !m_innerSpinButton) {
+ m_innerSpinButton = SpinButtonElement::create(node());
+ m_innerSpinButton->attachInnerElement(node(), createInnerSpinButtonStyle(), renderArena());
+ }
+ if (hasSpinButton && !m_outerSpinButton) {
m_outerSpinButton = SpinButtonElement::create(node());
m_outerSpinButton->attachInnerElement(node(), createOuterSpinButtonStyle(), renderArena());
}
@@ -767,6 +792,16 @@ PassRefPtr<RenderStyle> RenderTextControlSingleLine::createCancelButtonStyle(con
return cancelBlockStyle.release();
}
+PassRefPtr<RenderStyle> RenderTextControlSingleLine::createInnerSpinButtonStyle() const
+{
+ ASSERT(node()->isHTMLElement());
+ RefPtr<RenderStyle> buttonStyle = getCachedPseudoStyle(INNER_SPIN_BUTTON);
+ if (!buttonStyle)
+ buttonStyle = RenderStyle::create();
+ buttonStyle->inheritFrom(style());
+ return buttonStyle.release();
+}
+
PassRefPtr<RenderStyle> RenderTextControlSingleLine::createOuterSpinButtonStyle() const
{
ASSERT(node()->isHTMLElement());
@@ -880,6 +915,11 @@ String RenderTextControlSingleLine::itemText(unsigned listIndex) const
return m_recentSearches[listIndex - 1];
}
+String RenderTextControlSingleLine::itemLabel(unsigned) const
+{
+ return String();
+}
+
bool RenderTextControlSingleLine::itemIsEnabled(unsigned listIndex) const
{
if (!listIndex || itemIsSeparator(listIndex))
diff --git a/WebCore/rendering/RenderTextControlSingleLine.h b/WebCore/rendering/RenderTextControlSingleLine.h
index ab9f711..92ecadd 100644
--- a/WebCore/rendering/RenderTextControlSingleLine.h
+++ b/WebCore/rendering/RenderTextControlSingleLine.h
@@ -98,6 +98,7 @@ private:
PassRefPtr<RenderStyle> createInnerBlockStyle(const RenderStyle* startStyle) const;
PassRefPtr<RenderStyle> createResultsButtonStyle(const RenderStyle* startStyle) const;
PassRefPtr<RenderStyle> createCancelButtonStyle(const RenderStyle* startStyle) const;
+ PassRefPtr<RenderStyle> createInnerSpinButtonStyle() const;
PassRefPtr<RenderStyle> createOuterSpinButtonStyle() const;
#if ENABLE(INPUT_SPEECH)
PassRefPtr<RenderStyle> createSpeechButtonStyle(const RenderStyle* startStyle) const;
@@ -115,6 +116,7 @@ private:
virtual void selectionChanged(unsigned, bool) {}
virtual void selectionCleared() {}
virtual String itemText(unsigned listIndex) const;
+ virtual String itemLabel(unsigned listIndex) const;
virtual String itemToolTip(unsigned) const { return String(); }
virtual String itemAccessibilityText(unsigned) const { return String(); }
virtual bool itemIsEnabled(unsigned listIndex) const;
@@ -145,6 +147,7 @@ private:
RefPtr<TextControlInnerElement> m_innerBlock;
RefPtr<SearchFieldResultsButtonElement> m_resultsButton;
RefPtr<SearchFieldCancelButtonElement> m_cancelButton;
+ RefPtr<TextControlInnerElement> m_innerSpinButton;
RefPtr<TextControlInnerElement> m_outerSpinButton;
#if ENABLE(INPUT_SPEECH)
RefPtr<InputFieldSpeechButtonElement> m_speechButton;
diff --git a/WebCore/rendering/RenderTheme.cpp b/WebCore/rendering/RenderTheme.cpp
index 2147b36..3fcb2c9 100644
--- a/WebCore/rendering/RenderTheme.cpp
+++ b/WebCore/rendering/RenderTheme.cpp
@@ -832,7 +832,7 @@ bool RenderTheme::isSpinUpButtonPartPressed(const RenderObject* o) const
|| !static_cast<Element*>(node)->isSpinButtonElement())
return false;
SpinButtonElement* element = static_cast<SpinButtonElement*>(node);
- return element->onUpButton();
+ return element->upDownState() == SpinButtonElement::Up;
}
bool RenderTheme::isReadOnlyControl(const RenderObject* o) const
@@ -845,19 +845,22 @@ bool RenderTheme::isReadOnlyControl(const RenderObject* o) const
bool RenderTheme::isHovered(const RenderObject* o) const
{
- if (!o->node())
+ Node* node = o->node();
+ if (!node)
return false;
- return o->node()->hovered();
+ if (!node->isElementNode() || !static_cast<Element*>(node)->isSpinButtonElement())
+ return node->hovered();
+ SpinButtonElement* element = static_cast<SpinButtonElement*>(node);
+ return element->hovered() && element->upDownState() != SpinButtonElement::Indeterminate;
}
bool RenderTheme::isSpinUpButtonPartHovered(const RenderObject* o) const
{
Node* node = o->node();
- if (!node || !node->active() || !node->isElementNode()
- || !static_cast<Element*>(node)->isSpinButtonElement())
+ if (!node || !node->isElementNode() || !static_cast<Element*>(node)->isSpinButtonElement())
return false;
SpinButtonElement* element = static_cast<SpinButtonElement*>(node);
- return element->onUpButton();
+ return element->upDownState() == SpinButtonElement::Up;
}
bool RenderTheme::isDefault(const RenderObject* o) const
diff --git a/WebCore/rendering/RenderThemeChromiumLinux.cpp b/WebCore/rendering/RenderThemeChromiumLinux.cpp
index c29353d..de83ae9 100644
--- a/WebCore/rendering/RenderThemeChromiumLinux.cpp
+++ b/WebCore/rendering/RenderThemeChromiumLinux.cpp
@@ -27,14 +27,13 @@
#include "CSSValueKeywords.h"
#include "Color.h"
+#include "PlatformThemeChromiumGtk.h"
#include "RenderObject.h"
+#include "ScrollbarTheme.h"
#include "UserAgentStyleSheets.h"
namespace WebCore {
-unsigned RenderThemeChromiumLinux::m_thumbInactiveColor = 0xeaeaea;
-unsigned RenderThemeChromiumLinux::m_thumbActiveColor = 0xf4f4f4;
-unsigned RenderThemeChromiumLinux::m_trackColor = 0xd3d3d3;
unsigned RenderThemeChromiumLinux::m_activeSelectionBackgroundColor =
0xff1e90ff;
unsigned RenderThemeChromiumLinux::m_activeSelectionForegroundColor =
@@ -168,12 +167,29 @@ void RenderThemeChromiumLinux::setSelectionColors(
m_inactiveSelectionForegroundColor = inactiveForegroundColor;
}
-void RenderThemeChromiumLinux::setScrollbarColors(
- SkColor inactiveColor, SkColor activeColor, SkColor trackColor)
+void RenderThemeChromiumLinux::adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
- m_thumbInactiveColor = inactiveColor;
- m_thumbActiveColor = activeColor;
- m_trackColor = trackColor;
+ int width = ScrollbarTheme::nativeTheme()->scrollbarThickness();
+ style->setWidth(Length(width, Fixed));
+ style->setMinWidth(Length(width, Fixed));
+}
+
+bool RenderThemeChromiumLinux::paintInnerSpinButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+{
+ ControlStates northStates = controlStatesForRenderer(object);
+ ControlStates southStates = northStates;
+ if (northStates & SpinUpState)
+ southStates &= ~(HoverState | PressedState);
+ else
+ northStates &= ~(HoverState | PressedState);
+
+ IntRect half = rect;
+ half.setHeight(rect.height() / 2);
+ PlatformThemeChromiumGtk::paintArrowButton(info.context, half, PlatformThemeChromiumGtk::North, northStates);
+
+ half.setY(rect.y() + rect.height() / 2);
+ PlatformThemeChromiumGtk::paintArrowButton(info.context, half, PlatformThemeChromiumGtk::South, southStates);
+ return false;
}
} // namespace WebCore
diff --git a/WebCore/rendering/RenderThemeChromiumLinux.h b/WebCore/rendering/RenderThemeChromiumLinux.h
index c60dec3..9eeca97 100644
--- a/WebCore/rendering/RenderThemeChromiumLinux.h
+++ b/WebCore/rendering/RenderThemeChromiumLinux.h
@@ -59,18 +59,14 @@ namespace WebCore {
static void setCaretBlinkInterval(double interval);
virtual double caretBlinkIntervalInternal() const;
+ virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&);
+
static void setSelectionColors(unsigned activeBackgroundColor,
unsigned activeForegroundColor,
unsigned inactiveBackgroundColor,
unsigned inactiveForegroundColor);
- static void setScrollbarColors(unsigned inactive_color,
- unsigned active_color,
- unsigned track_color);
- static unsigned thumbInactiveColor() { return m_thumbInactiveColor; }
- static unsigned thumbActiveColor() { return m_thumbActiveColor; }
- static unsigned trackColor() { return m_trackColor; }
-
private:
RenderThemeChromiumLinux();
virtual ~RenderThemeChromiumLinux();
@@ -84,10 +80,6 @@ namespace WebCore {
static unsigned m_activeSelectionForegroundColor;
static unsigned m_inactiveSelectionBackgroundColor;
static unsigned m_inactiveSelectionForegroundColor;
-
- static unsigned m_thumbInactiveColor;
- static unsigned m_thumbActiveColor;
- static unsigned m_trackColor;
};
} // namespace WebCore
diff --git a/WebCore/rendering/RenderThemeChromiumWin.cpp b/WebCore/rendering/RenderThemeChromiumWin.cpp
index 1172f96..3023798 100644
--- a/WebCore/rendering/RenderThemeChromiumWin.cpp
+++ b/WebCore/rendering/RenderThemeChromiumWin.cpp
@@ -29,8 +29,8 @@
#include <uxtheme.h>
#include <vssym32.h>
-#include "ChromiumBridge.h"
#include "CSSValueKeywords.h"
+#include "ChromiumBridge.h"
#include "CurrentTime.h"
#include "FontSelector.h"
#include "FontUtilsChromiumWin.h"
@@ -57,53 +57,71 @@
namespace WebCore {
namespace {
-class ThemePainter : public TransparencyWin {
+class ThemePainter {
public:
ThemePainter(GraphicsContext* context, const IntRect& r)
{
- TransformMode transformMode = getTransformMode(context->getCTM());
- init(context, getLayerMode(context, transformMode), transformMode, r);
+ TransparencyWin::TransformMode transformMode = getTransformMode(context->getCTM());
+ m_helper.init(context, getLayerMode(context, transformMode), transformMode, r);
+
+ if (!m_helper.context()) {
+ // TransparencyWin doesn't have well-defined copy-ctor nor op=()
+ // so we re-initialize it instead of assigning a fresh istance.
+ // On the reinitialization, we fallback to use NoLayer mode.
+ // Note that the original initialization failure can be caused by
+ // a failure of an internal buffer allocation and NoLayer mode
+ // does not have such buffer allocations.
+ m_helper.~TransparencyWin();
+ new (&m_helper) TransparencyWin();
+ m_helper.init(context, TransparencyWin::NoLayer, transformMode, r);
+ }
}
~ThemePainter()
{
- composite();
+ m_helper.composite();
}
+ GraphicsContext* context() { return m_helper.context(); }
+ const IntRect& drawRect() { return m_helper.drawRect(); }
+
private:
+
static bool canvasHasMultipleLayers(const SkCanvas* canvas)
{
SkCanvas::LayerIter iter(const_cast<SkCanvas*>(canvas), false);
- iter.next(); // There is always at least one layer.
- return !iter.done(); // There is > 1 layer if the the iterator can stil advance.
+ iter.next(); // There is always at least one layer.
+ return !iter.done(); // There is > 1 layer if the the iterator can stil advance.
}
- static LayerMode getLayerMode(GraphicsContext* context, TransformMode transformMode)
+ static TransparencyWin::LayerMode getLayerMode(GraphicsContext* context, TransparencyWin::TransformMode transformMode)
{
- if (context->platformContext()->isDrawingToImageBuffer()) // Might have transparent background.
- return WhiteLayer;
- else if (canvasHasMultipleLayers(context->platformContext()->canvas())) // Needs antialiasing help.
- return OpaqueCompositeLayer;
- else // Nothing interesting.
- return transformMode == KeepTransform ? NoLayer : OpaqueCompositeLayer;
+ if (context->platformContext()->isDrawingToImageBuffer()) // Might have transparent background.
+ return TransparencyWin::WhiteLayer;
+ if (canvasHasMultipleLayers(context->platformContext()->canvas())) // Needs antialiasing help.
+ return TransparencyWin::OpaqueCompositeLayer;
+ // Nothing interesting.
+ return transformMode == TransparencyWin::KeepTransform ? TransparencyWin::NoLayer : TransparencyWin::OpaqueCompositeLayer;
}
- static TransformMode getTransformMode(const AffineTransform& matrix)
+ static TransparencyWin::TransformMode getTransformMode(const AffineTransform& matrix)
{
- if (matrix.b() != 0 || matrix.c() != 0) // Skew.
- return Untransform;
- else if (matrix.a() != 1.0 || matrix.d() != 1.0) // Scale.
- return ScaleTransform;
- else // Nothing interesting.
- return KeepTransform;
+ if (matrix.b() || matrix.c()) // Skew.
+ return TransparencyWin::Untransform;
+ if (matrix.a() != 1.0 || matrix.d() != 1.0) // Scale.
+ return TransparencyWin::ScaleTransform;
+ // Nothing interesting.
+ return TransparencyWin::KeepTransform;
}
+
+ TransparencyWin m_helper;
};
-} // namespace
+} // namespace
static void getNonClientMetrics(NONCLIENTMETRICS* metrics)
{
- static UINT size = WebCore::isVistaOrNewer() ?
+ static UINT size = isVistaOrNewer() ?
sizeof(NONCLIENTMETRICS) : NONCLIENTMETRICS_SIZE_PRE_VISTA;
metrics->cbSize = size;
bool success = !!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, size, metrics, 0);
@@ -139,7 +157,7 @@ static float systemFontSize(const LOGFONT& font)
if (size < 0) {
HFONT hFont = CreateFontIndirect(&font);
if (hFont) {
- HDC hdc = GetDC(0); // What about printing? Is this the right DC?
+ HDC hdc = GetDC(0); // What about printing? Is this the right DC?
if (hdc) {
HGDIOBJ hObject = SelectObject(hdc, hFont);
TEXTMETRIC tm;
@@ -170,8 +188,8 @@ static float pointsToPixels(float points)
{
static float pixelsPerInch = 0.0f;
if (!pixelsPerInch) {
- HDC hdc = GetDC(0); // What about printing? Is this the right DC?
- if (hdc) { // Can this ever actually be NULL?
+ HDC hdc = GetDC(0); // What about printing? Is this the right DC?
+ if (hdc) { // Can this ever actually be NULL?
pixelsPerInch = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(0, hdc);
} else {
@@ -186,7 +204,7 @@ static float pointsToPixels(float points)
static double querySystemBlinkInterval(double defaultInterval)
{
UINT blinkTime = GetCaretBlinkTime();
- if (blinkTime == 0)
+ if (!blinkTime)
return defaultInterval;
if (blinkTime == INFINITE)
return 0;
@@ -216,7 +234,7 @@ bool RenderThemeChromiumWin::supportsFocusRing(const RenderStyle* style) const
Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
{
if (ChromiumBridge::layoutTestMode())
- return Color(0x00, 0x00, 0xff); // Royal blue.
+ return Color(0x00, 0x00, 0xff); // Royal blue.
COLORREF color = GetSysColor(COLOR_HIGHLIGHT);
return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
}
@@ -224,7 +242,7 @@ Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const
Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const
{
if (ChromiumBridge::layoutTestMode())
- return Color(0x99, 0x99, 0x99); // Medium gray.
+ return Color(0x99, 0x99, 0x99); // Medium gray.
COLORREF color = GetSysColor(COLOR_GRAYTEXT);
return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
}
@@ -232,7 +250,7 @@ Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const
Color RenderThemeChromiumWin::platformActiveSelectionForegroundColor() const
{
if (ChromiumBridge::layoutTestMode())
- return Color(0xff, 0xff, 0xcc); // Pale yellow.
+ return Color(0xff, 0xff, 0xcc); // Pale yellow.
COLORREF color = GetSysColor(COLOR_HIGHLIGHTTEXT);
return Color(GetRValue(color), GetGValue(color), GetBValue(color), 0xff);
}
@@ -244,7 +262,7 @@ Color RenderThemeChromiumWin::platformInactiveSelectionForegroundColor() const
Color RenderThemeChromiumWin::platformActiveTextSearchHighlightColor() const
{
- return Color(0xff, 0x96, 0x32); // Orange.
+ return Color(0xff, 0x96, 0x32); // Orange.
}
Color RenderThemeChromiumWin::platformInactiveTextSearchHighlightColor() const
@@ -387,7 +405,7 @@ bool RenderThemeChromiumWin::paintButton(RenderObject* o, const PaintInfo& i, co
{
const ThemeData& themeData = getThemeData(o);
- WebCore::ThemePainter painter(i.context, r);
+ ThemePainter painter(i.context, r);
ChromiumBridge::paintButton(painter.context(),
themeData.m_part,
themeData.m_state,
@@ -405,7 +423,7 @@ bool RenderThemeChromiumWin::paintSliderTrack(RenderObject* o, const PaintInfo&
{
const ThemeData& themeData = getThemeData(o);
- WebCore::ThemePainter painter(i.context, r);
+ ThemePainter painter(i.context, r);
ChromiumBridge::paintTrackbar(painter.context(),
themeData.m_part,
themeData.m_state,
@@ -436,7 +454,7 @@ bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i,
// draw individual borders and then pass that to skia so we can avoid
// drawing any borders that are set to 0. For non-zero borders, we draw the
// border, but webkit just draws over it.
- bool drawEdges = !(borderRight == 0 && borderLeft == 0 && borderTop == 0 && borderBottom == 0);
+ bool drawEdges = !(!borderRight && !borderLeft && !borderTop && !borderBottom);
paintTextFieldInternal(o, i, r, drawEdges);
@@ -462,7 +480,7 @@ bool RenderThemeChromiumWin::paintMenuList(RenderObject* o, const PaintInfo& i,
r.height() - (spacingTop + spacingBottom));
// Get the correct theme data for a textfield and paint the menu.
- WebCore::ThemePainter painter(i.context, rect);
+ ThemePainter painter(i.context, rect);
ChromiumBridge::paintMenuList(painter.context(),
CP_DROPDOWNBUTTON,
determineState(o),
@@ -487,19 +505,20 @@ double RenderThemeChromiumWin::caretBlinkIntervalInternal() const
return blinkInterval;
}
-unsigned RenderThemeChromiumWin::determineState(RenderObject* o)
+unsigned RenderThemeChromiumWin::determineState(RenderObject* o, ControlSubPart subPart)
{
unsigned result = TS_NORMAL;
ControlPart appearance = o->style()->appearance();
if (!isEnabled(o))
result = TS_DISABLED;
- else if (isReadOnlyControl(o) && (TextFieldPart == appearance || TextAreaPart == appearance || SearchFieldPart == appearance))
- result = ETS_READONLY; // Readonly is supported on textfields.
- else if (isPressed(o)) // Active overrides hover and focused.
+ else if (isReadOnlyControl(o))
+ result = (appearance == TextFieldPart || appearance == TextAreaPart || appearance == SearchFieldPart) ? ETS_READONLY : TS_DISABLED;
+ // Active overrides hover and focused.
+ else if (isPressed(o) && (subPart == SpinButtonUp) == isSpinUpButtonPartPressed(o))
result = TS_PRESSED;
else if (supportsFocus(appearance) && isFocused(o))
result = ETS_FOCUSED;
- else if (isHovered(o))
+ else if (isHovered(o) && (subPart == SpinButtonUp) == isSpinUpButtonPartHovered(o))
result = TS_HOT;
// CBS_UNCHECKED*: 1-4
@@ -526,7 +545,7 @@ unsigned RenderThemeChromiumWin::determineSliderThumbState(RenderObject* o)
return result;
}
-unsigned RenderThemeChromiumWin::determineClassicState(RenderObject* o)
+unsigned RenderThemeChromiumWin::determineClassicState(RenderObject* o, ControlSubPart subPart)
{
unsigned result = 0;
@@ -548,13 +567,14 @@ unsigned RenderThemeChromiumWin::determineClassicState(RenderObject* o)
else if (isHovered(o))
result = DFCS_HOT;
} else {
- if (!isEnabled(o))
+ if (!isEnabled(o) || isReadOnlyControl(o))
result = DFCS_INACTIVE;
- else if (isPressed(o)) // Active supersedes hover
+ // Active supersedes hover
+ else if (isPressed(o) && (subPart == SpinButtonUp) == isSpinUpButtonPartPressed(o))
result = DFCS_PUSHED;
else if (supportsFocus(part) && isFocused(o)) // So does focused
result = 0;
- else if (isHovered(o))
+ else if (isHovered(o) && (subPart == SpinButtonUp) == isSpinUpButtonPartHovered(o))
result = DFCS_HOT;
// Classic theme can't represent indeterminate states. Use unchecked appearance.
if (isChecked(o) && !isIndeterminate(o))
@@ -563,7 +583,7 @@ unsigned RenderThemeChromiumWin::determineClassicState(RenderObject* o)
return result;
}
-ThemeData RenderThemeChromiumWin::getThemeData(RenderObject* o)
+ThemeData RenderThemeChromiumWin::getThemeData(RenderObject* o, ControlSubPart subPart)
{
ThemeData result;
switch (o->style()->appearance()) {
@@ -608,9 +628,14 @@ ThemeData RenderThemeChromiumWin::getThemeData(RenderObject* o)
result.m_part = EP_EDITTEXT;
result.m_state = determineState(o);
break;
+ case InnerSpinButtonPart:
+ result.m_part = subPart == SpinButtonUp ? SPNP_UP : SPNP_DOWN;
+ result.m_state = determineState(o, subPart);
+ result.m_classicState = subPart == SpinButtonUp ? DFCS_SCROLLUP : DFCS_SCROLLDOWN;
+ break;
}
- result.m_classicState |= determineClassicState(o);
+ result.m_classicState |= determineClassicState(o, subPart);
return result;
}
@@ -646,7 +671,7 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
}
{
const ThemeData& themeData = getThemeData(o);
- WebCore::ThemePainter painter(i.context, r);
+ ThemePainter painter(i.context, r);
ChromiumBridge::paintTextField(painter.context(),
themeData.m_part,
themeData.m_state,
@@ -662,6 +687,37 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
return false;
}
+void RenderThemeChromiumWin::adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+{
+ int width = ScrollbarTheme::nativeTheme()->scrollbarThickness();
+ style->setWidth(Length(width, Fixed));
+ style->setMinWidth(Length(width, Fixed));
+}
+
+bool RenderThemeChromiumWin::paintInnerSpinButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+{
+ IntRect half = rect;
+
+ half.setHeight(rect.height() / 2);
+ const ThemeData& upThemeData = getThemeData(object, SpinButtonUp);
+ ThemePainter upPainter(info.context, half);
+ ChromiumBridge::paintSpinButton(upPainter.context(),
+ upThemeData.m_part,
+ upThemeData.m_state,
+ upThemeData.m_classicState,
+ upPainter.drawRect());
+
+ half.setY(rect.y() + rect.height() / 2);
+ const ThemeData& downThemeData = getThemeData(object, SpinButtonDown);
+ ThemePainter downPainter(info.context, half);
+ ChromiumBridge::paintSpinButton(downPainter.context(),
+ downThemeData.m_part,
+ downThemeData.m_state,
+ downThemeData.m_classicState,
+ downPainter.drawRect());
+ return false;
+}
+
#if ENABLE(PROGRESS_TAG)
// MSDN says that update intervals for the bar is 30ms.
diff --git a/WebCore/rendering/RenderThemeChromiumWin.h b/WebCore/rendering/RenderThemeChromiumWin.h
index c6c95e6..661b623 100644
--- a/WebCore/rendering/RenderThemeChromiumWin.h
+++ b/WebCore/rendering/RenderThemeChromiumWin.h
@@ -86,6 +86,8 @@ namespace WebCore {
// See comment in RenderThemeChromiumSkia::setDefaultFontSize() regarding ugliness of this hack.
static void setDefaultFontSize(int);
+ virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&);
#if ENABLE(PROGRESS_TAG)
virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const;
@@ -98,14 +100,20 @@ namespace WebCore {
virtual double caretBlinkIntervalInternal() const;
private:
+ enum ControlSubPart {
+ None,
+ SpinButtonDown,
+ SpinButtonUp,
+ };
+
RenderThemeChromiumWin() { }
virtual ~RenderThemeChromiumWin() { }
- unsigned determineState(RenderObject*);
+ unsigned determineState(RenderObject*, ControlSubPart = None);
unsigned determineSliderThumbState(RenderObject*);
- unsigned determineClassicState(RenderObject*);
+ unsigned determineClassicState(RenderObject*, ControlSubPart = None);
- ThemeData getThemeData(RenderObject*);
+ ThemeData getThemeData(RenderObject*, ControlSubPart = None);
bool paintTextFieldInternal(RenderObject*, const PaintInfo&, const IntRect&, bool);
};
diff --git a/WebCore/rendering/RenderThemeMac.mm b/WebCore/rendering/RenderThemeMac.mm
index bbf6906..cc2ff1f 100644
--- a/WebCore/rendering/RenderThemeMac.mm
+++ b/WebCore/rendering/RenderThemeMac.mm
@@ -826,6 +826,8 @@ bool RenderThemeMac::paintMeter(RenderObject* renderObject, const PaintInfo& pai
if (!renderObject->isMeter())
return true;
+ LocalCurrentGraphicsContext localContext(paintInfo.context);
+
// Becaue NSLevelIndicatorCell doesn't support vertical gauge, we use a portable version
if (rect.width() < rect.height())
return RenderTheme::paintMeter(renderObject, paintInfo, rect);
@@ -1379,8 +1381,8 @@ bool RenderThemeMac::paintSliderThumb(RenderObject* o, const PaintInfo& paintInf
bool RenderThemeMac::paintSearchField(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
- NSSearchFieldCell* search = this->search();
LocalCurrentGraphicsContext localContext(paintInfo.context);
+ NSSearchFieldCell* search = this->search();
setSearchCellState(o, r);
@@ -1480,6 +1482,7 @@ bool RenderThemeMac::paintSearchFieldCancelButton(RenderObject* o, const PaintIn
if (!input->renderer()->isBox())
return false;
+ LocalCurrentGraphicsContext localContext(paintInfo.context);
setSearchCellState(input->renderer(), r);
NSSearchFieldCell* search = this->search();
@@ -1562,12 +1565,13 @@ void RenderThemeMac::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*,
style->setBoxShadow(0);
}
-bool RenderThemeMac::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo&, const IntRect& r)
+bool RenderThemeMac::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
Node* input = o->node()->shadowAncestorNode();
if (!input->renderer()->isBox())
return false;
+ LocalCurrentGraphicsContext localContext(paintInfo.context);
setSearchCellState(input->renderer(), r);
NSSearchFieldCell* search = this->search();
@@ -1600,6 +1604,7 @@ bool RenderThemeMac::paintSearchFieldResultsButton(RenderObject* o, const PaintI
if (!input->renderer()->isBox())
return false;
+ LocalCurrentGraphicsContext localContext(paintInfo.context);
setSearchCellState(input->renderer(), r);
NSSearchFieldCell* search = this->search();
diff --git a/WebCore/rendering/RenderTreeAsText.cpp b/WebCore/rendering/RenderTreeAsText.cpp
index 26f40ab..408015c 100644
--- a/WebCore/rendering/RenderTreeAsText.cpp
+++ b/WebCore/rendering/RenderTreeAsText.cpp
@@ -234,9 +234,9 @@ void RenderTreeAsText::writeRenderObject(TextStream& ts, const RenderObject& o,
ts << " " << r;
if (!(o.isText() && !o.isBR())) {
- if (o.isFileUploadControl()) {
+ if (o.isFileUploadControl())
ts << " " << quoteAndEscapeNonPrintables(toRenderFileUploadControl(&o)->fileTextValue());
- }
+
if (o.parent() && (o.parent()->style()->color() != o.style()->color()))
ts << " [color=" << o.style()->color().name() << "]";
@@ -355,6 +355,24 @@ void RenderTreeAsText::writeRenderObject(TextStream& ts, const RenderObject& o,
ts << ": " << text;
}
}
+
+ if (behavior & RenderAsTextShowIDAndClass) {
+ if (Node* node = o.node()) {
+ if (node->hasID())
+ ts << " id=\"" + static_cast<Element*>(node)->getIdAttribute() + "\"";
+
+ if (node->hasClass()) {
+ StyledElement* styledElement = static_cast<StyledElement*>(node);
+ String classes;
+ for (size_t i = 0; i < styledElement->classNames().size(); ++i) {
+ if (i > 0)
+ classes += " ";
+ classes += styledElement->classNames()[i];
+ }
+ ts << " class=\"" + classes + "\"";
+ }
+ }
+ }
#if PLATFORM(QT)
// Print attributes of embedded QWidgets. E.g. when the WebCore::Widget
@@ -580,6 +598,7 @@ static String nodePosition(Node* node)
{
String result;
+ Element* body = node->document()->body();
Node* parent;
for (Node* n = node; n; n = parent) {
parent = n->parentNode();
@@ -587,9 +606,14 @@ static String nodePosition(Node* node)
parent = n->shadowParentNode();
if (n != node)
result += " of ";
- if (parent)
+ if (parent) {
+ if (body && n == body) {
+ // We don't care what offset body may be in the document.
+ result += "body";
+ break;
+ }
result += "child " + String::number(n->nodeIndex()) + " {" + getTagName(n) + "}";
- else
+ } else
result += "document";
}
diff --git a/WebCore/rendering/RenderTreeAsText.h b/WebCore/rendering/RenderTreeAsText.h
index 1635e79..645ccc0 100644
--- a/WebCore/rendering/RenderTreeAsText.h
+++ b/WebCore/rendering/RenderTreeAsText.h
@@ -40,7 +40,8 @@ enum RenderAsTextBehaviorFlags {
RenderAsTextShowLayerNesting = 1 << 1, // Annotate the layer lists.
RenderAsTextShowCompositedLayers = 1 << 2, // Show which layers are composited.
RenderAsTextShowAddresses = 1 << 3, // Show layer and renderer addresses.
- RenderAsTextPrintingMode = 1 << 4 // Dump the tree in printing mode.
+ RenderAsTextShowIDAndClass = 1 << 4, // Show id and class attributes
+ RenderAsTextPrintingMode = 1 << 5 // Dump the tree in printing mode.
};
typedef unsigned RenderAsTextBehavior;
diff --git a/WebCore/rendering/RenderView.cpp b/WebCore/rendering/RenderView.cpp
index 232dd5d..449c15c 100644
--- a/WebCore/rendering/RenderView.cpp
+++ b/WebCore/rendering/RenderView.cpp
@@ -456,13 +456,15 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
if ((os->canBeSelectionLeaf() || os == m_selectionStart || os == m_selectionEnd) && os->selectionState() != SelectionNone) {
// Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
oldSelectedObjects.set(os, new RenderSelectionInfo(os, true));
- RenderBlock* cb = os->containingBlock();
- while (cb && !cb->isRenderView()) {
- RenderBlockSelectionInfo* blockInfo = oldSelectedBlocks.get(cb);
- if (blockInfo)
- break;
- oldSelectedBlocks.set(cb, new RenderBlockSelectionInfo(cb));
- cb = cb->containingBlock();
+ if (blockRepaintMode == RepaintNewXOROld) {
+ RenderBlock* cb = os->containingBlock();
+ while (cb && !cb->isRenderView()) {
+ RenderBlockSelectionInfo* blockInfo = oldSelectedBlocks.get(cb);
+ if (blockInfo)
+ break;
+ oldSelectedBlocks.set(cb, new RenderBlockSelectionInfo(cb));
+ cb = cb->containingBlock();
+ }
}
}
@@ -565,8 +567,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
RenderBlockSelectionInfo* newInfo = newSelectedBlocks.get(block);
RenderBlockSelectionInfo* oldInfo = i->second;
if (!newInfo || oldInfo->rects() != newInfo->rects() || oldInfo->state() != newInfo->state()) {
- if (blockRepaintMode == RepaintNewXOROld)
- oldInfo->repaint();
+ oldInfo->repaint();
if (newInfo) {
newInfo->repaint();
newSelectedBlocks.remove(block);
diff --git a/WebCore/rendering/TextControlInnerElements.cpp b/WebCore/rendering/TextControlInnerElements.cpp
index 36e30af..24e1d74 100644
--- a/WebCore/rendering/TextControlInnerElements.cpp
+++ b/WebCore/rendering/TextControlInnerElements.cpp
@@ -36,8 +36,10 @@
#include "HTMLNames.h"
#include "HTMLTextAreaElement.h"
#include "MouseEvent.h"
+#include "Page.h"
#include "RenderLayer.h"
#include "RenderTextControlSingleLine.h"
+#include "SpeechInput.h"
namespace WebCore {
@@ -246,7 +248,7 @@ void SearchFieldCancelButtonElement::defaultEventHandler(Event* event)
inline SpinButtonElement::SpinButtonElement(Node* shadowParent)
: TextControlInnerElement(shadowParent->document(), shadowParent)
, m_capturing(false)
- , m_onUpButton(false)
+ , m_upDownState(Indeterminate)
{
}
@@ -278,12 +280,19 @@ void SpinButtonElement::defaultEventHandler(Event* event)
}
HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode());
+ if (input->disabled() || input->isReadOnlyFormControl()) {
+ if (!event->defaultHandled())
+ HTMLDivElement::defaultEventHandler(event);
+ return;
+ }
+
IntPoint local = roundedIntPoint(box->absoluteToLocal(mouseEvent->absoluteLocation(), false, true));
if (event->type() == eventNames().clickEvent) {
if (box->borderBoxRect().contains(local)) {
+ RefPtr<Node> protector(input);
input->focus();
input->select();
- if (local.y() < box->y() + box->height() / 2)
+ if (local.y() < box->height() / 2)
input->stepUpFromRenderer(1);
else
input->stepUpFromRenderer(-1);
@@ -297,9 +306,9 @@ void SpinButtonElement::defaultEventHandler(Event* event)
m_capturing = true;
}
}
- bool oldOnUpButton = m_onUpButton;
- m_onUpButton = local.y() < box->y() + box->height() / 2;
- if (m_onUpButton != oldOnUpButton)
+ UpDownState oldUpDownState = m_upDownState;
+ m_upDownState = local.y() < box->height() / 2 ? Up : Down;
+ if (m_upDownState != oldUpDownState)
renderer()->repaint();
} else {
if (m_capturing) {
@@ -315,12 +324,21 @@ void SpinButtonElement::defaultEventHandler(Event* event)
HTMLDivElement::defaultEventHandler(event);
}
+void SpinButtonElement::setHovered(bool flag)
+{
+ if (!hovered() && flag)
+ m_upDownState = Indeterminate;
+ TextControlInnerElement::setHovered(flag);
+}
+
+
// ----------------------------
#if ENABLE(INPUT_SPEECH)
inline InputFieldSpeechButtonElement::InputFieldSpeechButtonElement(Document* document)
: TextControlInnerElement(document)
+ , m_capturing(false)
{
}
@@ -331,8 +349,73 @@ PassRefPtr<InputFieldSpeechButtonElement> InputFieldSpeechButtonElement::create(
void InputFieldSpeechButtonElement::defaultEventHandler(Event* event)
{
- // FIXME: Start speech recognition here.
- HTMLDivElement::defaultEventHandler(event);
+ // On mouse down, select the text and set focus.
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode());
+ if (event->type() == eventNames().mousedownEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) {
+ if (renderer() && renderer()->visibleToHitTesting()) {
+ if (Frame* frame = document()->frame()) {
+ frame->eventHandler()->setCapturingMouseEventsNode(this);
+ m_capturing = true;
+ }
+ }
+ // The call to focus() below dispatches a focus event, and an event handler in the page might
+ // remove the input element from DOM. To make sure it remains valid until we finish our work
+ // here, we take a temporary reference.
+ RefPtr<HTMLInputElement> holdRef(input);
+ input->focus();
+ input->select();
+ event->setDefaultHandled();
+ }
+ // On mouse up, start speech recognition.
+ if (event->type() == eventNames().mouseupEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) {
+ if (m_capturing && renderer() && renderer()->visibleToHitTesting()) {
+ if (Frame* frame = document()->frame()) {
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
+ m_capturing = false;
+ }
+ if (hovered()) {
+ speechInput()->startRecognition();
+ event->setDefaultHandled();
+ }
+ }
+ }
+
+ if (!event->defaultHandled())
+ HTMLDivElement::defaultEventHandler(event);
+}
+
+SpeechInput* InputFieldSpeechButtonElement::speechInput()
+{
+ if (!m_speechInput)
+ m_speechInput.set(new SpeechInput(document()->page()->speechInputClient(), this));
+ return m_speechInput.get();
+}
+
+void InputFieldSpeechButtonElement::recordingComplete()
+{
+ // FIXME: Add UI feedback here to indicate that audio recording stopped and recognition is
+ // in progress.
+}
+
+void InputFieldSpeechButtonElement::setRecognitionResult(const String& result)
+{
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode());
+ // The call to setValue() below dispatches an event, and an event handler in the page might
+ // remove the input element from DOM. To make sure it remains valid until we finish our work
+ // here, we take a temporary reference.
+ RefPtr<HTMLInputElement> holdRef(input);
+ input->setValue(result);
+ input->dispatchFormControlChangeEvent();
+ renderer()->repaint();
+}
+
+void InputFieldSpeechButtonElement::detach()
+{
+ if (m_capturing) {
+ if (Frame* frame = document()->frame())
+ frame->eventHandler()->setCapturingMouseEventsNode(0);
+ }
+ TextControlInnerElement::detach();
}
#endif // ENABLE(INPUT_SPEECH)
diff --git a/WebCore/rendering/TextControlInnerElements.h b/WebCore/rendering/TextControlInnerElements.h
index 1884a34..68d6ff4 100644
--- a/WebCore/rendering/TextControlInnerElements.h
+++ b/WebCore/rendering/TextControlInnerElements.h
@@ -28,9 +28,11 @@
#define TextControlInnerElements_h
#include "HTMLDivElement.h"
+#include "SpeechInputListener.h"
namespace WebCore {
+class SpeechInput;
class String;
class TextControlInnerElement : public HTMLDivElement {
@@ -88,33 +90,50 @@ private:
class SpinButtonElement : public TextControlInnerElement {
public:
- static PassRefPtr<SpinButtonElement> create(Node*);
+ enum UpDownState {
+ Indeterminate, // Hovered, but the event is not handled.
+ Down,
+ Up,
+ };
- // FIXME: "Spin button on up button" is not a phrase with a single clear meaning.
- // Need a name for this that makes it clearer.
- bool onUpButton() const { return m_onUpButton; }
+ static PassRefPtr<SpinButtonElement> create(Node*);
+ UpDownState upDownState() const { return m_upDownState; }
private:
SpinButtonElement(Node*);
virtual bool isSpinButtonElement() const { return true; }
- virtual bool isEnabledFormControl() { return static_cast<Element*>(shadowAncestorNode())->isEnabledFormControl(); }
+ // FIXME: shadowAncestorNode() should be const.
+ virtual bool isEnabledFormControl() const { return static_cast<Element*>(const_cast<SpinButtonElement*>(this)->shadowAncestorNode())->isEnabledFormControl(); }
+ virtual bool isReadOnlyFormControl() const { return static_cast<Element*>(const_cast<SpinButtonElement*>(this)->shadowAncestorNode())->isReadOnlyFormControl(); }
virtual void defaultEventHandler(Event*);
+ virtual void setHovered(bool = true);
bool m_capturing;
- bool m_onUpButton;
+ UpDownState m_upDownState;
};
#if ENABLE(INPUT_SPEECH)
-class InputFieldSpeechButtonElement : public TextControlInnerElement {
+class InputFieldSpeechButtonElement
+ : public TextControlInnerElement,
+ public SpeechInputListener {
public:
static PassRefPtr<InputFieldSpeechButtonElement> create(Document*);
virtual void defaultEventHandler(Event*);
+ // SpeechInputListener methods.
+ void recordingComplete();
+ void setRecognitionResult(const String& result);
+
private:
InputFieldSpeechButtonElement(Document*);
+ virtual void detach();
+ SpeechInput* speechInput();
+
+ bool m_capturing;
+ OwnPtr<SpeechInput> m_speechInput;
};
#endif // ENABLE(INPUT_SPEECH)
diff --git a/WebCore/rendering/style/FillLayer.cpp b/WebCore/rendering/style/FillLayer.cpp
index 59f3bb2..3469e97 100644
--- a/WebCore/rendering/style/FillLayer.cpp
+++ b/WebCore/rendering/style/FillLayer.cpp
@@ -129,17 +129,6 @@ bool FillLayer::operator==(const FillLayer& o) const
void FillLayer::fillUnsetProperties()
{
FillLayer* curr;
- for (curr = this; curr && curr->isImageSet(); curr = curr->next()) { }
- if (curr && curr != this) {
- // We need to fill in the remaining values with the pattern specified.
- for (FillLayer* pattern = this; curr; curr = curr->next()) {
- curr->m_image = pattern->m_image;
- pattern = pattern->next();
- if (pattern == curr || !pattern)
- pattern = this;
- }
- }
-
for (curr = this; curr && curr->isXPositionSet(); curr = curr->next()) { }
if (curr && curr != this) {
// We need to fill in the remaining values with the pattern specified.
@@ -243,15 +232,27 @@ void FillLayer::fillUnsetProperties()
void FillLayer::cullEmptyLayers()
{
+ // CSS3 background layering: the number of background layers is determined
+ // by the number of values in the 'background-image' property.
+ // http://www.w3.org/TR/css3-background/#layering
+
FillLayer* next;
for (FillLayer* p = this; p; p = next) {
next = p->m_next;
- if (next && !next->isImageSet() &&
- !next->isXPositionSet() && !next->isYPositionSet() &&
- !next->isAttachmentSet() && !next->isClipSet() &&
- !next->isCompositeSet() && !next->isOriginSet() &&
- !next->isRepeatXSet() && !next->isRepeatYSet()
- && !next->isSizeSet()) {
+ if (!next)
+ break;
+
+ bool anyAttributeSet = next->isXPositionSet()
+ || next->isYPositionSet()
+ || next->isAttachmentSet()
+ || next->isClipSet()
+ || next->isCompositeSet()
+ || next->isOriginSet()
+ || next->isRepeatXSet()
+ || next->isRepeatYSet()
+ || next->isSizeSet();
+
+ if (!next->isImageSet() || !anyAttributeSet) {
delete next;
p->m_next = 0;
break;
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 782508e..58af7cf 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -876,8 +876,8 @@ public:
void adjustBackgroundLayers()
{
if (backgroundLayers()->next()) {
- accessBackgroundLayers()->cullEmptyLayers();
accessBackgroundLayers()->fillUnsetProperties();
+ accessBackgroundLayers()->cullEmptyLayers();
}
}
@@ -887,8 +887,8 @@ public:
void adjustMaskLayers()
{
if (maskLayers()->next()) {
- accessMaskLayers()->cullEmptyLayers();
accessMaskLayers()->fillUnsetProperties();
+ accessMaskLayers()->cullEmptyLayers();
}
}
diff --git a/WebCore/storage/AbstractDatabase.cpp b/WebCore/storage/AbstractDatabase.cpp
index ca9a1b5..bcc5d06 100644
--- a/WebCore/storage/AbstractDatabase.cpp
+++ b/WebCore/storage/AbstractDatabase.cpp
@@ -32,7 +32,6 @@
#if ENABLE(DATABASE)
#include "DatabaseAuthorizer.h"
#include "DatabaseTracker.h"
-#include "ExceptionCode.h"
#include "Logging.h"
#include "SQLiteStatement.h"
#include "ScriptExecutionContext.h"
@@ -462,6 +461,19 @@ void AbstractDatabase::resetAuthorizer()
m_databaseAuthorizer->reset();
}
+unsigned long long AbstractDatabase::maximumSize() const
+{
+ return DatabaseTracker::tracker().getMaxSizeForDatabase(this);
+}
+
+void AbstractDatabase::incrementalVacuumIfNeeded()
+{
+ int64_t freeSpaceSize = m_sqliteDatabase.freeSpaceSize();
+ int64_t totalSize = m_sqliteDatabase.totalSize();
+ if (totalSize <= 10 * freeSpaceSize)
+ m_sqliteDatabase.runIncrementalVacuumCommand();
+}
+
} // namespace WebCore
#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/AbstractDatabase.h b/WebCore/storage/AbstractDatabase.h
index d38a819..e302909 100644
--- a/WebCore/storage/AbstractDatabase.h
+++ b/WebCore/storage/AbstractDatabase.h
@@ -31,6 +31,7 @@
#if ENABLE(DATABASE)
+#include "ExceptionCode.h"
#include "PlatformString.h"
#include "SQLiteDatabase.h"
#include <wtf/Forward.h>
@@ -45,8 +46,6 @@ class DatabaseAuthorizer;
class ScriptExecutionContext;
class SecurityOrigin;
-typedef int ExceptionCode;
-
class AbstractDatabase : public ThreadSafeShared<AbstractDatabase> {
public:
static bool isAvailable();
@@ -65,6 +64,10 @@ public:
virtual String displayName() const;
virtual unsigned long estimatedSize() const;
virtual String fileName() const;
+ SQLiteDatabase& sqliteDatabase() { return m_sqliteDatabase; }
+
+ unsigned long long maximumSize() const;
+ void incrementalVacuumIfNeeded();
// FIXME: move all version-related methods to a DatabaseVersionTracker class
bool versionMatchesExpected() const;
@@ -103,8 +106,6 @@ protected:
unsigned long m_estimatedSize;
String m_filename;
- SQLiteDatabase m_sqliteDatabase;
-
#ifndef NDEBUG
String databaseDebugName() const { return m_contextThreadSecurityOrigin->toString() + "::" + m_name; }
#endif
@@ -116,6 +117,8 @@ private:
bool m_opened;
bool m_new;
+ SQLiteDatabase m_sqliteDatabase;
+
RefPtr<DatabaseAuthorizer> m_databaseAuthorizer;
};
diff --git a/WebCore/storage/ChangeVersionWrapper.cpp b/WebCore/storage/ChangeVersionWrapper.cpp
index 66ca63f..17be716 100644
--- a/WebCore/storage/ChangeVersionWrapper.cpp
+++ b/WebCore/storage/ChangeVersionWrapper.cpp
@@ -50,13 +50,13 @@ bool ChangeVersionWrapper::performPreflight(SQLTransaction* transaction)
if (!transaction->database()->getVersionFromDatabase(actualVersion)) {
LOG_ERROR("Unable to retrieve actual current version from database");
- m_sqlError = SQLError::create(0, "unable to verify current version of database");
+ m_sqlError = SQLError::create(SQLError::UNKNOWN_ERR, "unable to verify current version of database");
return false;
}
if (actualVersion != m_oldVersion) {
LOG_ERROR("Old version doesn't match actual version");
- m_sqlError = SQLError::create(2, "current version of the database and `oldVersion` argument do not match");
+ m_sqlError = SQLError::create(SQLError::VERSION_ERR, "current version of the database and `oldVersion` argument do not match");
return false;
}
@@ -69,7 +69,7 @@ bool ChangeVersionWrapper::performPostflight(SQLTransaction* transaction)
if (!transaction->database()->setVersionInDatabase(m_newVersion)) {
LOG_ERROR("Unable to set new version in database");
- m_sqlError = SQLError::create(0, "unable to set new version in database");
+ m_sqlError = SQLError::create(SQLError::UNKNOWN_ERR, "unable to set new version in database");
return false;
}
diff --git a/WebCore/storage/Database.cpp b/WebCore/storage/Database.cpp
index 30087ee..69f5036 100644
--- a/WebCore/storage/Database.cpp
+++ b/WebCore/storage/Database.cpp
@@ -36,7 +36,6 @@
#include "DatabaseThread.h"
#include "DatabaseTracker.h"
#include "Document.h"
-#include "ExceptionCode.h"
#include "InspectorController.h"
#include "Logging.h"
#include "NotImplemented.h"
@@ -141,25 +140,37 @@ Database::Database(ScriptExecutionContext* context, const String& name, const St
class DerefContextTask : public ScriptExecutionContext::Task {
public:
- static PassOwnPtr<DerefContextTask> create()
+ static PassOwnPtr<DerefContextTask> create(PassRefPtr<ScriptExecutionContext> context)
{
- return new DerefContextTask();
+ return new DerefContextTask(context);
}
virtual void performTask(ScriptExecutionContext* context)
{
- context->deref();
+ ASSERT_UNUSED(context, context == m_context);
+ m_context.clear();
}
virtual bool isCleanupTask() const { return true; }
+
+private:
+ DerefContextTask(PassRefPtr<ScriptExecutionContext> context)
+ : m_context(context)
+ {
+ }
+
+ RefPtr<ScriptExecutionContext> m_context;
};
Database::~Database()
{
// The reference to the ScriptExecutionContext needs to be cleared on the JavaScript thread. If we're on that thread already, we can just let the RefPtr's destruction do the dereffing.
if (!m_scriptExecutionContext->isContextThread()) {
- m_scriptExecutionContext->postTask(DerefContextTask::create());
- m_scriptExecutionContext.release().releaseRef();
+ // Grab a pointer to the script execution here because we're releasing it when we pass it to
+ // DerefContextTask::create.
+ ScriptExecutionContext* scriptExecutionContext = m_scriptExecutionContext.get();
+
+ scriptExecutionContext->postTask(DerefContextTask::create(m_scriptExecutionContext.release()));
}
}
@@ -336,7 +347,7 @@ Vector<String> Database::performGetTableNames()
{
disableAuthorizer();
- SQLiteStatement statement(m_sqliteDatabase, "SELECT name FROM sqlite_master WHERE type='table';");
+ SQLiteStatement statement(sqliteDatabase(), "SELECT name FROM sqlite_master WHERE type='table';");
if (statement.prepare() != SQLResultOk) {
LOG_ERROR("Unable to retrieve list of tables for database %s", databaseDebugName().ascii().data());
enableAuthorizer();
@@ -397,14 +408,6 @@ SecurityOrigin* Database::securityOrigin() const
return 0;
}
-void Database::incrementalVacuumIfNeeded()
-{
- int64_t freeSpaceSize = m_sqliteDatabase.freeSpaceSize();
- int64_t totalSize = m_sqliteDatabase.totalSize();
- if (totalSize <= 10 * freeSpaceSize)
- m_sqliteDatabase.runIncrementalVacuumCommand();
-}
-
} // namespace WebCore
#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/Database.h b/WebCore/storage/Database.h
index 22ef55e..e8482a7 100644
--- a/WebCore/storage/Database.h
+++ b/WebCore/storage/Database.h
@@ -31,8 +31,8 @@
#if ENABLE(DATABASE)
#include "AbstractDatabase.h"
+#include "ExceptionCode.h"
#include "PlatformString.h"
-#include "SQLiteDatabase.h"
#include <wtf/Deque.h>
#include <wtf/Forward.h>
@@ -66,7 +66,6 @@ public:
Vector<String> tableNames();
virtual SecurityOrigin* securityOrigin() const;
- SQLiteDatabase& sqliteDatabase() { return m_sqliteDatabase; }
virtual void markAsDeletedAndClose();
bool deleted() const { return m_deleted; }
@@ -83,8 +82,6 @@ public:
SQLTransactionClient* transactionClient() const;
SQLTransactionCoordinator* transactionCoordinator() const;
- void incrementalVacuumIfNeeded();
-
private:
class DatabaseOpenTask;
class DatabaseCloseTask;
diff --git a/WebCore/storage/DatabaseAuthorizer.cpp b/WebCore/storage/DatabaseAuthorizer.cpp
index d155d6c..17abebd 100644
--- a/WebCore/storage/DatabaseAuthorizer.cpp
+++ b/WebCore/storage/DatabaseAuthorizer.cpp
@@ -290,7 +290,7 @@ int DatabaseAuthorizer::createVTable(const String& tableName, const String& modu
return SQLAuthDeny;
// Allow only the FTS3 extension
- if (moduleName != "fts3")
+ if (!equalIgnoringCase(moduleName, "fts3"))
return SQLAuthDeny;
m_lastActionChangedDatabase = true;
@@ -303,7 +303,7 @@ int DatabaseAuthorizer::dropVTable(const String& tableName, const String& module
return SQLAuthDeny;
// Allow only the FTS3 extension
- if (moduleName != "fts3")
+ if (!equalIgnoringCase(moduleName, "fts3"))
return SQLAuthDeny;
return updateDeletesBasedOnTableName(tableName);
diff --git a/WebCore/storage/DatabaseCallback.h b/WebCore/storage/DatabaseCallback.h
index dfdc038..9ece2a3 100644
--- a/WebCore/storage/DatabaseCallback.h
+++ b/WebCore/storage/DatabaseCallback.h
@@ -33,7 +33,7 @@
#if ENABLE(DATABASE)
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
diff --git a/WebCore/storage/DatabaseSync.cpp b/WebCore/storage/DatabaseSync.cpp
index 8de9680..f64c27f 100644
--- a/WebCore/storage/DatabaseSync.cpp
+++ b/WebCore/storage/DatabaseSync.cpp
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -32,8 +34,9 @@
#if ENABLE(DATABASE)
#include "DatabaseCallback.h"
#include "DatabaseTracker.h"
-#include "ExceptionCode.h"
#include "Logging.h"
+#include "SQLException.h"
+#include "SQLTransactionSync.h"
#include "SQLTransactionSyncCallback.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
@@ -87,14 +90,56 @@ DatabaseSync::~DatabaseSync()
}
}
-void DatabaseSync::changeVersion(const String&, const String&, PassRefPtr<SQLTransactionSyncCallback>, ExceptionCode&)
+void DatabaseSync::changeVersion(const String& oldVersion, const String& newVersion, PassRefPtr<SQLTransactionSyncCallback> changeVersionCallback, ExceptionCode& ec)
{
ASSERT(m_scriptExecutionContext->isContextThread());
+
+ if (sqliteDatabase().transactionInProgress()) {
+ ec = SQLException::DATABASE_ERR;
+ return;
+ }
+
+ RefPtr<SQLTransactionSync> transaction = SQLTransactionSync::create(this, changeVersionCallback, false);
+ if ((ec = transaction->begin()))
+ return;
+
+ String actualVersion;
+ if (!getVersionFromDatabase(actualVersion)) {
+ ec = SQLException::UNKNOWN_ERR;
+ return;
+ }
+
+ if (actualVersion != oldVersion) {
+ ec = SQLException::VERSION_ERR;
+ return;
+ }
+
+ if ((ec = transaction->execute()))
+ return;
+
+ if (!setVersionInDatabase(newVersion)) {
+ ec = SQLException::UNKNOWN_ERR;
+ return;
+ }
+
+ if ((ec = transaction->commit()))
+ return;
+
+ setExpectedVersion(newVersion);
}
-void DatabaseSync::transaction(PassRefPtr<SQLTransactionSyncCallback>, bool, ExceptionCode&)
+void DatabaseSync::transaction(PassRefPtr<SQLTransactionSyncCallback> callback, bool readOnly, ExceptionCode& ec)
{
ASSERT(m_scriptExecutionContext->isContextThread());
+
+ if (sqliteDatabase().transactionInProgress()) {
+ ec = SQLException::DATABASE_ERR;
+ return;
+ }
+
+ RefPtr<SQLTransactionSync> transaction = SQLTransactionSync::create(this, callback, readOnly);
+ if ((ec = transaction->begin()) || (ec = transaction->execute()) || (ec = transaction->commit()))
+ transaction->rollback();
}
void DatabaseSync::markAsDeletedAndClose()
diff --git a/WebCore/storage/DatabaseSync.h b/WebCore/storage/DatabaseSync.h
index 96b4f7d..2019f85 100644
--- a/WebCore/storage/DatabaseSync.h
+++ b/WebCore/storage/DatabaseSync.h
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * 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 DatabaseSync_h
@@ -31,6 +33,7 @@
#if ENABLE(DATABASE)
#include "AbstractDatabase.h"
+#include "ExceptionCode.h"
#include "PlatformString.h"
#include <wtf/Forward.h>
#ifndef NDEBUG
@@ -40,6 +43,7 @@
namespace WebCore {
class DatabaseCallback;
+class SQLTransactionSync;
class SQLTransactionSyncCallback;
class ScriptExecutionContext;
class SecurityOrigin;
diff --git a/WebCore/storage/DatabaseSync.idl b/WebCore/storage/DatabaseSync.idl
index 29b87a7..30adf38 100644
--- a/WebCore/storage/DatabaseSync.idl
+++ b/WebCore/storage/DatabaseSync.idl
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * 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.
*/
module storage {
diff --git a/WebCore/storage/DatabaseTracker.cpp b/WebCore/storage/DatabaseTracker.cpp
index 8d23a4f..de38ec3 100644
--- a/WebCore/storage/DatabaseTracker.cpp
+++ b/WebCore/storage/DatabaseTracker.cpp
@@ -221,7 +221,6 @@ bool DatabaseTracker::hasEntryForDatabase(SecurityOrigin* origin, const String&
unsigned long long DatabaseTracker::getMaxSizeForDatabase(const AbstractDatabase* database)
{
- ASSERT(currentThread() == database->scriptExecutionContext()->databaseThread()->getThreadID());
// The maximum size for a database is the full quota for its origin, minus the current usage within the origin,
// plus the current usage of the given database
MutexLocker lockDatabase(m_databaseGuard);
diff --git a/WebCore/storage/IDBAny.h b/WebCore/storage/IDBAny.h
index ff2d6b9..77bba7c 100644
--- a/WebCore/storage/IDBAny.h
+++ b/WebCore/storage/IDBAny.h
@@ -44,6 +44,13 @@ class SerializedScriptValue;
class IDBAny : public RefCounted<IDBAny> {
public:
static PassRefPtr<IDBAny> create();
+ template<typename T>
+ static PassRefPtr<IDBAny> create(T* idbObject)
+ {
+ RefPtr<IDBAny> any = IDBAny::create();
+ any->set(idbObject);
+ return any.release();
+ }
~IDBAny();
enum Type {
diff --git a/WebCore/storage/IDBDatabaseRequest.cpp b/WebCore/storage/IDBDatabaseRequest.cpp
index 3168d06..fce2671 100644
--- a/WebCore/storage/IDBDatabaseRequest.cpp
+++ b/WebCore/storage/IDBDatabaseRequest.cpp
@@ -39,10 +39,8 @@ namespace WebCore {
IDBDatabaseRequest::IDBDatabaseRequest(PassRefPtr<IDBDatabase> database)
: m_database(database)
{
- m_this = IDBAny::create();
// We pass a reference to this object before it can be adopted.
relaxAdoptionRequirement();
- m_this->set(this);
}
IDBDatabaseRequest::~IDBDatabaseRequest()
@@ -51,7 +49,7 @@ IDBDatabaseRequest::~IDBDatabaseRequest()
PassRefPtr<IDBRequest> IDBDatabaseRequest::createObjectStore(ScriptExecutionContext* context, const String& name, const String& keyPath, bool autoIncrement)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_database->createObjectStore(name, keyPath, autoIncrement, request);
return request;
}
@@ -65,7 +63,7 @@ PassRefPtr<IDBObjectStoreRequest> IDBDatabaseRequest::objectStore(const String&
PassRefPtr<IDBRequest> IDBDatabaseRequest::removeObjectStore(ScriptExecutionContext* context, const String& name)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_database->removeObjectStore(name, request);
return request;
}
diff --git a/WebCore/storage/IDBDatabaseRequest.h b/WebCore/storage/IDBDatabaseRequest.h
index 23b1ecc..fd19882 100644
--- a/WebCore/storage/IDBDatabaseRequest.h
+++ b/WebCore/storage/IDBDatabaseRequest.h
@@ -63,7 +63,6 @@ private:
IDBDatabaseRequest(PassRefPtr<IDBDatabase>);
RefPtr<IDBDatabase> m_database;
- RefPtr<IDBAny> m_this;
};
} // namespace WebCore
diff --git a/WebCore/storage/IDBKeyRange.cpp b/WebCore/storage/IDBKeyRange.cpp
index 34c11fe..9f22fc8 100644
--- a/WebCore/storage/IDBKeyRange.cpp
+++ b/WebCore/storage/IDBKeyRange.cpp
@@ -34,12 +34,10 @@
namespace WebCore {
IDBKeyRange::IDBKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags)
- : m_left(IDBAny::create())
- , m_right(IDBAny::create())
+ : m_left(left)
+ , m_right(right)
, m_flags(flags)
{
- m_left->set(left);
- m_right->set(right);
}
} // namespace WebCore
diff --git a/WebCore/storage/IDBKeyRange.h b/WebCore/storage/IDBKeyRange.h
index 4c5efe2..52239e4 100644
--- a/WebCore/storage/IDBKeyRange.h
+++ b/WebCore/storage/IDBKeyRange.h
@@ -53,15 +53,15 @@ public:
~IDBKeyRange() { }
- PassRefPtr<IDBAny> left() const { return m_left; }
- PassRefPtr<IDBAny> right() const { return m_right; }
+ PassRefPtr<IDBAny> left() const { return IDBAny::create(m_left.get()); }
+ PassRefPtr<IDBAny> right() const { return IDBAny::create(m_right.get()); }
unsigned short flags() const { return m_flags; }
private:
IDBKeyRange(PassRefPtr<SerializedScriptValue> left, PassRefPtr<SerializedScriptValue> right, unsigned short flags);
- RefPtr<IDBAny> m_left;
- RefPtr<IDBAny> m_right;
+ RefPtr<SerializedScriptValue> m_left;
+ RefPtr<SerializedScriptValue> m_right;
unsigned short m_flags;
};
diff --git a/WebCore/storage/IDBObjectStoreRequest.cpp b/WebCore/storage/IDBObjectStoreRequest.cpp
index fdd498b..3e095c1 100644
--- a/WebCore/storage/IDBObjectStoreRequest.cpp
+++ b/WebCore/storage/IDBObjectStoreRequest.cpp
@@ -40,10 +40,8 @@ namespace WebCore {
IDBObjectStoreRequest::IDBObjectStoreRequest(PassRefPtr<IDBObjectStore> idbObjectStore)
: m_objectStore(idbObjectStore)
{
- m_this = IDBAny::create();
// We pass a reference to this object before it can be adopted.
relaxAdoptionRequirement();
- m_this->set(this);
}
String IDBObjectStoreRequest::name() const
@@ -63,35 +61,35 @@ PassRefPtr<DOMStringList> IDBObjectStoreRequest::indexNames() const
PassRefPtr<IDBRequest> IDBObjectStoreRequest::get(ScriptExecutionContext* context, PassRefPtr<IDBKey> key)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_objectStore->get(key, request);
return request;
}
PassRefPtr<IDBRequest> IDBObjectStoreRequest::add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_objectStore->put(value, key, true, request);
return request;
}
PassRefPtr<IDBRequest> IDBObjectStoreRequest::put(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_objectStore->put(value, key, false, request);
return request;
}
PassRefPtr<IDBRequest> IDBObjectStoreRequest::remove(ScriptExecutionContext* context, PassRefPtr<IDBKey> key)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_objectStore->remove(key, request);
return request;
}
PassRefPtr<IDBRequest> IDBObjectStoreRequest::createIndex(ScriptExecutionContext* context, const String& name, const String& keyPath, bool unique)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_objectStore->createIndex(name, keyPath, unique, request);
return request;
}
@@ -105,7 +103,7 @@ PassRefPtr<IDBIndexRequest> IDBObjectStoreRequest::index(const String& name)
PassRefPtr<IDBRequest> IDBObjectStoreRequest::removeIndex(ScriptExecutionContext* context, const String& name)
{
- RefPtr<IDBRequest> request = IDBRequest::create(context, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
m_objectStore->removeIndex(name, request);
return request;
}
diff --git a/WebCore/storage/IDBObjectStoreRequest.h b/WebCore/storage/IDBObjectStoreRequest.h
index af752f5..86f64d6 100644
--- a/WebCore/storage/IDBObjectStoreRequest.h
+++ b/WebCore/storage/IDBObjectStoreRequest.h
@@ -68,7 +68,6 @@ private:
IDBObjectStoreRequest(PassRefPtr<IDBObjectStore>);
RefPtr<IDBObjectStore> m_objectStore;
- RefPtr<IDBAny> m_this;
};
} // namespace WebCore
diff --git a/WebCore/storage/IndexedDatabaseRequest.cpp b/WebCore/storage/IndexedDatabaseRequest.cpp
index a25fb2b..45ae1bd 100644
--- a/WebCore/storage/IndexedDatabaseRequest.cpp
+++ b/WebCore/storage/IndexedDatabaseRequest.cpp
@@ -44,10 +44,8 @@ namespace WebCore {
IndexedDatabaseRequest::IndexedDatabaseRequest(IndexedDatabase* indexedDatabase)
: m_indexedDatabase(indexedDatabase)
{
- m_this = IDBAny::create();
// We pass a reference to this object before it can be adopted.
relaxAdoptionRequirement();
- m_this->set(this);
}
IndexedDatabaseRequest::~IndexedDatabaseRequest()
@@ -65,7 +63,7 @@ PassRefPtr<IDBRequest> IndexedDatabaseRequest::open(ScriptExecutionContext* cont
if (!document->frame())
return 0;
- RefPtr<IDBRequest> request = IDBRequest::create(document, m_this);
+ RefPtr<IDBRequest> request = IDBRequest::create(document, IDBAny::create(this));
m_indexedDatabase->open(name, description, request, document->securityOrigin(), document->frame());
return request;
}
diff --git a/WebCore/storage/IndexedDatabaseRequest.h b/WebCore/storage/IndexedDatabaseRequest.h
index 9802380..f505d9d 100644
--- a/WebCore/storage/IndexedDatabaseRequest.h
+++ b/WebCore/storage/IndexedDatabaseRequest.h
@@ -64,7 +64,6 @@ private:
IndexedDatabaseRequest(IndexedDatabase*);
RefPtr<IndexedDatabase> m_indexedDatabase;
- RefPtr<IDBAny> m_this;
};
} // namespace WebCore
diff --git a/WebCore/storage/SQLError.h b/WebCore/storage/SQLError.h
index efbe4ec..496145a 100644
--- a/WebCore/storage/SQLError.h
+++ b/WebCore/storage/SQLError.h
@@ -32,7 +32,7 @@
#if ENABLE(DATABASE)
#include "PlatformString.h"
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
diff --git a/WebCore/storage/SQLException.idl b/WebCore/storage/SQLException.idl
index 9830142..cbbc311 100644
--- a/WebCore/storage/SQLException.idl
+++ b/WebCore/storage/SQLException.idl
@@ -32,7 +32,8 @@ module storage {
interface [
Conditional=DATABASE,
- NoStaticTables
+ NoStaticTables,
+ DontCheckEnums
] SQLException {
readonly attribute unsigned long code;
readonly attribute DOMString message;
diff --git a/WebCore/storage/SQLResultSet.cpp b/WebCore/storage/SQLResultSet.cpp
index 19c66c7..7482628 100644
--- a/WebCore/storage/SQLResultSet.cpp
+++ b/WebCore/storage/SQLResultSet.cpp
@@ -31,9 +31,6 @@
#if ENABLE(DATABASE)
-#include "ExceptionCode.h"
-#include "SQLValue.h"
-
namespace WebCore {
static unsigned const MaxErrorCode = 2;
diff --git a/WebCore/storage/SQLResultSet.h b/WebCore/storage/SQLResultSet.h
index 5a0ff78..268472f 100644
--- a/WebCore/storage/SQLResultSet.h
+++ b/WebCore/storage/SQLResultSet.h
@@ -31,13 +31,12 @@
#if ENABLE(DATABASE)
+#include "ExceptionCode.h"
#include "SQLResultSetRowList.h"
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
-typedef int ExceptionCode;
-
class SQLResultSet : public ThreadSafeShared<SQLResultSet> {
public:
static PassRefPtr<SQLResultSet> create() { return adoptRef(new SQLResultSet); }
diff --git a/WebCore/storage/SQLStatementCallback.h b/WebCore/storage/SQLStatementCallback.h
index 68e7cb8..4bb2e06 100644
--- a/WebCore/storage/SQLStatementCallback.h
+++ b/WebCore/storage/SQLStatementCallback.h
@@ -30,7 +30,7 @@
#if ENABLE(DATABASE)
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
diff --git a/WebCore/storage/SQLStatementErrorCallback.h b/WebCore/storage/SQLStatementErrorCallback.h
index 8db98be..7c45afd 100644
--- a/WebCore/storage/SQLStatementErrorCallback.h
+++ b/WebCore/storage/SQLStatementErrorCallback.h
@@ -31,7 +31,7 @@
#if ENABLE(DATABASE)
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
diff --git a/WebCore/storage/SQLStatementSync.cpp b/WebCore/storage/SQLStatementSync.cpp
new file mode 100644
index 0000000..7be3f50
--- /dev/null
+++ b/WebCore/storage/SQLStatementSync.cpp
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 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 "SQLStatementSync.h"
+
+#if ENABLE(DATABASE)
+
+#include "DatabaseSync.h"
+#include "SQLException.h"
+#include "SQLResultSet.h"
+#include "SQLValue.h"
+#include "SQLiteDatabase.h"
+#include "SQLiteStatement.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+SQLStatementSync::SQLStatementSync(const String& statement, const Vector<SQLValue>& arguments, bool readOnly)
+ : m_statement(statement)
+ , m_arguments(arguments)
+ , m_readOnly(readOnly)
+{
+ ASSERT(!m_statement.isEmpty());
+}
+
+PassRefPtr<SQLResultSet> SQLStatementSync::execute(DatabaseSync* db, ExceptionCode& ec)
+{
+ if (m_readOnly)
+ db->setAuthorizerReadOnly();
+
+ SQLiteDatabase* database = &db->sqliteDatabase();
+
+ SQLiteStatement statement(*database, m_statement);
+ int result = statement.prepare();
+ if (result != SQLResultOk) {
+ ec = SQLException::SYNTAX_ERR;
+ return 0;
+ }
+
+ if (statement.bindParameterCount() != m_arguments.size()) {
+ ec = SQLException::SYNTAX_ERR;
+ return 0;
+ }
+
+ for (unsigned i = 0; i < m_arguments.size(); ++i) {
+ result = statement.bindValue(i + 1, m_arguments[i]);
+ if (result == SQLResultFull) {
+ ec = SQLException::QUOTA_ERR;
+ return 0;
+ }
+
+ if (result != SQLResultOk) {
+ ec = SQLException::DATABASE_ERR;
+ return 0;
+ }
+ }
+
+ RefPtr<SQLResultSet> resultSet = SQLResultSet::create();
+
+ // Step so we can fetch the column names.
+ result = statement.step();
+ if (result == SQLResultRow) {
+ int columnCount = statement.columnCount();
+ SQLResultSetRowList* rows = resultSet->rows();
+
+ for (int i = 0; i < columnCount; i++)
+ rows->addColumn(statement.getColumnName(i));
+
+ do {
+ for (int i = 0; i < columnCount; i++)
+ rows->addResult(statement.getColumnValue(i));
+
+ result = statement.step();
+ } while (result == SQLResultRow);
+
+ if (result != SQLResultDone) {
+ ec = SQLException::DATABASE_ERR;
+ return 0;
+ }
+ } else if (result == SQLResultDone) {
+ // Didn't find anything, or was an insert.
+ if (db->lastActionWasInsert())
+ resultSet->setInsertId(database->lastInsertRowID());
+ } else if (result == SQLResultFull) {
+ // Quota error, the delegate will be asked for more space and this statement might be re-run.
+ ec = SQLException::QUOTA_ERR;
+ return 0;
+ } else {
+ ec = SQLException::DATABASE_ERR;
+ return 0;
+ }
+
+ resultSet->setRowsAffected(database->lastChanges());
+ return resultSet.release();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/SQLStatementSync.h b/WebCore/storage/SQLStatementSync.h
new file mode 100644
index 0000000..dc0394c
--- /dev/null
+++ b/WebCore/storage/SQLStatementSync.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLStatementSync_h
+#define SQLStatementSync_h
+
+#if ENABLE(DATABASE)
+
+#include "ExceptionCode.h"
+#include "PlatformString.h"
+#include "SQLValue.h"
+#include <wtf/Forward.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class DatabaseSync;
+class SQLResultSet;
+
+class SQLStatementSync {
+public:
+ SQLStatementSync(const String& statement, const Vector<SQLValue>& arguments, bool readOnly);
+
+ PassRefPtr<SQLResultSet> execute(DatabaseSync*, ExceptionCode&);
+
+private:
+ String m_statement;
+ Vector<SQLValue> m_arguments;
+ bool m_readOnly;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
+
+#endif // SQLStatementSync_h
diff --git a/WebCore/storage/SQLTransaction.cpp b/WebCore/storage/SQLTransaction.cpp
index 960427b..decdf24 100644
--- a/WebCore/storage/SQLTransaction.cpp
+++ b/WebCore/storage/SQLTransaction.cpp
@@ -33,7 +33,6 @@
#include "Database.h"
#include "DatabaseThread.h"
-#include "ExceptionCode.h"
#include "Logging.h"
#include "PlatformString.h"
#include "ScriptExecutionContext.h"
@@ -370,7 +369,7 @@ bool SQLTransaction::runCurrentStatement()
// Flag this transaction as having changed the database for later delegate notification
m_modifiedDatabase = true;
// Also dirty the size of this database file for calculating quota usage
- m_database->transactionClient()->didExecuteStatement(this);
+ m_database->transactionClient()->didExecuteStatement(database());
}
if (m_currentStatement->hasStatementCallback()) {
@@ -432,7 +431,7 @@ void SQLTransaction::deliverQuotaIncreaseCallback()
ASSERT(m_currentStatement);
ASSERT(!m_shouldRetryCurrentStatement);
- m_shouldRetryCurrentStatement = m_database->transactionClient()->didExceedQuota(this);
+ m_shouldRetryCurrentStatement = m_database->transactionClient()->didExceedQuota(database());
m_nextStep = &SQLTransaction::runStatements;
LOG(StorageAPI, "Scheduling runStatements for transaction %p\n", this);
@@ -472,7 +471,7 @@ void SQLTransaction::postflightAndCommit()
// The commit was successful. If the transaction modified this database, notify the delegates.
if (m_modifiedDatabase)
- m_database->transactionClient()->didCommitTransaction(this);
+ m_database->transactionClient()->didCommitWriteTransaction(database());
// Now release our unneeded callbacks, to break reference cycles.
m_callback = 0;
diff --git a/WebCore/storage/SQLTransaction.h b/WebCore/storage/SQLTransaction.h
index 3cef036..5c62ca2 100644
--- a/WebCore/storage/SQLTransaction.h
+++ b/WebCore/storage/SQLTransaction.h
@@ -30,17 +30,15 @@
#if ENABLE(DATABASE)
-#include <wtf/Threading.h>
-
+#include "ExceptionCode.h"
#include "SQLStatement.h"
#include <wtf/Deque.h>
#include <wtf/Forward.h>
+#include <wtf/ThreadSafeShared.h>
#include <wtf/Vector.h>
namespace WebCore {
-typedef int ExceptionCode;
-
class Database;
class SQLError;
class SQLiteTransaction;
diff --git a/WebCore/storage/SQLTransactionCallback.h b/WebCore/storage/SQLTransactionCallback.h
index 048410f..73123ee 100644
--- a/WebCore/storage/SQLTransactionCallback.h
+++ b/WebCore/storage/SQLTransactionCallback.h
@@ -31,7 +31,7 @@
#if ENABLE(DATABASE)
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
diff --git a/WebCore/storage/SQLTransactionClient.cpp b/WebCore/storage/SQLTransactionClient.cpp
index 32c8e07..6b95606 100644
--- a/WebCore/storage/SQLTransactionClient.cpp
+++ b/WebCore/storage/SQLTransactionClient.cpp
@@ -33,36 +33,27 @@
#if ENABLE(DATABASE)
-#include "Chrome.h"
-#include "ChromeClient.h"
-#include "Database.h"
-#include "DatabaseThread.h"
+#include "AbstractDatabase.h"
#include "DatabaseTracker.h"
-#include "Document.h"
-#include "Page.h"
-#include "SQLTransaction.h"
+#include "ScriptExecutionContext.h"
+#include "SecurityOrigin.h"
namespace WebCore {
-void SQLTransactionClient::didCommitTransaction(SQLTransaction* transaction)
+void SQLTransactionClient::didCommitWriteTransaction(AbstractDatabase* database)
{
- ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
- Database* database = transaction->database();
DatabaseTracker::tracker().scheduleNotifyDatabaseChanged(
database->securityOrigin(), database->stringIdentifier());
}
-void SQLTransactionClient::didExecuteStatement(SQLTransaction* transaction)
+void SQLTransactionClient::didExecuteStatement(AbstractDatabase* database)
{
- ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
- DatabaseTracker::tracker().databaseChanged(transaction->database());
+ DatabaseTracker::tracker().databaseChanged(database);
}
-bool SQLTransactionClient::didExceedQuota(SQLTransaction* transaction)
+bool SQLTransactionClient::didExceedQuota(AbstractDatabase* database)
{
- ASSERT(transaction->database()->scriptExecutionContext()->isContextThread());
- Database* database = transaction->database();
-
+ ASSERT(database->scriptExecutionContext()->isContextThread());
unsigned long long currentQuota = DatabaseTracker::tracker().quotaForOrigin(database->securityOrigin());
database->scriptExecutionContext()->databaseExceededQuota(database->stringIdentifier());
unsigned long long newQuota = DatabaseTracker::tracker().quotaForOrigin(database->securityOrigin());
diff --git a/WebCore/storage/SQLTransactionClient.h b/WebCore/storage/SQLTransactionClient.h
index 801647b..fed0657 100644
--- a/WebCore/storage/SQLTransactionClient.h
+++ b/WebCore/storage/SQLTransactionClient.h
@@ -37,16 +37,17 @@
namespace WebCore {
- class SQLTransaction;
-
- // A client to the SQLTransaction class. Allows SQLTransaction to notify interested
- // parties that certain things have happened in a transaction.
- class SQLTransactionClient : public Noncopyable {
- public:
- void didCommitTransaction(SQLTransaction*);
- void didExecuteStatement(SQLTransaction*);
- bool didExceedQuota(SQLTransaction*);
- };
+class AbstractDatabase;
+
+// A client to the SQLTransaction class. Allows SQLTransaction to notify interested
+// parties that certain things have happened in a transaction.
+class SQLTransactionClient : public Noncopyable {
+public:
+ void didCommitWriteTransaction(AbstractDatabase*);
+ void didExecuteStatement(AbstractDatabase*);
+ bool didExceedQuota(AbstractDatabase*);
+};
+
}
#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/SQLTransactionErrorCallback.h b/WebCore/storage/SQLTransactionErrorCallback.h
index 2fe2cb3..71580eb 100644
--- a/WebCore/storage/SQLTransactionErrorCallback.h
+++ b/WebCore/storage/SQLTransactionErrorCallback.h
@@ -31,7 +31,7 @@
#if ENABLE(DATABASE)
-#include <wtf/Threading.h>
+#include <wtf/ThreadSafeShared.h>
namespace WebCore {
diff --git a/WebCore/storage/SQLTransactionSync.cpp b/WebCore/storage/SQLTransactionSync.cpp
index 5e7c879..af98f8f 100644
--- a/WebCore/storage/SQLTransactionSync.cpp
+++ b/WebCore/storage/SQLTransactionSync.cpp
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -32,11 +34,14 @@
#if ENABLE(DATABASE)
#include "DatabaseSync.h"
-#include "ExceptionCode.h"
#include "PlatformString.h"
+#include "SQLException.h"
#include "SQLResultSet.h"
+#include "SQLStatementSync.h"
+#include "SQLTransactionClient.h"
#include "SQLTransactionSyncCallback.h"
#include "SQLValue.h"
+#include "SQLiteTransaction.h"
#include "ScriptExecutionContext.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
@@ -52,22 +57,150 @@ SQLTransactionSync::SQLTransactionSync(DatabaseSync* db, PassRefPtr<SQLTransacti
: m_database(db)
, m_callback(callback)
, m_readOnly(readOnly)
+ , m_modifiedDatabase(false)
+ , m_transactionClient(new SQLTransactionClient())
{
ASSERT(m_database->scriptExecutionContext()->isContextThread());
- ASSERT(callback);
}
SQLTransactionSync::~SQLTransactionSync()
{
ASSERT(m_database->scriptExecutionContext()->isContextThread());
+ if (m_sqliteTransaction && m_sqliteTransaction->inProgress())
+ rollback();
}
-PassRefPtr<SQLResultSet> SQLTransactionSync::executeSQL(const String&, const Vector<SQLValue>&, ExceptionCode&)
+PassRefPtr<SQLResultSet> SQLTransactionSync::executeSQL(const String& sqlStatement, const Vector<SQLValue>& arguments, ExceptionCode& ec)
{
ASSERT(m_database->scriptExecutionContext()->isContextThread());
+ if (!m_database->opened()) {
+ ec = SQLException::UNKNOWN_ERR;
+ return 0;
+ }
+
+ if (!m_database->versionMatchesExpected()) {
+ ec = SQLException::VERSION_ERR;
+ return 0;
+ }
+
+ if (sqlStatement.isEmpty())
+ return 0;
+
+ bool readOnlyMode = m_readOnly || m_database->scriptExecutionContext()->isDatabaseReadOnly();
+ SQLStatementSync statement(sqlStatement, arguments, readOnlyMode);
+
+ m_database->resetAuthorizer();
+ bool retryStatement = true;
+ RefPtr<SQLResultSet> resultSet;
+ while (retryStatement) {
+ retryStatement = false;
+ resultSet = statement.execute(m_database.get(), ec);
+ if (!resultSet) {
+ if (m_sqliteTransaction->wasRolledBackBySqlite())
+ return 0;
+
+ if (ec == SQLException::QUOTA_ERR) {
+ if (m_transactionClient->didExceedQuota(database())) {
+ ec = 0;
+ retryStatement = true;
+ } else
+ return 0;
+ }
+ }
+ }
+
+ if (m_database->lastActionChangedDatabase()) {
+ m_modifiedDatabase = true;
+ m_transactionClient->didExecuteStatement(database());
+ }
+
+ return resultSet.release();
+}
+
+ExceptionCode SQLTransactionSync::begin()
+{
+ ASSERT(m_database->scriptExecutionContext()->isContextThread());
+ if (!m_database->opened())
+ return SQLException::UNKNOWN_ERR;
+
+ ASSERT(!m_database->sqliteDatabase().transactionInProgress());
+
+ // Set the maximum usage for this transaction if this transactions is not read-only.
+ if (!m_readOnly)
+ m_database->sqliteDatabase().setMaximumSize(m_database->maximumSize());
+
+ ASSERT(!m_sqliteTransaction);
+ m_sqliteTransaction.set(new SQLiteTransaction(m_database->sqliteDatabase(), m_readOnly));
+
+ m_database->resetDeletes();
+ m_database->disableAuthorizer();
+ m_sqliteTransaction->begin();
+ m_database->enableAuthorizer();
+
+ // Check if begin() succeeded.
+ if (!m_sqliteTransaction->inProgress()) {
+ ASSERT(!m_database->sqliteDatabase().transactionInProgress());
+ m_sqliteTransaction.clear();
+ return SQLException::DATABASE_ERR;
+ }
+
+ return 0;
+}
+
+ExceptionCode SQLTransactionSync::execute()
+{
+ ASSERT(m_database->scriptExecutionContext()->isContextThread());
+ if (!m_database->opened() || !m_callback || !m_callback->handleEvent(m_database->scriptExecutionContext(), this)) {
+ m_callback = 0;
+ return SQLException::UNKNOWN_ERR;
+ }
+
+ m_callback = 0;
+ return 0;
+}
+
+ExceptionCode SQLTransactionSync::commit()
+{
+ ASSERT(m_database->scriptExecutionContext()->isContextThread());
+ if (!m_database->opened())
+ return SQLException::UNKNOWN_ERR;
+
+ ASSERT(m_sqliteTransaction);
+
+ m_database->disableAuthorizer();
+ m_sqliteTransaction->commit();
+ m_database->enableAuthorizer();
+
+ // If the commit failed, the transaction will still be marked as "in progress"
+ if (m_sqliteTransaction->inProgress())
+ return SQLException::DATABASE_ERR;
+
+ m_sqliteTransaction.clear();
+
+ // Vacuum the database if anything was deleted.
+ if (m_database->hadDeletes())
+ m_database->incrementalVacuumIfNeeded();
+
+ // The commit was successful. If the transaction modified this database, notify the delegates.
+ if (m_modifiedDatabase)
+ m_transactionClient->didCommitWriteTransaction(database());
+
return 0;
}
+void SQLTransactionSync::rollback()
+{
+ ASSERT(m_database->scriptExecutionContext()->isContextThread());
+ m_database->disableAuthorizer();
+ if (m_sqliteTransaction) {
+ m_sqliteTransaction->rollback();
+ m_sqliteTransaction.clear();
+ }
+ m_database->enableAuthorizer();
+
+ ASSERT(!m_database->sqliteDatabase().transactionInProgress());
+}
+
} // namespace WebCore
#endif // ENABLE(DATABASE)
diff --git a/WebCore/storage/SQLTransactionSync.h b/WebCore/storage/SQLTransactionSync.h
index 7c03927..025215b 100644
--- a/WebCore/storage/SQLTransactionSync.h
+++ b/WebCore/storage/SQLTransactionSync.h
@@ -2,46 +2,50 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * 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 SQLTransactionSync_h
#define SQLTransactionSync_h
#if ENABLE(DATABASE)
+#include "ExceptionCode.h"
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
-typedef int ExceptionCode;
-
class DatabaseSync;
class SQLResultSet;
+class SQLTransactionClient;
class SQLTransactionSyncCallback;
class SQLValue;
+class SQLiteTransaction;
class String;
// Instances of this class should be created and used only on the worker's context thread.
@@ -56,12 +60,21 @@ public:
DatabaseSync* database() { return m_database.get(); }
bool isReadOnly() const { return m_readOnly; }
+ ExceptionCode begin();
+ ExceptionCode execute();
+ ExceptionCode commit();
+ void rollback();
+
private:
SQLTransactionSync(DatabaseSync*, PassRefPtr<SQLTransactionSyncCallback>, bool readOnly);
RefPtr<DatabaseSync> m_database;
RefPtr<SQLTransactionSyncCallback> m_callback;
bool m_readOnly;
+
+ bool m_modifiedDatabase;
+ OwnPtr<SQLTransactionClient> m_transactionClient;
+ OwnPtr<SQLiteTransaction> m_sqliteTransaction;
};
} // namespace WebCore
diff --git a/WebCore/storage/SQLTransactionSync.idl b/WebCore/storage/SQLTransactionSync.idl
index a4002b1..003a21d 100644
--- a/WebCore/storage/SQLTransactionSync.idl
+++ b/WebCore/storage/SQLTransactionSync.idl
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * 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.
*/
module storage {
diff --git a/WebCore/storage/SQLTransactionSyncCallback.h b/WebCore/storage/SQLTransactionSyncCallback.h
index eba82b0..557db86 100644
--- a/WebCore/storage/SQLTransactionSyncCallback.h
+++ b/WebCore/storage/SQLTransactionSyncCallback.h
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *Transaction
- * 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.
+ * modification, are permitted provided that the following conditions are
+ * met:
*
- * 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.
+ * * 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 SQLTransactionSyncCallback_h
@@ -32,7 +34,6 @@
#if ENABLE(DATABASE)
#include <wtf/RefCounted.h>
-#include <wtf/Threading.h>
namespace WebCore {
diff --git a/WebCore/storage/SQLTransactionSyncCallback.idl b/WebCore/storage/SQLTransactionSyncCallback.idl
index 1bff22b..b0fffca 100644
--- a/WebCore/storage/SQLTransactionSyncCallback.idl
+++ b/WebCore/storage/SQLTransactionSyncCallback.idl
@@ -2,28 +2,30 @@
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * 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.
+ * * 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 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.
+ * 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.
*/
module storage {
diff --git a/WebCore/storage/chromium/DatabaseTrackerChromium.cpp b/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
index 13c65cc..7d9c4de 100644
--- a/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
+++ b/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
@@ -33,16 +33,13 @@
#include "AbstractDatabase.h"
#include "DatabaseObserver.h"
-#include "DatabaseThread.h"
#include "QuotaTracker.h"
+#include "PlatformString.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
#include "SecurityOriginHash.h"
#include "SQLiteFileSystem.h"
-#include <wtf/HashSet.h>
-#include <wtf/MainThread.h>
#include <wtf/StdLibExtras.h>
-#include <wtf/text/CString.h>
namespace WebCore {
@@ -167,7 +164,6 @@ void DatabaseTracker::getOpenDatabases(SecurityOrigin* origin, const String& nam
unsigned long long DatabaseTracker::getMaxSizeForDatabase(const AbstractDatabase* database)
{
- ASSERT(currentThread() == database->scriptExecutionContext()->databaseThread()->getThreadID());
unsigned long long spaceAvailable = 0;
unsigned long long databaseSize = 0;
QuotaTracker::instance().getDatabaseSizeAndSpaceAvailableToOrigin(
diff --git a/WebCore/storage/chromium/SQLTransactionClientChromium.cpp b/WebCore/storage/chromium/SQLTransactionClientChromium.cpp
index a10ca3e..22d95e6 100644
--- a/WebCore/storage/chromium/SQLTransactionClientChromium.cpp
+++ b/WebCore/storage/chromium/SQLTransactionClientChromium.cpp
@@ -31,18 +31,15 @@
#include "config.h"
#include "SQLTransactionClient.h"
-#include "Database.h"
+#include "AbstractDatabase.h"
#include "DatabaseObserver.h"
-#include "DatabaseThread.h"
-#include "Document.h"
-#include "SQLTransaction.h"
-#include <wtf/MainThread.h>
+#include "ScriptExecutionContext.h"
namespace WebCore {
class NotifyDatabaseChangedTask : public ScriptExecutionContext::Task {
public:
- static PassOwnPtr<NotifyDatabaseChangedTask> create(Database *database)
+ static PassOwnPtr<NotifyDatabaseChangedTask> create(AbstractDatabase *database)
{
return new NotifyDatabaseChangedTask(database);
}
@@ -53,34 +50,35 @@ public:
}
private:
- NotifyDatabaseChangedTask(PassRefPtr<Database> database)
+ NotifyDatabaseChangedTask(PassRefPtr<AbstractDatabase> database)
: m_database(database)
{
}
- RefPtr<Database> m_database;
+ RefPtr<AbstractDatabase> m_database;
};
-void SQLTransactionClient::didCommitTransaction(SQLTransaction* transaction)
+void SQLTransactionClient::didCommitWriteTransaction(AbstractDatabase* database)
{
- ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
- if (!transaction->isReadOnly()) {
- transaction->database()->scriptExecutionContext()->postTask(NotifyDatabaseChangedTask::create(transaction->database()));
+ if (!database->scriptExecutionContext()->isContextThread()) {
+ database->scriptExecutionContext()->postTask(NotifyDatabaseChangedTask::create(database));
+ return;
}
+
+ WebCore::DatabaseObserver::databaseModified(database);
}
-void SQLTransactionClient::didExecuteStatement(SQLTransaction* transaction)
+void SQLTransactionClient::didExecuteStatement(AbstractDatabase* database)
{
// This method is called after executing every statement that changes the DB.
// Chromium doesn't need to do anything at that point.
- ASSERT(currentThread() == transaction->database()->scriptExecutionContext()->databaseThread()->getThreadID());
}
-bool SQLTransactionClient::didExceedQuota(SQLTransaction* transaction)
+bool SQLTransactionClient::didExceedQuota(AbstractDatabase* database)
{
// Chromium does not allow users to manually change the quota for an origin (for now, at least).
// Don't do anything.
- ASSERT(transaction->database()->scriptExecutionContext()->isContextThread());
+ ASSERT(database->scriptExecutionContext()->isContextThread());
return false;
}
diff --git a/WebCore/svg/SVGAllInOne.cpp b/WebCore/svg/SVGAllInOne.cpp
index c1bf281..0ad4932 100644
--- a/WebCore/svg/SVGAllInOne.cpp
+++ b/WebCore/svg/SVGAllInOne.cpp
@@ -107,7 +107,9 @@
#include "SVGNumberList.cpp"
#include "SVGPaint.cpp"
#include "SVGParserUtilities.cpp"
+#include "SVGPathBuilder.cpp"
#include "SVGPathElement.cpp"
+#include "SVGPathParser.cpp"
#include "SVGPathSegArc.cpp"
#include "SVGPathSegClosePath.cpp"
#include "SVGPathSegCurvetoCubic.cpp"
@@ -118,6 +120,7 @@
#include "SVGPathSegLinetoHorizontal.cpp"
#include "SVGPathSegLinetoVertical.cpp"
#include "SVGPathSegList.cpp"
+#include "SVGPathSegListBuilder.cpp"
#include "SVGPathSegMoveto.cpp"
#include "SVGPatternElement.cpp"
#include "SVGPointList.cpp"
diff --git a/WebCore/svg/SVGAnimateElement.cpp b/WebCore/svg/SVGAnimateElement.cpp
index ff3317b..fa4a4cf 100644
--- a/WebCore/svg/SVGAnimateElement.cpp
+++ b/WebCore/svg/SVGAnimateElement.cpp
@@ -28,6 +28,7 @@
#include "SVGColor.h"
#include "SVGParserUtilities.h"
#include "SVGPathSegList.h"
+#include "SVGPathSegListBuilder.h"
#include "SVGPointList.h"
#include <math.h>
@@ -189,9 +190,11 @@ bool SVGAnimateElement::calculateFromAndToValues(const String& fromString, const
}
} else if (m_propertyType == PathProperty) {
m_fromPath = SVGPathSegList::create(SVGNames::dAttr);
- if (pathSegListFromSVGData(m_fromPath.get(), fromString)) {
+ SVGPathSegListBuilder fromParser(m_fromPath.get());
+ if (fromParser.build(fromString, UnalteredParsing)) {
m_toPath = SVGPathSegList::create(SVGNames::dAttr);
- if (pathSegListFromSVGData(m_toPath.get(), toString))
+ SVGPathSegListBuilder toParser(m_toPath.get());
+ if (toParser.build(toString, UnalteredParsing))
return true;
}
m_fromPath.clear();
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index 9a0da7f..a3f4ef9 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -28,9 +28,11 @@
#include "Attribute.h"
#include "RenderObject.h"
+#include "RenderSVGResource.h"
#include "SVGElementInstance.h"
#include "SVGMPathElement.h"
#include "SVGParserUtilities.h"
+#include "SVGPathBuilder.h"
#include "SVGPathElement.h"
#include "SVGTransformList.h"
#include <math.h>
@@ -87,7 +89,9 @@ void SVGAnimateMotionElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::pathAttr) {
m_path = Path();
- pathFromSVGData(m_path, attr->value());
+ SVGPathBuilder builder(m_path);
+ // FIXME: We should analyse the returned value.
+ builder.build(attr->value());
} else
SVGAnimationElement::parseMappedAttribute(attr);
}
@@ -214,9 +218,12 @@ void SVGAnimateMotionElement::applyResultsToTarget()
{
// We accumulate to the target element transform list so there is not much to do here.
SVGElement* targetElement = this->targetElement();
- if (targetElement && targetElement->renderer())
- targetElement->renderer()->setNeedsLayout(true);
-
+ if (!targetElement)
+ return;
+
+ if (RenderObject* renderer = targetElement->renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+
// ...except in case where we have additional instances in <use> trees.
const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
@@ -228,7 +235,7 @@ void SVGAnimateMotionElement::applyResultsToTarget()
transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f());
if (RenderObject* renderer = shadowTreeElement->renderer()) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
}
}
@@ -248,5 +255,3 @@ float SVGAnimateMotionElement::calculateDistance(const String& fromString, const
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
diff --git a/WebCore/svg/SVGAnimateTransformElement.cpp b/WebCore/svg/SVGAnimateTransformElement.cpp
index 1a305bb..6ca9447 100644
--- a/WebCore/svg/SVGAnimateTransformElement.cpp
+++ b/WebCore/svg/SVGAnimateTransformElement.cpp
@@ -30,6 +30,7 @@
#include "AffineTransform.h"
#include "Attribute.h"
#include "RenderObject.h"
+#include "RenderSVGResource.h"
#include "SVGAngle.h"
#include "SVGElementInstance.h"
#include "SVGGradientElement.h"
@@ -172,9 +173,12 @@ void SVGAnimateTransformElement::applyResultsToTarget()
return;
// We accumulate to the target element transform list so there is not much to do here.
SVGElement* targetElement = this->targetElement();
+ if (!targetElement)
+ return;
+
if (RenderObject* renderer = targetElement->renderer()) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
// ...except in case where we have additional instances in <use> trees.
@@ -192,7 +196,7 @@ void SVGAnimateTransformElement::applyResultsToTarget()
static_cast<SVGGradientElement*>(shadowTreeElement)->setGradientTransformBaseValue(transformList.get());
if (RenderObject* renderer = shadowTreeElement->renderer()) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
}
}
diff --git a/WebCore/svg/SVGCircleElement.cpp b/WebCore/svg/SVGCircleElement.cpp
index c90b8e3..f8c9ccd 100644
--- a/WebCore/svg/SVGCircleElement.cpp
+++ b/WebCore/svg/SVGCircleElement.cpp
@@ -26,6 +26,7 @@
#include "Attribute.h"
#include "FloatPoint.h"
#include "RenderPath.h"
+#include "RenderSVGResource.h"
#include "SVGLength.h"
#include "SVGNames.h"
@@ -84,20 +85,20 @@ void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (isLengthAttribute) {
renderer->setNeedsPathUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGCircleElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.idl b/WebCore/svg/SVGComponentTransferFunctionElement.idl
index 950f77d..0a9e05d 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.idl
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.idl
@@ -25,7 +25,10 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGComponentTransferFunctionElement : SVGElement {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGComponentTransferFunctionElement : SVGElement {
// Component Transfer Types
const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
diff --git a/WebCore/svg/SVGEllipseElement.cpp b/WebCore/svg/SVGEllipseElement.cpp
index 5509c2d..963b4b0 100644
--- a/WebCore/svg/SVGEllipseElement.cpp
+++ b/WebCore/svg/SVGEllipseElement.cpp
@@ -26,6 +26,7 @@
#include "Attribute.h"
#include "FloatPoint.h"
#include "RenderPath.h"
+#include "RenderSVGResource.h"
#include "SVGLength.h"
#include "SVGNames.h"
@@ -90,20 +91,20 @@ void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (isLengthAttribute) {
renderer->setNeedsPathUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGEllipseElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGException.idl b/WebCore/svg/SVGException.idl
index db565ff..3f1f8ec 100644
--- a/WebCore/svg/SVGException.idl
+++ b/WebCore/svg/SVGException.idl
@@ -21,7 +21,8 @@
module svg {
interface [
- Conditional=SVG
+ Conditional=SVG,
+ DontCheckEnums
] SVGException {
readonly attribute unsigned short code;
diff --git a/WebCore/svg/SVGFEBlendElement.idl b/WebCore/svg/SVGFEBlendElement.idl
index bb6d86d..0c08603 100644
--- a/WebCore/svg/SVGFEBlendElement.idl
+++ b/WebCore/svg/SVGFEBlendElement.idl
@@ -25,8 +25,11 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGFEBlendElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGFEBlendElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Blend Mode Types
const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
diff --git a/WebCore/svg/SVGFEColorMatrixElement.idl b/WebCore/svg/SVGFEColorMatrixElement.idl
index d704906..61c5b4a 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.idl
+++ b/WebCore/svg/SVGFEColorMatrixElement.idl
@@ -25,8 +25,11 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGFEColorMatrixElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGFEColorMatrixElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Color Matrix Types
const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
diff --git a/WebCore/svg/SVGFECompositeElement.idl b/WebCore/svg/SVGFECompositeElement.idl
index d3adb25..af1d5cf 100644
--- a/WebCore/svg/SVGFECompositeElement.idl
+++ b/WebCore/svg/SVGFECompositeElement.idl
@@ -25,8 +25,11 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGFECompositeElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGFECompositeElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Composite Operators
const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.idl b/WebCore/svg/SVGFEConvolveMatrixElement.idl
index 5be4c33..afe859d 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.idl
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.idl
@@ -25,8 +25,12 @@
module svg {
- interface [Conditional=SVG&FILTERS, GenerateConstructor] SVGFEConvolveMatrixElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ GenerateConstructor,
+ DontCheckEnums
+ ] SVGFEConvolveMatrixElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Edge Mode Values
const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.idl b/WebCore/svg/SVGFEDisplacementMapElement.idl
index b003e8f..1eb9440 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.idl
+++ b/WebCore/svg/SVGFEDisplacementMapElement.idl
@@ -25,8 +25,11 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGFEDisplacementMapElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGFEDisplacementMapElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Channel Selectors
const unsigned short SVG_CHANNEL_UNKNOWN = 0;
const unsigned short SVG_CHANNEL_R = 1;
diff --git a/WebCore/svg/SVGFEImageElement.cpp b/WebCore/svg/SVGFEImageElement.cpp
index 84f8734..1f7164f 100644
--- a/WebCore/svg/SVGFEImageElement.cpp
+++ b/WebCore/svg/SVGFEImageElement.cpp
@@ -29,6 +29,7 @@
#include "DocLoader.h"
#include "Document.h"
#include "RenderObject.h"
+#include "RenderSVGResource.h"
#include "SVGLength.h"
#include "SVGNames.h"
#include "SVGPreserveAspectRatio.h"
@@ -107,7 +108,16 @@ void SVGFEImageElement::synchronizeProperty(const QualifiedName& attrName)
void SVGFEImageElement::notifyFinished(CachedResource*)
{
- SVGStyledElement::invalidateResourcesInAncestorChain();
+ if (!inDocument())
+ return;
+
+ Element* parent = parentElement();
+ ASSERT(parent);
+
+ if (!parent->hasTagName(SVGNames::filterTag) || !parent->renderer())
+ return;
+
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(parent->renderer());
}
PassRefPtr<FilterEffect> SVGFEImageElement::build(SVGFilterBuilder*)
diff --git a/WebCore/svg/SVGFEMorphologyElement.idl b/WebCore/svg/SVGFEMorphologyElement.idl
index ffd2289..64023e8 100644
--- a/WebCore/svg/SVGFEMorphologyElement.idl
+++ b/WebCore/svg/SVGFEMorphologyElement.idl
@@ -25,8 +25,11 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGFEMorphologyElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGFEMorphologyElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Morphology Operators
const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
diff --git a/WebCore/svg/SVGFETurbulenceElement.idl b/WebCore/svg/SVGFETurbulenceElement.idl
index 934eddf..f011d99 100644
--- a/WebCore/svg/SVGFETurbulenceElement.idl
+++ b/WebCore/svg/SVGFETurbulenceElement.idl
@@ -25,8 +25,11 @@
module svg {
- interface [Conditional=SVG&FILTERS] SVGFETurbulenceElement : SVGElement,
- SVGFilterPrimitiveStandardAttributes {
+ interface [
+ Conditional=SVG&FILTERS,
+ DontCheckEnums
+ ] SVGFETurbulenceElement : SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
// Turbulence Types
const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
diff --git a/WebCore/svg/SVGFilterElement.cpp b/WebCore/svg/SVGFilterElement.cpp
index b86b8c4..4387e71 100644
--- a/WebCore/svg/SVGFilterElement.cpp
+++ b/WebCore/svg/SVGFilterElement.cpp
@@ -62,8 +62,11 @@ SVGFilterElement::~SVGFilterElement()
{
}
-void SVGFilterElement::setFilterRes(unsigned long, unsigned long) const
+void SVGFilterElement::setFilterRes(unsigned long filterResX, unsigned long filterResY)
{
+ setFilterResXBaseValue(filterResX);
+ setFilterResYBaseValue(filterResY);
+ invalidateResourceClients();
}
void SVGFilterElement::parseMappedAttribute(Attribute* attr)
@@ -122,10 +125,10 @@ void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName)
|| attrName == SVGNames::filterUnitsAttr
|| attrName == SVGNames::primitiveUnitsAttr
|| attrName == SVGNames::filterResAttr
+ || SVGStyledElement::isKnownAttribute(attrName)
|| SVGURIReference::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
- || SVGExternalResourcesRequired::isKnownAttribute(attrName)
- || SVGStyledElement::isKnownAttribute(attrName))
+ || SVGExternalResourcesRequired::isKnownAttribute(attrName))
invalidateResourceClients();
}
@@ -168,6 +171,14 @@ void SVGFilterElement::synchronizeProperty(const QualifiedName& attrName)
synchronizeHref();
}
+void SVGFilterElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
+{
+ SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+
+ if (!changedByParser)
+ invalidateResourceClients();
+}
+
FloatRect SVGFilterElement::filterBoundingBox(const FloatRect& objectBoundingBox) const
{
FloatRect filterBBox;
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index 85679c7..7b0192c 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -43,12 +43,13 @@ public:
SVGFilterElement(const QualifiedName&, Document*);
virtual ~SVGFilterElement();
- void setFilterRes(unsigned long filterResX, unsigned long filterResY) const;
+ void setFilterRes(unsigned long filterResX, unsigned long filterResY);
FloatRect filterBoundingBox(const FloatRect&) const;
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/WebCore/svg/SVGFont.cpp b/WebCore/svg/SVGFont.cpp
index 5436688..6abea60 100644
--- a/WebCore/svg/SVGFont.cpp
+++ b/WebCore/svg/SVGFont.cpp
@@ -413,7 +413,7 @@ static float floatWidthOfSubStringUsingSVGFont(const Font* font, const TextRun&
}
SVGTextRunWalker<SVGTextRunWalkerMeasuredLengthData> runWalker(fontData, fontElement, data, floatWidthUsingSVGFontCallback, floatWidthMissingGlyphCallback);
- runWalker.walk(run, isVerticalText, language, 0, run.length());
+ runWalker.walk(run, isVerticalText, language, from, to);
charsConsumed = data.charsConsumed;
glyphName = data.glyphName;
return data.length;
diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp
index d6bf1cf..7ffe1c6 100644
--- a/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/WebCore/svg/SVGForeignObjectElement.cpp
@@ -28,6 +28,7 @@
#include "Attribute.h"
#include "CSSPropertyNames.h"
#include "RenderForeignObject.h"
+#include "RenderSVGResource.h"
#include "SVGLength.h"
#include "SVGNames.h"
#include <wtf/Assertions.h>
@@ -90,7 +91,7 @@ void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
@@ -98,7 +99,7 @@ void SVGForeignObjectElement::svgAttributeChanged(const QualifiedName& attrName)
|| SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGForeignObjectElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGGElement.cpp b/WebCore/svg/SVGGElement.cpp
index eceac41..a830096 100644
--- a/WebCore/svg/SVGGElement.cpp
+++ b/WebCore/svg/SVGGElement.cpp
@@ -24,6 +24,7 @@
#include "SVGGElement.h"
#include "RenderSVGHiddenContainer.h"
+#include "RenderSVGResource.h"
#include "RenderSVGTransformableContainer.h"
namespace WebCore {
@@ -62,14 +63,14 @@ void SVGGElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGGElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGGlyphElement.cpp b/WebCore/svg/SVGGlyphElement.cpp
index d5b7531..054db11 100644
--- a/WebCore/svg/SVGGlyphElement.cpp
+++ b/WebCore/svg/SVGGlyphElement.cpp
@@ -29,7 +29,7 @@
#include "SVGFontElement.h"
#include "SVGFontFaceElement.h"
#include "SVGNames.h"
-#include "SVGParserUtilities.h"
+#include "SVGPathBuilder.h"
#include "SimpleFontData.h"
#include "XMLNames.h"
@@ -102,7 +102,9 @@ static inline SVGGlyphIdentifier::Orientation parseOrientation(const AtomicStrin
static inline Path parsePathData(const AtomicString& value)
{
Path result;
- pathFromSVGData(result, value);
+ SVGPathBuilder builder(result);
+ // FIXME: We should analyse the returned value.
+ builder.build(value);
return result;
}
diff --git a/WebCore/svg/SVGGradientElement.idl b/WebCore/svg/SVGGradientElement.idl
index 7485780..16ac636 100644
--- a/WebCore/svg/SVGGradientElement.idl
+++ b/WebCore/svg/SVGGradientElement.idl
@@ -25,11 +25,14 @@
module svg {
- interface [Conditional=SVG] SVGGradientElement : SVGElement,
- SVGURIReference,
- SVGExternalResourcesRequired,
- SVGStylable
- /* SVGUnitTypes */ {
+ interface [
+ Conditional=SVG,
+ DontCheckEnums
+ ] SVGGradientElement : SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired,
+ SVGStylable
+ /* SVGUnitTypes */ {
// Spread Method Types
const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
const unsigned short SVG_SPREADMETHOD_PAD = 1;
diff --git a/WebCore/svg/SVGImageElement.cpp b/WebCore/svg/SVGImageElement.cpp
index 711e9f3..75f05cf 100644
--- a/WebCore/svg/SVGImageElement.cpp
+++ b/WebCore/svg/SVGImageElement.cpp
@@ -27,6 +27,7 @@
#include "Attribute.h"
#include "CSSPropertyNames.h"
#include "RenderSVGImage.h"
+#include "RenderSVGResource.h"
#include "SVGDocument.h"
#include "SVGLength.h"
#include "SVGPreserveAspectRatio.h"
@@ -105,7 +106,7 @@ void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
@@ -114,7 +115,7 @@ void SVGImageElement::svgAttributeChanged(const QualifiedName& attrName)
|| SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGImageElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGLineElement.cpp b/WebCore/svg/SVGLineElement.cpp
index c6e5e04..0898319 100644
--- a/WebCore/svg/SVGLineElement.cpp
+++ b/WebCore/svg/SVGLineElement.cpp
@@ -26,6 +26,7 @@
#include "Attribute.h"
#include "FloatPoint.h"
#include "RenderPath.h"
+#include "RenderSVGResource.h"
#include "SVGLength.h"
#include "SVGNames.h"
@@ -86,20 +87,20 @@ void SVGLineElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (isLengthAttribute) {
renderer->setNeedsPathUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGLineElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGPaint.cpp b/WebCore/svg/SVGPaint.cpp
index 82a5fe4..6d60979 100644
--- a/WebCore/svg/SVGPaint.cpp
+++ b/WebCore/svg/SVGPaint.cpp
@@ -1,6 +1,7 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ Copyright (C) Research In Motion Limited 2010. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -19,8 +20,10 @@
*/
#include "config.h"
+
#if ENABLE(SVG)
#include "SVGPaint.h"
+#include "SVGURIReference.h"
namespace WebCore {
@@ -108,8 +111,14 @@ String SVGPaint::cssText() const
return SVGColor::cssText();
}
+bool SVGPaint::matchesTargetURI(const String& referenceId)
+{
+ if (m_paintType != SVG_PAINTTYPE_URI && m_paintType != SVG_PAINTTYPE_URI_RGBCOLOR)
+ return false;
+
+ return referenceId == SVGURIReference::getTarget(m_uri);
+}
+
}
-// vim:ts=4:noet
#endif // ENABLE(SVG)
-
diff --git a/WebCore/svg/SVGPaint.h b/WebCore/svg/SVGPaint.h
index 032f715..aa696d1 100644
--- a/WebCore/svg/SVGPaint.h
+++ b/WebCore/svg/SVGPaint.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
Copyright (C) 2006 Samuel Weinig (sam.weinig@gmial.com)
@@ -78,6 +78,8 @@ namespace WebCore {
static SVGPaint* defaultFill();
static SVGPaint* defaultStroke();
+ bool matchesTargetURI(const String& referenceId);
+
private:
SVGPaint();
SVGPaint(const String& uri);
@@ -96,5 +98,3 @@ namespace WebCore {
#endif // ENABLE(SVG)
#endif // SVGPaint_h
-
-// vim:ts=4:noet
diff --git a/WebCore/svg/SVGParserUtilities.cpp b/WebCore/svg/SVGParserUtilities.cpp
index c722232..14e3d58 100644
--- a/WebCore/svg/SVGParserUtilities.cpp
+++ b/WebCore/svg/SVGParserUtilities.cpp
@@ -21,31 +21,16 @@
*/
#include "config.h"
+
#if ENABLE(SVG)
#include "SVGParserUtilities.h"
+#include "Document.h"
#include "ExceptionCode.h"
-#include "FloatConversion.h"
#include "FloatPoint.h"
-#include "Path.h"
#include "PlatformString.h"
-#include "SVGPathSegList.h"
-#include "SVGPathSegArc.h"
-#include "SVGPathSegClosePath.h"
-#include "SVGPathSegCurvetoCubic.h"
-#include "SVGPathSegCurvetoCubicSmooth.h"
-#include "SVGPathSegCurvetoQuadratic.h"
-#include "SVGPathSegCurvetoQuadraticSmooth.h"
-#include "SVGPathSegLineto.h"
-#include "SVGPathSegLinetoHorizontal.h"
-#include "SVGPathSegLinetoVertical.h"
-#include "SVGPathSegList.h"
-#include "SVGPathSegMoveto.h"
#include "SVGPointList.h"
-#include "SVGPathElement.h"
-#include <math.h>
#include <wtf/ASCIICType.h>
-#include <wtf/MathExtras.h>
namespace WebCore {
@@ -135,15 +120,9 @@ bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip)
return _parseNumber(ptr, end, number, skip);
}
-// Only used for parsing Paths
-static bool parseNumber(const UChar*& ptr, const UChar* end, double& number, bool skip = true)
-{
- return _parseNumber(ptr, end, number, skip);
-}
-
// only used to parse largeArcFlag and sweepFlag which must be a "0" or "1"
// and might not have any whitespace/comma after it
-static bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag)
+bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag)
{
const UChar flagChar = *ptr++;
if (flagChar == '0')
@@ -210,637 +189,6 @@ bool pointsListFromSVGData(SVGPointList* pointsList, const String& points)
return cur == end && !delimParsed;
}
- /**
- * Parser for svg path data, contained in the d attribute.
- *
- * The parser delivers encountered commands and parameters by calling
- * methods that correspond to those commands. Clients have to derive
- * from this class and implement the abstract command methods.
- *
- * There are two operating modes. By default the parser just delivers unaltered
- * svg path data commands and parameters. In the second mode, it will convert all
- * relative coordinates to absolute ones, and convert all curves to cubic beziers.
- */
- class SVGPathParser {
- public:
- virtual ~SVGPathParser() { }
- bool parseSVG(const String& d, bool process = false);
-
- protected:
- virtual void svgMoveTo(double x1, double y1, bool closed, bool abs = true) = 0;
- virtual void svgLineTo(double x1, double y1, bool abs = true) = 0;
- virtual void svgLineToHorizontal(double, bool /*abs*/ = true) { }
- virtual void svgLineToVertical(double /*y*/, bool /*abs*/ = true) { }
- virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true) = 0;
- virtual void svgCurveToCubicSmooth(double /*x*/, double /*y*/, double /*x2*/, double /*y2*/, bool /*abs*/ = true) { }
- virtual void svgCurveToQuadratic(double /*x*/, double /*y*/, double /*x1*/, double /*y1*/, bool /*abs*/ = true) { }
- virtual void svgCurveToQuadraticSmooth(double /*x*/, double /*y*/, bool /*abs*/ = true) { }
- virtual void svgArcTo(double /*x*/, double /*y*/, double /*r1*/, double /*r2*/, double /*angle*/, bool /*largeArcFlag*/, bool /*sweepFlag*/, bool /*abs*/ = true) { }
- virtual void svgClosePath() = 0;
-
- private:
- void calculateArc(bool relative, double& curx, double& cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag);
- };
-
-bool SVGPathParser::parseSVG(const String& s, bool process)
-{
- const UChar* ptr = s.characters();
- const UChar* end = ptr + s.length();
-
- double contrlx, contrly, curx, cury, subpathx, subpathy, tox, toy, x1, y1, x2, y2, xc, yc;
- double px1, py1, px2, py2, px3, py3;
- bool closed = true;
-
- if (!skipOptionalSpaces(ptr, end)) // skip any leading spaces
- return false;
-
- char command = *(ptr++), lastCommand = ' ';
- if (command != 'm' && command != 'M') // path must start with moveto
- return false;
-
- subpathx = subpathy = curx = cury = contrlx = contrly = 0.0;
- while (1) {
- skipOptionalSpaces(ptr, end); // skip spaces between command and first coord
-
- bool relative = false;
-
- switch (command)
- {
- case 'm':
- relative = true;
- case 'M':
- {
- if (!parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
-
- if (process) {
- subpathx = curx = relative ? curx + tox : tox;
- subpathy = cury = relative ? cury + toy : toy;
-
- svgMoveTo(narrowPrecisionToFloat(curx), narrowPrecisionToFloat(cury), closed);
- } else
- svgMoveTo(narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), closed, !relative);
- closed = false;
- break;
- }
- case 'l':
- relative = true;
- case 'L':
- {
- if (!parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
-
- if (process) {
- curx = relative ? curx + tox : tox;
- cury = relative ? cury + toy : toy;
-
- svgLineTo(narrowPrecisionToFloat(curx), narrowPrecisionToFloat(cury));
- }
- else
- svgLineTo(narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), !relative);
- break;
- }
- case 'h':
- {
- if (!parseNumber(ptr, end, tox))
- return false;
- if (process) {
- curx = curx + tox;
- svgLineTo(narrowPrecisionToFloat(curx), narrowPrecisionToFloat(cury));
- }
- else
- svgLineToHorizontal(narrowPrecisionToFloat(tox), false);
- break;
- }
- case 'H':
- {
- if (!parseNumber(ptr, end, tox))
- return false;
- if (process) {
- curx = tox;
- svgLineTo(narrowPrecisionToFloat(curx), narrowPrecisionToFloat(cury));
- }
- else
- svgLineToHorizontal(narrowPrecisionToFloat(tox));
- break;
- }
- case 'v':
- {
- if (!parseNumber(ptr, end, toy))
- return false;
- if (process) {
- cury = cury + toy;
- svgLineTo(narrowPrecisionToFloat(curx), narrowPrecisionToFloat(cury));
- }
- else
- svgLineToVertical(narrowPrecisionToFloat(toy), false);
- break;
- }
- case 'V':
- {
- if (!parseNumber(ptr, end, toy))
- return false;
- if (process) {
- cury = toy;
- svgLineTo(narrowPrecisionToFloat(curx), narrowPrecisionToFloat(cury));
- }
- else
- svgLineToVertical(narrowPrecisionToFloat(toy));
- break;
- }
- case 'z':
- case 'Z':
- {
- // reset curx, cury for next path
- if (process) {
- curx = subpathx;
- cury = subpathy;
- }
- closed = true;
- svgClosePath();
- break;
- }
- case 'c':
- relative = true;
- case 'C':
- {
- if (!parseNumber(ptr, end, x1) || !parseNumber(ptr, end, y1) ||
- !parseNumber(ptr, end, x2) || !parseNumber(ptr, end, y2) ||
- !parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
-
- if (process) {
- px1 = relative ? curx + x1 : x1;
- py1 = relative ? cury + y1 : y1;
- px2 = relative ? curx + x2 : x2;
- py2 = relative ? cury + y2 : y2;
- px3 = relative ? curx + tox : tox;
- py3 = relative ? cury + toy : toy;
-
- svgCurveToCubic(narrowPrecisionToFloat(px1), narrowPrecisionToFloat(py1), narrowPrecisionToFloat(px2),
- narrowPrecisionToFloat(py2), narrowPrecisionToFloat(px3), narrowPrecisionToFloat(py3));
-
- contrlx = relative ? curx + x2 : x2;
- contrly = relative ? cury + y2 : y2;
- curx = relative ? curx + tox : tox;
- cury = relative ? cury + toy : toy;
- }
- else
- svgCurveToCubic(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1), narrowPrecisionToFloat(x2),
- narrowPrecisionToFloat(y2), narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), !relative);
-
- break;
- }
- case 's':
- relative = true;
- case 'S':
- {
- if (!parseNumber(ptr, end, x2) || !parseNumber(ptr, end, y2) ||
- !parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
-
- if (!(lastCommand == 'c' || lastCommand == 'C' ||
- lastCommand == 's' || lastCommand == 'S')) {
- contrlx = curx;
- contrly = cury;
- }
-
- if (process) {
- px1 = 2 * curx - contrlx;
- py1 = 2 * cury - contrly;
- px2 = relative ? curx + x2 : x2;
- py2 = relative ? cury + y2 : y2;
- px3 = relative ? curx + tox : tox;
- py3 = relative ? cury + toy : toy;
-
- svgCurveToCubic(narrowPrecisionToFloat(px1), narrowPrecisionToFloat(py1), narrowPrecisionToFloat(px2),
- narrowPrecisionToFloat(py2), narrowPrecisionToFloat(px3), narrowPrecisionToFloat(py3));
-
- contrlx = relative ? curx + x2 : x2;
- contrly = relative ? cury + y2 : y2;
- curx = relative ? curx + tox : tox;
- cury = relative ? cury + toy : toy;
- }
- else
- svgCurveToCubicSmooth(narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2),
- narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), !relative);
- break;
- }
- case 'q':
- relative = true;
- case 'Q':
- {
- if (!parseNumber(ptr, end, x1) || !parseNumber(ptr, end, y1) ||
- !parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
-
- if (process) {
- px1 = relative ? (curx + 2 * (x1 + curx)) * (1.0 / 3.0) : (curx + 2 * x1) * (1.0 / 3.0);
- py1 = relative ? (cury + 2 * (y1 + cury)) * (1.0 / 3.0) : (cury + 2 * y1) * (1.0 / 3.0);
- px2 = relative ? ((curx + tox) + 2 * (x1 + curx)) * (1.0 / 3.0) : (tox + 2 * x1) * (1.0 / 3.0);
- py2 = relative ? ((cury + toy) + 2 * (y1 + cury)) * (1.0 / 3.0) : (toy + 2 * y1) * (1.0 / 3.0);
- px3 = relative ? curx + tox : tox;
- py3 = relative ? cury + toy : toy;
-
- svgCurveToCubic(narrowPrecisionToFloat(px1), narrowPrecisionToFloat(py1), narrowPrecisionToFloat(px2),
- narrowPrecisionToFloat(py2), narrowPrecisionToFloat(px3), narrowPrecisionToFloat(py3));
-
- contrlx = relative ? curx + x1 : x1;
- contrly = relative ? cury + y1 : y1;
- curx = relative ? curx + tox : tox;
- cury = relative ? cury + toy : toy;
- }
- else
- svgCurveToQuadratic(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1),
- narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), !relative);
- break;
- }
- case 't':
- relative = true;
- case 'T':
- {
- if (!parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
- if (!(lastCommand == 'q' || lastCommand == 'Q' ||
- lastCommand == 't' || lastCommand == 'T')) {
- contrlx = curx;
- contrly = cury;
- }
-
- if (process) {
- xc = 2 * curx - contrlx;
- yc = 2 * cury - contrly;
-
- px1 = relative ? (curx + 2 * xc) * (1.0 / 3.0) : (curx + 2 * xc) * (1.0 / 3.0);
- py1 = relative ? (cury + 2 * yc) * (1.0 / 3.0) : (cury + 2 * yc) * (1.0 / 3.0);
- px2 = relative ? ((curx + tox) + 2 * xc) * (1.0 / 3.0) : (tox + 2 * xc) * (1.0 / 3.0);
- py2 = relative ? ((cury + toy) + 2 * yc) * (1.0 / 3.0) : (toy + 2 * yc) * (1.0 / 3.0);
- px3 = relative ? curx + tox : tox;
- py3 = relative ? cury + toy : toy;
-
- svgCurveToCubic(narrowPrecisionToFloat(px1), narrowPrecisionToFloat(py1), narrowPrecisionToFloat(px2),
- narrowPrecisionToFloat(py2), narrowPrecisionToFloat(px3), narrowPrecisionToFloat(py3));
-
- contrlx = xc;
- contrly = yc;
- curx = relative ? curx + tox : tox;
- cury = relative ? cury + toy : toy;
- }
- else
- svgCurveToQuadraticSmooth(narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), !relative);
- break;
- }
- case 'a':
- relative = true;
- case 'A':
- {
- bool largeArc, sweep;
- double angle, rx, ry;
- if (!parseNumber(ptr, end, rx) || !parseNumber(ptr, end, ry)
- || !parseNumber(ptr, end, angle)
- || !parseArcFlag(ptr, end, largeArc) || !parseArcFlag(ptr, end, sweep)
- || !parseNumber(ptr, end, tox) || !parseNumber(ptr, end, toy))
- return false;
-
- // Spec: radii are nonnegative numbers
- rx = fabs(rx);
- ry = fabs(ry);
-
- if (process)
- calculateArc(relative, curx, cury, angle, tox, toy, rx, ry, largeArc, sweep);
- else
- svgArcTo(narrowPrecisionToFloat(tox), narrowPrecisionToFloat(toy), narrowPrecisionToFloat(rx), narrowPrecisionToFloat(ry),
- narrowPrecisionToFloat(angle), largeArc, sweep, !relative);
- break;
- }
- default:
- // FIXME: An error should go to the JavaScript console, or the like.
- return false;
- }
- lastCommand = command;
-
- if (ptr >= end)
- return true;
-
- // Check for remaining coordinates in the current command.
- if ((*ptr == '+' || *ptr == '-' || *ptr == '.' || (*ptr >= '0' && *ptr <= '9'))
- && (command != 'z' && command != 'Z')) {
- if (command == 'M')
- command = 'L';
- else if (command == 'm')
- command = 'l';
- } else
- command = *(ptr++);
-
- if (lastCommand != 'C' && lastCommand != 'c' &&
- lastCommand != 'S' && lastCommand != 's' &&
- lastCommand != 'Q' && lastCommand != 'q' &&
- lastCommand != 'T' && lastCommand != 't') {
- contrlx = curx;
- contrly = cury;
- }
- }
-
- return false;
-}
-
-// This works by converting the SVG arc to "simple" beziers.
-// For each bezier found a svgToCurve call is done.
-// Adapted from Niko's code in kdelibs/kdecore/svgicons.
-// Maybe this can serve in some shared lib? (Rob)
-void SVGPathParser::calculateArc(bool relative, double& curx, double& cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag)
-{
- double sin_th, cos_th;
- double a00, a01, a10, a11;
- double x0, y0, x1, y1, xc, yc;
- double d, sfactor, sfactor_sq;
- double th0, th1, th_arc;
- int i, n_segs;
-
- sin_th = sin(angle * (piDouble / 180.0));
- cos_th = cos(angle * (piDouble / 180.0));
-
- double dx;
-
- if (!relative)
- dx = (curx - x) / 2.0;
- else
- dx = -x / 2.0;
-
- double dy;
-
- if (!relative)
- dy = (cury - y) / 2.0;
- else
- dy = -y / 2.0;
-
- double _x1 = cos_th * dx + sin_th * dy;
- double _y1 = -sin_th * dx + cos_th * dy;
- double Pr1 = r1 * r1;
- double Pr2 = r2 * r2;
- double Px = _x1 * _x1;
- double Py = _y1 * _y1;
-
- // Spec : check if radii are large enough
- double check = Px / Pr1 + Py / Pr2;
- if (check > 1) {
- r1 = r1 * sqrt(check);
- r2 = r2 * sqrt(check);
- }
-
- a00 = cos_th / r1;
- a01 = sin_th / r1;
- a10 = -sin_th / r2;
- a11 = cos_th / r2;
-
- x0 = a00 * curx + a01 * cury;
- y0 = a10 * curx + a11 * cury;
-
- if (!relative)
- x1 = a00 * x + a01 * y;
- else
- x1 = a00 * (curx + x) + a01 * (cury + y);
-
- if (!relative)
- y1 = a10 * x + a11 * y;
- else
- y1 = a10 * (curx + x) + a11 * (cury + y);
-
- /* (x0, y0) is current point in transformed coordinate space.
- (x1, y1) is new point in transformed coordinate space.
-
- The arc fits a unit-radius circle in this space.
- */
-
- d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
-
- sfactor_sq = 1.0 / d - 0.25;
-
- if (sfactor_sq < 0)
- sfactor_sq = 0;
-
- sfactor = sqrt(sfactor_sq);
-
- if (sweepFlag == largeArcFlag)
- sfactor = -sfactor;
-
- xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
- yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
-
- /* (xc, yc) is center of the circle. */
- th0 = atan2(y0 - yc, x0 - xc);
- th1 = atan2(y1 - yc, x1 - xc);
-
- th_arc = th1 - th0;
- if (th_arc < 0 && sweepFlag)
- th_arc += 2 * piDouble;
- else if (th_arc > 0 && !sweepFlag)
- th_arc -= 2 * piDouble;
-
- n_segs = (int) (int) ceil(fabs(th_arc / (piDouble * 0.5 + 0.001)));
-
- for (i = 0; i < n_segs; i++) {
- double sin_th, cos_th;
- double a00, a01, a10, a11;
- double x1, y1, x2, y2, x3, y3;
- double t;
- double th_half;
-
- double _th0 = th0 + i * th_arc / n_segs;
- double _th1 = th0 + (i + 1) * th_arc / n_segs;
-
- sin_th = sin(angle * (piDouble / 180.0));
- cos_th = cos(angle * (piDouble / 180.0));
-
- /* inverse transform compared with rsvg_path_arc */
- a00 = cos_th * r1;
- a01 = -sin_th * r2;
- a10 = sin_th * r1;
- a11 = cos_th * r2;
-
- th_half = 0.5 * (_th1 - _th0);
- t = (8.0 / 3.0) * sin(th_half * 0.5) * sin(th_half * 0.5) / sin(th_half);
- x1 = xc + cos(_th0) - t * sin(_th0);
- y1 = yc + sin(_th0) + t * cos(_th0);
- x3 = xc + cos(_th1);
- y3 = yc + sin(_th1);
- x2 = x3 + t * sin(_th1);
- y2 = y3 - t * cos(_th1);
-
- svgCurveToCubic(narrowPrecisionToFloat(a00 * x1 + a01 * y1), narrowPrecisionToFloat(a10 * x1 + a11 * y1),
- narrowPrecisionToFloat(a00 * x2 + a01 * y2), narrowPrecisionToFloat(a10 * x2 + a11 * y2),
- narrowPrecisionToFloat(a00 * x3 + a01 * y3), narrowPrecisionToFloat(a10 * x3 + a11 * y3));
- }
-
- if (!relative)
- curx = x;
- else
- curx += x;
-
- if (!relative)
- cury = y;
- else
- cury += y;
-}
-
-class PathBuilder : private SVGPathParser {
-public:
- bool build(Path* path, const String& d)
- {
- Path temporaryPath;
- m_path = &temporaryPath;
- if (!parseSVG(d, true))
- return false;
- temporaryPath.swap(*path);
- return true;
- }
-
-private:
- virtual void svgMoveTo(double x1, double y1, bool closed, bool abs = true)
- {
- current.setX(narrowPrecisionToFloat(abs ? x1 : current.x() + x1));
- current.setY(narrowPrecisionToFloat(abs ? y1 : current.y() + y1));
- if (closed)
- m_path->closeSubpath();
- m_path->moveTo(current);
- }
- virtual void svgLineTo(double x1, double y1, bool abs = true)
- {
- current.setX(narrowPrecisionToFloat(abs ? x1 : current.x() + x1));
- current.setY(narrowPrecisionToFloat(abs ? y1 : current.y() + y1));
- m_path->addLineTo(current);
- }
- virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true)
- {
- if (!abs) {
- x1 += current.x();
- y1 += current.y();
- x2 += current.x();
- y2 += current.y();
- }
- current.setX(narrowPrecisionToFloat(abs ? x : current.x() + x));
- current.setY(narrowPrecisionToFloat(abs ? y : current.y() + y));
- m_path->addBezierCurveTo(FloatPoint::narrowPrecision(x1, y1), FloatPoint::narrowPrecision(x2, y2), current);
- }
- virtual void svgClosePath()
- {
- m_path->closeSubpath();
- }
-
- Path* m_path;
- FloatPoint current;
-};
-
-bool pathFromSVGData(Path& path, const String& d)
-{
- PathBuilder builder;
- return builder.build(&path, d);
-}
-
-class SVGPathSegListBuilder : private SVGPathParser {
-public:
- bool build(SVGPathSegList* segList, const String& d, bool process)
- {
- bool result = parseSVG(d, process);
- size_t size = m_vector.size();
- for (size_t i = 0; i < size; ++i) {
- ExceptionCode ec;
- segList->appendItem(m_vector[i].release(), ec);
- }
- m_vector.clear();
- return result;
- }
-
-private:
- virtual void svgMoveTo(double x1, double y1, bool, bool abs = true)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegMovetoAbs(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegMovetoRel(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1)));
- }
- virtual void svgLineTo(double x1, double y1, bool abs = true)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegLinetoAbs(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegLinetoRel(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1)));
- }
- virtual void svgLineToHorizontal(double x, bool abs)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegLinetoHorizontalAbs(narrowPrecisionToFloat(x)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegLinetoHorizontalRel(narrowPrecisionToFloat(x)));
- }
- virtual void svgLineToVertical(double y, bool abs)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegLinetoVerticalAbs(narrowPrecisionToFloat(y)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegLinetoVerticalRel(narrowPrecisionToFloat(y)));
- }
- virtual void svgCurveToCubic(double x1, double y1, double x2, double y2, double x, double y, bool abs = true)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoCubicAbs(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y),
- narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1),
- narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoCubicRel(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y),
- narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1),
- narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2)));
- }
- virtual void svgCurveToCubicSmooth(double x, double y, double x2, double y2, bool abs)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs(narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2),
- narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel(narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2),
- narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)));
- }
- virtual void svgCurveToQuadratic(double x, double y, double x1, double y1, bool abs)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoQuadraticAbs(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1),
- narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoQuadraticRel(narrowPrecisionToFloat(x1), narrowPrecisionToFloat(y1),
- narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)));
- }
- virtual void svgCurveToQuadraticSmooth(double x, double y, bool abs)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)));
- else
- m_vector.append(SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)));
- }
- virtual void svgArcTo(double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs)
- {
- if (abs)
- m_vector.append(SVGPathElement::createSVGPathSegArcAbs(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y),
- narrowPrecisionToFloat(r1), narrowPrecisionToFloat(r2),
- narrowPrecisionToFloat(angle), largeArcFlag, sweepFlag));
- else
- m_vector.append(SVGPathElement::createSVGPathSegArcRel(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y),
- narrowPrecisionToFloat(r1), narrowPrecisionToFloat(r2),
- narrowPrecisionToFloat(angle), largeArcFlag, sweepFlag));
- }
- virtual void svgClosePath()
- {
- m_vector.append(SVGPathElement::createSVGPathSegClosePath());
- }
-
- Vector<RefPtr<SVGPathSeg> > m_vector;
-};
-
-bool pathSegListFromSVGData(SVGPathSegList* path, const String& d, bool process)
-{
- SVGPathSegListBuilder builder;
- return builder.build(path, d, process);
-}
-
bool parseGlyphName(const String& input, HashSet<String>& values)
{
// FIXME: Parsing error detection is missing.
diff --git a/WebCore/svg/SVGParserUtilities.h b/WebCore/svg/SVGParserUtilities.h
index cd6cbbe..69d6b12 100644
--- a/WebCore/svg/SVGParserUtilities.h
+++ b/WebCore/svg/SVGParserUtilities.h
@@ -30,12 +30,11 @@ typedef Vector<UnicodeRange> UnicodeRanges;
namespace WebCore {
- class Path;
class SVGPointList;
- class SVGPathSegList;
bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip = true);
bool parseNumberOptionalNumber(const String& s, float& h, float& v);
+ bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag);
// SVG allows several different whitespace characters:
// http://www.w3.org/TR/SVG/paths.html#PathDataBNF
@@ -65,8 +64,6 @@ namespace WebCore {
}
bool pointsListFromSVGData(SVGPointList* pointsList, const String& points);
- bool pathFromSVGData(Path& path, const String& d);
- bool pathSegListFromSVGData(SVGPathSegList* pathSegList, const String& d, bool process = false);
Vector<String> parseDelimitedString(const String& input, const char seperator);
bool parseKerningUnicodeString(const String& input, UnicodeRanges&, HashSet<String>& stringList);
bool parseGlyphName(const String& input, HashSet<String>& values);
diff --git a/WebCore/svg/SVGPathBuilder.cpp b/WebCore/svg/SVGPathBuilder.cpp
new file mode 100644
index 0000000..916c7d0
--- /dev/null
+++ b/WebCore/svg/SVGPathBuilder.cpp
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+
+#if ENABLE(SVG)
+#include "SVGPathBuilder.h"
+
+#include "SVGPathParser.h"
+
+namespace WebCore {
+
+SVGPathBuilder::SVGPathBuilder(Path& path)
+ : m_path(path)
+{
+}
+
+bool SVGPathBuilder::build(const String& d)
+{
+ SVGPathParser parser(this);
+ return parser.parsePathDataString(d, true);
+}
+
+void SVGPathBuilder::moveTo(const FloatPoint& point, bool closed, PathCoordinateMode mode)
+{
+ m_current = mode == AbsoluteCoordinates ? point : m_current + point;
+ if (closed)
+ m_path.closeSubpath();
+ m_path.moveTo(m_current);
+}
+
+void SVGPathBuilder::lineTo(const FloatPoint& point, PathCoordinateMode mode)
+{
+ m_current = mode == AbsoluteCoordinates ? point : m_current + point;
+ m_path.addLineTo(m_current);
+}
+
+void SVGPathBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& point, PathCoordinateMode mode)
+{
+ if (mode == RelativeCoordinates) {
+ m_path.addBezierCurveTo(m_current + point1, m_current + point2, m_current + point);
+ m_current += point;
+ } else {
+ m_current = point;
+ m_path.addBezierCurveTo(point1, point2, m_current);
+ }
+}
+
+void SVGPathBuilder::closePath()
+{
+ m_path.closeSubpath();
+}
+
+}
+
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGPathBuilder.h b/WebCore/svg/SVGPathBuilder.h
new file mode 100644
index 0000000..c47e69d
--- /dev/null
+++ b/WebCore/svg/SVGPathBuilder.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SVGPathBuilder_h
+#define SVGPathBuilder_h
+
+#if ENABLE(SVG)
+#include "FloatPoint.h"
+#include "Path.h"
+#include "SVGPathConsumer.h"
+
+namespace WebCore {
+
+class SVGPathBuilder : private SVGPathConsumer {
+public:
+ SVGPathBuilder(Path&);
+ bool build(const String&);
+
+private:
+ // Used in UnalteredParisng/NormalizedParsing modes.
+ virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
+ virtual void lineTo(const FloatPoint&, PathCoordinateMode);
+ virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
+ virtual void closePath();
+
+private:
+ // Only used in UnalteredParsing mode.
+ virtual void lineToHorizontal(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
+ virtual void lineToVertical(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
+ virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
+ virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
+ virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
+ virtual void arcTo(const FloatPoint&, float, float, float, bool, bool, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
+
+ Path& m_path;
+ FloatPoint m_current;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif // SVGPathBuilder_h
diff --git a/WebCore/svg/SVGPathConsumer.h b/WebCore/svg/SVGPathConsumer.h
new file mode 100644
index 0000000..7f2fb39
--- /dev/null
+++ b/WebCore/svg/SVGPathConsumer.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SVGPathConsumer_h
+#define SVGPathConsumer_h
+
+#if ENABLE(SVG)
+#include "FloatPoint.h"
+
+namespace WebCore {
+
+enum PathCoordinateMode {
+ AbsoluteCoordinates,
+ RelativeCoordinates
+};
+
+enum PathParsingMode {
+ NormalizedParsing,
+ UnalteredParsing
+};
+
+class SVGPathConsumer {
+public:
+ // Used in UnalteredParisng/NormalizedParsing modes.
+ virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode) = 0;
+ virtual void lineTo(const FloatPoint&, PathCoordinateMode) = 0;
+ virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
+ virtual void closePath() = 0;
+
+public:
+ // Only used in UnalteredParsing mode.
+ virtual void lineToHorizontal(float, PathCoordinateMode) = 0;
+ virtual void lineToVertical(float, PathCoordinateMode) = 0;
+ virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
+ virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
+ virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode) = 0;
+ virtual void arcTo(const FloatPoint&, float, float, float, bool largeArcFlag, bool sweepFlag, PathCoordinateMode) = 0;
+
+protected:
+ SVGPathConsumer() { }
+ virtual ~SVGPathConsumer() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif // SVGPathConsumer_h
diff --git a/WebCore/svg/SVGPathElement.cpp b/WebCore/svg/SVGPathElement.cpp
index 40996d1..803ce14 100644
--- a/WebCore/svg/SVGPathElement.cpp
+++ b/WebCore/svg/SVGPathElement.cpp
@@ -25,8 +25,8 @@
#include "Attribute.h"
#include "RenderPath.h"
+#include "RenderSVGResource.h"
#include "SVGNames.h"
-#include "SVGParserUtilities.h"
#include "SVGPathSegArc.h"
#include "SVGPathSegClosePath.h"
#include "SVGPathSegCurvetoCubic.h"
@@ -37,6 +37,7 @@
#include "SVGPathSegLinetoHorizontal.h"
#include "SVGPathSegLinetoVertical.h"
#include "SVGPathSegList.h"
+#include "SVGPathSegListBuilder.h"
#include "SVGPathSegMoveto.h"
#include "SVGSVGElement.h"
@@ -172,7 +173,8 @@ void SVGPathElement::parseMappedAttribute(Attribute* attr)
if (attr->name() == SVGNames::dAttr) {
ExceptionCode ec;
pathSegList()->clear(ec);
- if (!pathSegListFromSVGData(pathSegList(), attr->value(), true))
+ SVGPathSegListBuilder parser(pathSegList());
+ if (!parser.build(attr->value(), NormalizedParsing))
document()->accessSVGExtensions()->reportError("Problem parsing d=\"" + attr->value() + "\"");
} else if (attr->name() == SVGNames::pathLengthAttr) {
setPathLengthBaseValue(attr->value().toFloat());
@@ -199,13 +201,13 @@ void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
if (attrName == SVGNames::dAttr) {
renderer->setNeedsPathUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
@@ -213,7 +215,7 @@ void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
|| SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGPathElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGPathParser.cpp b/WebCore/svg/SVGPathParser.cpp
new file mode 100644
index 0000000..3d937c0
--- /dev/null
+++ b/WebCore/svg/SVGPathParser.cpp
@@ -0,0 +1,509 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+
+#if ENABLE(SVG)
+#include "SVGPathParser.h"
+
+#include "AffineTransform.h"
+#include "SVGParserUtilities.h"
+#include <wtf/MathExtras.h>
+
+static const float gOneOverThree = 1 / 3.f;
+
+namespace WebCore {
+
+SVGPathParser::SVGPathParser(SVGPathConsumer* consumer)
+ : m_consumer(consumer)
+{
+}
+
+SVGPathParser::~SVGPathParser()
+{
+}
+
+void SVGPathParser::parseClosePathSegment()
+{
+ // Reset m_currentPoint for the next path.
+ if (m_normalized)
+ m_currentPoint = m_subPathPoint;
+ m_pathClosed = true;
+ m_consumer->closePath();
+}
+
+bool SVGPathParser::parseMoveToSegment()
+{
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, toX) || !parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ FloatPoint toPoint(toX, toY);
+ if (m_normalized) {
+ if (m_mode == RelativeCoordinates)
+ m_currentPoint += toPoint;
+ else
+ m_currentPoint = toPoint;
+ m_subPathPoint = m_currentPoint;
+ m_consumer->moveTo(m_currentPoint, m_pathClosed, AbsoluteCoordinates);
+ } else
+ m_consumer->moveTo(toPoint, m_pathClosed, m_mode);
+ m_pathClosed = false;
+ return true;
+}
+
+bool SVGPathParser::parseLineToSegment()
+{
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, toX) || !parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ FloatPoint toPoint(toX, toY);
+ if (m_normalized) {
+ if (m_mode == RelativeCoordinates)
+ m_currentPoint += toPoint;
+ else
+ m_currentPoint = toPoint;
+ m_consumer->lineTo(m_currentPoint, AbsoluteCoordinates);
+ } else
+ m_consumer->lineTo(toPoint, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseLineToHorizontalSegment()
+{
+ float toX;
+ if (!parseNumber(m_ptr, m_end, toX))
+ return false;
+
+ if (m_normalized) {
+ if (m_mode == RelativeCoordinates)
+ m_currentPoint.move(toX, 0);
+ else
+ m_currentPoint.setX(toX);
+ m_consumer->lineTo(m_currentPoint, AbsoluteCoordinates);
+ } else
+ m_consumer->lineToHorizontal(toX, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseLineToVerticalSegment()
+{
+ float toY;
+ if (!parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ if (m_normalized) {
+ if (m_mode == RelativeCoordinates)
+ m_currentPoint.move(0, toY);
+ else
+ m_currentPoint.setY(toY);
+ m_consumer->lineTo(m_currentPoint, AbsoluteCoordinates);
+ } else
+ m_consumer->lineToVertical(toY, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseCurveToCubicSegment()
+{
+ float x1;
+ float y1;
+ float x2;
+ float y2;
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, x1)
+ || !parseNumber(m_ptr, m_end, y1)
+ || !parseNumber(m_ptr, m_end, x2)
+ || !parseNumber(m_ptr, m_end, y2)
+ || !parseNumber(m_ptr, m_end, toX)
+ || !parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ FloatPoint point1(x1, y1);
+ FloatPoint point2(x2, y2);
+ FloatPoint point3(toX, toY);
+ if (m_normalized) {
+ if (m_mode == RelativeCoordinates) {
+ point1 += m_currentPoint;
+ point2 += m_currentPoint;
+ point3 += m_currentPoint;
+ }
+ m_consumer->curveToCubic(point1, point2, point3, AbsoluteCoordinates);
+
+ m_controlPoint = point2;
+ m_currentPoint = point3;
+ } else
+ m_consumer->curveToCubic(point1, point2, point3, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseCurveToCubicSmoothSegment()
+{
+ float x2;
+ float y2;
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, x2)
+ || !parseNumber(m_ptr, m_end, y2)
+ || !parseNumber(m_ptr, m_end, toX)
+ || !parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ if (m_lastCommand != 'c'
+ && m_lastCommand != 'C'
+ && m_lastCommand != 's'
+ && m_lastCommand != 'S')
+ m_controlPoint = m_currentPoint;
+
+ FloatPoint point2(x2, y2);
+ FloatPoint point3(toX, toY);
+ if (m_normalized) {
+ FloatPoint point1 = m_currentPoint;
+ point1.scale(2, 2);
+ point1.move(-m_controlPoint.x(), -m_controlPoint.y());
+ if (m_mode == RelativeCoordinates) {
+ point2 += m_currentPoint;
+ point3 += m_currentPoint;
+ }
+
+ m_consumer->curveToCubic(point1, point2, point3, AbsoluteCoordinates);
+
+ m_controlPoint = point2;
+ m_currentPoint = point3;
+ } else
+ m_consumer->curveToCubicSmooth(point2, point3, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseCurveToQuadraticSegment()
+{
+ float x1;
+ float y1;
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, x1)
+ || !parseNumber(m_ptr, m_end, y1)
+ || !parseNumber(m_ptr, m_end, toX)
+ || !parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ FloatPoint point3(toX, toY);
+ if (m_normalized) {
+ FloatPoint point1 = m_currentPoint;
+ point1.move(2 * x1, 2 * y1);
+ FloatPoint point2(toX + 2 * x1, toY + 2 * y1);
+ if (m_mode == RelativeCoordinates) {
+ point1.move(2 * m_currentPoint.x(), 2 * m_currentPoint.y());
+ point2.move(3 * m_currentPoint.x(), 3 * m_currentPoint.y());
+ point3 += m_currentPoint;
+ }
+ point1.scale(gOneOverThree, gOneOverThree);
+ point2.scale(gOneOverThree, gOneOverThree);
+
+ m_consumer->curveToCubic(point1, point2, point3, AbsoluteCoordinates);
+
+ m_controlPoint = FloatPoint(x1, y1);
+ if (m_mode == RelativeCoordinates)
+ m_controlPoint += m_currentPoint;
+ m_currentPoint = point3;
+ } else
+ m_consumer->curveToQuadratic(FloatPoint(x1, y1), point3, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseCurveToQuadraticSmoothSegment()
+{
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, toX) || !parseNumber(m_ptr, m_end, toY))
+ return false;
+ if (m_lastCommand != 'q'
+ && m_lastCommand != 'Q'
+ && m_lastCommand != 't'
+ && m_lastCommand != 'T')
+ m_controlPoint = m_currentPoint;
+
+ if (m_normalized) {
+ FloatPoint cubicPoint = m_currentPoint;
+ cubicPoint.scale(2, 2);
+ cubicPoint.move(-m_controlPoint.x(), -m_controlPoint.y());
+ FloatPoint point1(m_currentPoint.x() + 2 * cubicPoint.x(), m_currentPoint.y() + 2 * cubicPoint.y());
+ FloatPoint point2(toX + 2 * cubicPoint.x(), toY + 2 * cubicPoint.y());
+ FloatPoint point3(toX, toY);
+ if (m_mode == RelativeCoordinates) {
+ point2 += m_currentPoint;
+ point3 += m_currentPoint;
+ }
+ point1.scale(gOneOverThree, gOneOverThree);
+ point2.scale(gOneOverThree, gOneOverThree);
+
+ m_consumer->curveToCubic(point1, point2, point3, AbsoluteCoordinates);
+
+ m_controlPoint = cubicPoint;
+ m_currentPoint = point3;
+ } else
+ m_consumer->curveToQuadraticSmooth(FloatPoint(toX, toY), m_mode);
+ return true;
+}
+
+bool SVGPathParser::parseArcToSegment()
+{
+ bool largeArc;
+ bool sweep;
+ float angle;
+ float rx;
+ float ry;
+ float toX;
+ float toY;
+ if (!parseNumber(m_ptr, m_end, rx)
+ || !parseNumber(m_ptr, m_end, ry)
+ || !parseNumber(m_ptr, m_end, angle)
+ || !parseArcFlag(m_ptr, m_end, largeArc)
+ || !parseArcFlag(m_ptr, m_end, sweep)
+ || !parseNumber(m_ptr, m_end, toX)
+ || !parseNumber(m_ptr, m_end, toY))
+ return false;
+
+ FloatPoint point2 = FloatPoint(toX, toY);
+ // If rx = 0 or ry = 0 then this arc is treated as a straight line segment (a "lineto") joining the endpoints.
+ // http://www.w3.org/TR/SVG/implnote.html#ArcOutOfRangeParameters
+ rx = fabsf(rx);
+ ry = fabsf(ry);
+ if (!rx || !ry) {
+ if (m_normalized) {
+ if (m_mode == RelativeCoordinates)
+ m_currentPoint += point2;
+ else
+ m_currentPoint = point2;
+ m_consumer->lineTo(m_currentPoint, AbsoluteCoordinates);
+ } else
+ m_consumer->lineTo(point2, m_mode);
+ return true;
+ }
+
+ if (m_normalized) {
+ FloatPoint point1 = m_currentPoint;
+ if (m_mode == RelativeCoordinates)
+ point2 += m_currentPoint;
+ m_currentPoint = point2;
+ return decomposeArcToCubic(angle, rx, ry, point1, point2, largeArc, sweep);
+ }
+ m_consumer->arcTo(point2, rx, ry, angle, largeArc, sweep, m_mode);
+ return true;
+}
+
+bool SVGPathParser::parsePathDataString(const String& s, bool normalized)
+{
+ m_ptr = s.characters();
+ m_end = m_ptr + s.length();
+ m_normalized = normalized;
+
+ m_controlPoint = FloatPoint();
+ m_currentPoint = FloatPoint();
+ m_subPathPoint = FloatPoint();
+ m_pathClosed = true;
+
+ // Skip any leading spaces.
+ if (!skipOptionalSpaces(m_ptr, m_end))
+ return false;
+
+ char command = *(m_ptr++);
+ m_lastCommand = ' ';
+ // Path must start with moveto.
+ if (command != 'm' && command != 'M')
+ return false;
+
+ while (true) {
+ // Skip spaces between command and first coordinate.
+ skipOptionalSpaces(m_ptr, m_end);
+ m_mode = command >= 'a' && command <= 'z' ? RelativeCoordinates : AbsoluteCoordinates;
+ switch (command) {
+ case 'm':
+ case 'M':
+ if (!parseMoveToSegment())
+ return false;
+ break;
+ case 'l':
+ case 'L':
+ if (!parseLineToSegment())
+ return false;
+ break;
+ case 'h':
+ case 'H':
+ if (!parseLineToHorizontalSegment())
+ return false;
+ break;
+ case 'v':
+ case 'V':
+ if (!parseLineToVerticalSegment())
+ return false;
+ break;
+ case 'z':
+ case 'Z':
+ parseClosePathSegment();
+ break;
+ case 'c':
+ case 'C':
+ if (!parseCurveToCubicSegment())
+ return false;
+ break;
+ case 's':
+ case 'S':
+ if (!parseCurveToCubicSmoothSegment())
+ return false;
+ break;
+ case 'q':
+ case 'Q':
+ if (!parseCurveToQuadraticSegment())
+ return false;
+ break;
+ case 't':
+ case 'T':
+ if (!parseCurveToQuadraticSmoothSegment())
+ return false;
+ break;
+ case 'a':
+ case 'A':
+ if (!parseArcToSegment())
+ return false;
+ break;
+ default:
+ return false;
+ }
+ m_lastCommand = command;
+
+ if (m_ptr >= m_end)
+ return true;
+
+ // Check for remaining coordinates in the current command.
+ if ((*m_ptr == '+' || *m_ptr == '-' || *m_ptr == '.' || (*m_ptr >= '0' && *m_ptr <= '9'))
+ && command != 'z' && command != 'Z') {
+ if (command == 'M')
+ command = 'L';
+ else if (command == 'm')
+ command = 'l';
+ } else
+ command = *(m_ptr++);
+
+ if (m_lastCommand != 'C' && m_lastCommand != 'c'
+ && m_lastCommand != 'S' && m_lastCommand != 's'
+ && m_lastCommand != 'Q' && m_lastCommand != 'q'
+ && m_lastCommand != 'T' && m_lastCommand != 't')
+ m_controlPoint = m_currentPoint;
+ }
+
+ return false;
+}
+
+// This works by converting the SVG arc to "simple" beziers.
+// Partly adapted from Niko's code in kdelibs/kdecore/svgicons.
+// See also SVG implementation notes: http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter
+bool SVGPathParser::decomposeArcToCubic(float angle, float rx, float ry, FloatPoint& point1, FloatPoint& point2, bool largeArcFlag, bool sweepFlag)
+{
+ FloatSize midPointDistance = point1 - point2;
+ midPointDistance.scale(0.5f);
+
+ AffineTransform pointTransform;
+ pointTransform.rotate(-angle);
+
+ FloatPoint transformedMidPoint = pointTransform.mapPoint(FloatPoint(midPointDistance.width(), midPointDistance.height()));
+ float squareRx = rx * rx;
+ float squareRy = ry * ry;
+ float squareX = transformedMidPoint.x() * transformedMidPoint.x();
+ float squareY = transformedMidPoint.y() * transformedMidPoint.y();
+
+ // Check if the radii are big enough to draw the arc, scale radii if not.
+ // http://www.w3.org/TR/SVG/implnote.html#ArcCorrectionOutOfRangeRadii
+ float radiiScale = squareX / squareRx + squareY / squareRy;
+ if (radiiScale > 1) {
+ rx *= sqrtf(radiiScale);
+ ry *= sqrtf(radiiScale);
+ }
+
+ pointTransform.makeIdentity();
+ pointTransform.scale(1 / rx, 1 / ry);
+ pointTransform.rotate(-angle);
+
+ point1 = pointTransform.mapPoint(point1);
+ point2 = pointTransform.mapPoint(point2);
+ FloatSize delta = point2 - point1;
+
+ float d = delta.width() * delta.width() + delta.height() * delta.height();
+ float scaleFactorSquared = std::max(1 / d - 0.25f, 0.f);
+
+ float scaleFactor = sqrtf(scaleFactorSquared);
+ if (sweepFlag == largeArcFlag)
+ scaleFactor = -scaleFactor;
+
+ delta.scale(scaleFactor);
+ FloatPoint centerPoint = FloatPoint(0.5f * (point1.x() + point2.x()) - delta.height(),
+ 0.5f * (point1.y() + point2.y()) + delta.width());
+
+ float theta1 = atan2f(point1.y() - centerPoint.y(), point1.x() - centerPoint.x());
+ float theta2 = atan2f(point2.y() - centerPoint.y(), point2.x() - centerPoint.x());
+
+ float thetaArc = theta2 - theta1;
+ if (thetaArc < 0 && sweepFlag)
+ thetaArc += 2 * piFloat;
+ else if (thetaArc > 0 && !sweepFlag)
+ thetaArc -= 2 * piFloat;
+
+ pointTransform.makeIdentity();
+ pointTransform.rotate(angle);
+ pointTransform.scale(rx, ry);
+
+ // Some results of atan2 on some platform implementations are not exact enough. So that we get more
+ // cubic curves than expected here. Adding 0.001f reduces the count of sgements to the correct count.
+ int segments = ceilf(fabsf(thetaArc / (piOverTwoFloat + 0.001f)));
+ for (int i = 0; i < segments; ++i) {
+ float startTheta = theta1 + i * thetaArc / segments;
+ float endTheta = theta1 + (i + 1) * thetaArc / segments;
+
+ float t = (8 / 6.f) * tanf(0.25f * (endTheta - startTheta));
+ if (!isfinite(t))
+ return false;
+ float sinStartTheta = sinf(startTheta);
+ float cosStartTheta = cosf(startTheta);
+ float sinEndTheta = sinf(endTheta);
+ float cosEndTheta = cosf(endTheta);
+
+ point1 = FloatPoint(cosStartTheta - t * sinStartTheta, sinStartTheta + t * cosStartTheta);
+ point1.move(centerPoint.x(), centerPoint.y());
+ FloatPoint point3 = FloatPoint(cosEndTheta, sinEndTheta);
+ point3.move(centerPoint.x(), centerPoint.y());
+ point2 = point3;
+ point2.move(t * sinEndTheta, -t * cosEndTheta);
+
+ m_consumer->curveToCubic(pointTransform.mapPoint(point1), pointTransform.mapPoint(point2),
+ pointTransform.mapPoint(point3), AbsoluteCoordinates);
+ }
+ return true;
+}
+
+}
+
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGPathParser.h b/WebCore/svg/SVGPathParser.h
new file mode 100644
index 0000000..f39094b
--- /dev/null
+++ b/WebCore/svg/SVGPathParser.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SVGPathParser_h
+#define SVGPathParser_h
+
+#if ENABLE(SVG)
+#include "PlatformString.h"
+#include "SVGPathConsumer.h"
+
+namespace WebCore {
+
+class SVGPathParser {
+public:
+ SVGPathParser(SVGPathConsumer*);
+ ~SVGPathParser();
+
+ bool parsePathDataString(const String&, bool normalized = false);
+
+private:
+ bool decomposeArcToCubic(float, float, float, FloatPoint&, FloatPoint&, bool largeArcFlag, bool sweepFlag);
+ void parseClosePathSegment();
+ bool parseMoveToSegment();
+ bool parseLineToSegment();
+ bool parseLineToHorizontalSegment();
+ bool parseLineToVerticalSegment();
+ bool parseCurveToCubicSegment();
+ bool parseCurveToCubicSmoothSegment();
+ bool parseCurveToQuadraticSegment();
+ bool parseCurveToQuadraticSmoothSegment();
+ bool parseArcToSegment();
+
+ SVGPathConsumer* m_consumer;
+ PathCoordinateMode m_mode;
+ const UChar* m_ptr;
+ const UChar* m_end;
+ char m_lastCommand;
+ bool m_normalized;
+ bool m_pathClosed;
+ FloatPoint m_controlPoint;
+ FloatPoint m_currentPoint;
+ FloatPoint m_subPathPoint;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif // SVGPathParser_h
diff --git a/WebCore/svg/SVGPathSegListBuilder.cpp b/WebCore/svg/SVGPathSegListBuilder.cpp
new file mode 100644
index 0000000..4434c2e
--- /dev/null
+++ b/WebCore/svg/SVGPathSegListBuilder.cpp
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+
+#if ENABLE(SVG)
+#include "SVGPathSegListBuilder.h"
+
+#include "ExceptionCode.h"
+#include "SVGPathElement.h"
+#include "SVGPathParser.h"
+#include "SVGPathSegArc.h"
+#include "SVGPathSegClosePath.h"
+#include "SVGPathSegCurvetoCubic.h"
+#include "SVGPathSegCurvetoCubicSmooth.h"
+#include "SVGPathSegCurvetoQuadratic.h"
+#include "SVGPathSegCurvetoQuadraticSmooth.h"
+#include "SVGPathSegLineto.h"
+#include "SVGPathSegLinetoHorizontal.h"
+#include "SVGPathSegLinetoVertical.h"
+#include "SVGPathSegList.h"
+#include "SVGPathSegMoveto.h"
+
+namespace WebCore {
+
+SVGPathSegListBuilder::SVGPathSegListBuilder(SVGPathSegList* segList)
+ : m_pathSegList(segList)
+{
+}
+
+bool SVGPathSegListBuilder::build(const String& d, PathParsingMode parsingMode)
+{
+ if (!m_pathSegList)
+ return false;
+
+ SVGPathParser parser(this);
+ return parser.parsePathDataString(d, parsingMode == NormalizedParsing);
+}
+
+void SVGPathSegListBuilder::moveTo(const FloatPoint& point, bool, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegMovetoAbs(point.x(), point.y()), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegMovetoRel(point.x(), point.y()), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::lineTo(const FloatPoint& point, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegLinetoAbs(point.x(), point.y()), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegLinetoRel(point.x(), point.y()), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::lineToHorizontal(float x, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegLinetoHorizontalAbs(x), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegLinetoHorizontalRel(x), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::lineToVertical(float y, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegLinetoVerticalAbs(y), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegLinetoVerticalRel(y), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& point, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoCubicAbs(point.x(), point.y(), point1.x(), point1.y(), point2.x(), point2.y()), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoCubicRel(point.x(), point.y(), point1.x(), point1.y(), point2.x(), point2.y()), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::curveToCubicSmooth(const FloatPoint& point, const FloatPoint& point2, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs(point2.x(), point2.y(), point.x(), point.y()), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel(point2.x(), point2.y(), point.x(), point.y()), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::curveToQuadratic(const FloatPoint& point, const FloatPoint& point1, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoQuadraticAbs(point1.x(), point1.y(), point.x(), point.y()), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoQuadraticRel(point1.x(), point1.y(), point.x(), point.y()), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::curveToQuadraticSmooth(const FloatPoint& point, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs(point.x(), point.y()), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel(point.x(), point.y()), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::arcTo(const FloatPoint& point, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, PathCoordinateMode mode)
+{
+ ExceptionCode ec = 0;
+ if (mode == AbsoluteCoordinates)
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegArcAbs(point.x(), point.y(), r1, r2, angle, largeArcFlag, sweepFlag), ec);
+ else
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegArcRel(point.x(), point.y(), r1, r2, angle, largeArcFlag, sweepFlag), ec);
+ ASSERT(!ec);
+}
+
+void SVGPathSegListBuilder::closePath()
+{
+ ExceptionCode ec = 0;
+ m_pathSegList->appendItem(SVGPathElement::createSVGPathSegClosePath(), ec);
+ ASSERT(!ec);
+}
+
+}
+
+#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGPathSegListBuilder.h b/WebCore/svg/SVGPathSegListBuilder.h
new file mode 100644
index 0000000..71d0dde
--- /dev/null
+++ b/WebCore/svg/SVGPathSegListBuilder.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2002, 2003 The Karbon Developers
+ * 2006 Alexander Kellett <lypanov@kde.org>
+ * 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyrigth (C) 2007, 2009 Apple, Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SVGPathSegListBuilder_h
+#define SVGPathSegListBuilder_h
+
+#if ENABLE(SVG)
+#include "FloatPoint.h"
+#include "SVGPathConsumer.h"
+#include "SVGPathSegList.h"
+
+namespace WebCore {
+
+class SVGPathSegListBuilder : private SVGPathConsumer {
+public:
+ SVGPathSegListBuilder(SVGPathSegList*);
+ bool build(const String&, PathParsingMode);
+
+private:
+ // Used in UnalteredParisng/NormalizedParsing modes.
+ virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
+ virtual void lineTo(const FloatPoint&, PathCoordinateMode);
+ virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
+ virtual void closePath();
+
+private:
+ // Only used in UnalteredParsing mode.
+ virtual void lineToHorizontal(float, PathCoordinateMode);
+ virtual void lineToVertical(float, PathCoordinateMode);
+ virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
+ virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
+ virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
+ virtual void arcTo(const FloatPoint&, float, float, float, bool largeArcFlag, bool sweepFlag, PathCoordinateMode);
+
+ SVGPathSegList* m_pathSegList;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif // SVGPathSegListBuilder_h
diff --git a/WebCore/svg/SVGPolyElement.cpp b/WebCore/svg/SVGPolyElement.cpp
index 6f88b22..2996dd7 100644
--- a/WebCore/svg/SVGPolyElement.cpp
+++ b/WebCore/svg/SVGPolyElement.cpp
@@ -27,6 +27,7 @@
#include "Document.h"
#include "FloatPoint.h"
#include "RenderPath.h"
+#include "RenderSVGResource.h"
#include "SVGNames.h"
#include "SVGParserUtilities.h"
#include "SVGPointList.h"
@@ -94,20 +95,20 @@ void SVGPolyElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (attrName == SVGNames::pointsAttr) {
renderer->setNeedsPathUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGPolyElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGRectElement.cpp b/WebCore/svg/SVGRectElement.cpp
index 3e559ed..a848246 100644
--- a/WebCore/svg/SVGRectElement.cpp
+++ b/WebCore/svg/SVGRectElement.cpp
@@ -25,6 +25,7 @@
#include "Attribute.h"
#include "RenderPath.h"
+#include "RenderSVGResource.h"
#include "SVGLength.h"
#include "SVGNames.h"
@@ -101,20 +102,20 @@ void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (isLengthAttribute) {
renderer->setNeedsPathUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
return;
}
if (SVGTests::isKnownAttribute(attrName)
|| SVGLangSpace::isKnownAttribute(attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName))
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGRectElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index 6d88c37..c513b98 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -35,6 +35,7 @@
#include "FloatRect.h"
#include "FrameView.h"
#include "HTMLNames.h"
+#include "RenderSVGResource.h"
#include "RenderSVGRoot.h"
#include "RenderSVGViewportContainer.h"
#include "SMILTimeContainer.h"
@@ -204,8 +205,8 @@ void SVGSVGElement::setCurrentScale(float scale)
}
m_scale = scale;
- if (renderer())
- renderer()->setNeedsLayout(true);
+ if (RenderObject* object = renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
}
FloatPoint SVGSVGElement::currentTranslate() const
@@ -320,7 +321,7 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName)
|| SVGExternalResourcesRequired::isKnownAttribute(attrName)
|| SVGZoomAndPan::isKnownAttribute(attrName)
|| SVGStyledLocatableElement::isKnownAttribute(attrName))
- renderer()->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer());
}
void SVGSVGElement::synchronizeProperty(const QualifiedName& attrName)
@@ -579,7 +580,9 @@ void SVGSVGElement::inheritViewAttributes(SVGViewElement* viewElement)
if (viewElement->hasAttribute(SVGNames::zoomAndPanAttr))
currentView()->setZoomAndPan(viewElement->zoomAndPan());
- renderer()->setNeedsLayout(true);
+
+ if (RenderObject* object = renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
}
void SVGSVGElement::documentWillBecomeInactive()
diff --git a/WebCore/svg/SVGStopElement.cpp b/WebCore/svg/SVGStopElement.cpp
index 672b082..36d4338 100644
--- a/WebCore/svg/SVGStopElement.cpp
+++ b/WebCore/svg/SVGStopElement.cpp
@@ -26,6 +26,7 @@
#include "Attribute.h"
#include "Document.h"
#include "RenderSVGGradientStop.h"
+#include "RenderSVGResource.h"
#include "SVGGradientElement.h"
#include "SVGNames.h"
@@ -33,7 +34,7 @@ namespace WebCore {
SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* doc)
: SVGStyledElement(tagName, doc)
- , m_offset(0.0f)
+ , m_offset(0)
{
}
@@ -53,6 +54,17 @@ void SVGStopElement::parseMappedAttribute(Attribute* attr)
SVGStyledElement::parseMappedAttribute(attr);
}
+void SVGStopElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+ SVGStyledElement::svgAttributeChanged(attrName);
+
+ if (!renderer())
+ return;
+
+ if (attrName == SVGNames::offsetAttr)
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer());
+}
+
void SVGStopElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGStyledElement::synchronizeProperty(attrName);
diff --git a/WebCore/svg/SVGStopElement.h b/WebCore/svg/SVGStopElement.h
index db5eff0..96c3294 100644
--- a/WebCore/svg/SVGStopElement.h
+++ b/WebCore/svg/SVGStopElement.h
@@ -33,6 +33,7 @@ namespace WebCore {
virtual ~SVGStopElement();
virtual void parseMappedAttribute(Attribute*);
+ virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
Color stopColorIncludingOpacity() const;
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index 6b55683..6c2993c 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -246,14 +246,6 @@ void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName)
object->toRenderSVGResourceContainer()->idChanged();
}
- if (!document()->parsing() && object) {
- // If we're the child of a resource element, tell the resource (and eventually its resources) that we've changed.
- invalidateResourcesInAncestorChain();
-
- // If we're referencing resources, tell them we've changed.
- RenderSVGResource::invalidateAllResourcesOfRenderer(object);
- }
-
// Invalidate all SVGElementInstances associated with us
SVGElementInstance::invalidateAllInstancesOfElement(this);
}
@@ -266,27 +258,11 @@ void SVGStyledElement::synchronizeProperty(const QualifiedName& attrName)
synchronizeClassName();
}
-void SVGStyledElement::invalidateResourcesInAncestorChain() const
-{
- Node* node = parentNode();
- while (node) {
- if (!node->isSVGElement())
- break;
-
- SVGElement* element = static_cast<SVGElement*>(node);
- if (SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(element->isStyled() ? element : 0)) {
- styledElement->invalidateResourceClients();
-
- // If we found the first resource in the ancestor chain, immediately stop.
- break;
- }
-
- node = node->parentNode();
- }
-}
-
void SVGStyledElement::invalidateResourceClients()
{
+ if (document()->parsing())
+ return;
+
RenderObject* object = renderer();
if (!object)
return;
diff --git a/WebCore/svg/SVGStyledElement.h b/WebCore/svg/SVGStyledElement.h
index dcfc96a..4982908 100644
--- a/WebCore/svg/SVGStyledElement.h
+++ b/WebCore/svg/SVGStyledElement.h
@@ -65,7 +65,6 @@ namespace WebCore {
PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle);
void invalidateResourceClients();
- void invalidateResourcesInAncestorChain() const;
bool instanceUpdatesBlocked() const;
void setInstanceUpdatesBlocked(bool);
diff --git a/WebCore/svg/SVGTRefElement.cpp b/WebCore/svg/SVGTRefElement.cpp
index 4faa633..4c593ca 100644
--- a/WebCore/svg/SVGTRefElement.cpp
+++ b/WebCore/svg/SVGTRefElement.cpp
@@ -24,6 +24,7 @@
#include "SVGTRefElement.h"
#include "RenderSVGInline.h"
+#include "RenderSVGResource.h"
#include "SVGDocument.h"
#include "SVGNames.h"
#include "Text.h"
@@ -69,7 +70,7 @@ void SVGTRefElement::svgAttributeChanged(const QualifiedName& attrName)
return;
if (SVGURIReference::isKnownAttribute(attrName))
- renderer()->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer());
}
void SVGTRefElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index 0aba04b..7269adf 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -26,6 +26,7 @@
#include "AffineTransform.h"
#include "Attribute.h"
#include "FloatRect.h"
+#include "RenderSVGResource.h"
#include "RenderSVGText.h"
#include "SVGLengthList.h"
#include "SVGRenderStyle.h"
@@ -120,7 +121,7 @@ void SVGTextElement::svgAttributeChanged(const QualifiedName& attrName)
if (SVGTransformable::isKnownAttribute(attrName)) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
}
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index 288edfd..732185d 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -25,6 +25,7 @@
#include "AffineTransform.h"
#include "Attribute.h"
#include "FloatRect.h"
+#include "RenderSVGResource.h"
#include "RenderSVGTextPath.h"
#include "SVGLengthList.h"
#include "SVGPathElement.h"
@@ -82,7 +83,7 @@ void SVGTextPathElement::svgAttributeChanged(const QualifiedName& attrName)
if (attrName == SVGNames::startOffsetAttr
|| SVGTextContentElement::isKnownAttribute(attrName)
|| SVGURIReference::isKnownAttribute(attrName))
- renderer()->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer());
}
void SVGTextPathElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGTextPositioningElement.cpp b/WebCore/svg/SVGTextPositioningElement.cpp
index ef47322..19f1fbc 100644
--- a/WebCore/svg/SVGTextPositioningElement.cpp
+++ b/WebCore/svg/SVGTextPositioningElement.cpp
@@ -25,6 +25,7 @@
#include "Attribute.h"
#include "RenderObject.h"
+#include "RenderSVGResource.h"
#include "SVGLengthList.h"
#include "SVGNames.h"
#include "SVGNumberList.h"
@@ -75,7 +76,7 @@ void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrNam
return;
if (isKnownAttribute(attrName))
- renderer()->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer());
}
void SVGTextPositioningElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index 5ca560a..e42a794 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -32,6 +32,7 @@
#include "HTMLNames.h"
#include "NodeRenderStyle.h"
#include "RegisteredEventListener.h"
+#include "RenderSVGResource.h"
#include "RenderSVGShadowTreeRootContainer.h"
#include "SVGElementInstance.h"
#include "SVGElementInstanceList.h"
@@ -142,7 +143,8 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
if (isXYAttribute || isWidthHeightAttribute)
updateRelativeLengthsInformation();
- if (!renderer())
+ RenderObject* object = renderer();
+ if (!object)
return;
if (SVGURIReference::isKnownAttribute(attrName)) {
@@ -173,8 +175,8 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
}
if (SVGStyledTransformableElement::isKnownAttribute(attrName)) {
- renderer()->setNeedsTransformUpdate();
- renderer()->setNeedsLayout(true);
+ object->setNeedsTransformUpdate();
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
return;
}
@@ -256,8 +258,8 @@ void SVGUseElement::updateContainerSizes()
// Update whole subtree, scanning for shadow container elements, that correspond to <svg>/<symbol> tags
updateContainerSize(this, m_targetElementInstance.get());
- if (renderer())
- renderer()->setNeedsLayout(true);
+ if (RenderObject* object = renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
}
static void updateContainerOffset(SVGElementInstance* targetInstance)
@@ -308,8 +310,8 @@ void SVGUseElement::updateContainerOffsets()
// Update whole subtree, scanning for shadow container elements, marking a cloned use subtree
updateContainerOffset(m_targetElementInstance.get());
- if (renderer())
- renderer()->setNeedsLayout(true);
+ if (RenderObject* object = renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
}
void SVGUseElement::recalcStyle(StyleChange change)
diff --git a/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp b/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp
index 39b3e57..ddd4928 100644
--- a/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEConvolveMatrix.cpp
@@ -194,13 +194,27 @@ void FEConvolveMatrix::setPreserveAlpha(bool preserveAlpha)
and would make it really hard to understand.
*/
-static ALWAYS_INLINE unsigned char clampRGBAValue(float rgba)
+static ALWAYS_INLINE unsigned char clampRGBAValue(float channel, unsigned char max = 255)
{
- if (rgba <= 0)
+ if (channel <= 0)
return 0;
- if (rgba >= 255)
- return 255;
- return rgba;
+ if (channel >= max)
+ return max;
+ return channel;
+}
+
+template<bool preserveAlphaValues>
+ALWAYS_INLINE void setDestinationPixels(CanvasPixelArray* image, int& pixel, float* totals, float divisor, float bias, CanvasPixelArray* src)
+{
+ unsigned char maxAlpha = preserveAlphaValues ? 255 : clampRGBAValue(totals[3] / divisor + bias);
+ for (int i = 0; i < 3; ++i)
+ image->set(pixel++, clampRGBAValue(totals[i] / divisor + bias, maxAlpha));
+
+ if (preserveAlphaValues) {
+ image->set(pixel, src->get(pixel));
+ ++pixel;
+ } else
+ image->set(pixel++, maxAlpha);
}
// Only for region C
@@ -244,15 +258,7 @@ ALWAYS_INLINE void FEConvolveMatrix::fastSetInteriorPixels(PaintingData& paintin
}
}
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[0] / m_divisor + paintingData.bias));
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[1] / m_divisor + paintingData.bias));
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[2] / m_divisor + paintingData.bias));
- if (!preserveAlphaValues)
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[3] / m_divisor + paintingData.bias));
- else {
- paintingData.dstPixelArray->set(pixel, paintingData.srcPixelArray->get(pixel));
- ++pixel;
- }
+ setDestinationPixels<preserveAlphaValues>(paintingData.dstPixelArray, pixel, totals, m_divisor, paintingData.bias, paintingData.srcPixelArray);
startKernelPixel += 4;
}
pixel += xIncrease;
@@ -337,15 +343,7 @@ void FEConvolveMatrix::fastSetOuterPixels(PaintingData& paintingData, int x1, in
}
}
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[0] / m_divisor + paintingData.bias));
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[1] / m_divisor + paintingData.bias));
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[2] / m_divisor + paintingData.bias));
- if (!preserveAlphaValues)
- paintingData.dstPixelArray->set(pixel++, clampRGBAValue(totals[3] / m_divisor + paintingData.bias));
- else {
- paintingData.dstPixelArray->set(pixel, paintingData.srcPixelArray->get(pixel));
- ++pixel;
- }
+ setDestinationPixels<preserveAlphaValues>(paintingData.dstPixelArray, pixel, totals, m_divisor, paintingData.bias, paintingData.srcPixelArray);
++startKernelPixelX;
}
pixel += xIncrease;
diff --git a/WebCore/websockets/WebSocket.cpp b/WebCore/websockets/WebSocket.cpp
index 91761fb..38629d7 100644
--- a/WebCore/websockets/WebSocket.cpp
+++ b/WebCore/websockets/WebSocket.cpp
@@ -78,8 +78,6 @@ static String encodeProtocolString(const String& protocol)
return builder.toString();
}
-#if USE(V8)
-
static bool webSocketsAvailable = false;
void WebSocket::setIsAvailable(bool available)
@@ -92,8 +90,6 @@ bool WebSocket::isAvailable()
return webSocketsAvailable;
}
-#endif
-
WebSocket::WebSocket(ScriptExecutionContext* context)
: ActiveDOMObject(context, this)
, m_state(CONNECTING)
diff --git a/WebCore/websockets/WebSocket.h b/WebCore/websockets/WebSocket.h
index b2102d1..2c95ff9 100644
--- a/WebCore/websockets/WebSocket.h
+++ b/WebCore/websockets/WebSocket.h
@@ -50,10 +50,8 @@ namespace WebCore {
class WebSocket : public RefCounted<WebSocket>, public EventTarget, public ActiveDOMObject, public WebSocketChannelClient {
public:
-#if USE(V8)
static void setIsAvailable(bool);
static bool isAvailable();
-#endif
static PassRefPtr<WebSocket> create(ScriptExecutionContext* context) { return adoptRef(new WebSocket(context)); }
virtual ~WebSocket();
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 8762bb5..3e76407 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -283,7 +283,8 @@ void XMLHttpRequest::callReadyStateChangeListener()
timelineAgent->willChangeXHRReadyState(m_url.string(), m_state);
#endif
- m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().readystatechangeEvent), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent);
+ if (m_async || (m_state <= OPENED || m_state == DONE))
+ m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().readystatechangeEvent), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent);
#if ENABLE(INSPECTOR)
if (callTimelineAgentOnReadyStateChange && (timelineAgent = InspectorTimelineAgent::retrieve(scriptExecutionContext())))
@@ -978,8 +979,10 @@ void XMLHttpRequest::didReceiveData(const char* data, int len)
long long expectedLength = m_response.expectedContentLength();
m_receivedLength += len;
- bool lengthComputable = expectedLength && m_receivedLength <= expectedLength;
- m_progressEventThrottle.dispatchProgressEvent(lengthComputable, static_cast<unsigned>(m_receivedLength), static_cast<unsigned>(expectedLength));
+ if (m_async) {
+ bool lengthComputable = expectedLength && m_receivedLength <= expectedLength;
+ m_progressEventThrottle.dispatchProgressEvent(lengthComputable, static_cast<unsigned>(m_receivedLength), static_cast<unsigned>(expectedLength));
+ }
if (m_state != LOADING)
changeState(LOADING);
diff --git a/WebCore/xml/XMLHttpRequestException.idl b/WebCore/xml/XMLHttpRequestException.idl
index 7121468..ffea732 100644
--- a/WebCore/xml/XMLHttpRequestException.idl
+++ b/WebCore/xml/XMLHttpRequestException.idl
@@ -29,7 +29,8 @@
module xml {
interface [
- NoStaticTables
+ NoStaticTables,
+ DontCheckEnums
] XMLHttpRequestException {
readonly attribute unsigned short code;
diff --git a/WebCore/xml/XPathException.idl b/WebCore/xml/XPathException.idl
index d5a9af6..b57df57 100644
--- a/WebCore/xml/XPathException.idl
+++ b/WebCore/xml/XPathException.idl
@@ -29,7 +29,8 @@
module xpath {
interface [
- Conditional=XPATH
+ Conditional=XPATH,
+ DontCheckEnums
] XPathException {
readonly attribute unsigned short code;
diff --git a/WebKit/CMakeListsEfl.txt b/WebKit/CMakeListsEfl.txt
index 2fc964b..ee67d71 100644
--- a/WebKit/CMakeListsEfl.txt
+++ b/WebKit/CMakeListsEfl.txt
@@ -32,6 +32,7 @@ LIST(APPEND WebKit_SOURCES
efl/WebCoreSupport/InspectorClientEfl.cpp
efl/ewk/ewk_contextmenu.cpp
+ efl/ewk/ewk_cookies.cpp
efl/ewk/ewk_frame.cpp
efl/ewk/ewk_history.cpp
efl/ewk/ewk_main.cpp
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bbf5170..d4d2431 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,100 @@
+2010-07-20 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix zoom in/out on EFL after r62666. The patch for adding viewport
+ missed the initialization of zoom_range.user_scalable. In case browser
+ doesn't care about the viewport and does not listen to the signal,
+ user_scalable will be always false, thus inhibiting zoom in/out.
+ https://bugs.webkit.org/show_bug.cgi?id=42656
+
+ * efl/EWebLauncher/main.c:
+ (on_viewport_changed): when listening to signal about viewport meta tag,
+ it's not sufficient to receive the parameters. One needs also to enforce
+ these parameters in WebKit.
+ * efl/ewk/ewk_view.cpp:
+ (_ewk_view_priv_new): initialize user_scalable parameter to allow
+ browser zooming in and out.
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * efl/WebCoreSupport/EditorClientEfl.cpp:
+ (WebCore::EditorClientEfl::willSetInputMethodState):
+ * efl/WebCoreSupport/EditorClientEfl.h:
+
+2010-07-15 Mark Rowe <mrowe@apple.com>
+
+ Update the sorting in the Xcode project files.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * efl/WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::setCursor):
+ * efl/WebCoreSupport/ChromeClientEfl.h:
+ Change prototype to match new one.
+
+2010-07-14 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Add eina_safety to popup menu deletion.
+ https://bugs.webkit.org/show_bug.cgi?id=41873
+
+ Since this is a public call, it's better to have an eina_safety on
+ public calls. It would crash if browser calls this function to select
+ an item of a nonexistent popup.
+
+ * efl/ewk/ewk_view.cpp: add eina_safety to return if popup menu client does
+ not exist.
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/8186963> Expose RenderLayer hierarchy via Obj-C for debugging.
+
+ Add WebRenderLayer files.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2010-07-13 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ This commit implements an API for configuring a path to the cookie
+ file in the Mozilla "cookies.txt" format, and functions to deal with it
+ in a more EFL like API.
+
+ [EFL] Add API for dealing with cookies in EFL port.
+ https://bugs.webkit.org/show_bug.cgi?id=41770
+
+ * CMakeListsEfl.txt:
+ * efl/ewk/EWebKit.h:
+ * efl/ewk/ewk_cookies.cpp: Added.
+ (ewk_cookies_file_set): Set a path to the file storing cookies.
+ (ewk_cookies_clear): Clear all the cookies from the current cookie jar.
+ (ewk_cookies_get_all): Get all the cookies from the current cookie jar.
+ (ewk_cookies_cookie_del): Delete a specific cookie from the cookie jar.
+ (ewk_cookies_cookie_free): Free memory used by a cookie.
+ (ewk_cookies_policy_set): Set which acceptance policy will be used.
+ (ewk_cookies_policy_get): Get current acceptance policy being used.
+ * efl/ewk/ewk_cookies.h: Added.
+ (_Ewk_Cookie::):
+
2010-07-12 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed build fix after r60050.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index 4c470e6..634a430 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -18,6 +18,8 @@
0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ACE917210FE47E30096A45F /* OpenGL.framework */; };
0AEBFF630F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
0AEBFF640F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */; };
+ 0F30985F11ECFE4500F559DF /* WebRenderLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F30985D11ECFE4400F559DF /* WebRenderLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F30986011ECFE4500F559DF /* WebRenderLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F30985E11ECFE4500F559DF /* WebRenderLayer.mm */; };
0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3B0EE1076C3E900039B96 /* WebVideoFullscreenController.h */; };
0FD3B0F31076C3E900039B96 /* WebVideoFullscreenController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3B0EF1076C3E900039B96 /* WebVideoFullscreenController.mm */; };
0FD3B0F41076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3B0F01076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h */; };
@@ -371,6 +373,8 @@
0ACE917210FE47E30096A45F /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
0AEBFF610F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = WebNetscapeContainerCheckPrivate.h; sourceTree = "<group>"; };
0AEBFF620F9FA8BE000D486B /* WebNetscapeContainerCheckPrivate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNetscapeContainerCheckPrivate.mm; sourceTree = "<group>"; };
+ 0F30985D11ECFE4400F559DF /* WebRenderLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderLayer.h; sourceTree = "<group>"; };
+ 0F30985E11ECFE4500F559DF /* WebRenderLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebRenderLayer.mm; sourceTree = "<group>"; };
0FD3B0EE1076C3E900039B96 /* WebVideoFullscreenController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenController.h; sourceTree = "<group>"; };
0FD3B0EF1076C3E900039B96 /* WebVideoFullscreenController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebVideoFullscreenController.mm; sourceTree = "<group>"; };
0FD3B0F01076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebVideoFullscreenHUDWindowController.h; sourceTree = "<group>"; };
@@ -726,13 +730,13 @@
files = (
939811290824BF01008DF038 /* Carbon.framework in Frameworks */,
9398112A0824BF01008DF038 /* Cocoa.framework in Frameworks */,
+ CD8EAC7311CAC9A300774075 /* IOKit.framework in Frameworks */,
9398112B0824BF01008DF038 /* JavaScriptCore.framework in Frameworks */,
9398112E0824BF01008DF038 /* libicucore.dylib in Frameworks */,
0ACE917310FE47E30096A45F /* OpenGL.framework in Frameworks */,
1A20D08B0ED384F20043FA9F /* QuartzCore.framework in Frameworks */,
9398112F0824BF01008DF038 /* Security.framework in Frameworks */,
9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */,
- CD8EAC7311CAC9A300774075 /* IOKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -778,9 +782,9 @@
0867D69AFE84028FC02AAC07 /* Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
- CD8EAC7211CAC9A300774075 /* IOKit.framework */,
F5C2869402846DCD018635CA /* Carbon.framework */,
F5C2869502846DCD018635CA /* Cocoa.framework */,
+ CD8EAC7211CAC9A300774075 /* IOKit.framework */,
F738C9E903FAD3DF0321FBE0 /* JavaScriptCore.framework */,
93D623DD051E791F002F47DD /* libicucore.dylib */,
0ACE917210FE47E30096A45F /* OpenGL.framework */,
@@ -960,8 +964,8 @@
F59668C802AD2923018635CA /* WebStringTruncator.h */,
F59668C902AD2923018635CA /* WebStringTruncator.mm */,
DD7CDEE60A23BA9E00069928 /* WebTypesInternal.h */,
- C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */,
C0C5B3EC1177A4A0002B0AEF /* WebUserContentURLPattern.h */,
+ C0C5B3ED1177A4A0002B0AEF /* WebUserContentURLPattern.mm */,
);
name = Misc;
path = mac/Misc;
@@ -1057,8 +1061,6 @@
1A9C78030EBBC455008599D4 /* Events */,
1A1F91430ECBB16F006351DA /* Hosted */,
F5F717230288493C018635CA /* npapi.mm */,
- F5A672B90263866E01000102 /* WebNetscapePluginStream.h */,
- F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */,
1A4DF5E20EC8D104006BD4B4 /* WebBaseNetscapePluginView.h */,
1A4DF5E30EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm */,
0AB752350FA2E4DB00D7CBB1 /* WebNetscapeContainerCheckContextInfo.h */,
@@ -1069,6 +1071,8 @@
226E9E6809D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h */,
F5F7171E0288493C018635CA /* WebNetscapePluginPackage.h */,
F5F7171F0288493C018635CA /* WebNetscapePluginPackage.mm */,
+ F5A672B90263866E01000102 /* WebNetscapePluginStream.h */,
+ F5A672BA0263866E01000102 /* WebNetscapePluginStream.mm */,
1A4DF5200EC8C74D006BD4B4 /* WebNetscapePluginView.h */,
1A4DF5210EC8C74D006BD4B4 /* WebNetscapePluginView.mm */,
1A77B02C0EE7730500C8A1F9 /* WebPluginRequest.h */,
@@ -1148,6 +1152,8 @@
3944606E020F50ED0ECA1767 /* WebPreferences.h */,
F5AEBB3D024A527601C1A526 /* WebPreferences.mm */,
9CAE9D070252A4130ECA16EA /* WebPreferencesPrivate.h */,
+ 0F30985D11ECFE4400F559DF /* WebRenderLayer.h */,
+ 0F30985E11ECFE4500F559DF /* WebRenderLayer.mm */,
F5F81C3902B67C26018635CA /* WebRenderNode.h */,
F5F81C3A02B67C26018635CA /* WebRenderNode.mm */,
84311A1205EAAAF00088EDA4 /* WebResource.h */,
@@ -1370,7 +1376,6 @@
939810110824BF01008DF038 /* WebBackForwardList.h in Headers */,
51C714FB0B20F79F00E5E33C /* WebBackForwardListInternal.h in Headers */,
22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */,
- 9398102B0824BF01008DF038 /* WebNetscapePluginStream.h in Headers */,
1A4DF5E40EC8D104006BD4B4 /* WebBaseNetscapePluginView.h in Headers */,
9398102E0824BF01008DF038 /* WebBasePluginPackage.h in Headers */,
5241ADF50B1BC48A004012BD /* WebCache.h in Headers */,
@@ -1473,6 +1478,7 @@
1AEA66D80DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.h in Headers */,
1AEA6A500DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.h in Headers */,
939810310824BF01008DF038 /* WebNetscapePluginPackage.h in Headers */,
+ 9398102B0824BF01008DF038 /* WebNetscapePluginStream.h in Headers */,
1A4DF5220EC8C74D006BD4B4 /* WebNetscapePluginView.h in Headers */,
1C68F66F095B5FC100C2984E /* WebNodeHighlight.h in Headers */,
1C68F671095B5FC100C2984E /* WebNodeHighlightView.h in Headers */,
@@ -1499,6 +1505,7 @@
37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */,
939810A50824BF01008DF038 /* WebPDFRepresentation.h in Headers */,
939810A40824BF01008DF038 /* WebPDFView.h in Headers */,
+ 1AA879B611CBE9BF003C664F /* WebPlatformStrategies.h in Headers */,
939810350824BF01008DF038 /* WebPlugin.h in Headers */,
939810360824BF01008DF038 /* WebPluginContainer.h in Headers */,
939810B10824BF01008DF038 /* WebPluginContainerCheck.h in Headers */,
@@ -1517,6 +1524,7 @@
939810A80824BF01008DF038 /* WebPreferenceKeysPrivate.h in Headers */,
9398105D0824BF01008DF038 /* WebPreferences.h in Headers */,
9398105E0824BF01008DF038 /* WebPreferencesPrivate.h in Headers */,
+ 0F30985F11ECFE4500F559DF /* WebRenderLayer.h in Headers */,
9398105F0824BF01008DF038 /* WebRenderNode.h in Headers */,
939810880824BF01008DF038 /* WebResource.h in Headers */,
934C4AA00F0141F7009372C0 /* WebResourceInternal.h in Headers */,
@@ -1539,6 +1547,7 @@
939810750824BF01008DF038 /* WebUIDelegate.h in Headers */,
939810830824BF01008DF038 /* WebUIDelegatePrivate.h in Headers */,
939810150824BF01008DF038 /* WebURLsWithTitles.h in Headers */,
+ C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */,
0FD3B0F21076C3E900039B96 /* WebVideoFullscreenController.h in Headers */,
0FD3B0F41076C3E900039B96 /* WebVideoFullscreenHUDWindowController.h in Headers */,
939810700824BF01008DF038 /* WebView.h in Headers */,
@@ -1548,8 +1557,6 @@
939810710824BF01008DF038 /* WebViewPrivate.h in Headers */,
0FD3B0F81076C3F700039B96 /* WebWindowAnimation.h in Headers */,
41F4484F10338E8C0030E55E /* WebWorkersPrivate.h in Headers */,
- C0C5B3EE1177A4A0002B0AEF /* WebUserContentURLPattern.h in Headers */,
- 1AA879B611CBE9BF003C664F /* WebPlatformStrategies.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1789,7 +1796,6 @@
9398111D0824BF01008DF038 /* WebArchive.mm in Sources */,
939810CF0824BF01008DF038 /* WebAuthenticationPanel.m in Sources */,
939810BC0824BF01008DF038 /* WebBackForwardList.mm in Sources */,
- 939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */,
1A4DF5E50EC8D104006BD4B4 /* WebBaseNetscapePluginView.mm in Sources */,
939810D30824BF01008DF038 /* WebBasePluginPackage.mm in Sources */,
5241ADF60B1BC48A004012BD /* WebCache.mm in Sources */,
@@ -1851,6 +1857,7 @@
1AEA66D90DC6B209003D12BF /* WebNetscapePluginEventHandlerCarbon.mm in Sources */,
1AEA6A510DC8CE2F003D12BF /* WebNetscapePluginEventHandlerCocoa.mm in Sources */,
939810D60824BF01008DF038 /* WebNetscapePluginPackage.mm in Sources */,
+ 939810D10824BF01008DF038 /* WebNetscapePluginStream.mm in Sources */,
1A4DF5230EC8C74D006BD4B4 /* WebNetscapePluginView.mm in Sources */,
1C68F670095B5FC100C2984E /* WebNodeHighlight.mm in Sources */,
1C68F672095B5FC100C2984E /* WebNodeHighlightView.mm in Sources */,
@@ -1876,6 +1883,7 @@
37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */,
9398111F0824BF01008DF038 /* WebPDFRepresentation.mm in Sources */,
9398111E0824BF01008DF038 /* WebPDFView.mm in Sources */,
+ 1AA879B711CBE9BF003C664F /* WebPlatformStrategies.mm in Sources */,
939811260824BF01008DF038 /* WebPluginContainerCheck.mm in Sources */,
939810DA0824BF01008DF038 /* WebPluginController.mm in Sources */,
939810DB0824BF01008DF038 /* WebPluginDatabase.mm in Sources */,
@@ -1885,6 +1893,7 @@
224100F90918190100D2D266 /* WebPluginsPrivate.m in Sources */,
939811080824BF01008DF038 /* WebPolicyDelegate.mm in Sources */,
939810F80824BF01008DF038 /* WebPreferences.mm in Sources */,
+ 0F30986011ECFE4500F559DF /* WebRenderLayer.mm in Sources */,
939810F90824BF01008DF038 /* WebRenderNode.mm in Sources */,
9398111A0824BF01008DF038 /* WebResource.mm in Sources */,
7E6FEF0908985A7200C44C3F /* WebScriptDebugDelegate.mm in Sources */,
@@ -1898,6 +1907,7 @@
1A74A28F0F4F75400082E228 /* WebTextInputWindowController.m in Sources */,
F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */,
939810BE0824BF01008DF038 /* WebURLsWithTitles.m in Sources */,
+ C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */,
0FD3B0F31076C3E900039B96 /* WebVideoFullscreenController.mm in Sources */,
0FD3B0F51076C3E900039B96 /* WebVideoFullscreenHUDWindowController.mm in Sources */,
939811070824BF01008DF038 /* WebView.mm in Sources */,
@@ -1906,8 +1916,6 @@
939810E80824BF01008DF038 /* WebViewFactory.mm in Sources */,
0FD3B0F91076C3F700039B96 /* WebWindowAnimation.m in Sources */,
41F4485010338E8C0030E55E /* WebWorkersPrivate.mm in Sources */,
- C0C5B3EF1177A4A0002B0AEF /* WebUserContentURLPattern.mm in Sources */,
- 1AA879B711CBE9BF003C664F /* WebPlatformStrategies.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 4356f21..009dc60 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,856 @@
+2010-07-21 Bo Liu <boliu@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add chromium WebMediaPlayer to PlatformMedia
+ https://bugs.webkit.org/show_bug.cgi?id=41295
+
+ * WebKit.gyp:
+ * public/WebMediaElement.h: Added.
+ * src/WebMediaElement.cpp: Added.
+ (WebKit::WebMediaElement::player):
+ (WebKit::WebMediaElement::WebMediaElement):
+ (WebKit::WebMediaElement::operator=):
+ (WebKit::WebMediaElement::operator PassRefPtr<HTMLMediaElement>):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::fromMediaElement):
+ (WebKit::WebMediaPlayerClientImpl::mediaPlayer):
+ (WebKit::WebMediaPlayerClientImpl::platformLayer):
+ (WebKit::WebMediaPlayerClientImpl::platformMedia):
+ * src/WebMediaPlayerClientImpl.h:
+
+2010-07-21 Finnur Thorarinsson <finnur.webkit@gmail.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Avoid crashing during find-in-page when |view| is NULL.
+ https://bugs.webkit.org/show_bug.cgi?id=42760
+
+ There are no layout tests because we don't have a repro case
+ to work with, so this is a speculative fix based on crash dump
+ diagnosis. See bug for details.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::shouldScopeMatches):
+
+2010-07-21 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Runtime feature switch for device orientation
+ https://bugs.webkit.org/show_bug.cgi?id=42265
+
+ Add a runtime feature switch that decides whether device orientation
+ events are available or not. Defaults to true.
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableDeviceOrientation):
+ (WebKit::WebRuntimeFeatures::isDeviceOrientationEnabled):
+
+2010-07-21 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: should be possible to debug inspector
+ https://bugs.webkit.org/show_bug.cgi?id=42730
+
+ * src/WebDevToolsFrontendImpl.cpp:
+ (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl):
+
+2010-07-16 James Hawkins <jhawkins@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Implement WebFormElement::wasUserSubmitted(). This is used to
+ verify that the user submitted the form instead of JS when saving form
+ data in AutoFill.
+ https://bugs.webkit.org/show_bug.cgi?id=42479
+
+ * public/WebFormElement.h:
+ * src/WebFormElement.cpp:
+ (WebKit::WebFormElement::wasUserSubmitted):
+
+2010-07-20 Daniel Erat <derat@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Subpixel rendering always disabled for Chromium Linux
+ https://bugs.webkit.org/show_bug.cgi?id=42220
+
+ Honor Fontconfig subpixel rendering setting on Chromium Linux.
+
+ * src/gtk/WebFontInfo.cpp:
+ (WebKit::WebFontInfo::renderStyleForStrike):
+
+2010-07-20 Darin Fisher <darin@chromium.org>
+
+ Fix Chromium build bustage.
+
+ * src/ResourceHandle.cpp:
+ (WebCore::ResourceHandle::hasAuthenticationChallenge): Add
+ implementation of this method that always returns false.
+
+2010-07-20 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Jian Li.
+
+ [Chromium] Add interface for downloading to a file. This can be used
+ in the future to support XMLHttpRequest.responseBlob, but it also
+ serves a use case in Chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42657
+
+ * public/WebURLLoaderClient.h:
+ (WebKit::WebURLLoaderClient::willSendRequest):
+ (WebKit::WebURLLoaderClient::didSendData):
+ (WebKit::WebURLLoaderClient::didReceiveResponse):
+ (WebKit::WebURLLoaderClient::didDownloadData):
+ (WebKit::WebURLLoaderClient::didReceiveData):
+ (WebKit::WebURLLoaderClient::didFinishLoading):
+ (WebKit::WebURLLoaderClient::didFail):
+ * public/WebURLRequest.h:
+ * public/WebURLResponse.h:
+ * src/WebURLRequest.cpp:
+ (WebKit::WebURLRequest::downloadToFile):
+ (WebKit::WebURLRequest::setDownloadToFile):
+ * src/WebURLRequestPrivate.h:
+ (WebKit::WebURLRequestPrivate::WebURLRequestPrivate):
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::downloadFilePath):
+ (WebKit::WebURLResponse::setDownloadFilePath):
+ * src/WebURLResponsePrivate.h:
+
+2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63750.
+ http://trac.webkit.org/changeset/63750
+ https://bugs.webkit.org/show_bug.cgi?id=42648
+
+ This revision breaks the windows builds (Requested by
+ hwennborg on #webkit).
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+
+2010-07-19 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add webkit api reset to WebIDBDatabaseError and WebIDBKey
+ and refactor their destructors for chromium multi dll build.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42574
+
+ * public/WebIDBDatabaseError.h:
+ (WebKit::WebIDBDatabaseError::~WebIDBDatabaseError):
+ * public/WebIDBKey.h:
+ (WebKit::WebIDBKey::~WebIDBKey):
+ * src/WebIDBDatabaseError.cpp:
+ (WebKit::WebIDBDatabaseError::reset):
+ * src/WebIDBKey.cpp:
+ (WebKit::WebIDBKey::reset):
+
+2010-07-20 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Runtime feature switch for device orientation
+ https://bugs.webkit.org/show_bug.cgi?id=42265
+
+ Add a runtime feature switch that decides whether device orientation
+ events are available or not. Defaults to true.
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableDeviceOrientation):
+ (WebKit::WebRuntimeFeatures::isDeviceOrientationEnabled):
+
+2010-07-19 Victoria Kirst <vrk@google.com>
+
+ Reviewed by David Levin.
+
+ Updated WebMediaPlayer to support accelerated rendering and to
+ create and return a VideoChromiumLayer as its platform layer.
+ https://bugs.webkit.org/show_bug.cgi?id=42234
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::platformLayer):
+ (WebKit::WebMediaPlayerClientImpl::create):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebKit::WebMediaPlayerClientImpl::supportsAcceleratedRendering):
+
+2010-07-19 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Nate Chapin.
+
+ WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
+ https://bugs.webkit.org/show_bug.cgi?id=34719
+
+ Fixed compiler warning introduced by original patch.
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer):
+
+2010-07-19 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] refactor npapi plugin copy step
+ https://bugs.webkit.org/show_bug.cgi?id=42493
+
+ This is to avoid duplicate copy rules in the Linux make build.
+
+ * WebKit.gyp:
+ * DEPS: 52483:52869
+
+2010-07-19 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Live edit is not working in chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=42572
+
+ * src/js/DebuggerScript.js:
+
+2010-07-16 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [V8] Web Inspector: get actual breakpoint location from v8 and pass it
+ to ScripDebugServer.
+ https://bugs.webkit.org/show_bug.cgi?id=42452
+
+ * src/js/DebuggerScript.js:
+
+2010-07-17 John Gregg <johnnyg@google.com>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] directory upload: pass the attribute up to the chrome client
+ https://bugs.webkit.org/show_bug.cgi?id=42475
+
+ This allows chromium to display the native system directory picker when
+ the directory attribute is present on the input element.
+
+ * public/WebFileChooserParams.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::runOpenPanel):
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Implement EditorClient::willSetInputMethodState which replaces
+ setInputMethodState method.
+
+ * src/EditorClientImpl.cpp:
+ (WebKit::EditorClientImpl::willSetInputMethodState):
+ (WebKit::EditorClientImpl::setInputMethodState):
+ * src/EditorClientImpl.h:
+
+2010-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] <input type=number> UI implementation for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=42259
+
+ * public/WebThemeEngine.h:
+ (WebKit::WebThemeEngine::paintSpinButton): Added.
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::paintSpinButton):
+ Added. It calls WebThemeEngine::paintSpinButton().
+
+2010-07-16 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Avoid crashing if offscreen GLES2 context creation fails
+ https://bugs.webkit.org/show_bug.cgi?id=42469
+
+ If creating or initializing an offscreen GLES2Context fails we should return null
+ rather than crashing or returning an invalid context.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::getOffscreenGLES2Context):
+
+2010-07-15 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Enable window.webkitPerformance (Web Timing) for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=42313
+
+ * features.gypi:
+
+2010-07-16 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63551.
+ http://trac.webkit.org/changeset/63551
+ https://bugs.webkit.org/show_bug.cgi?id=42460
+
+ "Problems with gyp" (Requested by yurys on #webkit).
+
+ * DEPS:
+
+2010-07-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Bump up Chromium revision.
+
+ * DEPS:
+
+2010-07-16 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: disable AppCache in chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41858
+
+ * src/js/DevTools.js:
+ (WebInspector.loaded):
+
+2010-07-16 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [Chromium] A non-existent resource is referenced from devTools.css
+
+ The erroneous rule has been removed.
+ https://bugs.webkit.org/show_bug.cgi?id=42454
+
+ * src/js/devTools.css:
+
+2010-07-16 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Check that end node of a range has a valid renderer in WebViewImpl::caretOrSelectionBounds()
+ to avoid crash in Position::getInlineBoxAndOffset() when start node has renderer but end one doesn't.
+ https://bugs.webkit.org/show_bug.cgi?id=42449
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::caretOrSelectionBounds):
+
+2010-07-16 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Make JS memory stats available via 'Performance' object (Web Timing).
+ This statistics is populated only if 'WebKitMemoryInfoEnabled'
+ preference is set.
+
+ 'console.memory' is kept until Web Timing object becomes visible by
+ default (currently it is hidden under compile-time flag). These stats
+ are guarded with the same preference.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41617
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setMemoryInfoEnabled):
+ * src/WebSettingsImpl.h:
+
+2010-07-15 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Chromium webkit dll updates:
+ -. Fix WEBKIT_IMPLEMENTATION in WebCommon so
+ dllimport works as expected.
+ -. Update webkit.gyp so targets that depend on webkit
+ has correct macros defined.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42177
+
+ * WebKit.gyp:
+ * public/WebCommon.h:
+
+2010-07-13 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Nate Chapin.
+
+ WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage
+ https://bugs.webkit.org/show_bug.cgi?id=34719
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas().
+ (WebCore::GraphicsContext3DInternal::beginPaint): Just use paintRenderingResultsToCanvas().
+
+2010-07-15 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Levin.
+
+ Roll Chromium DEPS forward to r52483.
+ https://bugs.webkit.org/show_bug.cgi?id=42386
+
+ * DEPS:
+
+2010-07-15 Scott Violet <sky@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] WebViewClient::removeAutofillSuggestions is not passed the correct name
+ https://bugs.webkit.org/show_bug.cgi?id=42385
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::autocompleteHandleKeyEvent): Use WebInputElement::nameForAutofill() instead of name.
+
+2010-07-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63446.
+ http://trac.webkit.org/changeset/63446
+ https://bugs.webkit.org/show_bug.cgi?id=42412
+
+ It broke the Chromium Windows bot due to missing dependencies
+ there. (Requested by dave_levin on #webkit).
+
+ * DEPS:
+
+2010-07-15 Victor Wang <victorw@chromium.org>
+
+ Reviewed by David Levin.
+
+ Roll Chromium DEPS forward to r52483.
+ https://bugs.webkit.org/show_bug.cgi?id=42386
+
+ * DEPS:
+
+2010-07-15 Michael Nordman <michaeln@google.com>
+
+ Reviewed by Darin Fisher.
+
+ WebKitAPI additions to support inspecting application caches.
+ https://bugs.webkit.org/show_bug.cgi?id=41993
+
+ * public/WebApplicationCacheHost.h:
+ (WebKit::WebApplicationCacheHost::CacheInfo::CacheInfo):
+ (WebKit::WebApplicationCacheHost::ResourceInfo::ResourceInfo):
+ (WebKit::WebApplicationCacheHost::getAssociatedCacheInfo):
+ (WebKit::WebApplicationCacheHost::getResourceList):
+ (WebKit::WebApplicationCacheHost::deleteAssociatedCacheGroup):
+ * public/WebApplicationCacheHostClient.h:
+ (WebKit::WebApplicationCacheHostClient::didChangeCacheAssociation):
+ * src/ApplicationCacheHostInternal.h:
+ (WebCore::ApplicationCacheHostInternal::didChangeCacheAssociation):
+
+2010-07-15 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: differentiate between blocking and connecting timers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42372
+
+ * public/WebURLResponse.h:
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::connectionReused):
+ (WebKit::WebURLResponse::setConnectionReused):
+
+2010-07-15 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Fix mac compilation failure
+ https://bugs.webkit.org/show_bug.cgi?id=42344
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex):
+ (WebKit::AutoFillPopupMenuClient::canRemoveSuggestionAtIndex):
+
+2010-07-14 George Yakovlev <georgey@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Allow Chromium access to Select control choices
+ https://bugs.webkit.org/show_bug.cgi?id=41384
+
+ * WebKit.gyp:
+ * public/WebOptionElement.h: Added.
+ (WebKit::WebOptionElement::WebOptionElement):
+ (WebKit::WebOptionElement::operator=):
+ (WebKit::WebOptionElement::assign):
+ * public/WebSelectElement.h:
+ * src/WebOptionElement.cpp: Added.
+ (WebKit::WebOptionElement::setValue):
+ (WebKit::WebOptionElement::value):
+ (WebKit::WebOptionElement::index):
+ (WebKit::WebOptionElement::text):
+ (WebKit::WebOptionElement::defaultSelected):
+ (WebKit::WebOptionElement::setDefaultSelected):
+ (WebKit::WebOptionElement::label):
+ (WebKit::WebOptionElement::disabled):
+ (WebKit::WebOptionElement::WebOptionElement):
+ (WebKit::WebOptionElement::operator=):
+ (WebKit::WebOptionElement::operator PassRefPtr<HTMLOptionElement>):
+ * src/WebSelectElement.cpp:
+ (WebKit::WebSelectElement::listItems):
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63389.
+ http://trac.webkit.org/changeset/63389
+ https://bugs.webkit.org/show_bug.cgi?id=42311
+
+ It broke the Chromium Linux build. (Requested by dave_levin on
+ #webkit).
+
+ * DEPS:
+ * WebKit.gyp:
+ * public/WebCommon.h:
+
+2010-07-14 Scott Violet <sky@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] Autofill menu shows seperator at the wrong place when an entry is deleted
+ https://bugs.webkit.org/show_bug.cgi?id=42210
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): Updates internal data appropriately.
+ (WebKit::AutoFillPopupMenuClient::canRemoveSuggestionAtIndex): Now called before removal to see if can remove.
+ * src/AutoFillPopupMenuClient.h: Fixed whitespace and added method.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::autocompleteHandleKeyEvent): Added call to canRemoveSuggestionAtIndex.
+
+2010-07-14 James Robinson <jamesr@chromium.org>
+
+ Unreviewed. Compile fix, initialization/declaration order mismatch.
+
+ * src/GLES2ContextInternal.h:
+
+2010-07-14 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] don't restrict the width of the autofill popup.
+ https://bugs.webkit.org/show_bug.cgi?id=42206
+
+ * src/WebViewImpl.cpp:
+
+2010-07-14 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Chromium webkit dll updates:
+ -. Fix WEBKIT_IMPLEMENTATION in WebCommon so
+ dllimport works as expected.
+ -. Update webkit.gyp so targets that depend on webkit
+ has correct macros defined.
+ -. Roll forward chromium deps to r52273.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42177
+
+ * DEPS:
+ * WebKit.gyp:
+ * public/WebCommon.h:
+
+2010-07-14 James Hawkins <jhawkins@chromium.org>
+
+ UNREVIEWED Build Fix.
+
+ Fix a typo.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutoFillSuggestions):
+
+2010-07-14 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Breaks all dependencies on Page from platform/ and cleans up GLES2Context lifetime
+ https://bugs.webkit.org/show_bug.cgi?id=42203
+
+ Rather than constructing a GLES2Context from a Page, pass the LayerRendererChromium
+ a GLES2Context in from the constructor. This way the platform/ directory can remain
+ ignorant of Page and friends. Also adds functions on ChromeClientChromium to request
+ onscreen and offscreen GLES2Contexts for callers in WebCore that need them.
+
+ * WebKit.gyp:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::getOnscreenGLES2Context):
+ (WebKit::ChromeClientImpl::getOffscreenGLES2Context):
+ * src/ChromeClientImpl.h:
+ * src/GLES2Context.cpp:
+ (WebCore::GLES2ContextInternal::create):
+ (WebCore::GLES2Context::create):
+ (WebCore::GLES2Context::GLES2Context):
+ * src/GLES2ContextInternal.cpp: Added.
+ (WebCore::GLES2ContextInternal::~GLES2ContextInternal):
+ * src/GLES2ContextInternal.h: Added.
+ (WebCore::GLES2ContextInternal::getWebGLES2Context):
+ (WebCore::GLES2ContextInternal::GLES2ContextInternal):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ (WebKit::WebViewImpl::getOnscreenGLES2Context):
+ (WebKit::WebViewImpl::getOffscreenGLES2Context):
+ * src/WebViewImpl.h:
+
+2010-07-14 James Hawkins <jhawkins@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Use the unique ID instead of the profile label to identify
+ the accepted AutoFill suggestion.
+ https://bugs.webkit.org/show_bug.cgi?id=42301
+
+ * public/WebView.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::didAcceptAutoFillSuggestion):
+ (WebKit::WebViewClient::didSelectAutoFillSuggestion):
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::valueChanged):
+ (WebKit::AutoFillPopupMenuClient::selectionChanged):
+ (WebKit::AutoFillPopupMenuClient::initialize):
+ (WebKit::AutoFillPopupMenuClient::setSuggestions):
+ (WebKit::AutoFillPopupMenuClient::textFieldStyle):
+ * src/AutoFillPopupMenuClient.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutoFillSuggestions):
+ (WebKit::WebViewImpl::applyAutocompleteSuggestions):
+ * src/WebViewImpl.h:
+
+2010-07-14 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Don't notify the WebView that the popup has been closed when the
+ selection is cleared, as the popup is not gone and would linger
+ as a ghost popup.
+ https://bugs.webkit.org/show_bug.cgi?id=42180
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::selectionCleared):
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Fix the chromium mac build.
+
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::setCursor):
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * src/ChromeClientImpl.h:
+ (WebKit::ChromeClientImpl::setCursor):
+ Change prototype to match new one.
+
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::setCursor):
+ * src/WebPopupMenuImpl.h:
+ Add empty setCursor function to satisfy the HostWindow interface.
+
+2010-07-13 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42201
+ Use ResourceHandle object for synchronous loading
+
+ * src/ResourceHandle.cpp:
+ (WebCore::ResourceHandle::request):
+ This method is no longer const in cross-platform code, and is called firstRequest.
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63305.
+ http://trac.webkit.org/changeset/63305
+ https://bugs.webkit.org/show_bug.cgi?id=42256
+
+ "debugger-breakpoints-not-activated-on-reload.html fails on
+ GTK" (Requested by yurys on #webkit).
+
+ * src/js/DebuggerScript.js:
+ ():
+
+2010-07-14 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: remove v8 debugger code that doesn't use ScriptDebugServer
+ https://bugs.webkit.org/show_bug.cgi?id=42164
+
+ * WebKit.gypi:
+ * src/DebuggerAgentManager.cpp:
+ (WebKit::DebuggerAgentManager::debugAttach):
+ (WebKit::DebuggerAgentManager::debugDetach):
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::windowObjectCleared):
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::~WebDevToolsAgentImpl):
+ (WebKit::WebDevToolsAgentImpl::attach):
+ (WebKit::WebDevToolsAgentImpl::didNavigate):
+ (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy):
+ * src/js/DebuggerAgent.js: Removed.
+ * src/js/DevTools.js:
+ (devtools.ToolsAgent):
+ (WebInspector.loaded):
+ * src/js/DevToolsHostStub.js:
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+ * src/js/Tests.js:
+ (.TestSuite.prototype.testAutoContinueOnSyntaxError):
+ (.TestSuite.prototype.testExpandScope.examineScopes):
+ (.TestSuite.prototype.testExpandScope):
+ (.TestSuite.prototype.testDebugIntrinsicProperties):
+
+2010-07-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: Clean-up InspectorBackend code. In the next changes
+ InspectorBackend content will be generated by scripts. As far as
+ generator is very simple thing all nontrivial function should be
+ moved to InspectorController and DOMAgent.
+ https://bugs.webkit.org/show_bug.cgi?id=42171
+
+ * src/js/InspectorControllerImpl.js:
+ (devtools.InspectorBackendImpl):
+ (.devtools.InspectorBackendImpl.prototype.pause):
+ (.devtools.InspectorBackendImpl.prototype.resume):
+ (.devtools.InspectorBackendImpl.prototype.stepIntoStatement):
+ (.devtools.InspectorBackendImpl.prototype.stepOutOfFunction):
+ (.devtools.InspectorBackendImpl.prototype.stepOverStatement):
+ (else.devtools.InspectorBackendImpl.prototype.pause):
+
+2010-07-14 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: if breakpoints were deactivated, add new breakpoints as disabled.
+ https://bugs.webkit.org/show_bug.cgi?id=41461
+
+ * src/js/DebuggerScript.js:
+ ():
+
+2010-07-14 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, 2nd attempt to fix build on 'Webkit.org Reliability Builder'.
+
+ * WebKit.gyp:
+
+2010-07-14 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, attempt to fix build on 'Webkit.org Reliability Builder'.
+
+ * WebKit.gyp:
+
+2010-07-14 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Upstreaming inspector_resources target
+ https://bugs.webkit.org/show_bug.cgi?id=41669
+
+ 'inspector_resource' is currently in src/webkit/webkit.gyp of
+ Chromium tree. We move it to WebKit tree because:
+ - DumpRenderTree in WebKit tree needs it, and
+ - It's hard to refer to WebKit.gypi and WebCore.gypi from
+ webkit_support in both cases of Chromium-tree build and
+ WebKit-tree build.
+
+ * WebKit.gyp:
+
+2010-07-13 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Linux implementation of <input type=number> UI
+ https://bugs.webkit.org/show_bug.cgi?id=41925
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setScrollbarColors):
+ Call PlatformThemeChromiumGtk::setScrollbarColors() instead of
+ RenderThemeChromiumLinux::setScrollbarColors().
+
+2010-07-13 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by David Levin.
+
+ Fix adoptRef usage violation in WebAccessibilityCacheImpl.cpp.
+ https://bugs.webkit.org/show_bug.cgi?id=42092
+
+ * src/WebAccessibilityCacheImpl.cpp:
+ (WebKit::WebAccessibilityCacheImpl::WeakHandle::create):
+ (WebKit::WebAccessibilityCacheImpl::WeakHandle::WeakHandle):
+
+2010-07-13 Albert J. Wong <ajwong@chromium.org>
+
+ Unreviewed, build fix.
+
+ [chromium] The comparision between signed/unsigned breaks the chromium
+ mac build.
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::getSuggestion):
+ (WebKit::AutoFillPopupMenuClient::getLabel):
+
+2010-07-10 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Implement bufferData and bufferSubData with ArrayBuffer as input
+ https://bugs.webkit.org/show_bug.cgi?id=41884
+
+ * src/GraphicsContext3D.cpp: Implement bufferData and bufferSubData with ArrayBuffer as input.
+ (WebCore::GraphicsContext3DInternal::bufferData):
+ (WebCore::GraphicsContext3DInternal::bufferSubData):
+
+2010-07-10 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Need to emulate MAX_VARYING_VECTORS/MAX_FRAGMENT_UNIFORM_VECTORs/MAX_VERTEX_UNIFORM_VECTORS for glGet
+ https://bugs.webkit.org/show_bug.cgi?id=42032
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Emulate the enums.
+
+2010-07-13 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: catch and log JS exceptions resulting from executing a
+ script on inspector front-end to prevent renderer from crashing.
+ https://bugs.webkit.org/show_bug.cgi?id=42157
+
+ * src/WebDevToolsFrontendImpl.cpp:
+ (WebKit::WebDevToolsFrontendImpl::executeScript):
+
+2010-07-13 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, build fix.
+
+ Fix a build error by r63179 for Chromium.
+
+ * tests/PopupMenuTest.cpp:
+ (WebKit::TestPopupMenuClient::itemLabel): Added.
+
+2010-07-12 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Making the autofill popup use labels to show the label
+ associated with an item.
+ https://bugs.webkit.org/show_bug.cgi?id=41964
+
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::getSuggestion):
+ (WebKit::AutoFillPopupMenuClient::getLabel):
+ (WebKit::AutoFillPopupMenuClient::itemLabel):
+ (WebKit::AutoFillPopupMenuClient::setSuggestions):
+ (WebKit::AutoFillPopupMenuClient::convertListIndexToInternalIndex):
+ * src/AutoFillPopupMenuClient.h:
+
2010-07-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r63171.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 63509ff..24bf389 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '51736',
+ 'chromium_rev': '52869',
}
deps = {
@@ -89,6 +89,8 @@ deps = {
Var('chromium_svn')+'/gpu@'+Var('chromium_rev'),
'media':
Var('chromium_svn')+'/media@'+Var('chromium_rev'),
+ 'printing':
+ Var('chromium_svn')+'/printing@'+Var('chromium_rev'),
'third_party/angle': # needed by the gpu process
From('chromium_deps', 'src/third_party/angle'),
'third_party/ffmpeg': # needed by webkit/media
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 8143049..8abc159 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -30,8 +30,10 @@
{
'includes': [
- 'features.gypi',
+ '../../WebCore/WebCore.gypi',
'../../WebKitTools/DumpRenderTree/DumpRenderTree.gypi',
+ 'WebKit.gypi',
+ 'features.gypi',
],
'variables': {
'webkit_target_type': 'static_library',
@@ -42,12 +44,42 @@
# Webkit is being built outside of the full chromium project.
# e.g. via build-webkit --chromium
'chromium_src_dir': '../../WebKit/chromium',
+
+ # List of DevTools source files, ordered by dependencies. It is used both
+ # for copying them to resource dir, and for generating 'devtools.html' file.
+ 'devtools_files': [
+ '<@(devtools_css_files)',
+ '../../WebKit/chromium/v8/tools/codemap.js',
+ '../../WebKit/chromium/v8/tools/consarray.js',
+ '../../WebKit/chromium/v8/tools/csvparser.js',
+ '../../WebKit/chromium/v8/tools/logreader.js',
+ '../../WebKit/chromium/v8/tools/profile.js',
+ '../../WebKit/chromium/v8/tools/profile_view.js',
+ '../../WebKit/chromium/v8/tools/splaytree.js',
+ '<@(devtools_js_files)',
+ ],
},{
# WebKit is checked out in src/chromium/third_party/WebKit
'chromium_src_dir': '../../../..',
+
+ 'devtools_files': [
+ '<@(devtools_css_files)',
+ '../../../../v8/tools/codemap.js',
+ '../../../../v8/tools/consarray.js',
+ '../../../../v8/tools/csvparser.js',
+ '../../../../v8/tools/logreader.js',
+ '../../../../v8/tools/profile.js',
+ '../../../../v8/tools/profile_view.js',
+ '../../../../v8/tools/splaytree.js',
+ '<@(devtools_js_files)',
+ ],
}],
],
'ahem_path': '../../WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTF',
+
+ # If debug_devtools is set to 1, JavaScript files for DevTools are
+ # stored as is. Otherwise, a concatenated file is stored.
+ 'debug_devtools%': 0,
},
'targets': [
{
@@ -67,7 +99,7 @@
'src',
],
'defines': [
- 'WEBKIT_IMPLEMENTATION',
+ 'WEBKIT_IMPLEMENTATION=1',
],
'sources': [
'public/gtk/WebInputEventFactory.h',
@@ -150,6 +182,7 @@
'public/WebKitClient.h',
'public/WebLabelElement.h',
'public/WebLocalizedString.h',
+ 'public/WebMediaElement.h',
'public/WebMediaPlayer.h',
'public/WebMediaPlayerAction.h',
'public/WebMediaPlayerClient.h',
@@ -166,6 +199,7 @@
'public/WebNotification.h',
'public/WebNotificationPresenter.h',
'public/WebNotificationPermissionCallback.h',
+ 'public/WebOptionElement.h',
'public/WebPageSerializer.h',
'public/WebPageSerializerClient.h',
'public/WebPasswordAutocompleteListener.h',
@@ -268,6 +302,8 @@
'src/FrameLoaderClientImpl.cpp',
'src/FrameLoaderClientImpl.h',
'src/GLES2Context.cpp',
+ 'src/GLES2ContextInternal.cpp',
+ 'src/GLES2ContextInternal.h',
'src/gtk/WebFontInfo.cpp',
'src/gtk/WebFontInfo.h',
'src/gtk/WebInputEventFactory.cpp',
@@ -380,6 +416,7 @@
'src/WebInputEventConversion.h',
'src/WebKit.cpp',
'src/WebLabelElement.cpp',
+ 'src/WebMediaElement.cpp',
'src/WebMediaPlayerClientImpl.cpp',
'src/WebMediaPlayerClientImpl.h',
'src/WebMutationEvent.cpp',
@@ -387,6 +424,7 @@
'src/WebNodeCollection.cpp',
'src/WebNodeList.cpp',
'src/WebNotification.cpp',
+ 'src/WebOptionElement.cpp',
'src/WebPageSerializer.cpp',
'src/WebPageSerializerImpl.cpp',
'src/WebPageSerializerImpl.h',
@@ -452,10 +490,10 @@
['component=="shared_library"', {
'defines': [
'WEBKIT_DLL',
- 'USING_V8_SHARED',
],
'dependencies': [
'../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
'<(chromium_src_dir)/third_party/icu/icu.gyp:*',
'<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
@@ -468,6 +506,15 @@
'<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
'<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'WEBKIT_DLL',
+ ],
+ },
+ 'export_dependent_settings': [
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ ],
}],
],
}, {
@@ -541,6 +588,79 @@
}],
],
},
+
+ {
+ 'target_name': 'inspector_resources',
+ 'type': 'none',
+ 'dependencies': ['devtools_html'],
+ 'conditions': [
+ ['debug_devtools==0', {
+ 'dependencies': ['concatenated_devtools_js'],
+ }],
+ ],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/resources/inspector',
+ 'files': [
+ '<@(devtools_files)',
+ '<@(webinspector_files)',
+ ],
+ 'conditions': [
+ ['debug_devtools==0', {
+ 'files/': [['exclude', '\\.js$']],
+ }],
+ ],
+ },
+ {
+ 'destination': '<(PRODUCT_DIR)/resources/inspector/Images',
+ 'files': [
+ '<@(webinspector_image_files)',
+ '<@(devtools_image_files)',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'devtools_html',
+ 'type': 'none',
+ 'sources': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
+ 'actions': [{
+ 'action_name': 'devtools_html',
+ 'inputs': [
+ '<(chromium_src_dir)/webkit/build/generate_devtools_html.py',
+ # See issue 29695: WebKit.gypi is a source file for devtools.html.
+ 'WebKit.gypi',
+ '../../WebCore/inspector/front-end/inspector.html',
+ ],
+ 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
+ 'action': ['python', '<@(_inputs)', '<@(_outputs)', '<@(devtools_files)'],
+ }],
+ },
+ {
+ 'target_name': 'concatenated_devtools_js',
+ 'type': 'none',
+ 'dependencies': ['devtools_html'],
+ 'sources': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'],
+ 'actions': [{
+ 'action_name': 'concatenate_devtools_js',
+ 'script_name': '<(chromium_src_dir)/webkit/build/concatenate_js_files.py',
+ 'input_page': '<(PRODUCT_DIR)/resources/inspector/devtools.html',
+ 'inputs': [
+ '<@(_script_name)',
+ '<@(_input_page)',
+ '<@(webinspector_files)',
+ '<@(devtools_files)',
+ ],
+ 'search_path': [
+ '../../WebCore/inspector/front-end',
+ 'src/js',
+ '<(chromium_src_dir)/v8/tools',
+ ],
+ 'outputs': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'],
+ 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@(_search_path)', '<@(_outputs)'],
+ }],
+ },
+
{
'target_name': 'webkit_unit_tests',
'conditions': [
@@ -609,10 +729,11 @@
'mac_bundle': 1,
'dependencies': [
'ImageDiff',
+ 'inspector_resources',
'webkit',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
'<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:npapi_layout_test_plugin',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib'
],
@@ -658,16 +779,6 @@
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': ['<(ahem_path)'],
- }, {
- # This should really be done in the 'npapi_layout_test_plugin'
- # target, but the current VS generator handles 'copies'
- # settings as AdditionalDependencies, which means that
- # when it's over there, it tries to do the copy *before*
- # the file is built, instead of after. We work around this
- # by attaching the copy here, since it depends on that
- # target.
- 'destination': '<(PRODUCT_DIR)/plugins',
- 'files': ['<(PRODUCT_DIR)/npapi_layout_test_plugin.dll'],
}],
},{ # OS!="win"
'sources/': [
@@ -712,10 +823,6 @@
'../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
'<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
],
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/PlugIns/',
- 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
- }],
},{ # OS!="mac"
'sources/': [
# .mm is already excluded by common.gypi
@@ -730,9 +837,6 @@
'../../WebKitTools/DumpRenderTree/chromium/fonts.conf',
'<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
]
- }, {
- 'destination': '<(PRODUCT_DIR)/plugins',
- 'files': ['<(PRODUCT_DIR)/libnpapi_layout_test_plugin.so'],
}],
},{ # OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris"
'sources/': [
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index 69b1479..7d7b19c 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -34,7 +34,6 @@
# for copying them to resource dir, and for generating 'devtools.html' file.
'devtools_js_files': [
'src/js/InspectorControllerImpl.js',
- 'src/js/DebuggerAgent.js',
'src/js/ProfilerAgent.js',
'src/js/ProfilerProcessor.js',
'src/js/HeapProfilerPanel.js',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index a280f4f..eadce7e 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -76,7 +76,7 @@
'ENABLE_TOUCH_EVENTS=1',
'ENABLE_VIDEO=1',
'ENABLE_WEB_SOCKETS=1',
- 'ENABLE_WEB_TIMING=0',
+ 'ENABLE_WEB_TIMING=1',
'ENABLE_WORKERS=1',
'ENABLE_XHTMLMP=0',
'ENABLE_XPATH=1',
diff --git a/WebKit/chromium/public/WebApplicationCacheHost.h b/WebKit/chromium/public/WebApplicationCacheHost.h
index 23be4dd..acbc106 100644
--- a/WebKit/chromium/public/WebApplicationCacheHost.h
+++ b/WebKit/chromium/public/WebApplicationCacheHost.h
@@ -32,6 +32,8 @@
#define WebApplicationCacheHost_h
#include "WebCommon.h"
+#include "WebURL.h"
+#include "WebVector.h"
namespace WebKit {
@@ -71,24 +73,46 @@ public:
virtual ~WebApplicationCacheHost() { }
// Called for every request made within the context.
- virtual void willStartMainResourceRequest(WebURLRequest&) = 0;
- virtual void willStartSubResourceRequest(WebURLRequest&) = 0;
+ virtual void willStartMainResourceRequest(WebURLRequest&) { }
+ virtual void willStartSubResourceRequest(WebURLRequest&) { }
// One or the other selectCache methods is called after having parsed the <html> tag.
// The latter returns false if the current document has been identified as a "foreign"
// entry, in which case the frame navigation will be restarted by webkit.
- virtual void selectCacheWithoutManifest() = 0;
- virtual bool selectCacheWithManifest(const WebURL& manifestURL) = 0;
+ virtual void selectCacheWithoutManifest() { }
+ virtual bool selectCacheWithManifest(const WebURL& manifestURL) { return true; }
// Called as the main resource is retrieved.
- virtual void didReceiveResponseForMainResource(const WebURLResponse&) = 0;
- virtual void didReceiveDataForMainResource(const char* data, int len) = 0;
- virtual void didFinishLoadingMainResource(bool success) = 0;
+ virtual void didReceiveResponseForMainResource(const WebURLResponse&) { }
+ virtual void didReceiveDataForMainResource(const char* data, int len) { }
+ virtual void didFinishLoadingMainResource(bool success) { }
// Called on behalf of the scriptable interface.
- virtual Status status() = 0;
- virtual bool startUpdate() = 0;
- virtual bool swapCache() = 0;
+ virtual Status status() { return Uncached; }
+ virtual bool startUpdate() { return false; }
+ virtual bool swapCache() { return false; }
+
+ // Structures and methods to support inspecting Application Caches.
+ struct CacheInfo {
+ WebURL manifestURL; // Empty if there is no associated cache.
+ double creationTime;
+ double updateTime;
+ long long totalSize;
+ CacheInfo() : creationTime(0), updateTime(0), totalSize(0) { }
+ };
+ struct ResourceInfo {
+ WebURL url;
+ long long size;
+ bool isMaster;
+ bool isManifest;
+ bool isExplicit;
+ bool isForeign;
+ bool isFallback;
+ ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit(false), isForeign(false), isFallback(false) { }
+ };
+ virtual void getAssociatedCacheInfo(CacheInfo*) { }
+ virtual void getResourceList(WebVector<ResourceInfo>*) { }
+ virtual void deleteAssociatedCacheGroup() { }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebApplicationCacheHostClient.h b/WebKit/chromium/public/WebApplicationCacheHostClient.h
index 39b7fa2..3f84c51 100644
--- a/WebKit/chromium/public/WebApplicationCacheHostClient.h
+++ b/WebKit/chromium/public/WebApplicationCacheHostClient.h
@@ -39,6 +39,9 @@ namespace WebKit {
// This interface is used by the embedder to call into webkit.
class WebApplicationCacheHostClient {
public:
+ // Called when a different cache, including possibly no cache, is associated with the host.
+ virtual void didChangeCacheAssociation() = 0;
+
// Called to fire events in the scriptable interface.
virtual void notifyEventListener(WebApplicationCacheHost::EventID) = 0;
virtual void notifyProgressEventListener(const WebURL&, int num_total, int num_complete) = 0;
diff --git a/WebKit/chromium/public/WebCommon.h b/WebKit/chromium/public/WebCommon.h
index 5f441b7..2bfa17d 100644
--- a/WebKit/chromium/public/WebCommon.h
+++ b/WebKit/chromium/public/WebCommon.h
@@ -66,7 +66,7 @@
// Exported symbols need to be annotated with WEBKIT_API
#if defined(WIN32) && defined(WEBKIT_DLL)
- #if defined(WEBKIT_IMPLEMENTATION)
+ #if WEBKIT_IMPLEMENTATION
#define WEBKIT_API __declspec(dllexport)
#else
#define WEBKIT_API __declspec(dllimport)
diff --git a/WebKit/chromium/public/WebFileChooserParams.h b/WebKit/chromium/public/WebFileChooserParams.h
index 6359f14..2a30944 100644
--- a/WebKit/chromium/public/WebFileChooserParams.h
+++ b/WebKit/chromium/public/WebFileChooserParams.h
@@ -40,6 +40,8 @@ namespace WebKit {
struct WebFileChooserParams {
// If |multiSelect| is true, the dialog allow to select multiple files.
bool multiSelect;
+ // If |directory| is true, the dialog allows the user to select a directory.
+ bool directory;
// |title| is a title of a file chooser dialog. It can be an empty string.
WebString title;
// |initialValue| is a filename which the dialog should select by default.
diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 6a0b24e..2b4ee53 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -63,6 +63,7 @@ namespace WebKit {
WEBKIT_API WebString action() const;
WEBKIT_API WebString name() const;
WEBKIT_API WebString method() const;
+ WEBKIT_API bool wasUserSubmitted() const;
WEBKIT_API void submit();
// FIXME: Deprecate and replace with WebVector<WebElement>.
WEBKIT_API void getNamedElements(const WebString&, WebVector<WebNode>&);
diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h
index 255d175..a237d5f 100644
--- a/WebKit/chromium/public/WebIDBDatabaseError.h
+++ b/WebKit/chromium/public/WebIDBDatabaseError.h
@@ -40,7 +40,7 @@ namespace WebKit {
// See comment in WebIndexedDatabase for a high level overview these classes.
class WebIDBDatabaseError {
public:
- WEBKIT_API ~WebIDBDatabaseError();
+ ~WebIDBDatabaseError() { reset(); }
WEBKIT_API WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
WEBKIT_API WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); }
@@ -51,6 +51,7 @@ public:
}
WEBKIT_API void assign(const WebIDBDatabaseError&);
+ WEBKIT_API void reset();
WEBKIT_API unsigned short code() const;
WEBKIT_API WebString message() const;
diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h
index 876928a..1cf336d 100644
--- a/WebKit/chromium/public/WebIDBKey.h
+++ b/WebKit/chromium/public/WebIDBKey.h
@@ -36,7 +36,7 @@ namespace WebKit {
class WebIDBKey {
public:
- ~WebIDBKey();
+ ~WebIDBKey() { reset(); }
WEBKIT_API static WebIDBKey createNull();
WEBKIT_API static WebIDBKey createInvalid();
@@ -55,6 +55,7 @@ public:
WEBKIT_API void assign(const WebString&);
WEBKIT_API void assign(int32_t);
WEBKIT_API void assignInvalid();
+ WEBKIT_API void reset();
enum Type {
NullType = 0,
diff --git a/WebKit/chromium/public/WebMediaElement.h b/WebKit/chromium/public/WebMediaElement.h
new file mode 100644
index 0000000..94837a5
--- /dev/null
+++ b/WebKit/chromium/public/WebMediaElement.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebMediaElement_h
+#define WebMediaElement_h
+
+#include "WebElement.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLMediaElement; }
+#endif
+
+namespace WebKit {
+
+class WebMediaPlayer;
+
+class WebMediaElement : public WebElement {
+public:
+ WEBKIT_API WebMediaPlayer* player() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebMediaElement(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&);
+ WebMediaElement& operator=(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLMediaElement>() const;
+#endif
+};
+} // namespace WebKit
+
+#endif // WebMediaElement_h
diff --git a/WebKit/chromium/public/WebOptionElement.h b/WebKit/chromium/public/WebOptionElement.h
new file mode 100644
index 0000000..1689a57
--- /dev/null
+++ b/WebKit/chromium/public/WebOptionElement.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebOptionElement_h
+#define WebOptionElement_h
+
+#include "WebFormControlElement.h"
+#include "WebVector.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class HTMLOptionElement; }
+#endif
+
+namespace WebKit {
+
+// Provides readonly access to some properties of a DOM option element node.
+class WebOptionElement : public WebFormControlElement {
+public:
+ WebOptionElement() : WebFormControlElement() { }
+ WebOptionElement(const WebOptionElement& e) : WebFormControlElement(e) { }
+
+ WebOptionElement& operator=(const WebOptionElement& e)
+ {
+ WebFormControlElement::assign(e);
+ return *this;
+ }
+ WEBKIT_API void assign(const WebOptionElement& e) { WebFormControlElement::assign(e); }
+
+ WEBKIT_API void setValue(const WebString&);
+ WEBKIT_API WebString value() const;
+
+ WEBKIT_API int index() const;
+ WEBKIT_API WebString text() const;
+ WEBKIT_API bool defaultSelected() const;
+ WEBKIT_API void setDefaultSelected(bool);
+ WEBKIT_API WebString label() const;
+ WEBKIT_API bool isEnabled() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebOptionElement(const WTF::PassRefPtr<WebCore::HTMLOptionElement>&);
+ WebOptionElement& operator=(const WTF::PassRefPtr<WebCore::HTMLOptionElement>&);
+ operator WTF::PassRefPtr<WebCore::HTMLOptionElement>() const;
+#endif
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h
index 8e1c946..816d38b 100644
--- a/WebKit/chromium/public/WebPlugin.h
+++ b/WebKit/chromium/public/WebPlugin.h
@@ -50,9 +50,6 @@ struct WebRect;
struct WebURLError;
template <typename T> class WebVector;
-// FIXME: remove once the chromium is updated.
-#define WEBPLUGIN_FIND_HAS_RETURN_TYPE
-
class WebPlugin {
public:
virtual bool initialize(WebPluginContainer*) = 0;
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index 03ff681..95307a2 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -77,6 +77,9 @@ public:
WEBKIT_API static void enableTouch(bool);
WEBKIT_API static bool isTouchEnabled();
+ WEBKIT_API static void enableDeviceOrientation(bool);
+ WEBKIT_API static bool isDeviceOrientationEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebSelectElement.h b/WebKit/chromium/public/WebSelectElement.h
index 7bd755b..3e7f5e2 100644
--- a/WebKit/chromium/public/WebSelectElement.h
+++ b/WebKit/chromium/public/WebSelectElement.h
@@ -32,6 +32,8 @@
#define WebSelectElement_h
#include "WebFormControlElement.h"
+#include "WebOptionElement.h"
+#include "WebVector.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class HTMLSelectElement; }
@@ -45,11 +47,16 @@ public:
WebSelectElement() : WebFormControlElement() { }
WebSelectElement(const WebSelectElement& e) : WebFormControlElement(e) { }
- WebSelectElement& operator=(const WebSelectElement& e) { WebFormControlElement::assign(e); return *this; }
+ WebSelectElement& operator=(const WebSelectElement& e)
+ {
+ WebFormControlElement::assign(e);
+ return *this;
+ }
WEBKIT_API void assign(const WebSelectElement& e) { WebFormControlElement::assign(e); }
WEBKIT_API void setValue(const WebString&);
WEBKIT_API WebString value();
+ WEBKIT_API WebVector<WebElement> listItems();
#if WEBKIT_IMPLEMENTATION
WebSelectElement(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&);
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index de895e1..32cefa1 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -92,6 +92,7 @@ public:
virtual void setEditingBehavior(EditingBehavior) = 0;
virtual void setAcceleratedCompositingEnabled(bool) = 0;
virtual void setHTML5ParserEnabled(bool) = 0;
+ virtual void setMemoryInfoEnabled(bool) = 0;
protected:
~WebSettings() { }
diff --git a/WebKit/chromium/public/WebThemeEngine.h b/WebKit/chromium/public/WebThemeEngine.h
index 9638c2f..ab59fa2 100644
--- a/WebKit/chromium/public/WebThemeEngine.h
+++ b/WebKit/chromium/public/WebThemeEngine.h
@@ -68,6 +68,10 @@ public:
WebCanvas*, int part, int state, int classicState,
const WebRect&, const WebRect& alignRect) = 0;
+ virtual void paintSpinButton(
+ WebCanvas*, int part, int state, int classicState,
+ const WebRect&) {}
+
virtual void paintTextField(
WebCanvas*, int part, int state, int classicState,
const WebRect&, WebColor, bool fillContentArea, bool drawEdges) = 0;
diff --git a/WebKit/chromium/public/WebURLLoaderClient.h b/WebKit/chromium/public/WebURLLoaderClient.h
index a66b153..c716e5d 100644
--- a/WebKit/chromium/public/WebURLLoaderClient.h
+++ b/WebKit/chromium/public/WebURLLoaderClient.h
@@ -43,27 +43,31 @@ public:
// Called when following a redirect. |newRequest| contains the request
// generated by the redirect. The client may modify |newRequest|.
virtual void willSendRequest(
- WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) = 0;
+ WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) { }
// Called to report upload progress. The bytes reported correspond to
// the HTTP message body.
virtual void didSendData(
- WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) = 0;
+ WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) { }
// Called when response headers are received.
- virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) = 0;
+ virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { }
+
+ // Called when a chunk of response data is downloaded. This is only called
+ // if WebURLRequest's downloadToFile flag was set to true.
+ virtual void didDownloadData(WebURLLoader*, int dataLength) { }
// Called when a chunk of response data is received.
- virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength) = 0;
+ virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength) { }
// Called when a chunk of renderer-generated metadata is received from the cache.
virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) { }
// Called when the load completes successfully.
- virtual void didFinishLoading(WebURLLoader*) = 0;
+ virtual void didFinishLoading(WebURLLoader*) { }
// Called when the load completes with an error.
- virtual void didFail(WebURLLoader*, const WebURLError&) = 0;
+ virtual void didFail(WebURLLoader*, const WebURLError&) { }
protected:
~WebURLLoaderClient() { }
diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h
index b60d5be..36d6791 100644
--- a/WebKit/chromium/public/WebURLRequest.h
+++ b/WebKit/chromium/public/WebURLRequest.h
@@ -151,6 +151,11 @@ public:
WEBKIT_API int appCacheHostID() const;
WEBKIT_API void setAppCacheHostID(int id);
+ // If true, the response body will be downloaded to a file managed by the
+ // WebURLLoader. See WebURLResponse::downloadedFilePath.
+ WEBKIT_API bool downloadToFile() const;
+ WEBKIT_API void setDownloadToFile(bool);
+
#if defined(WEBKIT_IMPLEMENTATION)
WebCore::ResourceRequest& toMutableResourceRequest();
const WebCore::ResourceRequest& toResourceRequest() const;
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
index 2aa603d..ac75d4c 100644
--- a/WebKit/chromium/public/WebURLResponse.h
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -76,6 +76,9 @@ public:
WEBKIT_API unsigned connectionID() const;
WEBKIT_API void setConnectionID(unsigned);
+ WEBKIT_API bool connectionReused() const;
+ WEBKIT_API void setConnectionReused(bool);
+
WEBKIT_API WebURLLoadTiming loadTiming();
WEBKIT_API void setLoadTiming(const WebURLLoadTiming&);
@@ -155,6 +158,12 @@ public:
WEBKIT_API bool isMultipartPayload() const;
WEBKIT_API void setIsMultipartPayload(bool);
+ // This indicates the location of a downloaded response if the
+ // WebURLRequest had the downloadToFile flag set to true. This file path
+ // remains valid for the lifetime of the WebURLLoader used to create it.
+ WEBKIT_API WebString downloadFilePath() const;
+ WEBKIT_API void setDownloadFilePath(const WebString&);
+
protected:
void assign(WebURLResponsePrivate*);
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index a8f5387..26d7269 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -248,11 +248,21 @@ public:
// AutoFill -----------------------------------------------------------
+ // DEPRECATED.
+ virtual void applyAutoFillSuggestions(
+ const WebNode&,
+ const WebVector<WebString>& names,
+ const WebVector<WebString>& labels,
+ int separatorIndex) = 0;
+
// Notifies the WebView that AutoFill suggestions are available for a node.
+ // |uniqueIDs| is a vector of IDs that represent the unique ID of each
+ // AutoFill profile in the suggestions popup.
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
int separatorIndex) = 0;
// Notifies the WebView that Autocomplete suggestions are available for a
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index f21d262..11fb233 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -307,6 +307,7 @@ public:
virtual void didAcceptAutoFillSuggestion(const WebNode&,
const WebString& name,
const WebString& label,
+ int uniqueID,
unsigned index) { }
// Informs the browser that the user has selected an AutoFill suggestion for
@@ -314,10 +315,11 @@ public:
// the arrow keys to navigate to a suggestion.
virtual void didSelectAutoFillSuggestion(const WebNode&,
const WebString& name,
- const WebString& label) { }
+ const WebString& label,
+ int uniqueID) { }
// Informs the browser that the user has cleared the selection from the
- // AutoFill suggestions dropdown. This happens when a user uses the arrow
+ // AutoFill suggestions popup. This happens when a user uses the arrow
// keys to navigate outside the range of possible selections.
virtual void didClearAutoFillSelection(const WebNode&) { }
diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h
index 902b9b5..c88420b 100644
--- a/WebKit/chromium/src/ApplicationCacheHostInternal.h
+++ b/WebKit/chromium/src/ApplicationCacheHostInternal.h
@@ -53,6 +53,11 @@ public:
m_outerHost.set(webFrame->client()->createApplicationCacheHost(webFrame, this));
}
+ virtual void didChangeCacheAssociation()
+ {
+ // FIXME: Prod the inspector to update it's notion of what cache the page is using.
+ }
+
virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID)
{
m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID), 0, 0);
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 1294561..6b74f60 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -66,28 +66,47 @@ unsigned AutoFillPopupMenuClient::getSuggestionsCount() const
WebString AutoFillPopupMenuClient::getSuggestion(unsigned listIndex) const
{
- if (listIndex == static_cast<unsigned>(m_separatorIndex))
+ int index = convertListIndexToInternalIndex(listIndex);
+ if (index == -1)
return WebString();
- if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
- --listIndex;
-
- // FIXME: Modify the PopupMenu to add the label in gray right-justified.
- ASSERT(listIndex < m_names.size());
+ ASSERT(index >= 0 && static_cast<size_t>(index) < m_names.size());
+ return m_names[index];
+}
- WebString suggestion = m_names[listIndex];
- if (m_labels[listIndex].isEmpty())
- return suggestion;
+WebString AutoFillPopupMenuClient::getLabel(unsigned listIndex) const
+{
+ int index = convertListIndexToInternalIndex(listIndex);
+ if (index == -1)
+ return WebString();
- return suggestion + String(" (") + m_labels[listIndex] + String(")");
+ ASSERT(index >= 0 && static_cast<size_t>(index) < m_labels.size());
+ return m_labels[index];
}
void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
{
- // FIXME: Do we want to remove AutoFill suggestions?
- ASSERT(listIndex < m_names.size());
- m_names.remove(listIndex);
- m_labels.remove(listIndex);
+ if (!canRemoveSuggestionAtIndex(listIndex))
+ return;
+
+ int index = convertListIndexToInternalIndex(listIndex);
+
+ ASSERT(static_cast<unsigned>(index) < m_names.size());
+
+ m_names.remove(index);
+ m_labels.remove(index);
+
+ // Shift the separator index if necessary.
+ if (m_separatorIndex != -1)
+ m_separatorIndex--;
+}
+
+bool AutoFillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex)
+{
+ // Only allow deletion of items before the separator and those that don't
+ // have a label (autocomplete).
+ int index = convertListIndexToInternalIndex(listIndex);
+ return m_labels[index].isEmpty() && (m_separatorIndex == -1 || listIndex < static_cast<unsigned>(m_separatorIndex));
}
void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
@@ -119,6 +138,7 @@ void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
m_names[listIndex],
m_labels[listIndex],
+ m_uniqueIDs[listIndex],
listIndex);
}
}
@@ -136,13 +156,15 @@ void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEven
webView->client()->didSelectAutoFillSuggestion(WebNode(getTextField()),
m_names[listIndex],
- m_labels[listIndex]);
+ m_labels[listIndex],
+ m_uniqueIDs[listIndex]);
}
void AutoFillPopupMenuClient::selectionCleared()
{
- // Same effect desired as popupDidHide, so call through.
- popupDidHide();
+ WebViewImpl* webView = getWebView();
+ if (webView)
+ webView->client()->didClearAutoFillSelection(WebNode(getTextField()));
}
String AutoFillPopupMenuClient::itemText(unsigned listIndex) const
@@ -150,6 +172,11 @@ String AutoFillPopupMenuClient::itemText(unsigned listIndex) const
return getSuggestion(listIndex);
}
+String AutoFillPopupMenuClient::itemLabel(unsigned listIndex) const
+{
+ return getLabel(listIndex);
+}
+
PopupMenuStyle AutoFillPopupMenuClient::itemStyle(unsigned listIndex) const
{
return *m_style;
@@ -222,9 +249,11 @@ void AutoFillPopupMenuClient::initialize(
HTMLInputElement* textField,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
int separatorIndex)
{
ASSERT(names.size() == labels.size());
+ ASSERT(names.size() == uniqueIDs.size());
ASSERT(separatorIndex < static_cast<int>(names.size()));
m_selectedIndex = -1;
@@ -232,7 +261,7 @@ void AutoFillPopupMenuClient::initialize(
// The suggestions must be set before initializing the
// AutoFillPopupMenuClient.
- setSuggestions(names, labels, separatorIndex);
+ setSuggestions(names, labels, uniqueIDs, separatorIndex);
FontDescription fontDescription;
RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl,
@@ -251,16 +280,20 @@ void AutoFillPopupMenuClient::initialize(
void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
int separatorIndex)
{
ASSERT(names.size() == labels.size());
+ ASSERT(names.size() == uniqueIDs.size());
ASSERT(separatorIndex < static_cast<int>(names.size()));
m_names.clear();
m_labels.clear();
+ m_uniqueIDs.clear();
for (size_t i = 0; i < names.size(); ++i) {
m_names.append(names[i]);
m_labels.append(labels[i]);
+ m_uniqueIDs.append(uniqueIDs[i]);
}
m_separatorIndex = separatorIndex;
@@ -270,6 +303,16 @@ void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
setSelectedIndex(-1);
}
+int AutoFillPopupMenuClient::convertListIndexToInternalIndex(unsigned listIndex) const
+{
+ if (listIndex == static_cast<unsigned>(m_separatorIndex))
+ return -1;
+
+ if (m_separatorIndex == -1 || listIndex < static_cast<unsigned>(m_separatorIndex))
+ return listIndex;
+ return listIndex - 1;
+}
+
WebViewImpl* AutoFillPopupMenuClient::getWebView() const
{
Frame* frame = m_textField->document()->frame();
@@ -288,7 +331,7 @@ RenderStyle* AutoFillPopupMenuClient::textFieldStyle() const
RenderStyle* style = m_textField->computedStyle();
if (!style) {
// It seems we can only have a 0 style in a TextField if the
- // node is detached, in which case we the popup shoud not be
+ // node is detached, in which case we the popup should not be
// showing. Please report this in http://crbug.com/7708 and
// include the page you were visiting.
ASSERT_NOT_REACHED();
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h
index a7d6693..289c8d0 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.h
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h
@@ -57,14 +57,21 @@ public:
// Returns the suggestion at |listIndex|.
virtual WebString getSuggestion(unsigned listIndex) const;
+ // Returns the label at |listIndex|.
+ virtual WebString getLabel(unsigned listIndex) const;
+
// Removes the suggestion at |listIndex| from the list of suggestions.
virtual void removeSuggestionAtIndex(unsigned listIndex);
+ // Returns true if the suggestion at |listIndex| can be removed.
+ bool canRemoveSuggestionAtIndex(unsigned listIndex);
+
// WebCore::PopupMenuClient methods:
virtual void valueChanged(unsigned listIndex, bool fireEvents = true);
virtual void selectionChanged(unsigned, bool);
virtual void selectionCleared();
virtual WebCore::String itemText(unsigned listIndex) const;
+ virtual WebCore::String itemLabel(unsigned listIndex) const;
virtual WebCore::String itemToolTip(unsigned lastIndex) const { return WebCore::String(); }
virtual WebCore::String itemAccessibilityText(unsigned lastIndex) const { return WebCore::String(); }
virtual bool itemIsEnabled(unsigned listIndex) const { return true; }
@@ -93,10 +100,12 @@ public:
void initialize(WebCore::HTMLInputElement*,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
int separatorIndex);
void setSuggestions(const WebVector<WebString>& names,
const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
int separatorIndex);
// DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
@@ -104,6 +113,10 @@ public:
void setAutocompleteMode(bool enabled) { m_AutocompleteModeEnabled = enabled; }
private:
+ // Convert the specified index from an index into the visible list (which might
+ // include a separator entry) to an index to |m_names| and |m_labels|.
+ // Returns -1 if the given index points to the separator.
+ int convertListIndexToInternalIndex(unsigned) const;
WebViewImpl* getWebView() const;
WebCore::HTMLInputElement* getTextField() const { return m_textField.get(); }
WebCore::RenderStyle* textFieldStyle() const;
@@ -114,6 +127,7 @@ private:
// The names and labels that make up the text of the menu items.
Vector<WebCore::String> m_names;
Vector<WebCore::String> m_labels;
+ Vector<int> m_uniqueIDs;
// The index of the separator. -1 if there is no separator.
int m_separatorIndex;
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 54c81aa..d43d88a 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -31,8 +31,8 @@
#include "config.h"
#include "ChromeClientImpl.h"
-#include "AccessibilityObject.h"
#include "AXObjectCache.h"
+#include "AccessibilityObject.h"
#include "CharacterNames.h"
#include "Console.h"
#include "Cursor.h"
@@ -43,9 +43,9 @@
#include "FloatRect.h"
#include "FrameLoadRequest.h"
#include "FrameView.h"
+#include "GLES2Context.h"
#include "Geolocation.h"
#include "GeolocationService.h"
-#include "WebGeolocationService.h"
#include "GeolocationServiceChromium.h"
#include "GraphicsLayer.h"
#include "HTMLNames.h"
@@ -56,6 +56,7 @@
#include "Page.h"
#include "PopupMenuChromium.h"
#include "ScriptController.h"
+#include "WebGeolocationService.h"
#if USE(V8)
#include "V8Proxy.h"
#endif
@@ -588,6 +589,11 @@ void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileCh
WebFileChooserParams params;
params.multiSelect = fileChooser->allowsMultipleFiles();
+#if ENABLE(DIRECTORY_UPLOAD)
+ params.directory = fileChooser->allowsDirectoryUpload();
+#else
+ params.directory = false;
+#endif
params.acceptTypes = fileChooser->acceptTypes();
params.selectedFiles = fileChooser->filenames();
if (params.selectedFiles.size() > 0)
@@ -728,6 +734,16 @@ void ChromeClientImpl::scheduleCompositingLayerSync()
{
m_webView->setRootLayerNeedsDisplay();
}
+
+PassOwnPtr<GLES2Context> ChromeClientImpl::getOnscreenGLES2Context()
+{
+ return m_webView->getOnscreenGLES2Context();
+}
+
+PassOwnPtr<GLES2Context> ChromeClientImpl::getOffscreenGLES2Context()
+{
+ return m_webView->getOffscreenGLES2Context();
+}
#endif
bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 84355c3..e824381 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -126,7 +126,7 @@ public:
virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*);
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
- virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
+ virtual void setCursor(const WebCore::Cursor&) { }
virtual void formStateDidChange(const WebCore::Node*);
virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
#if ENABLE(TOUCH_EVENTS)
@@ -145,7 +145,11 @@ public:
// Sets a flag to specify that the view needs to be updated, so we need
// to do an eager layout before the drawing.
virtual void scheduleCompositingLayerSync();
+
+ virtual PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context();
+ virtual PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context();
#endif
+
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 5124a7f..333020f 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -691,6 +691,14 @@ void ChromiumBridge::paintScrollbarTrack(
alignRect);
}
+void ChromiumBridge::paintSpinButton(
+ GraphicsContext* gc, int part, int state, int classicState,
+ const IntRect& rect)
+{
+ webKitClient()->themeEngine()->paintSpinButton(
+ gc->platformContext()->canvas(), part, state, classicState, rect);
+}
+
void ChromiumBridge::paintTextField(
GraphicsContext* gc, int part, int state, int classicState,
const IntRect& rect, const Color& color, bool fillContentArea,
diff --git a/WebKit/chromium/src/DebuggerAgentManager.cpp b/WebKit/chromium/src/DebuggerAgentManager.cpp
index 939f4ed..1cc6740 100644
--- a/WebKit/chromium/src/DebuggerAgentManager.cpp
+++ b/WebKit/chromium/src/DebuggerAgentManager.cpp
@@ -119,10 +119,8 @@ DebuggerAgentManager::AttachedAgentsMap* DebuggerAgentManager::s_attachedAgentsM
void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
if (!s_exposeV8DebuggerProtocol)
return;
-#endif
if (!s_attachedAgentsMap) {
s_attachedAgentsMap = new AttachedAgentsMap();
v8::Debug::SetMessageHandler2(&DebuggerAgentManager::onV8DebugMessage);
@@ -135,10 +133,8 @@ void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent)
void DebuggerAgentManager::debugDetach(DebuggerAgentImpl* debuggerAgent)
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
if (!s_exposeV8DebuggerProtocol)
return;
-#endif
if (!s_attachedAgentsMap) {
ASSERT_NOT_REACHED();
return;
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index 4ae4934..11977b6 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -935,10 +935,14 @@ void EditorClientImpl::getGuessesForWord(const String&,
notImplemented();
}
-void EditorClientImpl::setInputMethodState(bool enabled)
+void EditorClientImpl::willSetInputMethodState()
{
if (m_webView->client())
m_webView->client()->resetInputMethod();
}
+void EditorClientImpl::setInputMethodState(bool)
+{
+}
+
} // namesace WebKit
diff --git a/WebKit/chromium/src/EditorClientImpl.h b/WebKit/chromium/src/EditorClientImpl.h
index 006b609..549a512 100644
--- a/WebKit/chromium/src/EditorClientImpl.h
+++ b/WebKit/chromium/src/EditorClientImpl.h
@@ -108,6 +108,7 @@ public:
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const WebCore::String& word,
WTF::Vector<WebCore::String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
// Shows the form autofill popup for |node| if it is an HTMLInputElement and
diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp
index f342436..b4b4bb2 100644
--- a/WebKit/chromium/src/GLES2Context.cpp
+++ b/WebKit/chromium/src/GLES2Context.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "GLES2Context.h"
+#include "GLES2ContextInternal.h"
#include "IntSize.h"
#include "WebGLES2Context.h"
#include "WebKit.h"
@@ -52,68 +53,23 @@ using namespace WebKit;
namespace WebCore {
-class GLES2ContextInternal {
-public:
- GLES2ContextInternal() {}
- ~GLES2ContextInternal() {}
-
- bool initializeOnscreen(Page*);
- bool initializeOffscreen(GLES2Context*);
-
- WebGLES2Context* getWebGLES2Context() { return m_impl; }
-
-private:
- WebGLES2Context* m_impl;
-};
-
-bool GLES2ContextInternal::initializeOnscreen(Page* page)
+PassOwnPtr<GLES2ContextInternal> GLES2ContextInternal::create(WebGLES2Context* impl, bool owns)
{
- ASSERT(page);
- WebViewImpl* webView = WebViewImpl::fromPage(page);
- m_impl = webView->gles2Context();
- if (!m_impl)
- return false;
-
- return true;
-}
-
-bool GLES2ContextInternal::initializeOffscreen(GLES2Context* parent)
-{
- m_impl = webKitClient()->createGLES2Context();
- if (!m_impl)
- return false;
- if (!m_impl->initialize(0, parent ? parent->m_internal->m_impl : 0)) {
- delete m_impl;
- return false;
- }
- return true;
+ PassOwnPtr<GLES2ContextInternal> result = new GLES2ContextInternal(impl, owns);
+ return result;
}
-PassOwnPtr<GLES2Context> GLES2Context::createOnscreen(Page* page)
+PassOwnPtr<GLES2Context> GLES2Context::create(PassOwnPtr<GLES2ContextInternal> internal)
{
- GLES2ContextInternal* internal = new GLES2ContextInternal();
- if (!internal->initializeOnscreen(page)) {
- delete internal;
- return 0;
- }
PassOwnPtr<GLES2Context> result = new GLES2Context();
- result->m_internal.set(internal);
+ result->m_internal = internal;
return result;
}
-PassOwnPtr<GLES2Context> GLES2Context::createOffscreen(GLES2Context* parent)
+GLES2Context::GLES2Context()
{
- GLES2ContextInternal* internal = new GLES2ContextInternal();
- if (!internal->initializeOffscreen(parent)) {
- delete internal;
- return 0;
- }
- PassOwnPtr<GLES2Context> result = new GLES2Context();
- result->m_internal.set(internal);
- return result;
}
-
GLES2Context::~GLES2Context()
{
}
diff --git a/WebKit/chromium/src/GLES2ContextInternal.cpp b/WebKit/chromium/src/GLES2ContextInternal.cpp
new file mode 100644
index 0000000..33eb602
--- /dev/null
+++ b/WebKit/chromium/src/GLES2ContextInternal.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "GLES2ContextInternal.h"
+
+#include "WebGLES2Context.h"
+
+namespace WebCore {
+
+GLES2ContextInternal::GLES2ContextInternal(WebKit::WebGLES2Context* impl, bool owns)
+ : m_impl(impl)
+ , m_owns(owns)
+{
+}
+
+GLES2ContextInternal::~GLES2ContextInternal()
+{
+ if (m_owns)
+ delete m_impl;
+}
+
+} // namespace WebCore
+
diff --git a/WebKit/chromium/src/GLES2ContextInternal.h b/WebKit/chromium/src/GLES2ContextInternal.h
new file mode 100644
index 0000000..4668311
--- /dev/null
+++ b/WebKit/chromium/src/GLES2ContextInternal.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKit {
+class WebGLES2Context;
+}
+
+namespace WebCore {
+
+class GLES2ContextInternal {
+public:
+ // If 'owns' is set to true, this GLES2ContextInternal takes ownership of the passed in WebKit::WebGLES2Context.
+ static PassOwnPtr<GLES2ContextInternal> create(WebKit::WebGLES2Context* impl, bool owns);
+
+ WebKit::WebGLES2Context* getWebGLES2Context() { return m_impl; }
+
+ ~GLES2ContextInternal();
+
+private:
+ GLES2ContextInternal(WebKit::WebGLES2Context* impl, bool owns);
+
+ WebKit::WebGLES2Context* m_impl;
+ bool m_owns;
+};
+
+}
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 7ba0bce..fec0b20 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -112,6 +112,7 @@ public:
void reshape(int width, int height);
+ void paintRenderingResultsToCanvas(WebGLRenderingContext* context);
void beginPaint(WebGLRenderingContext* context);
void endPaint();
@@ -139,7 +140,9 @@ public:
void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha);
void bufferData(unsigned long target, int size, unsigned long usage);
+ void bufferData(unsigned long target, ArrayBuffer* data, unsigned long usage);
void bufferData(unsigned long target, ArrayBufferView* data, unsigned long usage);
+ void bufferSubData(unsigned long target, long offset, ArrayBuffer* data);
void bufferSubData(unsigned long target, long offset, ArrayBufferView* data);
unsigned long checkFramebufferStatus(unsigned long target);
@@ -397,7 +400,7 @@ WebGLLayerChromium* GraphicsContext3DInternal::platformLayer() const
}
#endif
-void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
+void GraphicsContext3DInternal::paintRenderingResultsToCanvas(WebGLRenderingContext* context)
{
HTMLCanvasElement* canvas = context->canvas();
ImageBuffer* imageBuffer = canvas->buffer();
@@ -447,44 +450,20 @@ void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
canvas.drawBitmapRect(m_resizingBitmap, 0, dst);
}
#elif PLATFORM(CG)
- if (m_renderOutput) {
- int rowBytes = m_impl->width() * 4;
- CGDataProviderRef dataProvider = CGDataProviderCreateWithData(0, m_renderOutput, rowBytes * m_impl->height(), 0);
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
- CGImageRef cgImage = CGImageCreate(m_impl->width(),
- m_impl->height(),
- 8,
- 32,
- rowBytes,
- colorSpace,
- kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
- dataProvider,
- 0,
- false,
- kCGRenderingIntentDefault);
- // CSS styling may cause the canvas's content to be resized on
- // the page. Go back to the Canvas to figure out the correct
- // width and height to draw.
- CGRect rect = CGRectMake(0, 0,
- context->canvas()->width(),
- context->canvas()->height());
- // We want to completely overwrite the previous frame's
- // rendering results.
- CGContextSetBlendMode(imageBuffer->context()->platformContext(),
- kCGBlendModeCopy);
- CGContextSetInterpolationQuality(imageBuffer->context()->platformContext(),
- kCGInterpolationNone);
- CGContextDrawImage(imageBuffer->context()->platformContext(),
- rect, cgImage);
- CGImageRelease(cgImage);
- CGColorSpaceRelease(colorSpace);
- CGDataProviderRelease(dataProvider);
- }
+ if (m_renderOutput)
+ context->graphicsContext3D()->paintToCanvas(m_renderOutput, m_impl->width(), m_impl->height(),
+ canvas->width(), canvas->height(),
+ imageBuffer->context()->platformContext());
#else
#error Must port to your platform
#endif
}
+void GraphicsContext3DInternal::beginPaint(WebGLRenderingContext* context)
+{
+ paintRenderingResultsToCanvas(context);
+}
+
void GraphicsContext3DInternal::endPaint()
{
}
@@ -718,11 +697,21 @@ void GraphicsContext3DInternal::bufferData(unsigned long target, int size, unsig
m_impl->bufferData(target, size, 0, usage);
}
+void GraphicsContext3DInternal::bufferData(unsigned long target, ArrayBuffer* array, unsigned long usage)
+{
+ m_impl->bufferData(target, array->byteLength(), array->data(), usage);
+}
+
void GraphicsContext3DInternal::bufferData(unsigned long target, ArrayBufferView* array, unsigned long usage)
{
m_impl->bufferData(target, array->byteLength(), array->baseAddress(), usage);
}
+void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, ArrayBuffer* array)
+{
+ m_impl->bufferSubData(target, offset, array->byteLength(), array->data());
+}
+
void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, ArrayBufferView* array)
{
m_impl->bufferSubData(target, offset, array->byteLength(), array->baseAddress());
@@ -1165,7 +1154,9 @@ DELEGATE_TO_INTERNAL_2(blendFunc, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, int, unsigned long)
+DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, ArrayBuffer*, unsigned long)
DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, ArrayBufferView*, unsigned long)
+DELEGATE_TO_INTERNAL_3(bufferSubData, unsigned long, long, ArrayBuffer*)
DELEGATE_TO_INTERNAL_3(bufferSubData, unsigned long, long, ArrayBufferView*)
DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, unsigned long, unsigned long)
@@ -1311,6 +1302,7 @@ DELEGATE_TO_INTERNAL_6(vertexAttribPointer, unsigned long, int, int, bool, unsig
DELEGATE_TO_INTERNAL_4(viewport, long, long, unsigned long, unsigned long)
+DELEGATE_TO_INTERNAL_1(paintRenderingResultsToCanvas, WebGLRenderingContext*)
DELEGATE_TO_INTERNAL_1(beginPaint, WebGLRenderingContext*)
DELEGATE_TO_INTERNAL(endPaint)
diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
index 83b925a..73cedfa 100644
--- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
+++ b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
@@ -71,9 +71,6 @@ void InspectorFrontendClientImpl::windowObjectCleared()
v8::Handle<v8::Object> global = frameContext->Global();
global->Set(v8::String::New("InspectorFrontendHost"), frontendHostObj);
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
- global->Set(v8::String::New("v8ScriptDebugServerEnabled"), v8::True());
-#endif
}
void InspectorFrontendClientImpl::frontendLoaded()
diff --git a/WebKit/chromium/src/ResourceHandle.cpp b/WebKit/chromium/src/ResourceHandle.cpp
index a13400d..88f7f39 100644
--- a/WebKit/chromium/src/ResourceHandle.cpp
+++ b/WebKit/chromium/src/ResourceHandle.cpp
@@ -226,7 +226,7 @@ PassRefPtr<ResourceHandle> ResourceHandle::create(const ResourceRequest& request
return 0;
}
-const ResourceRequest& ResourceHandle::request() const
+ResourceRequest& ResourceHandle::firstRequest()
{
return d->m_request;
}
@@ -252,6 +252,11 @@ bool ResourceHandle::start(Frame* deprecated)
return true;
}
+bool ResourceHandle::hasAuthenticationChallenge() const
+{
+ return false;
+}
+
void ResourceHandle::clearAuthentication()
{
}
diff --git a/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp b/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp
index 03e5f46..abb63cc 100644
--- a/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp
+++ b/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp
@@ -64,14 +64,15 @@ WebAccessibilityCache* WebAccessibilityCache::create()
PassRefPtr<WebAccessibilityCacheImpl::WeakHandle> WebAccessibilityCacheImpl::WeakHandle::create(AccessibilityObject* object)
{
// FIXME: Remove resetting ref-count from AccessibilityObjectWrapper
- // and convert to use adoptRef.
- return new WebAccessibilityCacheImpl::WeakHandle(object);
+ RefPtr<WebAccessibilityCacheImpl::WeakHandle> weakHandle = adoptRef(new WebAccessibilityCacheImpl::WeakHandle(object));
+ weakHandle->m_object->setWrapper(weakHandle.get());
+
+ return weakHandle.release();
}
WebAccessibilityCacheImpl::WeakHandle::WeakHandle(AccessibilityObject* object)
: AccessibilityObjectWrapper(object)
{
- m_object->setWrapper(this);
}
// WebAccessibilityCacheImpl ----------------------------------------
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 4205c62..0d8cbad 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -231,9 +231,7 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl(
WebDevToolsAgentImpl::~WebDevToolsAgentImpl()
{
DebuggerAgentManager::onWebViewClosed(m_webViewImpl);
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl);
-#endif
disposeUtilityContext();
}
@@ -250,10 +248,8 @@ void WebDevToolsAgentImpl::attach()
if (m_attached)
return;
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
if (!m_client->exposeV8DebuggerProtocol())
ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client);
-#endif
m_debuggerAgentImpl.set(
new DebuggerAgentImpl(m_webViewImpl,
@@ -294,9 +290,7 @@ void WebDevToolsAgentImpl::detach()
void WebDevToolsAgentImpl::didNavigate()
{
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
ClientMessageLoopAdapter::didNavigate();
-#endif
DebuggerAgentManager::onNavigate();
}
@@ -432,11 +426,9 @@ void WebDevToolsAgentImpl::createInspectorFrontendProxy()
m_utilityContext = v8::Context::New();
compileUtilityScripts();
initDevToolsAgentHost();
-#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
WebCString debuggerScriptJs = m_client->debuggerScriptSource();
WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(
WebCore::String(debuggerScriptJs.data(), debuggerScriptJs.length()));
-#endif
}
void WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController()
diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
index eda2f77..3e83f18 100644
--- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
@@ -105,9 +105,9 @@ WebDevToolsFrontendImpl::WebDevToolsFrontendImpl(
InspectorController* ic = m_webViewImpl->page()->inspectorController();
ic->setInspectorFrontendClient(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client, this));
- // Put DevTools frontend Page into its own group so that it's not
- // deferred along with inspected page.
- m_webViewImpl->page()->setGroupName("DevToolsFrontend");
+ // Put each DevTools frontend Page into its own (single page) group so that it's not
+ // deferred along with the inspected page.
+ m_webViewImpl->page()->setGroupName(String());
WebFrameImpl* frame = m_webViewImpl->mainFrameImpl();
v8::HandleScope scope;
@@ -174,6 +174,8 @@ void WebDevToolsFrontendImpl::executeScript(const Vector<String>& v)
Vector< v8::Handle<v8::Value> > args;
for (size_t i = 0; i < v.size(); i++)
args.append(ToV8String(v.at(i)));
+ v8::TryCatch tryCatch;
+ tryCatch.SetVerbose(true);
function->Call(frameContext->Global(), args.size(), args.data());
}
diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp
index 8b4ce04..9c77732 100644
--- a/WebKit/chromium/src/WebFormElement.cpp
+++ b/WebKit/chromium/src/WebFormElement.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "WebFormElement.h"
+#include "FormState.h"
#include "HTMLFormControlElement.h"
#include "HTMLFormElement.h"
#include "HTMLInputElement.h"
@@ -55,16 +56,21 @@ WebString WebFormElement::action() const
return constUnwrap<HTMLFormElement>()->action();
}
-WebString WebFormElement::name() const
+WebString WebFormElement::name() const
{
return constUnwrap<HTMLFormElement>()->name();
}
-WebString WebFormElement::method() const
+WebString WebFormElement::method() const
{
return constUnwrap<HTMLFormElement>()->method();
}
-
+
+bool WebFormElement::wasUserSubmitted() const
+{
+ return constUnwrap<HTMLFormElement>()->submissionTrigger() == NotSubmittedByJavaScript;
+}
+
void WebFormElement::submit()
{
unwrap<HTMLFormElement>()->submit();
@@ -77,7 +83,7 @@ void WebFormElement::getNamedElements(const WebString& name,
unwrap<HTMLFormElement>()->getNamedElements(name, tempVector);
result.assign(tempVector);
}
-
+
void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& result) const
{
const HTMLFormElement* form = constUnwrap<HTMLFormElement>();
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 535d128..f1c30e2 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -2101,9 +2101,9 @@ int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const
bool WebFrameImpl::shouldScopeMatches(const String& searchText)
{
- // Don't scope if we can't find a frame or if the frame is not visible.
+ // Don't scope if we can't find a frame or a view or if the frame is not visible.
// The user may have closed the tab/application, so abort.
- if (!frame() || !hasVisibleContent())
+ if (!frame() || !frame()->view() || !hasVisibleContent())
return false;
ASSERT(frame()->document() && frame()->view());
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 0863ec8..47bb5a0 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -710,7 +710,7 @@ bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels,
// vertical flip is only a temporary solution anyway until Chrome
// is fully GPU composited, it wasn't worth the complexity.
- bool mustRestoreFBO;
+ bool mustRestoreFBO = false;
if (m_attributes.antialias) {
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
@@ -1120,6 +1120,10 @@ void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* valu
// Need to emulate IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for GL. Any valid
// combination should work, but GL_RGB/GL_UNSIGNED_BYTE might be the most
// useful for desktop WebGL users.
+ // Need to emulate MAX_FRAGMENT/VERTEX_UNIFORM_VECTORS and MAX_VARYING_VECTORS
+ // because desktop GL's corresponding queries return the number of components
+ // whereas GLES2 return the number of vectors (each vector has 4 components).
+ // Therefore, the value returned by desktop GL needs to be divided by 4.
makeContextCurrent();
switch (pname) {
case 0x8B9B: // IMPLEMENTATION_COLOR_READ_FORMAT
@@ -1128,6 +1132,18 @@ void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* valu
case 0x8B9A: // IMPLEMENTATION_COLOR_READ_TYPE
*value = GL_UNSIGNED_BYTE;
break;
+ case 0x8DFD: // MAX_FRAGMENT_UNIFORM_VECTORS
+ glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, value);
+ *value /= 4;
+ break;
+ case 0x8DFB: // MAX_VERTEX_UNIFORM_VECTORS
+ glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, value);
+ *value /= 4;
+ break;
+ case 0x8DFC: // MAX_VARYING_VECTORS
+ glGetIntegerv(GL_MAX_VARYING_FLOATS, value);
+ *value /= 4;
+ break;
default:
glGetIntegerv(pname, value);
}
diff --git a/WebKit/chromium/src/WebIDBDatabaseError.cpp b/WebKit/chromium/src/WebIDBDatabaseError.cpp
index 17fdd38..cbbe14a 100644
--- a/WebKit/chromium/src/WebIDBDatabaseError.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseError.cpp
@@ -40,11 +40,6 @@ using namespace WebCore;
namespace WebKit {
-WebIDBDatabaseError::~WebIDBDatabaseError()
-{
- m_private.reset();
-}
-
void WebIDBDatabaseError::assign(const WebIDBDatabaseError& value)
{
m_private = value.m_private;
@@ -55,6 +50,11 @@ void WebIDBDatabaseError::assign(unsigned short code, const WebString& message)
m_private = IDBDatabaseError::create(code, message);
}
+void WebIDBDatabaseError::reset()
+{
+ m_private.reset();
+}
+
unsigned short WebIDBDatabaseError::code() const
{
return m_private->code();
diff --git a/WebKit/chromium/src/WebIDBKey.cpp b/WebKit/chromium/src/WebIDBKey.cpp
index a52ea56..1c4c685 100644
--- a/WebKit/chromium/src/WebIDBKey.cpp
+++ b/WebKit/chromium/src/WebIDBKey.cpp
@@ -36,11 +36,6 @@ using namespace WebCore;
namespace WebKit {
-WebIDBKey::~WebIDBKey()
-{
- m_private.reset();
-}
-
WebIDBKey WebIDBKey::createNull()
{
WebIDBKey key;
@@ -80,6 +75,11 @@ void WebIDBKey::assignInvalid()
m_private = 0;
}
+void WebIDBKey::reset()
+{
+ m_private.reset();
+}
+
WebIDBKey::Type WebIDBKey::type() const
{
if (!m_private.get())
diff --git a/WebKit/chromium/src/WebMediaElement.cpp b/WebKit/chromium/src/WebMediaElement.cpp
new file mode 100644
index 0000000..4adda1e
--- /dev/null
+++ b/WebKit/chromium/src/WebMediaElement.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebMediaElement.h"
+
+#include "HTMLMediaElement.h"
+#include "MediaPlayer.h"
+#include "WebMediaPlayer.h"
+#include "WebMediaPlayerClientImpl.h"
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebMediaPlayer* WebMediaElement::player() const
+{
+ return WebMediaPlayerClientImpl::fromMediaElement(this)->mediaPlayer();
+}
+
+WebMediaElement::WebMediaElement(const PassRefPtr<HTMLMediaElement>& elem)
+ : WebElement(elem)
+{
+}
+
+WebMediaElement& WebMediaElement::operator=(const PassRefPtr<HTMLMediaElement>& elem)
+{
+ m_private = elem;
+ return *this;
+}
+
+WebMediaElement::operator PassRefPtr<HTMLMediaElement>() const
+{
+ return static_cast<HTMLMediaElement*>(m_private.get());
+}
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index 03051c3..2b0c9a7 100644
--- a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -14,7 +14,13 @@
#include "KURL.h"
#include "MediaPlayer.h"
#include "NotImplemented.h"
+#include "RenderView.h"
#include "TimeRanges.h"
+#include "VideoLayerChromium.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+#include "RenderLayerCompositor.h"
+#endif
#include "WebCanvas.h"
#include "WebCString.h"
@@ -22,12 +28,14 @@
#include "WebFrameImpl.h"
#include "WebKit.h"
#include "WebKitClient.h"
+#include "WebMediaElement.h"
#include "WebMediaPlayer.h"
#include "WebMimeRegistry.h"
#include "WebRect.h"
#include "WebSize.h"
#include "WebString.h"
#include "WebURL.h"
+#include "WebViewImpl.h"
// WebCommon.h defines WEBKIT_USING_SKIA so this has to be included last.
#if WEBKIT_USING_SKIA
@@ -45,6 +53,7 @@ static WebMediaPlayer* createWebMediaPlayer(
WebMediaPlayerClient* client, Frame* frame)
{
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame);
+
if (!webFrame->client())
return 0;
return webFrame->client()->createMediaPlayer(webFrame, client);
@@ -71,6 +80,17 @@ void WebMediaPlayerClientImpl::registerSelf(MediaEngineRegistrar registrar)
}
}
+WebMediaPlayerClientImpl* WebMediaPlayerClientImpl::fromMediaElement(const WebMediaElement* element)
+{
+ PlatformMedia pm = element->constUnwrap<HTMLMediaElement>()->platformMedia();
+ return static_cast<WebMediaPlayerClientImpl*>(pm.media.chromiumMediaPlayer);
+}
+
+WebMediaPlayer* WebMediaPlayerClientImpl::mediaPlayer() const
+{
+ return m_webMediaPlayer.get();
+}
+
// WebMediaPlayerClient --------------------------------------------------------
void WebMediaPlayerClientImpl::networkStateChanged()
@@ -146,6 +166,7 @@ void WebMediaPlayerClientImpl::load(const String& url)
{
Frame* frame = static_cast<HTMLMediaElement*>(
m_mediaPlayer->mediaPlayerClient())->document()->frame();
+
m_webMediaPlayer.set(createWebMediaPlayer(this, frame));
if (m_webMediaPlayer.get())
m_webMediaPlayer->load(KURL(ParsedURLString, url));
@@ -157,6 +178,22 @@ void WebMediaPlayerClientImpl::cancelLoad()
m_webMediaPlayer->cancelLoad();
}
+#if USE(ACCELERATED_COMPOSITING)
+PlatformLayer* WebMediaPlayerClientImpl::platformLayer() const
+{
+ ASSERT(m_supportsAcceleratedCompositing);
+ return m_videoLayer.get();
+}
+#endif
+
+PlatformMedia WebMediaPlayerClientImpl::platformMedia() const
+{
+ PlatformMedia pm;
+ pm.type = PlatformMedia::ChromiumMediaPlayerType;
+ pm.media.chromiumMediaPlayer = const_cast<WebMediaPlayerClientImpl*>(this);
+ return pm;
+}
+
void WebMediaPlayerClientImpl::play()
{
if (m_webMediaPlayer.get())
@@ -360,6 +397,13 @@ bool WebMediaPlayerClientImpl::hasSingleSecurityOrigin() const
return false;
}
+#if USE(ACCELERATED_COMPOSITING)
+bool WebMediaPlayerClientImpl::supportsAcceleratedRendering() const
+{
+ return m_supportsAcceleratedCompositing;
+}
+#endif
+
MediaPlayer::MovieLoadType WebMediaPlayerClientImpl::movieLoadType() const
{
if (m_webMediaPlayer.get())
@@ -372,6 +416,22 @@ MediaPlayerPrivateInterface* WebMediaPlayerClientImpl::create(MediaPlayer* playe
{
WebMediaPlayerClientImpl* client = new WebMediaPlayerClientImpl();
client->m_mediaPlayer = player;
+
+#if USE(ACCELERATED_COMPOSITING)
+ Frame* frame = static_cast<HTMLMediaElement*>(
+ client->m_mediaPlayer->mediaPlayerClient())->document()->frame();
+
+ // This does not actually check whether the hardware can support accelerated
+ // compositing, but only if the flag is set. However, this is checked lazily
+ // in WebViewImpl::setIsAcceleratedCompositingActive() and will fail there
+ // if necessary.
+ client->m_supportsAcceleratedCompositing =
+ frame->contentRenderer()->compositor()->hasAcceleratedCompositing();
+
+ if (client->m_supportsAcceleratedCompositing)
+ client->m_videoLayer = VideoLayerChromium::create(0);
+#endif
+
return client;
}
@@ -402,6 +462,10 @@ MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& t
WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
: m_mediaPlayer(0)
+#if USE(ACCELERATED_COMPOSITING)
+ , m_videoLayer(0)
+ , m_supportsAcceleratedCompositing(false)
+#endif
{
}
diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/WebKit/chromium/src/WebMediaPlayerClientImpl.h
index 57c93b7..0faac26 100644
--- a/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -39,6 +39,7 @@
namespace WebKit {
+class WebMediaElement;
class WebMediaPlayer;
// This class serves as a bridge between WebCore::MediaPlayer and
@@ -50,6 +51,11 @@ public:
static void setIsEnabled(bool);
static void registerSelf(WebCore::MediaEngineRegistrar);
+ static WebMediaPlayerClientImpl* fromMediaElement(const WebMediaElement* element);
+
+ // Returns the encapsulated WebKit::WebMediaPlayer.
+ WebMediaPlayer* mediaPlayer() const;
+
// WebMediaPlayerClient methods:
virtual void networkStateChanged();
virtual void readyStateChanged();
@@ -66,6 +72,10 @@ public:
// MediaPlayerPrivateInterface methods:
virtual void load(const WebCore::String& url);
virtual void cancelLoad();
+#if USE(ACCELERATED_COMPOSITING)
+ virtual WebCore::PlatformLayer* platformLayer() const;
+#endif
+ virtual WebCore::PlatformMedia platformMedia() const;
virtual void play();
virtual void pause();
virtual bool supportsFullscreen() const;
@@ -94,6 +104,10 @@ public:
virtual void setSize(const WebCore::IntSize&);
virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&);
virtual bool hasSingleSecurityOrigin() const;
+#if USE(ACCELERATED_COMPOSITING)
+ virtual bool supportsAcceleratedRendering() const;
+#endif
+
virtual WebCore::MediaPlayer::MovieLoadType movieLoadType() const;
private:
@@ -106,6 +120,10 @@ private:
WebCore::MediaPlayer* m_mediaPlayer;
OwnPtr<WebMediaPlayer> m_webMediaPlayer;
+#if USE(ACCELERATED_COMPOSITING)
+ RefPtr<WebCore::PlatformLayer> m_videoLayer;
+ bool m_supportsAcceleratedCompositing;
+#endif
static bool m_isEnabled;
};
diff --git a/WebKit/chromium/src/WebOptionElement.cpp b/WebKit/chromium/src/WebOptionElement.cpp
new file mode 100644
index 0000000..49bff3b
--- /dev/null
+++ b/WebKit/chromium/src/WebOptionElement.cpp
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebOptionElement.h"
+
+#include "HTMLNames.h"
+#include "HTMLOptionElement.h"
+#include "HTMLSelectElement.h"
+#include "WebString.h"
+#include <wtf/PassRefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebOptionElement::setValue(const WebString& newValue)
+{
+ return unwrap<HTMLOptionElement>()->setValue(newValue);
+}
+
+WebString WebOptionElement::value() const
+{
+ return constUnwrap<HTMLOptionElement>()->value();
+}
+
+int WebOptionElement::index() const
+{
+ return constUnwrap<HTMLOptionElement>()->index();
+}
+
+WebString WebOptionElement::text() const
+{
+ return constUnwrap<HTMLOptionElement>()->text();
+}
+
+bool WebOptionElement::defaultSelected() const
+{
+ return constUnwrap<HTMLOptionElement>()->defaultSelected();
+}
+
+void WebOptionElement::setDefaultSelected(bool newSelected)
+{
+ return unwrap<HTMLOptionElement>()->setDefaultSelected(newSelected);
+}
+
+WebString WebOptionElement::label() const
+{
+ return constUnwrap<HTMLOptionElement>()->label();
+}
+
+bool WebOptionElement::isEnabled() const
+{
+ return !(constUnwrap<HTMLOptionElement>()->disabled());
+}
+
+WebOptionElement::WebOptionElement(const PassRefPtr<HTMLOptionElement>& elem)
+ : WebFormControlElement(elem)
+{
+}
+
+WebOptionElement& WebOptionElement::operator=(const PassRefPtr<HTMLOptionElement>& elem)
+{
+ m_private = elem;
+ return *this;
+}
+
+WebOptionElement::operator PassRefPtr<HTMLOptionElement>() const
+{
+ return static_cast<HTMLOptionElement*>(m_private.get());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 2abdc62..75d6cc1 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -318,6 +318,10 @@ void WebPopupMenuImpl::scrollbarsModeDidChange() const
// Nothing to be done since we have no concept of different scrollbar modes.
}
+void WebPopupMenuImpl::setCursor(const WebCore::Cursor&)
+{
+}
+
//-----------------------------------------------------------------------------
// WebCore::FramelessScrollViewClient
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index 4f5c2de..edbb4ab 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -110,6 +110,7 @@ public:
virtual PlatformPageClient platformPageClient() const { return 0; }
virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const;
virtual void scrollbarsModeDidChange() const;
+ virtual void setCursor(const WebCore::Cursor&);
// WebCore::FramelessScrollViewClient methods:
virtual void popupClosed(WebCore::FramelessScrollView*);
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 595a47f..efb287c 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -226,4 +226,14 @@ bool WebRuntimeFeatures::isTouchEnabled()
#endif
}
+void WebRuntimeFeatures::enableDeviceOrientation(bool enable)
+{
+ RuntimeEnabledFeatures::setDeviceOrientationEnabled(enable);
+}
+
+bool WebRuntimeFeatures::isDeviceOrientationEnabled()
+{
+ return RuntimeEnabledFeatures::deviceOrientationEnabled();
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSelectElement.cpp b/WebKit/chromium/src/WebSelectElement.cpp
index 6516cc3..79a4d85 100644
--- a/WebKit/chromium/src/WebSelectElement.cpp
+++ b/WebKit/chromium/src/WebSelectElement.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "WebSelectElement.h"
+#include "HTMLNames.h"
+#include "HTMLOptionElement.h"
#include "HTMLSelectElement.h"
#include "WebString.h"
#include <wtf/PassRefPtr.h>
@@ -49,6 +51,16 @@ WebString WebSelectElement::value()
return unwrap<HTMLSelectElement>()->value();
}
+WebVector<WebElement> WebSelectElement::listItems()
+{
+ const Vector<Element*>& sourceItems = unwrap<HTMLSelectElement>()->listItems();
+ WebVector<WebElement> items(sourceItems.size());
+ for (size_t i = 0; i < sourceItems.size(); ++i)
+ items[i] = WebElement(static_cast<HTMLElement*>(sourceItems[i]));
+
+ return items;
+}
+
WebSelectElement::WebSelectElement(const PassRefPtr<HTMLSelectElement>& elem)
: WebFormControlElement(elem)
{
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 7e89a77..6a02ed6 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -284,4 +284,9 @@ void WebSettingsImpl::setHTML5ParserEnabled(bool enabled)
m_settings->setHTML5ParserEnabled(enabled);
}
+void WebSettingsImpl::setMemoryInfoEnabled(bool enabled)
+{
+ m_settings->setMemoryInfoEnabled(enabled);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 70bd792..fe5db51 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -88,6 +88,7 @@ public:
virtual void setEditingBehavior(EditingBehavior);
virtual void setAcceleratedCompositingEnabled(bool);
virtual void setHTML5ParserEnabled(bool);
+ virtual void setMemoryInfoEnabled(bool);
private:
WebCore::Settings* m_settings;
diff --git a/WebKit/chromium/src/WebURLRequest.cpp b/WebKit/chromium/src/WebURLRequest.cpp
index 3b2d251..69dfac4 100644
--- a/WebKit/chromium/src/WebURLRequest.cpp
+++ b/WebKit/chromium/src/WebURLRequest.cpp
@@ -245,6 +245,16 @@ void WebURLRequest::setAppCacheHostID(int appCacheHostID)
m_private->m_resourceRequest->setAppCacheHostID(appCacheHostID);
}
+bool WebURLRequest::downloadToFile() const
+{
+ return m_private->m_downloadToFile;
+}
+
+void WebURLRequest::setDownloadToFile(bool downloadToFile)
+{
+ m_private->m_downloadToFile = downloadToFile;
+}
+
ResourceRequest& WebURLRequest::toMutableResourceRequest()
{
ASSERT(m_private);
diff --git a/WebKit/chromium/src/WebURLRequestPrivate.h b/WebKit/chromium/src/WebURLRequestPrivate.h
index 2f7c25f..79f6451 100644
--- a/WebKit/chromium/src/WebURLRequestPrivate.h
+++ b/WebKit/chromium/src/WebURLRequestPrivate.h
@@ -37,13 +37,19 @@ namespace WebKit {
class WebURLRequestPrivate {
public:
- WebURLRequestPrivate() : m_resourceRequest(0), m_allowStoredCredentials(true) { }
+ WebURLRequestPrivate()
+ : m_resourceRequest(0)
+ , m_allowStoredCredentials(true)
+ , m_downloadToFile(false) { }
// Called by WebURLRequest when it no longer needs this object.
virtual void dispose() = 0;
WebCore::ResourceRequest* m_resourceRequest;
bool m_allowStoredCredentials;
+
+ // FIXME: Move this to ResourceRequest once we have an internal consumer.
+ bool m_downloadToFile;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp
index 2b7facc..0511f8d 100644
--- a/WebKit/chromium/src/WebURLResponse.cpp
+++ b/WebKit/chromium/src/WebURLResponse.cpp
@@ -107,6 +107,16 @@ void WebURLResponse::setConnectionID(unsigned connectionID)
m_private->m_resourceResponse->setConnectionID(connectionID);
}
+bool WebURLResponse::connectionReused() const
+{
+ return m_private->m_resourceResponse->connectionReused();
+}
+
+void WebURLResponse::setConnectionReused(bool connectionReused)
+{
+ m_private->m_resourceResponse->setConnectionReused(connectionReused);
+}
+
WebURLLoadTiming WebURLResponse::loadTiming()
{
return WebURLLoadTiming(m_private->m_resourceResponse->resourceLoadTiming());
@@ -352,6 +362,16 @@ void WebURLResponse::setIsMultipartPayload(bool value)
m_private->m_resourceResponse->setIsMultipartPayload(value);
}
+WebString WebURLResponse::downloadFilePath() const
+{
+ return m_private->m_downloadFilePath;
+}
+
+void WebURLResponse::setDownloadFilePath(const WebString& downloadFilePath)
+{
+ m_private->m_downloadFilePath = downloadFilePath;
+}
+
void WebURLResponse::assign(WebURLResponsePrivate* p)
{
// Subclasses may call this directly so a self-assignment check is needed
diff --git a/WebKit/chromium/src/WebURLResponsePrivate.h b/WebKit/chromium/src/WebURLResponsePrivate.h
index 716c8db..dc5ce22 100644
--- a/WebKit/chromium/src/WebURLResponsePrivate.h
+++ b/WebKit/chromium/src/WebURLResponsePrivate.h
@@ -31,6 +31,8 @@
#ifndef WebURLResponsePrivate_h
#define WebURLResponsePrivate_h
+#include "WebString.h"
+
namespace WebCore { class ResourceResponse; }
namespace WebKit {
@@ -43,6 +45,9 @@ public:
virtual void dispose() = 0;
WebCore::ResourceResponse* m_resourceResponse;
+
+ // FIXME: Move this to ResourceResponse once we have an internal consumer.
+ WebString m_downloadFilePath;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index d1ca71e..83c8822 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -54,10 +54,12 @@
#include "FrameLoader.h"
#include "FrameTree.h"
#include "FrameView.h"
+#include "GLES2Context.h"
+#include "GLES2ContextInternal.h"
#include "GraphicsContext.h"
-#include "HitTestResult.h"
#include "HTMLInputElement.h"
#include "HTMLMediaElement.h"
+#include "HitTestResult.h"
#include "HTMLNames.h"
#include "Image.h"
#include "InspectorController.h"
@@ -73,6 +75,7 @@
#include "PlatformContextSkia.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
+#include "PlatformThemeChromiumGtk.h"
#include "PlatformWheelEvent.h"
#include "PopupMenuChromium.h"
#include "PopupMenuClient.h"
@@ -91,6 +94,7 @@
#include "WebDragData.h"
#include "WebFrameImpl.h"
#include "WebImage.h"
+#include "WebInputElement.h"
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
#include "WebKit.h"
@@ -157,10 +161,11 @@ COMPILE_ASSERT_MATCHING_ENUM(DragOperationDelete);
COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery);
static const PopupContainerSettings autoFillPopupSettings = {
- false, // setTextOnIndexChange
- false, // acceptOnAbandon
- true, // loopSelectionNavigation
- true, // restrictWidthOfListBox. Same as other browser (Fx, IE, and safari)
+ false, // setTextOnIndexChange
+ false, // acceptOnAbandon
+ true, // loopSelectionNavigation
+ false, // restrictWidthOfListBox (For security reasons show the entire entry
+ // so the user doesn't enter information it did not intend to.)
// For suggestions, we use the direction of the input field as the direction
// of the popup items. The main reason is to keep the display of items in
// drop-down the same as the items in the input field.
@@ -588,8 +593,11 @@ bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
}
int selectedIndex = m_autoFillPopup->selectedIndex();
- HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element);
- WebString name = inputElement->name();
+
+ if (!m_autoFillPopupClient->canRemoveSuggestionAtIndex(selectedIndex))
+ return false;
+
+ WebString name = WebInputElement(static_cast<HTMLInputElement*>(element)).nameForAutofill();
WebString value = m_autoFillPopupClient->itemText(selectedIndex);
m_client->removeAutofillSuggestions(name, value);
// Update the entries in the currently showing popup to reflect the
@@ -1237,6 +1245,9 @@ WebRect WebViewImpl::caretOrSelectionBounds()
if (controller->isCaret())
rect = view->contentsToWindow(controller->absoluteCaretBounds());
else if (controller->isRange()) {
+ node = controller->end().node();
+ if (!node || !node->renderer())
+ return rect;
RefPtr<Range> range = controller->toNormalizedRange();
rect = view->contentsToWindow(focused->firstRectForRange(range.get()));
}
@@ -1722,7 +1733,19 @@ void WebViewImpl::applyAutoFillSuggestions(
const WebVector<WebString>& labels,
int separatorIndex)
{
+ WebVector<int> uniqueIDs(names.size());
+ applyAutoFillSuggestions(node, names, labels, uniqueIDs, separatorIndex);
+}
+
+void WebViewImpl::applyAutoFillSuggestions(
+ const WebNode& node,
+ const WebVector<WebString>& names,
+ const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
+ int separatorIndex)
+{
ASSERT(names.size() == labels.size());
+ ASSERT(names.size() == uniqueIDs.size());
ASSERT(separatorIndex < static_cast<int>(names.size()));
if (names.isEmpty()) {
@@ -1747,7 +1770,8 @@ void WebViewImpl::applyAutoFillSuggestions(
if (!m_autoFillPopupClient.get())
m_autoFillPopupClient.set(new AutoFillPopupMenuClient);
- m_autoFillPopupClient->initialize(inputElem, names, labels, separatorIndex);
+ m_autoFillPopupClient->initialize(
+ inputElem, names, labels, uniqueIDs, separatorIndex);
if (!m_autoFillPopup.get()) {
m_autoFillPopup = PopupContainer::create(m_autoFillPopupClient.get(),
@@ -1756,7 +1780,8 @@ void WebViewImpl::applyAutoFillSuggestions(
}
if (m_autoFillPopupShowing) {
- m_autoFillPopupClient->setSuggestions(names, labels, separatorIndex);
+ m_autoFillPopupClient->setSuggestions(
+ names, labels, uniqueIDs, separatorIndex);
refreshAutoFillPopup();
} else {
m_autoFillPopup->show(focusedNode->getRect(),
@@ -1778,13 +1803,12 @@ void WebViewImpl::applyAutocompleteSuggestions(
{
WebVector<WebString> names(suggestions.size());
WebVector<WebString> labels(suggestions.size());
+ WebVector<int> uniqueIDs(suggestions.size());
- for (size_t i = 0; i < suggestions.size(); ++i) {
+ for (size_t i = 0; i < suggestions.size(); ++i)
names[i] = suggestions[i];
- labels[i] = WebString();
- }
- applyAutoFillSuggestions(node, names, labels, -1);
+ applyAutoFillSuggestions(node, names, labels, uniqueIDs, -1);
if (m_autoFillPopupClient)
m_autoFillPopupClient->setAutocompleteMode(true);
}
@@ -1852,7 +1876,7 @@ void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) {
#if OS(LINUX)
- RenderThemeChromiumLinux::setScrollbarColors(inactiveColor,
+ PlatformThemeChromiumGtk::setScrollbarColors(inactiveColor,
activeColor,
trackColor);
#endif
@@ -2058,7 +2082,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
return;
if (active) {
- m_layerRenderer = LayerRendererChromium::create(page());
+ m_layerRenderer = LayerRendererChromium::create(getOnscreenGLES2Context());
if (m_layerRenderer->hardwareCompositing())
m_isAcceleratedCompositingActive = true;
else {
@@ -2132,6 +2156,21 @@ void WebViewImpl::setRootLayerNeedsDisplay()
}
#endif // USE(ACCELERATED_COMPOSITING)
+PassOwnPtr<GLES2Context> WebViewImpl::getOnscreenGLES2Context()
+{
+ return GLES2Context::create(GLES2ContextInternal::create(gles2Context(), false));
+}
+
+PassOwnPtr<GLES2Context> WebViewImpl::getOffscreenGLES2Context()
+{
+ WebGLES2Context* context = webKitClient()->createGLES2Context();
+ if (!context)
+ return 0;
+ if (!context->initialize(0, gles2Context()))
+ return 0;
+ return GLES2Context::create(GLES2ContextInternal::create(context, true));
+}
+
// Returns the GLES2 context associated with this View. If one doesn't exist
// it will get created first.
WebGLES2Context* WebViewImpl::gles2Context()
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index db2a1d2..312f20f 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -53,6 +53,7 @@
namespace WebCore {
class ChromiumDataObject;
class Frame;
+class GLES2Context;
class HistoryItem;
class HitTestResult;
class KeyboardEvent;
@@ -164,11 +165,18 @@ public:
const WebString& value);
virtual WebDevToolsAgent* devToolsAgent();
virtual WebAccessibilityObject accessibilityObject();
+ // DEPRECATED.
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
int separatorIndex);
+ virtual void applyAutoFillSuggestions(
+ const WebNode&,
+ const WebVector<WebString>& names,
+ const WebVector<WebString>& labels,
+ const WebVector<int>& uniqueIDs,
+ int separatorIndex);
// DEPRECATED: replacing with applyAutoFillSuggestions.
virtual void applyAutocompleteSuggestions(
const WebNode&,
@@ -183,7 +191,6 @@ public:
unsigned inactiveBackgroundColor,
unsigned inactiveForegroundColor);
virtual void performCustomContextMenuAction(unsigned action);
- virtual WebGLES2Context* gles2Context();
// WebViewImpl
@@ -314,6 +321,14 @@ public:
void setRootLayerNeedsDisplay();
void setRootGraphicsLayer(WebCore::PlatformLayer*);
#endif
+ // Onscreen contexts display to the screen associated with this view.
+ // Offscreen contexts render offscreen but can share resources with the
+ // onscreen context and thus can be composited.
+ PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context();
+ PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context();
+
+ // Returns an onscreen context
+ virtual WebGLES2Context* gles2Context();
WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
diff --git a/WebKit/chromium/src/gtk/WebFontInfo.cpp b/WebKit/chromium/src/gtk/WebFontInfo.cpp
index 3ac0b00..dd25eb1 100644
--- a/WebKit/chromium/src/gtk/WebFontInfo.cpp
+++ b/WebKit/chromium/src/gtk/WebFontInfo.cpp
@@ -165,6 +165,23 @@ void WebFontInfo::renderStyleForStrike(const char* family, int sizeAndStyle, Web
out->useHinting = b;
if (FcPatternGetInteger(match, FC_HINT_STYLE, 0, &i) == FcResultMatch)
out->hintStyle = i;
+ if (FcPatternGetInteger(match, FC_RGBA, 0, &i) == FcResultMatch) {
+ switch (i) {
+ case FC_RGBA_NONE:
+ out->useSubpixel = 0;
+ break;
+ case FC_RGBA_RGB:
+ case FC_RGBA_BGR:
+ case FC_RGBA_VRGB:
+ case FC_RGBA_VBGR:
+ out->useSubpixel = 1;
+ break;
+ default:
+ // This includes FC_RGBA_UNKNOWN.
+ out->useSubpixel = 2;
+ break;
+ }
+ }
FcPatternDestroy(match);
}
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
deleted file mode 100644
index 01d7627..0000000
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ /dev/null
@@ -1,1605 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @fileoverview Provides communication interface to remote v8 debugger. See
- * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol
- */
-
-/**
- * FIXME: change field naming style to use trailing underscore.
- * @constructor
- */
-devtools.DebuggerAgent = function()
-{
- RemoteDebuggerAgent.debuggerOutput = this.handleDebuggerOutput_.bind(this);
- RemoteDebuggerAgent.setContextId = this.setContextId_.bind(this);
-
- /**
- * Id of the inspected page global context. It is used for filtering scripts.
- * @type {number}
- */
- this.contextId_ = null;
-
- /**
- * Mapping from script id to script info.
- * @type {Object}
- */
- this.parsedScripts_ = null;
-
- /**
- * Mapping from the request id to the devtools.BreakpointInfo for the
- * breakpoints whose v8 ids are not set yet. These breakpoints are waiting for
- * "setbreakpoint" responses to learn their ids in the v8 debugger.
- * @see #handleSetBreakpointResponse_
- * @type {Object}
- */
- this.requestNumberToBreakpointInfo_ = null;
-
- /**
- * Information on current stack frames.
- * @type {Array.<devtools.CallFrame>}
- */
- this.callFrames_ = [];
-
- /**
- * Whether to stop in the debugger on the exceptions.
- * @type {boolean}
- */
- this.pauseOnExceptions_ = false;
-
- /**
- * Mapping: request sequence number->callback.
- * @type {Object}
- */
- this.requestSeqToCallback_ = null;
-
- /**
- * Whether the scripts panel has been shown and initialilzed.
- * @type {boolean}
- */
- this.scriptsPanelInitialized_ = false;
-
- /**
- * Whether the scripts list should be requested next time when context id is
- * set.
- * @type {boolean}
- */
- this.requestScriptsWhenContextIdSet_ = false;
-
- /**
- * Whether the agent is waiting for initial scripts response.
- * @type {boolean}
- */
- this.waitingForInitialScriptsResponse_ = false;
-
- /**
- * If backtrace response is received when initial scripts response
- * is not yet processed the backtrace handling will be postponed until
- * after the scripts response processing. The handler bound to its arguments
- * and this agent will be stored in this field then.
- * @type {?function()}
- */
- this.pendingBacktraceResponseHandler_ = null;
-
- /**
- * Container of all breakpoints set using resource URL. These breakpoints
- * survive page reload. Breakpoints set by script id(for scripts that don't
- * have URLs) are stored in ScriptInfo objects.
- * @type {Object}
- */
- this.urlToBreakpoints_ = {};
-
- /**
- * Exception message that is shown to user while on exception break.
- * @type {WebInspector.ConsoleMessage}
- */
- this.currentExceptionMessage_ = null;
-
- /**
- * Whether breakpoints should suspend execution.
- * @type {boolean}
- */
- this.breakpointsActivated_ = true;
-};
-
-
-/**
- * A copy of the scope types from v8/src/mirror-delay.js
- * @enum {number}
- */
-devtools.DebuggerAgent.ScopeType = {
- Global: 0,
- Local: 1,
- With: 2,
- Closure: 3,
- Catch: 4
-};
-
-
-/**
- * Resets debugger agent to its initial state.
- */
-devtools.DebuggerAgent.prototype.reset = function()
-{
- this.contextId_ = null;
- // No need to request scripts since they all will be pushed in AfterCompile
- // events.
- this.requestScriptsWhenContextIdSet_ = false;
- this.waitingForInitialScriptsResponse_ = false;
-
- this.parsedScripts_ = {};
- this.requestNumberToBreakpointInfo_ = {};
- this.callFrames_ = [];
- this.requestSeqToCallback_ = {};
-};
-
-
-/**
- * Initializes scripts UI. This method is called every time Scripts panel
- * is shown. It will send request for context id if it's not set yet.
- */
-devtools.DebuggerAgent.prototype.initUI = function()
-{
- // Initialize scripts cache when Scripts panel is shown first time.
- if (this.scriptsPanelInitialized_)
- return;
- this.scriptsPanelInitialized_ = true;
- if (this.contextId_) {
- // We already have context id. This means that we are here from the
- // very beginning of the page load cycle and hence will get all scripts
- // via after-compile events. No need to request scripts for this session.
- //
- // There can be a number of scripts from after-compile events that are
- // pending addition into the UI.
- for (var scriptId in this.parsedScripts_) {
- var script = this.parsedScripts_[scriptId];
- WebInspector.parsedScriptSource(scriptId, script.getUrl(), undefined /* script source */, script.getLineOffset() + 1, script.worldType());
- this.restoreBreakpoints_(scriptId, script.getUrl());
- }
- return;
- }
- this.waitingForInitialScriptsResponse_ = true;
- // Script list should be requested only when current context id is known.
- RemoteDebuggerAgent.getContextId();
- this.requestScriptsWhenContextIdSet_ = true;
-};
-
-
-/**
- * Asynchronously requests the debugger for the script source.
- * @param {number} scriptId Id of the script whose source should be resolved.
- * @param {function(source:?string):void} callback Function that will be called
- * when the source resolution is completed. "source" parameter will be null
- * if the resolution fails.
- */
-devtools.DebuggerAgent.prototype.resolveScriptSource = function(scriptId, callback)
-{
- var script = this.parsedScripts_[scriptId];
- if (!script || script.isUnresolved()) {
- callback(null);
- return;
- }
-
- var cmd = new devtools.DebugCommand("scripts", {
- "ids": [scriptId],
- "includeSource": true
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
- // Force v8 execution so that it gets to processing the requested command.
- RemoteDebuggerAgent.processDebugCommands();
-
- var self = this;
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
- if (msg.isSuccess()) {
- var scriptJson = msg.getBody()[0];
- if (scriptJson) {
- script.source = scriptJson.source;
- callback(scriptJson.source);
- }
- else
- callback(null);
- } else
- callback(null);
- };
-};
-
-
-/**
- * Tells the v8 debugger to stop on as soon as possible.
- */
-devtools.DebuggerAgent.prototype.pauseExecution = function()
-{
- RemoteDebuggerCommandExecutor.DebuggerPauseScript();
-};
-
-
-/**
- * @param {number} sourceId Id of the script fot the breakpoint.
- * @param {number} line Number of the line for the breakpoint.
- * @param {?string} condition The breakpoint condition.
- */
-devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, enabled, condition)
-{
- var script = this.parsedScripts_[sourceId];
- if (!script)
- return;
-
- line = devtools.DebuggerAgent.webkitToV8LineNumber_(line);
-
- var commandArguments;
- if (script.getUrl()) {
- var breakpoints = this.urlToBreakpoints_[script.getUrl()];
- if (breakpoints && breakpoints[line])
- return;
- if (!breakpoints) {
- breakpoints = {};
- this.urlToBreakpoints_[script.getUrl()] = breakpoints;
- }
-
- var breakpointInfo = new devtools.BreakpointInfo(line, enabled, condition);
- breakpoints[line] = breakpointInfo;
-
- commandArguments = {
- "groupId": this.contextId_,
- "type": "script",
- "target": script.getUrl(),
- "line": line,
- "condition": condition
- };
- } else {
- var breakpointInfo = script.getBreakpointInfo(line);
- if (breakpointInfo)
- return;
-
- breakpointInfo = new devtools.BreakpointInfo(line, enabled, condition);
- script.addBreakpointInfo(breakpointInfo);
-
- commandArguments = {
- "groupId": this.contextId_,
- "type": "scriptId",
- "target": sourceId,
- "line": line,
- "condition": condition
- };
- }
-
- if (!enabled)
- return;
-
- var cmd = new devtools.DebugCommand("setbreakpoint", commandArguments);
-
- this.requestNumberToBreakpointInfo_[cmd.getSequenceNumber()] = breakpointInfo;
-
- devtools.DebuggerAgent.sendCommand_(cmd);
- // Force v8 execution so that it gets to processing the requested command.
- // It is necessary for being able to change a breakpoint just after it
- // has been created (since we need an existing breakpoint id for that).
- RemoteDebuggerAgent.processDebugCommands();
-};
-
-
-/**
- * Changes given line of the script.
- */
-devtools.DebuggerAgent.prototype.editScriptSource = function(sourceId, newContent, callback)
-{
- var commandArguments = {
- "script_id": sourceId,
- "new_source": newContent
- };
-
- var cmd = new devtools.DebugCommand("changelive", commandArguments);
- devtools.DebuggerAgent.sendCommand_(cmd);
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
- if (!msg.isSuccess()) {
- callback(false, "Unable to modify source code within given scope. Only function bodies are editable at the moment.", null);
- return;
- }
-
- this.resolveScriptSource(sourceId, requestBacktrace.bind(this));
- }.bind(this);
-
-
- function requestBacktrace(newScriptSource) {
- if (WebInspector.panels.scripts.paused)
- this.requestBacktrace_(handleBacktraceResponse.bind(this, newScriptSource));
- else
- reportDidCommitEditing(newScriptSource);
- }
-
- function handleBacktraceResponse(newScriptSource, msg) {
- this.updateCallFramesFromBacktraceResponse_(msg);
- reportDidCommitEditing(newScriptSource, this.callFrames_);
- }
-
- function reportDidCommitEditing(newScriptSource, callFrames) {
- callback(true, newScriptSource, callFrames);
- }
-
- RemoteDebuggerAgent.processDebugCommands();
-};
-
-
-/**
- * @param {number} sourceId Id of the script for the breakpoint.
- * @param {number} line Number of the line for the breakpoint.
- */
-devtools.DebuggerAgent.prototype.removeBreakpoint = function(sourceId, line)
-{
- var script = this.parsedScripts_[sourceId];
- if (!script)
- return;
-
- line = devtools.DebuggerAgent.webkitToV8LineNumber_(line);
-
- var breakpointInfo;
- if (script.getUrl()) {
- var breakpoints = this.urlToBreakpoints_[script.getUrl()];
- if (!breakpoints)
- return;
- breakpointInfo = breakpoints[line];
- delete breakpoints[line];
- } else {
- breakpointInfo = script.getBreakpointInfo(line);
- if (breakpointInfo)
- script.removeBreakpointInfo(breakpointInfo);
- }
-
- if (!breakpointInfo)
- return;
-
- breakpointInfo.markAsRemoved();
-
- var id = breakpointInfo.getV8Id();
-
- // If we don't know id of this breakpoint in the v8 debugger we cannot send
- // "clearbreakpoint" request. In that case it will be removed in
- // "setbreakpoint" response handler when we learn the id.
- if (id !== -1) {
- this.requestClearBreakpoint_(id);
- }
-};
-
-
-/**
- * @param {boolean} activated Whether breakpoints should be activated.
- */
-devtools.DebuggerAgent.prototype.setBreakpointsActivated = function(activated)
-{
- this.breakpointsActivated_ = activated;
-};
-
-
-/**
- * Tells the v8 debugger to step into the next statement.
- */
-devtools.DebuggerAgent.prototype.stepIntoStatement = function()
-{
- this.stepCommand_("in");
-};
-
-
-/**
- * Tells the v8 debugger to step out of current function.
- */
-devtools.DebuggerAgent.prototype.stepOutOfFunction = function()
-{
- this.stepCommand_("out");
-};
-
-
-/**
- * Tells the v8 debugger to step over the next statement.
- */
-devtools.DebuggerAgent.prototype.stepOverStatement = function()
-{
- this.stepCommand_("next");
-};
-
-
-/**
- * Tells the v8 debugger to continue execution after it has been stopped on a
- * breakpoint or an exception.
- */
-devtools.DebuggerAgent.prototype.resumeExecution = function()
-{
- this.clearExceptionMessage_();
- var cmd = new devtools.DebugCommand("continue");
- devtools.DebuggerAgent.sendCommand_(cmd);
-};
-
-
-/**
- * Creates exception message and schedules it for addition to the resource upon
- * backtrace availability.
- * @param {string} url Resource url.
- * @param {number} line Resource line number.
- * @param {string} message Exception text.
- */
-devtools.DebuggerAgent.prototype.createExceptionMessage_ = function(url, line, message)
-{
- this.currentExceptionMessage_ = new WebInspector.ConsoleMessage(
- WebInspector.ConsoleMessage.MessageSource.JS,
- WebInspector.ConsoleMessage.MessageType.Log,
- WebInspector.ConsoleMessage.MessageLevel.Error,
- line,
- url,
- 0 /* group level */,
- 1 /* repeat count */,
- "[Exception] " + message);
-};
-
-
-/**
- * Shows pending exception message that is created with createExceptionMessage_
- * earlier.
- */
-devtools.DebuggerAgent.prototype.showPendingExceptionMessage_ = function()
-{
- if (!this.currentExceptionMessage_)
- return;
- var msg = this.currentExceptionMessage_;
- var resource = WebInspector.resourceURLMap[msg.url];
- if (resource) {
- msg.resource = resource;
- WebInspector.panels.resources.addMessageToResource(resource, msg);
- } else
- this.currentExceptionMessage_ = null;
-};
-
-
-/**
- * Clears exception message from the resource.
- */
-devtools.DebuggerAgent.prototype.clearExceptionMessage_ = function()
-{
- if (this.currentExceptionMessage_) {
- var messageElement = this.currentExceptionMessage_._resourceMessageLineElement;
- var bubble = messageElement.parentElement;
- bubble.removeChild(messageElement);
- if (!bubble.firstChild) {
- // Last message in bubble removed.
- bubble.parentElement.removeChild(bubble);
- }
- this.currentExceptionMessage_ = null;
- }
-};
-
-
-/**
- * @return {boolean} True iff the debugger will pause execution on the
- * exceptions.
- */
-devtools.DebuggerAgent.prototype.pauseOnExceptions = function()
-{
- return this.pauseOnExceptions_;
-};
-
-
-/**
- * Tells whether to pause in the debugger on the exceptions or not.
- * @param {boolean} value True iff execution should be stopped in the debugger
- * on the exceptions.
- */
-devtools.DebuggerAgent.prototype.setPauseOnExceptions = function(value)
-{
- this.pauseOnExceptions_ = value;
-};
-
-
-/**
- * Sends "evaluate" request to the debugger.
- * @param {Object} arguments Request arguments map.
- * @param {function(devtools.DebuggerMessage)} callback Callback to be called
- * when response is received.
- */
-devtools.DebuggerAgent.prototype.requestEvaluate = function(arguments, callback)
-{
- var cmd = new devtools.DebugCommand("evaluate", arguments);
- devtools.DebuggerAgent.sendCommand_(cmd);
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = callback;
-};
-
-
-/**
- * Sends "lookup" request for each unresolved property of the object. When
- * response is received the properties will be changed with their resolved
- * values.
- * @param {Object} object Object whose properties should be resolved.
- * @param {function(devtools.DebuggerMessage)} Callback to be called when all
- * children are resolved.
- * @param {boolean} noIntrinsic Whether intrinsic properties should be included.
- */
-devtools.DebuggerAgent.prototype.resolveChildren = function(object, callback, noIntrinsic)
-{
- if ("handle" in object) {
- var result = [];
- devtools.DebuggerAgent.formatObjectProperties_(object, result, noIntrinsic);
- callback(result);
- } else {
- this.requestLookup_([object.ref], function(msg) {
- var result = [];
- if (msg.isSuccess()) {
- var handleToObject = msg.getBody();
- var resolved = handleToObject[object.ref];
- devtools.DebuggerAgent.formatObjectProperties_(resolved, result, noIntrinsic);
- callback(result);
- } else
- callback([]);
- });
- }
-};
-
-
-/**
- * Sends "scope" request for the scope object to resolve its variables.
- * @param {Object} scope Scope to be resolved.
- * @param {function(Array.<WebInspector.ObjectPropertyProxy>)} callback
- * Callback to be called when all scope variables are resolved.
- */
-devtools.DebuggerAgent.prototype.resolveScope = function(scope, callback)
-{
- var cmd = new devtools.DebugCommand("scope", {
- "frameNumber": scope.frameNumber,
- "number": scope.index,
- "compactFormat": true
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
- var result = [];
- if (msg.isSuccess()) {
- var scopeObjectJson = msg.getBody().object;
- devtools.DebuggerAgent.formatObjectProperties_(scopeObjectJson, result, true /* no intrinsic */);
- }
- callback(result);
- };
-};
-
-
-/**
- * Sends "scopes" request for the frame object to resolve all variables
- * available in the frame.
- * @param {number} callFrameId Id of call frame whose variables need to
- * be resolved.
- * @param {function(Object)} callback Callback to be called when all frame
- * variables are resolved.
- */
-devtools.DebuggerAgent.prototype.resolveFrameVariables_ = function(callFrameId, callback)
-{
- var result = {};
-
- var frame = this.callFrames_[callFrameId];
- if (!frame) {
- callback(result);
- return;
- }
-
- var waitingResponses = 0;
- function scopeResponseHandler(msg) {
- waitingResponses--;
-
- if (msg.isSuccess()) {
- var properties = msg.getBody().object.properties;
- for (var j = 0; j < properties.length; j++)
- result[properties[j].name] = true;
- }
-
- // When all scopes are resolved invoke the callback.
- if (waitingResponses === 0)
- callback(result);
- };
-
- for (var i = 0; i < frame.scopeChain.length; i++) {
- var scope = frame.scopeChain[i].objectId;
- if (scope.type === devtools.DebuggerAgent.ScopeType.Global) {
- // Do not resolve global scope since it takes for too long.
- // TODO(yurys): allow to send only property names in the response.
- continue;
- }
- var cmd = new devtools.DebugCommand("scope", {
- "frameNumber": scope.frameNumber,
- "number": scope.index,
- "compactFormat": true
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = scopeResponseHandler;
- waitingResponses++;
- }
-};
-
-/**
- * Evaluates the expressionString to an object in the call frame and reports
- * all its properties.
- * @param{string} expressionString Expression whose properties should be
- * collected.
- * @param{number} callFrameId The frame id.
- * @param{function(Object result,bool isException)} reportCompletions Callback
- * function.
- */
-devtools.DebuggerAgent.prototype.resolveCompletionsOnFrame = function(expressionString, callFrameId, reportCompletions)
-{
- if (expressionString) {
- expressionString = "var obj = " + expressionString +
- "; var names = {}; for (var n in obj) { names[n] = true; };" +
- "names;";
- this.evaluateInCallFrame(
- callFrameId,
- expressionString,
- function(result) {
- var names = {};
- if (!result.isException) {
- var props = result.value.objectId.properties;
- // Put all object properties into the map.
- for (var i = 0; i < props.length; i++)
- names[props[i].name] = true;
- }
- reportCompletions(names, result.isException);
- });
- } else {
- this.resolveFrameVariables_(callFrameId,
- function(result) {
- reportCompletions(result, false /* isException */);
- });
- }
-};
-
-
-/**
- * @param{number} scriptId
- * @return {string} Type of the context of the script with specified id.
- */
-devtools.DebuggerAgent.prototype.getScriptContextType = function(scriptId)
-{
- return this.parsedScripts_[scriptId].getContextType();
-};
-
-
-/**
- * Removes specified breakpoint from the v8 debugger.
- * @param {number} breakpointId Id of the breakpoint in the v8 debugger.
- */
-devtools.DebuggerAgent.prototype.requestClearBreakpoint_ = function(breakpointId)
-{
- var cmd = new devtools.DebugCommand("clearbreakpoint", {
- "breakpoint": breakpointId
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
-};
-
-
-/**
- * Sends "backtrace" request to v8.
- */
-devtools.DebuggerAgent.prototype.requestBacktrace_ = function(opt_customHandler)
-{
- var cmd = new devtools.DebugCommand("backtrace", {
- "compactFormat":true
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
- var responseHandler = opt_customHandler ? opt_customHandler : this.handleBacktraceResponse_.bind(this);
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = responseHandler;
-};
-
-
-/**
- * Sends command to v8 debugger.
- * @param {devtools.DebugCommand} cmd Command to execute.
- */
-devtools.DebuggerAgent.sendCommand_ = function(cmd)
-{
- RemoteDebuggerCommandExecutor.DebuggerCommand(cmd.toJSONProtocol());
-};
-
-
-/**
- * Tells the v8 debugger to make the next execution step.
- * @param {string} action "in", "out" or "next" action.
- */
-devtools.DebuggerAgent.prototype.stepCommand_ = function(action)
-{
- this.clearExceptionMessage_();
- var cmd = new devtools.DebugCommand("continue", {
- "stepaction": action,
- "stepcount": 1
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
-};
-
-
-/**
- * Sends "lookup" request to v8.
- * @param {number} handle Handle to the object to lookup.
- */
-devtools.DebuggerAgent.prototype.requestLookup_ = function(handles, callback)
-{
- var cmd = new devtools.DebugCommand("lookup", {
- "compactFormat":true,
- "handles": handles
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = callback;
-};
-
-
-/**
- * Sets debugger context id for scripts filtering.
- * @param {number} contextId Id of the inspected page global context.
- */
-devtools.DebuggerAgent.prototype.setContextId_ = function(contextId)
-{
- this.contextId_ = contextId;
-
- // If it's the first time context id is set request scripts list.
- if (this.requestScriptsWhenContextIdSet_) {
- this.requestScriptsWhenContextIdSet_ = false;
- var cmd = new devtools.DebugCommand("scripts", {
- "includeSource": false
- });
- devtools.DebuggerAgent.sendCommand_(cmd);
- // Force v8 execution so that it gets to processing the requested command.
- RemoteDebuggerAgent.processDebugCommands();
-
- var debuggerAgent = this;
- this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
- // Handle the response iff the context id hasn't changed since the request
- // was issued. Otherwise if the context id did change all up-to-date
- // scripts will be pushed in after compile events and there is no need to
- // handle the response.
- if (contextId === debuggerAgent.contextId_)
- debuggerAgent.handleScriptsResponse_(msg);
-
- // We received initial scripts response so flush the flag and
- // see if there is an unhandled backtrace response.
- debuggerAgent.waitingForInitialScriptsResponse_ = false;
- if (debuggerAgent.pendingBacktraceResponseHandler_) {
- debuggerAgent.pendingBacktraceResponseHandler_();
- debuggerAgent.pendingBacktraceResponseHandler_ = null;
- }
- };
- }
-};
-
-
-/**
- * Handles output sent by v8 debugger. The output is either asynchronous event
- * or response to a previously sent request. See protocol definitioun for more
- * details on the output format.
- * @param {string} output
- */
-devtools.DebuggerAgent.prototype.handleDebuggerOutput_ = function(output)
-{
- var msg;
- try {
- msg = new devtools.DebuggerMessage(output);
- } catch(e) {
- debugPrint("Failed to handle debugger response:\n" + e);
- throw e;
- }
-
- if (msg.getType() === "event") {
- if (msg.getEvent() === "break")
- this.handleBreakEvent_(msg);
- else if (msg.getEvent() === "exception")
- this.handleExceptionEvent_(msg);
- else if (msg.getEvent() === "afterCompile")
- this.handleAfterCompileEvent_(msg);
- } else if (msg.getType() === "response") {
- if (msg.getCommand() === "scripts")
- this.invokeCallbackForResponse_(msg);
- else if (msg.getCommand() === "setbreakpoint")
- this.handleSetBreakpointResponse_(msg);
- else if (msg.getCommand() === "changelive")
- this.invokeCallbackForResponse_(msg);
- else if (msg.getCommand() === "clearbreakpoint")
- this.handleClearBreakpointResponse_(msg);
- else if (msg.getCommand() === "backtrace")
- this.invokeCallbackForResponse_(msg);
- else if (msg.getCommand() === "lookup")
- this.invokeCallbackForResponse_(msg);
- else if (msg.getCommand() === "evaluate")
- this.invokeCallbackForResponse_(msg);
- else if (msg.getCommand() === "scope")
- this.invokeCallbackForResponse_(msg);
- }
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleBreakEvent_ = function(msg)
-{
- if (!this.breakpointsActivated_) {
- this.resumeExecution();
- return;
- }
-
- // Force scripts panel to be shown first.
- WebInspector.currentPanel = WebInspector.panels.scripts;
-
- var body = msg.getBody();
-
- var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(body.sourceLine);
- this.requestBacktrace_();
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleExceptionEvent_ = function(msg)
-{
- var body = msg.getBody();
- // No script field in the body means that v8 failed to parse the script. We
- // resume execution on parser errors automatically.
- if (this.pauseOnExceptions_ && body.script) {
- var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(body.sourceLine);
- this.createExceptionMessage_(body.script.name, line, body.exception.text);
- this.requestBacktrace_();
-
- // Force scripts panel to be shown.
- WebInspector.currentPanel = WebInspector.panels.scripts;
- } else
- this.resumeExecution();
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleScriptsResponse_ = function(msg)
-{
- var scripts = msg.getBody();
- for (var i = 0; i < scripts.length; i++) {
- var script = scripts[i];
-
- // Skip scripts from other tabs.
- if (!this.isScriptFromInspectedContext_(script, msg))
- continue;
-
- // We may already have received the info in an afterCompile event.
- if (script.id in this.parsedScripts_)
- continue;
- this.addScriptInfo_(script, msg);
- }
-};
-
-
-/**
- * @param {Object} script Json object representing script.
- * @param {devtools.DebuggerMessage} msg Debugger response.
- */
-devtools.DebuggerAgent.prototype.isScriptFromInspectedContext_ = function(script, msg)
-{
- if (!script.context) {
- // Always ignore scripts from the utility context.
- return false;
- }
- var context = msg.lookup(script.context.ref);
- var scriptContextId = context.data;
- if (typeof scriptContextId === "undefined")
- return false; // Always ignore scripts from the utility context.
- if (this.contextId_ === null)
- return true;
- // Find the id from context data. The context data has the format "type,id".
- var comma = context.data.indexOf(",");
- if (comma < 0)
- return false;
- return (context.data.substring(comma + 1) == this.contextId_);
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleSetBreakpointResponse_ = function(msg)
-{
- var requestSeq = msg.getRequestSeq();
- var breakpointInfo = this.requestNumberToBreakpointInfo_[requestSeq];
- if (!breakpointInfo) {
- // TODO(yurys): handle this case
- return;
- }
- delete this.requestNumberToBreakpointInfo_[requestSeq];
- if (!msg.isSuccess()) {
- // TODO(yurys): handle this case
- return;
- }
- var idInV8 = msg.getBody().breakpoint;
- breakpointInfo.setV8Id(idInV8);
-
- if (breakpointInfo.isRemoved())
- this.requestClearBreakpoint_(idInV8);
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleAfterCompileEvent_ = function(msg)
-{
- if (!this.contextId_) {
- // Ignore scripts delta if main request has not been issued yet.
- return;
- }
- var script = msg.getBody().script;
-
- // Ignore scripts from other tabs.
- if (!this.isScriptFromInspectedContext_(script, msg))
- return;
- this.addScriptInfo_(script, msg);
-};
-
-
-/**
- * Adds the script info to the local cache. This method assumes that the script
- * is not in the cache yet.
- * @param {Object} script Script json object from the debugger message.
- * @param {devtools.DebuggerMessage} msg Debugger message containing the script
- * data.
- */
-devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg)
-{
- var context = msg.lookup(script.context.ref);
- // Find the type from context data. The context data has the format
- // "type,id".
- var comma = context.data.indexOf(",");
- if (comma < 0)
- return;
- var contextType = context.data.substring(0, comma);
- var info = new devtools.ScriptInfo(script.id, script.name, script.lineOffset, contextType);
- this.parsedScripts_[script.id] = info;
- if (this.scriptsPanelInitialized_) {
- // Only report script as parsed after scripts panel has been shown.
- WebInspector.parsedScriptSource(script.id, script.name, script.source, script.lineOffset + 1, info.worldType());
- this.restoreBreakpoints_(script.id, script.name);
- }
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleClearBreakpointResponse_ = function(msg)
-{
- // Do nothing.
-};
-
-
-/**
- * Handles response to "backtrace" command.
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.handleBacktraceResponse_ = function(msg)
-{
- if (this.waitingForInitialScriptsResponse_)
- this.pendingBacktraceResponseHandler_ = this.doHandleBacktraceResponse_.bind(this, msg);
- else
- this.doHandleBacktraceResponse_(msg);
-};
-
-
-/**
- * @param {devtools.DebuggerMessage} msg
- */
-devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_ = function(msg)
-{
- this.updateCallFramesFromBacktraceResponse_(msg);
- WebInspector.pausedScript(this.callFrames_);
- this.showPendingExceptionMessage_();
- InspectorFrontendHost.bringToFront();
-};
-
-
-devtools.DebuggerAgent.prototype.updateCallFramesFromBacktraceResponse_ = function(msg)
-{
- var frames = msg.getBody().frames;
- this.callFrames_ = [];
- for (var i = 0; i < frames.length; ++i)
- this.callFrames_.push(this.formatCallFrame_(frames[i]));
- return this.callFrames_;
-};
-
-
-/**
- * Evaluates code on given callframe.
- */
-devtools.DebuggerAgent.prototype.evaluateInCallFrame = function(callFrameId, code, callback)
-{
- var callFrame = this.callFrames_[callFrameId];
- callFrame.evaluate_(code, callback);
-};
-
-
-/**
- * Handles response to a command by invoking its callback (if any).
- * @param {devtools.DebuggerMessage} msg
- * @return {boolean} Whether a callback for the given message was found and
- * excuted.
- */
-devtools.DebuggerAgent.prototype.invokeCallbackForResponse_ = function(msg)
-{
- var callback = this.requestSeqToCallback_[msg.getRequestSeq()];
- if (!callback) {
- // It may happend if reset was called.
- return false;
- }
- delete this.requestSeqToCallback_[msg.getRequestSeq()];
- callback(msg);
- return true;
-};
-
-
-/**
- * @param {Object} stackFrame Frame json object from "backtrace" response.
- * @return {!devtools.CallFrame} Object containing information related to the
- * call frame in the format expected by ScriptsPanel and its panes.
- */
-devtools.DebuggerAgent.prototype.formatCallFrame_ = function(stackFrame)
-{
- var func = stackFrame.func;
- var sourceId = func.scriptId;
-
- // Add service script if it does not exist.
- var existingScript = this.parsedScripts_[sourceId];
- if (!existingScript) {
- this.parsedScripts_[sourceId] = new devtools.ScriptInfo(sourceId, null /* name */, 0 /* line */, "unknown" /* type */, true /* unresolved */);
- WebInspector.parsedScriptSource(sourceId, null, null, 0, WebInspector.Script.WorldType.MAIN_WORLD);
- }
-
- var funcName = func.name || func.inferredName;
- var line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(stackFrame.line);
-
- // Add basic scope chain info with scope variables.
- var scopeChain = [];
- var ScopeType = devtools.DebuggerAgent.ScopeType;
- for (var i = 0; i < stackFrame.scopes.length; i++) {
- var scope = stackFrame.scopes[i];
- scope.frameNumber = stackFrame.index;
- var scopeObjectProxy = new WebInspector.ObjectProxy(0, scope, [], "", true);
- scopeObjectProxy.isScope = true;
- switch(scope.type) {
- case ScopeType.Global:
- scopeObjectProxy.isDocument = true;
- break;
- case ScopeType.Local:
- scopeObjectProxy.isLocal = true;
- scopeObjectProxy.thisObject = devtools.DebuggerAgent.formatObjectProxy_(stackFrame.receiver);
- break;
- case ScopeType.With:
- // Catch scope is treated as a regular with scope by WebKit so we
- // also treat it this way.
- case ScopeType.Catch:
- scopeObjectProxy.isWithBlock = true;
- break;
- case ScopeType.Closure:
- scopeObjectProxy.isClosure = true;
- break;
- }
- scopeChain.push(scopeObjectProxy);
- }
- return new devtools.CallFrame(stackFrame.index, "function", funcName, sourceId, line, scopeChain);
-};
-
-
-/**
- * Restores breakpoints associated with the URL of a newly parsed script.
- * @param {number} sourceID The id of the script.
- * @param {string} scriptUrl URL of the script.
- */
-devtools.DebuggerAgent.prototype.restoreBreakpoints_ = function(sourceID, scriptUrl)
-{
- var breakpoints = this.urlToBreakpoints_[scriptUrl];
- for (var line in breakpoints) {
- if (parseInt(line) == line) {
- var v8Line = devtools.DebuggerAgent.v8ToWwebkitLineNumber_(parseInt(line));
- WebInspector.restoredBreakpoint(sourceID, scriptUrl, v8Line, breakpoints[line].enabled(), breakpoints[line].condition());
- }
- }
-};
-
-
-/**
- * Collects properties for an object from the debugger response.
- * @param {Object} object An object from the debugger protocol response.
- * @param {Array.<WebInspector.ObjectPropertyProxy>} result An array to put the
- * properties into.
- * @param {boolean} noIntrinsic Whether intrinsic properties should be
- * included.
- */
-devtools.DebuggerAgent.formatObjectProperties_ = function(object, result, noIntrinsic)
-{
- devtools.DebuggerAgent.propertiesToProxies_(object.properties, result);
- if (noIntrinsic)
- return;
-
- result.push(new WebInspector.ObjectPropertyProxy("__proto__", devtools.DebuggerAgent.formatObjectProxy_(object.protoObject)));
- result.push(new WebInspector.ObjectPropertyProxy("constructor", devtools.DebuggerAgent.formatObjectProxy_(object.constructorFunction)));
- // Don't add 'prototype' property since it is one of the regualar properties.
-};
-
-
-/**
- * For each property in "properties" creates its proxy representative.
- * @param {Array.<Object>} properties Receiver properties or locals array from
- * "backtrace" response.
- * @param {Array.<WebInspector.ObjectPropertyProxy>} Results holder.
- */
-devtools.DebuggerAgent.propertiesToProxies_ = function(properties, result)
-{
- var map = {};
- for (var i = 0; i < properties.length; ++i) {
- var property = properties[i];
- var name = String(property.name);
- if (name in map)
- continue;
- map[name] = true;
- var value = devtools.DebuggerAgent.formatObjectProxy_(property.value);
- var propertyProxy = new WebInspector.ObjectPropertyProxy(name, value);
- result.push(propertyProxy);
- }
-};
-
-
-/**
- * @param {Object} v An object reference from the debugger response.
- * @return {*} The value representation expected by ScriptsPanel.
- */
-devtools.DebuggerAgent.formatObjectProxy_ = function(v)
-{
- var description;
- var hasChildren = false;
- if (v.type === "object") {
- description = v.className;
- hasChildren = true;
- } else if (v.type === "function") {
- if (v.source)
- description = v.source;
- else
- description = "function " + v.name + "()";
- hasChildren = true;
- } else if (v.type === "undefined")
- description = "undefined";
- else if (v.type === "null")
- description = "null";
- else if (typeof v.value !== "undefined") {
- // Check for undefined and null types before checking the value, otherwise
- // null/undefined may have blank value.
- description = v.value;
- } else
- description = "<unresolved ref: " + v.ref + ", type: " + v.type + ">";
-
- var proxy = new WebInspector.ObjectProxy(0, v, [], description, hasChildren);
- proxy.type = v.type;
- proxy.isV8Ref = true;
- return proxy;
-};
-
-
-/**
- * Converts line number from Web Inspector UI(1-based) to v8(0-based).
- * @param {number} line Resource line number in Web Inspector UI.
- * @return {number} The line number in v8.
- */
-devtools.DebuggerAgent.webkitToV8LineNumber_ = function(line)
-{
- return line - 1;
-};
-
-
-/**
- * Converts line number from v8(0-based) to Web Inspector UI(1-based).
- * @param {number} line Resource line number in v8.
- * @return {number} The line number in Web Inspector.
- */
-devtools.DebuggerAgent.v8ToWwebkitLineNumber_ = function(line)
-{
- return line + 1;
-};
-
-
-/**
- * @param {number} scriptId Id of the script.
- * @param {?string} url Script resource URL if any.
- * @param {number} lineOffset First line 0-based offset in the containing
- * document.
- * @param {string} contextType Type of the script's context:
- * "page" - regular script from html page
- * "injected" - extension content script
- * @param {bool} opt_isUnresolved If true, script will not be resolved.
- * @constructor
- */
-devtools.ScriptInfo = function(scriptId, url, lineOffset, contextType, opt_isUnresolved)
-{
- this.scriptId_ = scriptId;
- this.lineOffset_ = lineOffset;
- this.contextType_ = contextType;
- this.url_ = url;
- this.isUnresolved_ = opt_isUnresolved;
-
- this.lineToBreakpointInfo_ = {};
-};
-
-
-/**
- * @return {number}
- */
-devtools.ScriptInfo.prototype.getLineOffset = function()
-{
- return this.lineOffset_;
-};
-
-
-/**
- * @return {string}
- */
-devtools.ScriptInfo.prototype.getContextType = function()
-{
- return this.contextType_;
-};
-
-
-/**
- * @return {?string}
- */
-devtools.ScriptInfo.prototype.getUrl = function()
-{
- return this.url_;
-};
-
-
-/**
- * @return {?bool}
- */
-devtools.ScriptInfo.prototype.isUnresolved = function()
-{
- return this.isUnresolved_;
-};
-
-
-devtools.ScriptInfo.prototype.worldType = function()
-{
- if (this.contextType_ === "injected")
- return WebInspector.Script.WorldType.EXTENSIONS_WORLD;
- return WebInspector.Script.WorldType.MAIN_WORLD;
-};
-
-
-/**
- * @param {number} line 0-based line number in the script.
- * @return {?devtools.BreakpointInfo} Information on a breakpoint at the
- * specified line in the script or undefined if there is no breakpoint at
- * that line.
- */
-devtools.ScriptInfo.prototype.getBreakpointInfo = function(line)
-{
- return this.lineToBreakpointInfo_[line];
-};
-
-
-/**
- * Adds breakpoint info to the script.
- * @param {devtools.BreakpointInfo} breakpoint
- */
-devtools.ScriptInfo.prototype.addBreakpointInfo = function(breakpoint)
-{
- this.lineToBreakpointInfo_[breakpoint.getLine()] = breakpoint;
-};
-
-
-/**
- * @param {devtools.BreakpointInfo} breakpoint Breakpoint info to be removed.
- */
-devtools.ScriptInfo.prototype.removeBreakpointInfo = function(breakpoint)
-{
- var line = breakpoint.getLine();
- delete this.lineToBreakpointInfo_[line];
-};
-
-
-
-/**
- * @param {number} line Breakpoint 0-based line number in the containing script.
- * @constructor
- */
-devtools.BreakpointInfo = function(line, enabled, condition)
-{
- this.line_ = line;
- this.enabled_ = enabled;
- this.condition_ = condition;
- this.v8id_ = -1;
- this.removed_ = false;
-};
-
-
-/**
- * @return {number}
- */
-devtools.BreakpointInfo.prototype.getLine = function(n)
-{
- return this.line_;
-};
-
-
-/**
- * @return {number} Unique identifier of this breakpoint in the v8 debugger.
- */
-devtools.BreakpointInfo.prototype.getV8Id = function(n)
-{
- return this.v8id_;
-};
-
-
-/**
- * Sets id of this breakpoint in the v8 debugger.
- * @param {number} id
- */
-devtools.BreakpointInfo.prototype.setV8Id = function(id)
-{
- this.v8id_ = id;
-};
-
-
-/**
- * Marks this breakpoint as removed from the front-end.
- */
-devtools.BreakpointInfo.prototype.markAsRemoved = function()
-{
- this.removed_ = true;
-};
-
-
-/**
- * @return {boolean} Whether this breakpoint has been removed from the
- * front-end.
- */
-devtools.BreakpointInfo.prototype.isRemoved = function()
-{
- return this.removed_;
-};
-
-
-/**
- * @return {boolean} Whether this breakpoint is enabled.
- */
-devtools.BreakpointInfo.prototype.enabled = function()
-{
- return this.enabled_;
-};
-
-
-/**
- * @return {?string} Breakpoint condition.
- */
-devtools.BreakpointInfo.prototype.condition = function()
-{
- return this.condition_;
-};
-
-
-/**
- * Call stack frame data.
- * @param {string} id CallFrame id.
- * @param {string} type CallFrame type.
- * @param {string} functionName CallFrame type.
- * @param {string} sourceID Source id.
- * @param {number} line Source line.
- * @param {Array.<Object>} scopeChain Array of scoped objects.
- * @construnctor
- */
-devtools.CallFrame = function(id, type, functionName, sourceID, line, scopeChain)
-{
- this.id = id;
- this.type = type;
- this.functionName = functionName;
- this.sourceID = sourceID;
- this.line = line;
- this.scopeChain = scopeChain;
-};
-
-
-/**
- * This method issues asynchronous evaluate request, reports result to the
- * callback.
- * @param {string} expression An expression to be evaluated in the context of
- * this call frame.
- * @param {function(Object):undefined} callback Callback to report result to.
- */
-devtools.CallFrame.prototype.evaluate_ = function(expression, callback)
-{
- devtools.tools.getDebuggerAgent().requestEvaluate({
- "expression": expression,
- "frame": this.id,
- "global": false,
- "disable_break": false,
- "compactFormat": true,
- "maxStringLength": -1
- },
- function(response) {
- var result = {};
- if (response.isSuccess())
- result.value = devtools.DebuggerAgent.formatObjectProxy_(response.getBody());
- else {
- result.value = response.getMessage();
- result.isException = true;
- }
- callback(result);
- });
-};
-
-
-/**
- * JSON based commands sent to v8 debugger.
- * @param {string} command Name of the command to execute.
- * @param {Object} opt_arguments Command-specific arguments map.
- * @constructor
- */
-devtools.DebugCommand = function(command, opt_arguments)
-{
- this.command_ = command;
- this.type_ = "request";
- this.seq_ = ++devtools.DebugCommand.nextSeq_;
- if (opt_arguments)
- this.arguments_ = opt_arguments;
-};
-
-
-/**
- * Next unique number to be used as debugger request sequence number.
- * @type {number}
- */
-devtools.DebugCommand.nextSeq_ = 1;
-
-
-/**
- * @return {number}
- */
-devtools.DebugCommand.prototype.getSequenceNumber = function()
-{
- return this.seq_;
-};
-
-
-/**
- * @return {string}
- */
-devtools.DebugCommand.prototype.toJSONProtocol = function()
-{
- var json = {
- "seq": this.seq_,
- "type": this.type_,
- "command": this.command_
- }
- if (this.arguments_)
- json.arguments = this.arguments_;
- return JSON.stringify(json);
-};
-
-
-/**
- * JSON messages sent from v8 debugger. See protocol definition for more
- * details: http://code.google.com/p/v8/wiki/DebuggerProtocol
- * @param {string} msg Raw protocol packet as JSON string.
- * @constructor
- */
-devtools.DebuggerMessage = function(msg)
-{
- this.packet_ = JSON.parse(msg);
- this.refs_ = [];
- if (this.packet_.refs) {
- for (var i = 0; i < this.packet_.refs.length; i++)
- this.refs_[this.packet_.refs[i].handle] = this.packet_.refs[i];
- }
-};
-
-
-/**
- * @return {string} The packet type.
- */
-devtools.DebuggerMessage.prototype.getType = function()
-{
- return this.packet_.type;
-};
-
-
-/**
- * @return {?string} The packet event if the message is an event.
- */
-devtools.DebuggerMessage.prototype.getEvent = function()
-{
- return this.packet_.event;
-};
-
-
-/**
- * @return {?string} The packet command if the message is a response to a
- * command.
- */
-devtools.DebuggerMessage.prototype.getCommand = function()
-{
- return this.packet_.command;
-};
-
-
-/**
- * @return {number} The packet request sequence.
- */
-devtools.DebuggerMessage.prototype.getRequestSeq = function()
-{
- return this.packet_.request_seq;
-};
-
-
-/**
- * @return {number} Whether the v8 is running after processing the request.
- */
-devtools.DebuggerMessage.prototype.isRunning = function()
-{
- return this.packet_.running ? true : false;
-};
-
-
-/**
- * @return {boolean} Whether the request succeeded.
- */
-devtools.DebuggerMessage.prototype.isSuccess = function()
-{
- return this.packet_.success ? true : false;
-};
-
-
-/**
- * @return {string}
- */
-devtools.DebuggerMessage.prototype.getMessage = function()
-{
- return this.packet_.message;
-};
-
-
-/**
- * @return {Object} Parsed message body json.
- */
-devtools.DebuggerMessage.prototype.getBody = function()
-{
- return this.packet_.body;
-};
-
-
-/**
- * @param {number} handle Object handle.
- * @return {?Object} Returns the object with the handle if it was sent in this
- * message(some objects referenced by handles may be missing in the message).
- */
-devtools.DebuggerMessage.prototype.lookup = function(handle)
-{
- return this.refs_[handle];
-};
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 70c2fbe..7181d74 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -97,7 +97,8 @@ DebuggerScript.setBreakpoint = function(execState, args)
if (!args.enabled)
Debug.disableScriptBreakPoint(breakId);
- var actualLineNumber = args.lineNumber; // TODO: replace with real stuff after v8 roll.
+ var locations = Debug.findBreakPointActualLocations(breakId);
+ var actualLineNumber = locations.length ? locations[0].line : args.lineNumber;
var key = args.scriptId + ":" + actualLineNumber;
if (key in DebuggerScript._breakpoints) {
@@ -181,7 +182,7 @@ DebuggerScript.editScriptSource = function(scriptId, newSource)
throw("Script not found");
var changeLog = [];
- Debug.LiveEdit.SetScriptSource(scriptToEdit, newSource, changeLog);
+ Debug.LiveEdit.SetScriptSource(scriptToEdit, newSource, false, changeLog);
return scriptToEdit.source;
}
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 851c934..35cca2f 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -62,21 +62,11 @@ devtools.ToolsAgent = function()
{
RemoteToolsAgent.didDispatchOn = WebInspector.Callback.processCallback;
RemoteToolsAgent.dispatchOnClient = this.dispatchOnClient_.bind(this);
- this.debuggerAgent_ = new devtools.DebuggerAgent();
this.profilerAgent_ = new devtools.ProfilerAgent();
};
/**
- * Resets tools agent to its initial state.
- */
-devtools.ToolsAgent.prototype.reset = function()
-{
- this.debuggerAgent_.reset();
-};
-
-
-/**
* @param {string} script Script exression to be evaluated in the context of the
* inspected page.
* @param {function(Object|string, boolean):undefined} opt_callback Function to
@@ -89,15 +79,6 @@ devtools.ToolsAgent.prototype.evaluateJavaScript = function(script, opt_callback
/**
- * @return {devtools.DebuggerAgent} Debugger agent instance.
- */
-devtools.ToolsAgent.prototype.getDebuggerAgent = function()
-{
- return this.debuggerAgent_;
-};
-
-
-/**
* @return {devtools.ProfilerAgent} Profiler agent instance.
*/
devtools.ToolsAgent.prototype.getProfilerAgent = function()
@@ -106,16 +87,6 @@ devtools.ToolsAgent.prototype.getProfilerAgent = function()
};
-(function () {
-var orig = WebInspector.reset;
-WebInspector.reset = function()
-{
- devtools.tools.reset();
- orig.call(this);
-};
-})();
-
-
/**
* @param {string} message Serialized call to be dispatched on WebInspector.
* @private
@@ -165,7 +136,6 @@ var oldLoaded = WebInspector.loaded;
WebInspector.loaded = function()
{
devtools.tools = new devtools.ToolsAgent();
- devtools.tools.reset();
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
@@ -173,6 +143,7 @@ WebInspector.loaded = function()
Preferences.debuggerAlwaysEnabled = true;
Preferences.profilerAlwaysEnabled = true;
Preferences.canEditScriptSource = true;
+ Preferences.appCacheEnabled = false;
oldLoaded.call(this);
@@ -197,76 +168,6 @@ devtools.domContentLoaded = function()
document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
-if (!window.v8ScriptDebugServerEnabled) {
-
-(function()
-{
- var oldShow = WebInspector.ScriptsPanel.prototype.show;
- WebInspector.ScriptsPanel.prototype.show = function()
- {
- devtools.tools.getDebuggerAgent().initUI();
- this.enableToggleButton.visible = false;
- oldShow.call(this);
- };
-})();
-
-
-(function () {
-var orig = InjectedScriptAccess.prototype.getProperties;
-InjectedScriptAccess.prototype.getProperties = function(objectProxy, ignoreHasOwnProperty, abbreviate, callback)
-{
- if (objectProxy.isScope)
- devtools.tools.getDebuggerAgent().resolveScope(objectProxy.objectId, callback);
- else if (objectProxy.isV8Ref)
- devtools.tools.getDebuggerAgent().resolveChildren(objectProxy.objectId, callback, false);
- else
- orig.apply(this, arguments);
-};
-})();
-
-
-(function()
-{
-InjectedScriptAccess.prototype.evaluateInCallFrame = function(callFrameId, code, objectGroup, callback)
-{
- //TODO(pfeldman): remove once 49084 is rolled.
- if (!callback)
- callback = objectGroup;
- devtools.tools.getDebuggerAgent().evaluateInCallFrame(callFrameId, code, callback);
-};
-})();
-
-
-(function()
-{
-var orig = InjectedScriptAccess.prototype.getCompletions;
-InjectedScriptAccess.prototype.getCompletions = function(expressionString, includeInspectorCommandLineAPI, callFrameId, reportCompletions)
-{
- if (typeof callFrameId === "number")
- devtools.tools.getDebuggerAgent().resolveCompletionsOnFrame(expressionString, callFrameId, reportCompletions);
- else
- return orig.apply(this, arguments);
-};
-})();
-
-// Highlight extension content scripts in the scripts list.
-(function () {
- var original = WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu;
- WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu = function(script)
- {
- var result = original.apply(this, arguments);
- var debuggerAgent = devtools.tools.getDebuggerAgent();
- var type = debuggerAgent.getScriptContextType(script.sourceID);
- var option = script.filesSelectOption;
- if (type === "injected" && option)
- option.addStyleClass("injected");
- return result;
- };
-})();
-
-}
-
-
(function InterceptProfilesPanelEvents()
{
var oldShow = WebInspector.ProfilesPanel.prototype.show;
@@ -369,3 +270,8 @@ WebInspector.resetToolbarColors = function()
WebInspector._themeStyleElement.textContent = "";
}
+
+// TODO(yurys): should be removed when eclipse debugger stops using it.
+if (window.RemoteDebuggerAgent) {
+ RemoteDebuggerAgent.setContextId = function() {};
+}
diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js
index bab73a9..a2f356f 100644
--- a/WebKit/chromium/src/js/DevToolsHostStub.js
+++ b/WebKit/chromium/src/js/DevToolsHostStub.js
@@ -33,8 +33,7 @@
* DevTools frontend to function as a standalone web app.
*/
-if (!window["RemoteDebuggerAgent"]) {
- window["RemoteDebuggerAgent"] = { setDebuggerScriptSource: function() {} };
+if (!window["RemoteDebuggerCommandExecutor"]) {
window["RemoteDebuggerCommandExecutor"] = {};
window["RemoteProfilerAgent"] = {};
window["RemoteToolsAgent"] = {
diff --git a/WebKit/chromium/src/js/InspectorControllerImpl.js b/WebKit/chromium/src/js/InspectorControllerImpl.js
index cbe607d..5ed506a 100644
--- a/WebKit/chromium/src/js/InspectorControllerImpl.js
+++ b/WebKit/chromium/src/js/InspectorControllerImpl.js
@@ -102,7 +102,6 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("setRuleSelector");
this.installInspectorControllerDelegate_("addRule");
- if (window.v8ScriptDebugServerEnabled) {
this.installInspectorControllerDelegate_("disableDebugger");
this.installInspectorControllerDelegate_("editScriptSource");
this.installInspectorControllerDelegate_("getScriptSource");
@@ -111,129 +110,20 @@ devtools.InspectorBackendImpl = function()
this.installInspectorControllerDelegate_("removeBreakpoint");
this.installInspectorControllerDelegate_("activateBreakpoints");
this.installInspectorControllerDelegate_("deactivateBreakpoints");
- this.installInspectorControllerDelegate_("resumeDebugger");
- this.installInspectorControllerDelegate_("stepIntoStatementInDebugger");
- this.installInspectorControllerDelegate_("stepOutOfFunctionInDebugger");
- this.installInspectorControllerDelegate_("stepOverStatementInDebugger");
+ this.installInspectorControllerDelegate_("resume");
+ this.installInspectorControllerDelegate_("stepIntoStatement");
+ this.installInspectorControllerDelegate_("stepOutOfFunction");
+ this.installInspectorControllerDelegate_("stepOverStatement");
this.installInspectorControllerDelegate_("setPauseOnExceptionsState");
- }
};
devtools.InspectorBackendImpl.prototype.__proto__ = WebInspector.InspectorBackendStub.prototype;
-if (!window.v8ScriptDebugServerEnabled) {
-
-devtools.InspectorBackendImpl.prototype.setBreakpoint = function(sourceID, line, enabled, condition)
-{
- this.removeBreakpoint(sourceID, line);
- devtools.tools.getDebuggerAgent().addBreakpoint(sourceID, line, enabled, condition);
-};
-
-
-devtools.InspectorBackendImpl.prototype.removeBreakpoint = function(sourceID, line)
-{
- devtools.tools.getDebuggerAgent().removeBreakpoint(sourceID, line);
-};
-
-
-devtools.InspectorBackendImpl.prototype.editScriptSource = function(callID, sourceID, newContent)
-{
- devtools.tools.getDebuggerAgent().editScriptSource(sourceID, newContent, function(success, newBodyOrErrorMessage, callFrames) {
- WebInspector.didEditScriptSource(callID, success, newBodyOrErrorMessage, callFrames);
- });
-};
-
-
-devtools.InspectorBackendImpl.prototype.getScriptSource = function(callID, sourceID)
-{
- devtools.tools.getDebuggerAgent().resolveScriptSource(
- sourceID,
- function(source) {
- WebInspector.didGetScriptSource(callID, source);
- });
-};
-
-
-devtools.InspectorBackendImpl.prototype.activateBreakpoints = function()
-{
- devtools.tools.getDebuggerAgent().setBreakpointsActivated(true);
-};
-
-
-devtools.InspectorBackendImpl.prototype.deactivateBreakpoints = function()
-{
- devtools.tools.getDebuggerAgent().setBreakpointsActivated(false);
-};
-
-
-devtools.InspectorBackendImpl.prototype.pauseInDebugger = function()
-{
- devtools.tools.getDebuggerAgent().pauseExecution();
-};
-
-
-devtools.InspectorBackendImpl.prototype.resumeDebugger = function()
-{
- devtools.tools.getDebuggerAgent().resumeExecution();
-};
-
-
-devtools.InspectorBackendImpl.prototype.stepIntoStatementInDebugger = function()
-{
- devtools.tools.getDebuggerAgent().stepIntoStatement();
-};
-
-
-devtools.InspectorBackendImpl.prototype.stepOutOfFunctionInDebugger = function()
-{
- devtools.tools.getDebuggerAgent().stepOutOfFunction();
-};
-
-
-devtools.InspectorBackendImpl.prototype.stepOverStatementInDebugger = function()
-{
- devtools.tools.getDebuggerAgent().stepOverStatement();
-};
-
-/**
- * @override
- */
-devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState = function(state)
-{
- this._setPauseOnExceptionsState = state;
- // TODO(yurys): support all three states. See http://crbug.com/32877
- var enabled = (state !== WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
- WebInspector.updatePauseOnExceptionsState(enabled ? WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions : WebInspector.ScriptsPanel.PauseOnExceptionsState.DontPauseOnExceptions);
- devtools.tools.getDebuggerAgent().setPauseOnExceptions(enabled);
-};
-
-
-/**
- * @override
- */
-devtools.InspectorBackendImpl.prototype.pauseOnExceptions = function()
-{
- return devtools.tools.getDebuggerAgent().pauseOnExceptions();
-};
-
-
-/**
- * @override
- */
-devtools.InspectorBackendImpl.prototype.setPauseOnExceptions = function(value)
-{
- return devtools.tools.getDebuggerAgent().setPauseOnExceptions(value);
-};
-
-} else {
-
-devtools.InspectorBackendImpl.prototype.pauseInDebugger = function()
+devtools.InspectorBackendImpl.prototype.pause = function()
{
RemoteDebuggerCommandExecutor.DebuggerPauseScript();
};
-}
-
/**
* @override
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 81432eb..e2ab3b3 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -863,29 +863,6 @@ TestSuite.prototype.evaluateInConsole_ = function(code, callback)
};
-/*
- * Waits for "setbreakpoint" response, checks that corresponding breakpoint
- * was successfully set and invokes the callback if it was.
- * @param {string} scriptUrl
- * @param {number} breakpointLine
- * @param {function()} callback
- */
-TestSuite.prototype.waitForSetBreakpointResponse_ = function(scriptUrl, breakpointLine, callback)
-{
- var test = this;
- test.addSniffer(
- devtools.DebuggerAgent.prototype,
- "handleSetBreakpointResponse_",
- function(msg) {
- var bps = this.urlToBreakpoints_[scriptUrl];
- test.assertTrue(!!bps, "No breakpoints for line " + breakpointLine);
- var line = devtools.DebuggerAgent.webkitToV8LineNumber_(breakpointLine);
- test.assertTrue(!!bps[line].getV8Id(), "Breakpoint id was not assigned.");
- callback();
- });
-};
-
-
/**
* Tests eval on call frame.
*/
@@ -996,60 +973,7 @@ TestSuite.prototype.testCompletionOnPause = function()
*/
TestSuite.prototype.testAutoContinueOnSyntaxError = function()
{
- if (window.v8ScriptDebugServerEnabled)
- return;
-
- this.showPanel("scripts");
- var test = this;
-
- function checkScriptsList() {
- var scriptSelect = document.getElementById("scripts-files");
- var options = scriptSelect.options;
- // There should be only console API source (see
- // InjectedScript._ensureCommandLineAPIInstalled) since the page script
- // contains a syntax error.
- for (var i = 0 ; i < options.length; i++) {
- if (options[i].text.search("script_syntax_error.html") !== -1)
- test.fail("Script with syntax error should not be in the list of parsed scripts.");
- }
- }
-
-
- this.addSniffer(devtools.DebuggerAgent.prototype, "handleScriptsResponse_",
- function(msg) {
- checkScriptsList();
-
- // Reload inspected page.
- test.evaluateInConsole_(
- "window.location.reload(true);",
- function(resultText) {
- test.assertEquals("undefined", resultText, "Unexpected result of reload().");
- waitForExceptionEvent();
- });
- });
-
- function waitForExceptionEvent() {
- var exceptionCount = 0;
- test.addSniffer(
- devtools.DebuggerAgent.prototype,
- "handleExceptionEvent_",
- function(msg) {
- exceptionCount++;
- test.assertEquals(1, exceptionCount, "Too many exceptions.");
- test.assertEquals(undefined, msg.getBody().script, "Unexpected exception: " + JSON.stringify(msg));
- test.releaseControl();
- });
-
- // Check that the script is not paused on parse error.
- test.addSniffer(
- WebInspector,
- "pausedScript",
- function(callFrames) {
- test.fail("Script execution should not pause on syntax error.");
- });
- }
-
- this.takeControl();
+ // TODO(yurys): provide an implementation that works with ScriptDebugServer.
};
@@ -1500,14 +1424,14 @@ TestSuite.prototype.testExpandScope = function()
properties: {
x:"2009",
innerFunctionLocalVar:"2011",
- "this": (window.v8ScriptDebugServerEnabled ? "DOMWindow" : "global"),
+ "this": "DOMWindow",
}
},
{
title: "Closure",
properties: {
- n: (window.v8ScriptDebugServerEnabled ? '"TextParam"' : "TextParam"),
- makeClosureLocalVar: (window.v8ScriptDebugServerEnabled ? '"local.TextParam"' : "local.TextParam"),
+ n: '"TextParam"',
+ makeClosureLocalVar: '"local.TextParam"',
}
},
{
@@ -1611,7 +1535,6 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
}
function examineLocalScope() {
- if (window.v8ScriptDebugServerEnabled) {
var scopeExpectations = [
"a", "Child", [
"__proto__", "Child", [
@@ -1633,47 +1556,12 @@ TestSuite.prototype.testDebugIntrinsicProperties = function()
"childField", "20", null,
]
];
- } else {
- var scopeExpectations = [
- "a", "Object", [
- "constructor", "function Child()", [
- "constructor", "function Function()", null,
- "name", "Child", null,
- "prototype", "Object", [
- "childProtoField", 21, null
- ]
- ],
-
- "__proto__", "Object", [
- "__proto__", "Object", [
- "__proto__", "Object", [
- "__proto__", "null", null,
- "constructor", "function Object()", null,
- ],
- "constructor", "function Parent()", [
- "name", "Parent", null,
- "prototype", "Object", [
- "parentProtoField", 11, null,
- ]
- ],
- "parentProtoField", 11, null,
- ],
- "constructor", "function Child()", null,
- "childProtoField", 21, null,
- ],
-
- "parentField", 10, null,
- "childField", 20, null,
- ]
- ];
- }
-
checkProperty(localScopeSection.propertiesTreeOutline, "<Local Scope>", scopeExpectations);
}
var propQueue = [];
var index = 0;
- var expectedFinalIndex = (window.v8ScriptDebugServerEnabled ? 5 : 8);
+ var expectedFinalIndex = 5;
function expandAndCheckNextProperty() {
if (index === propQueue.length) {
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index 0e6d284..dfcaadf 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -171,10 +171,6 @@ body.platform-linux #scripts-files {
padding-left: 6px;
}
-.crumbs .crumb.end {
- -webkit-border-image: url(Images/segmentEndChromium.png) 0 2 0 2;
-}
-
.crumbs .crumb.selected {
-webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
color: white;
diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp
index 6680d74..9aad6bb 100644
--- a/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -68,6 +68,7 @@ public:
str.append(String::number(listIndex));
return str;
}
+ virtual String itemLabel(unsigned) const { return String(); }
virtual String itemToolTip(unsigned listIndex) const { return itemText(listIndex); }
virtual String itemAccessibilityText(unsigned listIndex) const { return itemText(listIndex); }
virtual bool itemIsEnabled(unsigned listIndex) const { return true; }
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
new file mode 100644
index 0000000..b5ad1d7
--- /dev/null
+++ b/WebKit/efl/ChangeLog
@@ -0,0 +1,5 @@
+2010-07-16 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Creating ChangeLog for the EFL port.
diff --git a/WebKit/efl/EWebLauncher/main.c b/WebKit/efl/EWebLauncher/main.c
index 362eefd..6980a58 100644
--- a/WebKit/efl/EWebLauncher/main.c
+++ b/WebKit/efl/EWebLauncher/main.c
@@ -413,6 +413,7 @@ on_viewport_changed(void* user_data, Evas_Object* webview, void* event_info)
app->viewport.minScale = minScale;
app->viewport.maxScale = maxScale;
app->viewport.userScalable = (Eina_Bool)userScalable;
+ viewport_set();
}
static void
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 342654a..4b01b75 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -437,10 +437,9 @@ void ChromeClientEfl::formStateDidChange(const Node*)
notImplemented();
}
-bool ChromeClientEfl::setCursor(PlatformCursorHandle)
+void ChromeClientEfl::setCursor(const Cursor&)
{
notImplemented();
- return false;
}
void ChromeClientEfl::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index 45bda59..ce8abd1 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -119,7 +119,7 @@ public:
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
- virtual bool setCursor(PlatformCursorHandle);
+ virtual void setCursor(const Cursor&);
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
diff --git a/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp b/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
index 3c4016f..cf672eb 100644
--- a/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp
@@ -40,6 +40,11 @@ using namespace WebCore;
namespace WebCore {
+void EditorClientEfl::willSetInputMethodState()
+{
+ notImplemented();
+}
+
void EditorClientEfl::setInputMethodState(bool active)
{
notImplemented();
diff --git a/WebKit/efl/WebCoreSupport/EditorClientEfl.h b/WebKit/efl/WebCoreSupport/EditorClientEfl.h
index a53d624..9f60cfb 100644
--- a/WebKit/efl/WebCoreSupport/EditorClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/EditorClientEfl.h
@@ -111,6 +111,7 @@ public:
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const String&, WTF::Vector<String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
private:
diff --git a/WebKit/efl/ewk/EWebKit.h b/WebKit/efl/ewk/EWebKit.h
index e08c4a5..183e9dc 100644
--- a/WebKit/efl/ewk/EWebKit.h
+++ b/WebKit/efl/ewk/EWebKit.h
@@ -23,6 +23,7 @@
#define EWebKit_h
#include "ewk_contextmenu.h"
+#include "ewk_cookies.h"
#include "ewk_eapi.h"
#include "ewk_frame.h"
#include "ewk_history.h"
diff --git a/WebKit/efl/ewk/ewk_cookies.cpp b/WebKit/efl/ewk/ewk_cookies.cpp
new file mode 100644
index 0000000..3b4949e
--- /dev/null
+++ b/WebKit/efl/ewk/ewk_cookies.cpp
@@ -0,0 +1,221 @@
+/*
+ Copyright (C) 2010 ProFUSION embedded systems
+ Copyright (C) 2010 Samsung Electronics
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "ewk_cookies.h"
+
+#include "CookieJarSoup.h"
+#include "EWebKit.h"
+#include "ResourceHandle.h"
+
+#include <Eina.h>
+#include <eina_safety_checks.h>
+#include <glib.h>
+#include <libsoup/soup.h>
+#include <wtf/text/CString.h>
+
+
+/**
+ * Set the path where the cookies are going to be stored. Use NULL for keep
+ * them just in memory.
+ *
+ * @param filename path to the cookies.txt file.
+ *
+ * @returns EINA_FALSE if it wasn't possible to create the cookie jar,
+ * EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool ewk_cookies_file_set(const char *filename)
+{
+ SoupCookieJar* cookieJar = 0;
+ if (filename)
+ cookieJar = soup_cookie_jar_text_new(filename, FALSE);
+ else
+ cookieJar = soup_cookie_jar_new();
+
+ if (!cookieJar)
+ return EINA_FALSE;
+
+#ifdef HAVE_LIBSOUP_2_29_90
+ soup_cookie_jar_set_accept_policy(cookieJar, SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY);
+#endif
+
+ SoupSession* session = WebCore::ResourceHandle::defaultSession();
+ SoupSessionFeature* oldjar = soup_session_get_feature(session, SOUP_TYPE_COOKIE_JAR);
+ if (oldjar)
+ soup_session_remove_feature(session, oldjar);
+
+ WebCore::setDefaultCookieJar(cookieJar);
+ soup_session_add_feature(session, SOUP_SESSION_FEATURE(cookieJar));
+
+ return EINA_TRUE;
+}
+
+/**
+ * Clear all the cookies from the cookie jar.
+ */
+EAPI void ewk_cookies_clear()
+{
+ GSList* l;
+ GSList* p;
+ SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+
+ l = soup_cookie_jar_all_cookies(cookieJar);
+ for (p = l; p; p = p->next)
+ soup_cookie_jar_delete_cookie(cookieJar, (SoupCookie*)p->data);
+
+ soup_cookies_free(l);
+}
+
+/**
+ * Returns a list of cookies in the cookie jar.
+ *
+ * @returns an Eina_List with all the cookies in the cookie jar.
+ */
+EAPI Eina_List* ewk_cookies_get_all(void)
+{
+ GSList* l;
+ GSList* p;
+ Eina_List* el = 0;
+ SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+
+ l = soup_cookie_jar_all_cookies(cookieJar);
+ for (p = l; p; p = p->next) {
+ SoupCookie* cookie = static_cast<SoupCookie*>(p->data);
+ Ewk_Cookie* c = static_cast<Ewk_Cookie*>(malloc(sizeof(*c)));
+ c->name = strdup(cookie->name);
+ c->value = strdup(cookie->value);
+ c->domain = strdup(cookie->domain);
+ c->path = strdup(cookie->path);
+ c->expires = soup_date_to_time_t(cookie->expires);
+ c->secure = static_cast<Eina_Bool>(cookie->secure);
+ c->http_only = static_cast<Eina_Bool>(cookie->http_only);
+ el = eina_list_append(el, c);
+ }
+
+ soup_cookies_free(l);
+ return el;
+}
+
+/*
+ * Deletes a cookie from the cookie jar.
+ *
+ * Note that the fields name, value, domain and path are used to match this
+ * cookie in the cookie jar.
+ *
+ * @param cookie an Ewk_Cookie that has the info relative to that cookie.
+ */
+EAPI void ewk_cookies_cookie_del(Ewk_Cookie *cookie)
+{
+ EINA_SAFETY_ON_NULL_RETURN(cookie);
+ GSList* l;
+ GSList* p;
+ SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookie* c1 = soup_cookie_new(
+ cookie->name, cookie->value, cookie->domain, cookie->path, -1);
+
+ l = soup_cookie_jar_all_cookies(cookieJar);
+ for (p = l; p; p = p->next) {
+ SoupCookie* c2 = static_cast<SoupCookie*>(p->data);
+ if (soup_cookie_equal(c1, c2)) {
+ soup_cookie_jar_delete_cookie(cookieJar, c2);
+ break;
+ }
+ }
+
+ soup_cookie_free(c1);
+ soup_cookies_free(l);
+}
+
+/*
+ * Free the memory used by a cookie.
+ *
+ * @param cookie the Ewk_Cookie struct that will be freed.
+ */
+EAPI void ewk_cookies_cookie_free(Ewk_Cookie *cookie)
+{
+ EINA_SAFETY_ON_NULL_RETURN(cookie);
+ free(cookie->name);
+ free(cookie->value);
+ free(cookie->domain);
+ free(cookie->path);
+ free(cookie);
+}
+
+/*
+ * Set the cookies accept policy.
+ *
+ * Possible values are: EWK_COOKIE_JAR_ACCEPT_ALWAYS, which accepts every
+ * cookie sent from any page; EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY, which
+ * accepts cookies only from the main page; and EWK_COOKIE_JAR_ACCEPT_NEVER,
+ * which rejects all cookies.
+ *
+ * @param p the acceptance policy
+ */
+EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p)
+{
+#ifdef HAVE_LIBSOUP_2_29_90
+ SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJarAcceptPolicy policy;
+
+ policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS;
+ switch (p) {
+ case EWK_COOKIE_JAR_ACCEPT_NEVER:
+ policy = SOUP_COOKIE_JAR_ACCEPT_NEVER;
+ break;
+ case EWK_COOKIE_JAR_ACCEPT_ALWAYS:
+ policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS;
+ break;
+ case EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY:
+ policy = SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY;
+ break;
+ }
+
+ soup_cookie_jar_set_accept_policy(cookieJar, policy);
+#endif
+}
+
+/*
+ * Gets the acceptance policy used in the current cookie jar.
+ *
+ * @returns the current acceptance policy
+ */
+EAPI Ewk_Cookie_Policy ewk_cookies_policy_get()
+{
+ Ewk_Cookie_Policy ewk_policy = EWK_COOKIE_JAR_ACCEPT_ALWAYS;
+#ifdef HAVE_LIBSOUP_2_29_90
+ SoupCookieJar* cookieJar = WebCore::defaultCookieJar();
+ SoupCookieJarAcceptPolicy policy;
+
+ policy = soup_cookie_jar_get_accept_policy(cookieJar);
+ switch (policy) {
+ case SOUP_COOKIE_JAR_ACCEPT_NEVER:
+ ewk_policy = EWK_COOKIE_JAR_ACCEPT_NEVER;
+ break;
+ case SOUP_COOKIE_JAR_ACCEPT_ALWAYS:
+ ewk_policy = EWK_COOKIE_JAR_ACCEPT_ALWAYS;
+ break;
+ case SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY:
+ ewk_policy = EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY;
+ break;
+ }
+#endif
+
+ return ewk_policy;
+}
diff --git a/WebKit/efl/ewk/ewk_cookies.h b/WebKit/efl/ewk/ewk_cookies.h
new file mode 100644
index 0000000..6ba3c9a
--- /dev/null
+++ b/WebKit/efl/ewk/ewk_cookies.h
@@ -0,0 +1,64 @@
+/*
+ Copyright (C) 2010 ProFUSION embedded systems
+ Copyright (C) 2010 Samsung Electronics
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef ewk_cookies_h
+#define ewk_cookies_h
+
+#include "ewk_eapi.h"
+#include <Eina.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _Ewk_Cookie {
+ char *name;
+ char *value;
+ char *domain;
+ char *path;
+ time_t expires;
+ Eina_Bool secure;
+ Eina_Bool http_only;
+};
+
+typedef struct _Ewk_Cookie Ewk_Cookie;
+
+enum _Ewk_Cookie_Policy {
+ EWK_COOKIE_JAR_ACCEPT_NEVER,
+ EWK_COOKIE_JAR_ACCEPT_ALWAYS,
+ EWK_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY
+};
+
+typedef enum _Ewk_Cookie_Policy Ewk_Cookie_Policy;
+
+/************************** Exported functions ***********************/
+
+EAPI Eina_Bool ewk_cookies_file_set(const char *filename);
+EAPI void ewk_cookies_clear();
+EAPI Eina_List* ewk_cookies_get_all();
+EAPI void ewk_cookies_cookie_del(Ewk_Cookie *cookie);
+EAPI void ewk_cookies_cookie_free(Ewk_Cookie *cookie);
+EAPI void ewk_cookies_policy_set(Ewk_Cookie_Policy p);
+EAPI Ewk_Cookie_Policy ewk_cookies_policy_get();
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ewk_cookies_h
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 39dc0a7..1707a7d 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -595,6 +595,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
// this functionality will be modified by the scale zoom patch.
priv->settings.zoom_range.min_scale = ZOOM_MIN;
priv->settings.zoom_range.max_scale = ZOOM_MAX;
+ priv->settings.zoom_range.user_scalable = EINA_TRUE;
priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get();
if (!priv->main_frame) {
@@ -3737,6 +3738,7 @@ void ewk_view_popup_selected_set(Evas_Object* o, int index)
INF("o=%p", o);
EWK_VIEW_SD_GET_OR_RETURN(o, sd);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
+ EINA_SAFETY_ON_NULL_RETURN(priv->popup.menu_client);
priv->popup.menu_client->valueChanged(index);
}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index cddfac8..803bf12 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,38 @@
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::willSetInputMethodState):
+ * WebCoreSupport/EditorClientGtk.h:
+
+2010-07-16 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Uncomment an assert that broke due to r63100.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42298
+
+ * tests/testwebview.c:
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::setCursor):
+ * WebCoreSupport/ChromeClientGtk.h:
+ Change prototype to match new one.
+
2010-07-12 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index bb469c5..88440ba 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -591,10 +591,9 @@ void ChromeClient::chooseIconForFiles(const Vector<WebCore::String>& filenames,
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
-bool ChromeClient::setCursor(PlatformCursorHandle)
+void ChromeClient::setCursor(const Cursor&)
{
notImplemented();
- return false;
}
void ChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index 46d015e..ce5c5a7 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -116,7 +116,7 @@ namespace WebKit {
virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
- virtual bool setCursor(WebCore::PlatformCursorHandle);
+ virtual void setCursor(const WebCore::Cursor&);
virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index 77ed9b2..cd04782 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -215,6 +215,10 @@ void EditorClient::updatePendingComposition(const gchar* newComposition)
m_pendingComposition.set(g_strconcat(m_pendingComposition.get(), newComposition, NULL));
}
+void EditorClient::willSetInputMethodState()
+{
+}
+
void EditorClient::setInputMethodState(bool active)
{
WebKitWebViewPrivate* priv = m_webView->priv;
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index 2e5c359..93f56ce 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -130,6 +130,7 @@ namespace WebKit {
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const WebCore::String&, WTF::Vector<WebCore::String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
private:
diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog
index ec5330e..aac3c0c 100644
--- a/WebKit/gtk/po/ChangeLog
+++ b/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-13 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ This file is generated, we do not need to upload it to the
+ repository.
+
+ * webkit.pot: Removed.
+
2010-06-25 Fran Diéguez <fran.dieguez@mabishu.com>
Reviewed by Darin Adler.
diff --git a/WebKit/gtk/po/webkit.pot b/WebKit/gtk/po/webkit.pot
deleted file mode 100644
index ebe1df7..0000000
--- a/WebKit/gtk/po/webkit.pot
+++ /dev/null
@@ -1,1076 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# This file is put in the public domain.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: webkit 1.1.22\n"
-"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
-"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
-msgid "Upload File"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:61
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:143
-msgid "Input _Methods"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:78
-msgid "LRM _Left-to-right mark"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:79
-msgid "RLM _Right-to-left mark"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:80
-msgid "LRE Left-to-right _embedding"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:81
-msgid "RLE Right-to-left e_mbedding"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:82
-msgid "LRO Left-to-right _override"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:83
-msgid "RLO Right-to-left o_verride"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
-msgid "PDF _Pop directional formatting"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
-msgid "ZWS _Zero width space"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:86
-msgid "ZWJ Zero width _joiner"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:87
-msgid "ZWNJ Zero width _non-joiner"
-msgstr ""
-
-#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:109
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:138
-msgid "_Insert Unicode Control Character"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:266
-msgid "Network Request"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:267
-msgid "The network request for the URI that should be downloaded"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:281
-msgid "Network Response"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:282
-msgid "The network response for the URI that should be downloaded"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:296
-msgid "Destination URI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:297
-msgid "The destination URI where to save the file"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:311
-msgid "Suggested Filename"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:312
-msgid "The filename suggested as default when saving"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:329
-msgid "Progress"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:330
-msgid "Determines the current progress of the download"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:343
-msgid "Status"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:344
-msgid "Determines the current status of the download"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:359
-msgid "Current Size"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:360
-msgid "The length of the data already downloaded"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:374
-msgid "Total Size"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:375
-msgid "The total size of the file"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitdownload.cpp:526
-msgid "User cancelled the download"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:248
-#, c-format
-msgid "A username and password are being requested by the site %s"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
-msgid "Server message:"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
-msgid "Username:"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
-msgid "Password:"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
-msgid "_Remember password"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:298
-msgid "Name"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:299
-msgid "The name of the frame"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:305
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:146
-#: WebKit/gtk/webkit/webkitwebview.cpp:2318
-msgid "Title"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:306
-msgid "The document title of the frame"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:312
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:178
-#: WebKit/gtk/webkit/webkitwebview.cpp:2332
-msgid "URI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:313
-msgid "The current URI of the contents displayed by the frame"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:344
-msgid "Horizontal Scrollbar Policy"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:345
-msgid ""
-"Determines the current policy for the horizontal scrollbar of the frame."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:362
-msgid "Vertical Scrollbar Policy"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebframe.cpp:363
-msgid "Determines the current policy for the vertical scrollbar of the frame."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
-msgid "The title of the history item"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
-msgid "Alternate Title"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
-msgid "The alternate title of the history item"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
-msgid "The URI of the history item"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
-msgid "Original URI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
-msgid "The original URI of the history item"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
-msgid "Last visited Time"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
-msgid "The time at which the history item was last visited"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
-msgid "Web View"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:269
-msgid "The Web View that renders the Web Inspector itself"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
-msgid "Inspected URI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
-msgid "The URI that is currently being inspected"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:299
-msgid "Enable JavaScript profiling"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
-msgid "Profile the executed JavaScript."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
-msgid "Enable Timeline profiling"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
-msgid "Profile the WebCore instrumentation."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
-msgid "Reason"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:159
-msgid "The reason why this navigation is occurring"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:174
-msgid "The URI that was requested as the target for the navigation"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:188
-msgid "Button"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:189
-msgid "The button used to click"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:204
-msgid "Modifier state"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:205
-msgid "A bitmask representing the state of the modifier keys"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
-msgid "Target frame"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
-msgid "The target frame for the navigation"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
-msgid "Default Encoding"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:238
-msgid "The default encoding used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:246
-msgid "Cursive Font Family"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:247
-msgid "The default Cursive font family used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:255
-msgid "Default Font Family"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:256
-msgid "The default font family used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:264
-msgid "Fantasy Font Family"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:265
-msgid "The default Fantasy font family used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:273
-msgid "Monospace Font Family"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:274
-msgid "The default font family used to display monospace text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:282
-msgid "Sans Serif Font Family"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:283
-msgid "The default Sans Serif font family used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:291
-msgid "Serif Font Family"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:292
-msgid "The default Serif font family used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:300
-msgid "Default Font Size"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:301
-msgid "The default font size used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:309
-msgid "Default Monospace Font Size"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:310
-msgid "The default font size used to display monospace text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:318
-msgid "Minimum Font Size"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
-msgid "The minimum font size used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
-msgid "Minimum Logical Font Size"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:328
-msgid "The minimum logical font size used to display text."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:347
-msgid "Enforce 96 DPI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:348
-msgid "Enforce a resolution of 96 DPI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:356
-msgid "Auto Load Images"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:357
-msgid "Load images automatically."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:365
-msgid "Auto Shrink Images"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:366
-msgid "Automatically shrink standalone images to fit."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:374
-msgid "Print Backgrounds"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
-msgid "Whether background images should be printed."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
-msgid "Enable Scripts"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
-msgid "Enable embedded scripting languages."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
-msgid "Enable Plugins"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:393
-msgid "Enable embedded plugin objects."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:401
-msgid "Resizable Text Areas"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:402
-msgid "Whether text areas are resizable."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:409
-msgid "User Stylesheet URI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
-msgid "The URI of a stylesheet that is applied to every page."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
-msgid "Zoom Stepping Value"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:426
-msgid "The value by which the zoom level is changed when zooming in or out."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:444
-msgid "Enable Developer Extras"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:445
-msgid "Enables special extensions that help developers"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:465
-msgid "Enable Private Browsing"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:466
-msgid "Enables private browsing mode"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
-msgid "Enable Spell Checking"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
-msgid "Enables spell checking while typing"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
-msgid "Languages to use for spell checking"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
-msgid "Comma separated list of languages to use for spell checking"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
-msgid "Enable Caret Browsing"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
-msgid "Whether to enable accesibility enhanced keyboard navigation"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
-msgid "Enable HTML5 Database"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
-msgid "Whether to enable HTML5 database support"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
-msgid "Enable HTML5 Local Storage"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
-msgid "Whether to enable HTML5 Local Storage support"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
-msgid "Enable XSS Auditor"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
-msgid "Whether to enable teh XSS auditor"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
-msgid "User Agent"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
-msgid "The User-Agent string used by WebKitGtk"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
-msgid "JavaScript can open windows automatically"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
-msgid "Whether JavaScript can open windows automatically"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
-msgid "Enable offline web application cache"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
-msgid "Whether to enable offline web application cache"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
-msgid "Editing behavior"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
-msgid "The behavior mode to use in editing mode"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
-msgid "Enable universal access from file URIs"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
-msgid "Whether to allow universal access from file URIs"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
-msgid "Enable DOM paste"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
-msgid "Whether to enable DOM paste"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
-msgid "Tab key cycles through elements"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
-msgid "Whether the tab key cycles through elements on the page."
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
-msgid "Enable Default Context Menu"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
-msgid ""
-"Enables the handling of right-clicks for the creation of the default context "
-"menu"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
-msgid "Enable Site Specific Quirks"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
-msgid "Enables the site-specific compatibility workarounds"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
-msgid "Enable page cache"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
-msgid "Whether the page cache should be used"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
-msgid "Auto Resize Window"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
-msgid "Automatically resize the toplevel window when a page requests it"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
-msgid "Enable Java Applet"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
-msgid "Whether Java Applet support through <applet> should be enabled"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2319
-msgid "Returns the @web_view's document title"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2333
-msgid "Returns the current URI of the contents displayed by the @web_view"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2346
-msgid "Copy target list"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2347
-msgid "The list of targets this web view supports for clipboard copying"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2360
-msgid "Paste target list"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2361
-msgid "The list of targets this web view supports for clipboard pasting"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2367
-msgid "Settings"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2368
-msgid "An associated WebKitWebSettings instance"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2381
-msgid "Web Inspector"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2382
-msgid "The associated WebKitWebInspector instance"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2402
-msgid "Editable"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2403
-msgid "Whether content can be modified by the user"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2409
-msgid "Transparent"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2410
-msgid "Whether content has a transparent background"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2423
-msgid "Zoom level"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2424
-msgid "The level of zoom of the content"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2439
-msgid "Full content zoom"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2440
-msgid "Whether the full content is scaled when zooming"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2453
-msgid "Encoding"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2454
-msgid "The default encoding of the web view"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2467
-msgid "Custom Encoding"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2468
-msgid "The custom encoding of the web view"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2520
-msgid "Icon URI"
-msgstr ""
-
-#: WebKit/gtk/webkit/webkitwebview.cpp:2521
-msgid "The URI for the favicon for the #WebKitWebView."
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
-msgid "Submit"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
-msgid "Reset"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
-msgid "This is a searchable index. Enter search keywords: "
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
-msgid "Choose File"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
-msgid "(None)"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
-msgid "Open Link in New _Window"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
-msgid "_Download Linked File"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:95
-msgid "Copy Link Loc_ation"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:100
-msgid "Open _Image in New Window"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
-msgid "Sa_ve Image As"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
-msgid "Cop_y Image"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
-msgid "Open _Frame in New Window"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
-msgid "_Reload"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:183
-msgid "No Guesses Found"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:188
-msgid "_Ignore Spelling"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:193
-msgid "_Learn Spelling"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:198
-msgid "_Search the Web"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
-msgid "_Look Up in Dictionary"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
-msgid "_Open Link"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:213
-msgid "Ignore _Grammar"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:218
-msgid "Spelling and _Grammar"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
-msgid "_Show Spelling and Grammar"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:223
-msgid "_Hide Spelling and Grammar"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:228
-msgid "_Check Document Now"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:233
-msgid "Check Spelling While _Typing"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:238
-msgid "Check _Grammar With Spelling"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:243
-msgid "_Font"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
-msgid "_Outline"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
-msgid "Inspect _Element"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:276
-msgid "No recent searches"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:281
-msgid "Recent searches"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:286
-msgid "_Clear recent searches"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:291
-msgid "term"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
-msgid "definition"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
-msgid "press"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
-msgid "select"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
-msgid "activate"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
-msgid "uncheck"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
-msgid "check"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
-msgid "jump"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
-msgid " files"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
-msgid "Unknown"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
-msgid "Loading..."
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
-msgid "Live Broadcast"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
-msgid "audio element controller"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
-msgid "video element controller"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
-msgid "mute"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
-msgid "unmute"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
-msgid "play"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
-msgid "pause"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
-msgid "movie time"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
-msgid "timeline slider thumb"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
-msgid "back 30 seconds"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
-msgid "return to realtime"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
-msgid "elapsed time"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
-msgid "remaining time"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
-msgid "status"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
-msgid "fullscreen"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
-msgid "fast forward"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
-msgid "fast reverse"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
-msgid "show closed captions"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
-msgid "hide closed captions"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
-msgid "audio element playback controls and status display"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
-msgid "video element playback controls and status display"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
-msgid "mute audio tracks"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
-msgid "unmute audio tracks"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
-msgid "begin playback"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
-msgid "pause playback"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
-msgid "movie time scrubber"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
-msgid "movie time scrubber thumb"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
-msgid "seek movie back 30 seconds"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
-msgid "return streaming movie to real time"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
-msgid "current movie time in seconds"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
-msgid "number of seconds of movie remaining"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
-msgid "current movie status"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
-msgid "seek quickly back"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
-msgid "seek quickly forward"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
-msgid "Play movie in fullscreen mode"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
-msgid "start displaying closed captions"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
-msgid "stop displaying closed captions"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
-msgid "indefinite time"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
-msgid "value missing"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
-msgid "type mismatch"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
-msgid "pattern mismatch"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
-msgid "too long"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
-msgid "range underflow"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
-msgid "range overflow"
-msgstr ""
-
-#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
-msgid "step mismatch"
-msgstr ""
diff --git a/WebKit/gtk/tests/testwebview.c b/WebKit/gtk/tests/testwebview.c
index 0bea643..36511d7 100644
--- a/WebKit/gtk/tests/testwebview.c
+++ b/WebKit/gtk/tests/testwebview.c
@@ -266,10 +266,7 @@ static void do_test_webkit_web_view_adjustments(gboolean with_page_cache)
g_assert_cmpfloat(lower, ==, gtk_adjustment_get_lower(adjustment));
g_assert_cmpfloat(upper, ==, gtk_adjustment_get_upper(adjustment));
- // This assert is temporarily disabled until we fix the following bug:
- // https://bugs.webkit.org/show_bug.cgi?id=42114
- // It should be re-enabled ASAP.
- // g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0);
+ g_assert_cmpfloat(gtk_adjustment_get_value(adjustment), ==, 100.0);
g_free(effective_uri);
g_free(second_uri);
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index d71c5e4..841a94c 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebCoreSupport/EditorClientHaiku.cpp:
+ (WebCore::EditorClientHaiku::willSetInputMethodState):
+ * WebCoreSupport/EditorClientHaiku.h:
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebCoreSupport/ChromeClientHaiku.cpp:
+ (WebCore::ChromeClientHaiku::setCursor):
+ * WebCoreSupport/ChromeClientHaiku.h:
+ Change prototype to match new one.
+
2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
index 2cf5c31..d18b84d 100644
--- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
@@ -362,10 +362,9 @@ void ChromeClientHaiku::chooseIconForFiles(const Vector<String>& filenames, File
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
-bool ChromeClientHaiku::setCursor(PlatformCursorHandle)
+void ChromeClientHaiku::setCursor(const Cursor&)
{
notImplemented();
- return false;
}
// Notification that the given form element has changed. This function
diff --git a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
index d5a372b..963e72f 100644
--- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
@@ -140,7 +140,7 @@ namespace WebCore {
void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
void chooseIconForFiles(const Vector<String>&, FileChooser*);
- bool setCursor(PlatformCursorHandle);
+ void setCursor(const Cursor&);
// Notification that the given form element has changed. This function
// will be called frequently, so handling should be very fast.
diff --git a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
index 2e23af7..bdd7eb8 100644
--- a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
+++ b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.cpp
@@ -466,6 +466,11 @@ void EditorClientHaiku::getGuessesForWord(const String&, Vector<String>&)
notImplemented();
}
+void EditorClientHaiku::willSetInputMethodState()
+{
+ notImplemented();
+}
+
void EditorClientHaiku::setInputMethodState(bool enabled)
{
notImplemented();
@@ -477,4 +482,3 @@ bool EditorClientHaiku::isEditing() const
}
} // namespace WebCore
-
diff --git a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
index eda9597..5cbec27 100644
--- a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
@@ -108,6 +108,7 @@ namespace WebCore {
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const String&, Vector<String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
bool isEditing() const;
@@ -121,4 +122,3 @@ namespace WebCore {
} // namespace WebCore
#endif // EditorClientHaiku_h
-
diff --git a/WebKit/mac/Carbon/CarbonWindowAdapter.mm b/WebKit/mac/Carbon/CarbonWindowAdapter.mm
index c57bc37..9747350 100644
--- a/WebKit/mac/Carbon/CarbonWindowAdapter.mm
+++ b/WebKit/mac/Carbon/CarbonWindowAdapter.mm
@@ -81,7 +81,7 @@
#import "WebTypesInternal.h"
@interface NSWindow(HIWebFrameView)
-- _initContent:(const NSRect *)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag contentView:aView;
+- (id)_initContent:(const NSRect *)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag contentView:aView;
- (void)_oldPlaceWindow:(NSRect)frameRect;
- (void)_windowMovedToRect:(NSRect)actualFrame;
- (void)_setWindowNumber:(NSInteger)nativeWindow;
@@ -517,7 +517,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
// Do the right thing for a Carbon window.
-- _destroyRealWindow:(BOOL)orderingOut {
+- (id)_destroyRealWindow:(BOOL)orderingOut {
// Complain, because this should never be called. We don't support one-shot NSCarbonWindows.
NSLog(@"-[NSCarbonWindow _destroyRealWindow:] is not implemented.");
@@ -804,7 +804,7 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
return;
}
-- _clearModalWindowLevel {
+- (id)_clearModalWindowLevel {
return nil;
}
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index eaed21b..95c460b 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,313 @@
+2010-07-21 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Composited layers don't scroll in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=42771
+
+ Prep work: FrameView::scrollPositionChanged() sounds like a generic "did scroll" bottleneck,
+ but this is deceiving. It's only every called on one platform (Mac) when the NSScrollView gets
+ scrolled, so rename it to FrameView::scrollPositionChangedViaPlatformWidget().
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]):
+
+2010-07-21 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Update plug-in proxy backed <video> and <audio> elements.
+ https://bugs.webkit.org/show_bug.cgi?id=42770
+ <rdar://problem/7963467>
+
+ * Plugins/WebPluginController.h:
+ * Plugins/WebPluginController.mm:
+ (-[WebPluginController dealloc]): Release _viewsNotInDocument.
+ (-[WebPluginController stopAllPlugins]): Stop plug-ins not in the document.
+ (-[WebPluginController pluginViewCreated:]): New, add a View (plug-in) to _viewsNotInDocument.
+ (+[WebPluginController pluginViewHidden:]): New, remove the view (plug-in) from pluginViews.
+ (-[WebPluginController addPlugin:]): Remove the new plug-in from _viewsNotInDocument.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Remove PLUGIN_PROXY_FOR_VIDEO code, the media
+ player proxy plug-in should never be allocated by this method.
+ (WebFrameLoaderClient::createMediaPlayerProxyPlugin): New, allocate a media player proxy.
+
+ * WebView/WebView.mm:
+ (-[WebView _videoProxyPluginForMIMEType:]): New. Identical to _pluginForMIMEType except it doesn't
+ consider the arePlugInsEnabled preference.
+ * WebView/WebViewInternal.h:
+
+
+2010-07-19 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42118
+ Disable WebGL on Leopard for now.
+
+ LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
+ GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
+ SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
+ software OpenGL driver on machines without this support.
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move PluginWidget to WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=42530
+
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView pluginLayer]):
+ Add default pluginLayer implementation.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (PluginWidget::PluginWidget):
+ (PluginWidget::invalidateRect):
+ Move the guts of PluginWidget here from WebCore.
+
+ (NetscapePluginWidget::platformLayer):
+ Get the layer from the plug-in view.
+
+2010-07-18 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/42522> Add missing (id) return type to Obj-C methods
+
+ Reviewed by Dan Bernstein.
+
+ * Carbon/CarbonWindowAdapter.mm:
+ (-[NSWindow(HIWebFrameView) _initContent:styleMask:backing:defer:contentView:]):
+ (-[CarbonWindowAdapter _destroyRealWindow:]):
+ (-[CarbonWindowAdapter _clearModalWindowLevel]):
+ * Misc/WebIconDatabase.mm:
+ (-[WebIconDatabase init]):
+ * Misc/WebNSPasteboardExtras.mm:
+ (-[NSFilePromiseDragSource initWithSource:]):
+ * WebView/WebHTMLRepresentation.mm:
+ (-[WebHTMLRepresentation init]):
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences init]):
+ * WebView/WebView.mm:
+ (-[WebView UIDelegate]):
+ (-[WebView resourceLoadDelegate]):
+ (-[WebView downloadDelegate]):
+ (-[WebView policyDelegate]):
+ (-[WebView frameLoadDelegate]):
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::willSetInputMethodState):
+
+2010-07-16 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Part of <rdar://problem/7233974> Deprecate +[WebView _setShouldUseFontSmoothing:]
+ https://bugs.webkit.org/show_bug.cgi?id=29355
+
+ * Misc/WebKitNSStringExtras.h:
+ * Misc/WebKitNSStringExtras.mm:
+ (-[NSString _web_drawAtPoint:font:textColor:]): Now calls through to
+ -_web_drawAtPoint:font:textColor:allowingFontSmoothing: passing YES for the last
+ parameter.
+ (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Added
+ allowingFontSmoothing:. If font smoothing is not allowed, sets the font smoothing
+ mode to antialiased. Otherwise, sets it to auto.
+ (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]): Instead of
+ changing the font smoothing setting in the graphics context, call
+ -_web_drawAtPoint:font:textColor:allowingFontSmoothing: passing NO for the last
+ parameter.
+
+2010-07-16 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove semicolons from Objective-C method declarations.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+ (+[WebRenderLayer compositingInfoForLayer:]):
+
+2010-07-16 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Make JS memory stats available via 'Performance' object (Web Timing).
+ This statistics is populated only if 'WebKitMemoryInfoEnabled'
+ preference is set.
+
+ 'console.memory' is kept until Web Timing object becomes visible by
+ default (currently it is hidden under compile-time flag). These stats
+ are guarded with the same preference.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41617
+
+ * WebKit.order:
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences memoryInfoEnabled]):
+ (-[WebPreferences setMemoryInfoEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ * Misc/WebCoreStatistics.h:
+ * Misc/WebCoreStatistics.mm:
+ (-[WebFrame printToCGContext:cgContext:pageWidthInPixels:]):
+
+2010-07-15 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ [Mac] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=37929
+
+ Implements support for markerTextForListItem in the Mac port.
+
+ * DOM/WebDOMOperations.mm:
+ (+[DOMElement _DOMElementFromJSContext]): Added.
+ (-[DOMElement _markerTextForListItem]): Added.
+ * DOM/WebDOMOperationsPrivate.h:
+
+2010-07-14 Simon Fraser <simon.fraser@apple.com>
+
+ Fix non-ACCELERATED_COMPOSITING build.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer compositingInfoForLayer:]):
+
+2010-07-14 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by John Sullivan.
+
+ <rdar://problem/8186963> Expose information about compositing layers.
+
+ Use RenderLayerBacking::compositingLayerType() to add more information about compositing to
+ WebRenderLayer, via a compositingInfo property. Also show element classnames.
+
+ Also add separator items between the various z-order lists.
+
+ * WebView/WebRenderLayer.h:
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+ (+[WebRenderLayer compositingInfoForLayer:]):
+ (-[WebRenderLayer initWithRenderLayer:]):
+ (-[WebRenderLayer initWithName:]):
+ (-[WebRenderLayer initWithWebFrame:]):
+ (-[WebRenderLayer dealloc]):
+ (-[WebRenderLayer buildDescendantLayers:]):
+ (-[WebRenderLayer compositingInfo]):
+ (-[WebRenderLayer isComposited]):
+ (-[WebRenderLayer isSeparator]):
+
+2010-07-14 Darin Adler <darin@apple.com>
+
+ Another try at fixing the Tiger build.
+
+ Avoid non-ASCII in source files to keep Tiger compiler happy.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]): Use %C for the non-ASCII characters.
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::setCursor):
+ * WebView/WebView.mm:
+ Implement cursor changing at the WebKit level for the sake of WebKit2.
+ This functionality is being moved from WidgetMac.mm.
+ (+[WebView _pointingHandCursor]):
+ Update to use platformCursor() instead of impl().
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Fix Tiger build.
+
+ Avoid non-ASCII in souce files to keep Tiger compiler happy.
+
+ * WebView/WebRenderLayer.mm:
+ (+[WebRenderLayer nameForLayer:]):
+
+2010-07-13 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/8186963> Expose RenderLayer hierarchy via Obj-C for debugging.
+
+ Add a WebRenderLayer class that reflects the RenderLayer tree into a hierarchy
+ of Objective-C objects suitable for display in an outline view.
+
+ * WebKit.exp: Export the WebRenderLayer Objective-C class.
+ * WebView/WebRenderLayer.h: Added.
+ * WebView/WebRenderLayer.mm: Added.
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _setDeferMainResourceDataLoad:]):
+ * WebView/WebDataSourcePrivate.h:
+
+2010-07-13 Philippe Normand <pnormand@igalia.com>
+
+ Rubber-stamped by Xan Lopez.
+
+ Updated the copyright headers of the files modified in r62476.
+
+ * WebView/WebView.mm:
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+
2010-07-09 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index 9a3ec0b..4b363aa 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -34,7 +34,6 @@
ENABLE_LINK_PREFETCH = ;
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-ENABLE_3D_CANVAS_1050 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1060 = ENABLE_3D_CANVAS;
ENABLE_3D_CANVAS_1070 = ENABLE_3D_CANVAS;
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm
index 194a000..d21f2b0 100644
--- a/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/WebKit/mac/DOM/WebDOMOperations.mm
@@ -29,6 +29,7 @@
#import "WebDOMOperationsPrivate.h"
#import "DOMDocumentInternal.h"
+#import "DOMElementInternal.h"
#import "DOMNodeInternal.h"
#import "DOMRangeInternal.h"
#import "WebArchiveInternal.h"
@@ -36,15 +37,42 @@
#import "WebFrameInternal.h"
#import "WebFramePrivate.h"
#import "WebKitNSStringExtras.h"
+#import <JavaScriptCore/APICast.h>
#import <WebCore/CSSHelper.h>
#import <WebCore/Document.h>
+#import <WebCore/JSElement.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/markup.h>
+#import <WebCore/RenderTreeAsText.h>
#import <WebKit/DOMExtensions.h>
#import <WebKit/DOMHTML.h>
+#import <runtime/JSLock.h>
+#import <runtime/JSValue.h>
#import <wtf/Assertions.h>
using namespace WebCore;
+using namespace JSC;
+
+@implementation DOMElement (WebDOMElementOperationsPrivate)
+
++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value
+{
+ if (!context)
+ return 0;
+
+ if (!value)
+ return 0;
+
+ JSLock lock(SilenceAssertionsOnly);
+ return kit(toElement(toJS(toJS(context), value)));
+}
+
+- (NSString *)_markerTextForListItem
+{
+ return WebCore::markerTextForListItem(core(self));
+}
+
+@end
@implementation DOMNode (WebDOMNodeOperations)
diff --git a/WebKit/mac/DOM/WebDOMOperationsPrivate.h b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
index 826aa7d..1c22e82 100644
--- a/WebKit/mac/DOM/WebDOMOperationsPrivate.h
+++ b/WebKit/mac/DOM/WebDOMOperationsPrivate.h
@@ -27,6 +27,12 @@
*/
#import <WebKit/WebDOMOperations.h>
+#import <JavaScriptCore/JSBase.h>
+
+@interface DOMElement (WebDOMElementOperationsPrivate)
++ (DOMElement *)_DOMElementFromJSContext:(JSContextRef)context value:(JSValueRef)value;
+- (NSString *)_markerTextForListItem;
+@end
@interface DOMDocument (WebDOMDocumentOperationsPrivate)
- (NSArray *)_focusableNodes;
diff --git a/WebKit/mac/Misc/WebCoreStatistics.h b/WebKit/mac/Misc/WebCoreStatistics.h
index 33e3e0f..1565c26 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.h
+++ b/WebKit/mac/Misc/WebCoreStatistics.h
@@ -90,4 +90,5 @@
- (NSString *)pageProperty:(const char*)propertyName:(int)pageNumber;
- (bool)isPageBoxVisible:(int)pageNumber;
- (NSString *)pageSizeAndMarginsInPixels:(int)pageNumber:(int)width:(int)height:(int)marginTop:(int)marginRight:(int)marginBottom:(int)marginLeft;
+- (void)printToCGContext:(CGContextRef)cgContext:(float)pageWidthInPixels:(float)pageHeightInPixels;
@end
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index bbe07d5..a5d5ae1 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -37,6 +37,7 @@
#import <WebCore/Frame.h>
#import <WebCore/GCController.h>
#import <WebCore/GlyphPageTreeNode.h>
+#import <WebCore/GraphicsContext.h>
#import <WebCore/IconDatabase.h>
#import <WebCore/JSDOMWindow.h>
#import <WebCore/PageCache.h>
@@ -289,4 +290,15 @@ using namespace WebCore;
{
return PrintContext::pageSizeAndMarginsInPixels(_private->coreFrame, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
}
+
+- (void)printToCGContext:(CGContextRef)cgContext:(float)pageWidthInPixels:(float)pageHeightInPixels
+{
+ Frame* coreFrame = _private->coreFrame;
+ if (!coreFrame)
+ return;
+
+ GraphicsContext graphicsContext(cgContext);
+ PrintContext::spoolAllPagesWithBoundaries(coreFrame, graphicsContext, FloatSize(pageWidthInPixels, pageHeightInPixels));
+}
+
@end
diff --git a/WebKit/mac/Misc/WebIconDatabase.mm b/WebKit/mac/Misc/WebIconDatabase.mm
index f53bffa..7d0a350 100644
--- a/WebKit/mac/Misc/WebIconDatabase.mm
+++ b/WebKit/mac/Misc/WebIconDatabase.mm
@@ -104,7 +104,7 @@ static WebIconDatabaseClient* defaultClient()
return database;
}
-- init
+- (id)init
{
[super init];
WebCoreThreadViolationCheckRoundOne();
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.h b/WebKit/mac/Misc/WebKitNSStringExtras.h
index f252430..ddc49f0 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.h
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.h
@@ -32,6 +32,7 @@ extern NSString *WebKitLocalCacheDefaultsKey;
@interface NSString (WebKitExtras)
+- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor allowingFontSmoothing:(BOOL)fontSmoothingIsAllowed;
- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor;
- (void)_web_drawDoubledAtPoint:(NSPoint)textPoint withTopColor:(NSColor *)topColor bottomColor:(NSColor *)bottomColor font:(NSFont *)font;
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.mm b/WebKit/mac/Misc/WebKitNSStringExtras.mm
index da46630..8fc12bd 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.mm
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.mm
@@ -62,12 +62,16 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor
{
- // FIXME: Would be more efficient to change this to C++ and use Vector<UChar, 2048>.
+ [self _web_drawAtPoint:point font:font textColor:textColor allowingFontSmoothing:YES];
+}
+
+- (void)_web_drawAtPoint:(NSPoint)point font:(NSFont *)font textColor:(NSColor *)textColor allowingFontSmoothing:(BOOL)fontSmoothingIsAllowed
+{
unsigned length = [self length];
Vector<UniChar, 2048> buffer(length);
[self getCharacters:buffer.data()];
-
+
if (canUseFastRenderer(buffer.data(), length)) {
// The following is a half-assed attempt to match AppKit's rounding rules for drawAtPoint.
// It's probably incorrect for high DPI.
@@ -84,7 +88,7 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
if (!flipped)
CGContextScaleCTM(cgContext, 1, -1);
- Font webCoreFont(FontPlatformData(font), ![nsContext isDrawingToScreen]);
+ Font webCoreFont(FontPlatformData(font), ![nsContext isDrawingToScreen], fontSmoothingIsAllowed ? AutoSmoothing : Antialiased);
TextRun run(buffer.data(), length);
run.disableRoundingHacks();
@@ -116,17 +120,10 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
font:(NSFont *)font
{
// turn off font smoothing so translucent text draws correctly (Radar 3118455)
- [NSGraphicsContext saveGraphicsState];
- CGContextSetShouldSmoothFonts(static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]), false);
- [self _web_drawAtPoint:textPoint
- font:font
- textColor:bottomColor];
+ [self _web_drawAtPoint:textPoint font:font textColor:bottomColor allowingFontSmoothing:NO];
textPoint.y += 1;
- [self _web_drawAtPoint:textPoint
- font:font
- textColor:topColor];
- [NSGraphicsContext restoreGraphicsState];
+ [self _web_drawAtPoint:textPoint font:font textColor:topColor allowingFontSmoothing:NO];
}
- (float)_web_widthWithFont:(NSFont *)font
diff --git a/WebKit/mac/Misc/WebNSPasteboardExtras.mm b/WebKit/mac/Misc/WebNSPasteboardExtras.mm
index ab3baf7..7caa47a 100644
--- a/WebKit/mac/Misc/WebNSPasteboardExtras.mm
+++ b/WebKit/mac/Misc/WebNSPasteboardExtras.mm
@@ -48,7 +48,7 @@
#import <wtf/StdLibExtras.h>
@interface NSFilePromiseDragSource : NSObject
-- initWithSource:(id)draggingSource;
+- (id)initWithSource:(id)draggingSource;
- (void)setTypes:(NSArray *)types onPasteboard:(NSPasteboard *)pboard;
@end
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index 81d801a..4c8ea84 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -140,6 +140,10 @@ class WebHaltablePlugin;
- (void)invalidatePluginContentRect:(NSRect)rect;
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer;
+#endif
+
@end
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index bcef2a1..6ae7334 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -948,6 +948,14 @@ String WebHaltablePlugin::pluginName() const
}
}
+#ifndef BUILDING_ON_TIGER
+- (CALayer *)pluginLayer
+{
+ ASSERT_NOT_REACHED();
+ return nil;
+}
+#endif
+
@end
namespace WebKit {
diff --git a/WebKit/mac/Plugins/WebPluginController.h b/WebKit/mac/Plugins/WebPluginController.h
index ffc07a4..dc1f413 100644
--- a/WebKit/mac/Plugins/WebPluginController.h
+++ b/WebKit/mac/Plugins/WebPluginController.h
@@ -42,6 +42,9 @@
NSMutableArray *_views;
BOOL _started;
NSMutableSet *_checksInProgress;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ NSMutableArray *_viewsNotInDocument;
+#endif
}
+ (NSView *)plugInViewWithArguments:(NSDictionary *)arguments fromPluginPackage:(WebPluginPackage *)plugin;
@@ -53,6 +56,10 @@
- (void)addPlugin:(NSView *)view;
- (void)destroyPlugin:(NSView *)view;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (void)pluginViewCreated:(NSView *)view;
++ (void)pluginViewHidden:(NSView *)view;
+#endif
- (void)startAllPlugins;
- (void)stopAllPlugins;
diff --git a/WebKit/mac/Plugins/WebPluginController.mm b/WebKit/mac/Plugins/WebPluginController.mm
index 1c85862..9c037c2 100644
--- a/WebKit/mac/Plugins/WebPluginController.mm
+++ b/WebKit/mac/Plugins/WebPluginController.mm
@@ -138,6 +138,9 @@ static NSMutableSet *pluginViews = nil;
{
[_views release];
[_checksInProgress release];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ [_viewsNotInDocument release];
+#endif
[super dealloc];
}
@@ -198,9 +201,30 @@ static NSMutableSet *pluginViews = nil;
for (i = 0; i < count; i++)
[self stopOnePlugin:[_views objectAtIndex:i]];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ count = [_viewsNotInDocument count];
+ for (i = 0; i < count; i++)
+ [self stopOnePlugin:[_viewsNotInDocument objectAtIndex:i]];
+#endif
+
_started = NO;
}
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (void)pluginViewCreated:(NSView *)view
+{
+ if (!_viewsNotInDocument)
+ _viewsNotInDocument= [[NSMutableArray alloc] init];
+ if (![_viewsNotInDocument containsObject:view])
+ [_viewsNotInDocument addObject:view];
+}
+
++ (void)pluginViewHidden:(NSView *)view
+{
+ [pluginViews removeObject:view];
+}
+#endif
+
- (void)addPlugin:(NSView *)view
{
if (!_documentView) {
@@ -212,6 +236,11 @@ static NSMutableSet *pluginViews = nil;
[_views addObject:view];
[[_documentView _webView] addPluginInstanceView:view];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ if ([_viewsNotInDocument containsObject:view])
+ [_viewsNotInDocument removeObject:view];
+#endif
+
BOOL oldDefersCallbacks = [[self webView] defersCallbacks];
if (!oldDefersCallbacks)
[[self webView] setDefersCallbacks:YES];
@@ -251,7 +280,11 @@ static NSMutableSet *pluginViews = nil;
- (void)destroyPlugin:(NSView *)view
{
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ if ([_views containsObject:view] || [_viewsNotInDocument containsObject:view]) {
+#else
if ([_views containsObject:view]) {
+#endif
if (_started)
[self stopOnePlugin:view];
[self destroyOnePlugin:view];
@@ -264,6 +297,9 @@ static NSMutableSet *pluginViews = nil;
[pluginViews removeObject:view];
[[_documentView _webView] removePluginInstanceView:view];
[_views removeObject:view];
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ [_viewsNotInDocument removeObject:view];
+#endif
}
}
@@ -310,6 +346,13 @@ static void cancelOutstandingCheck(const void *item, void *context)
[pluginViews removeObject:aView];
[[_documentView _webView] removePluginInstanceView:aView];
}
+
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ count = [_viewsNotInDocument count];
+ for (i = 0; i < count; i++)
+ [self destroyOnePlugin:[_viewsNotInDocument objectAtIndex:i]];
+#endif
+
[_views makeObjectsPerformSelector:@selector(removeFromSuperviewWithoutNeedingDisplay)];
[_views release];
_views = nil;
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index ea59c4d..707d080 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -127,7 +127,7 @@ public:
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
- virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
+ virtual void setCursor(const WebCore::Cursor&);
virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WebCore::AtomicString& type,
const WebCore::FloatRect& lineRect);
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 3bf310a..eb56240 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -48,6 +48,7 @@
#import <Foundation/Foundation.h>
#import <WebCore/BlockExceptions.h>
#import <WebCore/Console.h>
+#import <WebCore/Cursor.h>
#import <WebCore/Element.h>
#import <WebCore/FileChooser.h>
#import <WebCore/FloatRect.h>
@@ -659,6 +660,14 @@ void WebChromeClient::chooseIconForFiles(const Vector<String>& filenames, FileCh
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
+void WebChromeClient::setCursor(const WebCore::Cursor& cursor)
+{
+ NSCursor *platformCursor = cursor.platformCursor();
+ if ([NSCursor currentCursor] == platformCursor)
+ return;
+ [platformCursor set];
+}
+
KeyboardUIMode WebChromeClient::keyboardUIMode()
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index d7dfdd7..1cb2a59 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -127,6 +127,7 @@ public:
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const WebCore::String&, WTF::Vector<WebCore::String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
private:
void registerCommandForUndoOrRedo(PassRefPtr<WebCore::EditCommand>, bool isRedo);
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index ec9024a..d2f2706 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -818,6 +818,10 @@ void WebEditorClient::getGuessesForWord(const String& word, WTF::Vector<String>&
}
}
+void WebEditorClient::willSetInputMethodState()
+{
+}
+
void WebEditorClient::setInputMethodState(bool)
{
}
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
index 60b1fbf..d750a10 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
@@ -201,6 +201,13 @@ private:
virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget(const WebCore::IntSize&, WebCore::HTMLAppletElement*, const WebCore::KURL& baseURL,
const Vector<WebCore::String>& paramNames, const Vector<WebCore::String>& paramValues);
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ virtual PassRefPtr<WebCore::Widget> createMediaPlayerProxyPlugin(const WebCore::IntSize&, WebCore::HTMLMediaElement*, const WebCore::KURL&,
+ const Vector<WebCore::String>&, const Vector<WebCore::String>&, const WebCore::String&);
+ virtual void hideMediaPlayerProxyPlugin(WebCore::Widget*);
+ virtual void showMediaPlayerProxyPlugin(WebCore::Widget*);
+#endif
+
virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType);
virtual WebCore::String overrideMediaType() const;
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index d72f4ed..1021ad9 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -93,6 +93,9 @@
#import <WebCore/HTMLFrameElement.h>
#import <WebCore/HTMLFrameOwnerElement.h>
#import <WebCore/HTMLHeadElement.h>
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#import <WebCore/HTMLMediaElement.h>
+#endif
#import <WebCore/HTMLNames.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/HistoryItem.h>
@@ -103,7 +106,7 @@
#import <WebCore/MouseEvent.h>
#import <WebCore/Page.h>
#import <WebCore/PlatformString.h>
-#import <WebCore/PluginWidget.h>
+#import <WebCore/PluginViewBase.h>
#import <WebCore/ResourceError.h>
#import <WebCore/ResourceHandle.h>
#import <WebCore/ResourceLoader.h>
@@ -1502,6 +1505,20 @@ static NSView *pluginView(WebFrame *frame, WebPluginPackage *pluginPackage,
return view;
}
+class PluginWidget : public PluginViewBase {
+public:
+ PluginWidget(NSView *view = 0)
+ : PluginViewBase(view)
+ {
+ }
+
+private:
+ virtual void invalidateRect(const IntRect& rect)
+ {
+ [platformWidget() setNeedsDisplayInRect:rect];
+ }
+};
+
#if ENABLE(NETSCAPE_PLUGIN_API)
class NetscapePluginWidget : public PluginWidget {
@@ -1511,6 +1528,13 @@ public:
{
}
+#if USE(ACCELERATED_COMPOSITING)
+ virtual PlatformLayer* platformLayer() const
+ {
+ return [(WebBaseNetscapePluginView *)platformWidget() pluginLayer];
+ }
+#endif
+
virtual void handleEvent(Event* event)
{
Frame* frame = Frame::frameForWidget(this);
@@ -1583,12 +1607,6 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
}
NSString *extension = [[pluginURL path] pathExtension];
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- // don't allow proxy plug-in selection by file extension
- if (element->hasTagName(videoTag) || element->hasTagName(audioTag))
- extension = @"";
-#endif
-
if (!pluginPackage && [extension length] != 0) {
pluginPackage = [webView _pluginForExtension:extension];
if (pluginPackage) {
@@ -1743,6 +1761,83 @@ PassRefPtr<Widget> WebFrameLoaderClient::createJavaAppletWidget(const IntSize& s
#endif // ENABLE(JAVA_BRIDGE)
}
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+PassRefPtr<Widget> WebFrameLoaderClient::createMediaPlayerProxyPlugin(const IntSize& size, HTMLMediaElement* element, const KURL& url,
+ const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ ASSERT(paramNames.size() == paramValues.size());
+ ASSERT(mimeType);
+
+ int errorCode = 0;
+ WebView *webView = getWebView(m_webFrame.get());
+ NSURL *URL = url;
+
+ SEL selector = @selector(webView:plugInViewWithArguments:);
+
+ if ([[webView UIDelegate] respondsToSelector:selector]) {
+ NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)];
+ NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
+ attributes, WebPlugInAttributesKey,
+ [NSNumber numberWithInt:WebPlugInModeEmbed], WebPlugInModeKey,
+ [NSNumber numberWithBool:YES], WebPlugInShouldLoadMainResourceKey,
+ kit(element), WebPlugInContainingElementKey,
+ URL, WebPlugInBaseURLKey, // URL might be nil, so add it last
+ nil];
+
+ NSView *view = CallUIDelegate(webView, selector, arguments);
+
+ [attributes release];
+ [arguments release];
+
+ if (view)
+ return adoptRef(new PluginWidget(view));
+ }
+
+ WebBasePluginPackage *pluginPackage = [webView _videoProxyPluginForMIMEType:mimeType];
+ Document* document = core(m_webFrame.get())->document();
+ NSURL *baseURL = document->baseURL();
+ NSView *view = nil;
+
+ if (pluginPackage) {
+ if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
+ view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), false);
+ } else
+ errorCode = WebKitErrorCannotFindPlugIn;
+
+ if (!errorCode && !view)
+ errorCode = WebKitErrorCannotLoadPlugIn;
+
+ if (errorCode) {
+ NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
+ contentURL:URL pluginPageURL:nil pluginName:[pluginPackage name] MIMEType:mimeType];
+ WebNullPluginView *nullView = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
+ error:error DOMElement:kit(element)] autorelease];
+ view = nullView;
+ [error release];
+ }
+
+ ASSERT(view);
+ return adoptRef(new PluginWidget(view));
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+
+ return 0;
+}
+
+void WebFrameLoaderClient::hideMediaPlayerProxyPlugin(Widget* widget)
+{
+ [WebPluginController pluginViewHidden:widget->platformWidget()];
+}
+
+void WebFrameLoaderClient::showMediaPlayerProxyPlugin(Widget* widget)
+{
+ [WebPluginController addPlugInView:widget->platformWidget()];
+}
+
+#endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+
String WebFrameLoaderClient::overrideMediaType() const
{
NSString* overrideType = [getWebView(m_webFrame.get()) mediaStyle];
diff --git a/WebKit/mac/WebKit.exp b/WebKit/mac/WebKit.exp
index b2ddb18..a22179f 100644
--- a/WebKit/mac/WebKit.exp
+++ b/WebKit/mac/WebKit.exp
@@ -25,6 +25,7 @@
.objc_class_name_WebPanelAuthenticationHandler
.objc_class_name_WebPluginDatabase
.objc_class_name_WebPreferences
+.objc_class_name_WebRenderLayer
.objc_class_name_WebRenderNode
.objc_class_name_WebResource
.objc_class_name_WebScriptCallFrame
diff --git a/WebKit/mac/WebKit.order b/WebKit/mac/WebKit.order
index 1776616..c2b5f5d 100644
--- a/WebKit/mac/WebKit.order
+++ b/WebKit/mac/WebKit.order
@@ -283,6 +283,7 @@ _WKAppVersionCheckLessThan
-[WebPreferences(WebPrivate) showRepaintCounter]
-[WebPreferences(WebPrivate) pluginAllowedRunTime]
-[WebPreferences(WebPrivate) webGLEnabled]
+-[WebPreferences(WebPrivate) memoryInfoEnabled]
-[WebPreferences(WebPrivate) isFrameFlatteningEnabled]
-[WebView setMaintainsBackForwardList:]
-[WebView setUIDelegate:]
@@ -1883,6 +1884,7 @@ __ZN24WebDatabaseTrackerClient25dispatchDidModifyDatabaseEPN7WebCore14SecurityOr
-[WebPreferences setUsesPageCache:]
-[WebPreferences(WebPrivate) setAcceleratedCompositingEnabled:]
-[WebPreferences(WebPrivate) setWebGLEnabled:]
+-[WebPreferences(WebPrivate) setMemoryInfoEnabled:]
+[WebPluginDatabase setAdditionalWebPlugInPaths:]
-[WebDefaultUIDelegate webView:didDrawRect:]
-[WebView(WebPrivate) _setPostsAcceleratedCompositingNotifications:]
diff --git a/WebKit/mac/WebView/WebDataSource.mm b/WebKit/mac/WebView/WebDataSource.mm
index b16aaa8..02dbc2c 100644
--- a/WebKit/mac/WebView/WebDataSource.mm
+++ b/WebKit/mac/WebView/WebDataSource.mm
@@ -211,6 +211,16 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
#endif
}
+- (void)_setDeferMainResourceDataLoad:(BOOL)flag
+{
+ DocumentLoader* loader = [self _documentLoader];
+
+ if (!loader)
+ return;
+
+ loader->setDeferMainResourceDataLoad(flag);
+}
+
@end
@implementation WebDataSource (WebInternal)
diff --git a/WebKit/mac/WebView/WebDataSourcePrivate.h b/WebKit/mac/WebView/WebDataSourcePrivate.h
index ae8d4cf..df9c61e 100644
--- a/WebKit/mac/WebView/WebDataSourcePrivate.h
+++ b/WebKit/mac/WebView/WebDataSourcePrivate.h
@@ -37,4 +37,6 @@
- (BOOL)_transferApplicationCache:(NSString*)destinationBundleIdentifier;
+- (void)_setDeferMainResourceDataLoad:(BOOL)flag;
+
@end
diff --git a/WebKit/mac/WebView/WebHTMLRepresentation.mm b/WebKit/mac/WebView/WebHTMLRepresentation.mm
index c009f4a..7843c9a 100644
--- a/WebKit/mac/WebView/WebHTMLRepresentation.mm
+++ b/WebKit/mac/WebView/WebHTMLRepresentation.mm
@@ -113,7 +113,7 @@ static NSArray *concatenateArrays(NSArray *first, NSArray *second)
return staticSupportedImageMIMETypes.get();
}
-- init
+- (id)init
{
self = [super init];
if (!self)
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index e40500c..08c8911 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -1201,7 +1201,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
#ifndef BUILDING_ON_TIGER
_private->inScrollPositionChanged = YES;
#endif
- coreView->scrollPositionChanged();
+ coreView->scrollPositionChangedViaPlatformWidget();
#ifndef BUILDING_ON_TIGER
_private->inScrollPositionChanged = NO;
#endif
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index a28be49..4175a5d 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -97,6 +97,7 @@
#define WebKitHTML5TreeBuilderEnabledPreferenceKey @"WebKitHTML5TreeBuilderEnabled" // Temporary, do not use.
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
+#define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index a376458..63915dc 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -176,7 +176,7 @@ static WebCacheModel cacheModelForMainBundle(void)
@implementation WebPreferences
-- init
+- (id)init
{
// Create fake identifier
static int instanceCount = 1;
@@ -363,6 +363,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:YES], WebKitHTML5ParserEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitHTML5TreeBuilderEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
nil];
// This value shouldn't ever change, which is assumed in the initialization of WebKitPDFDisplayModePreferenceKey above
@@ -1281,6 +1282,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:flag forKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
}
+- (BOOL)memoryInfoEnabled
+{
+ return [self _boolValueForKey:WebKitMemoryInfoEnabledPreferenceKey];
+}
+
+- (void)setMemoryInfoEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitMemoryInfoEnabledPreferenceKey];
+}
+
- (WebKitEditingBehavior)editingBehavior
{
return static_cast<WebKitEditingBehavior>([self _integerValueForKey:WebKitEditingBehaviorPreferenceKey]);
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index e94943f..073b364 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -191,6 +191,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)usesProxiedOpenPanel;
- (void)setUsesProxiedOpenPanel:(BOOL)enabled;
+- (BOOL)memoryInfoEnabled;
+- (void)setMemoryInfoEnabled:(BOOL)enabled;
+
// Other private methods
- (void)_postPreferencesChangesNotification;
+ (WebPreferences *)_getInstanceForIdentifier:(NSString *)identifier;
diff --git a/WebKit/mac/WebView/WebRenderLayer.h b/WebKit/mac/WebView/WebRenderLayer.h
new file mode 100644
index 0000000..e09983d
--- /dev/null
+++ b/WebKit/mac/WebView/WebRenderLayer.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 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 COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class WebFrame;
+
+@interface WebRenderLayer : NSObject
+{
+ NSArray *children;
+ NSString *name;
+ NSString *compositingInfo;
+ NSRect bounds;
+ BOOL composited;
+ BOOL separator;
+}
+
+- (id)initWithWebFrame:(WebFrame *)frame;
+
+- (NSArray *)children;
+
+- (NSString *)name;
+- (NSString *)positionString;
+- (NSString *)widthString;
+- (NSString *)heightString;
+- (NSString *)compositingInfo;
+
+- (BOOL)isComposited;
+- (BOOL)isSeparator;
+
+@end
diff --git a/WebKit/mac/WebView/WebRenderLayer.mm b/WebKit/mac/WebView/WebRenderLayer.mm
new file mode 100644
index 0000000..edffac2
--- /dev/null
+++ b/WebKit/mac/WebView/WebRenderLayer.mm
@@ -0,0 +1,280 @@
+/*
+ * Copyright (C) 2010 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 COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebRenderLayer.h"
+
+#import "WebFrameInternal.h"
+#import <WebCore/Frame.h>
+#import <WebCore/FrameLoaderClient.h>
+#import <WebCore/PlatformString.h>
+#import <WebCore/RenderLayer.h>
+#import <WebCore/RenderLayerBacking.h>
+#import <WebCore/RenderView.h>
+
+using namespace WebCore;
+
+
+@interface WebRenderLayer(Private)
+
+- (id)initWithRenderLayer:(RenderLayer *)layer;
+- (void)buildDescendantLayers:(RenderLayer*)rootLayer;
+
+@end
+
+@implementation WebRenderLayer
+
++ (NSString *)nameForLayer:(RenderLayer*)layer
+{
+ RenderObject* renderer = layer->renderer();
+ NSString *name = [NSString stringWithUTF8String:renderer->renderName()];
+
+ if (Node* node = renderer->node()) {
+ if (node->isElementNode())
+ name = [name stringByAppendingFormat:@" %@", (NSString *)static_cast<Element*>(node)->tagName()];
+ if (node->hasID())
+ name = [name stringByAppendingFormat:@" id=\"%@\"", (NSString *)static_cast<Element*>(node)->getIdAttribute()];
+
+ if (node->hasClass()) {
+ StyledElement* styledElement = static_cast<StyledElement*>(node);
+ String classes;
+ for (size_t i = 0; i < styledElement->classNames().size(); ++i) {
+ if (i > 0)
+ classes += " ";
+ classes += styledElement->classNames()[i];
+ }
+ name = [name stringByAppendingFormat:@" class=\"%@\"", (NSString *)classes];
+ }
+ }
+
+ if (layer->isReflection())
+ name = [name stringByAppendingString:@" (reflection)"];
+
+ return name;
+}
+
++ (NSString *)compositingInfoForLayer:(RenderLayer*)layer
+{
+ if (!layer->isComposited())
+ return @"";
+
+ NSString *layerType = @"";
+#if USE(ACCELERATED_COMPOSITING)
+ RenderLayerBacking* backing = layer->backing();
+ switch (backing->compositingLayerType()) {
+ case NormalCompositingLayer:
+ layerType = @"composited";
+ break;
+ case TiledCompositingLayer:
+ layerType = @"composited: tiled layer";
+ break;
+ case MediaCompositingLayer:
+ layerType = @"composited for plug-in, video or WebGL";
+ break;
+ case ContainerCompositingLayer:
+ layerType = @"composited: container layer";
+ break;
+ }
+
+ if (backing->hasClippingLayer())
+ layerType = [layerType stringByAppendingString:@" (clipping)"];
+
+ if (backing->hasAncestorClippingLayer())
+ layerType = [layerType stringByAppendingString:@" (clipped)"];
+#endif
+
+ return layerType;
+}
+
+- (id)initWithRenderLayer:(RenderLayer*)layer
+{
+ if ((self = [super init])) {
+ name = [[WebRenderLayer nameForLayer:layer] retain];
+ bounds = layer->absoluteBoundingBox();
+ composited = layer->isComposited();
+ compositingInfo = [[WebRenderLayer compositingInfoForLayer:layer] retain];
+ }
+
+ return self;
+}
+
+- (id)initWithName:(NSString*)layerName
+{
+ if ((self = [super init])) {
+ name = [layerName copy];
+ separator = YES;
+ }
+
+ return self;
+}
+
+// Only called on the root.
+- (id)initWithWebFrame:(WebFrame *)webFrame
+{
+ self = [super init];
+
+ Frame* frame = core(webFrame);
+ if (!frame->loader()->client()->hasHTMLView()) {
+ [self release];
+ return nil;
+ }
+
+ RenderObject* renderer = frame->contentRenderer();
+ if (!renderer) {
+ [self release];
+ return nil;
+ }
+
+ if (renderer->hasLayer()) {
+ RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
+
+ name = [[WebRenderLayer nameForLayer:layer] retain];
+ bounds = layer->absoluteBoundingBox();
+ composited = layer->isComposited();
+ compositingInfo = [[WebRenderLayer compositingInfoForLayer:layer] retain];
+
+ [self buildDescendantLayers:layer];
+ }
+
+ return self;
+}
+
+- (void)dealloc
+{
+ [children release];
+ [name release];
+ [compositingInfo release];
+ [super dealloc];
+}
+
+- (void)buildDescendantLayers:(RenderLayer*)layer
+{
+ NSMutableArray *childWebLayers = [[NSMutableArray alloc] init];
+
+ // Build children in back to front order.
+
+ if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
+ size_t listSize = negZOrderList->size();
+
+ if (listSize) {
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithName:@"-ve z-order list"];
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = negZOrderList->at(i);
+
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithRenderLayer:curLayer];
+ [newLayer buildDescendantLayers:curLayer];
+
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+ }
+
+ if (Vector<RenderLayer*>* normalFlowList = layer->normalFlowList()) {
+ size_t listSize = normalFlowList->size();
+
+ if (listSize) {
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithName:@"normal flow list"];
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = normalFlowList->at(i);
+
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithRenderLayer:curLayer];
+ [newLayer buildDescendantLayers:curLayer];
+
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+ }
+
+ if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
+ size_t listSize = posZOrderList->size();
+
+ if (listSize) {
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithName:@"+ve z-order list"];
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+
+ for (size_t i = 0; i < listSize; ++i) {
+ RenderLayer* curLayer = posZOrderList->at(i);
+
+ WebRenderLayer* newLayer = [[WebRenderLayer alloc] initWithRenderLayer:curLayer];
+ [newLayer buildDescendantLayers:curLayer];
+
+ [childWebLayers addObject:newLayer];
+ [newLayer release];
+ }
+ }
+
+ children = childWebLayers;
+}
+
+- (NSArray *)children
+{
+ return children;
+}
+
+- (NSString *)name
+{
+ return name;
+}
+
+- (NSString *)positionString
+{
+ return [NSString stringWithFormat:@"(%.0f, %.0f)", bounds.origin.x, bounds.origin.y];
+}
+
+- (NSString *)widthString
+{
+ return [NSString stringWithFormat:@"%.0f", bounds.size.width];
+}
+
+- (NSString *)heightString
+{
+ return [NSString stringWithFormat:@"%.0f", bounds.size.height];
+}
+
+- (NSString *)compositingInfo
+{
+ return compositingInfo;
+}
+
+- (BOOL)isComposited
+{
+ return composited;
+}
+
+- (BOOL)isSeparator
+{
+ return separator;
+}
+
+@end
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 6d61453..f7b83ea 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 David Smith (catfish.man@gmail.com)
+ * Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1432,6 +1433,7 @@ static bool fastDocumentTeardownEnabled()
settings->setHTML5ParserEnabled([preferences html5ParserEnabled]);
settings->setHTML5TreeBuilderEnabled_DO_NOT_USE([preferences html5TreeBuilderEnabled]);
settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
+ settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
}
static inline IMP getMethod(id o, SEL s)
@@ -2219,7 +2221,7 @@ static inline IMP getMethod(id o, SEL s)
+ (NSCursor *)_pointingHandCursor
{
- return handCursor().impl();
+ return handCursor().platformCursor();
}
- (BOOL)_postsAcceleratedCompositingNotifications
@@ -2619,6 +2621,20 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
return nil;
}
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (WebBasePluginPackage *)_videoProxyPluginForMIMEType:(NSString *)MIMEType
+{
+ WebBasePluginPackage *pluginPackage = [[WebPluginDatabase sharedDatabase] pluginForMIMEType:MIMEType];
+ if (pluginPackage)
+ return pluginPackage;
+
+ if (_private->pluginDatabase)
+ return [_private->pluginDatabase pluginForMIMEType:MIMEType];
+
+ return nil;
+}
+#endif
+
- (WebBasePluginPackage *)_pluginForExtension:(NSString *)extension
{
if (![_private->preferences arePlugInsEnabled])
@@ -3084,7 +3100,7 @@ static bool needsWebViewInitThreadWorkaround()
_private->UIDelegateForwarder = nil;
}
-- UIDelegate
+- (id)UIDelegate
{
return _private->UIDelegate;
}
@@ -3095,7 +3111,7 @@ static bool needsWebViewInitThreadWorkaround()
[self _cacheResourceLoadDelegateImplementations];
}
-- resourceLoadDelegate
+- (id)resourceLoadDelegate
{
return _private->resourceProgressDelegate;
}
@@ -3106,7 +3122,7 @@ static bool needsWebViewInitThreadWorkaround()
}
-- downloadDelegate
+- (id)downloadDelegate
{
return _private->downloadDelegate;
}
@@ -3118,7 +3134,7 @@ static bool needsWebViewInitThreadWorkaround()
_private->policyDelegateForwarder = nil;
}
-- policyDelegate
+- (id)policyDelegate
{
return _private->policyDelegate;
}
@@ -3144,7 +3160,7 @@ static bool needsWebViewInitThreadWorkaround()
#endif
}
-- frameLoadDelegate
+- (id)frameLoadDelegate
{
return _private->frameLoadDelegate;
}
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index 06fee4f..d097c4c 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index bf9b732..f95d3d3 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -146,6 +147,9 @@ namespace WebCore {
- (void)_didChangeValueForKey:(NSString *)key;
- (WebBasePluginPackage *)_pluginForMIMEType:(NSString *)MIMEType;
- (WebBasePluginPackage *)_pluginForExtension:(NSString *)extension;
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+- (WebBasePluginPackage *)_videoProxyPluginForMIMEType:(NSString *)MIMEType;
+#endif
- (void)setCurrentNodeHighlight:(WebNodeHighlight *)nodeHighlight;
- (WebNodeHighlight *)currentNodeHighlight;
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 6d6acc5..8fbb8e2 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -73,6 +73,7 @@ public:
QGraphicsWebView* q;
QWebPage* page;
bool resizesToContents;
+ QSize deviceSize;
// Just a convenience to avoid using page->client->overlay always
QSharedPointer<QGraphicsItemOverlay> overlay;
@@ -549,6 +550,24 @@ QIcon QGraphicsWebView::icon() const
}
/*!
+ \property QGraphicsWebView::deviceSize
+ \brief the size of the device using the web view
+
+ The device size is used by the DOM window object methods
+ otherHeight(), otherWidth() as well as a page for the viewport
+ meta tag attributes device-width and device-height.
+*/
+void QGraphicsWebView::setDeviceSize(const QSize& size)
+{
+ d->deviceSize = size;
+}
+
+QSize QGraphicsWebView::deviceSize() const
+{
+ return d->deviceSize;
+}
+
+/*!
\property QGraphicsWebView::zoomFactor
\brief the zoom factor for the view
*/
diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h
index 88729d3..8650984 100644
--- a/WebKit/qt/Api/qgraphicswebview.h
+++ b/WebKit/qt/Api/qgraphicswebview.h
@@ -41,6 +41,7 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget {
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(QIcon icon READ icon NOTIFY iconChanged)
Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor)
+ Q_PROPERTY(QSize deviceSize READ deviceSize WRITE setDeviceSize)
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
@@ -64,9 +65,12 @@ public:
qreal zoomFactor() const;
void setZoomFactor(qreal);
+ QSize deviceSize() const;
+ void setDeviceSize(const QSize&);
+
bool isModified() const;
- void load(const QUrl &url);
+ void load(const QUrl& url);
void load(const QNetworkRequest& request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray& body = QByteArray());
void setHtml(const QString& html, const QUrl& baseUrl = QUrl());
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index e67abca..edc8f52 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,119 @@
+2010-07-20 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ [Qt] Add API to define device-width and height for use with the viewport meta tag
+ https://bugs.webkit.org/show_bug.cgi?id=42597
+
+ Reviewed by Antonio Gomes.
+
+ Add a new API for setting the deviceSize for use in conjunction with
+ out viewport meta tag API.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::setDeviceSize):
+ (QGraphicsWebView::deviceSize):
+ * Api/qgraphicswebview.h:
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQGraphicsWidget::windowRect):
+ * WebCoreSupport/PageClientQt.h:
+ (WebCore::PageClientQGraphicsWidget::PageClientQGraphicsWidget):
+
+2010-07-20 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DRT sideeffect revealed by r63657
+ https://bugs.webkit.org/show_bug.cgi?id=42578
+
+ Don't set an automatic timeout for notifications when running in DRT.
+ This fixes an issue with cancel() notifications in unrelated tests.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+
+2010-07-18 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] tst_QWebPage fails cursorMovements and textSelection
+ https://bugs.webkit.org/show_bug.cgi?id=42531
+
+ Correct the HTML used by these tests.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::cursorMovements):
+ (tst_QWebPage::textSelection):
+ (tst_QWebPage::textEditing):
+
+2010-07-18 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] tst_QWebElement fails firstChildNextSibling and lastChildPreviousSibling
+ https://bugs.webkit.org/show_bug.cgi?id=42527
+
+ Correct the HTML used by these tests.
+
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::firstChildNextSibling):
+ (tst_QWebElement::lastChildPreviousSibling):
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::willSetInputMethodState):
+ * WebCoreSupport/EditorClientQt.h:
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::setCursor):
+ * WebCoreSupport/ChromeClientQt.h:
+ Change prototype to match new one.
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setDeferMainResourceDataLoad):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createDocumentLoader):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
2010-07-09 Yael Aharon <yael.aharon@nokia.com>
Reviewed by Laszlo Gombos.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index faec705..2c64a78 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -529,10 +529,9 @@ void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, FileCho
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
-bool ChromeClientQt::setCursor(PlatformCursorHandle)
+void ChromeClientQt::setCursor(const Cursor&)
{
notImplemented();
- return false;
}
void ChromeClientQt::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 4b55eb2..70b4a25 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -161,7 +161,7 @@ namespace WebCore {
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
- virtual bool setCursor(PlatformCursorHandle);
+ virtual void setCursor(const Cursor&);
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 99f5653..a83e1a5 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -547,6 +547,11 @@ void DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(const QStringList&
FrameLoaderClientQt::sendRequestClearHeaders = headers;
}
+void DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(bool b)
+{
+ FrameLoaderClientQt::deferMainResourceDataLoad = b;
+}
+
void DumpRenderTreeSupportQt::setCustomPolicyDelegate(bool enabled, bool permissive)
{
FrameLoaderClientQt::policyDelegateEnabled = enabled;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 2ff1fc8..188c405 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -116,6 +116,8 @@ public:
static void setWillSendRequestReturnsNull(bool b);
static void setWillSendRequestClearHeaders(const QStringList& headers);
+ static void setDeferMainResourceDataLoad(bool b);
+
static void dumpEditingCallbacks(bool b);
static void dumpSetAcceptsEditing(bool b);
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index e140968..74c8438 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -587,6 +587,10 @@ bool EditorClientQt::isEditing() const
return m_editing;
}
+void EditorClientQt::willSetInputMethodState()
+{
+}
+
void EditorClientQt::setInputMethodState(bool active)
{
QWebPageClient* webPageClient = m_page->d->client;
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.h b/WebKit/qt/WebCoreSupport/EditorClientQt.h
index a5f6b23..7d99d22 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -105,6 +105,7 @@ public:
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const String&, Vector<String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
bool isEditing() const;
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 0348251..fc0f6c3 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -157,6 +157,7 @@ bool FrameLoaderClientQt::dumpResourceLoadCallbacks = false;
bool FrameLoaderClientQt::sendRequestReturnsNullOnRedirect = false;
bool FrameLoaderClientQt::sendRequestReturnsNull = false;
bool FrameLoaderClientQt::dumpResourceResponseMIMETypes = false;
+bool FrameLoaderClientQt::deferMainResourceDataLoad = true;
QStringList FrameLoaderClientQt::sendRequestClearHeaders;
QString FrameLoaderClientQt::dumpResourceLoadCallbacksPath;
@@ -878,7 +879,7 @@ bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&)
WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData)
{
RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
- if (substituteData.isValid())
+ if (!deferMainResourceDataLoad || substituteData.isValid())
loader->setDeferMainResourceDataLoad(false);
return loader.release();
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index b4a3c7e..ec672f5 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -221,6 +221,7 @@ public:
static QStringList sendRequestClearHeaders;
static bool policyDelegateEnabled;
static bool policyDelegatePermissive;
+ static bool deferMainResourceDataLoad;
private:
Frame *m_frame;
diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index a037592..ee69103 100644
--- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -183,7 +183,8 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
if (!wrapper->m_presenter) {
#ifndef QT_NO_SYSTEMTRAYICON
- wrapper->m_closeTimer.startOneShot(notificationTimeout);
+ if (!dumpNotification)
+ wrapper->m_closeTimer.startOneShot(notificationTimeout);
QPixmap pixmap;
if (bytes.length() && pixmap.loadFromData(bytes)) {
QIcon icon(pixmap);
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
index f52c382..90a5a63 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
@@ -324,6 +324,9 @@ QStyle* PageClientQGraphicsWidget::style() const
QRectF PageClientQGraphicsWidget::windowRect() const
{
+ if (!view->deviceSize().isEmpty())
+ return QRectF(QRect(QPoint(0, 0), view->deviceSize()));
+
if (!view->scene())
return QRectF();
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h
index 4d42ca1..1204afc 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.h
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.h
@@ -26,11 +26,11 @@
#include "IntRect.h"
#include "QWebPageClient.h"
#include "TiledBackingStore.h"
+#include "qgraphicswebview.h"
#include "qwebframe.h"
#include "qwebframe_p.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
-
#include <QtCore/qmetaobject.h>
#include <QtCore/qsharedpointer.h>
#include <QtGui/qgraphicsscene.h>
@@ -42,7 +42,6 @@
#include <Settings.h>
-
namespace WebCore {
class PageClientQWidget : public QWebPageClient {
@@ -122,7 +121,7 @@ class QGraphicsItemOverlay : public QGraphicsItem {
class PageClientQGraphicsWidget : public QWebPageClient {
public:
- PageClientQGraphicsWidget(QGraphicsWidget* v, QWebPage* p)
+ PageClientQGraphicsWidget(QGraphicsWebView* v, QWebPage* p)
: view(v)
, page(p)
, viewResizesToContents(false)
@@ -186,7 +185,7 @@ public:
virtual QRectF windowRect() const;
- QGraphicsWidget* view;
+ QGraphicsWebView* view;
QWebPage* page;
bool viewResizesToContents;
diff --git a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index 8db0ec3..2f1097a 100644
--- a/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -887,7 +887,7 @@ void tst_QWebElement::nullSelect()
void tst_QWebElement::firstChildNextSibling()
{
- m_mainFrame->setHtml("<body><!--comment--><p>Test</p><!--another commend><table>");
+ m_mainFrame->setHtml("<body><!--comment--><p>Test</p><!--another comment--><table>");
QWebElement body = m_mainFrame->findFirstElement("body");
QVERIFY(!body.isNull());
@@ -902,7 +902,7 @@ void tst_QWebElement::firstChildNextSibling()
void tst_QWebElement::lastChildPreviousSibling()
{
- m_mainFrame->setHtml("<body><!--comment--><p>Test</p><!--another commend><table>");
+ m_mainFrame->setHtml("<body><!--comment--><p>Test</p><!--another comment--><table>");
QWebElement body = m_mainFrame->findFirstElement("body");
QVERIFY(!body.isNull());
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 70466c7..67e3ecd 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -862,7 +862,7 @@ public:
void tst_QWebPage::cursorMovements()
{
CursorTrackedPage* page = new CursorTrackedPage;
- QString content("<html><body<p id=one>The quick brown fox</p><p id=two>jumps over the lazy dog</p><p>May the source<br/>be with you!</p></body></html>");
+ QString content("<html><body><p id=one>The quick brown fox</p><p id=two>jumps over the lazy dog</p><p>May the source<br/>be with you!</p></body></html>");
page->mainFrame()->setHtml(content);
// this will select the first paragraph
@@ -1054,7 +1054,7 @@ void tst_QWebPage::cursorMovements()
void tst_QWebPage::textSelection()
{
CursorTrackedPage* page = new CursorTrackedPage;
- QString content("<html><body<p id=one>The quick brown fox</p>" \
+ QString content("<html><body><p id=one>The quick brown fox</p>" \
"<p id=two>jumps over the lazy dog</p>" \
"<p>May the source<br/>be with you!</p></body></html>");
page->mainFrame()->setHtml(content);
@@ -1142,7 +1142,7 @@ void tst_QWebPage::textSelection()
void tst_QWebPage::textEditing()
{
CursorTrackedPage* page = new CursorTrackedPage;
- QString content("<html><body<p id=one>The quick brown fox</p>" \
+ QString content("<html><body><p id=one>The quick brown fox</p>" \
"<p id=two>jumps over the lazy dog</p>" \
"<p>May the source<br/>be with you!</p></body></html>");
page->mainFrame()->setHtml(content);
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index e1b7248..44869dc 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,194 @@
+2010-07-20 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit on Windows should build optionally with an unversioned ICU DLL
+ https://bugs.webkit.org/show_bug.cgi?id=42722
+ <rdar://problem/8211767> WebKit needs to link against unversioned ICU
+
+ To get the proper value for U_DISABLE_RENAMING into all source files, we force
+ the include of ICUVersion.h (our generated header) via the compiler options.
+
+ * WebKit.vcproj/WebKit.vcproj: Add forced include of ICUVersion.h.
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Update WebKit.sln for InjectedBundle's Debug_Internal configuration
+
+ Fixes <http://webkit.org/b/42749> InjectedBundle's build
+ configurations are screwy
+
+ Reviewed by Darin Adler.
+
+ * WebKit.vcproj/WebKit.sln: Build the Debug_Internal variant of
+ InjectedBundle when we're using the Debug_Internal solution
+ configuration.
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Add MiniBrowser to WebKit.sln
+
+ It is the last project to build.
+
+ Fixes <http://webkit.org/b/42747> build-webkit should build
+ MiniBrowser
+
+ Reviewed by Darin Adler.
+
+ * WebKit.vcproj/WebKit.sln: Added MiniBrowser, and made it depend on
+ WebKitTestRunner.
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Add WebKitTestRunner and friends to WebKit.sln
+
+ We added these projects to WebKit2.sln in r63585, but removed them
+ again in r63600 because WebKitTestRunner required getopt, which
+ doesn't exist in WebKitAuxiliaryLibrary. r63700 and r63788 removed the
+ use of getopt in WebKitTestRunner, so we can now add it to WebKit.sln
+ (which has replaced WebKit2.sln).
+
+ Fixes <http://webkit.org/b/42711> WebKit.sln should build
+ WebKitTestRunner
+
+ Reviewed by Steve Falkenburg.
+
+ * WebKit.vcproj/WebKit.sln: Added the following projects to the end of
+ the build order (in first-built to last-built order):
+ InjectedBundleGenerated, InjectedBundle, WebKitTestRunner. Also
+ removed an unnecessary dependency from testapi on WebKit2WebProcess.
+
+2010-07-19 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Roben.
+
+ [Win] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=37930
+
+ Implements support for markerTextForListItem in the Windows port.
+
+ * DOMCoreClasses.cpp:
+ (DOMElement::markerTextForListItem): Added.
+ * DOMCoreClasses.h:
+ * Interfaces/DOMPrivate.idl: Added declaration for markerTextForListItem().
+ * Interfaces/IWebViewPrivate.idl: Added declaration for elementFromJS().
+ * Interfaces/WebKit.idl: Touch it to force a rebuild (and for good luck :-)).
+ * WebView.cpp:
+ (WebView::elementFromJS): Added.
+ * WebView.h:
+
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebCoreSupport/WebEditorClient.cpp:
+ (WebEditorClient::willSetInputMethodState):
+ * WebCoreSupport/WebEditorClient.h:
+
+2010-07-16 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Make JS memory stats available via 'Performance' object (Web Timing).
+ This statistics is populated only if 'WebKitMemoryInfoEnabled'
+ preference is set.
+
+ 'console.memory' is kept until Web Timing object becomes visible by
+ default (currently it is hidden under compile-time flag). These stats
+ are guarded with the same preference.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41617
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::memoryInfoEnabled):
+ (WebPreferences::setMemoryInfoEnabled):
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2010-07-14 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Steve Falkenburg.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42299
+ Correct WinCairo build for new WebKit2 project structure.
+
+ * WebKit.vcproj/WebKit.sln:
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::setCursor):
+ We now need to grab the native cursor out of the WebCore cursor.
+
+ (WebChromeClient::setLastSetCursorToCurrentCursor):
+ Sets the WebView's "last set cursor" to be the current cursor so that
+ the cursor is set correctly for plugins.
+ * WebCoreSupport/WebChromeClient.h:
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::WebViewWndProc):
+ * WebView.h:
+ (WebView::setLastCursor):
+ Change the "last set cursor" to be stored as a member instead of a global.
+
+2010-07-13 Steve Falkenburg <sfalken@apple.com>
+
+ Windows build fix.
+ Make WebKit.sln build WebKit.dll as it used to in the past.
+ (sln is updated to include necessary projects)
+
+ * WebKit.vcproj/WebKit.sln:
+
+2010-07-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Windows build fix
+
+ * Interfaces/WebKit.idl: Touched to force a build
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * Interfaces/IWebDataSource.idl:
+ * WebDataSource.cpp:
+ (WebDataSource::setDeferMainResourceDataLoad):
+ * WebDataSource.h:
+
2010-07-12 Steve Falkenburg <sfalken@apple.com>
Reviewed by Alice Liu.
diff --git a/WebKit/win/DOMCoreClasses.cpp b/WebKit/win/DOMCoreClasses.cpp
index 4e8af61..42e8e63 100644
--- a/WebKit/win/DOMCoreClasses.cpp
+++ b/WebKit/win/DOMCoreClasses.cpp
@@ -48,6 +48,7 @@
#include <WebCore/HTMLTextAreaElement.h>
#include <WebCore/NodeList.h>
#include <WebCore/RenderObject.h>
+#include <WebCore/RenderTreeAsText.h>
#pragma warning(pop)
#include <initguid.h>
@@ -1149,6 +1150,18 @@ HRESULT STDMETHODCALLTYPE DOMElement::renderedImage(HBITMAP* image)
return S_OK;
}
+HRESULT STDMETHODCALLTYPE DOMElement::markerTextForListItem(
+ /* [retval][out] */ BSTR* markerText)
+{
+ if (!markerText)
+ return E_POINTER;
+
+ ASSERT(m_element);
+
+ *markerText = BString(WebCore::markerTextForListItem(m_element)).release();
+ return S_OK;
+}
+
// IDOMElementCSSInlineStyle --------------------------------------------------
HRESULT STDMETHODCALLTYPE DOMElement::style(
diff --git a/WebKit/win/DOMCoreClasses.h b/WebKit/win/DOMCoreClasses.h
index f8a3dbb..c52d933 100644
--- a/WebKit/win/DOMCoreClasses.h
+++ b/WebKit/win/DOMCoreClasses.h
@@ -776,6 +776,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE renderedImage(
/* [retval][out] */ HBITMAP* image);
+ virtual HRESULT STDMETHODCALLTYPE markerTextForListItem(
+ /* [retval][out] */ BSTR* markerText);
+
// IDOMElementCSSInlineStyle
virtual HRESULT STDMETHODCALLTYPE style(
/* [retval][out] */ IDOMCSSStyleDeclaration** result);
diff --git a/WebKit/win/Interfaces/DOMPrivate.idl b/WebKit/win/Interfaces/DOMPrivate.idl
index 3365565..c3bb60e 100644
--- a/WebKit/win/Interfaces/DOMPrivate.idl
+++ b/WebKit/win/Interfaces/DOMPrivate.idl
@@ -47,6 +47,7 @@ interface IDOMElementPrivate : IUnknown
HRESULT innerText([out, retval] BSTR* result);
[local] HRESULT font(WebFontDescription* webFontDescription);
HRESULT renderedImage([out, retval] HBITMAP* image);
+ [local] HRESULT markerTextForListItem([out, retval] BSTR* markerText);
}
/*
diff --git a/WebKit/win/Interfaces/IWebDataSource.idl b/WebKit/win/Interfaces/IWebDataSource.idl
index 15bea1a..dd78d7e 100644
--- a/WebKit/win/Interfaces/IWebDataSource.idl
+++ b/WebKit/win/Interfaces/IWebDataSource.idl
@@ -214,4 +214,5 @@ interface IWebDataSourcePrivate : IUnknown
HRESULT overrideEncoding([out, retval] BSTR* encoding);
HRESULT setOverrideEncoding([in] BSTR encoding);
HRESULT mainDocumentError([out, retval] IWebError** error);
+ HRESULT setDeferMainResourceDataLoad([in] BOOL flag);
}
diff --git a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index 119c3ff..bca8d6f 100644
--- a/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -115,4 +115,7 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT isDNSPrefetchingEnabled([out, retval] BOOL *enabled);
HRESULT setDNSPrefetchingEnabled([in] BOOL enabled);
+
+ HRESULT memoryInfoEnabled([out, retval] BOOL *enabled);
+ HRESULT setMemoryInfoEnabled([in] BOOL enabled);
}
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 352ae7e..0377406 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -237,4 +237,6 @@ interface IWebViewPrivate : IUnknown
HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE dc);
[local] HRESULT reportException([in] JSContextRef context, [in] JSValueRef exception);
+
+ [local] HRESULT elementFromJS([in] JSContextRef context, [in] JSValueRef nodeObject, [out, retval] IDOMElement** element);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index ce2f213..8938501 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -300,4 +300,3 @@ library WebKit
[default] interface IWebUserContentURLPattern;
}
}
-
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index 42e5cc4..73532a6 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -782,21 +782,28 @@ void WebChromeClient::chooseIconForFiles(const Vector<WebCore::String>& filename
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
-bool WebChromeClient::setCursor(PlatformCursorHandle cursor)
+void WebChromeClient::setCursor(const Cursor& cursor)
{
- if (!cursor)
- return false;
+ HCURSOR platformCursor = cursor.platformCursor()->nativeCursor();
+ if (!platformCursor)
+ return;
if (COMPtr<IWebUIDelegate> delegate = uiDelegate()) {
COMPtr<IWebUIDelegatePrivate> delegatePrivate(Query, delegate);
if (delegatePrivate) {
- if (SUCCEEDED(delegatePrivate->webViewSetCursor(m_webView, reinterpret_cast<OLE_HANDLE>(cursor))))
- return true;
+ if (SUCCEEDED(delegatePrivate->webViewSetCursor(m_webView, reinterpret_cast<OLE_HANDLE>(platformCursor))))
+ return;
}
}
- ::SetCursor(cursor);
- return true;
+ m_webView->setLastCursor(platformCursor);
+ ::SetCursor(platformCursor);
+ return;
+}
+
+void WebChromeClient::setLastSetCursorToCurrentCursor()
+{
+ m_webView->setLastCursor(::GetCursor());
}
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
diff --git a/WebKit/win/WebCoreSupport/WebChromeClient.h b/WebKit/win/WebCoreSupport/WebChromeClient.h
index c890af0..e7845a9 100644
--- a/WebKit/win/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/win/WebCoreSupport/WebChromeClient.h
@@ -130,7 +130,8 @@ public:
virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>);
virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
- virtual bool setCursor(WebCore::PlatformCursorHandle cursor);
+ virtual void setCursor(const WebCore::Cursor&);
+ virtual void setLastSetCursorToCurrentCursor();
WebView* webView() const { return m_webView; }
diff --git a/WebKit/win/WebCoreSupport/WebEditorClient.cpp b/WebKit/win/WebCoreSupport/WebEditorClient.cpp
index c9118e5..e05951c 100644
--- a/WebKit/win/WebCoreSupport/WebEditorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebEditorClient.cpp
@@ -776,6 +776,10 @@ void WebEditorClient::getGuessesForWord(const String& word, Vector<String>& gues
}
}
+void WebEditorClient::willSetInputMethodState()
+{
+}
+
void WebEditorClient::setInputMethodState(bool enabled)
{
m_webView->setInputMethodState(enabled);
diff --git a/WebKit/win/WebCoreSupport/WebEditorClient.h b/WebKit/win/WebCoreSupport/WebEditorClient.h
index a29a264..ac2e25e 100644
--- a/WebKit/win/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/win/WebCoreSupport/WebEditorClient.h
@@ -109,6 +109,7 @@ public:
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const WebCore::String&, Vector<WebCore::String>& guesses);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool);
private:
diff --git a/WebKit/win/WebDataSource.cpp b/WebKit/win/WebDataSource.cpp
index 4ec1fd3..566f174 100644
--- a/WebKit/win/WebDataSource.cpp
+++ b/WebKit/win/WebDataSource.cpp
@@ -119,6 +119,16 @@ HRESULT STDMETHODCALLTYPE WebDataSource::mainDocumentError(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebDataSource::setDeferMainResourceDataLoad(
+ /* [in] */ BOOL flag)
+{
+ if (!m_loader)
+ return E_FAIL;
+
+ m_loader->setDeferMainResourceDataLoad(flag);
+ return S_OK;
+}
+
// IUnknown -------------------------------------------------------------------
HRESULT STDMETHODCALLTYPE WebDataSource::QueryInterface(REFIID riid, void** ppvObject)
diff --git a/WebKit/win/WebDataSource.h b/WebKit/win/WebDataSource.h
index 70998ae..3baa024 100644
--- a/WebKit/win/WebDataSource.h
+++ b/WebKit/win/WebDataSource.h
@@ -110,6 +110,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE mainDocumentError(
/* [retval][out] */ IWebError** error);
+ virtual HRESULT STDMETHODCALLTYPE setDeferMainResourceDataLoad(
+ /* [in] */ BOOL flag);
+
// WebDataSource
WebDocumentLoader* documentLoader() const;
protected:
diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln
index 38f4253..b954436 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -1,84 +1,107 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit", "WebKit.vcproj", "{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}"
ProjectSection(ProjectDependencies) = postProject
- {B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vcproj", "{B8437A41-67BC-4769-9452-45203827F821}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"
ProjectSection(ProjectDependencies) = postProject
- {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces.vcproj", "{91762BE2-87EF-4F5A-A480-48B90EB3F406}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
ProjectSection(ProjectDependencies) = postProject
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore\WebCore.vcproj\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"
ProjectSection(ProjectDependencies) = postProject
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2} = {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "..\..\..\WebKitTools\DumpRenderTree\win\DumpRenderTree.vcproj", "{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScriptCore Folder", "JavaScriptCore Folder", "{557FA164-0E39-4DEC-B66C-8795C8E52399}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebCore Folder", "WebCore Folder", "{63FB6F8A-C601-43E3-BD16-A00A465C2CB6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\..\WebCore\WebCore.vcproj\WebCoreGenerated.vcproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}"
ProjectSection(ProjectDependencies) = postProject
- {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "..\..\..\WebKitTools\DumpRenderTree\TestNetscapePlugin\win\TestNetscapePlugin.vcproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QTMovieWin", "..\..\..\WebCore\WebCore.vcproj\QTMovieWin.vcproj", "{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"
ProjectSection(ProjectDependencies) = postProject
- {114FCA11-216B-4C8C-957E-30A75AE80443} = {114FCA11-216B-4C8C-957E-30A75AE80443}
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0A324352-B3B6-496C-9E5B-4C7E923E628B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\testapi\testapi.vcproj", "{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}"
ProjectSection(ProjectDependencies) = postProject
- {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {AA8A5A85-592B-4357-BC60-E0E91E026AF6}
+ {DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsc", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\jsc\jsc.vcproj", "{C59E5129-B453-49B7-A52B-1E104715F76E}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit", "..\..\..\WebKit2\win\WebKit2.vcproj", "{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}"
ProjectSection(ProjectDependencies) = postProject
- {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2} = {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB} = {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebKit2 Folder", "WebKit2 Folder", "{9AB9C96C-9039-4FA9-8F83-BBFC8F8B2182}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit2Generated", "..\..\..\WebKit2\win\WebKit2Generated.vcproj", "{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}"
ProjectSection(ProjectDependencies) = postProject
- {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {0662A8A9-82A3-4638-97D8-EC425D8D87C9}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\..\..\WebKitTools\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKit2WebProcess", "..\..\..\WebKit2\win\WebKit2WebProcess.vcproj", "{AAE88FEF-509E-4D49-870B-7357922C276F}"
ProjectSection(ProjectDependencies) = postProject
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {0662A8A9-82A3-4638-97D8-EC425D8D87C9}
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD} = {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\..\..\WebKitTools\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebKitCOM Folder", "WebKitCOM Folder", "{1D359ACC-BE10-45D7-938B-BC7E4B7AA6CA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces.vcproj", "{91762BE2-87EF-4F5A-A480-48B90EB3F406}"
ProjectSection(ProjectDependencies) = postProject
- {C0737398-3565-439E-A2B8-AB2BE4D5430C} = {C0737398-3565-439E-A2B8-AB2BE4D5430C}
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCoreGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCoreGenerated.vcproj", "{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitLib", "WebKit.vcproj", "{0662A8A9-82A3-4638-97D8-EC425D8D87C9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B8437A41-67BC-4769-9452-45203827F821} = {B8437A41-67BC-4769-9452-45203827F821}
+ EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCoreGenerated", "..\..\..\WebCore\WebCore.vcproj\WebCoreGenerated.vcproj", "{0A324352-B3B6-496C-9E5B-4C7E923E628B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitGUID", "WebKitGUID.vcproj", "{B8437A41-67BC-4769-9452-45203827F821}"
ProjectSection(ProjectDependencies) = postProject
- {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {91762BE2-87EF-4F5A-A480-48B90EB3F406}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QTMovieWin", "..\..\..\WebCore\WebCore.vcproj\QTMovieWin.vcproj", "{E498CA9D-3BD2-4D52-8E37-C8DC76526325}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebKitTools", "WebKitTools", "{62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "..\..\..\WebKitTools\DumpRenderTree\win\DumpRenderTree.vcproj", "{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
ProjectSection(ProjectDependencies) = postProject
- {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {0A324352-B3B6-496C-9E5B-4C7E923E628B}
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinLauncher", "..\..\..\WebKitTools\WinLauncher\WinLauncher.vcproj", "{114FCA11-216B-4C8C-957E-30A75AE80443}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\..\..\WebKitTools\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
ProjectSection(ProjectDependencies) = postProject
- {C59E5129-B453-49B7-A52B-1E104715F76E} = {C59E5129-B453-49B7-A52B-1E104715F76E}
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C} = {C0737398-3565-439E-A2B8-AB2BE4D5430C}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testapi", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\testapi\testapi.vcproj", "{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\..\..\WebKitTools\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
ProjectSection(ProjectDependencies) = postProject
- {DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
+ {AAE88FEF-509E-4D49-870B-7357922C276F} = {AAE88FEF-509E-4D49-870B-7357922C276F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "record-memory-win", "..\..\..\WebKitTools\record-memory-win\record-memory-win.vcproj", "{44B9C152-1870-4035-B94D-7B3285AA0C12}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D09806DB-E58B-4646-8C9B-61101906C1E2} = {D09806DB-E58B-4646-8C9B-61101906C1E2}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "..\..\..\WebKitTools\DumpRenderTree\TestNetscapePlugIn\win\TestNetscapePlugin.vcproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {114FCA11-216B-4C8C-957E-30A75AE80443} = {114FCA11-216B-4C8C-957E-30A75AE80443}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitAPITest", "..\..\..\WebKitTools\WebKitAPITest\WebKitAPITest.vcproj", "{626089A3-25D3-4883-A96C-B8C66E036397}"
ProjectSection(ProjectDependencies) = postProject
@@ -90,166 +113,382 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitLauncherWin", "..\..\
{626089A3-25D3-4883-A96C-B8C66E036397} = {626089A3-25D3-4883-A96C-B8C66E036397}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinLauncher", "..\..\..\WebKitTools\WinLauncher\WinLauncher.vcproj", "{114FCA11-216B-4C8C-957E-30A75AE80443}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C59E5129-B453-49B7-A52B-1E104715F76E} = {C59E5129-B453-49B7-A52B-1E104715F76E}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "..\..\..\WebKitTools\WebKitTestRunner\InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundleGenerated", "..\..\..\WebKitTools\WebKitTestRunner\win\InjectedBundleGenerated.vcproj", "{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {44B9C152-1870-4035-B94D-7B3285AA0C12} = {44B9C152-1870-4035-B94D-7B3285AA0C12}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "..\..\..\WebKitTools\WebKitTestRunner\win\WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MiniBrowser", "..\..\..\WebKitTools\MiniBrowser\MiniBrowser.vcproj", "{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}"
+ ProjectSection(ProjectDependencies) = postProject
+ {3B99669B-1817-443B-BCBE-835580146668} = {3B99669B-1817-443B-BCBE-835580146668}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_All|Win32 = Debug_All|Win32
Debug_Cairo|Win32 = Debug_Cairo|Win32
+ Debug_Internal|Win32 = Debug_Internal|Win32
Debug|Win32 = Debug|Win32
Release_Cairo|Win32 = Release_Cairo|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
- {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
- {B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
- {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
- {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
- {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.ActiveCfg = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug|Win32.Build.0 = Debug|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.Build.0 = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Debug|Win32.Build.0 = Debug|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Internal|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.ActiveCfg = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.Build.0 = cairo|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Internal|Win32.Build.0 = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug|Win32.Build.0 = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.ActiveCfg = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = all|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.ActiveCfg = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.Build.0 = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.Build.0 = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
- {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.ActiveCfg = Debug|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug|Win32.Build.0 = Debug|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.ActiveCfg = Release|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.Build.0 = Release|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug|Win32.Build.0 = Debug|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release|Win32.ActiveCfg = Release|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release|Win32.Build.0 = Release|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_All|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_All|Win32.Build.0 = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_Internal|Win32.Build.0 = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug|Win32.Build.0 = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release_Cairo|Win32.Build.0 = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release|Win32.Build.0 = all|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Debug|Win32.Build.0 = Debug|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Release|Win32.ActiveCfg = Release|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.Release|Win32.Build.0 = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Internal|Win32.Build.0 = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.ActiveCfg = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug|Win32.Build.0 = Debug|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug|Win32.Build.0 = Debug|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Debug|Win32.Build.0 = Debug|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.ActiveCfg = Release_Cairo|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.Build.0 = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Internal|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.Build.0 = Release|Win32
- {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.ActiveCfg = Debug_Internal|Win32
- {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.Build.0 = Debug_Internal|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.ActiveCfg = Debug|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Debug|Win32.Build.0 = Debug|Win32
- {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.ActiveCfg = Debug|Win32
- {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.Build.0 = Debug|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.ActiveCfg = Debug|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.Build.0 = Debug|Win32
+ {D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_All|Win32.ActiveCfg = Release|Win32
+ {D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_All|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_Cairo|Win32.Build.0 = Release|Win32
+ {D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_Internal|Win32.ActiveCfg = Release|Win32
+ {D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_Internal|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug|Win32.ActiveCfg = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release_Cairo|Win32.ActiveCfg = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release_Cairo|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release|Win32.ActiveCfg = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release|Win32.Build.0 = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.ActiveCfg = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release_Cairo|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = all|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug|Win32.Build.0 = Debug|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.ActiveCfg = Release|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.Build.0 = Release|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release|Win32.ActiveCfg = Release|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6} = {557FA164-0E39-4DEC-B66C-8795C8E52399}
+ {C59E5129-B453-49B7-A52B-1E104715F76E} = {557FA164-0E39-4DEC-B66C-8795C8E52399}
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {557FA164-0E39-4DEC-B66C-8795C8E52399}
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A} = {557FA164-0E39-4DEC-B66C-8795C8E52399}
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2} = {557FA164-0E39-4DEC-B66C-8795C8E52399}
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {63FB6F8A-C601-43E3-BD16-A00A465C2CB6}
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B} = {63FB6F8A-C601-43E3-BD16-A00A465C2CB6}
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {63FB6F8A-C601-43E3-BD16-A00A465C2CB6}
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD} = {9AB9C96C-9039-4FA9-8F83-BBFC8F8B2182}
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB} = {9AB9C96C-9039-4FA9-8F83-BBFC8F8B2182}
+ {AAE88FEF-509E-4D49-870B-7357922C276F} = {9AB9C96C-9039-4FA9-8F83-BBFC8F8B2182}
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406} = {1D359ACC-BE10-45D7-938B-BC7E4B7AA6CA}
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9} = {1D359ACC-BE10-45D7-938B-BC7E4B7AA6CA}
+ {B8437A41-67BC-4769-9452-45203827F821} = {1D359ACC-BE10-45D7-938B-BC7E4B7AA6CA}
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {DA31DA52-6675-48D4-89E0-333A7144397C} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {44B9C152-1870-4035-B94D-7B3285AA0C12} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {626089A3-25D3-4883-A96C-B8C66E036397} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {D09806DB-E58B-4646-8C9B-61101906C1E2} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {114FCA11-216B-4C8C-957E-30A75AE80443} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {3B99669B-1817-443B-BCBE-835580146668} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ EndGlobalSection
EndGlobal
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj
index 7316805..50f5921 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj
@@ -46,7 +46,7 @@
PrecompiledHeaderThrough="WebKitPrefix.h"
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
- ForcedIncludeFiles="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h;ICUVersion.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -111,7 +111,7 @@
PrecompiledHeaderThrough="WebKitPrefix.h"
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
- ForcedIncludeFiles="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h;ICUVersion.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -176,7 +176,7 @@
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
Detect64BitPortabilityProblems="false"
DisableSpecificWarnings="4819"
- ForcedIncludeFiles="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h;ICUVersion.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -240,7 +240,7 @@
PrecompiledHeaderThrough="WebKitPrefix.h"
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
- ForcedIncludeFiles="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h;ICUVersion.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -306,7 +306,7 @@
PrecompiledHeaderThrough="WebKitPrefix.h"
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
DisableSpecificWarnings="4819"
- ForcedIncludeFiles="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h;ICUVersion.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -371,7 +371,7 @@
ProgramDataBaseFileName="$(OutDir)\$(TargetName).vc80.pdb"
Detect64BitPortabilityProblems="false"
DisableSpecificWarnings="4819"
- ForcedIncludeFiles="WebKitPrefix.h"
+ ForcedIncludeFiles="WebKitPrefix.h;ICUVersion.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
diff --git a/WebKit/win/WebPreferenceKeysPrivate.h b/WebKit/win/WebPreferenceKeysPrivate.h
index 40c86c0..f62905c 100644
--- a/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/WebKit/win/WebPreferenceKeysPrivate.h
@@ -145,3 +145,5 @@
#define WebKitCustomDragCursorsEnabledPreferenceKey "WebKitCustomDragCursorsEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey "WebKitDNSPrefetchingEnabled"
+
+#define WebKitMemoryInfoEnabledPreferenceKey "WebKitMemoryInfoEnabled"
diff --git a/WebKit/win/WebPreferences.cpp b/WebKit/win/WebPreferences.cpp
index 12b0a72..a1055cb 100644
--- a/WebKit/win/WebPreferences.cpp
+++ b/WebKit/win/WebPreferences.cpp
@@ -263,6 +263,8 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitDNSPrefetchingEnabledPreferenceKey), kCFBooleanTrue);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitMemoryInfoEnabledPreferenceKey), kCFBooleanFalse);
+
defaultSettings = defaults;
}
@@ -1485,6 +1487,18 @@ HRESULT WebPreferences::isDNSPrefetchingEnabled(BOOL* enabled)
return S_OK;
}
+HRESULT WebPreferences::memoryInfoEnabled(BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitMemoryInfoEnabledPreferenceKey));
+ return S_OK;
+}
+
+HRESULT WebPreferences::setMemoryInfoEnabled(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitMemoryInfoEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
void WebPreferences::willAddToWebView()
{
++m_numWebViews;
diff --git a/WebKit/win/WebPreferences.h b/WebKit/win/WebPreferences.h
index fc57241..463e1b3 100644
--- a/WebKit/win/WebPreferences.h
+++ b/WebKit/win/WebPreferences.h
@@ -423,6 +423,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE setDNSPrefetchingEnabled(BOOL);
virtual HRESULT STDMETHODCALLTYPE isDNSPrefetchingEnabled(BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setMemoryInfoEnabled(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE memoryInfoEnabled(BOOL*);
+
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index b5c4fa8..fb0aad5 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -95,6 +95,7 @@
#include <WebCore/HitTestRequest.h>
#include <WebCore/HitTestResult.h>
#include <WebCore/IntRect.h>
+#include <WebCore/JSElement.h>
#include <WebCore/KeyboardEvent.h>
#include <WebCore/Language.h>
#include <WebCore/Logging.h>
@@ -112,6 +113,7 @@
#include <WebCore/ProgressTracker.h>
#include <WebCore/RenderLayer.h>
#include <WebCore/RenderTheme.h>
+#include <WebCore/RenderTreeAsText.h>
#include <WebCore/RenderView.h>
#include <WebCore/RenderWidget.h>
#include <WebCore/ResourceHandle.h>
@@ -344,6 +346,7 @@ WebView::WebView()
, m_isAcceleratedCompositing(false)
#endif
, m_nextDisplayIsSynchronous(false)
+ , m_lastSetCursor(0)
{
JSC::initializeThreading();
WTF::initializeMainThread();
@@ -1972,10 +1975,6 @@ bool WebView::registerWebViewWindowClass()
return !!RegisterClassEx(&wcex);
}
-namespace WebCore {
- extern HCURSOR lastSetCursor;
-}
-
static HWND findTopLevelParent(HWND window)
{
if (!window)
@@ -2250,10 +2249,8 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
}
break;
case WM_SETCURSOR:
- if (handled = webView->page()->chrome()->setCursor(lastSetCursor))
- break;
-
- __fallthrough;
+ handled = ::SetCursor(webView->m_lastSetCursor);
+ break;
case WM_VSCROLL:
handled = webView->verticalScroll(wParam, lParam);
break;
@@ -4750,6 +4747,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setDNSPrefetchingEnabled(enabled);
+ hr = prefsPrivate->memoryInfoEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setMemoryInfoEnabled(enabled);
+
if (!m_closeWindowTimer)
m_mainFrame->invalidate(); // FIXME
@@ -5667,6 +5669,31 @@ HRESULT STDMETHODCALLTYPE WebView::reportException(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebView::elementFromJS(
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSValueRef nodeObject,
+ /* [retval][out] */ IDOMElement **element)
+{
+ if (!element)
+ return E_POINTER;
+
+ *element = 0;
+
+ if (!context)
+ return E_FAIL;
+
+ if (!nodeObject)
+ return E_FAIL;
+
+ JSLock lock(JSC::SilenceAssertionsOnly);
+ Element* elt = toElement(toJS(toJS(context), nodeObject));
+ if (!elt)
+ return E_FAIL;
+
+ *element = DOMElement::createInstance(elt);
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebView::setCustomHTMLTokenizerTimeDelay(
/* [in] */ double timeDelay)
{
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 514f376..c7e7605 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -706,6 +706,11 @@ public:
/* [in] */ JSContextRef context,
/* [in] */ JSValueRef exception);
+ virtual HRESULT STDMETHODCALLTYPE elementFromJS(
+ /* [in] */ JSContextRef context,
+ /* [in] */ JSValueRef nodeObject,
+ /* [retval][out] */ IDOMElement **element);
+
virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerTimeDelay(
/* [in] */ double timeDelay);
@@ -903,6 +908,8 @@ public:
void enterFullscreenForNode(WebCore::Node*);
void exitFullscreen();
+ void setLastCursor(HCURSOR cursor) { m_lastSetCursor = cursor; }
+
private:
void setZoomMultiplier(float multiplier, bool isTextOnly);
float zoomMultiplier(bool isTextOnly);
@@ -1042,6 +1049,8 @@ protected:
#endif
bool m_nextDisplayIsSynchronous;
+
+ HCURSOR m_lastSetCursor;
};
#endif
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 9d89858..32ff6fe 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-16 Zhe Su <suzhe@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
+ https://bugs.webkit.org/show_bug.cgi?id=42253
+
+ Dummy implementation of EditorClient::willSetInputMethodState.
+
+ * WebKitSupport/EditorClientWx.cpp:
+ (WebCore::EditorClientWx::willSetInputMethodState):
+ * WebKitSupport/EditorClientWx.h:
+
+2010-07-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
+ Make changing Cursors work in WebKit2.
+
+ * WebKitSupport/ChromeClientWx.cpp:
+ (WebCore::ChromeClientWx::setCursor):
+ * WebKitSupport/ChromeClientWx.h:
+ Change prototype to match new one.
+
2010-07-07 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix after change in Page constructor.
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
index a19644d..d81a20c 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
@@ -447,10 +447,9 @@ void ChromeClientWx::chooseIconForFiles(const Vector<String>& filenames, FileCho
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
-bool ChromeClientWx::setCursor(PlatformCursorHandle)
+void ChromeClientWx::setCursor(const Cursor&)
{
notImplemented();
- return false;
}
void ChromeClientWx::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
diff --git a/WebKit/wx/WebKitSupport/ChromeClientWx.h b/WebKit/wx/WebKitSupport/ChromeClientWx.h
index b900f3e..4b156ed 100644
--- a/WebKit/wx/WebKitSupport/ChromeClientWx.h
+++ b/WebKit/wx/WebKitSupport/ChromeClientWx.h
@@ -134,7 +134,7 @@ public:
virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
- virtual bool setCursor(PlatformCursorHandle);
+ virtual void setCursor(const Cursor&);
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
index 627ebf9..2355141 100644
--- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
@@ -538,6 +538,11 @@ String EditorClientWx::getAutoCorrectSuggestionForMisspelledWord(const WebCore::
return String();
}
+void EditorClientWx::willSetInputMethodState()
+{
+ notImplemented();
+}
+
void EditorClientWx::setInputMethodState(bool enabled)
{
notImplemented();
diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.h b/WebKit/wx/WebKitSupport/EditorClientWx.h
index 93cf961..8d69e36 100644
--- a/WebKit/wx/WebKitSupport/EditorClientWx.h
+++ b/WebKit/wx/WebKitSupport/EditorClientWx.h
@@ -110,6 +110,7 @@ public:
virtual void getGuessesForWord(const String&, Vector<String>& guesses);
virtual String getAutoCorrectSuggestionForMisspelledWord(const WebCore::String&);
+ virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
private:
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
index bda3921..93f1c11 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
@@ -1,8 +1,6 @@
{
"slaves": [ { "name": "test-slave", "platform": "*" },
- { "name": "bdash-slave-2", "platform": "mac-tiger" },
-
{ "name": "apple-xserve-1", "platform": "mac-leopard" },
{ "name": "apple-xserve-2", "platform": "mac-leopard" },
{ "name": "apple-xserve-3", "platform": "mac-leopard" },
@@ -46,12 +44,7 @@
{ "name": "google-new-tests", "platform": "mac-leopard" }
],
- "builders": [ { "name": "Tiger Intel Release", "type": "BuildAndTest", "builddir": "tiger-intel-release",
- "platform": "mac-tiger", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["bdash-slave-2", "test-slave"]
- },
-
- { "name": "Leopard Intel Release (Build)", "type": "Build", "builddir": "leopard-intel-release",
+ "builders": [ { "name": "Leopard Intel Release (Build)", "type": "Build", "builddir": "leopard-intel-release",
"platform": "mac-leopard", "configuration": "release", "architectures": ["i386"],
"triggers": ["leopard-intel-release-tests"],
"slavenames": ["apple-xserve-1", "apple-xserve-2", "test-slave"]
@@ -193,7 +186,7 @@
],
"schedulers": [ { "type": "AnyBranchScheduler", "name": "trunk", "branches": ["trunk"], "treeStableTimer": 45.0,
- "builderNames": ["Tiger Intel Release", "Leopard Intel Release (Build)", "Leopard Intel Debug (Build)",
+ "builderNames": ["Leopard Intel Release (Build)", "Leopard Intel Debug (Build)",
"SnowLeopard Intel Release (Build)", "SnowLeopard Intel Leaks",
"Windows Release (Build)", "Windows Debug (Build)",
"GTK Linux 32-bit Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug", "GTK Linux 64-bit Release",
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index c36c5c7..e1eaa71 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -65,7 +65,7 @@ class InstallChromiumDependencies(shell.ShellCommand):
name = "gclient"
description = ["updating chromium dependencies"]
descriptionDone = ["updated chromium dependencies"]
- command = ["perl", "./WebKitTools/Scripts/update-webkit-chromium"]
+ command = ["perl", "./WebKitTools/Scripts/update-webkit-chromium", "--force"]
haltOnFailure = True
@@ -238,7 +238,7 @@ class RunWebKitTests(shell.Test):
class NewRunWebKitTests(RunWebKitTests):
- command = ["perl", "./WebKitTools/Scripts/new-run-webkit-tests", "--noshow-results",
+ command = ["python", "./WebKitTools/Scripts/new-run-webkit-tests", "--noshow-results",
"--verbose", "--results-directory", "layout-test-results",
WithProperties("--%(configuration)s"), "--use-drt"]
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html
index d819cc7..c6d2343 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/public_html/index.html
@@ -18,6 +18,7 @@
<li><a href="buildslaves">Buildslave</a> information</li>
<li><a href="http://webkit-commit-queue.appspot.com/">Commit Queue Status</a> information.</li>
<li><a href="changes">ChangeSource</a> information.</li>
+ <li><a href="results">Test Results</a></li>
</ul>
</body> </html>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index b6233c4..1423d88 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,1180 @@
+2010-07-21 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix, adding the WebCore/bindings/generic dir to the list of build dirs.
+
+ * wx/build/settings.py:
+
+2010-07-21 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
+ WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ (WTR::InjectedBundlePage::_willAddMessageToConsole):
+ (WTR::InjectedBundlePage::_willSetStatusbarText):
+ (WTR::InjectedBundlePage::_willRunJavaScriptAlert):
+ (WTR::InjectedBundlePage::_willRunJavaScriptConfirm):
+ (WTR::InjectedBundlePage::_willRunJavaScriptPrompt):
+ (WTR::InjectedBundlePage::willAddMessageToConsole):
+ (WTR::InjectedBundlePage::willSetStatusbarText):
+ (WTR::InjectedBundlePage::willRunJavaScriptAlert):
+ (WTR::InjectedBundlePage::willRunJavaScriptConfirm):
+ (WTR::InjectedBundlePage::willRunJavaScriptPrompt):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Give InjectedBundle our standard set of configurations (minus the
+ *_Cairo variants)
+
+ InjectedBundle's Debug_All configuration was the same as is Debug
+ configuration, and it was missing a Debug_Internal configuration.
+
+ Fixes <http://webkit.org/b/42749> InjectedBundle's build
+ configurations are screwy
+
+ Reviewed by Darin Adler.
+
+ * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: Added
+ debug_internal.vsprops and debug_all.vsprops to the Debug_All
+ configuration. Added a Debug_Internal configuration.
+
+ * WebKitTestRunner/WebKitTestRunner.sln: Build the Debug_Internal
+ variant of InjectedBundle when we're using the Debug_Internal solution
+ configuration.
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Move InjectedBundle's settings to a vsprops file
+
+ This will make it easier to change settings for all configurations,
+ and to add new configurations.
+
+ Fixes <http://webkit.org/b/42748> InjectedBundle should use vsprops
+ files
+
+ Reviewed by Darin Adler.
+
+ * WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops: Added.
+ Moved settings here...
+ * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: ...from
+ here.
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Give MiniBrowser our standard set of configurations (minus the *_Cairo
+ variants)
+
+ MiniBrowser already had a configuration called "Release", but it was
+ using mostly the same settings as Debug. And its Debug configuration
+ was using the settings that Debug_Internal should be using.
+
+ Fixes <http://webkit.org/b/42746> MiniBrowser's build configurations
+ are screwy
+
+ Reviewed by Darin Adler.
+
+ * MiniBrowser/MiniBrowser.vcproj: Removed debug_internal.vsprops from
+ the Debug configuration. Remove debug.vsprops and
+ debug_internal.vsprops from the Release configuration and replace them
+ with release.vsprops. Added Debug_Internal and Debug_All
+ configurations.
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Move MiniBrowser's settings to a vsprops file
+
+ This will make it easier to change settings for all configurations,
+ and to add new configurations.
+
+ MiniBrowser should use vsprops files
+ https://bugs.webkit.org/show_bug.cgi?id=42745
+
+ Reviewed by Darin Adler.
+
+ * MiniBrowser/Configurations/MiniBrowserCommon.vsprops: Added. Moved
+ settings here...
+ * MiniBrowser/MiniBrowser.vcproj: ...from here.
+
+2010-07-21 Adam Roben <aroben@apple.com>
+
+ Fix compiler warnings when building MiniBrowser
+
+ Also cleaned up the .vcproj a bit.
+
+ Fixes <http://webkit.org/b/42743>.
+
+ Reviewed by Darin Adler.
+
+ * MiniBrowser/MiniBrowser.vcproj: Removed all settings that are
+ already defined in .vsprops files. This also fixes a warning about
+ /EDITANDCONTINUE being incompatible with /SAFESEH.
+
+ * MiniBrowser/win/MiniBrowser.rc: Replaced afxres.h with winresrc.h so
+ that we stop getting warnings about ID_FILE_OPEN and ID_FILE_CLOSE
+ being redefined. (I think this will also get us closer to building
+ with VC++ Express.)
+
+2010-07-20 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Jon Honeycutt.
+
+ Fix obvious typo.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::setStatusbarText): Need to call ->data() to actually get the string value.
+
+2010-07-20 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] by default, dumpAsText should disable pixel results
+ https://bugs.webkit.org/show_bug.cgi?id=42715
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::dumpAsText): disable pixel results, but allow JS to override
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * MiniBrowser/MiniBrowser.vcproj: Link against the new, shiny
+ WebKit.lib instead of the old, dusty WebKit2.lib.
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Stop linking WebKitTestRunner against getopt
+
+ Use of getopt was removed in r63700.
+
+ Fixes <http://webkit.org/b/42714> WebKitTestRunner links against
+ getopt, but doesn't need to
+
+ Reviewed by Sam Weinig.
+
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj: Removed getopt.lib
+ from all configurations.
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Make run-webkit-tests --webkit-test-runner "work" on Windows
+
+ WebKitTestRunner crashes on launch, but at least the scripts build and
+ launch it!
+
+ Fixes <http://webkit.org/b/42709> run-webkit-tests
+ --webkit-test-runner bails with an error on Windows
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/build-webkittestrunner: Build WebKitTestRunner.sln on
+ Windows.
+ * WebKitTestRunner/WebKitTestRunner.sln: Added. Contains the following
+ projects (from first-built to last-built): FindSafari, ImageDiff,
+ InjectedBundleGenerated, InjectedBundle, WebKitTestRunner.
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Change build-webkit back to building WebKit.sln on Windows
+
+ WebKit.sln builds all the same projects as WebKit2.sln, and the latter
+ is being removed.
+
+ Rubber-stamped in advance by Steve Falkenburg.
+
+ * Scripts/build-webkit:
+
+2010-07-20 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * MiniBrowser/win/BrowserWindow.cpp: Added missing #include.
+
+2010-07-20 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ WebScriptObject Should Allow Safely Checking For Key Existence
+ https://bugs.webkit.org/show_bug.cgi?id=42613
+
+ Normal ObjCController workflow for a WebScriptObject test.
+
+ * DumpRenderTree/mac/ObjCController.m:
+ (+[ObjCController isSelectorExcludedFromWebScript:]):
+ (+[ObjCController webScriptNameForSelector:]):
+ (-[ObjCController testHasWebScriptKey:]):
+
+2010-07-20 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42118
+ Disable compositing/webgl tests if WebGL is not enabled
+
+ * Scripts/old-run-webkit-tests:
+
+2010-07-20 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Print additional information about exception if failed to connect to apache (in verbose mode).
+ https://bugs.webkit.org/show_bug.cgi?id=42627
+
+ * Scripts/webkitpy/layout_tests/port/http_server_base.py:
+
+2010-07-20 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] only pass --force to gclient sync if explicitly stated
+ https://bugs.webkit.org/show_bug.cgi?id=42581
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg: bots should
+ always pass --force since it's hard to do manual cleanups
+ * Scripts/update-webkit-chromium: only pass --force if --force is
+ passed in
+
+2010-07-19 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ Paths of generated files should be relative to the build product.
+
+2010-07-19 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Adam Roben.
+
+ [Win] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=37930
+
+ Implements DRT support for markerTextForListItem in the Windows port.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::markerTextForListItem): Implemented.
+
+2010-07-19 Jessie Berlin <jberlin@apple.com>
+
+ Windows build fix. Unreviewed.
+
+ * WebKitTestRunner/win/TestControllerWin.cpp:
+ (WTR::TestController::initializeTestPluginPath):
+
+2010-07-19 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Jon Honeycutt.
+
+ Remove dependency on getopt from WebKitTestRunner.
+
+ - Simplify options parsing and eliminate unused options.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController):
+ (WTR::TestController::initialize):
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::testPluginPath):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/mac/TestControllerMac.mm:
+ (WTR::TestController::platformInitialize):
+ (WTR::TestController::initializeTestPluginPath):
+ * WebKitTestRunner/win/TestControllerWin.cpp:
+ (WTR::TestController::platformInitialize):
+ (WTR::TestController::initializeTestPluginPath):
+
+2010-07-19 Diego Gonzalez <diegohcg@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] MiniBrowser: Progress indication at address bar
+ https://bugs.webkit.org/show_bug.cgi?id=42565
+
+ Make possible to see load progress at address bar based on
+ QtTestBrowser solution
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::loadProgress):
+ * MiniBrowser/qt/BrowserWindow.h:
+
+2010-07-19 Diego Gonzalez <diegohcg@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Add MiniBrowser features: urlChanged, titleChanged and from user input load
+ https://bugs.webkit.org/show_bug.cgi?id=42564
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserView::load):
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::titleChanged):
+ (BrowserWindow::urlChanged):
+ * MiniBrowser/qt/BrowserWindow.h:
+
+2010-07-19 Sam Weinig <weinig@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42532
+ Auto-generate the JS bindings for WebKitTestRunner's script objects.
+
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+ * WebKitTestRunner/DerivedSources.make: Added.
+ * WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h: Added.
+ * WebKitTestRunner/InjectedBundle/Bindings: Added.
+ * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Added.
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: Added.
+ (WTR::JSWrappable::~JSWrappable):
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: Added.
+ (WTR::JSWrapper::wrap):
+ (WTR::JSWrapper::unwrap):
+ (WTR::unwrapObject):
+ (WTR::JSWrapper::initialize):
+ (WTR::JSWrapper::finalize):
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: Added.
+ (WTR::toJS):
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Added.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dump):
+ (WTR::InjectedBundlePage::setStatusbarText):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::wrapperClass):
+ (WTR::LayoutTestController::waitUntilDone):
+ (WTR::LayoutTestController::makeWindowObject):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ (WTR::LayoutTestController::shouldDumpAsText):
+ (WTR::LayoutTestController::dumpAsText):
+ (WTR::LayoutTestController::shouldDumpStatusCallbacks):
+ (WTR::LayoutTestController::dumpStatusCallbacks):
+ (WTR::LayoutTestController::waitToDump):
+ (WTR::LayoutTestController::testRepaint):
+ (WTR::LayoutTestController::repaintSweepHorizontally):
+ * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj:
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/win/InjectedBundleGenerated.vcproj: Added.
+ * WebKitTestRunner/win/build-generated-files.sh: Added.
+
+2010-07-19 Mark Rowe <mrowe@apple.com>
+
+ Clean up the buildbot configuration a little.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2010-07-19 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42118
+ Disable WebGL on Leopard for now.
+
+ LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
+ GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
+ SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
+ software OpenGL driver on machines without this support.
+
+ * Scripts/build-webkit:
+
+2010-07-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Fix MiniBrowser to update URL as you browse
+ https://bugs.webkit.org/show_bug.cgi?id=42591
+
+ Hook up various loading notifications to update the URL bar in MiniBrowser.
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (_didStartProvisionalLoadForFrame):
+ (_didReceiveServerRedirectForProvisionalLoadForFrame):
+ (_didFailProvisionalLoadWithErrorForFrame):
+ (_didCommitLoadForFrame):
+ (_didFailLoadWithErrorForFrame):
+ (-[BrowserWindowController updateProvisionalURLForFrame:]):
+ (-[BrowserWindowController didStartProvisionalLoadForFrame:]):
+ (-[BrowserWindowController didReceiveServerRedirectForProvisionalLoadForFrame:]):
+ (-[BrowserWindowController didFailProvisionalLoadWithErrorForFrame:]):
+ (-[BrowserWindowController didFailLoadWithErrorForFrame:]):
+ (-[BrowserWindowController didCommitLoadForFrame:]):
+
+2010-07-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42586
+ Log all canceled authentication attempts in DumpRenderTree
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::didReceiveAuthenticationChallenge):
+ It's important to know whether an auth sheet appeared. Added logging to "no preset credentials"
+ case.
+
+2010-07-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63671.
+ http://trac.webkit.org/changeset/63671
+ https://bugs.webkit.org/show_bug.cgi?id=42575
+
+ broke windows (Requested by weinig on #webkit).
+
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+ * WebKitTestRunner/DerivedSources.make: Removed.
+ * WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h: Removed.
+ * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Removed.
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: Removed.
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: Removed.
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: Removed.
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Removed.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dump):
+ (WTR::InjectedBundlePage::setStatusbarText):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::setWaitToDump):
+ (WTR::displayCallback):
+ (WTR::dumpAsTextCallback):
+ (WTR::dumpStatusCallbacksCallback):
+ (WTR::waitUntilDoneCallback):
+ (WTR::notifyDoneCallback):
+ (WTR::numberOfActiveAnimationsCallback):
+ (WTR::pauseAnimationAtTimeOnElementWithIdCallback):
+ (WTR::repaintSweepHorizontallyCallback):
+ (WTR::testRepaintCallback):
+ (WTR::layoutTestControllerObjectFinalize):
+ (WTR::LayoutTestController::makeWindowObject):
+ (WTR::LayoutTestController::getJSClass):
+ (WTR::LayoutTestController::staticFunctions):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ (WTR::LayoutTestController::dumpAsText):
+ (WTR::LayoutTestController::setDumpAsText):
+ (WTR::LayoutTestController::dumpStatusCallbacks):
+ (WTR::LayoutTestController::setDumpStatusCallbacks):
+ (WTR::LayoutTestController::setTestRepaint):
+ (WTR::LayoutTestController::setTestRepaintSweepHorizontally):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
+2010-07-19 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42532
+ Auto-generate the JS bindings for WebKitTestRunner's script objects.
+
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+ * WebKitTestRunner/DerivedSources.make: Added.
+ * WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h: Added.
+ * WebKitTestRunner/InjectedBundle/Bindings: Added.
+ * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: Added.
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h: Added.
+ (WTR::JSWrappable::~JSWrappable):
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp: Added.
+ (WTR::JSWrapper::wrap):
+ (WTR::JSWrapper::unwrap):
+ (WTR::unwrapObject):
+ (WTR::JSWrapper::initialize):
+ (WTR::JSWrapper::finalize):
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h: Added.
+ (WTR::toJS):
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Added.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dump):
+ (WTR::InjectedBundlePage::setStatusbarText):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::wrapperClass):
+ (WTR::LayoutTestController::waitUntilDone):
+ (WTR::LayoutTestController::makeWindowObject):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ (WTR::LayoutTestController::shouldDumpAsText):
+ (WTR::LayoutTestController::dumpAsText):
+ (WTR::LayoutTestController::shouldDumpStatusCallbacks):
+ (WTR::LayoutTestController::dumpStatusCallbacks):
+ (WTR::LayoutTestController::waitToDump):
+ (WTR::LayoutTestController::testRepaint):
+ (WTR::LayoutTestController::repaintSweepHorizontally):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
+2010-07-19 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ fix chromium linux compile on ubuntu maverick
+ https://bugs.webkit.org/show_bug.cgi?id=42528
+
+ * Scripts/webkitdirs.pm: add a chomp to eat a newline that breaks the make command line
+
+2010-07-19 Adam Roben <aroben@apple.com>
+
+ When dumping a response's MIME type, print its URL's last path
+ component rather than its suitable-for-test-result form
+
+ This matches the Mac behavior.
+
+ Fixes <http://webkit.org/b/42276>
+ http/tests/loading/preload-slow-loading.php and
+ http/tests/mime/uppercase-mime-type.html fail on Windows
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult): Moved code to actually extract the last
+ path component from here...
+ (lastPathComponent): ...to here.
+
+ * DumpRenderTree/win/DumpRenderTreeWin.h: Added lastPathComponent.
+
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::didReceiveResponse): Use the URL's last path
+ component, rather than its suitable-for-test-result form, to match
+ Mac.
+
+2010-07-19 Anders carlsson <andersca@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2 does not have application cache
+ https://bugs.webkit.org/show_bug.cgi?id=42552
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::resetPreferencesToConsistentValues):
+ Set up default preferences. Right now just enables the web application cache.
+
+ (WTR::TestInvocation::invoke):
+ Call resetPreferencesToConsistentValues.
+
+ * WebKitTestRunner/TestInvocation.h:
+
+2010-07-19 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ Fix NewRunWebKitTests to work on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=41180
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ Specifying python explicitly.
+
+2010-07-18 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add dumping of statusbar text to WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=42516
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ (WTR::InjectedBundlePage::_setStatusbarText):
+ (WTR::InjectedBundlePage::setStatusbarText):
+ Dump the statusbar text.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::LayoutTestController):
+ Initialize m_dumpStatusCallbacks to false.
+
+ (WTR::dumpStatusCallbacksCallback):
+ Implement JSC callback.
+
+ (WTR::LayoutTestController::staticFunctions):
+ Add dumpStatusCallbacks.
+
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ (WTR::LayoutTestController::dumpStatusCallbacks):
+ (WTR::LayoutTestController::setDumpStatusCallbacks):
+ Add setter and getter for m_dumpStatusCallbacks.
+
+2010-07-17 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ Get the test plug-in path and set it on the context.
+
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/mac/TestControllerMac.mm:
+ (WTR::TestController::initializeInjectedBundlePath):
+ Simplify this code by using NSBundle.
+
+ (WTR::TestController::testPluginPath):
+ Return the test plug-in path.
+
+ * WebKitTestRunner/win/TestControllerWin.cpp:
+ (WTR::TestController::testPluginPath):
+ Ditto.
+
+2010-07-16 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Teach webkitpy about queues.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=42492
+
+ * Scripts/webkitpy/common/net/statusserver.py:
+
+2010-07-16 Ada Chan <adachan@apple.com>
+
+ Reviewed by Alice Liu.
+
+ Fix Windows build.
+
+ * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj:
+
+2010-07-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=42482
+ <rdar://problem/8197701>
+ Add notification of when the BackForwardList changes
+ to aid invalidation of Back/Forward related UI elements.
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (_didStartProvisionalLoadForFrame):
+ (_didCommitLoadForFrame):
+ (_didFailLoadWithErrorForFrame):
+ (_didChangeBackForwardList):
+ (-[BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
+2010-07-16 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] <input type=number> UI implementation for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=42259
+
+ * DumpRenderTree/chromium/WebThemeEngineDRT.cpp:
+ (WebThemeEngineDRT::paintSpinButton):
+ Added. Check state consistency and use existing arrow painting code.
+ * DumpRenderTree/chromium/WebThemeEngineDRT.h:
+
+2010-07-16 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42430
+ Make WebKitTestRunner on Windows actually load and run a test
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp: Export WKBundleInitialize.
+ (WKBundleInitialize):
+ * WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj: Added. Output is a dll.
+ * WebKitTestRunner/TestInvocation.cpp: Create a Windows-style path on Windows
+ (WTR::createWKURL):
+ * WebKitTestRunner/WebKitTestRunnerPrefix.h: Change check for Windows platform to match
+ other existing checks, and avoid including Platform.h
+ * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+ (WTR::registerWindowClass): Added.
+ (WTR::PlatformWebView::PlatformWebView): Implemented.
+ (WTR::PlatformWebView::~PlatformWebView): Implemented.
+ (WTR::PlatformWebView::page): Implemented.
+ * WebKitTestRunner/win/TestControllerWin.cpp:
+ (WTR::TestController::initializeInjectedBundlePath): Implemented. Provide build
+ configuration specific path to InjectedBundle.dll.
+ * WebKitTestRunner/win/TestInvocationWin.cpp:
+ (WTR::TestInvocation::runUntil): Implemented.
+ * WebKitTestRunner/win/WebKitTestRunner.sln: Added InjectedBundle project.
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj: Cleaned up unnecessary dependencies.
+
+2010-07-16 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make revalidation of back/forward work a little better with page loads
+ https://bugs.webkit.org/show_bug.cgi?id=42470
+
+ * MiniBrowser/mac/BrowserWindow.xib:
+ * MiniBrowser/mac/BrowserWindowController.h:
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (-[BrowserWindowController validateToolbar]):
+ (_didStartProvisionalLoadForFrame):
+ (_didCommitLoadForFrame):
+ (_didFailLoadWithErrorForFrame):
+
+2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Add possibility to dumpAsText and generate a pixel test result
+ https://bugs.webkit.org/show_bug.cgi?id=42374
+
+ Add optional parameter to setDumpAsText() to allow generating a pixel test result even if dumpAsText mode.
+ setDumpAsText(true) will also generate a pixel test result now, when running run-webkit-tests --pixel-tests.
+
+ This is needed for the svg/dynamic-updates tests, which don't want render tree dumps but text dumps + a pixel test result.
+ At some point DRT changed to not generate pixel test results when using dumpAsText - which makes sense, but breaks the svg/dynamic-updates test.
+
+ Implemented for all DRT platforms, except Qt, as it's not clear how arguments to functions like "setDumpAsText" are handled.
+ (Qt always dumps pixel tests when using --pixel-tests mode, so it does not break anything)
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (dumpAsTextAndPixelsCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::dumpAsTextAndPixels):
+ (LayoutTestController::setDumpAsTextAndPixels):
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::dumpAsTextAndPixels):
+ (LayoutTestController::reset):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ (LayoutTestController::shouldDumpAsTextAndPixels):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump):
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (dump):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+ * DumpRenderTree/wx/DumpRenderTreeWx.cpp:
+ (dump):
+
+2010-07-16 Kent Hansen <kent.hansen@nokia.com>
+
+ Unreviewed. Adding myself as committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-07-16 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Another uneviewed attempt to fix build.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (createPagedBitmapContext):
+
+2010-07-16 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed tiger build fix.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (createBitmapContext):
+ (createBitmapContextFromWebView):
+
+2010-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Unreviewed build fix.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ * DumpRenderTree/PixelDumpSupport.cpp:
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+
+2010-07-15 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Printing test results differ between machines, we should use ImageDiff instead
+ https://bugs.webkit.org/show_bug.cgi?id=20011
+
+ * DumpRenderTree/PixelDumpSupport.cpp:
+ (dumpWebViewAsPixelsAndCompareWithExpected):
+ * DumpRenderTree/PixelDumpSupport.h:
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (createBitmapContext): This function was added to share bitmap context creation code.
+ (createBitmapContextFromWebView):
+ (createPagedBitmapContext):
+
+2010-07-15 Yuta Kitamura <yutak@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Pull in pywebsocket-0.5.1
+ https://bugs.webkit.org/show_bug.cgi?id=42353
+
+ pywebsocket-0.5.1 contains a small bug fix (*) that should fix a worker test
+ in Chromium. There is no other functional change.
+
+ (*) http://code.google.com/p/pywebsocket/source/detail?r=265
+
+ * Scripts/webkitpy/thirdparty/__init__.py: Bump pywebsocket version to 0.5.1.
+
+2010-07-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add toolbar and toolbar item validation for MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=42422
+
+ * MiniBrowser/MBToolbarItem.h: Added.
+ * MiniBrowser/MBToolbarItem.m: Added.
+ (-[MBToolbarItem validate]):
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (-[BrowserWindowController validateUserInterfaceItem:]):
+
+ * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
+ * MiniBrowser/mac/BrowserWindow.xib:
+
+2010-07-15 Victor Wang <victorw@chromium.org>
+
+ Unreviewed, add victorw irc nickname to committer list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-07-15 Adam Roben <aroben@apple.com>
+
+ Make killing Apache more reliable (on both Mac and Windows)
+
+ We previously had two ways of determining whether we had succeeded in
+ killing Apache:
+ 1) checking the return value of kill(0, $apachePID)
+ 2) checking whether Apache's PID file still exists
+
+ On Cygwin, Apache doesn't always delete its PID file when it exits,
+ making (2) unreliable. We unfortunately misdiagnosed this as an
+ impotency of Perl's kill function, which led to r63177 and r63355.
+
+ Now that we know that the real problem is that Apache doesn't always
+ delete its PID file on Windows, we can make a much better fix: always
+ use method (1) to determine whether we've killed Apache.
+
+ Fixes <http://webkit.org/b/42415> Killing Apache is unreliable,
+ leading to regression test failures (and general annoyance).
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/webkitperl/httpd.pm:
+ (openHTTPD): Moved killing code from here to killHTTPD. Added a call
+ to delete the PID file in case Apache doesn't do this itself when
+ killed. Our later logic relies on the PID file being deleted after
+ this point.
+ (closeHTTPD): Removed killing logic and changed to just call killHTTPD
+ instead. killHTTPD's logic is a bit different from the logic we had
+ here, for the reasons stated above.
+ (killHTTPD): Added. Code came from openHTTPD.
+ (handleInterrupt): Bonus fix for Mac: don't hang when pressing Ctrl-C!
+ On Mac, don't try to kill Apache when we receive a signal, as Apache
+ will already have been killed by this point (though for some reason
+ this isn't detected by our killing logic in killHTTPD). On Cygwin, we
+ still need to kill Apache manually.
+
+2010-07-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=42399
+ Update MiniBrowser for WKFrameNavigationType
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (_decidePolicyForNavigationAction):
+ (_decidePolicyForNewWindowAction):
+
+2010-07-15 Stephanie Lewis <slewis@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ http://bugs.webkit.org/show_bug.cgi?id=42406
+ Make SunSpider work better with roots.
+
+ * Scripts/sunspider-compare-results: fix argument bug
+ * Scripts/webkitdirs.pm: look inside JavaScriptCore if jsc isn't top-level.
+
+2010-07-15 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Hook up back/forward in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=42397
+
+ * MiniBrowser/mac/BrowserWindow.xib:
+ * MiniBrowser/mac/BrowserWindowController.h:
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (-[BrowserWindowController goBack:]):
+ (-[BrowserWindowController goForward:]):
+
+2010-07-15 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ [Mac] Implement LayoutTestController::markerTextForListItem()
+ https://bugs.webkit.org/show_bug.cgi?id=37929
+
+ Implements DRT support for markerTextForListItem in the Mac port.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::markerTextForListItem): Implemented.
+
+2010-07-15 Adam Barth <abarth@webkit.org>
+
+ Unreviewed.
+
+ Update the port names to be more specific. Before this patch,
+ port-specific results for Mac would end up in the wrong place.
+
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+
+2010-07-14 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ WebKit needs a rebaselining tool (finally)
+ https://bugs.webkit.org/show_bug.cgi?id=42339
+
+ This is a very basic rebaselining tool. It's not
+ quite as fancy as chromium's as it will only handle
+ updating failing results. It cannot yet handle adding new
+ results, or updating results where the results should not
+ replace existing results.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/queries.py:
+ * Scripts/webkitpy/tool/commands/rebaseline.py: Added.
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Added.
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63352.
+ http://trac.webkit.org/changeset/63352
+ https://bugs.webkit.org/show_bug.cgi?id=42341
+
+ Broke plugin-initiate-popup-window.html and plugin-javascript-
+ access.html on snow leopard (Requested by abarth on #webkit).
+
+ * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NPP_New):
+ (handleEventCarbon):
+ (handleEventCocoa):
+
+2010-07-14 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Lower WebKitTestRunner notifyDone timeout to 6.0 for now, to make it easier to grind through the failures.
+
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+
+2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r63346.
+ http://trac.webkit.org/changeset/63346
+ https://bugs.webkit.org/show_bug.cgi?id=42295
+
+ Broke lots of tests, some of which probably just need new
+ results (Requested by aroben on #webkit).
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult):
+
+2010-07-14 Adam Roben <aroben@apple.com>
+
+ Speed up killing of Apache on Windows
+
+ Fixes <http://webkit.org/b/42289> Killing Apache (and thus quitting
+ run-webkit-tests) takes a long time on Windows
+
+ Reviewed by Darin Adler and Jon Honeycutt.
+
+ * Scripts/webkitperl/httpd.pm:
+ (closeHTTPD): Use taskkill to kill Apache and its child processes.
+ Perl's kill seems ineffectual. We were already using taskkill, but
+ only after trying kill 20 times. Since kill never works, let's just
+ skip it entirely.
+
+2010-07-14 Johnny Ding <jnd@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41292
+ Add a new parameter to the test plugin to allow to specify a script and a
+ mouse/keyboard event. The specified script will be evaluated in the browser
+ when the specified event is received by the plugin.
+
+ * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
+ (pluginAllocate):
+ * DumpRenderTree/TestNetscapePlugIn/PluginObject.h:
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NPP_New):
+ (handleEventCarbon):
+ (handleEventCocoa):
+
+2010-07-14 Adam Roben <aroben@apple.com>
+
+ Make urlSuitableForTestResult work for http: URLs, too
+
+ Fixes <http://webkit.org/b/42276>
+ http/tests/loading/preload-slow-loading.php and
+ http/tests/mime/uppercase-mime-type.html fail on Windows.
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult): Don't bail if the URL starts with http://.
+ We want this function to work for those URLs, too!
+
+2010-07-13 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Add placebo versions of some repaint test functions to WebKitTestRunner - good enough for non-pixel tests
+ https://bugs.webkit.org/show_bug.cgi?id=42227
+
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::LayoutTestController): Initialize new bool
+ members.
+ (WTR::LayoutTestController::display): Dummy method.
+ (WTR::displayCallback): Call the dummy.
+ (WTR::repaintSweepHorizontallyCallback): ditto
+ (WTR::testRepaintCallback): ditto
+ (WTR::LayoutTestController::staticFunctions): Expose new methods.
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ (WTR::LayoutTestController::setTestRepaint): Set the flag (which currently does
+ nothing).
+ (WTR::LayoutTestController::setTestRepaintSweepHorizontally): ditto
+
+2010-07-13 Andreas Kling <andreas.kling@nokia.com>
+
+ Unreviewed. Adding myself as committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (queueLoadHTMLStringCallback):
+ (setDeferMainResourceDataLoadCallback):
+ (LayoutTestController::staticFunctions):
+ (LayoutTestController::queueLoadHTMLString):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::deferMainResourceDataLoad):
+ (LayoutTestController::setDeferMainResourceDataLoad):
+ * DumpRenderTree/WorkQueueItem.h:
+ (LoadHTMLStringItem::LoadHTMLStringItem):
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ (LoadHTMLStringItem::invoke):
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+ * DumpRenderTree/mac/WorkQueueItemMac.mm:
+ (LoadHTMLStringItem::invoke):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::setDeferMainResourceDataLoad):
+ (LayoutTestController::queueLoadHTMLString):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/qt/WorkQueueItemQt.cpp:
+ (LoadHTMLStringItem::invoke):
+ * DumpRenderTree/qt/WorkQueueItemQt.h:
+ (LoadHTMLStringItem::LoadHTMLStringItem):
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::willSendRequest):
+ * DumpRenderTree/win/WorkQueueItemWin.cpp:
+ (LoadHTMLStringItem::invoke):
+ * DumpRenderTree/wx/WorkQueueItemWx.cpp:
+ (LoadHTMLStringItem::invoke):
+
+2010-07-13 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Activate test fonts for layout tests in WebKitTestRunner (on Mac)
+ https://bugs.webkit.org/show_bug.cgi?id=42153
+
+ * WebKitTestRunner/InjectedBundle/ActivateFonts.h: Added.
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::initialize): Activate fonts on startup.
+ * WebKitTestRunner/InjectedBundle/mac: Added.
+ * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm: Added.
+ (WTR::activateFonts): Activate our fonts.
+ * WebKitTestRunner/InjectedBundle/win: Added.
+ * WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp: Added.
+ (WTR::activateFonts): Dummy version.
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Copy fonts to bundle;
+ add more files.
+ * WebKitTestRunner/fonts: Added.
+ * WebKitTestRunner/fonts/AHEM____.TTF: Added.
+ * WebKitTestRunner/fonts/ColorBits-A.png: Added.
+ * WebKitTestRunner/fonts/ColorBits.ttf: Added.
+ * WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf: Added.
+ * WebKitTestRunner/fonts/WebKit Layout Tests.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf: Added.
+ * WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf: Added.
+
+2010-07-13 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove check-header-includes, as it didn't turn out to be very useful.
+ https://bugs.webkit.org/show_bug.cgi?id=41970
+
+ * Scripts/check-header-includes: Removed.
+
+2010-07-12 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Make WebKit2 be built by build-webkit (so it will be built by build.webkit.org bots)
+ https://bugs.webkit.org/show_bug.cgi?id=40922
+
+ Always build WebKit2 on Windows. Necessary since our WebKit build on
+ Windows is packaged into a DLL with WebKit2.
+
+ * Scripts/build-webkit: Always build WebKit2 on Windows.
+
+2010-07-12 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Steve Falkenburg.
+
+ One http test timing out on Windows can cause all future tests to time out
+ https://bugs.webkit.org/show_bug.cgi?id=42146
+
+ There have been multiple times on the Windows bots where one http test timing out causes all future
+ http tests to time out. This is because the httpd process becomes unresponsive. When an http test
+ times out, we should restart httpd on Cygwin to prevent this.
+
+ * Scripts/old-run-webkit-tests: If an http test timed out on Cygwin, close httpd and restart it.
+ * Scripts/webkitperl/httpd.pm: Add additional logic to closeHTTPD to teach it about taskkill if
+ using kill fails.
+
2010-07-12 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index cd294bc..6a957c1 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -60,6 +60,7 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con
, m_dumpIconChanges(false)
, m_dumpVisitedLinksCallback(false)
, m_dumpWillCacheResponse(false)
+ , m_generatePixelResults(true)
, m_callCloseOnWebViews(true)
, m_canOpenWindows(false)
, m_closeRemainingWindowsWhenComplete(true)
@@ -78,6 +79,7 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con
, m_geolocationPermission(false)
, m_handlesAuthenticationChallenges(false)
, m_isPrinting(false)
+ , m_deferMainResourceDataLoad(true)
, m_testPathOrURL(testPathOrURL)
, m_expectedPixelHash(expectedPixelHash)
{
@@ -101,6 +103,10 @@ static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function,
{
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
controller->setDumpAsText(true);
+
+ // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode.
+ controller->setGeneratePixelResults(argumentCount > 0 ? JSValueToBoolean(context, arguments[0]) : false);
+
return JSValueMakeUndefined(context);
}
@@ -734,6 +740,28 @@ static JSValueRef queueLoadCallback(JSContextRef context, JSObjectRef function,
return JSValueMakeUndefined(context);
}
+static JSValueRef queueLoadHTMLStringCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has Mac & Windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> content(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ JSRetainPtr<JSStringRef> baseURL;
+ if (argumentCount >= 2) {
+ baseURL.adopt(JSValueToStringCopy(context, arguments[1], exception));
+ ASSERT(!*exception);
+ } else
+ baseURL.adopt(JSStringCreateWithUTF8CString(""));
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->queueLoadHTMLString(content.get(), baseURL.get());
+
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef queueReloadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -915,6 +943,18 @@ static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef fun
return JSValueMakeUndefined(context);
}
+static JSValueRef setDeferMainResourceDataLoadCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has Mac and Windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDeferMainResourceDataLoad(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef setDomainRelaxationForbiddenForURLSchemeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has Mac and Windows implementation
@@ -1754,6 +1794,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "queueBackNavigation", queueBackNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueForwardNavigation", queueForwardNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueLoad", queueLoadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "queueLoadHTMLString", queueLoadHTMLStringCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueLoadingScript", queueLoadingScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueNonLoadingScript", queueNonLoadingScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueReload", queueReloadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -1774,6 +1815,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "setCloseRemainingWindowsWhenComplete", setCloseRemainingWindowsWhenCompleteCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setCustomPolicyDelegate", setCustomPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setDatabaseQuota", setDatabaseQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setDeferMainResourceDataLoad", setDeferMainResourceDataLoadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setEditingBehavior", setEditingBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setFrameFlatteningEnabled", setFrameFlatteningEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -1822,6 +1864,11 @@ JSStaticFunction* LayoutTestController::staticFunctions()
return staticFunctions;
}
+void LayoutTestController::queueLoadHTMLString(JSStringRef content, JSStringRef baseURL)
+{
+ WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL));
+}
+
void LayoutTestController::queueBackNavigation(int howFarBack)
{
WorkQueue::shared()->queue(new BackItem(howFarBack));
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 16eda2c..30eb9bd 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -70,6 +70,7 @@ public:
void queueBackNavigation(int howFarBackward);
void queueForwardNavigation(int howFarForward);
void queueLoad(JSStringRef url, JSStringRef target);
+ void queueLoadHTMLString(JSStringRef content, JSStringRef baseURL);
void queueLoadingScript(JSStringRef script);
void queueNonLoadingScript(JSStringRef script);
void queueReload();
@@ -120,7 +121,10 @@ public:
bool dumpAsText() const { return m_dumpAsText; }
void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; }
-
+
+ bool generatePixelResults() const { return m_generatePixelResults; }
+ void setGeneratePixelResults(bool generatePixelResults) { m_generatePixelResults = generatePixelResults; }
+
bool dumpBackForwardList() const { return m_dumpBackForwardList; }
void setDumpBackForwardList(bool dumpBackForwardList) { m_dumpBackForwardList = dumpBackForwardList; }
@@ -230,6 +234,9 @@ public:
bool globalFlag() const { return m_globalFlag; }
void setGlobalFlag(bool globalFlag) { m_globalFlag = globalFlag; }
+ bool deferMainResourceDataLoad() const { return m_deferMainResourceDataLoad; }
+ void setDeferMainResourceDataLoad(bool flag) { m_deferMainResourceDataLoad = flag; }
+
const std::string& testPathOrURL() const { return m_testPathOrURL; }
const std::string& expectedPixelHash() const { return m_expectedPixelHash; }
@@ -298,6 +305,7 @@ private:
bool m_dumpIconChanges;
bool m_dumpVisitedLinksCallback;
bool m_dumpWillCacheResponse;
+ bool m_generatePixelResults;
bool m_callCloseOnWebViews;
bool m_canOpenWindows;
bool m_closeRemainingWindowsWhenComplete;
@@ -316,6 +324,7 @@ private:
bool m_geolocationPermission;
bool m_handlesAuthenticationChallenges;
bool m_isPrinting;
+ bool m_deferMainResourceDataLoad;
std::string m_authenticationUsername;
std::string m_authenticationPassword;
diff --git a/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp b/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp
index e372827..b5a5146 100644
--- a/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp
+++ b/WebKitTools/DumpRenderTree/PixelDumpSupport.cpp
@@ -42,7 +42,13 @@
void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash)
{
- RefPtr<BitmapContext> context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect());
+ RefPtr<BitmapContext> context;
+#if PLATFORM(MAC)
+ if (gLayoutTestController->isPrinting())
+ context = createPagedBitmapContext();
+ else
+#endif
+ context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect());
ASSERT(context);
// Compute the hash of the bitmap context pixels
diff --git a/WebKitTools/DumpRenderTree/PixelDumpSupport.h b/WebKitTools/DumpRenderTree/PixelDumpSupport.h
index 94c5312..e172a83 100644
--- a/WebKitTools/DumpRenderTree/PixelDumpSupport.h
+++ b/WebKitTools/DumpRenderTree/PixelDumpSupport.h
@@ -36,6 +36,7 @@
class BitmapContext;
void computeMD5HashStringForBitmapContext(BitmapContext*, char hashString[33]);
+PassRefPtr<BitmapContext> createPagedBitmapContext();
PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect);
void dumpBitmap(BitmapContext*);
void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash);
diff --git a/WebKitTools/DumpRenderTree/WorkQueueItem.h b/WebKitTools/DumpRenderTree/WorkQueueItem.h
index 56be377..34276c8 100644
--- a/WebKitTools/DumpRenderTree/WorkQueueItem.h
+++ b/WebKitTools/DumpRenderTree/WorkQueueItem.h
@@ -53,6 +53,21 @@ private:
JSRetainPtr<JSStringRef> m_target;
};
+class LoadHTMLStringItem : public WorkQueueItem {
+public:
+ LoadHTMLStringItem(const JSStringRef content, const JSStringRef baseURL)
+ : m_content(content)
+ , m_baseURL(baseURL)
+ {
+ }
+
+private:
+ virtual bool invoke() const;
+
+ JSRetainPtr<JSStringRef> m_content;
+ JSRetainPtr<JSStringRef> m_baseURL;
+};
+
class ReloadItem : public WorkQueueItem {
private:
virtual bool invoke() const;
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 0f37d7e..ea1fd01 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -230,9 +230,15 @@ void LayoutTestController::WorkQueue::addWork(WorkItem* work)
m_queue.append(work);
}
-void LayoutTestController::dumpAsText(const CppArgumentList&, CppVariant* result)
+void LayoutTestController::dumpAsText(const CppArgumentList& arguments, CppVariant* result)
{
m_dumpAsText = true;
+ m_generatePixelResults = false;
+
+ // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode.
+ if (arguments.size() > 0 && arguments[0].isBool())
+ m_generatePixelResults = arguments[0].value.boolValue;
+
result->setNull();
}
@@ -475,6 +481,7 @@ void LayoutTestController::reset()
m_dumpWindowStatusChanges = false;
m_dumpSelectionRect = false;
m_dumpTitleChanges = false;
+ m_generatePixelResults = true;
m_acceptsEditing = true;
m_waitUntilDone = false;
m_canOpenWindows = false;
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 5d65726..46a14de 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -57,7 +57,7 @@ public:
// This function sets a flag that tells the test_shell to dump pages as
// plain text, rather than as a text representation of the renderer's state.
- // It takes no arguments, and ignores any that may be present.
+ // It takes an optional argument, whether to dump pixels results or not.
void dumpAsText(const CppArgumentList&, CppVariant*);
// This function should set a flag that tells the test_shell to print a line
@@ -305,6 +305,7 @@ public:
bool shouldDumpTitleChanges() { return m_dumpTitleChanges; }
bool shouldDumpChildFrameScrollPositions() { return m_dumpChildFrameScrollPositions; }
bool shouldDumpChildFramesAsText() { return m_dumpChildFramesAsText; }
+ bool shouldGeneratePixelResults() { return m_generatePixelResults; }
bool acceptsEditing() { return m_acceptsEditing; }
bool canOpenWindows() { return m_canOpenWindows; }
bool shouldAddFileToPasteboard() { return m_shouldAddFileToPasteboard; }
@@ -420,6 +421,9 @@ private:
// If true, output a message when the page title is changed.
bool m_dumpTitleChanges;
+ // If true, the test_shell will generate pixel results in dumpAsText mode
+ bool m_generatePixelResults;
+
// If true, the element will be treated as editable. This value is returned
// from various editing callbacks that are called just before edit operations
// are allowed.
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
index a4b161a..507f084 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
@@ -511,7 +511,7 @@ void TestShell::dump()
if (dumpedAnything && m_params.printSeparators)
m_printer->handleTextFooter();
- if (m_params.dumpPixels && !shouldDumpAsText) {
+ if (m_params.dumpPixels && m_layoutTestController->shouldGeneratePixelResults()) {
// Image output: we write the image data to the file given on the
// command line (for the dump pixels argument), and the MD5 sum to
// stdout.
diff --git a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp
index c28da1f..ef6c26a 100755
--- a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp
@@ -583,6 +583,64 @@ void WebThemeEngineDRT::paintScrollbarTrack(WebCanvas* canvas,
drawControl(canvas, rect, ctype, cstate);
}
+void WebThemeEngineDRT::paintSpinButton(WebCanvas* canvas,
+ int part,
+ int state,
+ int classicState,
+ const WebRect& rect)
+{
+ WebThemeControlDRT::Type ctype = WebThemeControlDRT::UnknownType;
+ WebThemeControlDRT::State cstate = WebThemeControlDRT::UnknownState;
+
+ if (part == SPNP_UP) {
+ ctype = WebThemeControlDRT::UpArrowType;
+ switch (state) {
+ case UPS_NORMAL:
+ ASSERT(classicState == DFCS_SCROLLUP);
+ cstate = WebThemeControlDRT::NormalState;
+ break;
+ case UPS_DISABLED:
+ ASSERT(classicState == (DFCS_SCROLLUP | DFCS_INACTIVE));
+ cstate = WebThemeControlDRT::DisabledState;
+ break;
+ case UPS_PRESSED:
+ ASSERT(classicState == (DFCS_SCROLLUP | DFCS_PUSHED));
+ cstate = WebThemeControlDRT::PressedState;
+ break;
+ case UPS_HOT:
+ ASSERT(classicState == (DFCS_SCROLLUP | DFCS_HOT));
+ cstate = WebThemeControlDRT::HoverState;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ } else if (part == SPNP_DOWN) {
+ ctype = WebThemeControlDRT::DownArrowType;
+ switch (state) {
+ case DNS_NORMAL:
+ ASSERT(classicState == DFCS_SCROLLDOWN);
+ cstate = WebThemeControlDRT::NormalState;
+ break;
+ case DNS_DISABLED:
+ ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_INACTIVE));
+ cstate = WebThemeControlDRT::DisabledState;
+ break;
+ case DNS_PRESSED:
+ ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_PUSHED));
+ cstate = WebThemeControlDRT::PressedState;
+ break;
+ case DNS_HOT:
+ ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_HOT));
+ cstate = WebThemeControlDRT::HoverState;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ } else
+ ASSERT_NOT_REACHED();
+ drawControl(canvas, rect, ctype, cstate);
+}
+
void WebThemeEngineDRT::paintTextField(WebCanvas* canvas,
int part,
int state,
diff --git a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h
index 89805b1..c731540 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h
@@ -75,6 +75,10 @@ public:
WebKit::WebCanvas*, int part, int state, int classicState,
const WebKit::WebRect&, const WebKit::WebRect& alignRect);
+ virtual void paintSpinButton(
+ WebKit::WebCanvas*, int part, int state, int classicState,
+ const WebKit::WebRect&);
+
virtual void paintTextField(
WebKit::WebCanvas*, int part, int state, int classicState,
const WebKit::WebRect&, WebKit::WebColor, bool fillContentArea,
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index da05804..2812224 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -419,11 +419,11 @@ void dump()
}
}
- if (dumpPixels) {
- if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive()) {
- dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
- }
- }
+ if (dumpPixels
+ && gLayoutTestController->generatePixelResults()
+ && !gLayoutTestController->dumpDOMAsWebArchive()
+ && !gLayoutTestController->dumpSourceAsWebArchive())
+ dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
// FIXME: call displayWebView here when we support --paint
diff --git a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
index e0e0ffb..afe81be 100644
--- a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
@@ -56,6 +56,11 @@ bool LoadItem::invoke() const
return true;
}
+bool LoadHTMLStringItem::invoke() const
+{
+ return false;
+}
+
bool ReloadItem::invoke() const
{
webkit_web_frame_reload(mainFrame);
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index ce02081..89a25cf 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -1129,7 +1129,7 @@ void dump()
}
}
- if (dumpPixels && !dumpAsText)
+ if (dumpPixels && gLayoutTestController->generatePixelResults())
// FIXME: when isPrinting is set, dump the image with page separators.
dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index aec4c19..6b921f0 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -46,6 +46,7 @@
#import <WebKit/WebCoreStatistics.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDatabaseManagerPrivate.h>
+#import <WebKit/WebDOMOperationsPrivate.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFrameViewPrivate.h>
#import <WebKit/WebGeolocationPosition.h>
@@ -196,8 +197,12 @@ JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const
JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
{
- // FIXME: Implement me.
- return JSRetainPtr<JSStringRef>();
+ DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
+ if (!element)
+ return JSRetainPtr<JSStringRef>();
+
+ JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithCFString((CFStringRef)[element _markerTextForListItem]));
+ return markerText;
}
int LayoutTestController::pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels)
diff --git a/WebKitTools/DumpRenderTree/mac/ObjCController.m b/WebKitTools/DumpRenderTree/mac/ObjCController.m
index aa9ee49..641d2cc 100644
--- a/WebKitTools/DumpRenderTree/mac/ObjCController.m
+++ b/WebKitTools/DumpRenderTree/mac/ObjCController.m
@@ -36,6 +36,11 @@
#import <pthread.h>
#import <wtf/Assertions.h>
+// Remove this once hasWebScriptKey has been made public.
+@interface WebScriptObject (StagedForPublic)
+- (BOOL)hasWebScriptKey:(NSString *)name;
+@end
+
static void* runJavaScriptThread(void* arg)
{
JSGlobalContextRef ctx = JSGlobalContextCreate(0);
@@ -66,6 +71,7 @@ static void* runJavaScriptThread(void* arg)
|| aSelector == @selector(accessStoredWebScriptObject)
|| aSelector == @selector(storeWebScriptObject:)
|| aSelector == @selector(testValueForKey)
+ || aSelector == @selector(testHasWebScriptKey:)
|| aSelector == @selector(testArray)
)
return NO;
@@ -92,6 +98,8 @@ static void* runJavaScriptThread(void* arg)
return @"storeWebScriptObject";
if (aSelector == @selector(testValueForKey))
return @"testValueForKey";
+ if (aSelector == @selector(testHasWebScriptKey:))
+ return @"testHasWebScriptKey";
if (aSelector == @selector(testArray))
return @"testArray";
@@ -166,6 +174,12 @@ static void* runJavaScriptThread(void* arg)
pthread_join(pthread, 0);
}
+- (BOOL)testHasWebScriptKey:(NSString *)key
+{
+ ASSERT(storedWebScriptObject);
+ return [storedWebScriptObject hasWebScriptKey:key];
+}
+
- (BOOL)testWrapperRoundTripping:(WebScriptObject *)webScriptObject
{
JSObjectRef jsObject = [webScriptObject JSObject];
diff --git a/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm b/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm
index 0059b69..3967186 100644
--- a/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/PixelDumpSupportMac.mm
@@ -38,6 +38,7 @@
#include <wtf/Assertions.h>
#include <wtf/RefPtr.h>
+#import <WebKit/WebCoreStatistics.h>
#import <WebKit/WebDocumentPrivate.h>
#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebKit.h>
@@ -104,21 +105,11 @@ void setupMainDisplayColorProfile()
signal(SIGTERM, restoreMainDisplayColorProfile);
}
-PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect)
+static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t pixelsHigh, size_t& rowBytes, void*& buffer)
{
- WebView* view = [mainFrame webView];
+ rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance
- // If the WebHTMLView uses accelerated compositing, we need for force the on-screen capture path
- // and also force Core Animation to start its animations with -display since the DRT window has autodisplay disabled.
- if ([view _isUsingAcceleratedCompositing])
- onscreen = YES;
-
- NSSize webViewSize = [view frame].size;
- size_t pixelsWide = static_cast<size_t>(webViewSize.width);
- size_t pixelsHigh = static_cast<size_t>(webViewSize.height);
- size_t rowBytes = (4 * pixelsWide + 63) & ~63; // Use a multiple of 64 bytes to improve CG performance
-
- void *buffer = calloc(pixelsHigh, rowBytes);
+ buffer = calloc(pixelsHigh, rowBytes);
if (!buffer)
return 0;
@@ -140,9 +131,28 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc
return 0;
}
- // The BitmapContext keeps the CGContextRef and the pixel buffer alive
- RefPtr<BitmapContext> bitmapContext = BitmapContext::createByAdoptingBitmapAndContext(buffer, context);
-
+ return BitmapContext::createByAdoptingBitmapAndContext(buffer, context);
+}
+
+PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool incrementalRepaint, bool sweepHorizontally, bool drawSelectionRect)
+{
+ WebView* view = [mainFrame webView];
+
+ // If the WebHTMLView uses accelerated compositing, we need for force the on-screen capture path
+ // and also force Core Animation to start its animations with -display since the DRT window has autodisplay disabled.
+ if ([view _isUsingAcceleratedCompositing])
+ onscreen = YES;
+
+ NSSize webViewSize = [view frame].size;
+ size_t pixelsWide = static_cast<size_t>(webViewSize.width);
+ size_t pixelsHigh = static_cast<size_t>(webViewSize.height);
+ size_t rowBytes = 0;
+ void* buffer = 0;
+ RefPtr<BitmapContext> bitmapContext = createBitmapContext(pixelsWide, pixelsHigh, rowBytes, buffer);
+ if (!bitmapContext)
+ return 0;
+ CGContextRef context = bitmapContext->cgContext();
+
NSGraphicsContext *nsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO];
ASSERT(nsContext);
@@ -254,3 +264,16 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc
return bitmapContext.release();
}
+
+PassRefPtr<BitmapContext> createPagedBitmapContext()
+{
+ int pageWidthInPixels = LayoutTestController::maxViewWidth;
+ int pageHeightInPixels = LayoutTestController::maxViewHeight;
+ int numberOfPages = [mainFrame numberOfPages:pageWidthInPixels:pageHeightInPixels];
+ size_t rowBytes = 0;
+ void* buffer = 0;
+
+ RefPtr<BitmapContext> bitmapContext = createBitmapContext(pageWidthInPixels, numberOfPages * (pageHeightInPixels + 1) - 1, rowBytes, buffer);
+ [mainFrame printToCGContext:bitmapContext->cgContext():pageWidthInPixels:pageHeightInPixels];
+ return bitmapContext.release();
+}
diff --git a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
index fca65f9..0855b83 100644
--- a/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/ResourceLoadDelegate.mm
@@ -33,6 +33,7 @@
#import "LayoutTestController.h"
#import <WebKit/WebKit.h>
#import <WebKit/WebTypesInternal.h>
+#import <WebKit/WebDataSourcePrivate.h>
#import <wtf/Assertions.h>
using namespace std;
@@ -131,6 +132,10 @@ using namespace std;
printf("%s\n", [string UTF8String]);
}
+ if (!done && !gLayoutTestController->deferMainResourceDataLoad()) {
+ [dataSource _setDeferMainResourceDataLoad:false];
+ }
+
if (!done && gLayoutTestController->willSendRequestReturnsNull())
return nil;
@@ -167,6 +172,9 @@ using namespace std;
- (void)webView:(WebView *)wv resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
{
if (!gLayoutTestController->handlesAuthenticationChallenges()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet", identifier];
+ printf("%s\n", [string UTF8String]);
+
[[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
return;
}
diff --git a/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm b/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm
index 4e39a5a..797afb7 100644
--- a/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/WorkQueueItemMac.mm
@@ -54,6 +54,15 @@ bool LoadItem::invoke() const
return true;
}
+bool LoadHTMLStringItem::invoke() const
+{
+ RetainPtr<CFStringRef> contentCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_content.get()));
+ RetainPtr<CFStringRef> baseURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_baseURL.get()));
+
+ [mainFrame loadHTMLString:(NSString *)contentCF.get() baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()]];
+ return true;
+}
+
bool ReloadItem::invoke() const
{
[[mainFrame webView] reload:nil];
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 3eb1714..022a867 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -847,6 +847,7 @@ void DumpRenderTree::dump()
fputs("#EOF\n", stdout);
fputs("#EOF\n", stderr);
+ // FIXME: All other ports don't dump pixels, if generatePixelResults is false.
if (m_dumpPixels) {
QImage image(m_page->viewportSize(), QImage::Format_ARGB32);
image.fill(Qt::white);
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index dd11428..3a6229f 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -72,6 +72,7 @@ void LayoutTestController::reset()
DumpRenderTreeSupportQt::dumpFrameLoader(false);
DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(false);
DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(false);
+ DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(true);
DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(false);
DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(false);
DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(QStringList());
@@ -249,6 +250,11 @@ void LayoutTestController::setWillSendRequestClearHeader(const QStringList& head
DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(headers);
}
+void LayoutTestController::setDeferMainResourceDataLoad(bool defer)
+{
+ DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(defer);
+}
+
void LayoutTestController::queueBackNavigation(int howFarBackward)
{
//qDebug() << ">>>queueBackNavigation" << howFarBackward;
@@ -269,6 +275,11 @@ void LayoutTestController::queueLoad(const QString& url, const QString& target)
WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage()));
}
+void LayoutTestController::queueLoadHTMLString(const QString& content, const QString& baseURL)
+{
+ WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage()));
+}
+
void LayoutTestController::queueReload()
{
//qDebug() << ">>>queueReload";
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 76bc802..4e95381 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -112,6 +112,7 @@ public slots:
void queueBackNavigation(int howFarBackward);
void queueForwardNavigation(int howFarForward);
void queueLoad(const QString& url, const QString& target = QString());
+ void queueLoadHTMLString(const QString& content, const QString& baseURL = QString());
void queueReload();
void queueLoadingScript(const QString& script);
void queueNonLoadingScript(const QString& script);
@@ -148,6 +149,7 @@ public slots:
void resetLoadFinished() { m_loadFinished = false; }
void setWindowIsKey(bool isKey);
void setMainFrameIsFirstResponder(bool isFirst);
+ void setDeferMainResourceDataLoad(bool);
void setJavaScriptCanAccessClipboard(bool enable);
void setXSSAuditorEnabled(bool enable);
void setCaretBrowsingEnabled(bool enable);
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp
index 067e6aa..d1baf08 100644
--- a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.cpp
@@ -60,6 +60,18 @@ bool LoadItem::invoke() const
return true;
}
+bool LoadHTMLStringItem::invoke() const
+{
+ Q_ASSERT(m_webPage);
+
+ QWebFrame* frame = m_webPage->mainFrame();
+ if (!frame)
+ return false;
+
+ frame->setHtml(m_content, QUrl(m_baseURL));
+ return true;
+}
+
bool ReloadItem::invoke() const
{
//qDebug() << ">>>ReloadItem::invoke";
diff --git a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h
index 94da5e1..97c9b04 100644
--- a/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h
+++ b/WebKitTools/DumpRenderTree/qt/WorkQueueItemQt.h
@@ -64,6 +64,22 @@ private:
QString m_target;
};
+class LoadHTMLStringItem : public WorkQueueItem {
+public:
+ LoadHTMLStringItem(const QString& content, const QString &baseURL, QWebPage *page)
+ : WorkQueueItem(page)
+ , m_content(content)
+ , m_baseURL(baseURL)
+ {
+ }
+
+private:
+ virtual bool invoke() const;
+
+ QString m_content;
+ QString m_baseURL;
+};
+
class ReloadItem : public WorkQueueItem {
public:
ReloadItem(QWebPage *page)
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
index 451ff86..a1b72e1 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -134,7 +134,15 @@ bool setAlwaysAcceptCookies(bool alwaysAcceptCookies)
wstring urlSuitableForTestResult(const wstring& url)
{
- if (!url.c_str() || url.find(L"file://") == wstring::npos)
+ if (url.find(L"file://") == wstring::npos)
+ return url;
+
+ return lastPathComponent(url);
+}
+
+wstring lastPathComponent(const wstring& url)
+{
+ if (url.empty())
return url;
return PathFindFileNameW(url.c_str());
@@ -723,10 +731,11 @@ void dump()
fflush(stderr);
}
- if (dumpPixels) {
- if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive())
- dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
- }
+ if (dumpPixels
+ && gLayoutTestController->generatePixelResults()
+ && !gLayoutTestController->dumpDOMAsWebArchive()
+ && !gLayoutTestController->dumpSourceAsWebArchive())
+ dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
printf("#EOF\n"); // terminate the (possibly empty) pixels block
fflush(stdout);
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
index cc4337b..e3497c9 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
@@ -49,6 +49,7 @@ extern HWND webViewWindow;
#include <wtf/Vector.h>
std::wstring urlSuitableForTestResult(const std::wstring& url);
+std::wstring lastPathComponent(const std::wstring&);
std::string toUTF8(BSTR);
std::string toUTF8(const std::wstring&);
IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow = 0);
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
index b79bb2a..a29623e 100644
--- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -196,8 +196,29 @@ JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const
JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
{
- // FIXME: Implement me.
- return JSRetainPtr<JSStringRef>();
+ COMPtr<IWebView> webView;
+ if (FAILED(frame->webView(&webView)))
+ return 0;
+
+ COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
+ if (!webViewPrivate)
+ return 0;
+
+ COMPtr<IDOMElement> element;
+ if (FAILED(webViewPrivate->elementFromJS(context, nodeObject, &element)))
+ return 0;
+
+ COMPtr<IDOMElementPrivate> elementPrivate(Query, element);
+ if (!elementPrivate)
+ return 0;
+
+ BSTR textBSTR = 0;
+ if (FAILED(elementPrivate->markerTextForListItem(&textBSTR)))
+ return 0;
+
+ JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithBSTR(textBSTR));
+ SysFreeString(textBSTR);
+ return markerText;
}
void LayoutTestController::waitForPolicyDelegate()
diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
index ce01933..825366a 100644
--- a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
+++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
@@ -250,6 +250,13 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::willSendRequest(
descriptionSuitableForTestResult(redirectResponse).c_str());
}
+ if (!done && !gLayoutTestController->deferMainResourceDataLoad()) {
+ COMPtr<IWebDataSourcePrivate> dataSourcePrivate(Query, dataSource);
+ if (!dataSourcePrivate)
+ return E_FAIL;
+ dataSourcePrivate->setDeferMainResourceDataLoad(FALSE);
+ }
+
if (!done && gLayoutTestController->willSendRequestReturnsNull()) {
*newRequest = 0;
return S_OK;
@@ -285,6 +292,7 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveAuthenticationChalleng
return E_FAIL;
if (!gLayoutTestController->handlesAuthenticationChallenges()) {
+ printf("%S - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n", descriptionSuitableForTestResult(identifier).c_str());
sender->continueWithoutCredentialForAuthenticationChallenge(challenge);
return S_OK;
}
@@ -326,10 +334,10 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveResponse(
if (FAILED(response->URL(&urlBSTR)))
E_FAIL;
- wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
+ wstring url = wstringFromBSTR(urlBSTR);
::SysFreeString(urlBSTR);
- printf("%S has MIME type %S\n", url.c_str(), mimeType.c_str());
+ printf("%S has MIME type %S\n", lastPathComponent(url).c_str(), mimeType.c_str());
}
return S_OK;
diff --git a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp
index 7c60d3d..a24ca37 100644
--- a/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/WorkQueueItemWin.cpp
@@ -81,6 +81,22 @@ bool LoadItem::invoke() const
return true;
}
+bool LoadHTMLStringItem::invoke() const
+{
+ wstring content = jsStringRefToWString(m_content.get());
+ wstring baseURL = jsStringRefToWString(m_baseURL.get());
+
+ BSTR contentBSTR = SysAllocString(content.c_str());
+ BSTR baseURLBSTR = SysAllocString(baseURL.c_str());
+
+ frame->loadHTMLString(contentBSTR, baseURLBSTR);
+
+ SysFreeString(contentBSTR);
+ SysFreeString(baseURLBSTR);
+
+ return true;
+}
+
bool ReloadItem::invoke() const
{
COMPtr<IWebView> webView;
diff --git a/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp b/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
index c56f129..7142af2 100644
--- a/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
+++ b/WebKitTools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
@@ -201,13 +201,11 @@ void dump()
}
}
- if (dumpPixels) {
- if (!gLayoutTestController->dumpAsText() &&
- !gLayoutTestController->dumpDOMAsWebArchive() &&
- !gLayoutTestController->dumpSourceAsWebArchive()) {
- // FIXME: Add support for dumping pixels
- }
-
+ if (dumpPixels
+ && gLayoutTestController->generatePixelResults()
+ && !gLayoutTestController->dumpDOMAsWebArchive()
+ && !gLayoutTestController->dumpSourceAsWebArchive()) {
+ // FIXME: Add support for dumping pixels
fflush(stdout);
}
diff --git a/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp b/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp
index 3e8da19..e6ecb75 100644
--- a/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp
+++ b/WebKitTools/DumpRenderTree/wx/WorkQueueItemWx.cpp
@@ -36,6 +36,11 @@ bool LoadItem::invoke() const
return false;
}
+bool LoadHTMLStringItem::invoke() const
+{
+ return false;
+}
+
bool ReloadItem::invoke() const
{
return false;
diff --git a/WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops b/WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops
new file mode 100644
index 0000000..7f843ce
--- /dev/null
+++ b/WebKitTools/MiniBrowser/Configurations/MiniBrowserCommon.vsprops
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include&quot;"
+ UsePrecompiledHeader="2"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="shlwapi.lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CFNetwork.resources&quot; &quot;$(WebKitOutputDir)\bin\CFNetwork.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\dnssd.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).pdb&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitTools/MiniBrowser/MBToolbarItem.h b/WebKitTools/MiniBrowser/MBToolbarItem.h
new file mode 100644
index 0000000..cc5a4b4
--- /dev/null
+++ b/WebKitTools/MiniBrowser/MBToolbarItem.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+@interface MBToolbarItem : NSToolbarItem
+{ }
+@end
diff --git a/WebKitTools/MiniBrowser/MBToolbarItem.m b/WebKitTools/MiniBrowser/MBToolbarItem.m
new file mode 100644
index 0000000..56f7778
--- /dev/null
+++ b/WebKitTools/MiniBrowser/MBToolbarItem.m
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "MBToolbarItem.h"
+
+@implementation MBToolbarItem
+
+- (void)validate
+{
+ [self setEnabled:[[self target] validateUserInterfaceItem:self]];
+}
+
+@end
diff --git a/WebKitTools/MiniBrowser/MiniBrowser.vcproj b/WebKitTools/MiniBrowser/MiniBrowser.vcproj
index 8b956e7..43fc34f 100644
--- a/WebKitTools/MiniBrowser/MiniBrowser.vcproj
+++ b/WebKitTools/MiniBrowser/MiniBrowser.vcproj
@@ -17,16 +17,14 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(WebKitOutputDir)\bin"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
UseOfATL="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
@@ -42,35 +40,20 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include&quot;"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- WarnAsError="true"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="&quot;$(IntDir)\include&quot;;..\..\Internal\Safari\win\WTL80\include"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib WebKit2$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -97,22 +80,20 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CFNetwork.resources&quot; &quot;$(WebKitOutputDir)\bin\CFNetwork.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\dnssd.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).pdb&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;"
+ CommandLine=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="$(WebKitOutputDir)\bin"
- IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
UseOfATL="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
@@ -128,34 +109,20 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- RuntimeLibrary="2"
- UsePrecompiledHeader="2"
- WarningLevel="3"
- WarnAsError="true"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="&quot;$(IntDir)\include&quot;;..\Safari\win\WTL80\include"
+ AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib WebKit2$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -180,7 +147,143 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreFoundation$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CFNetwork$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CFNetwork.resources&quot; &quot;$(WebKitOutputDir)\bin\CFNetwork.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CoreFoundation.resources&quot; &quot;$(WebKitOutputDir)\bin\CoreFoundation.resources&quot;&#x0D;&#x0A;xcopy /y /d /e /i &quot;$(WebKitLibrariesDir)\bin\CharacterSets&quot; &quot;$(WebKitOutputDir)\bin\CharacterSets&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\CoreGraphics$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\dnssd.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40.dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icudt40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuin40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\icuuc40$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxml2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\libxslt$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\pthreadVC2$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\SQLite3$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\zlib1$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\objc$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).dll&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).dll&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;if exist &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).pdb&quot; xcopy /y /d &quot;$(WebKitLibrariesDir)\bin\QuartzCore$(LibraryConfigSuffix).pdb&quot; &quot;$(WebKitOutputDir)\bin&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ UseOfATL="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile=""
+ ComponentFileName=""
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ UseOfATL="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ TypeLibraryFile=""
+ ComponentFileName=""
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
/>
</Configuration>
</Configurations>
@@ -227,6 +330,22 @@
UsePrecompiledHeader="1"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Internal|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
</File>
</Filter>
<Filter
diff --git a/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj b/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
index 9aa8cf4..f05c351 100644
--- a/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
+++ b/WebKitTools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
256AC3DA0F4B6AC300CF3369 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* AppDelegate.m */; };
+ 51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E244F911EFCE07008228D1 /* MBToolbarItem.m */; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
BC20545E11C96C92008F3375 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
BC329487116A92E2008635D0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BC329486116A92E2008635D0 /* main.m */; };
@@ -55,6 +56,8 @@
256AC3F00F4B6AF500CF3369 /* MiniBrowser_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MiniBrowser_Prefix.pch; path = mac/MiniBrowser_Prefix.pch; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 51E244F811EFCE07008228D1 /* MBToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBToolbarItem.h; sourceTree = "<group>"; };
+ 51E244F911EFCE07008228D1 /* MBToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBToolbarItem.m; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* MiniBrowser.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MiniBrowser.app; sourceTree = BUILT_PRODUCTS_DIR; };
BC1770121188DF19007D9E9A /* make-launchable.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "make-launchable.sh"; path = "mac/make-launchable.sh"; sourceTree = "<group>"; };
BC329486116A92E2008635D0 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = mac/main.m; sourceTree = "<group>"; };
@@ -108,6 +111,8 @@
BC329497116A941B008635D0 /* BrowserWindowController.m */,
BCE625EF117FC82700572433 /* BrowserStatisticsWindowController.h */,
BCE625F0117FC82700572433 /* BrowserStatisticsWindowController.m */,
+ 51E244F811EFCE07008228D1 /* MBToolbarItem.h */,
+ 51E244F911EFCE07008228D1 /* MBToolbarItem.m */,
);
name = MiniBrowser;
sourceTree = "<group>";
@@ -308,6 +313,7 @@
BC329487116A92E2008635D0 /* main.m in Sources */,
BC329498116A941B008635D0 /* BrowserWindowController.m in Sources */,
BCE625F1117FC82700572433 /* BrowserStatisticsWindowController.m in Sources */,
+ 51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindow.xib b/WebKitTools/MiniBrowser/mac/BrowserWindow.xib
index 64c4999..52558a7 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindow.xib
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindow.xib
@@ -3,15 +3,16 @@
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10F569</string>
- <string key="IBDocument.InterfaceBuilderVersion">800</string>
+ <string key="IBDocument.InterfaceBuilderVersion">762</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">800</string>
+ <string key="NS.object.0">762</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -40,12 +41,260 @@
<object class="NSWindowTemplate" id="1005">
<int key="NSWindowStyleMask">4111</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{517, 280}, {776, 658}}</string>
+ <string key="NSWindowRect">{{517, 330}, {776, 608}}</string>
<int key="NSWTFlags">544735232</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
- <nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <object class="NSToolbar" key="NSViewClass" id="726585754">
+ <object class="NSMutableString" key="NSToolbarIdentifier">
+ <characters key="NS.bytes">994A0CB1-7575-4F39-A65B-7165AB1E8015</characters>
+ </object>
+ <nil key="NSToolbarDelegate"/>
+ <bool key="NSToolbarPrefersToBeShown">YES</bool>
+ <bool key="NSToolbarShowsBaselineSeparator">YES</bool>
+ <bool key="NSToolbarAllowsUserCustomization">YES</bool>
+ <bool key="NSToolbarAutosavesConfiguration">NO</bool>
+ <int key="NSToolbarDisplayMode">2</int>
+ <int key="NSToolbarSizeMode">1</int>
+ <object class="NSMutableDictionary" key="NSToolbarIBIdentifiedItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</string>
+ <string>6BDC61B7-F1A8-425A-A212-9CAC59C56385</string>
+ <string>73DE9F4B-73E2-4036-A134-2D9E029DA980</string>
+ <string>88C16109-D40F-4682-BCE4-CBEE2EDE32D2</string>
+ <string>E1A9D32A-59E3-467B-9ABA-A95780416E69</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSToolbarItem" id="16289946">
+ <object class="NSMutableString" key="NSToolbarItemIdentifier">
+ <characters key="NS.bytes">255D29F2-C9AA-4B4B-BB43-B38FCD6A0BBB</characters>
+ </object>
+ <string key="NSToolbarItemLabel">Location</string>
+ <string key="NSToolbarItemPaletteLabel">Location</string>
+ <nil key="NSToolbarItemToolTip"/>
+ <object class="NSTextField" key="NSToolbarItemView" id="690456651">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{0, 14}, {565, 22}}</string>
+ <int key="NSViewLayerContentsRedrawPolicy">2</int>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="1023147716">
+ <int key="NSCellFlags">-1804468671</int>
+ <int key="NSCellFlags2">268436480</int>
+ <string key="NSContents"/>
+ <object class="NSFont" key="NSSupport" id="1064395332">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="690456651"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textColor</string>
+ <object class="NSColor" key="NSColor" id="365730878">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <nil key="NSToolbarItemImage"/>
+ <nil key="NSToolbarItemTarget"/>
+ <nil key="NSToolbarItemAction"/>
+ <string key="NSToolbarItemMinSize">{200, 22}</string>
+ <string key="NSToolbarItemMaxSize">{800, 22}</string>
+ <bool key="NSToolbarItemEnabled">YES</bool>
+ <bool key="NSToolbarItemAutovalidates">YES</bool>
+ <int key="NSToolbarItemTag">0</int>
+ <bool key="NSToolbarIsUserRemovable">YES</bool>
+ <int key="NSToolbarItemVisibilityPriority">0</int>
+ </object>
+ <object class="NSToolbarItem" id="457655522">
+ <object class="NSMutableString" key="NSToolbarItemIdentifier">
+ <characters key="NS.bytes">6BDC61B7-F1A8-425A-A212-9CAC59C56385</characters>
+ </object>
+ <string key="NSToolbarItemLabel">Progress</string>
+ <string key="NSToolbarItemPaletteLabel">Progress</string>
+ <nil key="NSToolbarItemToolTip"/>
+ <object class="NSProgressIndicator" key="NSToolbarItemView" id="128750774">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">1289</int>
+ <object class="NSPSMatrix" key="NSDrawMatrix"/>
+ <string key="NSFrame">{{19, 14}, {16, 16}}</string>
+ <int key="NSpiFlags">28936</int>
+ <double key="NSMaxValue">1</double>
+ </object>
+ <nil key="NSToolbarItemImage"/>
+ <nil key="NSToolbarItemTarget"/>
+ <nil key="NSToolbarItemAction"/>
+ <string key="NSToolbarItemMinSize">{16, 16}</string>
+ <string key="NSToolbarItemMaxSize">{16, 16}</string>
+ <bool key="NSToolbarItemEnabled">YES</bool>
+ <bool key="NSToolbarItemAutovalidates">YES</bool>
+ <int key="NSToolbarItemTag">-1</int>
+ <bool key="NSToolbarIsUserRemovable">YES</bool>
+ <int key="NSToolbarItemVisibilityPriority">0</int>
+ </object>
+ <object class="NSToolbarItem" id="332491395">
+ <object class="NSMutableString" key="NSToolbarItemIdentifier">
+ <characters key="NS.bytes">73DE9F4B-73E2-4036-A134-2D9E029DA980</characters>
+ </object>
+ <string key="NSToolbarItemLabel">Go Back</string>
+ <string key="NSToolbarItemPaletteLabel">Go Back</string>
+ <nil key="NSToolbarItemToolTip"/>
+ <object class="NSButton" key="NSToolbarItemView" id="777930419">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{9, 14}, {32, 25}}</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="663899880">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="1064395332"/>
+ <reference key="NSControlView" ref="777930419"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">163</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="206098440">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSGoLeftTemplate</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <reference key="NSToolbarItemImage" ref="206098440"/>
+ <nil key="NSToolbarItemTarget"/>
+ <nil key="NSToolbarItemAction"/>
+ <string key="NSToolbarItemMinSize">{32, 25}</string>
+ <string key="NSToolbarItemMaxSize">{32, 25}</string>
+ <bool key="NSToolbarItemEnabled">YES</bool>
+ <bool key="NSToolbarItemAutovalidates">YES</bool>
+ <int key="NSToolbarItemTag">0</int>
+ <bool key="NSToolbarIsUserRemovable">YES</bool>
+ <int key="NSToolbarItemVisibilityPriority">0</int>
+ </object>
+ <object class="NSToolbarItem" id="818723416">
+ <object class="NSMutableString" key="NSToolbarItemIdentifier">
+ <characters key="NS.bytes">88C16109-D40F-4682-BCE4-CBEE2EDE32D2</characters>
+ </object>
+ <string key="NSToolbarItemLabel">Refresh</string>
+ <string key="NSToolbarItemPaletteLabel">Refresh</string>
+ <nil key="NSToolbarItemToolTip"/>
+ <object class="NSButton" key="NSToolbarItemView" id="35464578">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{10, 14}, {29, 25}}</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="366486485">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="1064395332"/>
+ <reference key="NSControlView" ref="35464578"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">163</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="443763357">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSRefreshTemplate</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <reference key="NSToolbarItemImage" ref="443763357"/>
+ <nil key="NSToolbarItemTarget"/>
+ <nil key="NSToolbarItemAction"/>
+ <string key="NSToolbarItemMinSize">{29, 25}</string>
+ <string key="NSToolbarItemMaxSize">{29, 25}</string>
+ <bool key="NSToolbarItemEnabled">YES</bool>
+ <bool key="NSToolbarItemAutovalidates">YES</bool>
+ <int key="NSToolbarItemTag">0</int>
+ <bool key="NSToolbarIsUserRemovable">YES</bool>
+ <int key="NSToolbarItemVisibilityPriority">0</int>
+ </object>
+ <object class="NSToolbarItem" id="928383107">
+ <object class="NSMutableString" key="NSToolbarItemIdentifier">
+ <characters key="NS.bytes">E1A9D32A-59E3-467B-9ABA-A95780416E69</characters>
+ </object>
+ <string key="NSToolbarItemLabel">Go Forward</string>
+ <string key="NSToolbarItemPaletteLabel">Go Forward</string>
+ <nil key="NSToolbarItemToolTip"/>
+ <object class="NSButton" key="NSToolbarItemView" id="95415629">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{19, 14}, {32, 25}}</string>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="767612038">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents"/>
+ <reference key="NSSupport" ref="1064395332"/>
+ <reference key="NSControlView" ref="95415629"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">163</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="163672266">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSGoRightTemplate</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
+ <reference key="NSToolbarItemImage" ref="163672266"/>
+ <nil key="NSToolbarItemTarget"/>
+ <nil key="NSToolbarItemAction"/>
+ <string key="NSToolbarItemMinSize">{32, 25}</string>
+ <string key="NSToolbarItemMaxSize">{32, 25}</string>
+ <bool key="NSToolbarItemEnabled">YES</bool>
+ <bool key="NSToolbarItemAutovalidates">YES</bool>
+ <int key="NSToolbarItemTag">0</int>
+ <bool key="NSToolbarIsUserRemovable">YES</bool>
+ <int key="NSToolbarItemVisibilityPriority">0</int>
+ </object>
+ </object>
+ </object>
+ <object class="NSArray" key="NSToolbarIBAllowedItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="332491395"/>
+ <reference ref="928383107"/>
+ <reference ref="818723416"/>
+ <reference ref="457655522"/>
+ <reference ref="16289946"/>
+ </object>
+ <object class="NSMutableArray" key="NSToolbarIBDefaultItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="332491395"/>
+ <reference ref="928383107"/>
+ <reference ref="818723416"/>
+ <reference ref="16289946"/>
+ <reference ref="457655522"/>
+ </object>
+ <object class="NSMutableArray" key="NSToolbarIBSelectableItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -56,92 +305,16 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{776, 608}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<string key="NSClassName">NSView</string>
</object>
- <object class="NSTextField" id="690456651">
- <reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">266</int>
- <string key="NSFrame">{{45, 618}, {699, 22}}</string>
- <reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
- <int key="NSViewLayerContentsRedrawPolicy">2</int>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="1023147716">
- <int key="NSCellFlags">-1804468671</int>
- <int key="NSCellFlags2">268436480</int>
- <string key="NSContents"/>
- <object class="NSFont" key="NSSupport" id="1064395332">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">13</double>
- <int key="NSfFlags">1044</int>
- </object>
- <reference key="NSControlView" ref="690456651"/>
- <bool key="NSDrawsBackground">YES</bool>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textBackgroundColor</string>
- <object class="NSColor" key="NSColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- </object>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textColor</string>
- <object class="NSColor" key="NSColor" id="365730878">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- </object>
- </object>
- </object>
- <object class="NSProgressIndicator" id="128750774">
- <reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">1289</int>
- <object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{752, 621}, {16, 16}}</string>
- <reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
- <int key="NSpiFlags">28936</int>
- <double key="NSMaxValue">1</double>
- </object>
- <object class="NSButton" id="35464578">
- <reference key="NSNextResponder" ref="1006"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{8, 616}, {29, 25}}</string>
- <reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="366486485">
- <int key="NSCellFlags">-2080244224</int>
- <int key="NSCellFlags2">134217728</int>
- <string key="NSContents"/>
- <reference key="NSSupport" ref="1064395332"/>
- <reference key="NSControlView" ref="35464578"/>
- <int key="NSButtonFlags">-2033434369</int>
- <int key="NSButtonFlags2">163</int>
- <object class="NSCustomResource" key="NSNormalImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSRefreshTemplate</string>
- </object>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- </object>
- </object>
</object>
- <string key="NSFrameSize">{776, 658}</string>
+ <string key="NSFrameSize">{776, 608}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
- <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
<string key="NSFrameAutosaveName">Main Window</string>
</object>
</object>
@@ -212,6 +385,46 @@
</object>
<int key="connectionID">37</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">backButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="777930419"/>
+ </object>
+ <int key="connectionID">46</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">forwardButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="95415629"/>
+ </object>
+ <int key="connectionID">47</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">goBack:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="332491395"/>
+ </object>
+ <int key="connectionID">61</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">goForward:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="928383107"/>
+ </object>
+ <int key="connectionID">62</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">toolbar</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="726585754"/>
+ </object>
+ <int key="connectionID">67</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -246,6 +459,7 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1006"/>
+ <reference ref="726585754"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -254,31 +468,82 @@
<reference key="object" ref="1006"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="690456651"/>
- <reference ref="128750774"/>
- <reference ref="35464578"/>
<reference ref="877383975"/>
</object>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">10</int>
- <reference key="object" ref="690456651"/>
+ <int key="objectID">9</int>
+ <reference key="object" ref="877383975"/>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">48</int>
+ <reference key="object" ref="726585754"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1023147716"/>
+ <reference ref="332491395"/>
+ <reference ref="928383107"/>
+ <reference ref="818723416"/>
+ <reference ref="16289946"/>
+ <reference ref="457655522"/>
</object>
- <reference key="parent" ref="1006"/>
+ <reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">11</int>
- <reference key="object" ref="1023147716"/>
- <reference key="parent" ref="690456651"/>
+ <int key="objectID">56</int>
+ <reference key="object" ref="332491395"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="777930419"/>
+ </object>
+ <reference key="parent" ref="726585754"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">21</int>
- <reference key="object" ref="128750774"/>
- <reference key="parent" ref="1006"/>
+ <int key="objectID">40</int>
+ <reference key="object" ref="777930419"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="663899880"/>
+ </object>
+ <reference key="parent" ref="332491395"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">41</int>
+ <reference key="object" ref="663899880"/>
+ <reference key="parent" ref="777930419"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="928383107"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="95415629"/>
+ </object>
+ <reference key="parent" ref="726585754"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">42</int>
+ <reference key="object" ref="95415629"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="767612038"/>
+ </object>
+ <reference key="parent" ref="928383107"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">43</int>
+ <reference key="object" ref="767612038"/>
+ <reference key="parent" ref="95415629"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">58</int>
+ <reference key="object" ref="818723416"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="35464578"/>
+ </object>
+ <reference key="parent" ref="726585754"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">23</int>
@@ -287,7 +552,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="366486485"/>
</object>
- <reference key="parent" ref="1006"/>
+ <reference key="parent" ref="818723416"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
@@ -295,9 +560,41 @@
<reference key="parent" ref="35464578"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">9</int>
- <reference key="object" ref="877383975"/>
- <reference key="parent" ref="1006"/>
+ <int key="objectID">59</int>
+ <reference key="object" ref="16289946"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="690456651"/>
+ </object>
+ <reference key="parent" ref="726585754"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="690456651"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1023147716"/>
+ </object>
+ <reference key="parent" ref="16289946"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="1023147716"/>
+ <reference key="parent" ref="690456651"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">60</int>
+ <reference key="object" ref="457655522"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="128750774"/>
+ </object>
+ <reference key="parent" ref="726585754"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">21</int>
+ <reference key="object" ref="128750774"/>
+ <reference key="parent" ref="457655522"/>
</object>
</object>
</object>
@@ -321,13 +618,22 @@
<string>21.IBViewIntegration.shadowOffsetWidth</string>
<string>23.IBPluginDependency</string>
<string>24.IBPluginDependency</string>
+ <string>40.IBPluginDependency</string>
+ <string>41.IBPluginDependency</string>
+ <string>42.IBPluginDependency</string>
+ <string>43.IBPluginDependency</string>
+ <string>48.IBEditorWindowLastContentRect</string>
+ <string>48.IBPluginDependency</string>
+ <string>56.CustomClassName</string>
+ <string>57.CustomClassName</string>
+ <string>58.CustomClassName</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>{{308, 154}, {776, 658}}</string>
+ <string>{{276, 45}, {776, 608}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{308, 154}, {776, 658}}</string>
+ <string>{{276, 45}, {776, 608}}</string>
<integer value="1"/>
<string>{196, 240}</string>
<string>{{202, 428}, {480, 270}}</string>
@@ -342,6 +648,15 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{422, 781}, {616, 0}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>MBToolbarItem</string>
+ <string>MBToolbarItem</string>
+ <string>MBToolbarItem</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -360,7 +675,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">37</int>
+ <int key="maxID">67</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -374,6 +689,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>fetch:</string>
<string>forceRepaint:</string>
+ <string>goBack:</string>
+ <string>goForward:</string>
<string>reload:</string>
<string>removeReinsertWebView:</string>
<string>showHideWebView:</string>
@@ -385,88 +702,33 @@
<string>id</string>
<string>id</string>
<string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="actionInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>fetch:</string>
- <string>forceRepaint:</string>
- <string>reload:</string>
- <string>removeReinsertWebView:</string>
- <string>showHideWebView:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBActionInfo">
- <string key="name">fetch:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">forceRepaint:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">reload:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">removeReinsertWebView:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo">
- <string key="name">showHideWebView:</string>
- <string key="candidateClassName">id</string>
- </object>
+ <string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>backButton</string>
<string>containerView</string>
+ <string>forwardButton</string>
<string>progressIndicator</string>
<string>reloadButton</string>
+ <string>toolbar</string>
<string>urlText</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSButton</string>
<string>NSView</string>
+ <string>NSButton</string>
<string>NSProgressIndicator</string>
<string>NSButton</string>
+ <string>NSToolbar</string>
<string>NSTextField</string>
</object>
</object>
- <object class="NSMutableDictionary" key="toOneOutletInfosByName">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>containerView</string>
- <string>progressIndicator</string>
- <string>reloadButton</string>
- <string>urlText</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBToOneOutletInfo">
- <string key="name">containerView</string>
- <string key="candidateClassName">NSView</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">progressIndicator</string>
- <string key="candidateClassName">NSProgressIndicator</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">reloadButton</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo">
- <string key="name">urlText</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- </object>
- </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">mac/BrowserWindowController.h</string>
@@ -480,6 +742,14 @@
<string key="minorKey"/>
</object>
</object>
+ <object class="IBPartialClassDescription">
+ <string key="className">MBToolbarItem</string>
+ <string key="superclassName">NSToolbarItem</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">MBToolbarItem.h</string>
+ </object>
+ </object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -681,7 +951,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="335804019">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSToolbarItem.h</string>
</object>
@@ -866,6 +1136,19 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSToolbar</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSToolbarItem</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="335804019"/>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
@@ -920,13 +1203,6 @@
<string key="NS.key.0">showWindow:</string>
<string key="NS.object.0">id</string>
</object>
- <object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">showWindow:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">showWindow:</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string>
@@ -936,20 +1212,27 @@
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1060" key="NS.object.0"/>
- </object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <string key="IBDocument.LastKnownRelativeProjectPath">../../MiniBrowser.xcodeproj</string>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../MiniBrowser.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
- <string key="NS.key.0">NSRefreshTemplate</string>
- <string key="NS.object.0">{10, 12}</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSGoLeftTemplate</string>
+ <string>NSGoRightTemplate</string>
+ <string>NSRefreshTemplate</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{9, 9}</string>
+ <string>{9, 9}</string>
+ <string>{10, 12}</string>
+ </object>
</object>
</data>
</archive>
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.h b/WebKitTools/MiniBrowser/mac/BrowserWindowController.h
index c638beb..aad8240 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.h
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.h
@@ -26,6 +26,9 @@
@interface BrowserWindowController : NSWindowController {
IBOutlet NSProgressIndicator *progressIndicator;
IBOutlet NSButton *reloadButton;
+ IBOutlet NSButton *backButton;
+ IBOutlet NSButton *forwardButton;
+ IBOutlet NSToolbar *toolbar;
IBOutlet NSTextField *urlText;
IBOutlet NSView *containerView;
@@ -35,6 +38,8 @@
- (IBAction)fetch:(id)sender;
- (IBAction)reload:(id)sender;
- (IBAction)forceRepaint:(id)sender;
+- (IBAction)goBack:(id)sender;
+- (IBAction)goForward:(id)sender;
- (IBAction)showHideWebView:(id)sender;
- (IBAction)removeReinsertWebView:(id)sender;
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 9d2f8a6..234c04c 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -33,6 +33,11 @@
- (void)didStartProgress;
- (void)didChangeProgress:(double)value;
- (void)didFinishProgress;
+- (void)didStartProvisionalLoadForFrame:(WKFrameRef)frame;
+- (void)didCommitLoadForFrame:(WKFrameRef)frame;
+- (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame;
+- (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame;
+- (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame;
@end
@implementation BrowserWindowController
@@ -98,6 +103,34 @@
[_webView setNeedsDisplay:YES];
}
+- (IBAction)goBack:(id)sender
+{
+ WKPageGoBack(_webView.pageRef);
+}
+
+- (IBAction)goForward:(id)sender
+{
+ WKPageGoForward(_webView.pageRef);
+}
+
+- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
+{
+ SEL action = [item action];
+
+ if (action == @selector(goBack:))
+ return _webView && WKPageCanGoBack(_webView.pageRef);
+
+ if (action == @selector(goForward:))
+ return _webView && WKPageCanGoForward(_webView.pageRef);
+
+ return YES;
+}
+
+- (void)validateToolbar
+{
+ [toolbar validateVisibleItems];
+}
+
- (BOOL)windowShouldClose:(id)sender
{
LOG(@"windowShouldClose");
@@ -121,22 +154,22 @@
static void _didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
- LOG(@"didStartProvisionalLoadForFrame");
+ [(BrowserWindowController *)clientInfo didStartProvisionalLoadForFrame:frame];
}
static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
- LOG(@"didReceiveServerRedirectForProvisionalLoadForFrame");
+ [(BrowserWindowController *)clientInfo didReceiveServerRedirectForProvisionalLoadForFrame:frame];
}
static void _didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
- LOG(@"didFailProvisionalLoadWithErrorForFrame");
+ [(BrowserWindowController *)clientInfo didFailProvisionalLoadWithErrorForFrame:frame];
}
static void _didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
- LOG(@"didCommitLoadForFrame");
+ [(BrowserWindowController *)clientInfo didCommitLoadForFrame:frame];
}
static void _didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
@@ -146,7 +179,7 @@ static void _didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void
static void _didFailLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
- LOG(@"didFailLoadWithErrorForFrame");
+ [(BrowserWindowController *)clientInfo didFailLoadWithErrorForFrame:frame];
}
static void _didReceiveTitleForFrame(WKPageRef page, WKStringRef title, WKFrameRef frame, const void *clientInfo)
@@ -191,15 +224,20 @@ static void _didBecomeResponsive(WKPageRef page, const void *clientInfo)
LOG(@"didBecomeResponsive");
}
+static void _didChangeBackForwardList(WKPageRef page, const void *clientInfo)
+{
+ [(BrowserWindowController *)clientInfo validateToolbar];
+}
+
#pragma mark Policy Client Callbacks
-static void _decidePolicyForNavigationAction(WKPageRef page, uint32_t navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo)
+static void _decidePolicyForNavigationAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo)
{
LOG(@"decidePolicyForNavigationAction");
WKFramePolicyListenerUse(listener);
}
-static void _decidePolicyForNewWindowAction(WKPageRef page, uint32_t navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo)
+static void _decidePolicyForNewWindowAction(WKPageRef page, WKFrameNavigationType navigationType, WKURLRef url, WKFrameRef frame, WKFramePolicyListenerRef listener, const void *clientInfo)
{
LOG(@"decidePolicyForNewWindowAction");
WKFramePolicyListenerUse(listener);
@@ -317,7 +355,8 @@ static void _didUpdateHistoryTitle(WKPageRef page, WKStringRef title, WKURLRef U
_didChangeProgress,
_didFinishProgress,
_didBecomeUnresponsive,
- _didBecomeResponsive
+ _didBecomeResponsive,
+ _didChangeBackForwardList
};
WKPageSetPageLoaderClient(_webView.pageRef, &loadClient);
@@ -369,6 +408,53 @@ static void _didUpdateHistoryTitle(WKPageRef page, WKStringRef title, WKURLRef U
[progressIndicator setDoubleValue:1.0];
}
+- (void)updateProvisionalURLForFrame:(WKFrameRef)frame
+{
+ WKURLRef url = WKFrameGetProvisionalURL(frame);
+ if (!url)
+ return;
+
+ CFURLRef cfSourceURL = WKURLCopyCFURL(0, url);
+ [urlText setStringValue:(NSString*)CFURLGetString(cfSourceURL)];
+ CFRelease(cfSourceURL);
+}
+
+- (void)didStartProvisionalLoadForFrame:(WKFrameRef)frame
+{
+ if (!WKFrameIsMainFrame(frame))
+ return;
+
+ [self updateProvisionalURLForFrame:frame];
+}
+
+- (void)didReceiveServerRedirectForProvisionalLoadForFrame:(WKFrameRef)frame
+{
+ if (!WKFrameIsMainFrame(frame))
+ return;
+
+ [self updateProvisionalURLForFrame:frame];
+}
+
+- (void)didFailProvisionalLoadWithErrorForFrame:(WKFrameRef)frame
+{
+ if (!WKFrameIsMainFrame(frame))
+ return;
+
+ [self updateProvisionalURLForFrame:frame];
+}
+
+- (void)didFailLoadWithErrorForFrame:(WKFrameRef)frame
+{
+ if (!WKFrameIsMainFrame(frame))
+ return;
+
+ [self updateProvisionalURLForFrame:frame];
+}
+
+- (void)didCommitLoadForFrame:(WKFrameRef)frame
+{
+}
+
- (void)loadURLString:(NSString *)urlString
{
// FIXME: We shouldn't have to set the url text here.
diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
index 1196cc4..09ac737 100644
--- a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
@@ -65,7 +65,11 @@ void BrowserView::resizeEvent(QResizeEvent* event)
void BrowserView::load(const QUrl& url)
{
- m_item->load(url);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
+ return m_item->load(QUrl::fromUserInput(url.toString()));
+#else
+ return m_item->load(url);
+#endif
}
QGraphicsWKView* BrowserView::view() const
@@ -84,6 +88,9 @@ BrowserWindow::BrowserWindow()
m_browser->setFocus(Qt::OtherFocusReason);
connect(m_addressBar, SIGNAL(returnPressed()), SLOT(changeLocation()));
+ connect(m_browser->view(), SIGNAL(loadProgress(int)), SLOT(loadProgress(int)));
+ connect(m_browser->view(), SIGNAL(titleChanged(const QString&)), SLOT(titleChanged(const QString&)));
+ connect(m_browser->view(), SIGNAL(urlChanged(const QUrl&)), SLOT(urlChanged(const QUrl&)));
QToolBar* bar = addToolBar("Navigation");
bar->addAction(m_browser->view()->page()->action(QWKPage::Back));
@@ -110,6 +117,35 @@ void BrowserWindow::changeLocation()
m_browser->load(string);
}
+void BrowserWindow::loadProgress(int progress)
+{
+ QColor backgroundColor = QApplication::palette().color(QPalette::Base);
+ QColor progressColor = QColor(120, 180, 240);
+ QPalette pallete = m_addressBar->palette();
+
+ if (progress <= 0 || progress >= 100)
+ pallete.setBrush(QPalette::Base, backgroundColor);
+ else {
+ QLinearGradient gradient(0, 0, width(), 0);
+ gradient.setColorAt(0, progressColor);
+ gradient.setColorAt(((double) progress) / 100, progressColor);
+ if (progress != 100)
+ gradient.setColorAt((double) progress / 100 + 0.001, backgroundColor);
+ pallete.setBrush(QPalette::Base, gradient);
+ }
+ m_addressBar->setPalette(pallete);
+}
+
+void BrowserWindow::titleChanged(const QString& title)
+{
+ setWindowTitle(title);
+}
+
+void BrowserWindow::urlChanged(const QUrl& url)
+{
+ m_addressBar->setText(url.toString());
+}
+
BrowserWindow::~BrowserWindow()
{
delete m_addressBar;
diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.h b/WebKitTools/MiniBrowser/qt/BrowserWindow.h
index 30c5122..fa11390 100644
--- a/WebKitTools/MiniBrowser/qt/BrowserWindow.h
+++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.h
@@ -64,6 +64,9 @@ public:
protected slots:
void changeLocation();
+ void loadProgress(int progress);
+ void titleChanged(const QString&);
+ void urlChanged(const QUrl&);
private:
BrowserView* m_browser;
diff --git a/WebKitTools/MiniBrowser/win/BrowserWindow.cpp b/WebKitTools/MiniBrowser/win/BrowserWindow.cpp
index 861d641..e519b00 100644
--- a/WebKitTools/MiniBrowser/win/BrowserWindow.cpp
+++ b/WebKitTools/MiniBrowser/win/BrowserWindow.cpp
@@ -28,6 +28,7 @@
#include "MiniBrowser.h"
#include "Resource.h"
+#include <assert.h>
#include <commctrl.h>
#include <shlwapi.h>
#include <vector>
diff --git a/WebKitTools/MiniBrowser/win/MiniBrowser.rc b/WebKitTools/MiniBrowser/win/MiniBrowser.rc
index 6ad0bdc..0ff88b0 100644
--- a/WebKitTools/MiniBrowser/win/MiniBrowser.rc
+++ b/WebKitTools/MiniBrowser/win/MiniBrowser.rc
@@ -1,16 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
+#include "winresrc.h"
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index 18a557b..57aab45 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -68,7 +68,7 @@ my @features = (
define => "ENABLE_LINK_PREFETCH", default => 0, value => \$linkPrefetchSupport },
{ option => "3d-canvas", desc => "Toggle 3D canvas support",
- define => "ENABLE_3D_CANVAS", default => (isAppleMacWebKit() && !isTiger()), value => \$threeDCanvasSupport },
+ define => "ENABLE_3D_CANVAS", default => (isAppleMacWebKit() && !isTiger() && !isLeopard()), value => \$threeDCanvasSupport },
{ option => "3d-rendering", desc => "Toggle 3D rendering support",
define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() && !isTiger()), value => \$threeDRenderingSupport },
diff --git a/WebKitTools/Scripts/build-webkittestrunner b/WebKitTools/Scripts/build-webkittestrunner
index bb059e1..dbc36d1 100755
--- a/WebKitTools/Scripts/build-webkittestrunner
+++ b/WebKitTools/Scripts/build-webkittestrunner
@@ -61,6 +61,8 @@ chdir "WebKitTools/WebKitTestRunner" or die;
my $result;
if (isAppleMacWebKit()) {
$result = buildXCodeProject("WebKitTestRunner", $clean, XcodeOptions(), @ARGV);
+} elsif (isAppleWinWebKit()) {
+ $result = buildVisualStudioProject("WebKitTestRunner.sln", $clean);
} else {
die "WebKitTestRunner is not supported on this platform.\n";
}
diff --git a/WebKitTools/Scripts/check-header-includes b/WebKitTools/Scripts/check-header-includes
deleted file mode 100755
index 568859e..0000000
--- a/WebKitTools/Scripts/check-header-includes
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/python
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# This script looks for unnecessary #includes in the given header file,
-# or in all header files that can be recursively found in the given directory.
-
-import os
-import re
-import sys
-
-headerFile = re.compile(r'\.h$')
-includeLine = re.compile(r'^#include ("|<wtf/)([A-Z]\w+).h[>"]')
-smartPointerString = "(ListRefPtr|OwnArrayPtr|OwnPtr|PassOwnPtr|PassRefPtr|RefPtr)<className>"
-allowedIncludes = set(["Forward", "PlatformString", "StringHash", "Threading"])
-
-# Check if 'line' needs any class in 'unnecessaryIncludes' to be included in the header file.
-def checkLine(line, unnecessaryIncludes):
- unnecessaryIncludesCopy = unnecessaryIncludes.copy()
- for includedClass in unnecessaryIncludesCopy:
- if re.search(includedClass, line):
- if re.search(includedClass + "\*", line):
- continue
-
- smartPointerClassString = smartPointerString.replace("className", includedClass)
- if re.search(smartPointerClassString, line):
- continue
-
- unnecessaryIncludes.remove(includedClass)
-
-
-# Look for unnecessary includes in the given file
-def checkFile(fileName):
- if headerFile.search(fileName):
- f = open(fileName, "r")
- unnecessaryIncludes = set()
- for line in f:
- match = includeLine.match(line)
- if match:
- className = match.group(2)
- if className == "PlatformString":
- unnecessaryIncludes.add("String")
- elif className not in allowedIncludes:
- unnecessaryIncludes.add(className)
- else:
- checkLine(line, unnecessaryIncludes)
-
- if len(unnecessaryIncludes) > 0:
- print fileName
- for includedClass in unnecessaryIncludes:
- print includedClass
- print
-
-
-# If 'path' is a file, check if it has unnecessary includes.
-# If 'path' is a directory, traverse it recursively and look
-# for unnecessary includes in all header files.
-def checkPath(path):
- if os.path.isfile(path):
- checkFile(path)
- elif os.path.isdir(path):
- dirList = os.listdir(path)
- for dirName in dirList:
- checkPath(path + "/" + dirName)
- else:
- print path, "is not a file or directory."
-
-
-def main():
- if len(sys.argv) <= 1:
- print "Usage:", sys.argv[0], "<path>"
- return -1
-
- checkPath(sys.argv[1])
-
-
-if __name__ == "__main__":
- main()
diff --git a/WebKitTools/Scripts/old-run-webkit-tests b/WebKitTools/Scripts/old-run-webkit-tests
index 30c585f..88c0a05 100755
--- a/WebKitTools/Scripts/old-run-webkit-tests
+++ b/WebKitTools/Scripts/old-run-webkit-tests
@@ -532,6 +532,7 @@ if (!$has3DRendering) {
if (!checkWebCoreFeatureSupport("3D Canvas", 0)) {
$ignoredDirectories{'fast/canvas/webgl'} = 1;
+ $ignoredDirectories{'compositing/webgl'} = 1;
}
if (checkWebCoreFeatureSupport("WML", 0)) {
@@ -1635,6 +1636,12 @@ sub testCrashedOrTimedOut($$$$$)
kill 9, $dumpToolPID unless $didCrash;
closeDumpTool();
+
+ return unless isCygwin() && !$didCrash && $base =~ /^http/;
+ # On Cygwin, http tests timing out can be a symptom of a non-responsive httpd.
+ # If we timed out running an http test, try restarting httpd.
+ $isHttpdOpen = !closeHTTPD();
+ configureAndOpenHTTPDIfNeeded();
}
sub printFailureMessageForTest($$)
diff --git a/WebKitTools/Scripts/sunspider-compare-results b/WebKitTools/Scripts/sunspider-compare-results
index 3446cd8..8c3f7f5 100755
--- a/WebKitTools/Scripts/sunspider-compare-results
+++ b/WebKitTools/Scripts/sunspider-compare-results
@@ -55,7 +55,7 @@ Usage: $programName [options] FILE FILE
--parse-only Use the parse-only benchmark suite. Same as --suite=parse-only
EOF
-GetOptions('root=s' => sub { my ($argName, $value); setConfigurationProductDir(Cwd::abs_path($value)); },
+GetOptions('root=s' => sub { my ($argName, $value) = @_; setConfigurationProductDir(Cwd::abs_path($value)); },
'suite=s' => \$suite,
'ubench' => \$ubench,
'v8' => \$v8,
diff --git a/WebKitTools/Scripts/update-webkit-chromium b/WebKitTools/Scripts/update-webkit-chromium
index 836e30e..8458f83 100755
--- a/WebKitTools/Scripts/update-webkit-chromium
+++ b/WebKitTools/Scripts/update-webkit-chromium
@@ -29,6 +29,7 @@
# Update script for the WebKit Chromium Port.
use File::Path;
+use Getopt::Long;
chdir("WebKit/chromium") or die $!;
@@ -47,11 +48,18 @@ if (`gclient --version`) {
if (! -e ".gclient") {
# If .gclient configuration file doesn't exist, create it.
print "Configuring gclient...\n";
- system($gclientPath,
+ system($gclientPath,
"config",
"--spec=solutions=[{'name':'./','url':None}]") == 0 or die $!;
}
+my $force = 0;
+GetOptions(
+ 'force' => \$force,
+);
+
# Execute gclient sync.
print "Updating chromium port dependencies using gclient...\n";
-system($gclientPath, "sync", "--force") == 0 or die $!;
+my @gclientArgs = ($gclientPath, "sync");
+push @gclientArgs, "--force" if $force;
+system(@gclientArgs) == 0 or die $!;
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 674dc8c..d95f2a1 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -237,7 +237,7 @@ sub determineNumberOfCPUs
if (isLinux()) {
# First try the nproc utility, if it exists. If we get no
# results fall back to just interpretting /proc directly.
- $numberOfCPUs = `nproc 2> /dev/null`;
+ chomp($numberOfCPUs = `nproc 2> /dev/null`);
if ($numberOfCPUs eq "") {
$numberOfCPUs = (grep /processor/, `cat /proc/cpuinfo`);
}
@@ -258,7 +258,8 @@ sub jscPath($)
my ($productDir) = @_;
my $jscName = "jsc";
$jscName .= "_debug" if (isCygwin() && ($configuration eq "Debug"));
- return "$productDir/$jscName";
+ return "$productDir/$jscName" if -e "$productDir/$jscName";
+ return "$productDir/JavaScriptCore.framework/Resources/$jscName";
}
sub argumentsForConfiguration()
diff --git a/WebKitTools/Scripts/webkitperl/httpd.pm b/WebKitTools/Scripts/webkitperl/httpd.pm
index 240f368..b415db6 100644
--- a/WebKitTools/Scripts/webkitperl/httpd.pm
+++ b/WebKitTools/Scripts/webkitperl/httpd.pm
@@ -154,19 +154,12 @@ sub openHTTPD(@)
close PIDFILE;
if (0 != kill 0, $oldPid) {
print "\nhttpd is already running: pid $oldPid, killing...\n";
- kill 15, $oldPid;
-
- my $retryCount = 20;
- while ((kill(0, $oldPid) != 0) && $retryCount) {
- sleep 1;
- --$retryCount;
- }
-
- if (!$retryCount) {
+ if (!killHTTPD($oldPid)) {
cleanUp();
die "Timed out waiting for httpd to quit";
}
}
+ unlink $httpdPidFile;
}
$httpdPath = "/usr/sbin/httpd" unless ($httpdPath);
@@ -196,22 +189,31 @@ sub openHTTPD(@)
sub closeHTTPD
{
close HTTPDIN;
- my $retryCount = 20;
- if ($httpdPid) {
- kill 15, $httpdPid;
- while (-f $httpdPidFile && $retryCount) {
- sleep 1;
- --$retryCount;
- }
- }
+ my $succeeded = killHTTPD($httpdPid);
cleanUp();
- if (!$retryCount) {
- print STDERR "Timed out waiting for httpd to terminate!\n";
+ unless ($succeeded) {
+ print STDERR "Timed out waiting for httpd to terminate!\n" unless $succeeded;
return 0;
}
return 1;
}
+sub killHTTPD
+{
+ my ($pid) = @_;
+
+ return 1 unless $pid;
+
+ kill 15, $pid;
+
+ my $retryCount = 20;
+ while (kill(0, $pid) && $retryCount) {
+ sleep 1;
+ --$retryCount;
+ }
+ return $retryCount != 0;
+}
+
sub setShouldWaitForUserInterrupt
{
$waitForUserInterrupt = 1;
@@ -219,7 +221,16 @@ sub setShouldWaitForUserInterrupt
sub handleInterrupt
{
- closeHTTPD();
+ # On Cygwin, when we receive a signal Apache is still running, so we need
+ # to kill it. On other platforms (at least Mac OS X), Apache will have
+ # already been killed, and trying to kill it again will cause us to hang.
+ # All we need to do in this case is clean up our own files.
+ if (isCygwin()) {
+ closeHTTPD();
+ } else {
+ cleanUp();
+ }
+
print "\n";
exit(1);
}
diff --git a/WebKitTools/Scripts/webkitpy/common/config/committers.py b/WebKitTools/Scripts/webkitpy/common/config/committers.py
index e5f0a50..0354981 100644
--- a/WebKitTools/Scripts/webkitpy/common/config/committers.py
+++ b/WebKitTools/Scripts/webkitpy/common/config/committers.py
@@ -74,6 +74,7 @@ committers_unable_to_review = [
Committer("Andrei Popescu", "andreip@google.com", "andreip"),
Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"], "proton"),
Committer("Andras Becsi", "abecsi@webkit.org", "bbandix"),
+ Committer("Andreas Kling", "andreas.kling@nokia.com", "kling"),
Committer("Andy Estes", "aestes@apple.com", "estes"),
Committer("Anthony Ricaud", "rik@webkit.org", "rik"),
Committer("Anton Muhin", "antonm@chromium.org", "antonm"),
@@ -132,6 +133,7 @@ committers_unable_to_review = [
Committer("Keishi Hattori", "keishi@webkit.org", "keishi"),
Committer("Kelly Norton", "knorton@google.com"),
Committer("Kenneth Russell", "kbr@google.com"),
+ Committer("Kent Hansen", "kent.hansen@nokia.com", "khansen"),
Committer("Kinuko Yasuda", "kinuko@chromium.org", "kinuko"),
Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"),
Committer("Leandro Pereira", ["leandro@profusion.mobi", "leandro@webkit.org"], "acidx"),
@@ -165,7 +167,7 @@ committers_unable_to_review = [
Committer("Tony Gentilcore", "tonyg@chromium.org", "tonyg-cr"),
Committer("Trey Matteson", "trey@usa.net", "trey"),
Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]),
- Committer("Victor Wang", "victorw@chromium.org"),
+ Committer("Victor Wang", "victorw@chromium.org", "victorw"),
Committer("Vitaly Repeshko", "vitalyr@chromium.org"),
Committer("William Siegrist", "wsiegrist@apple.com", "wms"),
Committer("Xiaomei Ji", "xji@chromium.org", "xji"),
@@ -174,7 +176,7 @@ committers_unable_to_review = [
Committer("Yong Li", ["yong.li.webkit@gmail.com", "yong.li@torchmobile.com"], "yong"),
Committer("Yongjun Zhang", "yongjun.zhang@nokia.com"),
Committer("Yuzo Fujishima", "yuzo@google.com", "yuzo"),
- Committer("Zhenyao Mo", "zmo@google.com"),
+ Committer("Zhenyao Mo", "zmo@google.com", "zhenyao"),
Committer("Zoltan Herczeg", "zherczeg@webkit.org", "zherczeg"),
Committer("Zoltan Horvath", "zoltan@webkit.org", "zoltan"),
]
diff --git a/WebKitTools/Scripts/webkitpy/common/net/statusserver.py b/WebKitTools/Scripts/webkitpy/common/net/statusserver.py
index 0bd68d1..c8fced6 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/statusserver.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/statusserver.py
@@ -39,7 +39,7 @@ _log = logging.getLogger("webkitpy.common.net.statusserver")
class StatusServer:
- default_host = "webkit-commit-queue.appspot.com"
+ default_host = "queues.webkit.org"
def __init__(self, host=default_host):
self.set_host(host)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index e1b23ac..d226e64 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -410,6 +410,8 @@ class Port(object):
"""Relative unix-style path for a filename under the LayoutTests
directory. Filenames outside the LayoutTests directory should raise
an error."""
+ # FIXME This should assert() here but cannot due to printing_unittest.Testprinter
+ # assert(filename.startswith(self.layout_tests_dir()))
return filename[len(self.layout_tests_dir()) + 1:]
def results_directory(self):
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py
index c9805d6..2745cce 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/http_server_base.py
@@ -67,8 +67,8 @@ class HttpServerBase(object):
try:
response = urllib.urlopen(url)
_log.debug("Server running at %s" % url)
- except IOError:
- _log.debug("Server NOT running at %s" % url)
+ except IOError, e:
+ _log.debug("Server NOT running at %s: %s" % (url, e))
return False
return True
diff --git a/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py b/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py
index 3321293..1cb554a 100644
--- a/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py
+++ b/WebKitTools/Scripts/webkitpy/thirdparty/__init__.py
@@ -95,8 +95,8 @@ installer.install(url="http://surfnet.dl.sourceforge.net/project/python-irclib/p
pywebsocket_dir = os.path.join(autoinstalled_dir, "pywebsocket")
installer = AutoInstaller(target_dir=pywebsocket_dir)
-installer.install(url="http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.5.tar.gz",
- url_subpath="pywebsocket-0.5/src/mod_pywebsocket")
+installer.install(url="http://pywebsocket.googlecode.com/files/mod_pywebsocket-0.5.1.tar.gz",
+ url_subpath="pywebsocket-0.5.1/src/mod_pywebsocket")
readme_path = os.path.join(autoinstalled_dir, "README")
if not os.path.exists(readme_path):
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py b/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py
index 71c3719..9bdec8f 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/__init__.py
@@ -1,4 +1,5 @@
# Required for Python to search this directory for module files
from webkitpy.tool.commands.prettydiff import PrettyDiff
+from webkitpy.tool.commands.rebaseline import Rebaseline
# FIXME: Add the rest of the commands here.
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queries.py b/WebKitTools/Scripts/webkitpy/tool/commands/queries.py
index 645060c..91ce5e9 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queries.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queries.py
@@ -273,6 +273,7 @@ class FailureReason(AbstractDeclarativeCommand):
return 1
return self._explain_failures_for_builder(builder, start_revision=int(start_revision))
+
class TreeStatus(AbstractDeclarativeCommand):
name = "tree-status"
help_text = "Print the status of the %s buildbots" % BuildBot.default_host
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py
new file mode 100644
index 0000000..78e06c6
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -0,0 +1,113 @@
+# Copyright (c) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os.path
+import re
+import shutil
+import urllib
+
+from webkitpy.common.net.buildbot import BuildBot, LayoutTestResults
+from webkitpy.common.system.user import User
+from webkitpy.layout_tests.port import factory
+from webkitpy.tool.grammar import pluralize
+from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+
+
+# FIXME: I'm not sure where this logic should go in the end.
+# For now it's here, until we have a second need for it.
+class BuilderToPort(object):
+ _builder_name_to_port_name = {
+ r"SnowLeopard": "mac-snowleopard",
+ r"Leopard": "mac-leopard",
+ r"Tiger": "mac-tiger",
+ r"Windows": "win",
+ r"GTK": "gtk",
+ r"Qt": "qt",
+ r"Chromium Mac": "chromium-mac",
+ r"Chromium Linux": "chromium-linux",
+ r"Chromium Win": "chromium-win",
+ }
+
+ def _port_name_for_builder_name(self, builder_name):
+ for regexp, port_name in self._builder_name_to_port_name.items():
+ if re.match(regexp, builder_name):
+ return port_name
+
+ def port_for_builder(self, builder_name):
+ port_name = self._port_name_for_builder_name(builder_name)
+ assert(port_name) # Need to update _builder_name_to_port_name
+ port = factory.get(port_name)
+ assert(port) # Need to update _builder_name_to_port_name
+ return port
+
+
+class Rebaseline(AbstractDeclarativeCommand):
+ name = "rebaseline"
+ help_text = "Replaces local expected.txt files with new results from build bots"
+
+ # FIXME: This should share more code with FailureReason._builder_to_explain
+ def _builder_to_pull_from(self):
+ builder_statuses = self.tool.buildbot.builder_statuses()
+ red_statuses = [status for status in builder_statuses if not status["is_green"]]
+ print "%s failing" % (pluralize("builder", len(red_statuses)))
+ builder_choices = [status["name"] for status in red_statuses]
+ chosen_name = self.tool.user.prompt_with_list("Which builder to pull results from:", builder_choices)
+ # FIXME: prompt_with_list should really take a set of objects and a set of names and then return the object.
+ for status in red_statuses:
+ if status["name"] == chosen_name:
+ return (self.tool.buildbot.builder_with_name(chosen_name), status["build_number"])
+
+ def _replace_expectation_with_remote_result(self, local_file, remote_file):
+ (downloaded_file, headers) = urllib.urlretrieve(remote_file)
+ shutil.move(downloaded_file, local_file)
+
+ def _tests_to_update(self, build):
+ parsed_results = build.layout_test_results().parsed_results()
+ # FIXME: This probably belongs as API on LayoutTestResults
+ # but .failing_tests() already means something else.
+ return parsed_results[LayoutTestResults.fail_key]
+
+ def _results_url_for_test(self, build, test):
+ test_base = os.path.splitext(test)[0]
+ actual_path = test_base + "-actual.txt"
+ return build.results_url() + "/" + actual_path
+
+ def execute(self, options, args, tool):
+ builder, build_number = self._builder_to_pull_from()
+ build = builder.build(build_number)
+ port = BuilderToPort().port_for_builder(builder.name())
+
+ for test in self._tests_to_update(build):
+ results_url = self._results_url_for_test(build, test)
+ # Port operates with absolute paths.
+ absolute_path = os.path.join(port.layout_tests_dir(), test)
+ expected_file = port.expected_filename(absolute_path, ".txt")
+ print test
+ self._replace_expectation_with_remote_result(expected_file, results_url)
+
+ # FIXME: We should handle new results too.
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
new file mode 100644
index 0000000..d6582a7
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from webkitpy.tool.commands.rebaseline import BuilderToPort
+
+
+class BuilderToPortTest(unittest.TestCase):
+ def test_port_for_builder(self):
+ converter = BuilderToPort()
+ port = converter.port_for_builder("Leopard Intel Debug (Tests)")
+ self.assertEqual(port.name(), "mac-leopard")
diff --git a/WebKitTools/Scripts/webkitpy/tool/mocktool.py b/WebKitTools/Scripts/webkitpy/tool/mocktool.py
index a467364..2114c30 100644
--- a/WebKitTools/Scripts/webkitpy/tool/mocktool.py
+++ b/WebKitTools/Scripts/webkitpy/tool/mocktool.py
@@ -332,6 +332,9 @@ class MockBuilder(object):
def name(self):
return self._name
+ def results_url(self):
+ return "http://example.com/builders/%s/results/" % self.name()
+
def force_build(self, username, comments):
log("MOCK: force_build: name=%s, username=%s, comments=%s" % (
self._name, username, comments))
diff --git a/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig b/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig
index af3f4e6..7ceab07 100644
--- a/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig
+++ b/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig
@@ -66,3 +66,6 @@ SDKROOT_1060_1050 = macosx10.5;
SDKROOT_1070_1040 = macosx10.4;
SDKROOT_1070_1050 = macosx10.5;
SDKROOT_1070_1060 = macosx10.6;
+
+WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
+WEBCORE_PRIVATE_HEADERS_DIR = $(WEBKIT_UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
diff --git a/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig b/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
index 8b156e8..41600b1 100644
--- a/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
+++ b/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
@@ -38,3 +38,5 @@ MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
MACOSX_DEPLOYMENT_TARGET_1070 = 10.7;
+
+WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(BUILT_PRODUCTS_DIR);
diff --git a/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops b/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
new file mode 100644
index 0000000..20a4852
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\..&quot;;&quot;$(ProjectDir)\..\Bindings&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources\&quot;"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitTools/WebKitTestRunner/DerivedSources.make b/WebKitTools/WebKitTestRunner/DerivedSources.make
new file mode 100644
index 0000000..6134380
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/DerivedSources.make
@@ -0,0 +1,49 @@
+# Copyright (C) 2010 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.
+
+VPATH = \
+ $(WebKitTestRunner)/InjectedBundle/Bindings \
+#
+
+INTERFACES = \
+ LayoutTestController \
+#
+
+SCRIPTS = \
+ $(WebCoreScripts)/CodeGenerator.pm \
+ $(WebKitTestRunner)/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \
+ $(WebCoreScripts)/IDLParser.pm \
+ $(WebCoreScripts)/IDLStructure.pm \
+ $(WebCoreScripts)/generate-bindings.pl \
+#
+
+.PHONY : all
+
+JS%.h JS%.cpp : %.idl $(SCRIPTS)
+ @echo Generating bindings for $*...
+ @perl -I $(WebCoreScripts) -I $(WebKitTestRunner)/InjectedBundle/Bindings $(WebCoreScripts)/generate-bindings.pl --defines "" --include InjectedBundle/Bindings --outputDir . --generator TestRunner $<
+
+all : \
+ $(INTERFACES:%=JS%.h) \
+ $(INTERFACES:%=JS%.cpp) \
+#
diff --git a/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h b/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h
new file mode 100644
index 0000000..aedd784
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/GetPtr.h>
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h b/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h
new file mode 100644
index 0000000..5ee1276
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 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 ActivateFonts_h
+#define ActivateFonts_h
+
+namespace WTR {
+
+void activateFonts();
+
+} // namespace WTR
+
+#endif // ActivateFonts_h
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
new file mode 100644
index 0000000..d72d4fc
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
@@ -0,0 +1,525 @@
+# Copyright (C) 2010 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.
+
+use strict;
+use warnings;
+use File::Spec;
+
+package CodeGeneratorTestRunner;
+
+sub new
+{
+ my ($class, $codeGenerator, $outputDir) = @_;
+
+ my $reference = {
+ codeGenerator => $codeGenerator,
+ outputDir => $outputDir,
+ };
+
+ bless($reference, $class);
+ return $reference;
+}
+
+sub GenerateModule
+{
+}
+
+sub GenerateInterface
+{
+ my ($self, $interface, $defines) = @_;
+
+ foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
+ open(FILE, ">", File::Spec->catfile($$self{outputDir}, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
+ print FILE @{$$file{contents}};
+ close(FILE) or die "Failed to close $$file{name} after writing: $!";
+ }
+}
+
+sub finish
+{
+}
+
+sub _className
+{
+ my ($idlType) = @_;
+
+ return "JS" . _implementationClassName($idlType);
+}
+
+sub _classRefGetter
+{
+ my ($self, $idlType) = @_;
+ return $$self{codeGenerator}->WK_lcfirst(_implementationClassName($idlType)) . "Class";
+}
+
+sub _fileHeaderString
+{
+ my ($filename) = @_;
+
+ # FIXME: We should pull header out of the IDL file to get the copyright
+ # year(s) right.
+ return <<EOF;
+/*
+ * Copyright (C) 2010 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.
+ */
+EOF
+}
+
+sub _generateHeaderFile
+{
+ my ($self, $interface) = @_;
+
+ my @contents = ();
+
+ my $idlType = $interface->name;
+ my $className = _className($idlType);
+ my $implementationClassName = _implementationClassName($idlType);
+ my $filename = $className . ".h";
+
+ push(@contents, _fileHeaderString($filename));
+
+ my $parentClassName = _parentClassName($interface);
+
+ push(@contents, <<EOF);
+
+#ifndef ${className}_h
+#define ${className}_h
+
+#include "${parentClassName}.h"
+EOF
+ push(@contents, <<EOF);
+
+namespace WTR {
+
+class ${implementationClassName};
+
+class ${className} : public ${parentClassName} {
+public:
+ static JSClassRef @{[$self->_classRefGetter($idlType)]}();
+
+private:
+ static const JSStaticFunction* staticFunctions();
+ static const JSStaticValue* staticValues();
+EOF
+
+ if (my @functions = @{$interface->functions}) {
+ push(@contents, "\n // Functions\n\n");
+ foreach my $function (@functions) {
+ push(@contents, " static JSValueRef @{[$function->signature->name]}(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*);\n");
+ }
+ }
+
+ if (my @attributes = @{$interface->attributes}) {
+ push(@contents, "\n // Attributes\n\n");
+ foreach my $attribute (@attributes) {
+ push(@contents, " static JSValueRef @{[$self->_getterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*);\n");
+ push(@contents, " static bool @{[$self->_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n") unless $attribute->type =~ /^readonly/;
+ }
+ }
+
+ push(@contents, <<EOF);
+};
+
+${implementationClassName}* to${implementationClassName}(JSContextRef, JSValueRef);
+
+} // namespace WTR
+
+#endif // ${className}_h
+EOF
+
+ return { name => $filename, contents => \@contents };
+}
+
+sub _generateImplementationFile
+{
+ my ($self, $interface) = @_;
+
+ my @contentsPrefix = ();
+ my %contentsIncludes = ();
+ my @contents = ();
+
+ my $idlType = $interface->name;
+ my $className = _className($idlType);
+ my $implementationClassName = _implementationClassName($idlType);
+ my $filename = $className . ".cpp";
+
+ push(@contentsPrefix, _fileHeaderString($filename));
+
+ my $classRefGetter = $self->_classRefGetter($idlType);
+ my $parentClassName = _parentClassName($interface);
+
+ $contentsIncludes{"${className}.h"} = 1;
+ $contentsIncludes{"${implementationClassName}.h"} = 1;
+
+ push(@contentsPrefix, <<EOF);
+
+EOF
+
+ push(@contents, <<EOF);
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <wtf/GetPtr.h>
+
+namespace WTR {
+
+${implementationClassName}* to${implementationClassName}(JSContextRef context, JSValueRef value)
+{
+ if (!context || !value || !${className}::${classRefGetter}() || !JSValueIsObjectOfClass(context, value, ${className}::${classRefGetter}()))
+ return 0;
+ return static_cast<${implementationClassName}*>(JSWrapper::unwrap(context, value));
+}
+
+JSClassRef ${className}::${classRefGetter}()
+{
+ static JSClassRef jsClass;
+ if (!jsClass) {
+ JSClassDefinition definition = kJSClassDefinitionEmpty;
+ definition.className = "${idlType}";
+ definition.parentClass = @{[$self->_parentClassRefGetterExpression($interface)]};
+ definition.staticValues = staticValues();
+ definition.staticFunctions = staticFunctions();
+EOF
+
+ push(@contents, " definition.initialize = initialize;\n") unless _parentInterface($interface);
+ push(@contents, " definition.finalize = finalize;\n") unless _parentInterface($interface);
+
+ push(@contents, <<EOF);
+ jsClass = JSClassCreate(&definition);
+ }
+ return jsClass;
+}
+
+EOF
+
+ push(@contents, $self->_staticFunctionsGetterImplementation($interface), "\n");
+ push(@contents, $self->_staticValuesGetterImplementation($interface));
+
+ if (my @functions = @{$interface->functions}) {
+ push(@contents, "\n// Functions\n");
+
+ foreach my $function (@functions) {
+ push(@contents, <<EOF);
+
+JSValueRef ${className}::@{[$function->signature->name]}(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, thisObject);
+ if (!impl)
+ return JSValueMakeUndefined(context);
+EOF
+ my @parameters = ();
+ my @specifiedParameters = @{$function->parameters};
+
+ push(@contents, "\n") if scalar @specifiedParameters;
+
+ $self->_includeHeaders(\%contentsIncludes, $function->signature->type, $function->signature);
+
+ foreach my $i (0..$#specifiedParameters) {
+ my $parameter = $specifiedParameters[$i];
+
+ $self->_includeHeaders(\%contentsIncludes, $idlType, $parameter);
+
+ push(@contents, " " . $self->_platformTypeVariableDeclaration($parameter, $parameter->name, "arguments[$i]", "argumentCount > $i") . "\n");
+
+ push(@parameters, $self->_paramterExpression($parameter));
+ }
+
+ my $isVoidReturn = $function->signature->type eq "void";
+ my $functionName = "impl->" . $function->signature->name;
+ my $functionCall = $functionName . "(" . join(", ", @parameters) . ")";
+
+ push(@contents, "\n") unless scalar @specifiedParameters == 1;
+ push(@contents, " ${functionCall};\n\n") if $isVoidReturn;
+ push(@contents, " return " . $self->_returnExpression($function->signature, $functionCall) . ";\n}\n");
+ }
+ }
+
+ if (my @attributes = @{$interface->attributes}) {
+ push(@contents, "\n// Attributes\n");
+ foreach my $attribute (@attributes) {
+ $self->_includeHeaders(\%contentsIncludes, $attribute->signature->type, $attribute->signature);
+
+ my $getterName = $self->_getterName($attribute);
+ my $getterExpression = "impl->${getterName}()";
+
+ push(@contents, <<EOF);
+
+JSValueRef ${className}::${getterName}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, object);
+ if (!impl)
+ return JSValueMakeUndefined(context);
+
+ return @{[$self->_returnExpression($attribute->signature, $getterExpression)]};
+}
+EOF
+
+ unless ($attribute->type =~ /^readonly/) {
+ push(@contents, <<EOF);
+
+bool ${className}::@{[$self->_setterName($attribute)]}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef value, JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, object);
+ if (!impl)
+ return false;
+
+EOF
+
+ my $platformValue = $self->_platformTypeConstructor($attribute->signature, "value");
+
+ push(@contents, <<EOF);
+ impl->@{[$self->_setterName($attribute)]}(${platformValue});
+
+ return true;
+}
+EOF
+ }
+ }
+ }
+
+ push(@contents, <<EOF);
+
+} // namespace WTR
+
+EOF
+
+ unshift(@contents, map { "#include \"$_\"\n" } sort keys(%contentsIncludes));
+ unshift(@contents, @contentsPrefix);
+
+ return { name => $filename, contents => \@contents };
+}
+
+sub _getterName
+{
+ my ($self, $attribute) = @_;
+
+ my $signature = $attribute->signature;
+ my $name = $signature->name;
+
+ return $name;
+}
+
+sub _includeHeaders
+{
+ my ($self, $headers, $idlType, $signature) = @_;
+
+ return unless defined $idlType;
+ return if $idlType eq "boolean" or $$self{codeGenerator}->IsNonPointerType($idlType);
+
+ $$headers{_className($idlType) . ".h"} = 1;
+ $$headers{_implementationClassName($idlType) . ".h"} = 1;
+}
+
+sub _implementationClassName
+{
+ my ($idlType) = @_;
+
+ return $idlType;
+}
+
+sub _parentClassName
+{
+ my ($interface) = @_;
+
+ my $parentInterface = _parentInterface($interface);
+ return $parentInterface ? _className($parentInterface) : "JSWrapper";
+}
+
+sub _parentClassRefGetterExpression
+{
+ my ($self, $interface) = @_;
+
+ my $parentInterface = _parentInterface($interface);
+ return $parentInterface ? $self->_classRefGetter($parentInterface) . "()" : "0";
+}
+
+sub _parentInterface
+{
+ my ($interface) = @_;
+ return $interface->parents->[0];
+}
+
+sub _platformType
+{
+ my ($self, $idlType, $signature) = @_;
+
+ return undef unless defined $idlType;
+
+ return "bool" if $idlType eq "boolean";
+ return "JSRetainPtr<JSStringRef>" if $$self{codeGenerator}->IsStringType($idlType);
+ return "double" if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return _implementationClassName($idlType);
+}
+
+sub _platformTypeConstructor
+{
+ my ($self, $signature, $argumentName) = @_;
+
+ my $idlType = $signature->type;
+
+ return "JSRetainPtr<JSStringRef>(Adopt, JSValueToStringCopy(context, $argumentName, 0))" if $$self{codeGenerator}->IsStringType($idlType);
+ return "JSValueToBoolean(context, $argumentName)" if $idlType eq "boolean";
+ return "JSValueToNumber(context, $argumentName, 0)" if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return "to" . _implementationClassName($idlType) . "(context, $argumentName)";
+}
+
+sub _platformTypeVariableDeclaration
+{
+ my ($self, $signature, $variableName, $argumentName, $condition) = @_;
+
+ my $platformType = $self->_platformType($signature->type, $signature);
+ my $constructor = $self->_platformTypeConstructor($signature, $argumentName);
+
+ my %nonPointerTypes = (
+ "bool" => 1,
+ "double" => 1,
+ "JSRetainPtr<JSStringRef>" => 1,
+ );
+
+ my $nullValue = "0";
+ $nullValue = "$platformType()" if defined $nonPointerTypes{$platformType} && $platformType ne "double";
+
+ $platformType .= "*" unless defined $nonPointerTypes{$platformType};
+
+ return "$platformType $variableName = $condition && $constructor;" if $condition && $platformType eq "bool";
+ return "$platformType $variableName = $condition ? $constructor : $nullValue;" if $condition;
+ return "$platformType $variableName = $constructor;";
+}
+
+sub _returnExpression
+{
+ my ($self, $signature, $expression) = @_;
+
+ my $convertNullStringAttribute = $signature->extendedAttributes->{"ConvertNullStringTo"};
+ my $nullOrEmptyString = "NullStringAsEmptyString";
+ $nullOrEmptyString = "NullStringAsNull" if defined $convertNullStringAttribute && $convertNullStringAttribute eq "Null";
+
+ my $returnIDLType = $signature->type;
+
+ return "JSValueMakeUndefined(context)" if $returnIDLType eq "void";
+ return "JSValueMakeBoolean(context, ${expression})" if $returnIDLType eq "boolean";
+ return "JSValueMakeNumber(context, ${expression})" if $$self{codeGenerator}->IsNonPointerType($returnIDLType);
+ return "toJS(context, WTF::getPtr(${expression}))";
+}
+
+sub _paramterExpression
+{
+ my ($self, $parameter) = @_;
+
+ my $idlType = $parameter->type;
+ my $name = $parameter->name;
+
+ return "${name}.get()" if $$self{codeGenerator}->IsStringType($idlType);
+ return $name;
+}
+
+sub _setterName
+{
+ my ($self, $attribute) = @_;
+
+ my $name = $attribute->signature->name;
+
+ return "set" . $$self{codeGenerator}->WK_ucfirst($name);
+}
+
+sub _staticFunctionsGetterImplementation
+{
+ my ($self, $interface) = @_;
+
+ my $mapFunction = sub {
+ my $name = $_->signature->name;
+ my @attributes = qw(kJSPropertyAttributeDontDelete kJSPropertyAttributeReadOnly);
+ push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
+
+ return "{ \"$name\", $name, " . join(" | ", @attributes) . " }";
+ };
+
+ return $self->_staticFunctionsOrValuesGetterImplementation($interface, "function", "{ 0, 0, 0 }", $mapFunction, $interface->functions);
+}
+
+sub _staticFunctionsOrValuesGetterImplementation
+{
+ my ($self, $interface, $functionOrValue, $arrayTerminator, $mapFunction, $functionsOrAttributes) = @_;
+
+ my $className = _className($interface->name);
+ my $uppercaseFunctionOrValue = $$self{codeGenerator}->WK_ucfirst($functionOrValue);
+
+ my $result = <<EOF;
+const JSStatic${uppercaseFunctionOrValue}* ${className}::static${uppercaseFunctionOrValue}s()
+{
+EOF
+
+ my @initializers = map(&$mapFunction, @{$functionsOrAttributes});
+ return $result . " return 0;\n}\n" unless @initializers;
+
+ $result .= <<EOF
+ static const JSStatic${uppercaseFunctionOrValue} ${functionOrValue}s[] = {
+ @{[join(",\n ", @initializers)]},
+ ${arrayTerminator}
+ };
+ return ${functionOrValue}s;
+}
+EOF
+}
+
+sub _staticValuesGetterImplementation
+{
+ my ($self, $interface) = @_;
+
+ my $mapFunction = sub {
+ return if $_->signature->extendedAttributes->{"NoImplementation"};
+
+ my $attributeName = $_->signature->name;
+ my $attributeIsReadonly = $_->type =~ /^readonly/;
+ my $getterName = $self->_getterName($_);
+ my $setterName = $attributeIsReadonly ? "0" : $self->_setterName($_);
+ my @attributes = qw(kJSPropertyAttributeDontDelete);
+ push(@attributes, "kJSPropertyAttributeReadOnly") if $attributeIsReadonly;
+ push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
+
+ return "{ \"$attributeName\", $getterName, $setterName, " . join(" | ", @attributes) . " }";
+ };
+
+ return $self->_staticFunctionsOrValuesGetterImplementation($interface, "value", "{ 0, 0, 0, 0 }", $mapFunction, $interface->attributes);
+}
+
+1;
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h
new file mode 100644
index 0000000..cf56c5d
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 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 JSWrappable_h
+#define JSWrappable_h
+
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <wtf/RefCounted.h>
+
+namespace WTR {
+
+class JSWrappable : public RefCounted<JSWrappable> {
+public:
+ virtual ~JSWrappable() { }
+ virtual JSClassRef wrapperClass() = 0;
+};
+
+} // namespace WTR
+
+#endif // JSWrappable_h
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
new file mode 100644
index 0000000..a62cb2e
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 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 "JSWrapper.h"
+
+#include <JavaScriptCore/JSContextRefPrivate.h>
+
+namespace WTR {
+
+JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object)
+{
+ ASSERT_ARG(context, context);
+
+ if (!object)
+ return JSValueMakeNull(context);
+
+ JSClassRef objectClass = object->wrapperClass();
+ ASSERT(objectClass);
+ JSObjectRef wrapperObject = JSObjectMake(context, objectClass, object);
+ ASSERT(wrapperObject);
+
+ return wrapperObject;
+}
+
+JSWrappable* JSWrapper::unwrap(JSContextRef context, JSValueRef value)
+{
+ ASSERT_ARG(context, context);
+ ASSERT_ARG(value, value);
+ if (!context || !value)
+ return 0;
+ return static_cast<JSWrappable*>(JSObjectGetPrivate(JSValueToObject(context, value, 0)));
+}
+
+static JSWrappable* unwrapObject(JSObjectRef object)
+{
+ JSWrappable* wrappable = static_cast<JSWrappable*>(JSObjectGetPrivate(object));
+ ASSERT(wrappable);
+ return wrappable;
+}
+
+void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object)
+{
+ JSWrappable* wrappable = unwrapObject(object);
+ if (!wrappable)
+ return;
+ wrappable->ref();
+}
+
+void JSWrapper::finalize(JSObjectRef object)
+{
+ JSWrappable* wrappable = unwrapObject(object);
+ if (!wrappable)
+ return;
+ wrappable->deref();
+}
+
+} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h
new file mode 100644
index 0000000..9839cb4
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 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 JSWrapper_h
+#define JSWrapper_h
+
+#include "JSWrappable.h"
+
+namespace WTR {
+
+// FIXME: If necessary, we can do wrapper caching here.
+class JSWrapper {
+public:
+ static JSValueRef wrap(JSContextRef context, JSWrappable* object);
+ static JSWrappable* unwrap(JSContextRef context, JSValueRef value);
+
+ static void initialize(JSContextRef, JSObjectRef);
+ static void finalize(JSObjectRef);
+};
+
+inline JSValueRef toJS(JSContextRef context, JSWrappable* impl)
+{
+ return JSWrapper::wrap(context, impl);
+}
+
+} // namespace WTR
+
+#endif // JSWrapper_h
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
new file mode 100644
index 0000000..7da2e81
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+module WTR {
+
+ interface LayoutTestController {
+ void dumpAsText();
+ void dumpStatusCallbacks();
+
+ void waitUntilDone();
+ void notifyDone();
+
+ // Repaint testing
+ void testRepaint();
+ void repaintSweepHorizontally();
+ void display();
+
+ // Animation testing
+ int numberOfActiveAnimations();
+ boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
+ };
+
+}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 9eea3e2..d3c66fd 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -25,6 +25,7 @@
#include "InjectedBundle.h"
+#include "ActivateFonts.h"
#include "InjectedBundlePage.h"
#include <WebKit2/WKBundle.h>
#include <WebKit2/WKBundlePage.h>
@@ -73,6 +74,8 @@ void InjectedBundle::initialize(WKBundleRef bundle)
_didRecieveMessage
};
WKBundleSetClient(m_bundle, &client);
+
+ activateFonts();
}
void InjectedBundle::done()
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
index 27779df..b1bc89d 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
@@ -26,7 +26,12 @@
#include "InjectedBundle.h"
#include <WebKit2/WKBundleInitialize.h>
-extern "C" void WKBundleInitialize(WKBundleRef bundle)
+#if defined(WIN32) || defined(_WIN32)
+extern "C" __declspec(dllexport)
+#else
+extern "C"
+#endif
+void WKBundleInitialize(WKBundleRef bundle)
{
WTR::InjectedBundle::shared().initialize(bundle);
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index b254405..cbba470 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -37,6 +37,19 @@
namespace WTR {
+static PassOwnPtr<Vector<char> > WKStringToUTF8(WKStringRef wkStringRef)
+{
+ RetainPtr<CFStringRef> cfString(AdoptCF, WKStringCopyCFString(0, wkStringRef));
+ CFIndex bufferLength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfString.get()), kCFStringEncodingUTF8) + 1;
+ OwnPtr<Vector<char> > buffer(new Vector<char>(bufferLength));
+ if (!CFStringGetCString(cfString.get(), buffer->data(), bufferLength, kCFStringEncodingUTF8)) {
+ buffer->shrink(1);
+ (*buffer)[0] = 0;
+ } else
+ buffer->shrink(strlen(buffer->data()) + 1);
+ return buffer.release();
+}
+
InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
: m_page(page)
, m_isLoading(false)
@@ -58,10 +71,13 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
WKBundlePageUIClient uiClient = {
0,
this,
- _addMessageToConsole
+ _willAddMessageToConsole,
+ _willSetStatusbarText,
+ _willRunJavaScriptAlert,
+ _willRunJavaScriptConfirm,
+ _willRunJavaScriptPrompt
};
WKBundlePageSetUIClient(m_page, &uiClient);
-
}
InjectedBundlePage::~InjectedBundlePage()
@@ -128,24 +144,11 @@ void InjectedBundlePage::didCommitLoadForFrame(WKBundleFrameRef frame)
{
}
-static PassOwnPtr<Vector<char> > WKStringToUTF8(WKStringRef wkStringRef)
-{
- RetainPtr<CFStringRef> cfString(AdoptCF, WKStringCopyCFString(0, wkStringRef));
- CFIndex bufferLength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfString.get()), kCFStringEncodingUTF8) + 1;
- OwnPtr<Vector<char> > buffer(new Vector<char>(bufferLength));
- if (!CFStringGetCString(cfString.get(), buffer->data(), bufferLength, kCFStringEncodingUTF8)) {
- buffer->shrink(1);
- (*buffer)[0] = 0;
- } else
- buffer->shrink(strlen(buffer->data()) + 1);
- return buffer.release();
-}
-
void InjectedBundlePage::dump()
{
InjectedBundle::shared().layoutTestController()->invalidateWaitToDumpWatchdog();
- if (InjectedBundle::shared().layoutTestController()->dumpAsText()) {
+ if (InjectedBundle::shared().layoutTestController()->shouldDumpAsText()) {
// FIXME: Support dumping subframes when layoutTestController()->dumpChildFramesAsText() is true.
WKRetainPtr<WKStringRef> innerText(AdoptWK, WKBundleFrameCopyInnerText(WKBundlePageGetMainFrame(m_page)));
OwnPtr<Vector<char> > utf8InnerText = WKStringToUTF8(innerText.get());
@@ -193,16 +196,64 @@ void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSContex
// UI Client Callbacks
-void InjectedBundlePage::_addMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
+void InjectedBundlePage::_willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
+{
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willAddMessageToConsole(message, lineNumber);
+}
+
+void InjectedBundlePage::_willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo)
+{
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willSetStatusbarText(statusbarText);
+}
+
+void InjectedBundlePage::_willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
+{
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptAlert(message, frame);
+}
+
+void InjectedBundlePage::_willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
+{
+ return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptConfirm(message, frame);
+}
+
+void InjectedBundlePage::_willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo)
{
- static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->addMessageToConsole(message, lineNumber);
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptPrompt(message, defaultValue, frame);
}
-void InjectedBundlePage::addMessageToConsole(WKStringRef message, uint32_t lineNumber)
+void InjectedBundlePage::willAddMessageToConsole(WKStringRef message, uint32_t lineNumber)
{
// FIXME: Strip file: urls.
OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
InjectedBundle::shared().os() << "CONSOLE MESSAGE: line " << lineNumber << ": " << utf8Message->data() << "\n";
}
+void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText)
+{
+ if (!InjectedBundle::shared().layoutTestController()->shouldDumpStatusCallbacks())
+ return;
+
+ OwnPtr<Vector<char> > utf8StatusbarText = WKStringToUTF8(statusbarText);
+ InjectedBundle::shared().os() << "UI DELEGATE STATUS CALLBACK: setStatusText:" << utf8StatusbarText->data() << "\n";
+}
+
+void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef)
+{
+ OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
+ InjectedBundle::shared().os() << "ALERT: " << utf8Message->data() << "\n";
+}
+
+void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef)
+{
+ OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
+ InjectedBundle::shared().os() << "CONFIRM: " << utf8Message->data() << "\n";
+}
+
+void InjectedBundlePage::willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef)
+{
+ OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
+ OwnPtr<Vector<char> > utf8DefaultValue = WKStringToUTF8(defaultValue);
+ InjectedBundle::shared().os() << "PROMPT: " << utf8Message->data() << ", default text: " << utf8DefaultValue->data() << "\n";
+}
+
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index 79aebb7..bce9d2c 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -60,8 +60,16 @@ private:
void didClearWindowForFrame(WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window);
// UI Client
- static void _addMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo);
- void addMessageToConsole(WKStringRef message, uint32_t lineNumber);
+ static void _willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
+ static void _willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void* clientInfo);
+ static void _willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);
+ void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber);
+ void willSetStatusbarText(WKStringRef statusbarText);
+ void willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef);
+ void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef);
+ void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef);
WKBundlePageRef m_page;
bool m_isLoading;
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index cf3e0fb..fafa1e3 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -24,9 +24,10 @@
*/
#include "LayoutTestController.h"
+
#include "InjectedBundle.h"
#include "InjectedBundlePage.h"
-
+#include "JSLayoutTestController.h"
#include <JavaScriptCore/JSRetainPtr.h>
#include <WebKit2/WKBundleFrame.h>
#include <WebKit2/WKRetainPtr.h>
@@ -42,7 +43,10 @@ PassRefPtr<LayoutTestController> LayoutTestController::create(const std::string&
LayoutTestController::LayoutTestController(const std::string& testPathOrURL)
: m_dumpAsText(false)
+ , m_dumpStatusCallbacks(false)
, m_waitToDump(false)
+ , m_testRepaint(false)
+ , m_testRepaintSweepHorizontally(false)
, m_testPathOrURL(testPathOrURL)
{
}
@@ -51,8 +55,19 @@ LayoutTestController::~LayoutTestController()
{
}
-static const CFTimeInterval waitToDumpWatchdogInterval = 30.0;
+JSClassRef LayoutTestController::wrapperClass()
+{
+ return JSLayoutTestController::layoutTestControllerClass();
+}
+// This is lower than DumpRenderTree's timeout, to make it easier to work through the failures
+// Eventually it should be changed to match.
+static const CFTimeInterval waitToDumpWatchdogInterval = 6.0;
+
+void LayoutTestController::display()
+{
+ // FIXME: actually implement, once we want pixel tests
+}
void LayoutTestController::invalidateWaitToDumpWatchdog()
{
@@ -67,7 +82,7 @@ static void waitUntilDoneWatchdogFired(CFRunLoopTimerRef timer, void* info)
InjectedBundle::shared().layoutTestController()->waitToDumpWatchdogTimerFired();
}
-void LayoutTestController::setWaitToDump()
+void LayoutTestController::waitUntilDone()
{
m_waitToDump = true;
if (!m_waitToDumpWatchdog) {
@@ -109,97 +124,12 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
return WKBundleFramePauseAnimationOnElementWithId(mainFrame, nameWK.get(), idWK.get(), time);
}
-static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->setDumpAsText(true);
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->setWaitToDump();
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->notifyDone();
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount)
- return JSValueMakeUndefined(context);
-
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
-}
-
-static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 3)
- return JSValueMakeUndefined(context);
-
- JSRetainPtr<JSStringRef> animationName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- double time = JSValueToNumber(context, arguments[1], exception);
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
- ASSERT(!*exception);
-
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
-}
-
-// Object Finalization
-
-static void layoutTestControllerObjectFinalize(JSObjectRef object)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(object));
- controller->deref();
-}
-
// Object Creation
void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
{
JSRetainPtr<JSStringRef> layoutTestContollerStr(Adopt, JSStringCreateWithUTF8CString("layoutTestController"));
- ref();
-
- JSClassRef classRef = getJSClass();
- JSValueRef layoutTestContollerObject = JSObjectMake(context, classRef, this);
- JSClassRelease(classRef);
-
- JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
-}
-
-JSClassRef LayoutTestController::getJSClass()
-{
- static JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
- static JSClassDefinition classDefinition = {
- 0, kJSClassAttributeNone, "LayoutTestController", 0, 0, staticFunctions,
- 0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- return JSClassCreate(&classDefinition);
-}
-
-JSStaticFunction* LayoutTestController::staticFunctions()
-{
- static JSStaticFunction staticFunctions[] = {
- { "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { 0, 0, 0 }
- };
-
- return staticFunctions;
+ JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), JSWrapper::wrap(context, this), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index 203f358..f9585a3 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -26,30 +26,40 @@
#ifndef LayoutTestController_h
#define LayoutTestController_h
+#include "JSWrappable.h"
#include <JavaScriptCore/JavaScriptCore.h>
#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
#include <string>
namespace WTR {
-class LayoutTestController : public RefCounted<LayoutTestController> {
+class LayoutTestController : public JSWrappable {
public:
static PassRefPtr<LayoutTestController> create(const std::string& testPathOrURL);
~LayoutTestController();
+ // JSWrappable
+ JSClassRef wrapperClass();
+
void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
- bool dumpAsText() const { return m_dumpAsText; }
- void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; }
+ bool shouldDumpAsText() const { return m_dumpAsText; }
+ void dumpAsText() { m_dumpAsText = true; }
+
+ bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
+ void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
bool waitToDump() const { return m_waitToDump; }
- void setWaitToDump();
void waitToDumpWatchdogTimerFired();
void invalidateWaitToDumpWatchdog();
+ void waitUntilDone();
void notifyDone();
+ void testRepaint() { m_testRepaint = true; }
+ void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
+ void display();
+
unsigned numberOfActiveAnimations() const;
bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
@@ -57,15 +67,14 @@ private:
LayoutTestController(const std::string& testPathOrURL);
bool m_dumpAsText;
+ bool m_dumpStatusCallbacks;
bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
+ bool m_testRepaint;
+ bool m_testRepaintSweepHorizontally;
std::string m_testPathOrURL;
RetainPtr<CFRunLoopTimerRef> m_waitToDumpWatchdog;
-
- static JSClassRef getJSClass();
- static JSStaticValue* staticValues();
- static JSStaticFunction* staticFunctions();
};
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm b/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
new file mode 100644
index 0000000..b5bc4a1
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 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 "ActivateFonts.h"
+
+#import <AppKit/AppKit.h>
+#import <CoreFoundation/CoreFoundation.h>
+#import <Foundation/Foundation.h>
+
+@interface WKTRFontActivatorDummyClass : NSObject
+@end
+
+@implementation WKTRFontActivatorDummyClass
+@end
+
+namespace WTR {
+
+void activateFonts()
+{
+ // Work around <rdar://problem/6698023> by activating fonts from disk
+
+ static const char* fontFileNames[] = {
+ "AHEM____.TTF",
+ "ColorBits.ttf",
+ "WebKitWeightWatcher100.ttf",
+ "WebKitWeightWatcher200.ttf",
+ "WebKitWeightWatcher300.ttf",
+ "WebKitWeightWatcher400.ttf",
+ "WebKitWeightWatcher500.ttf",
+ "WebKitWeightWatcher600.ttf",
+ "WebKitWeightWatcher700.ttf",
+ "WebKitWeightWatcher800.ttf",
+ "WebKitWeightWatcher900.ttf",
+ 0
+ };
+
+ NSMutableArray *fontURLs = [NSMutableArray array];
+ NSURL *resourcesDirectory = [[NSBundle bundleForClass:[WKTRFontActivatorDummyClass class]] resourceURL];
+ for (unsigned i = 0; fontFileNames[i]; ++i) {
+ NSURL *fontURL = [resourcesDirectory URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]]];
+ [fontURLs addObject:[fontURL absoluteURL]];
+ }
+
+ CFArrayRef errors = 0;
+ if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)fontURLs, kCTFontManagerScopeProcess, &errors)) {
+ NSLog(@"Failed to activate fonts: %@", errors);
+ CFRelease(errors);
+ exit(1);
+ }
+}
+
+}
+
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
new file mode 100644
index 0000000..c7532ce
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 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 "ActivateFonts.h"
+
+namespace WTR {
+
+void activateFonts()
+{
+ // FIXME: Not implemented.
+}
+
+}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj b/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj
new file mode 100644
index 0000000..601a4ac
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundle"
+ ProjectGUID="{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ RootNamespace="InjectedBundle"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ RuntimeLibrary="3"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Bindings"
+ >
+ <File
+ RelativePath="..\Bindings\CodeGeneratorTestRunner.pm"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrappable.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrapper.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrapper.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Derived Sources"
+ >
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="ActivateFonts.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundle.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundle.h"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundleMain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundlePage.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundlePage.h"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index b5b15d1..fec6b56 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -27,7 +27,7 @@
#include "PlatformWebView.h"
#include "TestInvocation.h"
-#include <getopt.h>
+#include <WebKit2/WKContextPrivate.h>
namespace WTR {
@@ -38,62 +38,44 @@ TestController& TestController::shared()
}
TestController::TestController()
- : m_dumpTree(false)
- , m_dumpPixels(false)
- , m_threaded(false)
- , m_forceComplexText(false)
+ : m_dumpPixels(false)
, m_verbose(false)
, m_printSeparators(false)
, m_usingServerMode(false)
{
}
-void TestController::initialize(int argc, const char *argv[])
+void TestController::initialize(int argc, const char* argv[])
{
- int dumpTree = 0;
- int dumpPixels = 0;
- int threaded = 0;
- int forceComplexText = 0;
- int useHTML5Parser = 0;
- int verbose = 0;
-
- struct option options[] = {
- {"notree", no_argument, &dumpTree, false},
- {"pixel-tests", no_argument, &dumpPixels, true},
- {"tree", no_argument, &dumpTree, true},
- {"threaded", no_argument, &threaded, true},
- {"complex-text", no_argument, &forceComplexText, true},
- {"legacy-parser", no_argument, &useHTML5Parser, false},
- {"verbose", no_argument, &verbose, true},
- {0, 0, 0, 0}
- };
-
- int option;
- while ((option = getopt_long(argc, (char * const *)argv, "", options, 0)) != -1) {
- switch (option) {
- case '?': // unknown or ambiguous option
- case ':': // missing argument
- exit(1);
- break;
+ platformInitialize();
+
+ for (int i = 1; i < argc; ++i) {
+ std::string argument(argv[i]);
+
+ if (argument == "--pixel-tests") {
+ m_dumpPixels = true;
+ continue;
}
- }
+ if (argument == "--verbose") {
+ m_verbose = true;
+ continue;
+ }
+
+ // Skip any other arguments that begin with '--'.
+ if (argument.length() >= 2 && argument[0] == '-' && argument[1] == '-')
+ continue;
- m_dumpTree = dumpTree;
- m_dumpPixels = dumpPixels;
- m_threaded = threaded;
- m_forceComplexText = forceComplexText;
- m_verbose = verbose;
+ m_paths.push_back(argument);
+ }
- m_usingServerMode = (argc == optind + 1 && strcmp(argv[optind], "-") == 0);
+ m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-");
if (m_usingServerMode)
m_printSeparators = true;
- else {
- m_printSeparators = (optind < argc - 1 || (m_dumpPixels && m_dumpTree));
- for (int i = optind; i != argc; ++i)
- m_paths.push_back(std::string(argv[i]));
- }
+ else
+ m_printSeparators = m_paths.size() > 1;
initializeInjectedBundlePath();
+ initializeTestPluginPath();
m_context.adopt(WKContextCreateWithInjectedBundlePath(injectedBundlePath()));
@@ -104,6 +86,8 @@ void TestController::initialize(int argc, const char *argv[])
};
WKContextSetInjectedBundleClient(m_context.get(), &injectedBundlePathClient);
+ _WKContextSetAdditionalPluginPath(m_context.get(), testPluginPath());
+
m_pageNamespace.adopt(WKPageNamespaceCreate(m_context.get()));
m_mainWebView = new PlatformWebView(m_pageNamespace.get());
}
diff --git a/WebKitTools/WebKitTestRunner/TestController.h b/WebKitTools/WebKitTestRunner/TestController.h
index 7ad11fe..7e829b6 100644
--- a/WebKitTools/WebKitTestRunner/TestController.h
+++ b/WebKitTools/WebKitTestRunner/TestController.h
@@ -49,6 +49,7 @@ public:
bool verbose() const { return m_verbose; }
WKStringRef injectedBundlePath() { return m_injectedBundlePath.get(); }
+ WKStringRef testPluginPath() { return m_testPluginPath.get(); }
PlatformWebView* mainWebView() { return m_mainWebView; }
WKPageNamespaceRef pageNamespace() { return m_pageNamespace.get(); }
@@ -60,8 +61,10 @@ private:
void runTestingServerLoop();
void runTest(const char* pathOrURL);
-
+
+ void platformInitialize();
void initializeInjectedBundlePath();
+ void initializeTestPluginPath();
// WKContextInjectedBundleClient
static void _didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef message, const void*);
@@ -69,15 +72,13 @@ private:
OwnPtr<TestInvocation> m_currentInvocation;
- bool m_dumpTree;
bool m_dumpPixels;
- bool m_threaded;
- bool m_forceComplexText;
bool m_verbose;
bool m_printSeparators;
bool m_usingServerMode;
std::vector<std::string> m_paths;
WKRetainPtr<WKStringRef> m_injectedBundlePath;
+ WKRetainPtr<WKStringRef> m_testPluginPath;
PlatformWebView* m_mainWebView;
WKRetainPtr<WKContextRef> m_context;
diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.cpp b/WebKitTools/WebKitTestRunner/TestInvocation.cpp
index d3bb8d2..1434d50 100644
--- a/WebKitTools/WebKitTestRunner/TestInvocation.cpp
+++ b/WebKitTools/WebKitTestRunner/TestInvocation.cpp
@@ -46,7 +46,11 @@ static WKURLRef createWKURL(const char* pathOrURL)
if (CFStringHasPrefix(pathOrURLCFString.get(), CFSTR("http://")) || CFStringHasPrefix(pathOrURLCFString.get(), CFSTR("https://")))
cfURL.adoptCF(CFURLCreateWithString(0, pathOrURLCFString.get(), 0));
else
+#if defined(WIN32) || defined(_WIN32)
+ cfURL.adoptCF(CFURLCreateWithFileSystemPath(0, pathOrURLCFString.get(), kCFURLWindowsPathStyle, false));
+#else
cfURL.adoptCF(CFURLCreateWithFileSystemPath(0, pathOrURLCFString.get(), kCFURLPOSIXPathStyle, false));
+#endif
return WKURLCreateWithCFURL(cfURL.get());
}
@@ -92,9 +96,18 @@ static void sizeWebViewForCurrentTest(char* pathOrURL)
TestController::shared().mainWebView()->resizeTo(normalWidth, normalHeight);
}
+void TestInvocation::resetPreferencesToConsistentValues()
+{
+ WKPreferencesRef preferences = WKContextGetPreferences(TestController::shared().context());
+
+ WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
+}
+
void TestInvocation::invoke()
{
sizeWebViewForCurrentTest(m_pathOrURL);
+ resetPreferencesToConsistentValues();
+
WKRetainPtr<WKStringRef> message(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest")));
WKContextPostMessageToInjectedBundle(TestController::shared().context(), message.get());
diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.h b/WebKitTools/WebKitTestRunner/TestInvocation.h
index ea1e840..b5fc041 100644
--- a/WebKitTools/WebKitTestRunner/TestInvocation.h
+++ b/WebKitTools/WebKitTestRunner/TestInvocation.h
@@ -42,6 +42,8 @@ public:
private:
void dump(const char*);
+ void resetPreferencesToConsistentValues();
+
// Helper
static void runUntil(bool& done);
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln b/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln
new file mode 100644
index 0000000..e2435d3
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln
@@ -0,0 +1,78 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "win\WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundleGenerated", "win\InjectedBundleGenerated.vcproj", "{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_All|Win32 = Debug_All|Win32
+ Debug_Internal|Win32 = Debug_Internal|Win32
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
index caf26a4..eccf330 100644
--- a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
@@ -6,7 +6,33 @@
objectVersion = 45;
objects = {
+/* Begin PBXAggregateTarget section */
+ BC952D7711F3BF5D003398B4 /* Derived Sources */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = BC952D7D11F3BF6A003398B4 /* Build configuration list for PBXAggregateTarget "Derived Sources" */;
+ buildPhases = (
+ BC952D8211F3BF78003398B4 /* Generate Derived Sources */,
+ );
+ dependencies = (
+ );
+ name = "Derived Sources";
+ productName = "Derived Sources";
+ };
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
+ 6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; };
+ 6510A78311EC643800410867 /* ColorBits.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77811EC643800410867 /* ColorBits.ttf */; };
+ 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; };
+ 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */; };
+ 6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */; };
+ 6510A78711EC643800410867 /* WebKitWeightWatcher400.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */; };
+ 6510A78811EC643800410867 /* WebKitWeightWatcher500.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */; };
+ 6510A78911EC643800410867 /* WebKitWeightWatcher600.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */; };
+ 6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */; };
+ 6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */; };
+ 6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */; };
+ 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */; };
BC25193E11D15D8B002EBC01 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934A411906584005EA8E2 /* Cocoa.framework */; };
BC25193F11D15D8B002EBC01 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; };
BC25194011D15D8B002EBC01 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */; };
@@ -17,6 +43,8 @@
BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; };
BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */; };
BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8C795B11D2785D004535A1 /* TestControllerMac.mm */; };
+ BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; };
+ BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */; };
BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */; };
BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */; };
BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */; };
@@ -33,21 +61,29 @@
remoteGlobalIDString = BC25186111D15D54002EBC01;
remoteInfo = InjectedBundle;
};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 8;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
+ BC952ED611F3C38B003398B4 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BC952D7711F3BF5D003398B4;
+ remoteInfo = "Derived Sources";
};
-/* End PBXCopyFilesBuildPhase section */
+/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ 6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; };
+ 6510A77811EC643800410867 /* ColorBits.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ColorBits.ttf; path = fonts/ColorBits.ttf; sourceTree = "<group>"; };
+ 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
+ 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; };
+ 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher300.ttf; path = fonts/WebKitWeightWatcher300.ttf; sourceTree = "<group>"; };
+ 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher400.ttf; path = fonts/WebKitWeightWatcher400.ttf; sourceTree = "<group>"; };
+ 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher500.ttf; path = fonts/WebKitWeightWatcher500.ttf; sourceTree = "<group>"; };
+ 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher600.ttf; path = fonts/WebKitWeightWatcher600.ttf; sourceTree = "<group>"; };
+ 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = "<group>"; };
+ 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
+ 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
+ 65EB859D11EC67CC0034D300 /* ActivateFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivateFonts.h; sourceTree = "<group>"; };
+ 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ActivateFonts.mm; sourceTree = "<group>"; };
8DD76FA10486AA7600D96B5E /* WebKitTestRunner */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = WebKitTestRunner; sourceTree = BUILT_PRODUCTS_DIR; };
BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = "<group>"; };
BC25186211D15D54002EBC01 /* InjectedBundle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InjectedBundle.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -65,6 +101,14 @@
BC7934DD119066EC005EA8E2 /* PlatformWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWebView.h; sourceTree = "<group>"; };
BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewMac.mm; sourceTree = "<group>"; };
BC8C795B11D2785D004535A1 /* TestControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerMac.mm; sourceTree = "<group>"; };
+ BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = "<group>"; };
+ BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = "<group>"; };
+ BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = "<group>"; };
+ BC952EC511F3C10F003398B4 /* DerivedSources.make */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DerivedSources.make; sourceTree = "<group>"; };
+ BC952ED211F3C29F003398B4 /* LayoutTestController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LayoutTestController.idl; sourceTree = "<group>"; };
+ BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = CodeGeneratorTestRunner.pm; sourceTree = "<group>"; };
+ BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSLayoutTestController.cpp; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
+ BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSLayoutTestController.h; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.h; sourceTree = BUILT_PRODUCTS_DIR; };
BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = "<group>"; };
BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = "<group>"; };
BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePage.cpp; sourceTree = "<group>"; };
@@ -104,6 +148,7 @@
08FB7794FE84155DC02AAC07 /* WebKitTestRunner */ = {
isa = PBXGroup;
children = (
+ BC952EC511F3C10F003398B4 /* DerivedSources.make */,
08FB7795FE84155DC02AAC07 /* Source */,
BC25183511D1571D002EBC01 /* InjectedBundle */,
BC793401118F7C8A005EA8E2 /* Configurations */,
@@ -147,16 +192,28 @@
name = Products;
sourceTree = "<group>";
};
+ 65EB859E11EC67CC0034D300 /* mac */ = {
+ isa = PBXGroup;
+ children = (
+ 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */,
+ );
+ path = mac;
+ sourceTree = "<group>";
+ };
BC25183511D1571D002EBC01 /* InjectedBundle */ = {
isa = PBXGroup;
children = (
+ BC952D3A11F3BF1F003398B4 /* Derived Sources */,
+ BC952C0A11F3B939003398B4 /* Bindings */,
+ 65EB859E11EC67CC0034D300 /* mac */,
+ 65EB859D11EC67CC0034D300 /* ActivateFonts.h */,
BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */,
BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */,
BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */,
BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */,
BCC997A311D3C8F60017BCA2 /* InjectedBundlePage.h */,
- BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */,
BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */,
+ BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */,
);
path = InjectedBundle;
sourceTree = "<group>";
@@ -165,6 +222,17 @@
isa = PBXGroup;
children = (
BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */,
+ 6510A77711EC643800410867 /* AHEM____.TTF */,
+ 6510A77811EC643800410867 /* ColorBits.ttf */,
+ 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */,
+ 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */,
+ 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */,
+ 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */,
+ 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */,
+ 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */,
+ 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */,
+ 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */,
+ 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */,
);
name = Resources;
sourceTree = "<group>";
@@ -191,6 +259,27 @@
path = Configurations;
sourceTree = "<group>";
};
+ BC952C0A11F3B939003398B4 /* Bindings */ = {
+ isa = PBXGroup;
+ children = (
+ BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */,
+ BC952C0E11F3B97B003398B4 /* JSWrappable.h */,
+ BC952C0C11F3B965003398B4 /* JSWrapper.cpp */,
+ BC952C0B11F3B965003398B4 /* JSWrapper.h */,
+ BC952ED211F3C29F003398B4 /* LayoutTestController.idl */,
+ );
+ path = Bindings;
+ sourceTree = "<group>";
+ };
+ BC952D3A11F3BF1F003398B4 /* Derived Sources */ = {
+ isa = PBXGroup;
+ children = (
+ BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */,
+ BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */,
+ );
+ name = "Derived Sources";
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -200,7 +289,6 @@
buildPhases = (
8DD76F990486AA7600D96B5E /* Sources */,
8DD76F9B0486AA7600D96B5E /* Frameworks */,
- 8DD76F9E0486AA7600D96B5E /* CopyFiles */,
);
buildRules = (
);
@@ -224,6 +312,7 @@
buildRules = (
);
dependencies = (
+ BC952ED711F3C38B003398B4 /* PBXTargetDependency */,
);
name = InjectedBundle;
productName = InjectedBundle;
@@ -244,6 +333,7 @@
targets = (
8DD76F960486AA7600D96B5E /* WebKitTestRunner */,
BC25186111D15D54002EBC01 /* InjectedBundle */,
+ BC952D7711F3BF5D003398B4 /* Derived Sources */,
);
};
/* End PBXProject section */
@@ -253,11 +343,39 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6510A78211EC643800410867 /* AHEM____.TTF in Resources */,
+ 6510A78311EC643800410867 /* ColorBits.ttf in Resources */,
+ 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */,
+ 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */,
+ 6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */,
+ 6510A78711EC643800410867 /* WebKitWeightWatcher400.ttf in Resources */,
+ 6510A78811EC643800410867 /* WebKitWeightWatcher500.ttf in Resources */,
+ 6510A78911EC643800410867 /* WebKitWeightWatcher600.ttf in Resources */,
+ 6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */,
+ 6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */,
+ 6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
+/* Begin PBXShellScriptBuildPhase section */
+ BC952D8211F3BF78003398B4 /* Generate Derived Sources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Generate Derived Sources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\n\nexport WebKitTestRunner=\"${SRCROOT}\"\nexport WebCoreScripts=\"${WEBCORE_PRIVATE_HEADERS_DIR}\"\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n make -f \"${WebKitTestRunner}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.availcpu`\nfi\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
/* Begin PBXSourcesBuildPhase section */
8DD76F990486AA7600D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -280,6 +398,9 @@
BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */,
BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */,
BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */,
+ 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */,
+ BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */,
+ BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -291,6 +412,11 @@
target = BC25186111D15D54002EBC01 /* InjectedBundle */;
targetProxy = BC25194111D15D94002EBC01 /* PBXContainerItemProxy */;
};
+ BC952ED711F3C38B003398B4 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BC952D7711F3BF5D003398B4 /* Derived Sources */;
+ targetProxy = BC952ED611F3C38B003398B4 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@@ -337,6 +463,27 @@
};
name = Release;
};
+ BC952D7811F3BF5E003398B4 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = "Derived Sources";
+ };
+ name = Debug;
+ };
+ BC952D7911F3BF5E003398B4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = "Derived Sources";
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -367,6 +514,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ BC952D7D11F3BF6A003398B4 /* Build configuration list for PBXAggregateTarget "Derived Sources" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BC952D7811F3BF5E003398B4 /* Debug */,
+ BC952D7911F3BF5E003398B4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h b/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h
index ffb6950..9d508ed 100644
--- a/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h
@@ -27,8 +27,7 @@
#include <Cocoa/Cocoa.h>
#endif
-#include <wtf/Platform.h>
-#if PLATFORM(WIN)
+#if defined(WIN32) || defined(_WIN32)
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max
#define max max
diff --git a/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF b/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF
new file mode 100644
index 0000000..ac81cb0
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png b/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png
new file mode 100644
index 0000000..8b9319c
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf b/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf
new file mode 100644
index 0000000..cd919e8
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf
new file mode 100644
index 0000000..e732fbc
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf
new file mode 100644
index 0000000..f9f997e
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf
new file mode 100644
index 0000000..22b00de
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf
new file mode 100644
index 0000000..1ccadba
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf
new file mode 100644
index 0000000..ab5563d
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf
new file mode 100644
index 0000000..56d279e
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf
new file mode 100644
index 0000000..d827d7d
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf
new file mode 100644
index 0000000..9141596
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf
new file mode 100644
index 0000000..a2d0505
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf
new file mode 100644
index 0000000..d0f354b
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf
new file mode 100644
index 0000000..6b895ca
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
index 5957e0e..ae4cc2f 100644
--- a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
+++ b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
@@ -30,22 +30,19 @@
namespace WTR {
-void TestController::initializeInjectedBundlePath()
+void TestController::platformInitialize()
{
- uint32_t pathLength = 0;
- _NSGetExecutablePath(0, &pathLength);
- char* path = (char*)malloc(pathLength);
- _NSGetExecutablePath(path, &pathLength);
- char* theRealPath = (char*)malloc(pathLength);
- realpath(path, theRealPath);
-
- NSString *pwd = [[NSString stringWithUTF8String:theRealPath] stringByDeletingLastPathComponent];
- NSString *nsBundlePath = [pwd stringByAppendingPathComponent:@"InjectedBundle.bundle"];
+}
- free(path);
- free(theRealPath);
-
+void TestController::initializeInjectedBundlePath()
+{
+ NSString *nsBundlePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"InjectedBundle.bundle"];
m_injectedBundlePath.adopt(WKStringCreateWithCFString((CFStringRef)nsBundlePath));
}
+void TestController::initializeTestPluginPath()
+{
+ m_testPluginPath.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath]));
+}
+
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj b/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
new file mode 100755
index 0000000..1148edd
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleGenerated"
+ ProjectGUID="{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ RootNamespace="InjectedBundleGenerated"
+ Keyword="MakeFileProj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="all|Win32"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CleanCommandLine="del /s /q &quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\build-generated-files.sh"
+ >
+ </File>
+ <File
+ RelativePath="..\DerivedSources.make"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
index e55bcf7..e602d0e 100644
--- a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
@@ -27,14 +27,40 @@
namespace WTR {
+static LPCWSTR hostWindowClassName = L"WTRWebViewHostWindow";
+
+static void registerWindowClass()
+{
+ static bool initialized;
+ if (initialized)
+ return;
+ initialized = true;
+
+ WNDCLASSEXW wndClass = {0};
+ wndClass.cbSize = sizeof(wndClass);
+ wndClass.style = CS_HREDRAW | CS_VREDRAW;
+ wndClass.lpfnWndProc = DefWindowProcW;
+ wndClass.hCursor = LoadCursor(0, IDC_ARROW);
+ wndClass.hInstance = GetModuleHandle(0);
+ wndClass.lpszClassName = hostWindowClassName;
+
+ RegisterClassExW(&wndClass);
+}
+
PlatformWebView::PlatformWebView(WKPageNamespaceRef namespaceRef)
{
- // Implement
+ registerWindowClass();
+
+ RECT viewRect = {0, 0, 800, 600};
+ m_window = CreateWindowExW(0, hostWindowClassName, L"WebKitTestRunner", WS_OVERLAPPEDWINDOW, 0 /*XOFFSET*/, 0 /*YOFFSET*/, viewRect.right, viewRect.bottom, 0, 0, GetModuleHandle(0), 0);
+ m_view = WKViewCreate(viewRect, namespaceRef, m_window);
}
PlatformWebView::~PlatformWebView()
{
- // Implement
+ if (::IsWindow(m_window))
+ ::DestroyWindow(m_window);
+ WKViewRelease(m_view);
}
void PlatformWebView::resizeTo(unsigned width, unsigned height)
@@ -44,8 +70,7 @@ void PlatformWebView::resizeTo(unsigned width, unsigned height)
WKPageRef PlatformWebView::page()
{
- // Implement
- return 0;
+ return WKViewGetPage(m_view);
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
index 00b2d50..232c396 100644
--- a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
@@ -25,13 +25,36 @@
#include "TestController.h"
+#include <fcntl.h>
+#include <io.h>
#include <WebKit2/WKStringCF.h>
namespace WTR {
+void TestController::platformInitialize()
+{
+ _setmode(1, _O_BINARY);
+ _setmode(2, _O_BINARY);
+}
+
void TestController::initializeInjectedBundlePath()
{
- // Implement
+ CFStringRef exeContainerPath = CFURLCopyFileSystemPath(CFURLCreateCopyDeletingLastPathComponent(0, CFBundleCopyExecutableURL(CFBundleGetMainBundle())), kCFURLWindowsPathStyle);
+ CFMutableStringRef bundlePath = CFStringCreateMutableCopy(0, 0, exeContainerPath);
+#ifndef NDEBUG
+ CFStringAppendCString(bundlePath, "\\InjectedBundle_debug.dll", kCFStringEncodingWindowsLatin1);
+#else
+ CFStringAppendCString(bundlePath, "\\InjectedBundle.dll", kCFStringEncodingWindowsLatin1);
+#endif
+
+ m_injectedBundlePath.adopt(WKStringCreateWithCFString(bundlePath));
+}
+
+void TestController::initializeTestPluginPath()
+{
+ CFStringRef exeContainerPath = CFURLCopyFileSystemPath(CFURLCreateCopyDeletingLastPathComponent(0, CFBundleCopyExecutableURL(CFBundleGetMainBundle())), kCFURLWindowsPathStyle);
+ CFMutableStringRef bundlePath = CFStringCreateMutableCopy(0, 0, exeContainerPath);
+ m_testPluginPath.adopt(WKStringCreateWithCFString(bundlePath));
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
index 83199bd..cfeebcc 100644
--- a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
@@ -29,7 +29,14 @@ namespace WTR {
void TestInvocation::runUntil(bool& done)
{
- // Implement
+ while (!done) {
+ MSG msg;
+ BOOL result = GetMessage(&msg, 0, 0, 0);
+ if (result == -1)
+ return;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln
index e89e66d..757b7fb 100644
--- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln
+++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln
@@ -2,6 +2,11 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "..\InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,6 +24,14 @@ Global
{3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
index 4885feb..4802c3a 100644
--- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
+++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
@@ -56,9 +56,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
TargetMachine="1"
/>
@@ -113,7 +111,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
@@ -130,9 +128,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
TargetMachine="1"
/>
@@ -170,7 +166,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -186,10 +182,10 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
- ForcedIncludeFiles="Prefix.h"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -203,9 +199,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
/>
<Tool
@@ -242,7 +236,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -258,10 +252,10 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
- ForcedIncludeFiles="Prefix.h"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -275,9 +269,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
/>
<Tool
@@ -330,38 +322,6 @@
>
</File>
</Filter>
- <Filter
- Name="InjectedBundle"
- >
- <File
- RelativePath="..\InjectedBundle\InjectedBundle.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundle.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundleMain.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundlePage.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundlePage.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\LayoutTestController.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\LayoutTestController.h"
- >
- </File>
- </Filter>
<File
RelativePath="..\PlatformWebView.h"
>
diff --git a/WebKitTools/WebKitTestRunner/win/build-generated-files.sh b/WebKitTools/WebKitTestRunner/win/build-generated-files.sh
new file mode 100644
index 0000000..8c599c1
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/win/build-generated-files.sh
@@ -0,0 +1,42 @@
+# Copyright (C) 2010 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.
+
+# Calls to `cygpath -ms` below are needed to remove spaces from paths, which
+# confuse GNU make. See <http://webkit.org/b/8173>.
+
+WebKitOutputDir=$(cygpath -u "$(cygpath -ms "${1}")")
+WebKitLibrariesDir=$(cygpath -u "$(cygpath -ms "${2}")")
+DerivedSources="${WebKitOutputDir}/obj/InjectedBundle/DerivedSources"
+
+export WebKitTestRunner=$(cygpath -u "$(cygpath -ms "$(realpath ..)")")
+
+if [ -e "${WebKitOutputDir}/obj/WebCore/scripts" ]; then
+ export WebCoreScripts="${WebKitOutputDir}/obj/WebCore/scripts"
+else
+ export WebCoreScripts="${WebKitLibrariesDir}/tools/scripts"
+fi
+
+mkdir -p "${DerivedSources}"
+cd "${DerivedSources}"
+
+make -f "${WebKitTestRunner}/DerivedSources.make"
diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py
index fe0bc9b..122f93a 100644
--- a/WebKitTools/wx/build/settings.py
+++ b/WebKitTools/wx/build/settings.py
@@ -99,6 +99,7 @@ jscore_dirs = [
webcore_dirs = [
'accessibility',
'bindings',
+ 'bindings/generic',
'bindings/js',
'bridge',
'bridge/c',