summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--JavaScriptCore/ChangeLog576
-rw-r--r--JavaScriptCore/Configurations/Version.xcconfig2
-rw-r--r--JavaScriptCore/GNUmakefile.am20
-rw-r--r--JavaScriptCore/JavaScriptCore.exp2
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def3
-rw-r--r--JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj8
-rw-r--r--JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj8
-rw-r--r--JavaScriptCore/assembler/ARMAssembler.cpp2
-rw-r--r--JavaScriptCore/assembler/LinkBuffer.h27
-rw-r--r--JavaScriptCore/assembler/MIPSAssembler.h11
-rw-r--r--JavaScriptCore/assembler/X86Assembler.h4
-rw-r--r--JavaScriptCore/bytecode/CodeBlock.h4
-rw-r--r--JavaScriptCore/bytecode/StructureStubInfo.h24
-rw-r--r--JavaScriptCore/jit/ExecutableAllocator.cpp2
-rw-r--r--JavaScriptCore/jit/ExecutableAllocator.h35
-rw-r--r--JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp5
-rw-r--r--JavaScriptCore/jit/JIT.cpp7
-rw-r--r--JavaScriptCore/jit/JIT.h42
-rw-r--r--JavaScriptCore/jit/JITArithmetic.cpp45
-rw-r--r--JavaScriptCore/jit/JITOpcodes.cpp10
-rw-r--r--JavaScriptCore/jit/JITOpcodes32_64.cpp13
-rw-r--r--JavaScriptCore/jit/JITPropertyAccess.cpp60
-rw-r--r--JavaScriptCore/jit/JITPropertyAccess32_64.cpp74
-rw-r--r--JavaScriptCore/jit/JITStubs.cpp239
-rw-r--r--JavaScriptCore/jit/JITStubs.h4
-rw-r--r--JavaScriptCore/jit/SpecializedThunkJIT.h3
-rw-r--r--JavaScriptCore/parser/JSParser.cpp8
-rw-r--r--JavaScriptCore/parser/Lexer.cpp327
-rw-r--r--JavaScriptCore/parser/Lexer.h5
-rw-r--r--JavaScriptCore/runtime/ArrayPrototype.cpp166
-rw-r--r--JavaScriptCore/runtime/ErrorInstance.cpp5
-rw-r--r--JavaScriptCore/runtime/ErrorInstance.h2
-rw-r--r--JavaScriptCore/runtime/ErrorPrototype.cpp2
-rw-r--r--JavaScriptCore/runtime/ExceptionHelpers.cpp5
-rw-r--r--JavaScriptCore/runtime/ExceptionHelpers.h1
-rw-r--r--JavaScriptCore/runtime/Executable.cpp25
-rw-r--r--JavaScriptCore/runtime/JSGlobalData.h1
-rw-r--r--JavaScriptCore/runtime/JSValue.h2
-rw-r--r--JavaScriptCore/runtime/NumberPrototype.cpp1
-rw-r--r--JavaScriptCore/runtime/TimeoutChecker.cpp5
-rw-r--r--JavaScriptCore/runtime/UString.cpp5
-rw-r--r--JavaScriptCore/wtf/Assertions.cpp44
-rw-r--r--JavaScriptCore/wtf/Assertions.h7
-rw-r--r--JavaScriptCore/wtf/Complex.h10
-rw-r--r--JavaScriptCore/wtf/DecimalNumber.h186
-rw-r--r--JavaScriptCore/wtf/FastMalloc.cpp3
-rw-r--r--JavaScriptCore/wtf/Forward.h2
-rw-r--r--JavaScriptCore/wtf/OwnArrayPtr.h186
-rw-r--r--JavaScriptCore/wtf/OwnArrayPtrCommon.h40
-rw-r--r--JavaScriptCore/wtf/PassOwnArrayPtr.h215
-rw-r--r--JavaScriptCore/wtf/Platform.h23
-rw-r--r--JavaScriptCore/wtf/TCPageMap.h2
-rw-r--r--JavaScriptCore/wtf/ThreadSpecific.h30
-rw-r--r--JavaScriptCore/wtf/ThreadingPrimitives.h2
-rw-r--r--JavaScriptCore/wtf/UnusedParam.h10
-rw-r--r--JavaScriptCore/wtf/Vector3.h10
-rw-r--r--JavaScriptCore/wtf/WTFThreadData.cpp2
-rw-r--r--JavaScriptCore/wtf/WTFThreadData.h7
-rw-r--r--JavaScriptCore/wtf/dtoa.cpp827
-rw-r--r--JavaScriptCore/wtf/dtoa.h17
-rw-r--r--JavaScriptCore/wtf/gobject/GOwnPtr.h9
-rw-r--r--JavaScriptCore/wtf/gobject/GRefPtr.h7
-rw-r--r--JavaScriptCore/wtf/gtk/GtkTypedefs.h80
-rw-r--r--JavaScriptCore/wtf/text/AtomicString.cpp2
-rw-r--r--JavaScriptCore/wtf/text/StringHash.h2
-rw-r--r--JavaScriptCore/wtf/text/StringImpl.cpp31
-rw-r--r--JavaScriptCore/wtf/text/WTFString.cpp65
-rw-r--r--JavaScriptCore/wtf/text/WTFString.h7
-rw-r--r--JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h1
-rw-r--r--JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h2
-rw-r--r--JavaScriptCore/wtf/unicode/wince/UnicodeWince.h2
-rw-r--r--JavaScriptCore/yarr/RegexJIT.cpp12
-rw-r--r--JavaScriptGlue/ChangeLog11
-rw-r--r--JavaScriptGlue/Configurations/Version.xcconfig2
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtrCommon.h1
-rw-r--r--LayoutTests/dom/html/level2/html/button03.js6
-rw-r--r--LayoutTests/dom/xhtml/level2/html/button03.js6
-rw-r--r--LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt13
-rw-r--r--LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html13
-rw-r--r--LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js17
-rw-r--r--LayoutTests/fast/js/resources/js-test-post.js10
-rw-r--r--LayoutTests/fast/js/resources/js-test-pre.js13
-rw-r--r--LayoutTests/fast/url/resources/utilities.js16
-rw-r--r--LayoutTests/http/tests/resources/network-simulator.php40
-rw-r--r--LayoutTests/http/tests/resources/silence.mpgbin33227 -> 0 bytes
-rw-r--r--LayoutTests/http/tests/resources/test.mp4bin0 -> 192844 bytes
-rw-r--r--LayoutTests/http/tests/resources/test.ogvbin0 -> 103746 bytes
-rw-r--r--LayoutTests/platform/android/Skipped2
-rw-r--r--LayoutTests/storage/indexeddb/database-basics-expected.txt18
-rw-r--r--LayoutTests/storage/indexeddb/keyrange-expected.txt24
-rw-r--r--LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt886
-rw-r--r--LayoutTests/storage/indexeddb/objectstore-cursor.html209
-rw-r--r--LayoutTests/storage/indexeddb/open-cursor-expected.txt1
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/database-basics.js21
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/keyrange.js8
-rw-r--r--LayoutTests/storage/indexeddb/script-tests/open-cursor.js3
-rw-r--r--SunSpider/ChangeLog29
-rw-r--r--SunSpider/tests/v8-v5/LIST7
-rw-r--r--SunSpider/tests/v8-v5/v8-crypto.js1695
-rw-r--r--SunSpider/tests/v8-v5/v8-deltablue.js877
-rw-r--r--SunSpider/tests/v8-v5/v8-earley-boyer.js4683
-rw-r--r--SunSpider/tests/v8-v5/v8-raytrace.js933
-rw-r--r--SunSpider/tests/v8-v5/v8-regexp.js1613
-rw-r--r--SunSpider/tests/v8-v5/v8-richards.js537
-rw-r--r--SunSpider/tests/v8-v5/v8-splay.js377
-rw-r--r--SunSpider/tests/v8-v6/LIST7
-rw-r--r--SunSpider/tests/v8-v6/v8-crypto.js1695
-rw-r--r--SunSpider/tests/v8-v6/v8-deltablue.js877
-rw-r--r--SunSpider/tests/v8-v6/v8-earley-boyer.js4683
-rw-r--r--SunSpider/tests/v8-v6/v8-raytrace.js902
-rw-r--r--SunSpider/tests/v8-v6/v8-regexp.js1613
-rw-r--r--SunSpider/tests/v8-v6/v8-richards.js537
-rw-r--r--SunSpider/tests/v8-v6/v8-splay.js393
-rw-r--r--WebCore/Android.derived.mk3
-rw-r--r--WebCore/Android.mk42
-rw-r--r--WebCore/CMakeLists.txt219
-rw-r--r--WebCore/CMakeListsEfl.txt2
-rw-r--r--WebCore/ChangeLog7459
-rw-r--r--WebCore/Configurations/FeatureDefines.xcconfig3
-rw-r--r--WebCore/Configurations/Version.xcconfig2
-rw-r--r--WebCore/DerivedSources.cpp2
-rw-r--r--WebCore/DerivedSources.make13
-rw-r--r--WebCore/English.lproj/localizedStrings.jsbin43046 -> 45878 bytes
-rw-r--r--WebCore/ForwardingHeaders/wtf/OwnArrayPtrCommon.h4
-rw-r--r--WebCore/ForwardingHeaders/wtf/PassOwnArrayPtr.h4
-rw-r--r--WebCore/GNUmakefile.am274
-rw-r--r--WebCore/WebCore.exp.in20
-rw-r--r--WebCore/WebCore.gyp/WebCore.gyp449
-rw-r--r--WebCore/WebCore.gypi405
-rw-r--r--WebCore/WebCore.pri48
-rw-r--r--WebCore/WebCore.pro188
-rw-r--r--WebCore/WebCore.vcproj/WebCore.vcproj610
-rw-r--r--WebCore/WebCore.vcproj/WebCoreCommon.vsprops2
-rw-r--r--WebCore/WebCore.xcodeproj/project.pbxproj1020
-rw-r--r--WebCore/accessibility/AXObjectCache.h1
-rw-r--r--WebCore/accessibility/AccessibilityRenderObject.cpp9
-rw-r--r--WebCore/accessibility/chromium/AXObjectCacheChromium.cpp29
-rw-r--r--WebCore/bindings/generic/RuntimeEnabledFeatures.cpp8
-rw-r--r--WebCore/bindings/generic/RuntimeEnabledFeatures.h20
-rw-r--r--WebCore/bindings/gobject/GNUmakefile.am415
-rw-r--r--WebCore/bindings/js/JSXMLHttpRequestCustom.cpp8
-rw-r--r--WebCore/bindings/js/ScriptHeapSnapshot.h54
-rw-r--r--WebCore/bindings/js/ScriptProfile.cpp2
-rw-r--r--WebCore/bindings/js/ScriptProfiler.h4
-rw-r--r--WebCore/bindings/js/SerializedScriptValue.cpp6
-rw-r--r--WebCore/bindings/js/SerializedScriptValue.h2
-rw-r--r--WebCore/bindings/objc/PublicDOMInterfaces.h6
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorCPP.pm4
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorGObject.pm78
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorV8.pm46
-rw-r--r--WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h2
-rw-r--r--WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h2
-rw-r--r--WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h2
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp21
-rw-r--r--WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp63
-rw-r--r--WebCore/bindings/scripts/test/TestObj.idl8
-rw-r--r--WebCore/bindings/v8/ScriptHeapSnapshot.cpp99
-rw-r--r--WebCore/bindings/v8/ScriptHeapSnapshot.h67
-rw-r--r--WebCore/bindings/v8/ScriptProfile.cpp4
-rw-r--r--WebCore/bindings/v8/ScriptProfiler.cpp21
-rw-r--r--WebCore/bindings/v8/ScriptProfiler.h6
-rw-r--r--WebCore/bindings/v8/SerializedScriptValue.cpp6
-rw-r--r--WebCore/bindings/v8/SerializedScriptValue.h2
-rw-r--r--WebCore/bindings/v8/V8Binding.cpp40
-rw-r--r--WebCore/bindings/v8/V8Binding.h95
-rw-r--r--WebCore/bindings/v8/custom/V8BindingMacros.h17
-rw-r--r--WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp96
-rw-r--r--WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp3
-rw-r--r--WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp3
-rw-r--r--WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp6
-rw-r--r--WebCore/css/CSSComputedStyleDeclaration.cpp23
-rw-r--r--WebCore/css/CSSFontSelector.cpp6
-rw-r--r--WebCore/css/CSSFunctionValue.cpp11
-rw-r--r--WebCore/css/CSSGrammar.y18
-rw-r--r--WebCore/css/CSSImageGeneratorValue.cpp2
-rw-r--r--WebCore/css/CSSImageValue.cpp26
-rw-r--r--WebCore/css/CSSImageValue.h5
-rw-r--r--WebCore/css/CSSImportRule.cpp10
-rw-r--r--WebCore/css/CSSMutableStyleDeclaration.cpp10
-rw-r--r--WebCore/css/CSSNamespace.h30
-rw-r--r--WebCore/css/CSSParser.cpp106
-rw-r--r--WebCore/css/CSSParser.h20
-rw-r--r--WebCore/css/CSSParserValues.h6
-rw-r--r--WebCore/css/CSSPrimitiveValue.cpp3
-rw-r--r--WebCore/css/CSSPrimitiveValueMappings.h11
-rw-r--r--WebCore/css/CSSPropertyNames.in2
-rw-r--r--WebCore/css/CSSSelector.cpp19
-rw-r--r--WebCore/css/CSSSelector.h4
-rw-r--r--WebCore/css/CSSStyleSelector.cpp383
-rw-r--r--WebCore/css/CSSStyleSelector.h43
-rw-r--r--WebCore/css/CSSStyleSheet.cpp25
-rw-r--r--WebCore/css/CSSStyleSheet.h8
-rw-r--r--WebCore/css/CSSValueKeywords.in3
-rw-r--r--WebCore/css/CSSValueList.cpp26
-rw-r--r--WebCore/css/CSSValueList.h4
-rw-r--r--WebCore/css/CSSVariablesDeclaration.cpp2
-rw-r--r--WebCore/css/MediaList.cpp14
-rw-r--r--WebCore/css/MediaList.h4
-rw-r--r--WebCore/css/fullscreen.css27
-rw-r--r--WebCore/dom/ClassNodeList.cpp2
-rw-r--r--WebCore/dom/ContainerNode.cpp17
-rw-r--r--WebCore/dom/ContainerNode.h1
-rw-r--r--WebCore/dom/DecodedDataDocumentParser.cpp2
-rw-r--r--WebCore/dom/Document.cpp263
-rw-r--r--WebCore/dom/Document.h72
-rw-r--r--WebCore/dom/Document.idl8
-rw-r--r--WebCore/dom/DocumentMarker.h3
-rw-r--r--WebCore/dom/Element.cpp52
-rw-r--r--WebCore/dom/Element.h13
-rw-r--r--WebCore/dom/Element.idl8
-rw-r--r--WebCore/dom/EventNames.h2
-rw-r--r--WebCore/dom/NamedNodeMap.cpp2
-rw-r--r--WebCore/dom/Node.cpp132
-rw-r--r--WebCore/dom/Node.h11
-rw-r--r--WebCore/dom/OptionElement.cpp2
-rw-r--r--WebCore/dom/ProcessingInstruction.cpp3
-rw-r--r--WebCore/dom/SelectorNodeList.cpp2
-rw-r--r--WebCore/dom/StyleElement.cpp5
-rw-r--r--WebCore/dom/StyledElement.cpp4
-rw-r--r--WebCore/dom/XMLDocumentParser.cpp2
-rw-r--r--WebCore/dom/XMLDocumentParserLibxml2.cpp27
-rw-r--r--WebCore/dom/XMLDocumentParserQt.cpp2
-rwxr-xr-xWebCore/dom/make_names.pl11
-rw-r--r--WebCore/editing/ApplyStyleCommand.cpp366
-rw-r--r--WebCore/editing/ApplyStyleCommand.h7
-rw-r--r--WebCore/editing/Editor.cpp227
-rw-r--r--WebCore/editing/Editor.h23
-rw-r--r--WebCore/editing/EditorCommand.cpp15
-rw-r--r--WebCore/editing/ReplaceSelectionCommand.cpp8
-rw-r--r--WebCore/editing/SelectionController.cpp1
-rw-r--r--WebCore/editing/TextIterator.cpp2
-rw-r--r--WebCore/editing/TypingCommand.cpp4
-rw-r--r--WebCore/editing/markup.cpp175
-rw-r--r--WebCore/fileapi/AsyncFileWriter.h60
-rw-r--r--WebCore/fileapi/Blob.cpp (renamed from WebCore/html/Blob.cpp)102
-rw-r--r--WebCore/fileapi/Blob.h (renamed from WebCore/html/Blob.h)27
-rw-r--r--WebCore/fileapi/Blob.idl (renamed from WebCore/html/Blob.idl)4
-rw-r--r--WebCore/fileapi/BlobBuilder.cpp (renamed from WebCore/html/BlobBuilder.cpp)62
-rw-r--r--WebCore/fileapi/BlobBuilder.h (renamed from WebCore/html/BlobBuilder.h)13
-rw-r--r--WebCore/fileapi/BlobBuilder.idl (renamed from WebCore/html/BlobBuilder.idl)0
-rw-r--r--WebCore/fileapi/BlobURL.cpp (renamed from WebCore/html/BlobURL.cpp)8
-rw-r--r--WebCore/fileapi/BlobURL.h (renamed from WebCore/html/BlobURL.h)1
-rw-r--r--WebCore/fileapi/DOMFilePath.cpp (renamed from WebCore/storage/DOMFilePath.cpp)0
-rw-r--r--WebCore/fileapi/DOMFilePath.h (renamed from WebCore/storage/DOMFilePath.h)0
-rw-r--r--WebCore/fileapi/DOMFileSystem.cpp210
-rw-r--r--WebCore/fileapi/DOMFileSystem.h126
-rw-r--r--WebCore/fileapi/DOMFileSystem.idl (renamed from WebCore/storage/DOMFileSystem.idl)0
-rw-r--r--WebCore/fileapi/DirectoryEntry.cpp (renamed from WebCore/storage/DirectoryEntry.cpp)12
-rw-r--r--WebCore/fileapi/DirectoryEntry.h (renamed from WebCore/storage/DirectoryEntry.h)4
-rw-r--r--WebCore/fileapi/DirectoryEntry.idl (renamed from WebCore/storage/DirectoryEntry.idl)0
-rw-r--r--WebCore/fileapi/DirectoryReader.cpp (renamed from WebCore/storage/DirectoryReader.cpp)9
-rw-r--r--WebCore/fileapi/DirectoryReader.h (renamed from WebCore/storage/DirectoryReader.h)2
-rw-r--r--WebCore/fileapi/DirectoryReader.idl (renamed from WebCore/storage/DirectoryReader.idl)0
-rw-r--r--WebCore/fileapi/EntriesCallback.h (renamed from WebCore/storage/EntriesCallback.h)0
-rw-r--r--WebCore/fileapi/EntriesCallback.idl (renamed from WebCore/storage/EntriesCallback.idl)0
-rw-r--r--WebCore/fileapi/Entry.cpp (renamed from WebCore/storage/Entry.cpp)29
-rw-r--r--WebCore/fileapi/Entry.h (renamed from WebCore/storage/Entry.h)17
-rw-r--r--WebCore/fileapi/Entry.idl (renamed from WebCore/storage/Entry.idl)0
-rw-r--r--WebCore/fileapi/EntryArray.cpp (renamed from WebCore/storage/EntryArray.cpp)0
-rw-r--r--WebCore/fileapi/EntryArray.h (renamed from WebCore/storage/EntryArray.h)0
-rw-r--r--WebCore/fileapi/EntryArray.idl (renamed from WebCore/storage/EntryArray.idl)0
-rw-r--r--WebCore/fileapi/EntryCallback.h (renamed from WebCore/storage/EntryCallback.h)0
-rw-r--r--WebCore/fileapi/EntryCallback.idl (renamed from WebCore/storage/EntryCallback.idl)0
-rw-r--r--WebCore/fileapi/ErrorCallback.h (renamed from WebCore/storage/ErrorCallback.h)0
-rw-r--r--WebCore/fileapi/ErrorCallback.idl (renamed from WebCore/storage/ErrorCallback.idl)0
-rw-r--r--WebCore/fileapi/File.cpp95
-rw-r--r--WebCore/fileapi/File.h (renamed from WebCore/html/File.h)27
-rw-r--r--WebCore/fileapi/File.idl (renamed from WebCore/html/File.idl)3
-rw-r--r--WebCore/fileapi/FileEntry.cpp (renamed from WebCore/storage/FileEntry.cpp)2
-rw-r--r--WebCore/fileapi/FileEntry.h (renamed from WebCore/storage/FileEntry.h)7
-rw-r--r--WebCore/fileapi/FileEntry.idl (renamed from WebCore/storage/FileEntry.idl)0
-rw-r--r--WebCore/fileapi/FileError.h (renamed from WebCore/html/FileError.h)0
-rw-r--r--WebCore/fileapi/FileError.idl (renamed from WebCore/html/FileError.idl)7
-rw-r--r--WebCore/fileapi/FileException.h (renamed from WebCore/html/FileWriter.cpp)68
-rw-r--r--WebCore/fileapi/FileException.idl59
-rw-r--r--WebCore/fileapi/FileList.cpp (renamed from WebCore/html/FileList.cpp)0
-rw-r--r--WebCore/fileapi/FileList.h (renamed from WebCore/html/FileList.h)0
-rw-r--r--WebCore/fileapi/FileList.idl (renamed from WebCore/html/FileList.idl)3
-rw-r--r--WebCore/fileapi/FileReader.cpp (renamed from WebCore/html/FileReader.cpp)176
-rw-r--r--WebCore/fileapi/FileReader.h (renamed from WebCore/html/FileReader.h)34
-rw-r--r--WebCore/fileapi/FileReader.idl (renamed from WebCore/html/FileReader.idl)0
-rw-r--r--WebCore/fileapi/FileReaderSync.cpp193
-rw-r--r--WebCore/fileapi/FileReaderSync.h90
-rw-r--r--WebCore/fileapi/FileReaderSync.idl44
-rw-r--r--WebCore/fileapi/FileStreamProxy.cpp (renamed from WebCore/html/FileStreamProxy.cpp)0
-rw-r--r--WebCore/fileapi/FileStreamProxy.h (renamed from WebCore/html/FileStreamProxy.h)0
-rw-r--r--WebCore/fileapi/FileSystemCallback.h (renamed from WebCore/storage/FileSystemCallback.h)0
-rw-r--r--WebCore/fileapi/FileSystemCallback.idl (renamed from WebCore/storage/FileSystemCallback.idl)0
-rw-r--r--WebCore/fileapi/FileSystemCallbacks.cpp (renamed from WebCore/storage/FileSystemCallbacks.cpp)29
-rw-r--r--WebCore/fileapi/FileSystemCallbacks.h (renamed from WebCore/storage/FileSystemCallbacks.h)19
-rw-r--r--WebCore/fileapi/FileThread.cpp (renamed from WebCore/html/FileThread.cpp)0
-rw-r--r--WebCore/fileapi/FileThread.h (renamed from WebCore/html/FileThread.h)0
-rw-r--r--WebCore/fileapi/FileThreadTask.h (renamed from WebCore/html/FileThreadTask.h)0
-rw-r--r--WebCore/fileapi/FileWriter.cpp199
-rw-r--r--WebCore/fileapi/FileWriter.h (renamed from WebCore/html/FileWriter.h)46
-rw-r--r--WebCore/fileapi/FileWriter.idl (renamed from WebCore/html/FileWriter.idl)0
-rw-r--r--WebCore/fileapi/FileWriterClient.h53
-rw-r--r--WebCore/fileapi/Flags.h (renamed from WebCore/storage/Flags.h)1
-rw-r--r--WebCore/fileapi/Flags.idl (renamed from WebCore/storage/Flags.idl)0
-rw-r--r--WebCore/fileapi/LocalFileSystem.cpp76
-rw-r--r--WebCore/fileapi/LocalFileSystem.h (renamed from WebCore/storage/DOMFileSystem.h)32
-rw-r--r--WebCore/fileapi/Metadata.h (renamed from WebCore/storage/Metadata.h)4
-rw-r--r--WebCore/fileapi/Metadata.idl (renamed from WebCore/storage/Metadata.idl)2
-rw-r--r--WebCore/fileapi/MetadataCallback.h (renamed from WebCore/storage/MetadataCallback.h)0
-rw-r--r--WebCore/fileapi/MetadataCallback.idl (renamed from WebCore/storage/MetadataCallback.idl)0
-rw-r--r--WebCore/fileapi/ThreadableBlobRegistry.cpp130
-rw-r--r--WebCore/fileapi/ThreadableBlobRegistry.h (renamed from WebCore/html/ThreadableBlobRegistry.h)0
-rw-r--r--WebCore/history/CachedFrame.cpp5
-rw-r--r--WebCore/history/HistoryItem.cpp38
-rw-r--r--WebCore/history/HistoryItem.h2
-rw-r--r--WebCore/html/DateComponents.cpp107
-rw-r--r--WebCore/html/DateComponents.h17
-rw-r--r--WebCore/html/File.cpp77
-rw-r--r--WebCore/html/FormDataList.cpp11
-rw-r--r--WebCore/html/FormDataList.h25
-rw-r--r--WebCore/html/HTMLAnchorElement.idl2
-rw-r--r--WebCore/html/HTMLAreaElement.idl2
-rw-r--r--WebCore/html/HTMLAttributeNames.in1
-rw-r--r--WebCore/html/HTMLBaseElement.cpp42
-rw-r--r--WebCore/html/HTMLBaseElement.h13
-rw-r--r--WebCore/html/HTMLBaseElement.idl4
-rw-r--r--WebCore/html/HTMLBlockquoteElement.cpp5
-rw-r--r--WebCore/html/HTMLBlockquoteElement.h2
-rw-r--r--WebCore/html/HTMLBlockquoteElement.idl4
-rw-r--r--WebCore/html/HTMLBodyElement.cpp2
-rw-r--r--WebCore/html/HTMLCanvasElement.cpp12
-rw-r--r--WebCore/html/HTMLCanvasElement.h2
-rw-r--r--WebCore/html/HTMLDocument.cpp143
-rw-r--r--WebCore/html/HTMLDocument.h2
-rw-r--r--WebCore/html/HTMLElement.cpp4
-rw-r--r--WebCore/html/HTMLEmbedElement.cpp65
-rw-r--r--WebCore/html/HTMLEmbedElement.h13
-rw-r--r--WebCore/html/HTMLEmbedElement.idl2
-rw-r--r--WebCore/html/HTMLEntityNames.json8554
-rw-r--r--WebCore/html/HTMLFormControlElement.h6
-rw-r--r--WebCore/html/HTMLFormElement.cpp3
-rw-r--r--WebCore/html/HTMLFormElement.idl2
-rw-r--r--WebCore/html/HTMLFrameElement.idl2
-rw-r--r--WebCore/html/HTMLFrameElementBase.cpp19
-rw-r--r--WebCore/html/HTMLFrameOwnerElement.cpp10
-rw-r--r--WebCore/html/HTMLFrameOwnerElement.h6
-rw-r--r--WebCore/html/HTMLHtmlElement.cpp9
-rw-r--r--WebCore/html/HTMLHtmlElement.h2
-rw-r--r--WebCore/html/HTMLHtmlElement.idl1
-rw-r--r--WebCore/html/HTMLIFrameElement.idl2
-rw-r--r--WebCore/html/HTMLImageElement.cpp15
-rw-r--r--WebCore/html/HTMLImageElement.idl4
-rw-r--r--WebCore/html/HTMLInputElement.cpp166
-rw-r--r--WebCore/html/HTMLInputElement.h19
-rw-r--r--WebCore/html/HTMLInputElement.idl2
-rw-r--r--WebCore/html/HTMLLinkElement.cpp13
-rw-r--r--WebCore/html/HTMLLinkElement.idl2
-rw-r--r--WebCore/html/HTMLMediaElement.cpp87
-rw-r--r--WebCore/html/HTMLMediaElement.h5
-rw-r--r--WebCore/html/HTMLMediaElement.idl2
-rw-r--r--WebCore/html/HTMLModElement.cpp5
-rw-r--r--WebCore/html/HTMLModElement.h2
-rw-r--r--WebCore/html/HTMLModElement.idl2
-rw-r--r--WebCore/html/HTMLObjectElement.cpp118
-rw-r--r--WebCore/html/HTMLObjectElement.h13
-rw-r--r--WebCore/html/HTMLObjectElement.idl2
-rw-r--r--WebCore/html/HTMLPlugInElement.cpp3
-rw-r--r--WebCore/html/HTMLPlugInElement.h5
-rw-r--r--WebCore/html/HTMLPlugInImageElement.cpp93
-rw-r--r--WebCore/html/HTMLPlugInImageElement.h22
-rw-r--r--WebCore/html/HTMLQuoteElement.cpp5
-rw-r--r--WebCore/html/HTMLQuoteElement.h1
-rw-r--r--WebCore/html/HTMLQuoteElement.idl2
-rw-r--r--WebCore/html/HTMLScriptElement.idl2
-rw-r--r--WebCore/html/HTMLSourceElement.idl4
-rw-r--r--WebCore/html/HTMLTagNames.in2
-rw-r--r--WebCore/html/HTMLTextAreaElement.cpp11
-rw-r--r--WebCore/html/HTMLTextAreaElement.h6
-rw-r--r--WebCore/html/HTMLVideoElement.cpp8
-rw-r--r--WebCore/html/HTMLVideoElement.idl2
-rw-r--r--WebCore/html/HTMLViewSourceDocument.cpp32
-rw-r--r--WebCore/html/HTMLViewSourceDocument.h9
-rw-r--r--WebCore/html/ThreadableBlobRegistry.cpp96
-rw-r--r--WebCore/html/ValidityState.cpp115
-rw-r--r--WebCore/html/ValidityState.h6
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.cpp42
-rw-r--r--WebCore/html/canvas/CanvasRenderingContext2D.h2
-rw-r--r--WebCore/html/canvas/WebGLRenderingContext.cpp31
-rw-r--r--WebCore/html/canvas/WebGLTexture.cpp1
-rw-r--r--WebCore/html/canvas/WebGLTexture.h12
-rw-r--r--WebCore/html/parser/CSSPreloadScanner.cpp (renamed from WebCore/html/CSSPreloadScanner.cpp)0
-rw-r--r--WebCore/html/parser/CSSPreloadScanner.h (renamed from WebCore/html/CSSPreloadScanner.h)0
-rw-r--r--WebCore/html/parser/HTMLConstructionSite.cpp (renamed from WebCore/html/HTMLConstructionSite.cpp)15
-rw-r--r--WebCore/html/parser/HTMLConstructionSite.h (renamed from WebCore/html/HTMLConstructionSite.h)2
-rw-r--r--WebCore/html/parser/HTMLDocumentParser.cpp (renamed from WebCore/html/HTMLDocumentParser.cpp)0
-rw-r--r--WebCore/html/parser/HTMLDocumentParser.h (renamed from WebCore/html/HTMLDocumentParser.h)0
-rw-r--r--WebCore/html/parser/HTMLElementStack.cpp (renamed from WebCore/html/HTMLElementStack.cpp)0
-rw-r--r--WebCore/html/parser/HTMLElementStack.h (renamed from WebCore/html/HTMLElementStack.h)0
-rw-r--r--WebCore/html/parser/HTMLEntityNames.in2138
-rw-r--r--WebCore/html/parser/HTMLEntityParser.cpp (renamed from WebCore/html/HTMLEntityParser.cpp)79
-rw-r--r--WebCore/html/parser/HTMLEntityParser.h (renamed from WebCore/html/HTMLEntityParser.h)2
-rw-r--r--WebCore/html/parser/HTMLEntitySearch.cpp (renamed from WebCore/html/HTMLEntitySearch.cpp)0
-rw-r--r--WebCore/html/parser/HTMLEntitySearch.h (renamed from WebCore/html/HTMLEntitySearch.h)4
-rw-r--r--WebCore/html/parser/HTMLEntityTable.h (renamed from WebCore/html/HTMLEntityTable.h)2
-rw-r--r--WebCore/html/parser/HTMLFormattingElementList.cpp (renamed from WebCore/html/HTMLFormattingElementList.cpp)0
-rw-r--r--WebCore/html/parser/HTMLFormattingElementList.h (renamed from WebCore/html/HTMLFormattingElementList.h)0
-rw-r--r--WebCore/html/parser/HTMLParserScheduler.cpp (renamed from WebCore/html/HTMLParserScheduler.cpp)0
-rw-r--r--WebCore/html/parser/HTMLParserScheduler.h (renamed from WebCore/html/HTMLParserScheduler.h)0
-rw-r--r--WebCore/html/parser/HTMLPreloadScanner.cpp (renamed from WebCore/html/HTMLPreloadScanner.cpp)0
-rw-r--r--WebCore/html/parser/HTMLPreloadScanner.h (renamed from WebCore/html/HTMLPreloadScanner.h)0
-rw-r--r--WebCore/html/parser/HTMLScriptRunner.cpp (renamed from WebCore/html/HTMLScriptRunner.cpp)0
-rw-r--r--WebCore/html/parser/HTMLScriptRunner.h (renamed from WebCore/html/HTMLScriptRunner.h)0
-rw-r--r--WebCore/html/parser/HTMLScriptRunnerHost.h (renamed from WebCore/html/HTMLScriptRunnerHost.h)0
-rw-r--r--WebCore/html/parser/HTMLToken.h (renamed from WebCore/html/HTMLToken.h)0
-rw-r--r--WebCore/html/parser/HTMLTokenizer.cpp (renamed from WebCore/html/HTMLTokenizer.cpp)87
-rw-r--r--WebCore/html/parser/HTMLTokenizer.h (renamed from WebCore/html/HTMLTokenizer.h)7
-rw-r--r--WebCore/html/parser/HTMLTreeBuilder.cpp (renamed from WebCore/html/HTMLTreeBuilder.cpp)66
-rw-r--r--WebCore/html/parser/HTMLTreeBuilder.h (renamed from WebCore/html/HTMLTreeBuilder.h)0
-rw-r--r--WebCore/html/parser/HTMLViewSourceParser.cpp (renamed from WebCore/html/HTMLViewSourceParser.cpp)0
-rw-r--r--WebCore/html/parser/HTMLViewSourceParser.h (renamed from WebCore/html/HTMLViewSourceParser.h)0
-rwxr-xr-xWebCore/html/parser/create-html-entity-table (renamed from WebKitTools/Scripts/create-html-entity-table)29
-rw-r--r--WebCore/inspector/CodeGeneratorInspector.pm90
-rw-r--r--WebCore/inspector/Inspector.idl83
-rw-r--r--WebCore/inspector/InspectorBackend.cpp11
-rw-r--r--WebCore/inspector/InspectorBackend.h2
-rw-r--r--WebCore/inspector/InspectorController.cpp40
-rw-r--r--WebCore/inspector/InspectorDOMAgent.cpp38
-rw-r--r--WebCore/inspector/InspectorDOMStorageResource.cpp2
-rw-r--r--WebCore/inspector/InspectorProfilerAgent.cpp63
-rw-r--r--WebCore/inspector/InspectorProfilerAgent.h10
-rw-r--r--WebCore/inspector/InspectorResource.cpp22
-rw-r--r--WebCore/inspector/InspectorValues.cpp20
-rw-r--r--WebCore/inspector/InspectorValues.h20
-rw-r--r--WebCore/inspector/ScriptBreakpoint.cpp4
-rw-r--r--WebCore/inspector/TimelineRecordFactory.cpp6
-rwxr-xr-xWebCore/inspector/front-end/AuditFormatters.js86
-rw-r--r--WebCore/inspector/front-end/AuditLauncherView.js78
-rw-r--r--WebCore/inspector/front-end/AuditResultView.js13
-rw-r--r--WebCore/inspector/front-end/AuditRules.js4
-rw-r--r--WebCore/inspector/front-end/AuditsPanel.js25
-rw-r--r--WebCore/inspector/front-end/BreakpointManager.js3
-rw-r--r--WebCore/inspector/front-end/BreakpointsSidebarPane.js2
-rw-r--r--WebCore/inspector/front-end/CSSStyleModel.js14
-rw-r--r--WebCore/inspector/front-end/DOMAgent.js57
-rw-r--r--WebCore/inspector/front-end/DOMStorage.js9
-rw-r--r--WebCore/inspector/front-end/Database.js5
-rw-r--r--WebCore/inspector/front-end/ElementsPanel.js9
-rw-r--r--WebCore/inspector/front-end/ElementsTreeOutline.js37
-rw-r--r--WebCore/inspector/front-end/EventListenersSidebarPane.js4
-rw-r--r--WebCore/inspector/front-end/ExtensionAPI.js157
-rw-r--r--WebCore/inspector/front-end/ExtensionAuditCategory.js111
-rw-r--r--WebCore/inspector/front-end/ExtensionCommon.js46
-rw-r--r--WebCore/inspector/front-end/ExtensionServer.js79
-rw-r--r--WebCore/inspector/front-end/HeapSnapshotView.js (renamed from WebKit/chromium/src/js/HeapProfilerPanel.js)322
-rw-r--r--WebCore/inspector/front-end/InjectedScriptAccess.js4
-rw-r--r--WebCore/inspector/front-end/MetricsSidebarPane.js6
-rw-r--r--WebCore/inspector/front-end/ObjectPropertiesSection.js2
-rw-r--r--WebCore/inspector/front-end/Panel.js5
-rw-r--r--WebCore/inspector/front-end/ProfileView.js5
-rw-r--r--WebCore/inspector/front-end/ProfilesPanel.js45
-rw-r--r--WebCore/inspector/front-end/ResourcesPanel.js2
-rw-r--r--WebCore/inspector/front-end/ScriptView.js6
-rw-r--r--WebCore/inspector/front-end/ScriptsPanel.js3
-rw-r--r--WebCore/inspector/front-end/Settings.js4
-rw-r--r--WebCore/inspector/front-end/SourceCSSTokenizer.re2js4
-rw-r--r--WebCore/inspector/front-end/WebKit.qrc4
-rw-r--r--WebCore/inspector/front-end/inspector.css109
-rw-r--r--WebCore/inspector/front-end/inspector.html4
-rw-r--r--WebCore/inspector/front-end/inspector.js29
-rw-r--r--WebCore/inspector/front-end/utilities.js10
-rw-r--r--WebCore/loader/CrossOriginAccessControl.cpp8
-rw-r--r--WebCore/loader/DocLoader.cpp3
-rw-r--r--WebCore/loader/DocumentLoader.cpp6
-rw-r--r--WebCore/loader/DocumentThreadableLoader.cpp4
-rw-r--r--WebCore/loader/DocumentWriter.cpp4
-rw-r--r--WebCore/loader/DocumentWriter.h2
-rw-r--r--WebCore/loader/EmptyClients.h13
-rw-r--r--WebCore/loader/FormSubmission.cpp4
-rw-r--r--WebCore/loader/FrameLoader.cpp48
-rw-r--r--WebCore/loader/HistoryController.cpp24
-rw-r--r--WebCore/loader/HistoryController.h2
-rw-r--r--WebCore/loader/ImageDocument.cpp3
-rw-r--r--WebCore/loader/ImageLoader.cpp67
-rw-r--r--WebCore/loader/ImageLoader.h2
-rw-r--r--WebCore/loader/MediaDocument.cpp6
-rw-r--r--WebCore/loader/PingLoader.cpp2
-rw-r--r--WebCore/loader/PluginDocument.cpp8
-rw-r--r--WebCore/loader/ProgressTracker.cpp2
-rw-r--r--WebCore/loader/RedirectScheduler.cpp20
-rw-r--r--WebCore/loader/SinkDocument.cpp3
-rw-r--r--WebCore/loader/SubframeLoader.cpp89
-rw-r--r--WebCore/loader/SubframeLoader.h11
-rw-r--r--WebCore/loader/TextDocument.cpp2
-rw-r--r--WebCore/loader/WorkerThreadableLoader.cpp2
-rw-r--r--WebCore/loader/archive/ArchiveResource.cpp47
-rw-r--r--WebCore/loader/archive/ArchiveResource.h19
-rw-r--r--WebCore/loader/archive/cf/LegacyWebArchive.cpp2
-rw-r--r--WebCore/loader/icon/IconDatabase.cpp2
-rw-r--r--WebCore/loader/icon/IconLoader.cpp2
-rw-r--r--WebCore/manual-tests/print-before-load.html16
-rw-r--r--WebCore/mathml/RenderMathMLRoot.cpp15
-rw-r--r--WebCore/mathml/RenderMathMLSubSup.cpp2
-rw-r--r--WebCore/notifications/Notification.h1
-rw-r--r--WebCore/notifications/Notification.idl1
-rw-r--r--WebCore/page/ChromeClient.h16
-rw-r--r--WebCore/page/DOMSelection.cpp16
-rw-r--r--WebCore/page/DOMSelection.h4
-rw-r--r--WebCore/page/DOMSelection.idl6
-rw-r--r--WebCore/page/DOMWindow.cpp59
-rw-r--r--WebCore/page/DOMWindow.h22
-rw-r--r--WebCore/page/DOMWindow.idl12
-rw-r--r--WebCore/page/EditorClient.h8
-rw-r--r--WebCore/page/EventHandler.cpp8
-rw-r--r--WebCore/page/FocusController.cpp9
-rw-r--r--WebCore/page/Frame.cpp86
-rw-r--r--WebCore/page/Frame.h13
-rw-r--r--WebCore/page/FrameView.cpp65
-rw-r--r--WebCore/page/FrameView.h4
-rw-r--r--WebCore/page/Page.cpp10
-rw-r--r--WebCore/page/Page.h2
-rw-r--r--WebCore/page/PageGroup.cpp2
-rw-r--r--WebCore/page/SecurityOrigin.cpp8
-rw-r--r--WebCore/page/Settings.cpp60
-rw-r--r--WebCore/page/Settings.h26
-rw-r--r--WebCore/page/XSSAuditor.cpp15
-rw-r--r--WebCore/page/animation/AnimationBase.cpp12
-rw-r--r--WebCore/page/animation/KeyframeAnimation.cpp146
-rw-r--r--WebCore/page/animation/KeyframeAnimation.h4
-rw-r--r--WebCore/page/chromium/ChromeClientChromium.h3
-rw-r--r--WebCore/page/efl/EventHandlerEfl.cpp2
-rw-r--r--WebCore/platform/AsyncFileSystem.cpp (renamed from WebCore/storage/DOMFileSystem.cpp)37
-rw-r--r--WebCore/platform/AsyncFileSystem.h126
-rw-r--r--WebCore/platform/AsyncFileSystemCallbacks.h69
-rw-r--r--WebCore/platform/BlobItem.cpp192
-rw-r--r--WebCore/platform/BlobItem.h209
-rw-r--r--WebCore/platform/FileSystem.h6
-rw-r--r--WebCore/platform/Length.h2
-rw-r--r--WebCore/platform/MIMETypeRegistry.cpp4
-rw-r--r--WebCore/platform/PurgeableBuffer.h2
-rw-r--r--WebCore/platform/ScrollView.cpp2
-rw-r--r--WebCore/platform/ScrollView.h2
-rw-r--r--WebCore/platform/Scrollbar.cpp30
-rw-r--r--WebCore/platform/Scrollbar.h11
-rw-r--r--WebCore/platform/ScrollbarClient.h2
-rw-r--r--WebCore/platform/ThemeTypes.h2
-rw-r--r--WebCore/platform/TreeShared.h6
-rw-r--r--WebCore/platform/audio/Cone.cpp84
-rw-r--r--WebCore/platform/audio/Cone.h63
-rw-r--r--WebCore/platform/audio/FFTConvolver.cpp108
-rw-r--r--WebCore/platform/audio/FFTConvolver.h71
-rw-r--r--WebCore/platform/audio/Reverb.cpp227
-rw-r--r--WebCore/platform/audio/Reverb.h66
-rw-r--r--WebCore/platform/audio/ReverbAccumulationBuffer.cpp117
-rw-r--r--WebCore/platform/audio/ReverbAccumulationBuffer.h67
-rw-r--r--WebCore/platform/audio/ReverbConvolver.cpp228
-rw-r--r--WebCore/platform/audio/ReverbConvolver.h97
-rw-r--r--WebCore/platform/audio/ReverbConvolverStage.cpp163
-rw-r--r--WebCore/platform/audio/ReverbConvolverStage.h83
-rw-r--r--WebCore/platform/audio/ReverbInputBuffer.cpp89
-rw-r--r--WebCore/platform/audio/ReverbInputBuffer.h64
-rw-r--r--WebCore/platform/brew/SharedBufferBrew.cpp76
-rw-r--r--WebCore/platform/chromium/ChromiumBridge.h2
-rw-r--r--WebCore/platform/chromium/ClipboardMimeTypes.cpp40
-rw-r--r--WebCore/platform/chromium/ClipboardMimeTypes.h42
-rw-r--r--WebCore/platform/chromium/ReadableDataObject.cpp120
-rw-r--r--WebCore/platform/chromium/ReadableDataObject.h76
-rw-r--r--WebCore/platform/chromium/WritableDataObject.cpp152
-rw-r--r--WebCore/platform/chromium/WritableDataObject.h87
-rw-r--r--WebCore/platform/efl/ClipboardEfl.cpp2
-rw-r--r--WebCore/platform/efl/ClipboardEfl.h8
-rw-r--r--WebCore/platform/efl/ScrollbarEfl.cpp2
-rw-r--r--WebCore/platform/graphics/FloatPoint.cpp16
-rw-r--r--WebCore/platform/graphics/FloatPoint.h24
-rw-r--r--WebCore/platform/graphics/FloatPoint3D.cpp18
-rw-r--r--WebCore/platform/graphics/FloatPoint3D.h72
-rw-r--r--WebCore/platform/graphics/FloatRect.cpp69
-rw-r--r--WebCore/platform/graphics/FloatRect.h14
-rw-r--r--WebCore/platform/graphics/FloatSize.cpp6
-rw-r--r--WebCore/platform/graphics/FloatSize.h6
-rw-r--r--WebCore/platform/graphics/GraphicsContext.cpp14
-rw-r--r--WebCore/platform/graphics/GraphicsContext.h15
-rw-r--r--WebCore/platform/graphics/GraphicsContextPrivate.h2
-rw-r--r--WebCore/platform/graphics/MediaPlayer.cpp15
-rw-r--r--WebCore/platform/graphics/PathTraversalState.cpp2
-rw-r--r--WebCore/platform/graphics/cairo/FontCairo.cpp12
-rw-r--r--WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp287
-rw-r--r--WebCore/platform/graphics/cairo/ImageCairo.cpp8
-rw-r--r--WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp147
-rw-r--r--WebCore/platform/graphics/chromium/CrossProcessFontLoading.h100
-rw-r--r--WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm217
-rw-r--r--WebCore/platform/graphics/chromium/FontChromiumWin.cpp14
-rw-r--r--WebCore/platform/graphics/chromium/FontPlatformDataChromiumMac.mm458
-rw-r--r--WebCore/platform/graphics/chromium/GLES2Canvas.cpp206
-rw-r--r--WebCore/platform/graphics/chromium/GLES2Canvas.h34
-rw-r--r--WebCore/platform/graphics/chromium/LayerChromium.cpp33
-rw-r--r--WebCore/platform/graphics/chromium/LayerChromium.h6
-rw-r--r--WebCore/platform/graphics/chromium/LayerRendererChromium.cpp118
-rw-r--r--WebCore/platform/graphics/chromium/LayerRendererChromium.h10
-rw-r--r--WebCore/platform/graphics/cocoa/FontPlatformData.h (renamed from WebCore/platform/graphics/mac/FontPlatformData.h)21
-rw-r--r--WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (renamed from WebCore/platform/graphics/mac/FontPlatformDataMac.mm)60
-rw-r--r--WebCore/platform/graphics/gpu/Shader.cpp111
-rw-r--r--WebCore/platform/graphics/gpu/Shader.h58
-rw-r--r--WebCore/platform/graphics/gpu/SolidFillShader.cpp86
-rw-r--r--WebCore/platform/graphics/gpu/SolidFillShader.h53
-rw-r--r--WebCore/platform/graphics/gpu/TexShader.cpp93
-rw-r--r--WebCore/platform/graphics/gpu/TexShader.h55
-rw-r--r--WebCore/platform/graphics/gpu/Texture.cpp (renamed from WebCore/platform/graphics/chromium/GLES2Texture.cpp)30
-rw-r--r--WebCore/platform/graphics/gpu/Texture.h (renamed from WebCore/platform/graphics/chromium/GLES2Texture.h)18
-rw-r--r--[-rwxr-xr-x]WebCore/platform/graphics/gpu/TilingData.cpp (renamed from WebCore/platform/graphics/chromium/TilingData.cpp)0
-rw-r--r--[-rwxr-xr-x]WebCore/platform/graphics/gpu/TilingData.h (renamed from WebCore/platform/graphics/chromium/TilingData.h)0
-rw-r--r--WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp6
-rw-r--r--WebCore/platform/graphics/gstreamer/ImageGStreamer.h1
-rw-r--r--WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp12
-rw-r--r--WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp11
-rw-r--r--WebCore/platform/graphics/gstreamer/PlatformVideoWindow.h16
-rw-r--r--WebCore/platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp35
-rw-r--r--WebCore/platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp1
-rw-r--r--WebCore/platform/graphics/gtk/CairoUtilities.h2
-rw-r--r--WebCore/platform/graphics/gtk/FontGtk.cpp8
-rw-r--r--WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp2
-rw-r--r--WebCore/platform/graphics/mac/FontMac.mm10
-rw-r--r--WebCore/platform/graphics/mac/GraphicsContextMac.mm50
-rw-r--r--WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm48
-rw-r--r--WebCore/platform/graphics/mac/SimpleFontDataMac.mm6
-rw-r--r--WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp4
-rw-r--r--WebCore/platform/graphics/qt/GraphicsContextQt.cpp4
-rw-r--r--WebCore/platform/graphics/qt/ImageQt.cpp6
-rw-r--r--WebCore/platform/graphics/qt/StillImageQt.cpp6
-rw-r--r--WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp50
-rw-r--r--WebCore/platform/graphics/skia/GraphicsContextSkia.cpp45
-rw-r--r--WebCore/platform/graphics/skia/ImageSkia.cpp21
-rw-r--r--WebCore/platform/graphics/skia/PlatformContextSkia.cpp20
-rw-r--r--WebCore/platform/graphics/skia/PlatformContextSkia.h22
-rw-r--r--WebCore/platform/graphics/skia/SkiaFontWin.cpp4
-rw-r--r--WebCore/platform/graphics/win/FontCGWin.cpp16
-rw-r--r--WebCore/platform/graphics/win/GraphicsContextCGWin.cpp7
-rw-r--r--WebCore/platform/graphics/win/QTMovie.cpp3
-rw-r--r--WebCore/platform/graphics/wince/FontPlatformData.h2
-rw-r--r--WebCore/platform/graphics/wince/GraphicsContextWince.cpp19
-rw-r--r--WebCore/platform/graphics/wince/ImageBufferWince.cpp29
-rw-r--r--WebCore/platform/graphics/wx/GraphicsContextWx.cpp16
-rw-r--r--WebCore/platform/gtk/ClipboardGtk.h2
-rw-r--r--WebCore/platform/gtk/DataObjectGtk.h4
-rw-r--r--WebCore/platform/gtk/FileSystemGtk.cpp3
-rw-r--r--WebCore/platform/gtk/GOwnPtrGtk.h3
-rw-r--r--WebCore/platform/gtk/GRefPtrGtk.h3
-rw-r--r--WebCore/platform/gtk/GtkVersioning.c (renamed from WebCore/platform/gtk/GtkVersioning.cpp)21
-rw-r--r--WebCore/platform/gtk/GtkVersioning.h11
-rw-r--r--WebCore/platform/gtk/PasteboardHelper.h7
-rw-r--r--WebCore/platform/gtk/PopupMenuGtk.h4
-rw-r--r--WebCore/platform/gtk/RenderThemeGtk.cpp164
-rw-r--r--WebCore/platform/gtk/RenderThemeGtk.h21
-rw-r--r--WebCore/platform/gtk/ScrollbarGtk.h2
-rw-r--r--WebCore/platform/gtk/ScrollbarThemeGtk.cpp323
-rw-r--r--WebCore/platform/gtk/ScrollbarThemeGtk.h44
-rw-r--r--WebCore/platform/gtk/gtk2drawing.c3
-rw-r--r--WebCore/platform/mac/PopupMenuMac.h4
-rw-r--r--WebCore/platform/mac/PurgeableBufferMac.cpp2
-rw-r--r--WebCore/platform/mac/WebCoreSystemInterface.h1
-rw-r--r--WebCore/platform/mac/WebCoreSystemInterface.mm1
-rw-r--r--WebCore/platform/network/BlobRegistryImpl.cpp16
-rw-r--r--WebCore/platform/network/BlobResourceHandle.cpp3
-rw-r--r--WebCore/platform/network/BlobResourceHandle.h2
-rw-r--r--WebCore/platform/network/FormData.cpp132
-rw-r--r--WebCore/platform/network/FormData.h18
-rw-r--r--WebCore/platform/network/mac/FormDataStreamMac.mm56
-rw-r--r--WebCore/platform/qt/FileSystemQt.cpp27
-rw-r--r--WebCore/platform/qt/ScrollbarQt.cpp12
-rw-r--r--WebCore/platform/win/PasteboardWin.cpp9
-rw-r--r--WebCore/platform/win/ScrollbarThemeWin.cpp5
-rw-r--r--WebCore/platform/win/SoftLinking.h10
-rw-r--r--WebCore/platform/win/SystemInfo.cpp4
-rw-r--r--WebCore/plugins/PluginDatabase.cpp236
-rw-r--r--WebCore/plugins/PluginDatabase.h13
-rw-r--r--WebCore/plugins/PluginPackage.cpp32
-rw-r--r--WebCore/plugins/PluginPackage.h12
-rw-r--r--WebCore/plugins/PluginViewNone.cpp2
-rw-r--r--WebCore/plugins/gtk/PluginPackageGtk.cpp4
-rw-r--r--WebCore/plugins/qt/PluginPackageQt.cpp17
-rw-r--r--WebCore/plugins/qt/PluginViewQt.cpp37
-rw-r--r--WebCore/plugins/win/PluginDatabaseWin.cpp53
-rw-r--r--WebCore/rendering/AutoTableLayout.cpp2
-rw-r--r--WebCore/rendering/FixedTableLayout.cpp2
-rw-r--r--WebCore/rendering/InlineFlowBox.cpp10
-rw-r--r--WebCore/rendering/InlineTextBox.cpp24
-rw-r--r--WebCore/rendering/MediaControlElements.cpp16
-rw-r--r--WebCore/rendering/RenderBlock.cpp31
-rw-r--r--WebCore/rendering/RenderBlockLineLayout.cpp4
-rw-r--r--WebCore/rendering/RenderBox.cpp8
-rw-r--r--WebCore/rendering/RenderBox.h4
-rw-r--r--WebCore/rendering/RenderBoxModelObject.cpp23
-rw-r--r--WebCore/rendering/RenderEmbeddedObject.cpp331
-rw-r--r--WebCore/rendering/RenderEmbeddedObject.h4
-rw-r--r--WebCore/rendering/RenderForeignObject.cpp10
-rw-r--r--WebCore/rendering/RenderImage.cpp100
-rw-r--r--WebCore/rendering/RenderImage.h39
-rw-r--r--WebCore/rendering/RenderImageGeneratedContent.cpp53
-rw-r--r--WebCore/rendering/RenderImageGeneratedContent.h64
-rw-r--r--WebCore/rendering/RenderImageResource.cpp106
-rw-r--r--WebCore/rendering/RenderImageResource.h79
-rw-r--r--WebCore/rendering/RenderImageResourceStyleImage.cpp63
-rw-r--r--WebCore/rendering/RenderImageResourceStyleImage.h68
-rw-r--r--WebCore/rendering/RenderLayer.cpp10
-rw-r--r--WebCore/rendering/RenderLayer.h2
-rw-r--r--WebCore/rendering/RenderLayerBacking.cpp12
-rw-r--r--WebCore/rendering/RenderLayerCompositor.h1
-rw-r--r--WebCore/rendering/RenderListBox.h2
-rw-r--r--WebCore/rendering/RenderListItem.cpp3
-rw-r--r--WebCore/rendering/RenderListMarker.cpp61
-rw-r--r--WebCore/rendering/RenderMedia.cpp2
-rw-r--r--WebCore/rendering/RenderObject.cpp45
-rw-r--r--WebCore/rendering/RenderObject.h11
-rw-r--r--WebCore/rendering/RenderObjectChildList.cpp14
-rw-r--r--WebCore/rendering/RenderPath.cpp23
-rw-r--r--WebCore/rendering/RenderPath.h3
-rw-r--r--WebCore/rendering/RenderRuby.cpp13
-rw-r--r--WebCore/rendering/RenderSVGBlock.cpp7
-rw-r--r--WebCore/rendering/RenderSVGBlock.h1
-rw-r--r--WebCore/rendering/RenderSVGContainer.cpp38
-rw-r--r--WebCore/rendering/RenderSVGContainer.h14
-rw-r--r--WebCore/rendering/RenderSVGGradientStop.h1
-rw-r--r--WebCore/rendering/RenderSVGHiddenContainer.cpp15
-rw-r--r--WebCore/rendering/RenderSVGHiddenContainer.h5
-rw-r--r--WebCore/rendering/RenderSVGImage.cpp128
-rw-r--r--WebCore/rendering/RenderSVGImage.h25
-rw-r--r--WebCore/rendering/RenderSVGInline.cpp7
-rw-r--r--WebCore/rendering/RenderSVGInline.h1
-rw-r--r--WebCore/rendering/RenderSVGModelObject.cpp7
-rw-r--r--WebCore/rendering/RenderSVGModelObject.h3
-rw-r--r--WebCore/rendering/RenderSVGResourceFilter.cpp11
-rw-r--r--WebCore/rendering/RenderSVGRoot.cpp49
-rw-r--r--WebCore/rendering/RenderSVGRoot.h14
-rw-r--r--WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp2
-rw-r--r--WebCore/rendering/RenderSVGText.cpp14
-rw-r--r--WebCore/rendering/RenderSVGTransformableContainer.cpp7
-rw-r--r--WebCore/rendering/RenderSVGTransformableContainer.h2
-rw-r--r--WebCore/rendering/RenderSVGViewportContainer.cpp5
-rw-r--r--WebCore/rendering/RenderScrollbar.cpp9
-rw-r--r--WebCore/rendering/RenderTable.cpp2
-rw-r--r--WebCore/rendering/RenderTableSection.cpp2
-rw-r--r--WebCore/rendering/RenderTextControl.cpp16
-rw-r--r--WebCore/rendering/RenderTextControlSingleLine.h2
-rw-r--r--WebCore/rendering/RenderTheme.cpp2
-rw-r--r--WebCore/rendering/RenderVideo.cpp2
-rw-r--r--WebCore/rendering/RootInlineBox.cpp14
-rw-r--r--WebCore/rendering/SVGRenderSupport.cpp79
-rw-r--r--WebCore/rendering/SVGRenderSupport.h11
-rw-r--r--WebCore/rendering/SVGResources.h2
-rw-r--r--WebCore/rendering/SVGResourcesCache.cpp4
-rw-r--r--WebCore/rendering/SVGShadowTreeElements.cpp13
-rw-r--r--WebCore/rendering/SVGShadowTreeElements.h23
-rw-r--r--WebCore/rendering/style/BorderData.h32
-rw-r--r--WebCore/rendering/style/ContentData.cpp65
-rw-r--r--WebCore/rendering/style/ContentData.h46
-rw-r--r--WebCore/rendering/style/CursorData.h11
-rw-r--r--WebCore/rendering/style/CursorList.h1
-rw-r--r--WebCore/rendering/style/KeyframeList.cpp47
-rw-r--r--WebCore/rendering/style/KeyframeList.h27
-rw-r--r--WebCore/rendering/style/RenderStyle.cpp117
-rw-r--r--WebCore/rendering/style/RenderStyle.h49
-rw-r--r--WebCore/rendering/style/RenderStyleConstants.h3
-rw-r--r--WebCore/rendering/style/SVGRenderStyle.cpp50
-rw-r--r--WebCore/rendering/style/SVGRenderStyle.h4
-rw-r--r--WebCore/rendering/style/ShadowData.cpp46
-rw-r--r--WebCore/rendering/style/ShadowData.h6
-rw-r--r--WebCore/rendering/style/StyleCachedImage.cpp2
-rw-r--r--WebCore/rendering/style/StyleCachedImage.h2
-rw-r--r--WebCore/rendering/style/StyleGeneratedImage.cpp2
-rw-r--r--WebCore/rendering/style/StyleGeneratedImage.h2
-rw-r--r--WebCore/rendering/style/StyleImage.h9
-rw-r--r--WebCore/rendering/style/StylePendingImage.h71
-rw-r--r--WebCore/storage/IDBCursor.cpp2
-rw-r--r--WebCore/storage/IDBCursorBackendImpl.cpp111
-rw-r--r--WebCore/storage/IDBCursorBackendImpl.h21
-rw-r--r--WebCore/storage/IDBCursorBackendInterface.h2
-rw-r--r--WebCore/storage/IDBDatabase.cpp7
-rw-r--r--WebCore/storage/IDBDatabase.h2
-rw-r--r--WebCore/storage/IDBDatabase.idl3
-rw-r--r--WebCore/storage/IDBDatabaseBackendImpl.cpp7
-rw-r--r--WebCore/storage/IDBDatabaseBackendImpl.h2
-rw-r--r--WebCore/storage/IDBDatabaseBackendInterface.h4
-rw-r--r--WebCore/storage/IDBKey.cpp19
-rw-r--r--WebCore/storage/IDBKey.h2
-rw-r--r--WebCore/storage/IDBKeyPathBackendImpl.cpp4
-rw-r--r--WebCore/storage/IDBKeyRange.cpp17
-rwxr-xr-xWebCore/storage/IDBObjectStoreBackendImpl.cpp84
-rw-r--r--WebCore/svg/SVGAElement.cpp13
-rw-r--r--WebCore/svg/SVGAElement.h7
-rw-r--r--WebCore/svg/SVGAltGlyphElement.cpp7
-rw-r--r--WebCore/svg/SVGAltGlyphElement.h17
-rw-r--r--WebCore/svg/SVGAngle.cpp19
-rw-r--r--WebCore/svg/SVGAngle.h7
-rw-r--r--WebCore/svg/SVGAnimateColorElement.cpp9
-rw-r--r--WebCore/svg/SVGAnimateColorElement.h3
-rw-r--r--WebCore/svg/SVGAnimateElement.cpp9
-rw-r--r--WebCore/svg/SVGAnimateElement.h8
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.cpp7
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.h5
-rw-r--r--WebCore/svg/SVGAnimateTransformElement.cpp7
-rw-r--r--WebCore/svg/SVGAnimateTransformElement.h5
-rw-r--r--WebCore/svg/SVGAnimatedPathData.cpp41
-rw-r--r--WebCore/svg/SVGAnimatedPathData.h5
-rw-r--r--WebCore/svg/SVGAnimatedPoints.cpp41
-rw-r--r--WebCore/svg/SVGAnimatedPoints.h4
-rw-r--r--WebCore/svg/SVGAnimationElement.cpp10
-rw-r--r--WebCore/svg/SVGAnimationElement.h15
-rw-r--r--WebCore/svg/SVGCircleElement.cpp10
-rw-r--r--WebCore/svg/SVGCircleElement.h5
-rw-r--r--WebCore/svg/SVGClipPathElement.cpp10
-rw-r--r--WebCore/svg/SVGClipPathElement.h5
-rw-r--r--WebCore/svg/SVGColor.cpp15
-rw-r--r--WebCore/svg/SVGColor.h11
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.cpp14
-rw-r--r--WebCore/svg/SVGComponentTransferFunctionElement.h6
-rw-r--r--WebCore/svg/SVGCursorElement.cpp12
-rw-r--r--WebCore/svg/SVGCursorElement.h7
-rw-r--r--WebCore/svg/SVGDefsElement.cpp10
-rw-r--r--WebCore/svg/SVGDefsElement.h5
-rw-r--r--WebCore/svg/SVGDescElement.cpp8
-rw-r--r--WebCore/svg/SVGDescElement.h6
-rw-r--r--WebCore/svg/SVGDocument.cpp4
-rw-r--r--WebCore/svg/SVGDocument.h2
-rw-r--r--WebCore/svg/SVGDocumentExtensions.cpp10
-rw-r--r--WebCore/svg/SVGDocumentExtensions.h2
-rw-r--r--WebCore/svg/SVGElement.cpp4
-rw-r--r--WebCore/svg/SVGElement.h10
-rw-r--r--WebCore/svg/SVGElementInstanceList.h5
-rw-r--r--WebCore/svg/SVGEllipseElement.cpp10
-rw-r--r--WebCore/svg/SVGEllipseElement.h5
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.cpp10
-rw-r--r--WebCore/svg/SVGExternalResourcesRequired.h3
-rw-r--r--WebCore/svg/SVGFEBlendElement.cpp7
-rw-r--r--WebCore/svg/SVGFEBlendElement.h5
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.cpp7
-rw-r--r--WebCore/svg/SVGFEColorMatrixElement.h5
-rw-r--r--WebCore/svg/SVGFEComponentTransferElement.cpp7
-rw-r--r--WebCore/svg/SVGFEComponentTransferElement.h5
-rw-r--r--WebCore/svg/SVGFECompositeElement.cpp7
-rw-r--r--WebCore/svg/SVGFECompositeElement.h5
-rw-r--r--WebCore/svg/SVGFEConvolveMatrixElement.cpp7
-rw-r--r--WebCore/svg/SVGFEConvolveMatrixElement.h7
-rw-r--r--WebCore/svg/SVGFEDiffuseLightingElement.cpp11
-rw-r--r--WebCore/svg/SVGFEDiffuseLightingElement.h5
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.cpp7
-rw-r--r--WebCore/svg/SVGFEDisplacementMapElement.h9
-rw-r--r--WebCore/svg/SVGFEDistantLightElement.cpp7
-rw-r--r--WebCore/svg/SVGFEDistantLightElement.h5
-rw-r--r--WebCore/svg/SVGFEFloodElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFloodElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncAElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncAElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncBElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncBElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncGElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncGElement.h5
-rw-r--r--WebCore/svg/SVGFEFuncRElement.cpp7
-rw-r--r--WebCore/svg/SVGFEFuncRElement.h5
-rw-r--r--WebCore/svg/SVGFEGaussianBlurElement.cpp7
-rw-r--r--WebCore/svg/SVGFEGaussianBlurElement.h7
-rw-r--r--WebCore/svg/SVGFEImageElement.cpp12
-rw-r--r--WebCore/svg/SVGFEImageElement.h7
-rw-r--r--WebCore/svg/SVGFELightElement.cpp10
-rw-r--r--WebCore/svg/SVGFELightElement.h9
-rw-r--r--WebCore/svg/SVGFEMergeElement.cpp7
-rw-r--r--WebCore/svg/SVGFEMergeElement.h4
-rw-r--r--WebCore/svg/SVGFEMergeNodeElement.cpp7
-rw-r--r--WebCore/svg/SVGFEMergeNodeElement.h5
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.cpp5
-rw-r--r--WebCore/svg/SVGFEMorphologyElement.h7
-rw-r--r--WebCore/svg/SVGFEOffsetElement.cpp7
-rw-r--r--WebCore/svg/SVGFEOffsetElement.h5
-rw-r--r--WebCore/svg/SVGFEPointLightElement.cpp10
-rw-r--r--WebCore/svg/SVGFEPointLightElement.h7
-rw-r--r--WebCore/svg/SVGFESpecularLightingElement.cpp13
-rw-r--r--WebCore/svg/SVGFESpecularLightingElement.h5
-rw-r--r--WebCore/svg/SVGFESpotLightElement.cpp7
-rw-r--r--WebCore/svg/SVGFESpotLightElement.h5
-rw-r--r--WebCore/svg/SVGFETileElement.cpp7
-rw-r--r--WebCore/svg/SVGFETileElement.h5
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.cpp7
-rw-r--r--WebCore/svg/SVGFETurbulenceElement.h5
-rw-r--r--WebCore/svg/SVGFilterElement.cpp7
-rw-r--r--WebCore/svg/SVGFilterElement.h23
-rw-r--r--WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp8
-rw-r--r--WebCore/svg/SVGFilterPrimitiveStandardAttributes.h15
-rw-r--r--WebCore/svg/SVGFitToViewBox.cpp8
-rw-r--r--WebCore/svg/SVGFitToViewBox.h3
-rw-r--r--WebCore/svg/SVGFontData.cpp4
-rw-r--r--WebCore/svg/SVGFontData.h2
-rw-r--r--WebCore/svg/SVGFontElement.cpp7
-rw-r--r--WebCore/svg/SVGFontElement.h16
-rw-r--r--WebCore/svg/SVGFontFaceElement.cpp13
-rw-r--r--WebCore/svg/SVGFontFaceElement.h17
-rw-r--r--WebCore/svg/SVGFontFaceFormatElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceFormatElement.h3
-rw-r--r--WebCore/svg/SVGFontFaceNameElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceNameElement.h7
-rw-r--r--WebCore/svg/SVGFontFaceSrcElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceSrcElement.h9
-rw-r--r--WebCore/svg/SVGFontFaceUriElement.cpp9
-rw-r--r--WebCore/svg/SVGFontFaceUriElement.h13
-rw-r--r--WebCore/svg/SVGForeignObjectElement.cpp10
-rw-r--r--WebCore/svg/SVGForeignObjectElement.h7
-rw-r--r--WebCore/svg/SVGGElement.cpp10
-rw-r--r--WebCore/svg/SVGGElement.h12
-rw-r--r--WebCore/svg/SVGGlyphElement.cpp7
-rw-r--r--WebCore/svg/SVGGlyphElement.h20
-rw-r--r--WebCore/svg/SVGGradientElement.cpp10
-rw-r--r--WebCore/svg/SVGGradientElement.h12
-rw-r--r--WebCore/svg/SVGHKernElement.cpp7
-rw-r--r--WebCore/svg/SVGHKernElement.h15
-rw-r--r--WebCore/svg/SVGImageElement.cpp16
-rw-r--r--WebCore/svg/SVGImageElement.h6
-rw-r--r--WebCore/svg/SVGImageLoader.cpp4
-rw-r--r--WebCore/svg/SVGImageLoader.h2
-rw-r--r--WebCore/svg/SVGLangSpace.cpp13
-rw-r--r--WebCore/svg/SVGLangSpace.h5
-rw-r--r--WebCore/svg/SVGLengthList.cpp4
-rw-r--r--WebCore/svg/SVGLengthList.h3
-rw-r--r--WebCore/svg/SVGLineElement.cpp10
-rw-r--r--WebCore/svg/SVGLineElement.h5
-rw-r--r--WebCore/svg/SVGLinearGradientElement.cpp7
-rw-r--r--WebCore/svg/SVGLinearGradientElement.h11
-rw-r--r--WebCore/svg/SVGLocatable.cpp8
-rw-r--r--WebCore/svg/SVGLocatable.h3
-rw-r--r--WebCore/svg/SVGMPathElement.cpp7
-rw-r--r--WebCore/svg/SVGMPathElement.h9
-rw-r--r--WebCore/svg/SVGMarkerElement.cpp10
-rw-r--r--WebCore/svg/SVGMarkerElement.h11
-rw-r--r--WebCore/svg/SVGMaskElement.cpp10
-rw-r--r--WebCore/svg/SVGMaskElement.h8
-rw-r--r--WebCore/svg/SVGMetadataElement.cpp11
-rw-r--r--WebCore/svg/SVGMetadataElement.h5
-rw-r--r--WebCore/svg/SVGMissingGlyphElement.cpp9
-rw-r--r--WebCore/svg/SVGMissingGlyphElement.h4
-rw-r--r--WebCore/svg/SVGNumberList.cpp4
-rw-r--r--WebCore/svg/SVGNumberList.h1
-rw-r--r--WebCore/svg/SVGPaint.cpp4
-rw-r--r--WebCore/svg/SVGPaint.h6
-rw-r--r--WebCore/svg/SVGParserUtilities.cpp11
-rw-r--r--WebCore/svg/SVGPathBlender.cpp4
-rw-r--r--WebCore/svg/SVGPathBlender.h1
-rw-r--r--WebCore/svg/SVGPathBuilder.h4
-rw-r--r--WebCore/svg/SVGPathByteStreamBuilder.h5
-rw-r--r--WebCore/svg/SVGPathByteStreamSource.cpp4
-rw-r--r--WebCore/svg/SVGPathByteStreamSource.h6
-rw-r--r--WebCore/svg/SVGPathConsumer.h3
-rw-r--r--WebCore/svg/SVGPathElement.cpp10
-rw-r--r--WebCore/svg/SVGPathElement.h15
-rw-r--r--WebCore/svg/SVGPathParser.cpp4
-rw-r--r--WebCore/svg/SVGPathParser.h1
-rw-r--r--WebCore/svg/SVGPathSeg.cpp14
-rw-r--r--WebCore/svg/SVGPathSeg.h24
-rw-r--r--WebCore/svg/SVGPathSegArc.h12
-rw-r--r--WebCore/svg/SVGPathSegClosePath.cpp42
-rw-r--r--WebCore/svg/SVGPathSegClosePath.h7
-rw-r--r--WebCore/svg/SVGPathSegCurvetoCubic.h14
-rw-r--r--WebCore/svg/SVGPathSegCurvetoCubicSmooth.h19
-rw-r--r--WebCore/svg/SVGPathSegCurvetoQuadratic.h19
-rw-r--r--WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h12
-rw-r--r--WebCore/svg/SVGPathSegLineto.h12
-rw-r--r--WebCore/svg/SVGPathSegLinetoHorizontal.h12
-rw-r--r--WebCore/svg/SVGPathSegLinetoVertical.h12
-rw-r--r--WebCore/svg/SVGPathSegList.cpp4
-rw-r--r--WebCore/svg/SVGPathSegList.h1
-rw-r--r--WebCore/svg/SVGPathSegListBuilder.h4
-rw-r--r--WebCore/svg/SVGPathSegListSource.cpp4
-rw-r--r--WebCore/svg/SVGPathSegListSource.h6
-rw-r--r--WebCore/svg/SVGPathSegMoveto.h12
-rw-r--r--WebCore/svg/SVGPathSource.h3
-rw-r--r--WebCore/svg/SVGPathStringBuilder.cpp4
-rw-r--r--WebCore/svg/SVGPathStringBuilder.h6
-rw-r--r--WebCore/svg/SVGPathStringSource.cpp4
-rw-r--r--WebCore/svg/SVGPathStringSource.h5
-rw-r--r--WebCore/svg/SVGPatternElement.cpp12
-rw-r--r--WebCore/svg/SVGPatternElement.h9
-rw-r--r--WebCore/svg/SVGPointList.cpp4
-rw-r--r--WebCore/svg/SVGPointList.h1
-rw-r--r--WebCore/svg/SVGPolyElement.cpp12
-rw-r--r--WebCore/svg/SVGPolyElement.h12
-rw-r--r--WebCore/svg/SVGPolygonElement.cpp7
-rw-r--r--WebCore/svg/SVGPolygonElement.h4
-rw-r--r--WebCore/svg/SVGPolylineElement.cpp7
-rw-r--r--WebCore/svg/SVGPolylineElement.h4
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.cpp4
-rw-r--r--WebCore/svg/SVGPreserveAspectRatio.h1
-rw-r--r--WebCore/svg/SVGRadialGradientElement.cpp7
-rw-r--r--WebCore/svg/SVGRadialGradientElement.h11
-rw-r--r--WebCore/svg/SVGRectElement.cpp10
-rw-r--r--WebCore/svg/SVGRectElement.h5
-rw-r--r--WebCore/svg/SVGSVGElement.cpp14
-rw-r--r--WebCore/svg/SVGSVGElement.h28
-rw-r--r--WebCore/svg/SVGScriptElement.cpp9
-rw-r--r--WebCore/svg/SVGScriptElement.h13
-rw-r--r--WebCore/svg/SVGSetElement.cpp10
-rw-r--r--WebCore/svg/SVGSetElement.h4
-rw-r--r--WebCore/svg/SVGStopElement.cpp7
-rw-r--r--WebCore/svg/SVGStopElement.h9
-rw-r--r--WebCore/svg/SVGStringList.cpp4
-rw-r--r--WebCore/svg/SVGStringList.h1
-rw-r--r--WebCore/svg/SVGStylable.cpp39
-rw-r--r--WebCore/svg/SVGStylable.h4
-rw-r--r--WebCore/svg/SVGStyleElement.cpp8
-rw-r--r--WebCore/svg/SVGStyleElement.h25
-rw-r--r--WebCore/svg/SVGStyledElement.cpp8
-rw-r--r--WebCore/svg/SVGStyledElement.h30
-rw-r--r--WebCore/svg/SVGStyledLocatableElement.cpp9
-rw-r--r--WebCore/svg/SVGStyledLocatableElement.h11
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.cpp9
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.h14
-rw-r--r--WebCore/svg/SVGSwitchElement.cpp13
-rw-r--r--WebCore/svg/SVGSwitchElement.h5
-rw-r--r--WebCore/svg/SVGSymbolElement.cpp10
-rw-r--r--WebCore/svg/SVGSymbolElement.h5
-rw-r--r--WebCore/svg/SVGTRefElement.cpp8
-rw-r--r--WebCore/svg/SVGTRefElement.h7
-rw-r--r--WebCore/svg/SVGTSpanElement.cpp7
-rw-r--r--WebCore/svg/SVGTSpanElement.h6
-rw-r--r--WebCore/svg/SVGTests.cpp5
-rw-r--r--WebCore/svg/SVGTests.h9
-rw-r--r--WebCore/svg/SVGTextContentElement.cpp11
-rw-r--r--WebCore/svg/SVGTextContentElement.h18
-rw-r--r--WebCore/svg/SVGTextElement.cpp5
-rw-r--r--WebCore/svg/SVGTextElement.h16
-rw-r--r--WebCore/svg/SVGTextPathElement.cpp8
-rw-r--r--WebCore/svg/SVGTextPathElement.h9
-rw-r--r--WebCore/svg/SVGTextPositioningElement.cpp8
-rw-r--r--WebCore/svg/SVGTextPositioningElement.h4
-rw-r--r--WebCore/svg/SVGTitleElement.cpp9
-rw-r--r--WebCore/svg/SVGTitleElement.h4
-rw-r--r--WebCore/svg/SVGTransform.cpp4
-rw-r--r--WebCore/svg/SVGTransform.h3
-rw-r--r--WebCore/svg/SVGTransformable.cpp9
-rw-r--r--WebCore/svg/SVGTransformable.h3
-rw-r--r--WebCore/svg/SVGURIReference.cpp8
-rw-r--r--WebCore/svg/SVGURIReference.h3
-rw-r--r--WebCore/svg/SVGUseElement.cpp15
-rw-r--r--WebCore/svg/SVGUseElement.h16
-rw-r--r--WebCore/svg/SVGVKernElement.cpp7
-rw-r--r--WebCore/svg/SVGVKernElement.h8
-rw-r--r--WebCore/svg/SVGViewElement.cpp10
-rw-r--r--WebCore/svg/SVGViewElement.h9
-rw-r--r--WebCore/svg/SVGViewSpec.cpp8
-rw-r--r--WebCore/svg/SVGViewSpec.h1
-rw-r--r--WebCore/svg/SVGZoomAndPan.cpp14
-rw-r--r--WebCore/svg/SVGZoomAndPan.h10
-rw-r--r--WebCore/svg/SVGZoomEvent.cpp4
-rw-r--r--WebCore/svg/SVGZoomEvent.h5
-rw-r--r--WebCore/svg/graphics/SVGImage.cpp2
-rw-r--r--WebCore/svg/svgtags.in160
-rw-r--r--WebCore/wml/WMLAElement.cpp5
-rw-r--r--WebCore/wml/WMLAElement.h2
-rw-r--r--WebCore/wml/WMLAccessElement.cpp5
-rw-r--r--WebCore/wml/WMLAccessElement.h2
-rw-r--r--WebCore/wml/WMLAnchorElement.cpp5
-rw-r--r--WebCore/wml/WMLAnchorElement.h2
-rw-r--r--WebCore/wml/WMLBRElement.cpp5
-rw-r--r--WebCore/wml/WMLBRElement.h2
-rw-r--r--WebCore/wml/WMLCardElement.cpp5
-rw-r--r--WebCore/wml/WMLCardElement.h2
-rw-r--r--WebCore/wml/WMLDoElement.cpp5
-rw-r--r--WebCore/wml/WMLDoElement.h2
-rw-r--r--WebCore/wml/WMLDocument.h2
-rw-r--r--WebCore/wml/WMLElement.cpp4
-rw-r--r--WebCore/wml/WMLFieldSetElement.cpp5
-rw-r--r--WebCore/wml/WMLFieldSetElement.h2
-rw-r--r--WebCore/wml/WMLFormControlElement.cpp5
-rw-r--r--WebCore/wml/WMLGoElement.cpp5
-rw-r--r--WebCore/wml/WMLGoElement.h2
-rw-r--r--WebCore/wml/WMLImageElement.cpp9
-rw-r--r--WebCore/wml/WMLImageElement.h2
-rw-r--r--WebCore/wml/WMLInputElement.cpp5
-rw-r--r--WebCore/wml/WMLInputElement.h2
-rw-r--r--WebCore/wml/WMLInsertedLegendElement.cpp5
-rw-r--r--WebCore/wml/WMLInsertedLegendElement.h2
-rw-r--r--WebCore/wml/WMLIntrinsicEvent.cpp5
-rw-r--r--WebCore/wml/WMLMetaElement.cpp5
-rw-r--r--WebCore/wml/WMLMetaElement.h2
-rw-r--r--WebCore/wml/WMLNoopElement.cpp5
-rw-r--r--WebCore/wml/WMLNoopElement.h2
-rw-r--r--WebCore/wml/WMLOnEventElement.cpp5
-rw-r--r--WebCore/wml/WMLOnEventElement.h2
-rw-r--r--WebCore/wml/WMLOptGroupElement.cpp5
-rw-r--r--WebCore/wml/WMLOptGroupElement.h2
-rw-r--r--WebCore/wml/WMLOptionElement.cpp5
-rw-r--r--WebCore/wml/WMLOptionElement.h2
-rw-r--r--WebCore/wml/WMLPElement.cpp5
-rw-r--r--WebCore/wml/WMLPElement.h2
-rw-r--r--WebCore/wml/WMLPostfieldElement.cpp5
-rw-r--r--WebCore/wml/WMLPostfieldElement.h2
-rw-r--r--WebCore/wml/WMLPrevElement.cpp5
-rw-r--r--WebCore/wml/WMLPrevElement.h2
-rw-r--r--WebCore/wml/WMLRefreshElement.cpp5
-rw-r--r--WebCore/wml/WMLRefreshElement.h2
-rw-r--r--WebCore/wml/WMLSelectElement.cpp5
-rw-r--r--WebCore/wml/WMLSelectElement.h2
-rw-r--r--WebCore/wml/WMLSetvarElement.cpp5
-rw-r--r--WebCore/wml/WMLSetvarElement.h2
-rw-r--r--WebCore/wml/WMLTableElement.cpp5
-rw-r--r--WebCore/wml/WMLTableElement.h2
-rw-r--r--WebCore/wml/WMLTagNames.in50
-rw-r--r--WebCore/wml/WMLTaskElement.cpp5
-rw-r--r--WebCore/wml/WMLTaskElement.h2
-rw-r--r--WebCore/wml/WMLTemplateElement.cpp5
-rw-r--r--WebCore/wml/WMLTemplateElement.h2
-rw-r--r--WebCore/wml/WMLTimerElement.cpp5
-rw-r--r--WebCore/wml/WMLTimerElement.h2
-rw-r--r--WebCore/workers/WorkerContext.cpp13
-rw-r--r--WebCore/workers/WorkerContext.h5
-rw-r--r--WebCore/workers/WorkerContext.idl8
-rw-r--r--WebCore/xml/XMLHttpRequest.cpp104
-rw-r--r--WebCore/xml/XMLHttpRequest.h15
-rw-r--r--WebCore/xml/XMLHttpRequest.idl15
-rw-r--r--WebKit/ChangeLog8
-rw-r--r--WebKit/StringsNotToBeLocalized.txt1
-rw-r--r--WebKit/chromium/ChangeLog404
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/WebKit.gyp19
-rw-r--r--WebKit/chromium/WebKit.gypi3
-rw-r--r--WebKit/chromium/features.gypi5
-rw-r--r--WebKit/chromium/public/WebBindings.h5
-rw-r--r--WebKit/chromium/public/WebClipboard.h8
-rw-r--r--WebKit/chromium/public/WebElement.h6
-rw-r--r--WebKit/chromium/public/WebFrame.h2
-rw-r--r--WebKit/chromium/public/WebIDBDatabase.h11
-rw-r--r--WebKit/chromium/public/WebInputElement.h1
-rw-r--r--WebKit/chromium/public/WebNotification.h3
-rw-r--r--WebKit/chromium/public/WebRuntimeFeatures.h6
-rw-r--r--WebKit/chromium/public/WebViewClient.h3
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp7
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.cpp104
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.h70
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp19
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h6
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp8
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.cpp5
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.h2
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp5
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h1
-rw-r--r--WebKit/chromium/src/LocalFileSystemChromium.cpp69
-rw-r--r--WebKit/chromium/src/WebBindings.cpp27
-rw-r--r--WebKit/chromium/src/WebElement.cpp5
-rw-r--r--WebKit/chromium/src/WebEntities.cpp51
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp9
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.h6
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp7
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h1
-rw-r--r--WebKit/chromium/src/WebIDBCursorImpl.cpp2
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.h1
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp5
-rw-r--r--WebKit/chromium/src/WebNotification.cpp6
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp32
-rw-r--r--WebKit/chromium/src/WebScrollbarImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp12
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp15
-rw-r--r--WebKit/chromium/src/js/DevTools.js37
-rw-r--r--WebKit/chromium/src/js/ProfilerAgent.js138
-rw-r--r--WebKit/chromium/src/js/ProfilerProcessor.js543
-rwxr-xr-xWebKit/chromium/src/js/devTools.css112
-rw-r--r--WebKit/chromium/src/win/WebInputEventFactory.cpp10
-rw-r--r--WebKit/efl/CMakeListsEfl.txt11
-rw-r--r--WebKit/efl/ChangeLog147
-rw-r--r--WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp197
-rw-r--r--WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h91
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp62
-rw-r--r--WebKit/efl/ewk/ewk_frame.h1
-rw-r--r--WebKit/efl/ewk/ewk_main.cpp94
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp83
-rw-r--r--WebKit/efl/ewk/ewk_view.h8
-rw-r--r--WebKit/gtk/ChangeLog115
-rw-r--r--WebKit/gtk/NEWS15
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/FullscreenVideoController.h7
-rw-r--r--WebKit/gtk/docs/webkitgtk-docs.sgml9
-rw-r--r--WebKit/gtk/po/ChangeLog82
-rw-r--r--WebKit/gtk/po/es.po37
-rw-r--r--WebKit/gtk/po/nb.po1104
-rw-r--r--WebKit/gtk/tests/testcopyandpaste.c5
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp35
-rw-r--r--WebKit/mac/Carbon/HIViewAdapter.m1
-rw-r--r--WebKit/mac/Carbon/HIWebView.mm6
-rw-r--r--WebKit/mac/ChangeLog262
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig3
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/Misc/QuickDrawCompatibility.h96
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm1
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.h6
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm71
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.h14
-rw-r--r--WebKit/mac/WebCoreSupport/WebEditorClient.mm46
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm20
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.mm1
-rw-r--r--WebKit/mac/WebInspector/WebInspectorFrontend.mm2
-rw-r--r--WebKit/mac/WebView/WebDocumentInternal.h1
-rw-r--r--WebKit/mac/WebView/WebFrame.mm116
-rw-r--r--WebKit/mac/WebView/WebFrameInternal.h4
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h13
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm92
-rw-r--r--WebKit/mac/WebView/WebHTMLViewInternal.h2
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm5
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm11
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h6
-rw-r--r--WebKit/mac/WebView/WebUIDelegatePrivate.h15
-rw-r--r--WebKit/mac/WebView/WebView.mm17
-rw-r--r--WebKit/mac/WebView/WebViewPrivate.h1
-rw-r--r--WebKit/qt/Api/qwebelement.cpp2
-rw-r--r--WebKit/qt/Api/qwebframe.cpp2
-rw-r--r--WebKit/qt/Api/qwebpage.cpp37
-rw-r--r--WebKit/qt/Api/qwebpage.h6
-rw-r--r--WebKit/qt/Api/qwebplugindatabase.cpp4
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp9
-rw-r--r--WebKit/qt/Api/qwebview.cpp6
-rw-r--r--WebKit/qt/ChangeLog229
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp16
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp2
-rw-r--r--WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp98
-rw-r--r--WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h60
-rw-r--r--WebKit/qt/tests/qwebframe/tst_qwebframe.cpp12
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp15
-rw-r--r--WebKit/qt/tests/qwebview/tst_qwebview.cpp110
-rw-r--r--WebKit/win/ChangeLog93
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl5
-rw-r--r--WebKit/win/WebFrame.cpp4
-rw-r--r--WebKit/win/WebView.cpp3
-rw-r--r--WebKit/wince/ChangeLog120
-rw-r--r--WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp91
-rw-r--r--WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h57
-rw-r--r--WebKit/wince/WebCoreSupport/DragClientWinCE.cpp72
-rw-r--r--WebKit/wince/WebCoreSupport/DragClientWinCE.h48
-rw-r--r--WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp315
-rw-r--r--WebKit/wince/WebCoreSupport/EditorClientWinCE.h108
-rw-r--r--WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp84
-rw-r--r--WebKit/wince/WebCoreSupport/InspectorClientWinCE.h59
-rw-r--r--WebKit/wx/ChangeLog56
-rw-r--r--WebKit/wx/WebEdit.cpp33
-rw-r--r--WebKit/wx/WebEdit.h3
-rw-r--r--WebKit/wx/WebFrame.cpp10
-rw-r--r--WebKit/wx/WebFrame.h6
-rw-r--r--WebKit/wx/WebKitSupport/EditorClientWx.cpp19
-rw-r--r--WebKit/wx/WebSettings.h2
-rw-r--r--WebKit/wx/WebView.cpp35
-rw-r--r--WebKit/wx/WebView.h51
-rw-r--r--WebKit/wx/bindings/python/webview.i53
-rw-r--r--WebKitLibraries/WebKitSystemInterface.h1
-rw-r--r--WebKitLibraries/libWebKitSystemInterfaceLeopard.abin1637568 -> 1637800 bytes
-rw-r--r--WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.abin1347668 -> 1347660 bytes
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json10
-rw-r--r--WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg1
-rw-r--r--WebKitTools/BuildSlaveSupport/gtk/README52
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/buildbot/log/run38
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/buildbot/run77
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon73
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/crashmon/log/run38
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/crashmon/run74
-rw-r--r--WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf87
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/pulseaudio/run24
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/xvfb/log/run37
-rwxr-xr-xWebKitTools/BuildSlaveSupport/gtk/xvfb/run41
-rwxr-xr-xWebKitTools/BuildSlaveSupport/win/kill-old-processes3
-rw-r--r--WebKitTools/ChangeLog660
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp7
-rw-r--r--WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp21
-rw-r--r--WebKitTools/DumpRenderTree/chromium/AccessibilityController.h11
-rw-r--r--WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp5
-rw-r--r--WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h1
-rw-r--r--WebKitTools/DumpRenderTree/chromium/EventSender.cpp103
-rw-r--r--WebKitTools/DumpRenderTree/chromium/EventSender.h6
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp26
-rw-r--r--WebKitTools/DumpRenderTree/chromium/LayoutTestController.h4
-rw-r--r--WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp53
-rw-r--r--WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h7
-rw-r--r--WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp6
-rw-r--r--WebKitTools/DumpRenderTree/chromium/WebViewHost.h1
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.cpp59
-rw-r--r--WebKitTools/DumpRenderTree/gtk/EventSender.h4
-rw-r--r--WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp6
-rw-r--r--WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm1
-rw-r--r--WebKitTools/DumpRenderTree/mac/UIDelegate.mm17
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro1
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp105
-rw-r--r--WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h18
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp8
-rw-r--r--WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h4
-rw-r--r--WebKitTools/DumpRenderTree/qt/main.cpp14
-rw-r--r--WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp28
-rw-r--r--WebKitTools/GNUmakefile.am4
-rw-r--r--WebKitTools/MiniBrowser/mac/BrowserWindowController.m6
-rw-r--r--WebKitTools/MiniBrowser/qt/BrowserWindow.cpp12
-rw-r--r--WebKitTools/MiniBrowser/qt/BrowserWindow.h11
-rw-r--r--WebKitTools/MiniBrowser/qt/MiniBrowser.pro2
-rw-r--r--WebKitTools/MiniBrowser/qt/main.cpp22
-rw-r--r--WebKitTools/QueueStatusServer/handlers/dashboard.py1
-rw-r--r--WebKitTools/QueueStatusServer/handlers/queuestatus.py2
-rw-r--r--WebKitTools/QueueStatusServer/model/queues.py2
-rwxr-xr-xWebKitTools/Scripts/build-webkit9
-rwxr-xr-xWebKitTools/Scripts/check-for-global-initializers5
-rwxr-xr-xWebKitTools/Scripts/enumerate-included-framework-headers61
-rwxr-xr-xWebKitTools/Scripts/prepare-ChangeLog2
-rw-r--r--WebKitTools/Scripts/webkitdirs.pm2
-rw-r--r--WebKitTools/Scripts/webkitpy/common/config/committers.py4
-rw-r--r--WebKitTools/Scripts/webkitpy/common/config/ports.py19
-rw-r--r--WebKitTools/Scripts/webkitpy/common/net/bugzilla.py9
-rw-r--r--WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt2
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py22
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py11
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py49
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py35
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py69
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/base.py1
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/test.py16
-rwxr-xr-xWebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py363
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py151
-rw-r--r--WebKitTools/Scripts/webkitpy/style/checker.py4
-rw-r--r--WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py10
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py3
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py6
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl5
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp2
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp2
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp25
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h5
-rw-r--r--WebKitTools/WebKitTestRunner/TestController.cpp17
-rw-r--r--WebKitTools/iExploder/htdocs/cssproperties.in20
-rw-r--r--WebKitTools/iExploder/htdocs/htmlattrs.in12
-rw-r--r--WebKitTools/iExploder/htdocs/htmltags.in13
-rw-r--r--WebKitTools/wx/build/settings.py6
1332 files changed, 59436 insertions, 20879 deletions
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index fd23733..1cf4ccd 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,579 @@
+2010-09-02 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43230
+ <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
+
+ One can't delete a ThreadSpecific object that has data in it. It's not even possible to
+ enumerate data objects in all threads, much less destroy them from a thread that's destroying
+ the ThreadSpecific.
+
+ * parser/JSParser.cpp:
+ (JSC::JSParser::JSParser):
+ * runtime/JSGlobalData.h:
+ * wtf/WTFThreadData.cpp:
+ (WTF::WTFThreadData::WTFThreadData):
+ * wtf/WTFThreadData.h:
+ (WTF::WTFThreadData::approximatedStackStart):
+ Moved stack guard tracking from JSGlobalData to WTFThreadData.
+
+ * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
+ ever face a situation where we'd want to delete a ThreadSpecific object.
+
+2010-09-01 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Oliver Hunt.
+
+ Ecma-262 15.11.1.1 states that if the argument is undefined then an
+ Error object's message property should be set to the empty string.
+
+ * runtime/ErrorInstance.cpp:
+ (JSC::ErrorInstance::ErrorInstance):
+ (JSC::ErrorInstance::create):
+ * runtime/ErrorInstance.h:
+ * runtime/ErrorPrototype.cpp:
+ (JSC::ErrorPrototype::ErrorPrototype):
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
+ mixed types with code that uses size_t.
+
+ * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Isolate all GTK+ typedefs into one file
+ https://bugs.webkit.org/show_bug.cgi?id=44900
+
+ * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
+ * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
+ * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
+ * wtf/gobject/GOwnPtr.h: Ditto.
+ * wtf/gobject/GRefPtr.h: Ditto.
+ * wtf/gtk/GtkTypedefs.h: Added.
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Fix 'make dist' in preparation of the 1.3.3 release
+ https://bugs.webkit.org/show_bug.cgi?id=44978
+
+ * GNUmakefile.am: Adding missing headers to the sources list.
+
+2010-08-31 Chao-ying Fu <fu@mips.com>
+
+ Reviewed by Oliver Hunt.
+
+ Support emit_op_mod() for MIPS
+ https://bugs.webkit.org/show_bug.cgi?id=42855
+
+ This patch uses MIPS div instructions for op_mod to improve performance.
+
+ * assembler/MIPSAssembler.h:
+ (JSC::MIPSAssembler::div):
+ * jit/JITArithmetic.cpp:
+ (JSC::JIT::emit_op_mod):
+ (JSC::JIT::emitSlow_op_mod):
+
+2010-08-31 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
+ https://bugs.webkit.org/show_bug.cgi?id=44870
+
+ * wtf/Assertions.h:
+ * wtf/UnusedParam.h:
+
+2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ JSC TimeoutChecker::didTimeOut overflows on ARM
+ https://bugs.webkit.org/show_bug.cgi?id=38538
+
+ Make getCPUTime() return values relative to the first call.
+ The previous implementation relied on simply on currentTime(), which
+ return a time since epoch and not a time since the thread started. This
+ made the return value of getCPUTime() overflow on 32 bits.
+
+ * runtime/TimeoutChecker.cpp:
+ (JSC::getCPUTime):
+
+2010-08-30 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
+ https://bugs.webkit.org/show_bug.cgi?id=44315
+
+ Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
+
+ * wtf/Platform.h:
+
+2010-08-30 Chris Rogers <crogers@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Fix namespace for wtf/Complex.h and wtf/Vector3.h
+ https://bugs.webkit.org/show_bug.cgi?id=44892
+
+ * wtf/Complex.h:
+ * wtf/Vector3.h:
+
+2010-08-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Strings returned by asciiDebug() should be NULL-terminated.
+ https://bugs.webkit.org/show_bug.cgi?id=44866
+
+ * wtf/text/WTFString.cpp:
+ (asciiDebug):
+
+2010-08-30 Zoltan Herczeg <zherczeg@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Refactor number parsing in the lexer
+ https://bugs.webkit.org/show_bug.cgi?id=44104
+
+ Number parsing was full of gotos, and needed a complete
+ redesign to remove them (Only one remained). Furthermore
+ integer arithmetic is empolyed for fast cases (= small
+ integer numbers).
+
+ * parser/Lexer.cpp:
+ (JSC::Lexer::parseHex):
+ (JSC::Lexer::parseOctal):
+ (JSC::Lexer::parseDecimal):
+ (JSC::Lexer::parseNumberAfterDecimalPoint):
+ (JSC::Lexer::parseNumberAfterExponentIndicator):
+ (JSC::Lexer::lex):
+ * parser/Lexer.h:
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ Fix Qt build.
+
+ * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
+ * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
+ * wtf/unicode/wince/UnicodeWince.h: Ditto.
+
+2010-08-29 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Kent Tamura.
+
+ [BREWMP] Port vprintf_stderr_common
+ https://bugs.webkit.org/show_bug.cgi?id=33568
+
+ Use BREW's DBGPRINTF to output debug messages.
+
+ * wtf/Assertions.cpp:
+
+2010-08-28 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
+
+ We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
+ that the result is within bounds. This is problematic in the case of double-to-unsigned
+ conversion because we should be saturating to array length.
+
+ Also, the error return value from Array.splice should be [], not undefined.
+
+ I don't see any security concerns here. These methods are spec'ed in such a way that they
+ can be applied to non Array objects, so in all cases the (potentially bogus) indices are
+ being passed to functions that will safely check accesses are within bounds.
+
+ * runtime/ArrayPrototype.cpp:
+ (JSC::argumentClampedIndexFromStartOrEnd):
+ (JSC::arrayProtoFuncJoin):
+ (JSC::arrayProtoFuncConcat):
+ (JSC::arrayProtoFuncReverse):
+ (JSC::arrayProtoFuncShift):
+ (JSC::arrayProtoFuncSlice):
+ (JSC::arrayProtoFuncSort):
+ (JSC::arrayProtoFuncSplice):
+ (JSC::arrayProtoFuncUnShift):
+ (JSC::arrayProtoFuncFilter):
+ (JSC::arrayProtoFuncMap):
+ (JSC::arrayProtoFuncEvery):
+ (JSC::arrayProtoFuncForEach):
+ (JSC::arrayProtoFuncSome):
+ (JSC::arrayProtoFuncReduce):
+ (JSC::arrayProtoFuncReduceRight):
+ (JSC::arrayProtoFuncIndexOf):
+ (JSC::arrayProtoFuncLastIndexOf):
+ * runtime/JSValue.h:
+ (JSC::JSValue::toUInt32):
+
+2010-08-28 Pratik Solanki <psolanki@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add an ENABLE define for purgeable memory support
+ https://bugs.webkit.org/show_bug.cgi?id=44777
+
+ * wtf/Platform.h:
+
+2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
+ https://bugs.webkit.org/show_bug.cgi?id=43179
+
+ Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
+ NPAPI Plugin Cache. The flag is enabled by default.
+
+ * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
+
+2010-07-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+ https://bugs.webkit.org/show_bug.cgi?id=43099
+
+ * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
+
+2010-08-27 Gavin Barraclough <barraclough@apple.com>
+
+ Windows build fix pt 2.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-08-27 Gavin Barraclough <barraclough@apple.com>
+
+ Windows build fix pt 1.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+
+2010-08-27 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
+
+ These methods should be using a version of dtoa that can generate results accurate
+ to the requested precision, whereas our version of dtoa is only currently able to
+ support producing results sufficiently accurate to distinguish the value from any
+ other IEEE-754 double precision number.
+
+ This change has no impact on benchmarks we track.
+
+ On microbenchmarks for these functions, this is a slight regression where a high
+ precision is requested (dtoa now need to iterate further to generate a a greater
+ number of digits), but with smaller precision values (hopefully more common) this
+ improves performance, since it reduced the accurate of result dtoa is required,
+ to produce, and removes the need to pre-round values before calling dtoa.
+
+ * JavaScriptCore.exp:
+ doubleToStringInJavaScriptFormat renamed to numberToString
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ doubleToStringInJavaScriptFormat renamed to numberToString
+
+ * runtime/UString.cpp:
+ (JSC::UString::number):
+ doubleToStringInJavaScriptFormat renamed to numberToString
+
+ * wtf/DecimalNumber.h:
+ (WTF::DecimalNumber::DecimalNumber):
+ (WTF::DecimalNumber::toStringDecimal):
+ (WTF::DecimalNumber::toStringExponential):
+ Remove all pre-rounding of values, instead call dtoa correctly.
+
+ * wtf/dtoa.cpp:
+ (WTF::dtoa):
+ * wtf/dtoa.h:
+ Reenable support for rounding to specific-figures/decimal-places in dtoa.
+ Modify to remove unbiased rounding, provide ECMA required away-from-zero.
+ Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
+ numberToString.
+
+2010-08-27 Chao-ying Fu <fu@mips.com>
+
+ Reviewed by Oliver Hunt.
+
+ Byte alignment issue on MIPS
+ https://bugs.webkit.org/show_bug.cgi?id=29415
+
+ MIPS accesses one byte at a time for now to avoid the help from the
+ kernel to fix unaligned accesses.
+
+ * wtf/text/AtomicString.cpp:
+ (WebCore::equal):
+ * wtf/text/StringHash.h:
+ (WebCore::StringHash::equal):
+
+2010-08-27 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ Fix a couple of typos in comment.
+
+ * bytecode/CodeBlock.h:
+
+2010-08-26 Gavin Barraclough <barraclough@apple.com>
+
+ Windows build fix.
+
+ * wtf/dtoa.cpp:
+
+2010-08-26 Gavin Barraclough <baraclough@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Bug 44735 - Clean up dtoa.cpp
+ Remove unused & unmaintained code paths, reformat code to match
+ coding standard & use platform #defines from Platform.h directly.
+
+ * wtf/dtoa.cpp:
+ (WTF::storeInc):
+ (WTF::multadd):
+ (WTF::s2b):
+ (WTF::lo0bits):
+ (WTF::mult):
+ (WTF::pow5mult):
+ (WTF::lshift):
+ (WTF::diff):
+ (WTF::ulp):
+ (WTF::b2d):
+ (WTF::d2b):
+ (WTF::ratio):
+ (WTF::):
+ (WTF::strtod):
+ (WTF::quorem):
+ (WTF::dtoa):
+
+2010-08-26 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber Stamped by Oliver Hunt.
+
+ Partially revert r65959. The toString changes regressed the v8 tests,
+ but keep the toFixed/toExponential/toPrecision changes.
+
+ * JavaScriptCore.exp:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * runtime/NumberPrototype.cpp:
+ * runtime/UString.cpp:
+ (JSC::UString::number):
+ * wtf/DecimalNumber.h:
+ * wtf/dtoa.cpp:
+ (WTF::append):
+ (WTF::doubleToStringInJavaScriptFormat):
+ * wtf/dtoa.h:
+ * wtf/text/WTFString.cpp:
+ * wtf/text/WTFString.h:
+
+2010-08-26 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+ https://bugs.webkit.org/show_bug.cgi?id=43761
+
+ Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
+
+ * wtf/Platform.h:
+
+2010-08-26 Gavin Barraclough <barraclough@apple.com>
+
+ Rolling out r64608, this regressed performance.
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * assembler/ARMAssembler.cpp:
+ (JSC::ARMAssembler::executableCopy):
+ * assembler/LinkBuffer.h:
+ (JSC::LinkBuffer::LinkBuffer):
+ (JSC::LinkBuffer::~LinkBuffer):
+ (JSC::LinkBuffer::performFinalization):
+ * assembler/MIPSAssembler.h:
+ (JSC::MIPSAssembler::executableCopy):
+ * assembler/X86Assembler.h:
+ (JSC::X86Assembler::executableCopy):
+ * bytecode/StructureStubInfo.h:
+ (JSC::StructureStubInfo::initGetByIdProto):
+ (JSC::StructureStubInfo::initGetByIdChain):
+ (JSC::StructureStubInfo::initGetByIdSelfList):
+ (JSC::StructureStubInfo::initGetByIdProtoList):
+ (JSC::StructureStubInfo::initPutByIdTransition):
+ * jit/ExecutableAllocator.cpp:
+ (JSC::ExecutablePool::systemAlloc):
+ * jit/ExecutableAllocator.h:
+ (JSC::ExecutablePool::create):
+ (JSC::ExecutableAllocator::ExecutableAllocator):
+ (JSC::ExecutableAllocator::poolForSize):
+ (JSC::ExecutablePool::ExecutablePool):
+ (JSC::ExecutablePool::poolAllocate):
+ * jit/ExecutableAllocatorFixedVMPool.cpp:
+ (JSC::FixedVMPoolAllocator::allocInternal):
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompile):
+ * jit/JIT.h:
+ (JSC::JIT::compileGetByIdProto):
+ (JSC::JIT::compileGetByIdSelfList):
+ (JSC::JIT::compileGetByIdProtoList):
+ (JSC::JIT::compileGetByIdChainList):
+ (JSC::JIT::compileGetByIdChain):
+ (JSC::JIT::compilePutByIdTransition):
+ (JSC::JIT::compilePatchGetArrayLength):
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::privateCompileCTIMachineTrampolines):
+ (JSC::JIT::privateCompileCTINativeCall):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::stringGetByValStubGenerator):
+ (JSC::JIT::privateCompilePutByIdTransition):
+ (JSC::JIT::privateCompilePatchGetArrayLength):
+ (JSC::JIT::privateCompileGetByIdProto):
+ (JSC::JIT::privateCompileGetByIdSelfList):
+ (JSC::JIT::privateCompileGetByIdProtoList):
+ (JSC::JIT::privateCompileGetByIdChainList):
+ (JSC::JIT::privateCompileGetByIdChain):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::stringGetByValStubGenerator):
+ (JSC::JIT::privateCompilePutByIdTransition):
+ (JSC::JIT::privateCompilePatchGetArrayLength):
+ (JSC::JIT::privateCompileGetByIdProto):
+ (JSC::JIT::privateCompileGetByIdSelfList):
+ (JSC::JIT::privateCompileGetByIdProtoList):
+ (JSC::JIT::privateCompileGetByIdChainList):
+ (JSC::JIT::privateCompileGetByIdChain):
+ * jit/JITStubs.cpp:
+ (JSC::JITThunks::tryCachePutByID):
+ (JSC::JITThunks::tryCacheGetByID):
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC::getPolymorphicAccessStructureListSlot):
+ * jit/JITStubs.h:
+ * jit/SpecializedThunkJIT.h:
+ (JSC::SpecializedThunkJIT::finalize):
+ * runtime/ExceptionHelpers.cpp:
+ * runtime/ExceptionHelpers.h:
+ * runtime/Executable.cpp:
+ (JSC::EvalExecutable::compileInternal):
+ (JSC::ProgramExecutable::compileInternal):
+ (JSC::FunctionExecutable::compileForCallInternal):
+ (JSC::FunctionExecutable::compileForConstructInternal):
+ (JSC::FunctionExecutable::reparseExceptionInfo):
+ (JSC::EvalExecutable::reparseExceptionInfo):
+ * yarr/RegexJIT.cpp:
+ (JSC::Yarr::RegexGenerator::compile):
+
+2010-08-26 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Brady Eidson.
+
+ Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
+
+ * wtf/text/WTFString.cpp:
+ (asciiDebug):
+ Return a Vector<char> containing the contents of a string as ASCII.
+
+2010-08-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add PassOwnArrayPtr
+ https://bugs.webkit.org/show_bug.cgi?id=44627
+
+ * GNUmakefile.am:
+ * JavaScriptCore.vcproj/WTF/WTF.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ Add the new files.
+
+ * wtf/Forward.h:
+ Forward declare PassOwnArrayPtr.
+
+ * wtf/OwnArrayPtr.h:
+ Mimic the OwnPtr interface.
+
+ * wtf/OwnArrayPtrCommon.h: Added.
+ (WTF::deleteOwnedArrayPtr):
+ Move delete function here so it can be shared by OwnArrayPtr and
+ PassOwnArrayPtr.
+
+ * wtf/PassOwnArrayPtr.h: Added.
+ Mimic the PassOwnPtr interface.
+
+2010-08-26 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ [JSC] JavaScript parsing error when loading Equifax web page
+ https://bugs.webkit.org/show_bug.cgi?id=42900
+
+ '-->' is ostensibly only meant to occur when there is only
+ whitespace preceeding it on the line. However firefox treats
+ multiline comments as a space character, so they are allowed.
+ One side effect of the firefox model is that any line terminators
+ inside the multiline comment are ignored, so
+
+ foo/*
+ */-->
+
+ is treated as
+
+ foo -->
+
+ and so '-->' will not be a comment in this case. Happily this simply
+ means that to fix this issue all we need to do is stop updating
+ m_atLineStart when handling multiline comments.
+
+ * parser/Lexer.cpp:
+ (JSC::Lexer::lex):
+
+2010-08-25 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Improve overflow handling in StringImpl::Replace
+ https://bugs.webkit.org/show_bug.cgi?id=42502
+ <rdar://problem/8203794>
+
+ Harden StringImpl::replace against overflow -- I can't see how this
+ could be abused, but it's better to be safe than sorry.
+
+ * wtf/text/StringImpl.cpp:
+ (WTF::StringImpl::replace):
+
+2010-08-26 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
+ https://bugs.webkit.org/show_bug.cgi?id=44624
+
+ Clean up GNUmakefile.am.
+
+ * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
+ a couple include lines from the top-level GNUmakefile.am.
+
+2010-08-25 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Kent Tamura.
+
+ Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
+ https://bugs.webkit.org/show_bug.cgi?id=29259
+
+ Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
+
+ * wtf/dtoa.cpp:
+ (WTF::s2b):
+
2010-08-25 Kwang Yul Seo <skyul@company100.net>
Reviewed by Kevin Ollivier.
diff --git a/JavaScriptCore/Configurations/Version.xcconfig b/JavaScriptCore/Configurations/Version.xcconfig
index 811d9c4..29f35ef 100644
--- a/JavaScriptCore/Configurations/Version.xcconfig
+++ b/JavaScriptCore/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 6;
+MINOR_VERSION = 7;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/JavaScriptCore/GNUmakefile.am b/JavaScriptCore/GNUmakefile.am
index ecd7ffe..b4c658e 100644
--- a/JavaScriptCore/GNUmakefile.am
+++ b/JavaScriptCore/GNUmakefile.am
@@ -1,24 +1,28 @@
javascriptcore_cppflags += \
-I$(srcdir)/JavaScriptCore \
-I$(srcdir)/JavaScriptCore/API \
- -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
- -I$(srcdir)/JavaScriptCore/interpreter \
+ -I$(srcdir)/JavaScriptCore/assembler \
-I$(srcdir)/JavaScriptCore/bytecode \
-I$(srcdir)/JavaScriptCore/bytecompiler \
-I$(srcdir)/JavaScriptCore/debugger \
+ -I$(srcdir)/JavaScriptCore/ForwardingHeaders \
+ -I$(srcdir)/JavaScriptCore/interpreter \
+ -I$(srcdir)/JavaScriptCore/jit \
-I$(srcdir)/JavaScriptCore/jit \
+ -I$(srcdir)/JavaScriptCore/parser \
-I$(srcdir)/JavaScriptCore/pcre \
-I$(srcdir)/JavaScriptCore/profiler \
-I$(srcdir)/JavaScriptCore/runtime \
- -I$(srcdir)/JavaScriptCore/jit \
- -I$(srcdir)/JavaScriptCore/assembler \
-I$(srcdir)/JavaScriptCore/wtf \
+ -I$(srcdir)/JavaScriptCore/wtf \
+ -I$(srcdir)/JavaScriptCore/wtf/gobject \
+ -I$(srcdir)/JavaScriptCore/wtf/gtk \
-I$(srcdir)/JavaScriptCore/wtf/text \
-I$(srcdir)/JavaScriptCore/wtf/unicode \
-I$(srcdir)/JavaScriptCore/yarr \
-I$(top_builddir)/JavaScriptCore \
- -I$(top_builddir)/JavaScriptCore/pcre \
-I$(top_builddir)/JavaScriptCore/parser \
+ -I$(top_builddir)/JavaScriptCore/pcre \
-I$(top_builddir)/JavaScriptCore/runtime
javascriptcore_h_api += \
@@ -385,6 +389,7 @@ javascriptcore_sources += \
JavaScriptCore/runtime/SmallStrings.cpp \
JavaScriptCore/runtime/SmallStrings.h \
JavaScriptCore/runtime/StringBuilder.h \
+ JavaScriptCore/runtime/StringConcatenate.h \
JavaScriptCore/runtime/StringConstructor.cpp \
JavaScriptCore/runtime/StringConstructor.h \
JavaScriptCore/runtime/StringObject.cpp \
@@ -404,7 +409,6 @@ javascriptcore_sources += \
JavaScriptCore/runtime/Tracing.h \
JavaScriptCore/runtime/UString.cpp \
JavaScriptCore/runtime/UString.h \
- JavaScriptCore/runtime/UStringImpl.h \
JavaScriptCore/runtime/WeakGCMap.h \
JavaScriptCore/runtime/WeakGCPtr.h \
JavaScriptCore/runtime/WeakRandom.h \
@@ -423,6 +427,7 @@ javascriptcore_sources += \
JavaScriptCore/wtf/CurrentTime.h \
JavaScriptCore/wtf/DateMath.cpp \
JavaScriptCore/wtf/DateMath.h \
+ JavaScriptCore/wtf/DecimalNumber.h \
JavaScriptCore/wtf/Deque.h \
JavaScriptCore/wtf/DisallowCType.h \
JavaScriptCore/wtf/dtoa.cpp \
@@ -437,6 +442,7 @@ javascriptcore_sources += \
JavaScriptCore/wtf/gobject/GOwnPtr.h \
JavaScriptCore/wtf/gobject/GRefPtr.cpp \
JavaScriptCore/wtf/gobject/GRefPtr.h \
+ JavaScriptCore/wtf/gtk/GtkTypedefs.h \
JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \
JavaScriptCore/wtf/gtk/ThreadingGtk.cpp \
JavaScriptCore/wtf/HashCountedSet.h \
@@ -461,11 +467,13 @@ javascriptcore_sources += \
JavaScriptCore/wtf/NotFound.h \
JavaScriptCore/wtf/OwnArrayPtr.h \
JavaScriptCore/wtf/OwnFastMallocPtr.h \
+ JavaScriptCore/wtf/OwnArrayPtrCommon.h \
JavaScriptCore/wtf/OwnPtrCommon.h \
JavaScriptCore/wtf/OwnPtr.h \
JavaScriptCore/wtf/PageAllocation.cpp \
JavaScriptCore/wtf/PageAllocation.h \
JavaScriptCore/wtf/PageReservation.h \
+ JavaScriptCore/wtf/PassOwnArrayPtr.h \
JavaScriptCore/wtf/PassOwnPtr.h \
JavaScriptCore/wtf/PassRefPtr.h \
JavaScriptCore/wtf/Platform.h \
diff --git a/JavaScriptCore/JavaScriptCore.exp b/JavaScriptCore/JavaScriptCore.exp
index 4542730..30f5aa8 100644
--- a/JavaScriptCore/JavaScriptCore.exp
+++ b/JavaScriptCore/JavaScriptCore.exp
@@ -377,7 +377,7 @@ __ZN3WTF13currentThreadEv
__ZN3WTF13tryFastCallocEmm
__ZN3WTF13tryFastMallocEm
__ZN3WTF14fastMallocSizeEPKv
-__ZN3WTF14numberToStringEdRA96_t
+__ZN3WTF14numberToStringEdPt
__ZN3WTF15ThreadCondition4waitERNS_5MutexE
__ZN3WTF15ThreadCondition6signalEv
__ZN3WTF15ThreadCondition9broadcastEv
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index eac99b9..cb9c820 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -126,7 +126,6 @@ EXPORTS
?detach@Debugger@JSC@@UAEXPAVJSGlobalObject@2@@Z
?detachThread@WTF@@YAXI@Z
?didTimeOut@TimeoutChecker@JSC@@QAE_NPAVExecState@2@@Z
- ?dtoa@WTF@@YAXQADNHPAH1PAPAD@Z
?dumpSampleData@JSGlobalData@JSC@@QAEXPAVExecState@2@@Z
?empty@StringImpl@WTF@@SAPAV12@XZ
?enumerable@PropertyDescriptor@JSC@@QBE_NXZ
@@ -149,7 +148,7 @@ EXPORTS
?number@UString@JSC@@SA?AV12@H@Z
?number@UString@JSC@@SA?AV12@I@Z
?number@UString@JSC@@SA?AV12@N@Z
- ?numberToString@WTF@@YAINAAY0GA@_W@Z
+ ?numberToString@WTF@@YAINQA_W@Z
?functionGetter@PropertySlot@JSC@@ABE?AVJSValue@2@PAVExecState@2@@Z
?functionName@DebuggerCallFrame@JSC@@QBEPBVUString@2@XZ
?get@Structure@JSC@@QAEIPBVStringImpl@WTF@@AAIAAPAVJSCell@2@@Z
diff --git a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
index aedc122..7bb2e2a 100644
--- a/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
+++ b/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
@@ -425,6 +425,10 @@
>
</File>
<File
+ RelativePath="..\..\wtf\OwnArrayPtrCommon.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\OwnPtrCommon.h"
>
</File>
@@ -441,6 +445,10 @@
>
</File>
<File
+ RelativePath="..\..\wtf\PassOwnArrayPtr.h"
+ >
+ </File>
+ <File
RelativePath="..\..\wtf\PassOwnPtr.h"
>
</File>
diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index e11672c..f9a547e 100644
--- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -509,6 +509,8 @@
BCDE3AB80E6C82F5001453A7 /* Structure.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDE3AB10E6C82CF001453A7 /* Structure.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDE3AB00E6C82CF001453A7 /* Structure.cpp */; };
BCF605140E203EF800B9A64D /* ArgList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF605120E203EF800B9A64D /* ArgList.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BCFBE696122560E800309E9D /* PassOwnArrayPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFBE695122560E800309E9D /* PassOwnArrayPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BCFBE698122561D200309E9D /* OwnArrayPtrCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFBE697122561D200309E9D /* OwnArrayPtrCommon.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCFD8C920EEB2EE700283848 /* JumpTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCFD8C900EEB2EE700283848 /* JumpTable.cpp */; };
BCFD8C930EEB2EE700283848 /* JumpTable.h in Headers */ = {isa = PBXBuildFile; fileRef = BCFD8C910EEB2EE700283848 /* JumpTable.h */; };
C0A272630E50A06300E96E15 /* NotFound.h in Headers */ = {isa = PBXBuildFile; fileRef = C0A2723F0E509F1E00E96E15 /* NotFound.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1063,6 +1065,8 @@
BCF605110E203EF800B9A64D /* ArgList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArgList.cpp; sourceTree = "<group>"; };
BCF605120E203EF800B9A64D /* ArgList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgList.h; sourceTree = "<group>"; };
BCF6553B0A2048DE0038A194 /* MathExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MathExtras.h; sourceTree = "<group>"; };
+ BCFBE695122560E800309E9D /* PassOwnArrayPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassOwnArrayPtr.h; sourceTree = "<group>"; };
+ BCFBE697122561D200309E9D /* OwnArrayPtrCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OwnArrayPtrCommon.h; sourceTree = "<group>"; };
BCFD8C900EEB2EE700283848 /* JumpTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JumpTable.cpp; sourceTree = "<group>"; };
BCFD8C910EEB2EE700283848 /* JumpTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpTable.h; sourceTree = "<group>"; };
C0A2723F0E509F1E00E96E15 /* NotFound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotFound.h; sourceTree = "<group>"; };
@@ -1472,12 +1476,14 @@
9303F5690991190000AD71B8 /* Noncopyable.h */,
C0A2723F0E509F1E00E96E15 /* NotFound.h */,
9303F5A409911A5800AD71B8 /* OwnArrayPtr.h */,
+ BCFBE697122561D200309E9D /* OwnArrayPtrCommon.h */,
0BDFFAD10FC616EC00D69EF4 /* OwnFastMallocPtr.h */,
9303F567099118FA00AD71B8 /* OwnPtr.h */,
440B7AED0FAF7FCB0073323E /* OwnPtrCommon.h */,
8627E5E911F1281900A313B5 /* PageAllocation.cpp */,
8627E5EA11F1281900A313B5 /* PageAllocation.h */,
8690231412092D5C00630AF9 /* PageReservation.h */,
+ BCFBE695122560E800309E9D /* PassOwnArrayPtr.h */,
44DD48520FAEA85000D6B4EB /* PassOwnPtr.h */,
6580F795094070560082C219 /* PassRefPtr.h */,
65D6D87E09B5A32E0002E4D7 /* Platform.h */,
@@ -2237,6 +2243,8 @@
86F38859121130CA007A7CE3 /* AtomicStringHash.h in Headers */,
86B6DA0212132B9A000D316F /* StringConcatenate.h in Headers */,
862AF4B612239C7B0024E5B8 /* DecimalNumber.h in Headers */,
+ BCFBE696122560E800309E9D /* PassOwnArrayPtr.h in Headers */,
+ BCFBE698122561D200309E9D /* OwnArrayPtrCommon.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/JavaScriptCore/assembler/ARMAssembler.cpp b/JavaScriptCore/assembler/ARMAssembler.cpp
index 42a6402..86a1c14 100644
--- a/JavaScriptCore/assembler/ARMAssembler.cpp
+++ b/JavaScriptCore/assembler/ARMAssembler.cpp
@@ -351,8 +351,6 @@ void* ARMAssembler::executableCopy(ExecutablePool* allocator)
bkpt(0);
char* data = reinterpret_cast<char*>(m_buffer.executableCopy(allocator));
- if (!data)
- return 0;
for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) {
// The last bit is set if the constant must be placed on constant pool.
diff --git a/JavaScriptCore/assembler/LinkBuffer.h b/JavaScriptCore/assembler/LinkBuffer.h
index 624d1cc..408deb0 100644
--- a/JavaScriptCore/assembler/LinkBuffer.h
+++ b/JavaScriptCore/assembler/LinkBuffer.h
@@ -62,12 +62,6 @@ class LinkBuffer : public Noncopyable {
typedef MacroAssembler::JumpLinkType JumpLinkType;
#endif
- enum LinkBufferState {
- StateInit,
- StateChecked,
- StateFinalized,
- };
-
public:
// Note: Initialization sequence is significant, since executablePool is a PassRefPtr.
// First, executablePool is copied into m_executablePool, then the initialization of
@@ -79,7 +73,7 @@ public:
, m_code(0)
, m_assembler(masm)
#ifndef NDEBUG
- , m_state(StateInit)
+ , m_completed(false)
#endif
{
linkCode(linkOffset);
@@ -87,18 +81,7 @@ public:
~LinkBuffer()
{
- ASSERT(m_state == StateFinalized);
- }
-
- // After constructing a link buffer, a client must call allocationSuccessful() to check alloc did not return 0.
- bool allocationSuccessful()
- {
-#ifndef NDEBUG
- ASSERT(m_state == StateInit);
- m_state = StateChecked;
-#endif
-
- return m_code;
+ ASSERT(m_completed);
}
// These methods are used to link or set values at code generation time.
@@ -284,8 +267,8 @@ private:
void performFinalization()
{
#ifndef NDEBUG
- ASSERT(m_state == StateChecked);
- m_state = StateFinalized;
+ ASSERT(!m_completed);
+ m_completed = true;
#endif
ExecutableAllocator::makeExecutable(code(), m_size);
@@ -297,7 +280,7 @@ private:
void* m_code;
MacroAssembler* m_assembler;
#ifndef NDEBUG
- LinkBufferState m_state;
+ bool m_completed;
#endif
};
diff --git a/JavaScriptCore/assembler/MIPSAssembler.h b/JavaScriptCore/assembler/MIPSAssembler.h
index a19c7a6..bc77f8d 100644
--- a/JavaScriptCore/assembler/MIPSAssembler.h
+++ b/JavaScriptCore/assembler/MIPSAssembler.h
@@ -287,6 +287,11 @@ public:
emitInst(0x00000018 | (rs << OP_SH_RS) | (rt << OP_SH_RT));
}
+ void div(RegisterID rs, RegisterID rt)
+ {
+ emitInst(0x0000001a | (rs << OP_SH_RS) | (rt << OP_SH_RT));
+ }
+
void mfhi(RegisterID rd)
{
emitInst(0x00000010 | (rd << OP_SH_RD));
@@ -689,8 +694,10 @@ public:
void* executableCopy(ExecutablePool* allocator)
{
void *result = m_buffer.executableCopy(allocator);
- if (result)
- relocateJumps(m_buffer.data(), result);
+ if (!result)
+ return 0;
+
+ relocateJumps(m_buffer.data(), result);
return result;
}
diff --git a/JavaScriptCore/assembler/X86Assembler.h b/JavaScriptCore/assembler/X86Assembler.h
index a1fae0c..20d72f5 100644
--- a/JavaScriptCore/assembler/X86Assembler.h
+++ b/JavaScriptCore/assembler/X86Assembler.h
@@ -1626,7 +1626,9 @@ public:
void* executableCopy(ExecutablePool* allocator)
{
- return m_formatter.executableCopy(allocator);
+ void* copy = m_formatter.executableCopy(allocator);
+ ASSERT(copy);
+ return copy;
}
private:
diff --git a/JavaScriptCore/bytecode/CodeBlock.h b/JavaScriptCore/bytecode/CodeBlock.h
index be12254..766ad2a 100644
--- a/JavaScriptCore/bytecode/CodeBlock.h
+++ b/JavaScriptCore/bytecode/CodeBlock.h
@@ -47,8 +47,8 @@
#include "StructureStubInfo.h"
#endif
-// Register numbers used in bytecode operations have different meaning accoring to their ranges:
-// 0x80000000-0xFFFFFFFF Negative indicies from the CallFrame pointer are entries in the call frame, see RegisterFile.h.
+// Register numbers used in bytecode operations have different meaning according to their ranges:
+// 0x80000000-0xFFFFFFFF Negative indices from the CallFrame pointer are entries in the call frame, see RegisterFile.h.
// 0x00000000-0x3FFFFFFF Forwards indices from the CallFrame pointer are local vars and temporaries with the function's callframe.
// 0x40000000-0x7FFFFFFF Positive indices from 0x40000000 specify entries in the constant pool on the CodeBlock.
static const int FirstConstantRegisterIndex = 0x40000000;
diff --git a/JavaScriptCore/bytecode/StructureStubInfo.h b/JavaScriptCore/bytecode/StructureStubInfo.h
index 8578171..8e2c489 100644
--- a/JavaScriptCore/bytecode/StructureStubInfo.h
+++ b/JavaScriptCore/bytecode/StructureStubInfo.h
@@ -66,7 +66,7 @@ namespace JSC {
baseObjectStructure->ref();
}
- void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure, CodeLocationLabel routine)
+ void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure)
{
accessType = access_get_by_id_proto;
@@ -75,11 +75,9 @@ namespace JSC {
u.getByIdProto.prototypeStructure = prototypeStructure;
prototypeStructure->ref();
-
- stubRoutine = routine;
}
- void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain, CodeLocationLabel routine)
+ void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain)
{
accessType = access_get_by_id_chain;
@@ -88,33 +86,27 @@ namespace JSC {
u.getByIdChain.chain = chain;
chain->ref();
-
- stubRoutine = routine;
}
- void initGetByIdSelfList(PolymorphicAccessStructureList* structureList)
+ void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize)
{
accessType = access_get_by_id_self_list;
u.getByIdProtoList.structureList = structureList;
- u.getByIdProtoList.listSize = 1;
-
- stubRoutine = CodeLocationLabel();
+ u.getByIdProtoList.listSize = listSize;
}
- void initGetByIdProtoList(PolymorphicAccessStructureList* structureList)
+ void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize)
{
accessType = access_get_by_id_proto_list;
u.getByIdProtoList.structureList = structureList;
- u.getByIdProtoList.listSize = 1;
-
- stubRoutine = CodeLocationLabel();
+ u.getByIdProtoList.listSize = listSize;
}
// PutById*
- void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain, CodeLocationLabel routine)
+ void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain)
{
accessType = access_put_by_id_transition;
@@ -126,8 +118,6 @@ namespace JSC {
u.putByIdTransition.chain = chain;
chain->ref();
-
- stubRoutine = routine;
}
void initPutByIdReplace(Structure* baseObjectStructure)
diff --git a/JavaScriptCore/jit/ExecutableAllocator.cpp b/JavaScriptCore/jit/ExecutableAllocator.cpp
index e3525f5..4800613 100644
--- a/JavaScriptCore/jit/ExecutableAllocator.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocator.cpp
@@ -52,6 +52,8 @@ void ExecutableAllocator::intializePageSize()
ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t size)
{
PageAllocation allocation = PageAllocation::allocate(size, PageAllocation::JSJITCodePages, EXECUTABLE_POOL_WRITABLE, true);
+ if (!allocation)
+ CRASH();
return allocation;
}
diff --git a/JavaScriptCore/jit/ExecutableAllocator.h b/JavaScriptCore/jit/ExecutableAllocator.h
index b60d591..576f889 100644
--- a/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/JavaScriptCore/jit/ExecutableAllocator.h
@@ -107,7 +107,10 @@ public:
#endif
typedef Vector<Allocation, 2> AllocationList;
- static PassRefPtr<ExecutablePool> create(size_t n);
+ static PassRefPtr<ExecutablePool> create(size_t n)
+ {
+ return adoptRef(new ExecutablePool(n));
+ }
void* alloc(size_t n)
{
@@ -146,7 +149,7 @@ private:
static Allocation systemAlloc(size_t n);
static void systemRelease(Allocation& alloc);
- ExecutablePool(Allocation&);
+ ExecutablePool(size_t n);
void* poolAllocate(size_t n);
@@ -164,11 +167,8 @@ public:
{
if (!pageSize)
intializePageSize();
- if (isValid()) {
+ if (isValid())
m_smallAllocationPool = ExecutablePool::create(JIT_ALLOCATOR_LARGE_ALLOC_SIZE);
- if (!m_smallAllocationPool)
- CRASH();
- }
#if !ENABLE(INTERPRETER)
else
CRASH();
@@ -185,7 +185,7 @@ public:
return m_smallAllocationPool;
// If the request is large, we just provide a unshared allocator
- if (n > JIT_ALLOCATOR_LARGE_ALLOC_SIZE)
+ if (n > JIT_ALLOCATOR_LARGE_ALLOC_SIZE)
return ExecutablePool::create(n);
// Create a new allocator
@@ -308,20 +308,15 @@ private:
static void intializePageSize();
};
-inline PassRefPtr<ExecutablePool> ExecutablePool::create(size_t n)
- {
- Allocation mem = systemAlloc(roundUpAllocationSize(n, JIT_ALLOCATOR_PAGE_SIZE));
- if (!mem)
- return 0;
- return adoptRef(new ExecutablePool(mem));
- }
-
-inline ExecutablePool::ExecutablePool(Allocation& mem)
+inline ExecutablePool::ExecutablePool(size_t n)
{
- ASSERT(!!mem);
+ size_t allocSize = roundUpAllocationSize(n, JIT_ALLOCATOR_PAGE_SIZE);
+ Allocation mem = systemAlloc(allocSize);
m_pools.append(mem);
m_freePtr = static_cast<char*>(mem.base());
- m_end = m_freePtr + mem.size();
+ if (!m_freePtr)
+ CRASH(); // Failed to allocate
+ m_end = m_freePtr + allocSize;
}
inline void* ExecutablePool::poolAllocate(size_t n)
@@ -330,8 +325,8 @@ inline void* ExecutablePool::poolAllocate(size_t n)
Allocation result = systemAlloc(allocSize);
if (!result.base())
- return 0; // Failed to allocate
-
+ CRASH(); // Failed to allocate
+
ASSERT(m_end >= m_freePtr);
if ((allocSize - n) > static_cast<size_t>(m_end - m_freePtr)) {
// Replace allocation pool
diff --git a/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index f05e919..b34204f 100644
--- a/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -360,14 +360,15 @@ private:
// Search m_freeList for a suitable sized chunk to allocate memory from.
FreeListEntry* entry = m_freeList.search(size, m_freeList.GREATER_EQUAL);
- // This is bad news.
+ // This would be bad news.
if (!entry) {
// Errk! Lets take a last-ditch desperation attempt at defragmentation...
coalesceFreeSpace();
// Did that free up a large enough chunk?
entry = m_freeList.search(size, m_freeList.GREATER_EQUAL);
+ // No?... *BOOM!*
if (!entry)
- return 0;
+ CRASH();
}
ASSERT(entry->size != m_commonSize);
diff --git a/JavaScriptCore/jit/JIT.cpp b/JavaScriptCore/jit/JIT.cpp
index cd5944a..4466fbd 100644
--- a/JavaScriptCore/jit/JIT.cpp
+++ b/JavaScriptCore/jit/JIT.cpp
@@ -509,12 +509,7 @@ JITCode JIT::privateCompile(CodePtr* functionEntryArityCheck)
ASSERT(m_jmpTable.isEmpty());
- RefPtr<ExecutablePool> executablePool = m_globalData->executableAllocator.poolForSize(m_assembler.size());
- if (!executablePool)
- return JITCode();
- LinkBuffer patchBuffer(this, executablePool.release(), m_linkerOffset);
- if (!patchBuffer.allocationSuccessful())
- return JITCode();
+ LinkBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()), m_linkerOffset);
// Translate vPC offsets into addresses in JIT generated code, for switch tables.
for (unsigned i = 0; i < m_switches.size(); ++i) {
diff --git a/JavaScriptCore/jit/JIT.h b/JavaScriptCore/jit/JIT.h
index 393c771..7c03a47 100644
--- a/JavaScriptCore/jit/JIT.h
+++ b/JavaScriptCore/jit/JIT.h
@@ -183,38 +183,38 @@ namespace JSC {
return JIT(globalData, codeBlock, offsetBase).privateCompile(functionEntryArityCheck);
}
- static bool compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress)
+ static void compileGetByIdProto(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompileGetByIdProto(stubInfo, structure, prototypeStructure, ident, slot, cachedOffset, returnAddress, callFrame);
+ jit.privateCompileGetByIdProto(stubInfo, structure, prototypeStructure, ident, slot, cachedOffset, returnAddress, callFrame);
}
- static bool compileGetByIdSelfList(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
+ static void compileGetByIdSelfList(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompileGetByIdSelfList(stubInfo, structure, ident, slot, cachedOffset);
+ jit.privateCompileGetByIdSelfList(stubInfo, polymorphicStructures, currentIndex, structure, ident, slot, cachedOffset);
}
- static bool compileGetByIdProtoList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
+ static void compileGetByIdProtoList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompileGetByIdProtoList(stubInfo, structure, prototypeStructure, ident, slot, cachedOffset, callFrame);
+ jit.privateCompileGetByIdProtoList(stubInfo, prototypeStructureList, currentIndex, structure, prototypeStructure, ident, slot, cachedOffset, callFrame);
}
- static bool compileGetByIdChainList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
+ static void compileGetByIdChainList(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructureList, int currentIndex, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompileGetByIdChainList(stubInfo, structure, chain, count, ident, slot, cachedOffset, callFrame);
+ jit.privateCompileGetByIdChainList(stubInfo, prototypeStructureList, currentIndex, structure, chain, count, ident, slot, cachedOffset, callFrame);
}
- static bool compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress)
+ static void compileGetByIdChain(JSGlobalData* globalData, CallFrame* callFrame, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompileGetByIdChain(stubInfo, structure, chain, count, ident, slot, cachedOffset, returnAddress, callFrame);
+ jit.privateCompileGetByIdChain(stubInfo, structure, chain, count, ident, slot, cachedOffset, returnAddress, callFrame);
}
- static bool compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
+ static void compilePutByIdTransition(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompilePutByIdTransition(stubInfo, oldStructure, newStructure, cachedOffset, chain, returnAddress, direct);
+ jit.privateCompilePutByIdTransition(stubInfo, oldStructure, newStructure, cachedOffset, chain, returnAddress, direct);
}
static void compileCTIMachineTrampolines(JSGlobalData* globalData, RefPtr<ExecutablePool>* executablePool, TrampolineStructure *trampolines)
@@ -237,10 +237,10 @@ namespace JSC {
static void patchPutByIdReplace(CodeBlock* codeblock, StructureStubInfo*, Structure*, size_t cachedOffset, ReturnAddressPtr returnAddress, bool direct);
static void patchMethodCallProto(CodeBlock* codeblock, MethodCallLinkInfo&, JSFunction*, Structure*, JSObject*, ReturnAddressPtr);
- static bool compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, StructureStubInfo* stubInfo, ReturnAddressPtr returnAddress)
+ static void compilePatchGetArrayLength(JSGlobalData* globalData, CodeBlock* codeBlock, ReturnAddressPtr returnAddress)
{
JIT jit(globalData, codeBlock);
- return jit.privateCompilePatchGetArrayLength(stubInfo, returnAddress);
+ return jit.privateCompilePatchGetArrayLength(returnAddress);
}
static void linkCall(JSFunction* callee, CodeBlock* callerCodeBlock, CodeBlock* calleeCodeBlock, CodePtr, CallLinkInfo*, int callerArgCount, JSGlobalData*);
@@ -265,17 +265,17 @@ namespace JSC {
void privateCompileLinkPass();
void privateCompileSlowCases();
JITCode privateCompile(CodePtr* functionEntryArityCheck);
- bool privateCompileGetByIdProto(StructureStubInfo*, Structure*, Structure* prototypeStructure, const Identifier&, const PropertySlot&, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame);
- bool privateCompileGetByIdSelfList(StructureStubInfo*, Structure*, const Identifier&, const PropertySlot&, size_t cachedOffset);
- bool privateCompileGetByIdProtoList(StructureStubInfo*, Structure*, Structure* prototypeStructure, const Identifier&, const PropertySlot&, size_t cachedOffset, CallFrame* callFrame);
- bool privateCompileGetByIdChainList(StructureStubInfo*, Structure*, StructureChain* chain, size_t count, const Identifier&, const PropertySlot&, size_t cachedOffset, CallFrame* callFrame);
- bool privateCompileGetByIdChain(StructureStubInfo*, Structure*, StructureChain*, size_t count, const Identifier&, const PropertySlot&, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame);
- bool privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure*, Structure*, size_t cachedOffset, StructureChain*, ReturnAddressPtr returnAddress, bool direct);
+ void privateCompileGetByIdProto(StructureStubInfo*, Structure*, Structure* prototypeStructure, const Identifier&, const PropertySlot&, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame);
+ void privateCompileGetByIdSelfList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, const Identifier&, const PropertySlot&, size_t cachedOffset);
+ void privateCompileGetByIdProtoList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, Structure* prototypeStructure, const Identifier&, const PropertySlot&, size_t cachedOffset, CallFrame* callFrame);
+ void privateCompileGetByIdChainList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, StructureChain* chain, size_t count, const Identifier&, const PropertySlot&, size_t cachedOffset, CallFrame* callFrame);
+ void privateCompileGetByIdChain(StructureStubInfo*, Structure*, StructureChain*, size_t count, const Identifier&, const PropertySlot&, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame);
+ void privateCompilePutByIdTransition(StructureStubInfo*, Structure*, Structure*, size_t cachedOffset, StructureChain*, ReturnAddressPtr returnAddress, bool direct);
void privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executablePool, JSGlobalData* data, TrampolineStructure *trampolines);
Label privateCompileCTINativeCall(JSGlobalData*, bool isConstruct = false);
CodePtr privateCompileCTINativeCall(PassRefPtr<ExecutablePool> executablePool, JSGlobalData* data, NativeFunction func);
- bool privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnAddressPtr returnAddress);
+ void privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress);
void addSlowCase(Jump);
void addSlowCase(JumpList);
diff --git a/JavaScriptCore/jit/JITArithmetic.cpp b/JavaScriptCore/jit/JITArithmetic.cpp
index a9d0bcd..d75f8b5 100644
--- a/JavaScriptCore/jit/JITArithmetic.cpp
+++ b/JavaScriptCore/jit/JITArithmetic.cpp
@@ -1139,7 +1139,7 @@ void JIT::emitSlow_op_pre_dec(Instruction* currentInstruction, Vector<SlowCaseEn
/* ------------------------------ BEGIN: OP_MOD ------------------------------ */
-#if CPU(X86) || CPU(X86_64)
+#if CPU(X86) || CPU(X86_64) || CPU(MIPS)
void JIT::emit_op_mod(Instruction* currentInstruction)
{
@@ -1147,21 +1147,34 @@ void JIT::emit_op_mod(Instruction* currentInstruction)
unsigned op1 = currentInstruction[2].u.operand;
unsigned op2 = currentInstruction[3].u.operand;
- emitGetVirtualRegisters(op1, X86Registers::eax, op2, X86Registers::ecx);
- emitJumpSlowCaseIfNotImmediateInteger(X86Registers::eax);
- emitJumpSlowCaseIfNotImmediateInteger(X86Registers::ecx);
+#if CPU(X86) || CPU(X86_64)
+ // Make sure registers are correct for x86 IDIV instructions.
+ ASSERT(regT0 == X86Registers::eax);
+ ASSERT(regT1 == X86Registers::edx);
+ ASSERT(regT2 == X86Registers::ecx);
+#endif
+
+ emitGetVirtualRegisters(op1, regT0, op2, regT2);
+ emitJumpSlowCaseIfNotImmediateInteger(regT0);
+ emitJumpSlowCaseIfNotImmediateInteger(regT2);
+
#if USE(JSVALUE64)
- addSlowCase(branchPtr(Equal, X86Registers::ecx, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))));
+ addSlowCase(branchPtr(Equal, regT2, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))));
m_assembler.cdq();
- m_assembler.idivl_r(X86Registers::ecx);
+ m_assembler.idivl_r(regT2);
#else
- emitFastArithDeTagImmediate(X86Registers::eax);
- addSlowCase(emitFastArithDeTagImmediateJumpIfZero(X86Registers::ecx));
+ emitFastArithDeTagImmediate(regT0);
+ addSlowCase(emitFastArithDeTagImmediateJumpIfZero(regT2));
+#if CPU(X86) || CPU(X86_64)
m_assembler.cdq();
- m_assembler.idivl_r(X86Registers::ecx);
- signExtend32ToPtr(X86Registers::edx, X86Registers::edx);
+ m_assembler.idivl_r(regT2);
+ signExtend32ToPtr(regT1, regT1);
+#elif CPU(MIPS)
+ m_assembler.div(regT0, regT2);
+ m_assembler.mfhi(regT1);
+#endif
#endif
- emitFastArithReTagImmediate(X86Registers::edx, X86Registers::eax);
+ emitFastArithReTagImmediate(regT1, regT0);
emitPutVirtualRegister(result);
}
@@ -1177,18 +1190,18 @@ void JIT::emitSlow_op_mod(Instruction* currentInstruction, Vector<SlowCaseEntry>
Jump notImm1 = getSlowCase(iter);
Jump notImm2 = getSlowCase(iter);
linkSlowCase(iter);
- emitFastArithReTagImmediate(X86Registers::eax, X86Registers::eax);
- emitFastArithReTagImmediate(X86Registers::ecx, X86Registers::ecx);
+ emitFastArithReTagImmediate(regT0, regT0);
+ emitFastArithReTagImmediate(regT2, regT2);
notImm1.link(this);
notImm2.link(this);
#endif
JITStubCall stubCall(this, cti_op_mod);
- stubCall.addArgument(X86Registers::eax);
- stubCall.addArgument(X86Registers::ecx);
+ stubCall.addArgument(regT0);
+ stubCall.addArgument(regT2);
stubCall.call(result);
}
-#else // CPU(X86) || CPU(X86_64)
+#else // CPU(X86) || CPU(X86_64) || CPU(MIPS)
void JIT::emit_op_mod(Instruction* currentInstruction)
{
diff --git a/JavaScriptCore/jit/JITOpcodes.cpp b/JavaScriptCore/jit/JITOpcodes.cpp
index 28ef4ca..2bfba83 100644
--- a/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/JavaScriptCore/jit/JITOpcodes.cpp
@@ -161,14 +161,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
#endif
// All trampolines constructed! copy the code, link up calls, and set the pointers on the Machine object.
- *executablePool = m_globalData->executableAllocator.poolForSize(m_assembler.size());
- // We can't run without the JIT trampolines!
- if (!*executablePool)
- CRASH();
- LinkBuffer patchBuffer(this, *executablePool, 0);
- // We can't run without the JIT trampolines!
- if (!patchBuffer.allocationSuccessful())
- CRASH();
+ LinkBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()), 0);
#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
patchBuffer.link(string_failureCases1Call, FunctionPtr(cti_op_get_by_id_string_fail));
@@ -183,6 +176,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
patchBuffer.link(callCompileConstruct, FunctionPtr(cti_op_construct_jitCompile));
CodeRef finalCode = patchBuffer.finalizeCode();
+ *executablePool = finalCode.m_executablePool;
trampolines->ctiVirtualCallLink = patchBuffer.trampolineAt(virtualCallLinkBegin);
trampolines->ctiVirtualConstructLink = patchBuffer.trampolineAt(virtualConstructLinkBegin);
diff --git a/JavaScriptCore/jit/JITOpcodes32_64.cpp b/JavaScriptCore/jit/JITOpcodes32_64.cpp
index 939aa8c..035325a 100644
--- a/JavaScriptCore/jit/JITOpcodes32_64.cpp
+++ b/JavaScriptCore/jit/JITOpcodes32_64.cpp
@@ -159,14 +159,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
#endif
// All trampolines constructed! copy the code, link up calls, and set the pointers on the Machine object.
- *executablePool = m_globalData->executableAllocator.poolForSize(m_assembler.size());
- // We can't run without the JIT trampolines!
- if (!*executablePool)
- CRASH();
- LinkBuffer patchBuffer(this, *executablePool, 0);
- // We can't run without the JIT trampolines!
- if (!patchBuffer.allocationSuccessful())
- CRASH();
+ LinkBuffer patchBuffer(this, m_globalData->executableAllocator.poolForSize(m_assembler.size()), 0);
#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
patchBuffer.link(string_failureCases1Call, FunctionPtr(cti_op_get_by_id_string_fail));
@@ -181,6 +174,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
patchBuffer.link(callCompileCconstruct, FunctionPtr(cti_op_construct_jitCompile));
CodeRef finalCode = patchBuffer.finalizeCode();
+ *executablePool = finalCode.m_executablePool;
trampolines->ctiVirtualCall = patchBuffer.trampolineAt(virtualCallBegin);
trampolines->ctiVirtualConstruct = patchBuffer.trampolineAt(virtualConstructBegin);
@@ -363,9 +357,6 @@ JIT::CodePtr JIT::privateCompileCTINativeCall(PassRefPtr<ExecutablePool> executa
// All trampolines constructed! copy the code, link up calls, and set the pointers on the Machine object.
LinkBuffer patchBuffer(this, executablePool, 0);
- // We can't continue if we can't call a function!
- if (!patchBuffer.allocationSuccessful())
- CRASH();
patchBuffer.link(nativeCall, FunctionPtr(func));
patchBuffer.finalizeCode();
diff --git a/JavaScriptCore/jit/JITPropertyAccess.cpp b/JavaScriptCore/jit/JITPropertyAccess.cpp
index 6b2a2fe..7c129a5 100644
--- a/JavaScriptCore/jit/JITPropertyAccess.cpp
+++ b/JavaScriptCore/jit/JITPropertyAccess.cpp
@@ -78,9 +78,6 @@ JIT::CodePtr JIT::stringGetByValStubGenerator(JSGlobalData* globalData, Executab
jit.ret();
LinkBuffer patchBuffer(&jit, pool, 0);
- // We can't run without the JIT trampolines!
- if (!patchBuffer.allocationSuccessful())
- CRASH();
return patchBuffer.finalizeCode().m_code;
}
@@ -601,7 +598,7 @@ void JIT::testPrototype(JSValue prototype, JumpList& failureCases)
#endif
}
-bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
+void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
{
JumpList failureCases;
// Check eax is an object of the right Structure.
@@ -653,8 +650,6 @@ bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure
Call failureCall = tailRecursiveCall();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
patchBuffer.link(failureCall, FunctionPtr(direct ? cti_op_put_by_id_direct_fail : cti_op_put_by_id_fail));
@@ -664,10 +659,9 @@ bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure
}
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
+ stubInfo->stubRoutine = entryLabel;
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relinkCallerToTrampoline(returnAddress, entryLabel);
- stubInfo->initPutByIdTransition(oldStructure, newStructure, chain, entryLabel);
- return true;
}
void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress)
@@ -730,8 +724,10 @@ void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo,
repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset), offset);
}
-bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnAddressPtr returnAddress)
+void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress)
{
+ StructureStubInfo* stubInfo = &m_codeBlock->getStubInfo(returnAddress);
+
// Check eax is an array
Jump failureCases1 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr));
@@ -744,8 +740,6 @@ bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnA
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
// Use the patch information to link the failure cases back to the original slow case routine.
CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall);
@@ -757,6 +751,7 @@ bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnA
// Track the stub we have created so that it will be deleted later.
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
+ stubInfo->stubRoutine = entryLabel;
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
@@ -765,11 +760,9 @@ bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnA
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_array_fail));
- stubInfo->stubRoutine = entryLabel;
- return true;
}
-bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
+void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
{
// The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
// referencing the prototype object - let's speculatively load it's table nice and early!)
@@ -810,8 +803,6 @@ bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
compileGetDirectOffset(protoObject, regT1, regT0, cachedOffset);
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
// Use the patch information to link the failure cases back to the original slow case routine.
CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall);
@@ -829,6 +820,7 @@ bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
}
// Track the stub we have created so that it will be deleted later.
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
+ stubInfo->stubRoutine = entryLabel;
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
@@ -837,15 +829,10 @@ bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
- stubInfo->initGetByIdProto(structure, prototypeStructure, entryLabel);
- return true;
}
-bool JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
+void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
- PolymorphicAccessStructureList* polymorphicStructures = stubInfo->u.getByIdSelfList.structureList;
- int currentIndex = stubInfo->u.getByIdSelfList.listSize;
-
Jump failureCase = checkStructure(regT0, structure);
bool needsStubLink = false;
if (slot.cachedPropertyType() == PropertySlot::Getter) {
@@ -873,8 +860,6 @@ bool JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Structure*
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
@@ -902,15 +887,10 @@ bool JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Structure*
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
- stubInfo->u.getByIdSelfList.listSize++;
- return true;
}
-bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
+void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
{
- PolymorphicAccessStructureList* prototypeStructures = stubInfo->u.getByIdProtoList.structureList;
- int currentIndex = stubInfo->u.getByIdProtoList.listSize;
-
// The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
// referencing the prototype object - let's speculatively load it's table nice and early!)
JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame));
@@ -951,8 +931,6 @@ bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure*
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
@@ -979,15 +957,10 @@ bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure*
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
- stubInfo->u.getByIdProtoList.listSize++;
- return true;
}
-bool JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
+void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
{
- PolymorphicAccessStructureList* prototypeStructures = stubInfo->u.getByIdProtoList.structureList;
- int currentIndex = stubInfo->u.getByIdProtoList.listSize;
-
ASSERT(count);
JumpList bucketsOfFail;
@@ -1027,8 +1000,6 @@ bool JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Structure*
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
@@ -1056,11 +1027,9 @@ bool JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Structure*
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
- stubInfo->u.getByIdProtoList.listSize++;
- return true;
}
-bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
+void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
{
ASSERT(count);
@@ -1101,8 +1070,6 @@ bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
@@ -1119,6 +1086,7 @@ bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// Track the stub we have created so that it will be deleted later.
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
+ stubInfo->stubRoutine = entryLabel;
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
@@ -1127,8 +1095,6 @@ bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
- stubInfo->initGetByIdChain(structure, chain, entryLabel);
- return true;
}
/* ------------------------------ END: !ENABLE / ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */
diff --git a/JavaScriptCore/jit/JITPropertyAccess32_64.cpp b/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
index 9239641..31ecfed 100644
--- a/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
+++ b/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
@@ -296,9 +296,6 @@ JIT::CodePtr JIT::stringGetByValStubGenerator(JSGlobalData* globalData, Executab
jit.ret();
LinkBuffer patchBuffer(&jit, pool, 0);
- // We can't run without the JIT trampolines!
- if (!patchBuffer.allocationSuccessful())
- CRASH();
return patchBuffer.finalizeCode().m_code;
}
@@ -605,7 +602,7 @@ void JIT::testPrototype(JSValue prototype, JumpList& failureCases)
#endif
}
-bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
+void JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure* oldStructure, Structure* newStructure, size_t cachedOffset, StructureChain* chain, ReturnAddressPtr returnAddress, bool direct)
{
// It is assumed that regT0 contains the basePayload and regT1 contains the baseTag. The value can be found on the stack.
@@ -657,9 +654,7 @@ bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure
Call failureCall = tailRecursiveCall();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
+
patchBuffer.link(failureCall, FunctionPtr(direct ? cti_op_put_by_id_direct_fail : cti_op_put_by_id_fail));
if (willNeedStorageRealloc) {
@@ -668,10 +663,9 @@ bool JIT::privateCompilePutByIdTransition(StructureStubInfo* stubInfo, Structure
}
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
+ stubInfo->stubRoutine = entryLabel;
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relinkCallerToTrampoline(returnAddress, entryLabel);
- stubInfo->initPutByIdTransition(oldStructure, newStructure, chain, entryLabel);
- return true;
}
void JIT::patchGetByIdSelf(CodeBlock* codeBlock, StructureStubInfo* stubInfo, Structure* structure, size_t cachedOffset, ReturnAddressPtr returnAddress)
@@ -736,8 +730,10 @@ void JIT::patchPutByIdReplace(CodeBlock* codeBlock, StructureStubInfo* stubInfo,
repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(patchOffsetPutByIdPropertyMapOffset2), offset + OBJECT_OFFSETOF(JSValue, u.asBits.tag)); // tag
}
-bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnAddressPtr returnAddress)
+void JIT::privateCompilePatchGetArrayLength(ReturnAddressPtr returnAddress)
{
+ StructureStubInfo* stubInfo = &m_codeBlock->getStubInfo(returnAddress);
+
// regT0 holds a JSCell*
// Check for array
@@ -753,9 +749,7 @@ bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnA
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
+
// Use the patch information to link the failure cases back to the original slow case routine.
CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall);
patchBuffer.link(failureCases1, slowCaseBegin);
@@ -766,7 +760,8 @@ bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnA
// Track the stub we have created so that it will be deleted later.
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
-
+ stubInfo->stubRoutine = entryLabel;
+
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
@@ -774,11 +769,9 @@ bool JIT::privateCompilePatchGetArrayLength(StructureStubInfo* stubInfo, ReturnA
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_array_fail));
- stubInfo->stubRoutine = entryLabel;
- return true;
}
-bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
+void JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
{
// regT0 holds a JSCell*
@@ -820,9 +813,7 @@ bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
+
// Use the patch information to link the failure cases back to the original slow case routine.
CodeLocationLabel slowCaseBegin = stubInfo->callReturnLocation.labelAtOffset(-patchOffsetGetByIdSlowCaseCall);
patchBuffer.link(failureCases1, slowCaseBegin);
@@ -840,6 +831,7 @@ bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
// Track the stub we have created so that it will be deleted later.
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
+ stubInfo->stubRoutine = entryLabel;
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
@@ -848,16 +840,11 @@ bool JIT::privateCompileGetByIdProto(StructureStubInfo* stubInfo, Structure* str
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
- stubInfo->initGetByIdProto(structure, prototypeStructure, entryLabel);
- return true;
}
-bool JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
+void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset)
{
- PolymorphicAccessStructureList* polymorphicStructures = stubInfo->u.getByIdSelfList.structureList;
- int currentIndex = stubInfo->u.getByIdSelfList.listSize;
-
// regT0 holds a JSCell*
Jump failureCase = checkStructure(regT0, structure);
bool needsStubLink = false;
@@ -887,9 +874,6 @@ bool JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Structure*
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
if (iter->to)
@@ -915,15 +899,10 @@ bool JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, Structure*
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
- stubInfo->u.getByIdSelfList.listSize++;
- return true;
}
-bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
+void JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, Structure* prototypeStructure, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
{
- PolymorphicAccessStructureList* prototypeStructures = stubInfo->u.getByIdProtoList.structureList;
- int currentIndex = stubInfo->u.getByIdProtoList.listSize;
-
// regT0 holds a JSCell*
// The prototype object definitely exists (if this stub exists the CodeBlock is referencing a Structure that is
@@ -965,9 +944,6 @@ bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure*
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
if (iter->to)
@@ -992,15 +968,10 @@ bool JIT::privateCompileGetByIdProtoList(StructureStubInfo* stubInfo, Structure*
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
- stubInfo->u.getByIdProtoList.listSize++;
- return true;
}
-bool JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
+void JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* prototypeStructures, int currentIndex, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, CallFrame* callFrame)
{
- PolymorphicAccessStructureList* prototypeStructures = stubInfo->u.getByIdProtoList.structureList;
- int currentIndex = stubInfo->u.getByIdProtoList.listSize;
-
// regT0 holds a JSCell*
ASSERT(count);
@@ -1042,9 +1013,6 @@ bool JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Structure*
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
if (iter->to)
@@ -1070,11 +1038,9 @@ bool JIT::privateCompileGetByIdChainList(StructureStubInfo* stubInfo, Structure*
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
repatchBuffer.relink(jumpLocation, entryLabel);
- stubInfo->u.getByIdProtoList.listSize++;
- return true;
}
-bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
+void JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* structure, StructureChain* chain, size_t count, const Identifier& ident, const PropertySlot& slot, size_t cachedOffset, ReturnAddressPtr returnAddress, CallFrame* callFrame)
{
// regT0 holds a JSCell*
ASSERT(count);
@@ -1116,9 +1082,6 @@ bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
Jump success = jump();
LinkBuffer patchBuffer(this, m_codeBlock->executablePool(), 0);
- if (!patchBuffer.allocationSuccessful())
- return false;
-
if (needsStubLink) {
for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
if (iter->to)
@@ -1133,7 +1096,8 @@ bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// Track the stub we have created so that it will be deleted later.
CodeLocationLabel entryLabel = patchBuffer.finalizeCodeAddendum();
-
+ stubInfo->stubRoutine = entryLabel;
+
// Finally patch the jump to slow case back in the hot path to jump here instead.
CodeLocationJump jumpLocation = stubInfo->hotPathBegin.jumpAtOffset(patchOffsetGetByIdBranchToSlowCase);
RepatchBuffer repatchBuffer(m_codeBlock);
@@ -1141,8 +1105,6 @@ bool JIT::privateCompileGetByIdChain(StructureStubInfo* stubInfo, Structure* str
// We don't want to patch more than once - in future go to cti_op_put_by_id_generic.
repatchBuffer.relinkCallerToFunction(returnAddress, FunctionPtr(cti_op_get_by_id_proto_list));
- stubInfo->initGetByIdChain(structure, chain, entryLabel);
- return true;
}
/* ------------------------------ END: !ENABLE / ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS) ------------------------------ */
diff --git a/JavaScriptCore/jit/JITStubs.cpp b/JavaScriptCore/jit/JITStubs.cpp
index b53e655..e17c7cb 100644
--- a/JavaScriptCore/jit/JITStubs.cpp
+++ b/JavaScriptCore/jit/JITStubs.cpp
@@ -824,89 +824,111 @@ JITThunks::~JITThunks()
#if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
-NEVER_INLINE bool JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot& slot, StructureStubInfo* stubInfo, bool direct)
+NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot& slot, StructureStubInfo* stubInfo, bool direct)
{
// The interpreter checks for recursion here; I do not believe this can occur in CTI.
if (!baseValue.isCell())
- return false;
+ return;
// Uncacheable: give up.
- if (!slot.isCacheable())
- return false;
+ if (!slot.isCacheable()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
+ return;
+ }
JSCell* baseCell = asCell(baseValue);
Structure* structure = baseCell->structure();
- if (structure->isUncacheableDictionary())
- return false;
+ if (structure->isUncacheableDictionary()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
+ return;
+ }
// If baseCell != base, then baseCell must be a proxy for another object.
- if (baseCell != slot.base())
- return false;
+ if (baseCell != slot.base()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
+ return;
+ }
// Cache hit: Specialize instruction and ref Structures.
// Structure transition, cache transition info
if (slot.type() == PutPropertySlot::NewProperty) {
- if (structure->isDictionary())
- return false;
+ if (structure->isDictionary()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(direct ? cti_op_put_by_id_direct_generic : cti_op_put_by_id_generic));
+ return;
+ }
// put_by_id_transition checks the prototype chain for setters.
normalizePrototypeChain(callFrame, baseCell);
StructureChain* prototypeChain = structure->prototypeChain(callFrame);
- return JIT::compilePutByIdTransition(callFrame->scopeChain()->globalData, codeBlock, stubInfo, structure->previousID(), structure, slot.cachedOffset(), prototypeChain, returnAddress, direct);
+ stubInfo->initPutByIdTransition(structure->previousID(), structure, prototypeChain);
+ JIT::compilePutByIdTransition(callFrame->scopeChain()->globalData, codeBlock, stubInfo, structure->previousID(), structure, slot.cachedOffset(), prototypeChain, returnAddress, direct);
+ return;
}
+
+ stubInfo->initPutByIdReplace(structure);
JIT::patchPutByIdReplace(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress, direct);
- stubInfo->initPutByIdReplace(structure);
- return true;
}
-NEVER_INLINE bool JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo* stubInfo)
+NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo* stubInfo)
{
// FIXME: Write a test that proves we need to check for recursion here just
// like the interpreter does, then add a check for recursion.
// FIXME: Cache property access for immediates.
- if (!baseValue.isCell())
- return false;
+ if (!baseValue.isCell()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic));
+ return;
+ }
JSGlobalData* globalData = &callFrame->globalData();
- if (isJSArray(globalData, baseValue) && propertyName == callFrame->propertyNames().length)
- return JIT::compilePatchGetArrayLength(callFrame->scopeChain()->globalData, codeBlock, stubInfo, returnAddress);
+ if (isJSArray(globalData, baseValue) && propertyName == callFrame->propertyNames().length) {
+ JIT::compilePatchGetArrayLength(callFrame->scopeChain()->globalData, codeBlock, returnAddress);
+ return;
+ }
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());
- return true;
+ return;
}
// Uncacheable: give up.
- if (!slot.isCacheable())
- return false;
+ if (!slot.isCacheable()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic));
+ return;
+ }
JSCell* baseCell = asCell(baseValue);
Structure* structure = baseCell->structure();
- if (structure->isUncacheableDictionary())
- return false;
+ if (structure->isUncacheableDictionary()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic));
+ return;
+ }
// Cache hit: Specialize instruction and ref Structures.
if (slot.slotBase() == baseValue) {
- if (slot.cachedPropertyType() != PropertySlot::Value)
- return false;
- JIT::patchGetByIdSelf(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress);
+ // set this up, so derefStructures can do it's job.
stubInfo->initGetByIdSelf(structure);
- return true;
+ if (slot.cachedPropertyType() != PropertySlot::Value)
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_self_fail));
+ else
+ JIT::patchGetByIdSelf(codeBlock, stubInfo, structure, slot.cachedOffset(), returnAddress);
+ return;
}
- if (structure->isDictionary())
- return false;
+ if (structure->isDictionary()) {
+ ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic));
+ return;
+ }
if (slot.slotBase() == structure->prototypeForLookup(callFrame)) {
ASSERT(slot.slotBase().isObject());
@@ -920,20 +942,25 @@ NEVER_INLINE bool JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co
slotBaseObject->flattenDictionaryObject();
offset = slotBaseObject->structure()->get(propertyName);
}
+
+ stubInfo->initGetByIdProto(structure, slotBaseObject->structure());
+
ASSERT(!structure->isDictionary());
ASSERT(!slotBaseObject->structure()->isDictionary());
- return JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), propertyName, slot, offset, returnAddress);
+ JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), propertyName, slot, offset, returnAddress);
+ return;
}
size_t offset = slot.cachedOffset();
size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset);
if (!count) {
stubInfo->accessType = access_get_by_id_generic;
- return true;
+ return;
}
StructureChain* prototypeChain = structure->prototypeChain(callFrame);
- return JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, propertyName, slot, offset, returnAddress);
+ stubInfo->initGetByIdChain(structure, prototypeChain);
+ JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, propertyName, slot, offset, returnAddress);
}
#endif // ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
@@ -1386,13 +1413,9 @@ DEFINE_STUB_FUNCTION(void, op_put_by_id)
StructureStubInfo* stubInfo = &codeBlock->getStubInfo(STUB_RETURN_ADDRESS);
if (!stubInfo->seenOnce())
stubInfo->setSeen();
- else {
- JSValue baseValue = stackFrame.args[0].jsValue();
- bool cached = JITThunks::tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, baseValue, slot, stubInfo, false);
- if (!cached && baseValue.isCell())
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_id_generic));
- }
-
+ else
+ JITThunks::tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot, stubInfo, false);
+
CHECK_FOR_EXCEPTION_AT_END();
}
@@ -1409,13 +1432,9 @@ DEFINE_STUB_FUNCTION(void, op_put_by_id_direct)
StructureStubInfo* stubInfo = &codeBlock->getStubInfo(STUB_RETURN_ADDRESS);
if (!stubInfo->seenOnce())
stubInfo->setSeen();
- else {
- JSValue baseValue = stackFrame.args[0].jsValue();
- bool cached = JITThunks::tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, baseValue, slot, stubInfo, true);
- if (!cached && baseValue.isCell())
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_id_direct_generic));
- }
-
+ else
+ JITThunks::tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot, stubInfo, true);
+
CHECK_FOR_EXCEPTION_AT_END();
}
@@ -1547,11 +1566,8 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id)
StructureStubInfo* stubInfo = &codeBlock->getStubInfo(STUB_RETURN_ADDRESS);
if (!stubInfo->seenOnce())
stubInfo->setSeen();
- else {
- bool cached = JITThunks::tryCacheGetByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, baseValue, ident, slot, stubInfo);
- if (!cached)
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
- }
+ else
+ JITThunks::tryCacheGetByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, baseValue, ident, slot, stubInfo);
CHECK_FOR_EXCEPTION_AT_END();
return JSValue::encode(result);
@@ -1580,28 +1596,57 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
ASSERT(slot.slotBase().isObject());
- // If this is a regular self access (not yet upgraded to list), then switch the stubInfo over.
- if (stubInfo->accessType == access_get_by_id_self)
- stubInfo->initGetByIdSelfList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdSelf.baseObjectStructure));
+ PolymorphicAccessStructureList* polymorphicStructureList;
+ int listIndex = 1;
- // If there is room in the list, try to add a cached entry.
- if (stubInfo->u.getByIdSelfList.listSize < POLYMORPHIC_LIST_CACHE_SIZE) {
- bool cached = JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
- if (cached)
- return JSValue::encode(result);
+ if (stubInfo->accessType == access_get_by_id_self) {
+ ASSERT(!stubInfo->stubRoutine);
+ polymorphicStructureList = new PolymorphicAccessStructureList(CodeLocationLabel(), stubInfo->u.getByIdSelf.baseObjectStructure);
+ stubInfo->initGetByIdSelfList(polymorphicStructureList, 1);
+ } else {
+ polymorphicStructureList = stubInfo->u.getByIdSelfList.structureList;
+ listIndex = stubInfo->u.getByIdSelfList.listSize;
}
- }
- ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ stubInfo->u.getByIdSelfList.listSize++;
+ JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
+
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ }
+ } else
+ ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
return JSValue::encode(result);
}
-static void setupPolymorphicProtoList(StructureStubInfo* stubInfo)
-{
- if (stubInfo->accessType == access_get_by_id_proto)
- stubInfo->initGetByIdProtoList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdProto.baseObjectStructure, stubInfo->u.getByIdProto.prototypeStructure));
- else if (stubInfo->accessType == access_get_by_id_chain)
- stubInfo->initGetByIdProtoList(new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdChain.baseObjectStructure, stubInfo->u.getByIdChain.chain));
- ASSERT(stubInfo->accessType == access_get_by_id_proto_list);
+static PolymorphicAccessStructureList* getPolymorphicAccessStructureListSlot(StructureStubInfo* stubInfo, int& listIndex)
+{
+ PolymorphicAccessStructureList* prototypeStructureList = 0;
+ listIndex = 1;
+
+ switch (stubInfo->accessType) {
+ case access_get_by_id_proto:
+ prototypeStructureList = new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdProto.baseObjectStructure, stubInfo->u.getByIdProto.prototypeStructure);
+ stubInfo->stubRoutine = CodeLocationLabel();
+ stubInfo->initGetByIdProtoList(prototypeStructureList, 2);
+ break;
+ case access_get_by_id_chain:
+ prototypeStructureList = new PolymorphicAccessStructureList(stubInfo->stubRoutine, stubInfo->u.getByIdChain.baseObjectStructure, stubInfo->u.getByIdChain.chain);
+ stubInfo->stubRoutine = CodeLocationLabel();
+ stubInfo->initGetByIdProtoList(prototypeStructureList, 2);
+ break;
+ case access_get_by_id_proto_list:
+ prototypeStructureList = stubInfo->u.getByIdProtoList.structureList;
+ listIndex = stubInfo->u.getByIdProtoList.listSize;
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE)
+ stubInfo->u.getByIdProtoList.listSize++;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+ ASSERT(listIndex <= POLYMORPHIC_LIST_CACHE_SIZE);
+ return prototypeStructureList;
}
DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_getter_stub)
@@ -1662,36 +1707,40 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
size_t offset = slot.cachedOffset();
- // Don't mix self & proto/chain accesses in the same list
- if (slot.slotBase() != baseValue) {
- if (slot.slotBase() == asCell(baseValue)->structure()->prototypeForLookup(callFrame)) {
- ASSERT(!asCell(baseValue)->structure()->isDictionary());
- // Since we're accessing a prototype in a loop, it's a good bet that it
- // should not be treated as a dictionary.
- if (slotBaseObject->structure()->isDictionary()) {
- slotBaseObject->flattenDictionaryObject();
- offset = slotBaseObject->structure()->get(propertyName);
- }
+ if (slot.slotBase() == baseValue)
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
+ else if (slot.slotBase() == asCell(baseValue)->structure()->prototypeForLookup(callFrame)) {
+ ASSERT(!asCell(baseValue)->structure()->isDictionary());
+ // Since we're accessing a prototype in a loop, it's a good bet that it
+ // should not be treated as a dictionary.
+ if (slotBaseObject->structure()->isDictionary()) {
+ slotBaseObject->flattenDictionaryObject();
+ offset = slotBaseObject->structure()->get(propertyName);
+ }
- setupPolymorphicProtoList(stubInfo);
- if (stubInfo->u.getByIdProtoList.listSize < POLYMORPHIC_LIST_CACHE_SIZE) {
- bool cached = JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), propertyName, slot, offset);
- if (cached)
- return JSValue::encode(result);
- }
- } else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
- ASSERT(!asCell(baseValue)->structure()->isDictionary());
-
- setupPolymorphicProtoList(stubInfo);
- if (stubInfo->u.getByIdProtoList.listSize < POLYMORPHIC_LIST_CACHE_SIZE) {
- bool cached = JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, structure->prototypeChain(callFrame), count, propertyName, slot, offset);
- if (cached)
- return JSValue::encode(result);
- }
+ int listIndex;
+ PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), propertyName, slot, offset);
+
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
}
- }
+ } else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
+ ASSERT(!asCell(baseValue)->structure()->isDictionary());
+ int listIndex;
+ PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
+
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ StructureChain* protoChain = structure->prototypeChain(callFrame);
+ JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, propertyName, slot, offset);
+
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ }
+ } else
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
return JSValue::encode(result);
}
diff --git a/JavaScriptCore/jit/JITStubs.h b/JavaScriptCore/jit/JITStubs.h
index 43f3d19..4e73070 100644
--- a/JavaScriptCore/jit/JITStubs.h
+++ b/JavaScriptCore/jit/JITStubs.h
@@ -252,8 +252,8 @@ namespace JSC {
JITThunks(JSGlobalData*);
~JITThunks();
- static bool tryCacheGetByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&, StructureStubInfo* stubInfo);
- static bool tryCachePutByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot&, StructureStubInfo* stubInfo, bool direct);
+ static void tryCacheGetByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot&, StructureStubInfo* stubInfo);
+ static void tryCachePutByID(CallFrame*, CodeBlock*, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot&, StructureStubInfo* stubInfo, bool direct);
MacroAssemblerCodePtr ctiStringLengthTrampoline() { return m_trampolineStructure.ctiStringLengthTrampoline; }
MacroAssemblerCodePtr ctiVirtualCallLink() { return m_trampolineStructure.ctiVirtualCallLink; }
diff --git a/JavaScriptCore/jit/SpecializedThunkJIT.h b/JavaScriptCore/jit/SpecializedThunkJIT.h
index ba95498..57515fb 100644
--- a/JavaScriptCore/jit/SpecializedThunkJIT.h
+++ b/JavaScriptCore/jit/SpecializedThunkJIT.h
@@ -130,9 +130,6 @@ namespace JSC {
MacroAssemblerCodePtr finalize(MacroAssemblerCodePtr fallback)
{
LinkBuffer patchBuffer(this, m_pool.get(), 0);
- // We can't continue if we can't call a function!
- if (!patchBuffer.allocationSuccessful())
- CRASH();
patchBuffer.link(m_failures, CodeLocationLabel(fallback));
return patchBuffer.finalizeCode().m_code;
}
diff --git a/JavaScriptCore/parser/JSParser.cpp b/JavaScriptCore/parser/JSParser.cpp
index 3baceba..6852de1 100644
--- a/JavaScriptCore/parser/JSParser.cpp
+++ b/JavaScriptCore/parser/JSParser.cpp
@@ -33,6 +33,7 @@ using namespace JSC;
#include "NodeInfo.h"
#include "ASTBuilder.h"
#include <wtf/HashFunctions.h>
+#include <wtf/WTFThreadData.h>
#include <utility>
using namespace std;
@@ -220,12 +221,7 @@ JSParser::JSParser(Lexer* lexer, JSGlobalData* globalData, SourceProvider* provi
, m_nonLHSCount(0)
, m_syntaxAlreadyValidated(provider->isValid())
{
- m_endAddress = *(globalData->stackGuards);
- if (!m_endAddress) {
- char sample = 0;
- m_endAddress = &sample - kMaxParserStackUsage;
- *(globalData->stackGuards) = m_endAddress;
- }
+ m_endAddress = wtfThreadData().approximatedStackStart() - kMaxParserStackUsage;
next();
m_lexer->setLastLineNumber(tokenLine());
}
diff --git a/JavaScriptCore/parser/Lexer.cpp b/JavaScriptCore/parser/Lexer.cpp
index 877e89a..6c4db32 100644
--- a/JavaScriptCore/parser/Lexer.cpp
+++ b/JavaScriptCore/parser/Lexer.cpp
@@ -535,6 +535,146 @@ ALWAYS_INLINE bool Lexer::parseString(JSTokenData* lvalp)
return true;
}
+ALWAYS_INLINE void Lexer::parseHex(double& returnValue)
+{
+ // Optimization: most hexadecimal values fit into 4 bytes.
+ uint32_t hexValue = 0;
+ int maximumDigits = 7;
+
+ // Shift out the 'x' prefix.
+ shift();
+
+ do {
+ hexValue = (hexValue << 4) + toASCIIHexValue(m_current);
+ shift();
+ --maximumDigits;
+ } while (isASCIIHexDigit(m_current) && maximumDigits >= 0);
+
+ if (maximumDigits >= 0) {
+ returnValue = hexValue;
+ return;
+ }
+
+ // No more place in the hexValue buffer.
+ // The values are shifted out and placed into the m_buffer8 vector.
+ for (int i = 0; i < 8; ++i) {
+ int digit = hexValue >> 28;
+ if (digit < 10)
+ record8(digit + '0');
+ else
+ record8(digit - 10 + 'a');
+ hexValue <<= 4;
+ }
+
+ while (isASCIIHexDigit(m_current)) {
+ record8(m_current);
+ shift();
+ }
+
+ returnValue = parseIntOverflow(m_buffer8.data(), m_buffer8.size(), 16);
+}
+
+ALWAYS_INLINE bool Lexer::parseOctal(double& returnValue)
+{
+ // Optimization: most octal values fit into 4 bytes.
+ uint32_t octalValue = 0;
+ int maximumDigits = 9;
+ // Temporary buffer for the digits. Makes easier
+ // to reconstruct the input characters when needed.
+ char digits[10];
+
+ do {
+ octalValue = octalValue * 8 + (m_current - '0');
+ digits[maximumDigits] = m_current;
+ shift();
+ --maximumDigits;
+ } while (isASCIIOctalDigit(m_current) && maximumDigits >= 0);
+
+ if (!isASCIIDigit(m_current) && maximumDigits >= 0) {
+ returnValue = octalValue;
+ return true;
+ }
+
+ for (int i = 9; i > maximumDigits; --i)
+ record8(digits[i]);
+
+ while (isASCIIOctalDigit(m_current)) {
+ record8(m_current);
+ shift();
+ }
+
+ if (isASCIIDigit(m_current))
+ return false;
+
+ returnValue = parseIntOverflow(m_buffer8.data(), m_buffer8.size(), 8);
+ return true;
+}
+
+ALWAYS_INLINE bool Lexer::parseDecimal(double& returnValue)
+{
+ // Optimization: most decimal values fit into 4 bytes.
+ uint32_t decimalValue = 0;
+
+ // Since parseOctal may be executed before parseDecimal,
+ // the m_buffer8 may hold ascii digits.
+ if (!m_buffer8.size()) {
+ int maximumDigits = 9;
+ // Temporary buffer for the digits. Makes easier
+ // to reconstruct the input characters when needed.
+ char digits[10];
+
+ do {
+ decimalValue = decimalValue * 10 + (m_current - '0');
+ digits[maximumDigits] = m_current;
+ shift();
+ --maximumDigits;
+ } while (isASCIIDigit(m_current) && maximumDigits >= 0);
+
+ if (maximumDigits >= 0 && m_current != '.' && (m_current | 0x20) != 'e') {
+ returnValue = decimalValue;
+ return true;
+ }
+
+ for (int i = 9; i > maximumDigits; --i)
+ record8(digits[i]);
+ }
+
+ while (isASCIIDigit(m_current)) {
+ record8(m_current);
+ shift();
+ }
+
+ return false;
+}
+
+ALWAYS_INLINE void Lexer::parseNumberAfterDecimalPoint()
+{
+ record8('.');
+ while (isASCIIDigit(m_current)) {
+ record8(m_current);
+ shift();
+ }
+}
+
+ALWAYS_INLINE bool Lexer::parseNumberAfterExponentIndicator()
+{
+ record8('e');
+ shift();
+ if (m_current == '+' || m_current == '-') {
+ record8(m_current);
+ shift();
+ }
+
+ if (!isASCIIDigit(m_current))
+ return false;
+
+ do {
+ record8(m_current);
+ shift();
+ } while (isASCIIDigit(m_current));
+ return true;
+}
+
JSTokenType Lexer::lex(JSTokenData* lvalp, JSTokenInfo* llocp, LexType lexType)
{
ASSERT(!m_error);
@@ -750,14 +890,6 @@ start:
}
token = BITOR;
break;
- case CharacterDot:
- shift();
- if (isASCIIDigit(m_current)) {
- record8('.');
- goto inNumberAfterDecimalPoint;
- }
- token = DOT;
- break;
case CharacterOpenParen:
token = OPENPAREN;
shift();
@@ -806,10 +938,50 @@ start:
shift();
token = CLOSEBRACE;
break;
+ case CharacterDot:
+ shift();
+ if (!isASCIIDigit(m_current)) {
+ token = DOT;
+ break;
+ }
+ goto inNumberAfterDecimalPoint;
case CharacterZero:
- goto startNumberWithZeroDigit;
+ shift();
+ if ((m_current | 0x20) == 'x' && isASCIIHexDigit(peek(1))) {
+ parseHex(lvalp->doubleValue);
+ token = NUMBER;
+ } else {
+ record8('0');
+ if (isASCIIOctalDigit(m_current)) {
+ if (parseOctal(lvalp->doubleValue))
+ token = NUMBER;
+ }
+ }
+ // Fall through into CharacterNumber
case CharacterNumber:
- goto startNumber;
+ if (LIKELY(token != NUMBER)) {
+ if (!parseDecimal(lvalp->doubleValue)) {
+ if (m_current == '.') {
+ shift();
+inNumberAfterDecimalPoint:
+ parseNumberAfterDecimalPoint();
+ }
+ if ((m_current | 0x20) == 'e')
+ if (!parseNumberAfterExponentIndicator())
+ goto returnError;
+ // Null-terminate string for strtod.
+ m_buffer8.append('\0');
+ lvalp->doubleValue = WTF::strtod(m_buffer8.data(), 0);
+ }
+ token = NUMBER;
+ }
+
+ // No identifiers allowed directly after numeric literal, e.g. "3in" is bad.
+ if (UNLIKELY(isIdentStart(m_current)))
+ goto returnError;
+ m_buffer8.resize(0);
+ m_delimited = false;
+ break;
case CharacterQuote:
if (UNLIKELY(!parseString(lvalp)))
goto returnError;
@@ -875,143 +1047,8 @@ inMultiLineComment:
shift();
}
shift();
- m_atLineStart = false;
goto start;
-startNumberWithZeroDigit:
- shift();
- if ((m_current | 0x20) == 'x' && isASCIIHexDigit(peek(1))) {
- shift();
- goto inHex;
- }
- if (m_current == '.') {
- record8('0');
- record8('.');
- shift();
- goto inNumberAfterDecimalPoint;
- }
- if ((m_current | 0x20) == 'e') {
- record8('0');
- record8('e');
- shift();
- goto inExponentIndicator;
- }
- if (isASCIIOctalDigit(m_current))
- goto inOctal;
- if (isASCIIDigit(m_current))
- goto startNumber;
- lvalp->doubleValue = 0;
- goto doneNumeric;
-
-inNumberAfterDecimalPoint:
- while (isASCIIDigit(m_current)) {
- record8(m_current);
- shift();
- }
- if ((m_current | 0x20) == 'e') {
- record8('e');
- shift();
- goto inExponentIndicator;
- }
- goto doneNumber;
-
-inExponentIndicator:
- if (m_current == '+' || m_current == '-') {
- record8(m_current);
- shift();
- }
- if (!isASCIIDigit(m_current))
- goto returnError;
- do {
- record8(m_current);
- shift();
- } while (isASCIIDigit(m_current));
- goto doneNumber;
-
-inOctal: {
- do {
- record8(m_current);
- shift();
- } while (isASCIIOctalDigit(m_current));
- if (isASCIIDigit(m_current))
- goto startNumber;
-
- double dval = 0;
-
- const char* end = m_buffer8.end();
- for (const char* p = m_buffer8.data(); p < end; ++p) {
- dval *= 8;
- dval += *p - '0';
- }
- if (dval >= mantissaOverflowLowerBound)
- dval = parseIntOverflow(m_buffer8.data(), end - m_buffer8.data(), 8);
-
- m_buffer8.resize(0);
-
- lvalp->doubleValue = dval;
- goto doneNumeric;
-}
-
-inHex: {
- do {
- record8(m_current);
- shift();
- } while (isASCIIHexDigit(m_current));
-
- double dval = 0;
-
- const char* end = m_buffer8.end();
- for (const char* p = m_buffer8.data(); p < end; ++p) {
- dval *= 16;
- dval += toASCIIHexValue(*p);
- }
- if (dval >= mantissaOverflowLowerBound)
- dval = parseIntOverflow(m_buffer8.data(), end - m_buffer8.data(), 16);
-
- m_buffer8.resize(0);
-
- lvalp->doubleValue = dval;
- goto doneNumeric;
-}
-
-startNumber:
- record8(m_current);
- shift();
- while (isASCIIDigit(m_current)) {
- record8(m_current);
- shift();
- }
- if (m_current == '.') {
- record8('.');
- shift();
- goto inNumberAfterDecimalPoint;
- }
- if ((m_current | 0x20) == 'e') {
- record8('e');
- shift();
- goto inExponentIndicator;
- }
-
- // Fall through into doneNumber.
-
-doneNumber:
- // Null-terminate string for strtod.
- m_buffer8.append('\0');
- lvalp->doubleValue = WTF::strtod(m_buffer8.data(), 0);
- m_buffer8.resize(0);
-
- // Fall through into doneNumeric.
-
-doneNumeric:
- // No identifiers allowed directly after numeric literal, e.g. "3in" is bad.
- if (UNLIKELY(isIdentStart(m_current)))
- goto returnError;
-
- m_atLineStart = false;
- m_delimited = false;
- token = NUMBER;
- goto returnToken;
-
doneSemicolon:
token = SEMICOLON;
m_delimited = true;
diff --git a/JavaScriptCore/parser/Lexer.h b/JavaScriptCore/parser/Lexer.h
index 3d97cc1..da84a6b 100644
--- a/JavaScriptCore/parser/Lexer.h
+++ b/JavaScriptCore/parser/Lexer.h
@@ -96,6 +96,11 @@ namespace JSC {
ALWAYS_INLINE JSTokenType parseIdentifier(JSTokenData*, LexType);
ALWAYS_INLINE bool parseString(JSTokenData* lvalp);
+ ALWAYS_INLINE void parseHex(double& returnValue);
+ ALWAYS_INLINE bool parseOctal(double& returnValue);
+ ALWAYS_INLINE bool parseDecimal(double& returnValue);
+ ALWAYS_INLINE void parseNumberAfterDecimalPoint();
+ ALWAYS_INLINE bool parseNumberAfterExponentIndicator();
static const size_t initialReadBufferCapacity = 32;
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index e49ca28..28269ff 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -146,6 +146,20 @@ static void putProperty(ExecState* exec, JSObject* obj, const Identifier& proper
obj->put(exec, propertyName, value, slot);
}
+static unsigned argumentClampedIndexFromStartOrEnd(ExecState* exec, int argument, unsigned length, unsigned undefinedValue = 0)
+{
+ JSValue value = exec->argument(argument);
+ if (value.isUndefined())
+ return undefinedValue;
+
+ double indexDouble = value.toInteger(exec);
+ if (indexDouble < 0) {
+ indexDouble += length;
+ return indexDouble < 0 ? 0 : static_cast<unsigned>(indexDouble);
+ }
+ return indexDouble > length ? length : static_cast<unsigned>(indexDouble);
+}
+
EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
@@ -249,8 +263,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncToLocaleString(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncJoin(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
HashSet<JSObject*>& arrayVisitedElements = exec->globalData().arrayVisitedElements;
if (arrayVisitedElements.size() >= MaxSmallThreadReentryDepth) {
@@ -323,7 +336,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncConcat(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
JSArray* arr = constructEmptyArray(exec);
- int n = 0;
+ unsigned n = 0;
JSValue curArg = thisValue.toThisObject(exec);
size_t i = 0;
size_t argCount = exec->argumentCount();
@@ -389,8 +402,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncPush(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
unsigned middle = length / 2;
@@ -414,8 +426,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReverse(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue result;
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
@@ -442,43 +453,19 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncShift(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
// http://developer.netscape.com/docs/manuals/js/client/jsref/array.htm#1193713 or 15.4.4.10
-
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
// We return a new array
JSArray* resObj = constructEmptyArray(exec);
JSValue result = resObj;
- double begin = exec->argument(0).toInteger(exec);
+
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
- if (begin >= 0) {
- if (begin > length)
- begin = length;
- } else {
- begin += length;
- if (begin < 0)
- begin = 0;
- }
- double end;
- if (exec->argument(1).isUndefined())
- end = length;
- else {
- end = exec->argument(1).toInteger(exec);
- if (end < 0) {
- end += length;
- if (end < 0)
- end = 0;
- } else {
- if (end > length)
- end = length;
- }
- }
+ unsigned begin = argumentClampedIndexFromStartOrEnd(exec, 0, length);
+ unsigned end = argumentClampedIndexFromStartOrEnd(exec, 1, length, length);
- int n = 0;
- int b = static_cast<int>(begin);
- int e = static_cast<int>(end);
- for (int k = b; k < e; k++, n++) {
+ unsigned n = 0;
+ for (unsigned k = begin; k < end; k++, n++) {
if (JSValue v = getProperty(exec, thisObj, k))
resObj->put(exec, n, v);
}
@@ -488,8 +475,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSlice(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -547,29 +533,26 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSort(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
// 15.4.4.12
- // FIXME: Firefox returns an empty array.
if (!exec->argumentCount())
- return JSValue::encode(jsUndefined());
+ return JSValue::encode(constructEmptyArray(exec));
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
- double relativeBegin = exec->argument(0).toInteger(exec);
- unsigned begin;
- if (relativeBegin < 0) {
- relativeBegin += length;
- begin = (relativeBegin < 0) ? 0 : static_cast<unsigned>(relativeBegin);
- } else
- begin = std::min<unsigned>(static_cast<unsigned>(relativeBegin), length);
-
- unsigned deleteCount;
- if (exec->argumentCount() > 1)
- deleteCount = std::min<int>(std::max<int>(exec->argument(1).toUInt32(exec), 0), length - begin);
- else
- deleteCount = length - begin;
+ unsigned begin = argumentClampedIndexFromStartOrEnd(exec, 0, length);
+
+ unsigned deleteCount = length - begin;
+ if (exec->argumentCount() > 1) {
+ double deleteDouble = exec->argument(1).toInteger(exec);
+ if (deleteDouble < 0)
+ deleteCount = 0;
+ else if (deleteDouble > length - begin)
+ deleteCount = length - begin;
+ else
+ deleteCount = static_cast<unsigned>(deleteDouble);
+ }
JSArray* resObj = new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), deleteCount, CreateCompact);
JSValue result = resObj;
@@ -616,8 +599,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSplice(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
// 15.4.4.13
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
@@ -643,8 +625,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncUnShift(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -702,8 +683,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncFilter(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -760,8 +740,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncMap(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -817,8 +796,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncEvery(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -863,8 +841,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncForEach(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -917,8 +894,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncSome(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -988,8 +964,7 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduce(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
JSValue function = exec->argument(0);
CallData callData;
@@ -1058,23 +1033,12 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncReduceRight(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
// JavaScript 1.5 Extension by Mozilla
// Documentation: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
- JSObject* thisObj = thisValue.toThisObject(exec);
-
- unsigned index = 0;
- double d = exec->argument(1).toInteger(exec);
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
- if (d < 0)
- d += length;
- if (d > 0) {
- if (d > length)
- index = length;
- else
- index = static_cast<unsigned>(d);
- }
+ unsigned index = argumentClampedIndexFromStartOrEnd(exec, 1, length);
JSValue searchElement = exec->argument(0);
for (; index < length; ++index) {
@@ -1090,32 +1054,36 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncIndexOf(ExecState* exec)
EncodedJSValue JSC_HOST_CALL arrayProtoFuncLastIndexOf(ExecState* exec)
{
- JSValue thisValue = exec->hostThisValue();
// JavaScript 1.6 Extension by Mozilla
// Documentation: http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf
-
- JSObject* thisObj = thisValue.toThisObject(exec);
+ JSObject* thisObj = exec->hostThisValue().toThisObject(exec);
unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
- int index = length - 1;
- double d = exec->argument(1).toIntegerPreserveNaN(exec);
-
- if (d < 0) {
- d += length;
- if (d < 0)
- return JSValue::encode(jsNumber(exec, -1));
+ if (!length)
+ return JSValue::encode(jsNumber(exec, -1));
+
+ unsigned index = length - 1;
+ JSValue fromValue = exec->argument(1);
+ if (!fromValue.isUndefined()) {
+ double fromDouble = fromValue.toInteger(exec);
+ if (fromDouble < 0) {
+ fromDouble += length;
+ if (fromDouble < 0)
+ return JSValue::encode(jsNumber(exec, -1));
+ }
+ if (fromDouble < length)
+ index = static_cast<unsigned>(fromDouble);
}
- if (d < length)
- index = static_cast<int>(d);
JSValue searchElement = exec->argument(0);
- for (; index >= 0; --index) {
+ do {
+ ASSERT(index < length);
JSValue e = getProperty(exec, thisObj, index);
if (!e)
continue;
if (JSValue::strictEqual(exec, searchElement, e))
return JSValue::encode(jsNumber(exec, index));
- }
+ } while (index--);
return JSValue::encode(jsNumber(exec, -1));
}
diff --git a/JavaScriptCore/runtime/ErrorInstance.cpp b/JavaScriptCore/runtime/ErrorInstance.cpp
index be6d0fb..740e20e 100644
--- a/JavaScriptCore/runtime/ErrorInstance.cpp
+++ b/JavaScriptCore/runtime/ErrorInstance.cpp
@@ -25,9 +25,10 @@ namespace JSC {
const ClassInfo ErrorInstance::info = { "Error", 0, 0, 0 };
-ErrorInstance::ErrorInstance(NonNullPassRefPtr<Structure> structure)
+ErrorInstance::ErrorInstance(JSGlobalData* globalData, NonNullPassRefPtr<Structure> structure)
: JSObject(structure)
{
+ putDirect(globalData->propertyNames->message, jsString(globalData, ""));
}
ErrorInstance::ErrorInstance(JSGlobalData* globalData, NonNullPassRefPtr<Structure> structure, const UString& message)
@@ -44,7 +45,7 @@ ErrorInstance* ErrorInstance::create(JSGlobalData* globalData, NonNullPassRefPtr
ErrorInstance* ErrorInstance::create(ExecState* exec, NonNullPassRefPtr<Structure> structure, JSValue message)
{
if (message.isUndefined())
- return new (exec) ErrorInstance(structure);
+ return new (exec) ErrorInstance(&exec->globalData(), structure);
return new (exec) ErrorInstance(&exec->globalData(), structure, message.toString(exec));
}
diff --git a/JavaScriptCore/runtime/ErrorInstance.h b/JavaScriptCore/runtime/ErrorInstance.h
index 35edcb0..a49cc3c 100644
--- a/JavaScriptCore/runtime/ErrorInstance.h
+++ b/JavaScriptCore/runtime/ErrorInstance.h
@@ -35,7 +35,7 @@ namespace JSC {
static ErrorInstance* create(ExecState* exec, NonNullPassRefPtr<Structure>, JSValue message);
protected:
- explicit ErrorInstance(NonNullPassRefPtr<Structure>);
+ explicit ErrorInstance(JSGlobalData*, NonNullPassRefPtr<Structure>);
explicit ErrorInstance(JSGlobalData*, NonNullPassRefPtr<Structure>, const UString&);
};
diff --git a/JavaScriptCore/runtime/ErrorPrototype.cpp b/JavaScriptCore/runtime/ErrorPrototype.cpp
index 0e14a30..d18e7d8 100644
--- a/JavaScriptCore/runtime/ErrorPrototype.cpp
+++ b/JavaScriptCore/runtime/ErrorPrototype.cpp
@@ -36,7 +36,7 @@ static EncodedJSValue JSC_HOST_CALL errorProtoFuncToString(ExecState*);
// ECMA 15.9.4
ErrorPrototype::ErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, Structure* prototypeFunctionStructure)
- : ErrorInstance(&exec->globalData(), structure, "Unknown error")
+ : ErrorInstance(&exec->globalData(), structure)
{
// The constructor will be added later in ErrorConstructor's constructor
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.cpp b/JavaScriptCore/runtime/ExceptionHelpers.cpp
index 871b2d5..9a6fe5e 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.cpp
+++ b/JavaScriptCore/runtime/ExceptionHelpers.cpp
@@ -187,11 +187,6 @@ JSObject* createNotAnObjectError(ExecState* exec, JSNotAnObjectErrorStub* error,
return exception;
}
-JSObject* createOutOfMemoryError(JSGlobalObject* globalObject)
-{
- return createError(globalObject, "Out of memory");
-}
-
JSValue throwOutOfMemoryError(ExecState* exec)
{
return throwError(exec, createError(exec, "Out of memory"));
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.h b/JavaScriptCore/runtime/ExceptionHelpers.h
index e4c94fb..3e6de86 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.h
+++ b/JavaScriptCore/runtime/ExceptionHelpers.h
@@ -53,7 +53,6 @@ namespace JSC {
JSObject* createNotAConstructorError(ExecState*, JSValue, unsigned bytecodeOffset, CodeBlock*);
JSValue createNotAFunctionError(ExecState*, JSValue, unsigned bytecodeOffset, CodeBlock*);
JSObject* createNotAnObjectError(ExecState*, JSNotAnObjectErrorStub*, unsigned bytecodeOffset, CodeBlock*);
- JSObject* createOutOfMemoryError(JSGlobalObject*);
JSValue throwOutOfMemoryError(ExecState*);
} // namespace JSC
diff --git a/JavaScriptCore/runtime/Executable.cpp b/JavaScriptCore/runtime/Executable.cpp
index 058a091..41b5f1f 100644
--- a/JavaScriptCore/runtime/Executable.cpp
+++ b/JavaScriptCore/runtime/Executable.cpp
@@ -116,10 +116,6 @@ JSObject* EvalExecutable::compileInternal(ExecState* exec, ScopeChainNode* scope
#if ENABLE(JIT)
if (exec->globalData().canUseJIT()) {
m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_evalCodeBlock.get());
- if (UNLIKELY(!m_jitCodeForCall)) {
- m_evalCodeBlock.clear();
- return createOutOfMemoryError(globalObject);
- }
#if !ENABLE(OPCODE_SAMPLING)
if (!BytecodeGenerator::dumpsGeneratedCode())
m_evalCodeBlock->discardBytecode();
@@ -168,10 +164,6 @@ JSObject* ProgramExecutable::compileInternal(ExecState* exec, ScopeChainNode* sc
#if ENABLE(JIT)
if (exec->globalData().canUseJIT()) {
m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_programCodeBlock.get());
- if (UNLIKELY(!m_jitCodeForCall)) {
- m_programCodeBlock.clear();
- return createOutOfMemoryError(globalObject);
- }
#if !ENABLE(OPCODE_SAMPLING)
if (!BytecodeGenerator::dumpsGeneratedCode())
m_programCodeBlock->discardBytecode();
@@ -213,10 +205,6 @@ JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, ScopeChain
#if ENABLE(JIT)
if (exec->globalData().canUseJIT()) {
m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, m_codeBlockForCall.get(), &m_jitCodeForCallWithArityCheck);
- if (UNLIKELY(!m_jitCodeForCall)) {
- m_codeBlockForCall.clear();
- return createOutOfMemoryError(globalObject);
- }
#if !ENABLE(OPCODE_SAMPLING)
if (!BytecodeGenerator::dumpsGeneratedCode())
m_codeBlockForCall->discardBytecode();
@@ -258,10 +246,6 @@ JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, Scope
#if ENABLE(JIT)
if (exec->globalData().canUseJIT()) {
m_jitCodeForConstruct = JIT::compile(scopeChainNode->globalData, m_codeBlockForConstruct.get(), &m_jitCodeForConstructWithArityCheck);
- if (UNLIKELY(!m_jitCodeForConstruct)) {
- m_codeBlockForConstruct.clear();
- return createOutOfMemoryError(globalObject);
- }
#if !ENABLE(OPCODE_SAMPLING)
if (!BytecodeGenerator::dumpsGeneratedCode())
m_codeBlockForConstruct->discardBytecode();
@@ -305,15 +289,12 @@ PassOwnPtr<ExceptionInfo> FunctionExecutable::reparseExceptionInfo(JSGlobalData*
#if ENABLE(JIT)
if (globalData->canUseJIT()) {
JITCode newJITCode = JIT::compile(globalData, newCodeBlock.get(), 0, codeBlock->m_isConstructor ? generatedJITCodeForConstruct().start() : generatedJITCodeForCall().start());
- if (!newJITCode) {
- globalData->functionCodeBlockBeingReparsed = 0;
- return PassOwnPtr<ExceptionInfo>();
- }
ASSERT(codeBlock->m_isConstructor ? newJITCode.size() == generatedJITCodeForConstruct().size() : newJITCode.size() == generatedJITCodeForCall().size());
}
#endif
globalData->functionCodeBlockBeingReparsed = 0;
+
return newCodeBlock->extractExceptionInfo();
}
@@ -338,10 +319,6 @@ PassOwnPtr<ExceptionInfo> EvalExecutable::reparseExceptionInfo(JSGlobalData* glo
#if ENABLE(JIT)
if (globalData->canUseJIT()) {
JITCode newJITCode = JIT::compile(globalData, newCodeBlock.get(), 0, generatedJITCodeForCall().start());
- if (!newJITCode) {
- globalData->functionCodeBlockBeingReparsed = 0;
- return PassOwnPtr<ExceptionInfo>();
- }
ASSERT(newJITCode.size() == generatedJITCodeForCall().size());
}
#endif
diff --git a/JavaScriptCore/runtime/JSGlobalData.h b/JavaScriptCore/runtime/JSGlobalData.h
index 07acb43..43c4bab 100644
--- a/JavaScriptCore/runtime/JSGlobalData.h
+++ b/JavaScriptCore/runtime/JSGlobalData.h
@@ -227,7 +227,6 @@ namespace JSC {
#endif
CachedTranscendentalFunction<sin> cachedSin;
- WTF::ThreadSpecific<char*> stackGuards;
void resetDateCache();
diff --git a/JavaScriptCore/runtime/JSValue.h b/JavaScriptCore/runtime/JSValue.h
index af4b0f4..4a6744d 100644
--- a/JavaScriptCore/runtime/JSValue.h
+++ b/JavaScriptCore/runtime/JSValue.h
@@ -410,7 +410,7 @@ namespace JSC {
inline uint32_t JSValue::toUInt32(ExecState* exec) const
{
if (isUInt32())
- return asInt32();
+ return asUInt32();
double val = toNumber(exec);
diff --git a/JavaScriptCore/runtime/NumberPrototype.cpp b/JavaScriptCore/runtime/NumberPrototype.cpp
index 1a74375..e18553b 100644
--- a/JavaScriptCore/runtime/NumberPrototype.cpp
+++ b/JavaScriptCore/runtime/NumberPrototype.cpp
@@ -29,6 +29,7 @@
#include "Operations.h"
#include "PrototypeFunction.h"
#include "StringBuilder.h"
+#include "dtoa.h"
#include <wtf/Assertions.h>
#include <wtf/DecimalNumber.h>
#include <wtf/MathExtras.h>
diff --git a/JavaScriptCore/runtime/TimeoutChecker.cpp b/JavaScriptCore/runtime/TimeoutChecker.cpp
index 2dc1028..04d904d 100644
--- a/JavaScriptCore/runtime/TimeoutChecker.cpp
+++ b/JavaScriptCore/runtime/TimeoutChecker.cpp
@@ -98,7 +98,10 @@ static inline unsigned getCPUTime()
return GETUPTIMEMS();
#else
// FIXME: We should return the time the current thread has spent executing.
- return currentTime() * 1000;
+
+ // use a relative time from first call in order to avoid an overflow
+ static double firstTime = currentTime();
+ return (currentTime() - firstTime) * 1000;
#endif
}
diff --git a/JavaScriptCore/runtime/UString.cpp b/JavaScriptCore/runtime/UString.cpp
index 7362950..17cd9b6 100644
--- a/JavaScriptCore/runtime/UString.cpp
+++ b/JavaScriptCore/runtime/UString.cpp
@@ -35,10 +35,10 @@
#include <stdlib.h>
#include <wtf/ASCIICType.h>
#include <wtf/Assertions.h>
+#include <wtf/DecimalNumber.h>
#include <wtf/MathExtras.h>
#include <wtf/StringExtras.h>
#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
#include <wtf/unicode/UTF8.h>
#if HAVE(STRINGS_H)
@@ -199,7 +199,8 @@ UString UString::number(long l)
UString UString::number(double d)
{
NumberToStringBuffer buffer;
- return StringImpl::create(buffer, numberToString(d, buffer));
+ unsigned length = numberToString(d, buffer);
+ return UString(buffer, length);
}
UString UString::substringSharingImpl(unsigned offset, unsigned length) const
diff --git a/JavaScriptCore/wtf/Assertions.cpp b/JavaScriptCore/wtf/Assertions.cpp
index cadbc91..273e0e0 100644
--- a/JavaScriptCore/wtf/Assertions.cpp
+++ b/JavaScriptCore/wtf/Assertions.cpp
@@ -35,7 +35,7 @@
#include <CoreFoundation/CFString.h>
#endif
-#if COMPILER(MSVC) && !OS(WINCE)
+#if COMPILER(MSVC) && !OS(WINCE) && !PLATFORM(BREWMP)
#ifndef WINVER
#define WINVER 0x0500
#endif
@@ -50,8 +50,40 @@
#include <winbase.h>
#endif
+#if PLATFORM(BREWMP)
+#include <AEEStdLib.h>
+#include <wtf/Vector.h>
+#endif
+
extern "C" {
+#if PLATFORM(BREWMP)
+
+static void printLog(const Vector<char>& buffer)
+{
+ // Each call to DBGPRINTF generates at most 128 bytes of output on the Windows SDK.
+ // On Qualcomm chipset targets, DBGPRINTF() comes out the diag port (though this may change).
+ // The length of each output string is constrained even more than on the Windows SDK.
+#if COMPILER(MSVC)
+ const int printBufferSize = 128;
+#else
+ const int printBufferSize = 32;
+#endif
+
+ char printBuffer[printBufferSize + 1];
+ printBuffer[printBufferSize] = 0; // to guarantee null termination
+
+ const char* p = buffer.data();
+ const char* end = buffer.data() + buffer.size();
+ while (p < end) {
+ strncpy(printBuffer, p, printBufferSize);
+ DBGPRINTF(printBuffer);
+ p += printBufferSize;
+ }
+}
+
+#endif
+
WTF_ATTRIBUTE_PRINTF(1, 0)
static void vprintf_stderr_common(const char* format, va_list args)
{
@@ -71,6 +103,16 @@ static void vprintf_stderr_common(const char* format, va_list args)
CFRelease(str);
CFRelease(cfFormat);
} else
+#elif PLATFORM(BREWMP)
+ // When str is 0, the return value is the number of bytes needed
+ // to accept the result including null termination.
+ int size = vsnprintf(0, 0, format, args);
+ if (size > 0) {
+ Vector<char> buffer(size);
+ vsnprintf(buffer.data(), size, format, args);
+ printLog(buffer);
+ }
+
#elif COMPILER(MSVC) && !defined(WINCEBASIC)
if (IsDebuggerPresent()) {
size_t size = 1024;
diff --git a/JavaScriptCore/wtf/Assertions.h b/JavaScriptCore/wtf/Assertions.h
index afeae0c..c4e015d 100644
--- a/JavaScriptCore/wtf/Assertions.h
+++ b/JavaScriptCore/wtf/Assertions.h
@@ -212,7 +212,14 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann
#define ASSERT(assertion) ((void)0)
#define ASSERT_NOT_REACHED() ((void)0)
+
+#if COMPILER(INTEL) && !OS(WINDOWS) || COMPILER(RVCT)
+template<typename T>
+inline void assertUnused(T& x) { (void)x; }
+#define ASSERT_UNUSED(variable, assertion) (assertUnused(variable))
+#else
#define ASSERT_UNUSED(variable, assertion) ((void)variable)
+#endif
#else
diff --git a/JavaScriptCore/wtf/Complex.h b/JavaScriptCore/wtf/Complex.h
index cfd1d20..7da8511 100644
--- a/JavaScriptCore/wtf/Complex.h
+++ b/JavaScriptCore/wtf/Complex.h
@@ -26,13 +26,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Complex_h
-#define Complex_h
+#ifndef WTF_Complex_h
+#define WTF_Complex_h
#include <complex>
#include <wtf/MathExtras.h>
-namespace WebCore {
+namespace WTF {
typedef std::complex<double> Complex;
@@ -41,6 +41,6 @@ inline Complex complexFromMagnitudePhase(double magnitude, double phase)
return Complex(magnitude * cos(phase), magnitude * sin(phase));
}
-} // namespace WebCore
+} // namespace WTF
-#endif // Complex_h
+#endif // WTF_Complex_h
diff --git a/JavaScriptCore/wtf/DecimalNumber.h b/JavaScriptCore/wtf/DecimalNumber.h
index 118c492..3a831b7 100644
--- a/JavaScriptCore/wtf/DecimalNumber.h
+++ b/JavaScriptCore/wtf/DecimalNumber.h
@@ -40,111 +40,48 @@ class DecimalNumber {
public:
DecimalNumber(double d)
{
- bool sign = d < 0; // This (correctly) ignores the sign on -0.0.
- init(sign, d);
+ ASSERT(!isnan(d) && !isinf(d));
+ dtoa(m_significand, d, m_sign, m_exponent, m_precision);
+
+ ASSERT(m_precision);
+ // Zero should always have exponent 0.
+ ASSERT(m_significand[0] != '0' || !m_exponent);
+ // No values other than zero should have a leading zero.
+ ASSERT(m_significand[0] != '0' || m_precision == 1);
+ // No values other than zero should have trailing zeros.
+ ASSERT(m_significand[0] == '0' || m_significand[m_precision - 1] != '0');
}
- // If our version of dtoa could round to a given number of significant figures then
- // we could remove the pre-rounding code from here. We could also do so just by
- // calling dtoa and post-rounding, however currently this is slower, since it forces
- // dtoa to generate a higher presision result.
DecimalNumber(double d, RoundingSignificantFiguresType, unsigned significantFigures)
{
ASSERT(!isnan(d) && !isinf(d));
- ASSERT(significantFigures && significantFigures <= 21);
-
- bool sign = d < 0; // This (correctly) ignores the sign on -0.0.
- d = fabs(d); // make d positive before going any further.
-
- int adjust = 0;
- if (d) {
- // To round a number we align it such that the correct number of digits are
- // to the left of the decimal point, then floor/ceil. For example, to round
- // 13579 to 3 s.f. we first adjust it to 135.79, use floor/ceil to obtain the
- // values 135/136, and then select 136 (since this is closest to 135.79).
- // There are currently (exp + 1) digits to the left of the decimal point,
- // and we want thsi to be significantFigures, so we're going to adjust the
- // exponent by ((exp + 1) - significantFigures). Adjust is effectively
- // a count of how many decimal digits to right-shift the number by.
- int exp = static_cast<int>(floor(log10(d)));
- adjust = (exp + 1) - significantFigures;
-
- // If the adjust value might be positive or negative - or zero. If zero, then
- // nothing to do! - the number is already appropriately aligned. If adjust
- // is positive then divide d by 10^adjust. If adjust is negative multiply d
- // by 10^-adjust. This is mathematically the same, but avoids two fp divides
- // (one inside intPow10, where the power is negative).
- if (adjust > 0)
- d /= intPow10(adjust);
- else if (adjust < 0)
- d *= intPow10(-adjust);
-
- // Try rounding up & rounding down, select whichever is closest (rounding up if equal distance).
- double floorOfD = floor(d);
- double ceilOfD = floorOfD + 1;
- d = (fabs(ceilOfD - d) <= fabs(floorOfD - d)) ? ceilOfD : floorOfD;
-
- // The number's exponent has been altered - but don't change it back! We can
- // just run dtoa on the modified value, and adjust the exponent afterward to
- // account for this.
- }
-
- init(sign, d);
+ dtoaRoundSF(m_significand, d, significantFigures, m_sign, m_exponent, m_precision);
- // We alterered the value when rounding it - modify the exponent to adjust for this,
- // but don't mess with the exponent of zero.
- if (!isZero())
- m_exponent += adjust;
+ ASSERT(significantFigures && significantFigures <= sizeof(DtoaBuffer));
+ while (m_precision < significantFigures)
+ m_significand[m_precision++] = '0';
- // Make sure the significand does not contain more digits than requested.
- roundToPrecision(significantFigures);
+ ASSERT(m_precision);
+ // Zero should always have exponent 0.
+ ASSERT(m_significand[0] != '0' || !m_exponent);
}
- // If our version of dtoa could round to a given number of decimal places then we
- // could remove the pre-rounding code from here. We could also do so just by calling
- // dtoa and post-rounding, however currently this is slower, since it forces dtoa to
- // generate a higher presision result.
DecimalNumber(double d, RoundingDecimalPlacesType, unsigned decimalPlaces)
{
ASSERT(!isnan(d) && !isinf(d));
- ASSERT(decimalPlaces <= 20);
-
- bool sign = d < 0; // This (correctly) ignores the sign on -0.0.
- d = fabs(d); // Make d positive before going any further.
-
- ASSERT(d < 1e+21); // We don't currently support rounding to decimal places for values >= 1e+21.
-
- // Adjust the number by increasing the exponent by decimalPlaces, such
- // that we can round to this number of decimal places jsing floor.
- if (decimalPlaces)
- d *= intPow10(decimalPlaces);
- // Try rounding up & rounding down, select whichever is closest (rounding up if equal distance).
- double floorOfD = floor(d);
- double ceilOfD = floorOfD + 1;
- d = (fabs(ceilOfD - d) <= fabs(floorOfD - d)) ? ceilOfD : floorOfD;
- // The number's exponent has been altered - but don't change it back! We can
- // just run dtoa on the modified value, and adjust the exponent afterward to
- // account for this.
-
- init(sign, d);
-
- // We rouned the value before calling dtoa, so the result should not be fractional.
- ASSERT(m_exponent >= 0);
-
- // We alterered the value when rounding it - modify the exponent to adjust for this,
- // but don't mess with the exponent of zero.
- if (!isZero())
- m_exponent -= decimalPlaces;
-
- // The value was < 1e+21 before we started, should still be.
- ASSERT(m_exponent < 21);
+ dtoaRoundDP(m_significand, d, decimalPlaces, m_sign, m_exponent, m_precision);
unsigned significantFigures = 1 + m_exponent + decimalPlaces;
- ASSERT(significantFigures && significantFigures <= 41);
- roundToPrecision(significantFigures);
+ ASSERT(significantFigures && significantFigures <= sizeof(DtoaBuffer));
+ while (m_precision < significantFigures)
+ m_significand[m_precision++] = '0';
+
+ ASSERT(m_precision);
+ // Zero should always have exponent 0.
+ ASSERT(m_significand[0] != '0' || !m_exponent);
}
- unsigned toStringDecimal(NumberToStringBuffer& buffer)
+ unsigned toStringDecimal(NumberToStringBuffer buffer)
{
// Should always be at least one digit to add to the string!
ASSERT(m_precision);
@@ -198,7 +135,7 @@ public:
return next - buffer;
}
- unsigned toStringExponential(NumberToStringBuffer &buffer)
+ unsigned toStringExponential(NumberToStringBuffer buffer)
{
// Should always be at least one digit to add to the string!
ASSERT(m_precision);
@@ -244,75 +181,6 @@ public:
unsigned precision() { return m_precision; }
private:
- void init(bool sign, double d)
- {
- ASSERT(!isnan(d) && !isinf(d));
-
- int decimalPoint;
- int signUnused;
- char* resultEnd = 0;
- WTF::dtoa(m_significand, d, 0, &decimalPoint, &signUnused, &resultEnd);
-
- m_sign = sign;
- m_precision = resultEnd - m_significand;
- m_exponent = decimalPoint - 1;
-
- // No values other than zero should have a leading zero.
- ASSERT(m_significand[0] != '0' || m_precision == 1);
- // Zero should always have exponent 0.
- ASSERT(m_significand[0] != '0' || !m_exponent);
- }
-
- bool isZero()
- {
- return m_significand[0] == '0';
- }
-
- // We pre-round the values to dtoa - which leads to it generating faster results.
- // But dtoa won't have zero padded the significand to the precision we require,
- // and also might have produced too many digits if rounding went wrong somehow.
- // Adjust for this.
- void roundToPrecision(unsigned significantFigures)
- {
- ASSERT(significantFigures && significantFigures <= sizeof(DtoaBuffer));
-
- // If there are too few of too many digits in the significand then add more, or remove some!
- for (unsigned i = m_precision; i < significantFigures; ++i)
- m_significand[i] = '0';
- m_precision = significantFigures;
- }
-
- double intPow10(int e)
- {
- // This function uses the "exponentiation by squaring" algorithm and
- // long double to quickly and precisely calculate integer powers of 10.0.
-
- // This is a handy workaround for <rdar://problem/4494756>
-
- if (!e)
- return 1.0;
-
- bool negative = e < 0;
- unsigned exp = negative ? -e : e;
-
- long double result = 10.0;
- bool foundOne = false;
- for (int bit = 31; bit >= 0; bit--) {
- if (!foundOne) {
- if ((exp >> bit) & 1)
- foundOne = true;
- } else {
- result = result * result;
- if ((exp >> bit) & 1)
- result = result * 10.0;
- }
- }
-
- if (negative)
- return static_cast<double>(1.0 / result);
- return static_cast<double>(result);
- }
-
bool m_sign;
int m_exponent;
DtoaBuffer m_significand;
diff --git a/JavaScriptCore/wtf/FastMalloc.cpp b/JavaScriptCore/wtf/FastMalloc.cpp
index 39cd324..ee6b02c 100644
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@ -1546,7 +1546,8 @@ void TCMalloc_PageHeap::scavenge()
SpanList* slist = (static_cast<size_t>(i) == kMaxPages) ? &large_ : &free_[i];
// If the span size is bigger than kMinSpanListsWithSpans pages return all the spans in the list, else return all but 1 span.
// Return only 50% of a spanlist at a time so spans of size 1 are not the only ones left.
- size_t numSpansToReturn = (i > kMinSpanListsWithSpans) ? DLL_Length(&slist->normal) : static_cast<size_t>(.5 * DLL_Length(&slist->normal));
+ size_t length = DLL_Length(&slist->normal);
+ size_t numSpansToReturn = (i > kMinSpanListsWithSpans) ? length : length / 2;
for (int j = 0; static_cast<size_t>(j) < numSpansToReturn && !DLL_IsEmpty(&slist->normal) && free_committed_pages_ > targetPageCount; j++) {
Span* s = slist->normal.prev;
DLL_Remove(s);
diff --git a/JavaScriptCore/wtf/Forward.h b/JavaScriptCore/wtf/Forward.h
index 32435c8..3a9cfa7 100644
--- a/JavaScriptCore/wtf/Forward.h
+++ b/JavaScriptCore/wtf/Forward.h
@@ -27,6 +27,7 @@ namespace WTF {
template<typename T> class ListRefPtr;
template<typename T> class OwnArrayPtr;
template<typename T> class OwnPtr;
+ template<typename T> class PassOwnArrayPtr;
template<typename T> class PassOwnPtr;
template<typename T> class PassRefPtr;
template<typename T> class RefPtr;
@@ -43,6 +44,7 @@ namespace WTF {
using WTF::ListRefPtr;
using WTF::OwnArrayPtr;
using WTF::OwnPtr;
+using WTF::PassOwnArrayPtr;
using WTF::PassOwnPtr;
using WTF::PassRefPtr;
using WTF::RefPtr;
diff --git a/JavaScriptCore/wtf/OwnArrayPtr.h b/JavaScriptCore/wtf/OwnArrayPtr.h
index d40ea17..ce056b3 100644
--- a/JavaScriptCore/wtf/OwnArrayPtr.h
+++ b/JavaScriptCore/wtf/OwnArrayPtr.h
@@ -21,74 +21,154 @@
#ifndef WTF_OwnArrayPtr_h
#define WTF_OwnArrayPtr_h
+#include "Assertions.h"
+#include "Noncopyable.h"
+#include "OwnArrayPtrCommon.h"
#include <algorithm>
-#include <wtf/Assertions.h>
-#include <wtf/Noncopyable.h>
+
+// Remove this once we make all WebKit code compatible with stricter rules about OwnArrayPtr.
+#define LOOSE_OWN_ARRAY_PTR
namespace WTF {
- template <typename T> class OwnArrayPtr : public Noncopyable {
- public:
- explicit OwnArrayPtr(T* ptr = 0) : m_ptr(ptr) { }
- ~OwnArrayPtr() { safeDelete(m_ptr); }
+template<typename T> class PassOwnArrayPtr;
+template<typename T> PassOwnArrayPtr<T> adoptArrayPtr(T*);
+
+template <typename T> class OwnArrayPtr : public Noncopyable {
+public:
+ typedef T* PtrType;
+
+ OwnArrayPtr() : m_ptr(0) { }
- T* get() const { return m_ptr; }
- T* release() { T* ptr = m_ptr; m_ptr = 0; return ptr; }
+ // See comment in PassOwnArrayPtr.h for why this takes a const reference.
+ template<typename U> OwnArrayPtr(const PassOwnArrayPtr<U>& o);
- // FIXME: This should be removed and replaced with PassOwnArrayPtr.
- void set(T* ptr)
- {
- ASSERT(!ptr || m_ptr != ptr);
- T* oldPtr = m_ptr;
- m_ptr = ptr;
- safeDelete(oldPtr);
- }
+ // This copy constructor is used implicitly by gcc when it generates
+ // transients for assigning a PassOwnArrayPtr<T> object to a stack-allocated
+ // OwnArrayPtr<T> object. It should never be called explicitly and gcc
+ // should optimize away the constructor when generating code.
+ OwnArrayPtr(const OwnArrayPtr<T>&);
- void clear();
+ ~OwnArrayPtr() { deleteOwnedArrayPtr(m_ptr); }
- T& operator*() const { ASSERT(m_ptr); return *m_ptr; }
- T* operator->() const { ASSERT(m_ptr); return m_ptr; }
+ PtrType get() const { return m_ptr; }
- T& operator[](std::ptrdiff_t i) const { ASSERT(m_ptr); ASSERT(i >= 0); return m_ptr[i]; }
+ void clear();
+ PassOwnArrayPtr<T> release();
+ PtrType leakPtr() WARN_UNUSED_RETURN;
- bool operator!() const { return !m_ptr; }
+ T& operator*() const { ASSERT(m_ptr); return *m_ptr; }
+ PtrType operator->() const { ASSERT(m_ptr); return m_ptr; }
- // This conversion operator allows implicit conversion to bool but not to other integer types.
+ T& operator[](std::ptrdiff_t i) const { ASSERT(m_ptr); ASSERT(i >= 0); return m_ptr[i]; }
+
+ bool operator!() const { return !m_ptr; }
+
+ // This conversion operator allows implicit conversion to bool but not to other integer types.
#if COMPILER(WINSCW)
- operator bool() const { return m_ptr; }
+ operator bool() const { return m_ptr; }
#else
- typedef T* OwnArrayPtr::*UnspecifiedBoolType;
- operator UnspecifiedBoolType() const { return m_ptr ? &OwnArrayPtr::m_ptr : 0; }
+ typedef T* OwnArrayPtr::*UnspecifiedBoolType;
+ operator UnspecifiedBoolType() const { return m_ptr ? &OwnArrayPtr::m_ptr : 0; }
+#endif
+
+ OwnArrayPtr& operator=(const PassOwnArrayPtr<T>&);
+ template<typename U> OwnArrayPtr& operator=(const PassOwnArrayPtr<U>&);
+
+ void swap(OwnArrayPtr& o) { std::swap(m_ptr, o.m_ptr); }
+
+#ifdef LOOSE_OWN_ARRAY_PTR
+ explicit OwnArrayPtr(PtrType ptr) : m_ptr(ptr) { }
+ void set(PtrType);
+#endif
+
+private:
+ PtrType m_ptr;
+};
+
+template<typename T> template<typename U> inline OwnArrayPtr<T>::OwnArrayPtr(const PassOwnArrayPtr<U>& o)
+ : m_ptr(o.leakPtr())
+{
+}
+
+template<typename T> inline void OwnArrayPtr<T>::clear()
+{
+ PtrType ptr = m_ptr;
+ m_ptr = 0;
+ deleteOwnedArrayPtr(ptr);
+}
+
+template<typename T> inline PassOwnArrayPtr<T> OwnArrayPtr<T>::release()
+{
+ PtrType ptr = m_ptr;
+ m_ptr = 0;
+ return adoptArrayPtr(ptr);
+}
+
+template<typename T> inline typename OwnArrayPtr<T>::PtrType OwnArrayPtr<T>::leakPtr()
+{
+ PtrType ptr = m_ptr;
+ m_ptr = 0;
+ return ptr;
+}
+
+#ifdef LOOSE_OWN_ARRAY_PTR
+template<typename T> inline void OwnArrayPtr<T>::set(PtrType ptr)
+{
+ ASSERT(!ptr || m_ptr != ptr);
+ PtrType oldPtr = m_ptr;
+ m_ptr = ptr;
+ deleteOwnedPtr(oldPtr);
+}
#endif
- void swap(OwnArrayPtr& o) { std::swap(m_ptr, o.m_ptr); }
-
- private:
- static void safeDelete(T*);
-
- T* m_ptr;
- };
-
- template<typename T> inline void OwnArrayPtr<T>::clear()
- {
- T* ptr = m_ptr;
- m_ptr = 0;
- safeDelete(ptr);
- }
-
- template<typename T> inline void OwnArrayPtr<T>::safeDelete(T* ptr)
- {
- typedef char known[sizeof(T) ? 1 : -1];
- if (sizeof(known))
- delete [] ptr;
- }
-
- template <typename T> inline void swap(OwnArrayPtr<T>& a, OwnArrayPtr<T>& b) { a.swap(b); }
-
- template <typename T> inline T* getPtr(const OwnArrayPtr<T>& p)
- {
- return p.get();
- }
+template<typename T> inline OwnArrayPtr<T>& OwnArrayPtr<T>::operator=(const PassOwnArrayPtr<T>& o)
+{
+ PtrType ptr = m_ptr;
+ m_ptr = o.leakPtr();
+ ASSERT(!ptr || m_ptr != ptr);
+ deleteOwnedArrayPtr(ptr);
+ return *this;
+}
+
+template<typename T> template<typename U> inline OwnArrayPtr<T>& OwnArrayPtr<T>::operator=(const PassOwnArrayPtr<U>& o)
+{
+ PtrType ptr = m_ptr;
+ m_ptr = o.leakPtr();
+ ASSERT(!ptr || m_ptr != ptr);
+ deleteOwnedArrayPtr(ptr);
+ return *this;
+}
+
+template <typename T> inline void swap(OwnArrayPtr<T>& a, OwnArrayPtr<T>& b)
+{
+ a.swap(b);
+}
+
+template<typename T, typename U> inline bool operator==(const OwnArrayPtr<T>& a, U* b)
+{
+ return a.get() == b;
+}
+
+template<typename T, typename U> inline bool operator==(T* a, const OwnArrayPtr<U>& b)
+{
+ return a == b.get();
+}
+
+template<typename T, typename U> inline bool operator!=(const OwnArrayPtr<T>& a, U* b)
+{
+ return a.get() != b;
+}
+
+template<typename T, typename U> inline bool operator!=(T* a, const OwnArrayPtr<U>& b)
+{
+ return a != b.get();
+}
+
+template <typename T> inline T* getPtr(const OwnArrayPtr<T>& p)
+{
+ return p.get();
+}
} // namespace WTF
diff --git a/JavaScriptCore/wtf/OwnArrayPtrCommon.h b/JavaScriptCore/wtf/OwnArrayPtrCommon.h
new file mode 100644
index 0000000..0113aff
--- /dev/null
+++ b/JavaScriptCore/wtf/OwnArrayPtrCommon.h
@@ -0,0 +1,40 @@
+/*
+ * 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 WTF_OwnArrayPtrCommon_h
+#define WTF_OwnArrayPtrCommon_h
+
+namespace WTF {
+
+template<typename T> inline void deleteOwnedArrayPtr(T* ptr)
+{
+ typedef char known[sizeof(T) ? 1 : -1];
+ if (sizeof(known))
+ delete [] ptr;
+}
+
+} // namespace WTF
+
+#endif // WTF_OwnArrayPtrCommon_h
diff --git a/JavaScriptCore/wtf/PassOwnArrayPtr.h b/JavaScriptCore/wtf/PassOwnArrayPtr.h
new file mode 100644
index 0000000..597339c
--- /dev/null
+++ b/JavaScriptCore/wtf/PassOwnArrayPtr.h
@@ -0,0 +1,215 @@
+/*
+ * 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 INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WTF_PassOwnArrayPtr_h
+#define WTF_PassOwnArrayPtr_h
+
+#include "Assertions.h"
+#include "OwnArrayPtrCommon.h"
+#include "TypeTraits.h"
+
+// Remove this once we make all WebKit code compatible with stricter rules about PassOwnArrayPtr.
+#define LOOSE_PASS_OWN_ARRAY_PTR
+
+namespace WTF {
+
+template<typename T> class OwnArrayPtr;
+template<typename T> class PassOwnArrayPtr;
+template<typename T> PassOwnArrayPtr<T> adoptArrayPtr(T*);
+
+template<typename T> class PassOwnArrayPtr {
+public:
+ typedef T* PtrType;
+
+ PassOwnArrayPtr() : m_ptr(0) { }
+
+ // It somewhat breaks the type system to allow transfer of ownership out of
+ // a const PassOwnArrayPtr. However, it makes it much easier to work with PassOwnArrayPtr
+ // temporaries, and we don't have a need to use real const PassOwnArrayPtrs anyway.
+ PassOwnArrayPtr(const PassOwnArrayPtr& o) : m_ptr(o.leakPtr()) { }
+ template<typename U> PassOwnArrayPtr(const PassOwnArrayPtr<U>& o) : m_ptr(o.leakPtr()) { }
+
+ ~PassOwnArrayPtr() { deleteOwnedArrayPtr(m_ptr); }
+
+ PtrType get() const { return m_ptr; }
+
+ void clear();
+ PtrType leakPtr() const WARN_UNUSED_RETURN;
+
+ T& operator*() const { ASSERT(m_ptr); return *m_ptr; }
+ PtrType operator->() const { ASSERT(m_ptr); return m_ptr; }
+
+ bool operator!() const { return !m_ptr; }
+
+ // This conversion operator allows implicit conversion to bool but not to other integer types.
+#if COMPILER(WINSCW)
+ operator bool() const { return m_ptr; }
+#else
+ typedef PtrType PassOwnArrayPtr::*UnspecifiedBoolType;
+ operator UnspecifiedBoolType() const { return m_ptr ? &PassOwnArrayPtr::m_ptr : 0; }
+#endif
+
+ PassOwnArrayPtr& operator=(const PassOwnArrayPtr<T>&);
+ template<typename U> PassOwnArrayPtr& operator=(const PassOwnArrayPtr<U>&);
+
+ template<typename U> friend PassOwnArrayPtr<U> adoptArrayPtr(U*);
+
+#ifdef LOOSE_PASS_OWN_ARRAY_PTR
+ PassOwnArrayPtr(PtrType ptr) : m_ptr(ptr) { }
+ PassOwnArrayPtr& operator=(PtrType);
+#endif
+
+private:
+#ifndef LOOSE_PASS_OWN_ARRAY_PTR
+ explicit PassOwnArrayPtr(PtrType ptr) : m_ptr(ptr) { }
+#endif
+
+ mutable PtrType m_ptr;
+};
+
+template<typename T> inline void PassOwnArrayPtr<T>::clear()
+{
+ PtrType ptr = m_ptr;
+ m_ptr = 0;
+ deleteOwnedArrayPtr(ptr);
+}
+
+template<typename T> inline typename PassOwnArrayPtr<T>::PtrType PassOwnArrayPtr<T>::leakPtr() const
+{
+ PtrType ptr = m_ptr;
+ m_ptr = 0;
+ return ptr;
+}
+
+#ifdef LOOSE_PASS_OWN_ARRAY_PTR
+template<typename T> inline PassOwnArrayPtr<T>& PassOwnArrayPtr<T>::operator=(PtrType optr)
+{
+ PtrType ptr = m_ptr;
+ m_ptr = optr;
+ ASSERT(!ptr || m_ptr != ptr);
+ if (ptr)
+ deleteOwnedArrayPtr(ptr);
+ return *this;
+}
+#endif
+
+template<typename T> inline PassOwnArrayPtr<T>& PassOwnArrayPtr<T>::operator=(const PassOwnArrayPtr<T>& optr)
+{
+ PtrType ptr = m_ptr;
+ m_ptr = optr.leakPtr();
+ ASSERT(!ptr || m_ptr != ptr);
+ if (ptr)
+ deleteOwnedArrayPtr(ptr);
+ return *this;
+}
+
+template<typename T> template<typename U> inline PassOwnArrayPtr<T>& PassOwnArrayPtr<T>::operator=(const PassOwnArrayPtr<U>& optr)
+{
+ PtrType ptr = m_ptr;
+ m_ptr = optr.leakPtr();
+ ASSERT(!ptr || m_ptr != ptr);
+ if (ptr)
+ deleteOwnedArrayPtr(ptr);
+ return *this;
+}
+
+template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b)
+{
+ return a.get() == b.get();
+}
+
+template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, const OwnArrayPtr<U>& b)
+{
+ return a.get() == b.get();
+}
+
+template<typename T, typename U> inline bool operator==(const OwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b)
+{
+ return a.get() == b.get();
+}
+
+template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, U* b)
+{
+ return a.get() == b;
+}
+
+template<typename T, typename U> inline bool operator==(T* a, const PassOwnArrayPtr<U>& b)
+{
+ return a == b.get();
+}
+
+template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b)
+{
+ return a.get() != b.get();
+}
+
+template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, const OwnArrayPtr<U>& b)
+{
+ return a.get() != b.get();
+}
+
+template<typename T, typename U> inline bool operator!=(const OwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b)
+{
+ return a.get() != b.get();
+}
+
+template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, U* b)
+{
+ return a.get() != b;
+}
+
+template<typename T, typename U> inline bool operator!=(T* a, const PassOwnArrayPtr<U>& b)
+{
+ return a != b.get();
+}
+
+template<typename T> inline PassOwnArrayPtr<T> adoptArrayPtr(T* ptr)
+{
+ return PassOwnArrayPtr<T>(ptr);
+}
+
+template<typename T, typename U> inline PassOwnArrayPtr<T> static_pointer_cast(const PassOwnArrayPtr<U>& p)
+{
+ return adoptArrayPtr(static_cast<T*>(p.leakPtr()));
+}
+
+template<typename T, typename U> inline PassOwnArrayPtr<T> const_pointer_cast(const PassOwnArrayPtr<U>& p)
+{
+ return adoptArrayPtr(const_cast<T*>(p.leakPtr()));
+}
+
+template<typename T> inline T* getPtr(const PassOwnArrayPtr<T>& p)
+{
+ return p.get();
+}
+
+} // namespace WTF
+
+using WTF::PassOwnArrayPtr;
+using WTF::adoptArrayPtr;
+using WTF::const_pointer_cast;
+using WTF::static_pointer_cast;
+
+#endif // WTF_PassOwnArrayPtr_h
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 727616f..4fc0a64 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -520,7 +520,6 @@
/* PLATFORM(SKIA) for Win/Linux, CG/CI for Mac */
#if PLATFORM(CHROMIUM)
-#define ENABLE_HISTORY_ALWAYS_ASYNC 1
#if OS(DARWIN)
#define WTF_PLATFORM_CG 1
#define WTF_PLATFORM_CI 1
@@ -528,7 +527,6 @@
#define WTF_USE_CORE_TEXT 1
#else
#define WTF_PLATFORM_SKIA 1
-#define WTF_USE_GLES2_RENDERING 1
#endif
#endif
@@ -596,6 +594,7 @@
#endif
#define HAVE_READLINE 1
#define HAVE_RUNLOOP_TIMER 1
+#define ENABLE_FULLSCREEN_API 1
#endif /* PLATFORM(MAC) && !PLATFORM(IOS) */
#if PLATFORM(MAC)
@@ -617,6 +616,10 @@
#define WTF_PLATFORM_CF 1
#endif
+#if OS(DARWIN) && !defined(BUILDING_ON_TIGER) && !PLATFORM(GTK) && !PLATFORM(QT)
+#define ENABLE_PURGEABLE_MEMORY 1
+#endif
+
#if PLATFORM(IOS)
#define ENABLE_CONTEXT_MENUS 0
#define ENABLE_DRAG_SUPPORT 0
@@ -858,6 +861,14 @@
#define ENABLE_NETSCAPE_PLUGIN_API 1
#endif
+#if !defined(ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE)
+#define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0
+#endif
+
+#if !defined(ENABLE_PURGEABLE_MEMORY)
+#define ENABLE_PURGEABLE_MEMORY 0
+#endif
+
#if !defined(WTF_USE_PLUGIN_HOST_PROCESS)
#define WTF_USE_PLUGIN_HOST_PROCESS 0
#endif
@@ -917,6 +928,10 @@
#define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0
#endif
+#if !defined(ENABLE_FULLSCREEN_API)
+#define ENABLE_FULLSCREEN_API 0
+#endif
+
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
|| (CPU(IA64) && !CPU(IA64_32)) \
@@ -1118,4 +1133,8 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define ENABLE_BRANCH_COMPACTION 1
#endif
+#if PLATFORM(GTK)
+#include "GtkTypedefs.h"
+#endif
+
#endif /* WTF_Platform_h */
diff --git a/JavaScriptCore/wtf/TCPageMap.h b/JavaScriptCore/wtf/TCPageMap.h
index 3f56c24..99bdc40 100644
--- a/JavaScriptCore/wtf/TCPageMap.h
+++ b/JavaScriptCore/wtf/TCPageMap.h
@@ -72,7 +72,7 @@ class TCMalloc_PageMap1 {
// Ensure that the map contains initialized entries "x .. x+n-1".
// Returns true if successful, false if we could not allocate memory.
- bool Ensure(Number x, size_t n) {
+ bool Ensure(Number, size_t) {
// Nothing to do since flat array was allocate at start
return true;
}
diff --git a/JavaScriptCore/wtf/ThreadSpecific.h b/JavaScriptCore/wtf/ThreadSpecific.h
index 893f561..93ed466 100644
--- a/JavaScriptCore/wtf/ThreadSpecific.h
+++ b/JavaScriptCore/wtf/ThreadSpecific.h
@@ -67,12 +67,17 @@ public:
T* operator->();
operator T*();
T& operator*();
- ~ThreadSpecific();
private:
#if !USE(PTHREADS) && !PLATFORM(QT) && !PLATFORM(GTK) && OS(WINDOWS)
friend void ThreadSpecificThreadExit();
#endif
+
+ // Not implemented. It's technically possible to destroy a thread specific key, but one would need
+ // to make sure that all values have been destroyed already (usually, that all threads that used it
+ // have exited). It's unlikely that any user of this call will be in that situation - and having
+ // a destructor defined can be confusing, given that it has such strong pre-requisites to work correctly.
+ ~ThreadSpecific();
T* get();
void set(T*);
@@ -116,11 +121,6 @@ inline ThreadSpecific<T>::ThreadSpecific()
}
template<typename T>
-inline ThreadSpecific<T>::~ThreadSpecific()
-{
-}
-
-template<typename T>
inline T* ThreadSpecific<T>::get()
{
return m_value;
@@ -143,12 +143,6 @@ inline ThreadSpecific<T>::ThreadSpecific()
}
template<typename T>
-inline ThreadSpecific<T>::~ThreadSpecific()
-{
- pthread_key_delete(m_key); // Does not invoke destructor functions.
-}
-
-template<typename T>
inline T* ThreadSpecific<T>::get()
{
Data* data = static_cast<Data*>(pthread_getspecific(m_key));
@@ -170,12 +164,6 @@ inline ThreadSpecific<T>::ThreadSpecific()
}
template<typename T>
-inline ThreadSpecific<T>::~ThreadSpecific()
-{
- // Does not invoke destructor functions. QThreadStorage will do it
-}
-
-template<typename T>
inline T* ThreadSpecific<T>::get()
{
Data* data = static_cast<Data*>(m_key.localData());
@@ -199,12 +187,6 @@ inline ThreadSpecific<T>::ThreadSpecific()
}
template<typename T>
-inline ThreadSpecific<T>::~ThreadSpecific()
-{
- g_static_private_free(&m_key);
-}
-
-template<typename T>
inline T* ThreadSpecific<T>::get()
{
Data* data = static_cast<Data*>(g_static_private_get(&m_key));
diff --git a/JavaScriptCore/wtf/ThreadingPrimitives.h b/JavaScriptCore/wtf/ThreadingPrimitives.h
index 66801c0..c11a6cb 100644
--- a/JavaScriptCore/wtf/ThreadingPrimitives.h
+++ b/JavaScriptCore/wtf/ThreadingPrimitives.h
@@ -45,8 +45,6 @@
#include <pthread.h>
#elif PLATFORM(GTK)
#include "GOwnPtr.h"
-typedef struct _GMutex GMutex;
-typedef struct _GCond GCond;
#endif
#if PLATFORM(QT)
diff --git a/JavaScriptCore/wtf/UnusedParam.h b/JavaScriptCore/wtf/UnusedParam.h
index 996f5c8..6ff6fd8 100644
--- a/JavaScriptCore/wtf/UnusedParam.h
+++ b/JavaScriptCore/wtf/UnusedParam.h
@@ -24,6 +24,14 @@
/* don't use this for C++, it should only be used in plain C files or
ObjC methods, where leaving off the parameter name is not allowed. */
-#define UNUSED_PARAM(x) (void)x
+#include "Platform.h"
+
+#if COMPILER(INTEL) && !OS(WINDOWS) || COMPILER(RVCT)
+template<typename T>
+inline void unusedParam(T& x) { (void)x; }
+#define UNUSED_PARAM(variable) unusedParam(variable)
+#else
+#define UNUSED_PARAM(variable) (void)variable
+#endif
#endif /* WTF_UnusedParam_h */
diff --git a/JavaScriptCore/wtf/Vector3.h b/JavaScriptCore/wtf/Vector3.h
index 3c40b61..1850929 100644
--- a/JavaScriptCore/wtf/Vector3.h
+++ b/JavaScriptCore/wtf/Vector3.h
@@ -26,12 +26,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Vector3_h
-#define Vector3_h
+#ifndef WTF_Vector3_h
+#define WTF_Vector3_h
#include <math.h>
-namespace WebCore {
+namespace WTF {
class Vector3 {
public:
@@ -133,6 +133,6 @@ inline double distance(const Vector3& v1, const Vector3& v2)
return (v1 - v2).abs();
}
-} // WebCore
+} // WTF
-#endif // Vector3_h
+#endif // WTF_Vector3_h
diff --git a/JavaScriptCore/wtf/WTFThreadData.cpp b/JavaScriptCore/wtf/WTFThreadData.cpp
index 729b48e..702baed 100644
--- a/JavaScriptCore/wtf/WTFThreadData.cpp
+++ b/JavaScriptCore/wtf/WTFThreadData.cpp
@@ -43,6 +43,8 @@ WTFThreadData::WTFThreadData()
, m_currentIdentifierTable(m_defaultIdentifierTable)
#endif
{
+ char sample = 0;
+ m_approximatedStackStart = &sample;
}
WTFThreadData::~WTFThreadData()
diff --git a/JavaScriptCore/wtf/WTFThreadData.h b/JavaScriptCore/wtf/WTFThreadData.h
index c596260..20ffaca 100644
--- a/JavaScriptCore/wtf/WTFThreadData.h
+++ b/JavaScriptCore/wtf/WTFThreadData.h
@@ -112,6 +112,11 @@ public:
}
#endif
+ char* approximatedStackStart() const
+ {
+ return m_approximatedStackStart;
+ }
+
private:
AtomicStringTable* m_atomicStringTable;
AtomicStringTableDestructor m_atomicStringTableDestructor;
@@ -128,6 +133,8 @@ private:
#endif
friend WTFThreadData& wtfThreadData();
friend class AtomicStringTable;
+
+ char* m_approximatedStackStart;
};
inline WTFThreadData& wtfThreadData()
diff --git a/JavaScriptCore/wtf/dtoa.cpp b/JavaScriptCore/wtf/dtoa.cpp
index 88e5692..298bb27 100644
--- a/JavaScriptCore/wtf/dtoa.cpp
+++ b/JavaScriptCore/wtf/dtoa.cpp
@@ -3,7 +3,7 @@
* The author of this software is David M. Gay.
*
* Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
- * Copyright (C) 2002, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2002, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
@@ -18,14 +18,8 @@
*
***************************************************************/
-/* Please send bug reports to
- David M. Gay
- Bell Laboratories, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-0636
- U.S.A.
- dmg@bell-labs.com
- */
+/* Please send bug reports to David M. Gay (dmg at acm dot org,
+ * with " at " changed at "@" and " dot " changed to "."). */
/* On a machine with IEEE extended-precision registers, it is
* necessary to specify double-precision (53-bit) rounding precision
@@ -50,7 +44,7 @@
*
* Modifications:
*
- * 1. We only require IEEE.
+ * 1. We only require IEEE double-precision arithmetic (not IEEE double-extended).
* 2. We get by with floating-point arithmetic in a case that
* Clinger missed -- when we're computing d * 10^n
* for a small integer d and the integer n is not too
@@ -67,64 +61,13 @@
* for 0 <= k <= 22).
*/
-/*
- * #define IEEE_8087 for IEEE-arithmetic machines where the least
- * significant byte has the lowest address.
- * #define IEEE_MC68k for IEEE-arithmetic machines where the most
- * significant byte has the lowest address.
- * #define No_leftright to omit left-right logic in fast floating-point
- * computation of dtoa.
- * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3
- * and Honor_FLT_ROUNDS is not #defined.
- * #define Inaccurate_Divide for IEEE-format with correctly rounded
- * products but inaccurate quotients, e.g., for Intel i860.
- * #define USE_LONG_LONG on machines that have a "long long"
- * integer type (of >= 64 bits), and performance testing shows that
- * it is faster than 32-bit fallback (which is often not the case
- * on 32-bit machines). On such machines, you can #define Just_16
- * to store 16 bits per 32-bit int32_t when doing high-precision integer
- * arithmetic. Whether this speeds things up or slows things down
- * depends on the machine and the number being converted.
- * #define Bad_float_h if your system lacks a float.h or if it does not
- * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
- * FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
- * #define NO_IEEE_Scale to disable new (Feb. 1997) logic in strtod that
- * avoids underflows on inputs whose result does not underflow.
- * If you #define NO_IEEE_Scale on a machine that uses IEEE-format
- * floating-point numbers and flushes underflows to zero rather
- * than implementing gradual underflow, then you must also #define
- * Sudden_Underflow.
- * #define YES_ALIAS to permit aliasing certain double values with
- * arrays of ULongs. This leads to slightly better code with
- * some compilers and was always used prior to 19990916, but it
- * is not strictly legal and can cause trouble with aggressively
- * optimizing compilers (e.g., gcc 2.95.1 under -O2).
- * #define SET_INEXACT if IEEE arithmetic is being used and extra
- * computation should be done to set the inexact flag when the
- * result is inexact and avoid setting inexact when the result
- * is exact. In this case, dtoa.c must be compiled in
- * an environment, perhaps provided by #include "dtoa.c" in a
- * suitable wrapper, that defines two functions,
- * int get_inexact(void);
- * void clear_inexact(void);
- * such that get_inexact() returns a nonzero value if the
- * inexact bit is already set, and clear_inexact() sets the
- * inexact bit to 0. When SET_INEXACT is #defined, strtod
- * also does extra computations to set the underflow and overflow
- * flags when appropriate (i.e., when the result is tiny and
- * inexact or when it is a numeric value rounded to +-infinity).
- * #define NO_ERRNO if strtod should not assign errno = ERANGE when
- * the result overflows to +-Infinity or underflows to 0.
- */
-
#include "config.h"
#include "dtoa.h"
#if HAVE(ERRNO_H)
#include <errno.h>
-#else
-#define NO_ERRNO
#endif
+#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
@@ -132,9 +75,11 @@
#include <string.h>
#include <wtf/AlwaysInline.h>
#include <wtf/Assertions.h>
+#include <wtf/DecimalNumber.h>
#include <wtf/FastMalloc.h>
#include <wtf/MathExtras.h>
#include <wtf/Threading.h>
+#include <wtf/UnusedParam.h>
#include <wtf/Vector.h>
#if COMPILER(MSVC)
@@ -143,18 +88,6 @@
#pragma warning(disable: 4554)
#endif
-#if CPU(BIG_ENDIAN)
-#define IEEE_MC68k
-#elif CPU(MIDDLE_ENDIAN)
-#define IEEE_ARM
-#else
-#define IEEE_8087
-#endif
-
-#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(IEEE_ARM) != 1
-Exactly one of IEEE_8087, IEEE_ARM or IEEE_MC68k should be defined.
-#endif
-
namespace WTF {
#if ENABLE(JSC_MULTIPLE_THREADS)
@@ -166,25 +99,14 @@ typedef union {
uint32_t L[2];
} U;
-#ifdef YES_ALIAS
-#define dval(x) x
-#ifdef IEEE_8087
-#define word0(x) ((uint32_t*)&x)[1]
-#define word1(x) ((uint32_t*)&x)[0]
-#else
-#define word0(x) ((uint32_t*)&x)[0]
-#define word1(x) ((uint32_t*)&x)[1]
-#endif
+#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)
+#define word0(x) (x)->L[0]
+#define word1(x) (x)->L[1]
#else
-#ifdef IEEE_8087
#define word0(x) (x)->L[1]
#define word1(x) (x)->L[0]
-#else
-#define word0(x) (x)->L[0]
-#define word1(x) (x)->L[1]
#endif
#define dval(x) (x)->d
-#endif
/* The following definition of Storeinc is appropriate for MIPS processors.
* An alternative that might be better on some machines is
@@ -193,12 +115,12 @@ typedef union {
static ALWAYS_INLINE uint32_t* storeInc(uint32_t* p, uint16_t high, uint16_t low)
{
uint16_t* p16 = reinterpret_cast<uint16_t*>(p);
-#if defined(IEEE_8087) || defined(IEEE_ARM)
- p16[1] = high;
- p16[0] = low;
-#else
+#if CPU(BIG_ENDIAN)
p16[0] = high;
p16[1] = low;
+#else
+ p16[1] = high;
+ p16[0] = low;
#endif
return p + 1;
}
@@ -228,51 +150,18 @@ static ALWAYS_INLINE uint32_t* storeInc(uint32_t* p, uint16_t high, uint16_t low
#define Quick_max 14
#define Int_max 14
-#if !defined(NO_IEEE_Scale)
-#undef Avoid_Underflow
-#define Avoid_Underflow
-#endif
-
-#if !defined(Flt_Rounds)
-#if defined(FLT_ROUNDS)
-#define Flt_Rounds FLT_ROUNDS
-#else
-#define Flt_Rounds 1
-#endif
-#endif /* Flt_Rounds */
-
-
#define rounded_product(a, b) a *= b
#define rounded_quotient(a, b) a /= b
#define Big0 (Frac_mask1 | Exp_msk1 * (DBL_MAX_EXP + Bias - 1))
#define Big1 0xffffffff
-
-// FIXME: we should remove non-Pack_32 mode since it is unused and unmaintained
-#ifndef Pack_32
-#define Pack_32
-#endif
-
#if CPU(PPC64) || CPU(X86_64)
// FIXME: should we enable this on all 64-bit CPUs?
// 64-bit emulation provided by the compiler is likely to be slower than dtoa own code on 32-bit hardware.
#define USE_LONG_LONG
#endif
-#ifndef USE_LONG_LONG
-#ifdef Just_16
-#undef Pack_32
-/* When Pack_32 is not defined, we store 16 bits per 32-bit int32_t.
- * This makes some inner loops simpler and sometimes saves work
- * during multiplications, but it often seems to make things slightly
- * slower. Hence the default is now to store 32 bits per int32_t.
- */
-#endif
-#endif
-
-#define Kmax 15
-
struct BigInt {
BigInt() : sign(0) { }
int sign;
@@ -282,7 +171,7 @@ struct BigInt {
sign = 0;
m_words.clear();
}
-
+
size_t size() const
{
return m_words.size();
@@ -292,7 +181,7 @@ struct BigInt {
{
m_words.resize(s);
}
-
+
uint32_t* words()
{
return m_words.data();
@@ -302,12 +191,12 @@ struct BigInt {
{
return m_words.data();
}
-
+
void append(uint32_t w)
{
m_words.append(w);
}
-
+
Vector<uint32_t, 16> m_words;
};
@@ -329,17 +218,11 @@ static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */
carry = y >> 32;
*x++ = (uint32_t)y & 0xffffffffUL;
#else
-#ifdef Pack_32
uint32_t xi = *x;
uint32_t y = (xi & 0xffff) * m + carry;
uint32_t z = (xi >> 16) * m + (y >> 16);
carry = z >> 16;
*x++ = (z << 16) + (y & 0xffff);
-#else
- uint32_t y = *x * m + carry;
- carry = y >> 16;
- *x++ = y & 0xffff;
-#endif
#endif
} while (++i < wds);
@@ -349,20 +232,9 @@ static void multadd(BigInt& b, int m, int a) /* multiply by m and add a */
static void s2b(BigInt& b, const char* s, int nd0, int nd, uint32_t y9)
{
- int k;
- int32_t y;
- int32_t x = (nd + 8) / 9;
-
- for (k = 0, y = 1; x > y; y <<= 1, k++) { }
-#ifdef Pack_32
b.sign = 0;
b.resize(1);
b.words()[0] = y9;
-#else
- b.sign = 0;
- b.resize((b->x[1] = y9 >> 16) ? 2 : 1);
- b.words()[0] = y9 & 0xffff;
-#endif
int i = 9;
if (9 < nd0) {
@@ -440,7 +312,7 @@ static int lo0bits(uint32_t* y)
if (!(x & 1)) {
k++;
x >>= 1;
- if (!x & 1)
+ if (!x)
return 32;
}
*y = x;
@@ -479,7 +351,7 @@ static void mult(BigInt& aRef, const BigInt& bRef)
a = b;
b = tmp;
}
-
+
wa = a->size();
wb = b->size();
wc = wa + wb;
@@ -507,7 +379,6 @@ static void mult(BigInt& aRef, const BigInt& bRef)
}
}
#else
-#ifdef Pack_32
for (; xb < xbe; xb++, xc0++) {
if ((y = *xb & 0xffff)) {
x = xa;
@@ -537,21 +408,6 @@ static void mult(BigInt& aRef, const BigInt& bRef)
*xc = z2;
}
}
-#else
- for (; xb < xbe; xc0++) {
- if ((y = *xb++)) {
- x = xa;
- xc = xc0;
- carry = 0;
- do {
- z = *x++ * y + *xc + carry;
- carry = z >> 16;
- *xc++ = z & 0xffff;
- } while (x < xae);
- *xc = carry;
- }
- }
-#endif
#endif
for (xc0 = c.words(), xc = xc0 + wc; wc > 0 && !*--xc; --wc) { }
c.resize(wc);
@@ -562,7 +418,7 @@ struct P5Node : Noncopyable {
BigInt val;
P5Node* next;
};
-
+
static P5Node* p5s;
static int p5sCount;
@@ -615,7 +471,7 @@ static ALWAYS_INLINE void pow5mult(BigInt& b, int k)
mult(p5->next->val, p5->next->val);
++p5sCount;
}
-
+
p5sCountLocal = p5sCount;
#if ENABLE(JSC_MULTIPLE_THREADS)
s_dtoaP5Mutex->unlock();
@@ -627,11 +483,7 @@ static ALWAYS_INLINE void pow5mult(BigInt& b, int k)
static ALWAYS_INLINE void lshift(BigInt& b, int k)
{
-#ifdef Pack_32
int n = k >> 5;
-#else
- int n = k >> 4;
-#endif
int origSize = b.size();
int n1 = n + origSize + 1;
@@ -645,7 +497,6 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k)
uint32_t* dstStart = b.words();
const uint32_t* src = srcStart + origSize - 1;
uint32_t* dst = dstStart + n1 - 1;
-#ifdef Pack_32
if (k) {
uint32_t hiSubword = 0;
int s = 32 - k;
@@ -658,19 +509,6 @@ static ALWAYS_INLINE void lshift(BigInt& b, int k)
b.resize(origSize + n + !!b.words()[n1 - 1]);
}
-#else
- if (k &= 0xf) {
- uint32_t hiSubword = 0;
- int s = 16 - k;
- for (; src >= srcStart; --src) {
- *dst-- = hiSubword | *src >> s;
- hiSubword = (*src << k) & 0xffff;
- }
- *dst = hiSubword;
- ASSERT(dst == dstStart + n);
- result->wds = b->wds + n + !!result->x[n1 - 1];
- }
-#endif
else {
do {
*--dst = *src--;
@@ -752,7 +590,6 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef
}
#else
uint32_t borrow = 0;
-#ifdef Pack_32
do {
uint32_t y = (*xa & 0xffff) - (*xb & 0xffff) - borrow;
borrow = (y & 0x10000) >> 16;
@@ -767,18 +604,6 @@ static ALWAYS_INLINE void diff(BigInt& c, const BigInt& aRef, const BigInt& bRef
borrow = (z & 0x10000) >> 16;
xc = storeInc(xc, z, y);
}
-#else
- do {
- uint32_t y = *xa++ - *xb++ - borrow;
- borrow = (y & 0x10000) >> 16;
- *xc++ = y & 0xffff;
- } while (xb < xbe);
- while (xa < xae) {
- uint32_t y = *xa++ - borrow;
- borrow = (y & 0x10000) >> 16;
- *xc++ = y & 0xffff;
- }
-#endif
#endif
while (!*--xc)
wa--;
@@ -791,28 +616,8 @@ static double ulp(U *x)
U u;
L = (word0(x) & Exp_mask) - (P - 1) * Exp_msk1;
-#ifndef Avoid_Underflow
-#ifndef Sudden_Underflow
- if (L > 0) {
-#endif
-#endif
word0(&u) = L;
word1(&u) = 0;
-#ifndef Avoid_Underflow
-#ifndef Sudden_Underflow
- } else {
- L = -L >> Exp_shift;
- if (L < Exp_shift) {
- word0(&u) = 0x80000 >> L;
- word1(&u) = 0;
- } else {
- word0(&u) = 0;
- L -= Exp_shift;
- word1(&u) = L >= 31 ? 1 : 1 << 31 - L;
- }
- }
-#endif
-#endif
return dval(&u);
}
@@ -835,7 +640,6 @@ static double b2d(const BigInt& a, int* e)
ASSERT(y);
k = hi0bits(y);
*e = 32 - k;
-#ifdef Pack_32
if (k < Ebits) {
d0 = Exp_1 | (y >> (Ebits - k));
w = xa > xa0 ? *--xa : 0;
@@ -851,22 +655,6 @@ static double b2d(const BigInt& a, int* e)
d0 = Exp_1 | y;
d1 = z;
}
-#else
- if (k < Ebits + 16) {
- z = xa > xa0 ? *--xa : 0;
- d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
- w = xa > xa0 ? *--xa : 0;
- y = xa > xa0 ? *--xa : 0;
- d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
- goto returnD;
- }
- z = xa > xa0 ? *--xa : 0;
- w = xa > xa0 ? *--xa : 0;
- k -= Ebits + 16;
- d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
- y = xa > xa0 ? *--xa : 0;
- d1 = w << k + 16 | y << k;
-#endif
returnD:
#undef d0
#undef d1
@@ -878,104 +666,44 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits)
int de, k;
uint32_t* x;
uint32_t y, z;
-#ifndef Sudden_Underflow
int i;
-#endif
#define d0 word0(d)
#define d1 word1(d)
b.sign = 0;
-#ifdef Pack_32
b.resize(1);
-#else
- b.resize(2);
-#endif
x = b.words();
z = d0 & Frac_mask;
d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
-#ifdef Sudden_Underflow
- de = (int)(d0 >> Exp_shift);
-#else
if ((de = (int)(d0 >> Exp_shift)))
z |= Exp_msk1;
-#endif
-#ifdef Pack_32
if ((y = d1)) {
if ((k = lo0bits(&y))) {
x[0] = y | (z << (32 - k));
z >>= k;
} else
x[0] = y;
- if (z) {
- b.resize(2);
- x[1] = z;
- }
+ if (z) {
+ b.resize(2);
+ x[1] = z;
+ }
-#ifndef Sudden_Underflow
i = b.size();
-#endif
} else {
k = lo0bits(&z);
x[0] = z;
-#ifndef Sudden_Underflow
i = 1;
-#endif
b.resize(1);
k += 32;
}
-#else
- if ((y = d1)) {
- if ((k = lo0bits(&y))) {
- if (k >= 16) {
- x[0] = y | z << 32 - k & 0xffff;
- x[1] = z >> k - 16 & 0xffff;
- x[2] = z >> k;
- i = 2;
- } else {
- x[0] = y & 0xffff;
- x[1] = y >> 16 | z << 16 - k & 0xffff;
- x[2] = z >> k & 0xffff;
- x[3] = z >> k + 16;
- i = 3;
- }
- } else {
- x[0] = y & 0xffff;
- x[1] = y >> 16;
- x[2] = z & 0xffff;
- x[3] = z >> 16;
- i = 3;
- }
- } else {
- k = lo0bits(&z);
- if (k >= 16) {
- x[0] = z;
- i = 0;
- } else {
- x[0] = z & 0xffff;
- x[1] = z >> 16;
- i = 1;
- }
- k += 32;
- } while (!x[i])
- --i;
- b->resize(i + 1);
-#endif
-#ifndef Sudden_Underflow
if (de) {
-#endif
*e = de - Bias - (P - 1) + k;
*bits = P - k;
-#ifndef Sudden_Underflow
} else {
*e = de - Bias - (P - 1) + 1 + k;
-#ifdef Pack_32
*bits = (32 * i) - hi0bits(x[i - 1]);
-#else
- *bits = (i + 2) * 16 - hi0bits(x[i]);
-#endif
}
-#endif
}
#undef d0
#undef d1
@@ -987,11 +715,7 @@ static double ratio(const BigInt& a, const BigInt& b)
dval(&da) = b2d(a, &ka);
dval(&db) = b2d(b, &kb);
-#ifdef Pack_32
k = ka - kb + 32 * (a.size() - b.size());
-#else
- k = ka - kb + 16 * (a.size() - b.size());
-#endif
if (k > 0)
word0(&da) += k * Exp_msk1;
else {
@@ -1002,19 +726,15 @@ static double ratio(const BigInt& a, const BigInt& b)
}
static const double tens[] = {
- 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
- 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
- 1e20, 1e21, 1e22
+ 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
+ 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
+ 1e20, 1e21, 1e22
};
static const double bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
-#ifdef Avoid_Underflow
- 9007199254740992. * 9007199254740992.e-256
- /* = 2^106 * 1e-53 */
-#else
- 1e-256
-#endif
+ 9007199254740992. * 9007199254740992.e-256
+ /* = 2^106 * 1e-256 */
};
/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */
@@ -1024,20 +744,15 @@ static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128,
double strtod(const char* s00, char** se)
{
-#ifdef Avoid_Underflow
int scale;
-#endif
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
- e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
+ e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
const char *s, *s0, *s1;
double aadj, aadj1;
U aadj2, adj, rv, rv0;
int32_t L;
uint32_t y, z;
BigInt bb, bb1, bd, bd0, bs, delta;
-#ifdef SET_INEXACT
- int inexact, oldinexact;
-#endif
sign = nz0 = nz = 0;
dval(&rv) = 0;
@@ -1163,14 +878,9 @@ ret0:
nd0 = nd;
k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1;
dval(&rv) = y;
- if (k > 9) {
-#ifdef SET_INEXACT
- if (k > DBL_DIG)
- oldinexact = get_inexact();
-#endif
+ if (k > 9)
dval(&rv) = tens[k - 9] * dval(&rv) + z;
- }
- if (nd <= DBL_DIG && Flt_Rounds == 1) {
+ if (nd <= DBL_DIG) {
if (!e)
goto ret;
if (e > 0) {
@@ -1188,24 +898,14 @@ ret0:
/* rv = */ rounded_product(dval(&rv), tens[e]);
goto ret;
}
- }
-#ifndef Inaccurate_Divide
- else if (e >= -Ten_pmax) {
+ } else if (e >= -Ten_pmax) {
/* rv = */ rounded_quotient(dval(&rv), tens[-e]);
goto ret;
}
-#endif
}
e1 += nd - k;
-#ifdef SET_INEXACT
- inexact = 1;
- if (k <= DBL_DIG)
- oldinexact = get_inexact();
-#endif
-#ifdef Avoid_Underflow
scale = 0;
-#endif
/* Get starting approximation = rv * 10**e1 */
@@ -1215,17 +915,12 @@ ret0:
if (e1 &= ~15) {
if (e1 > DBL_MAX_10_EXP) {
ovfl:
-#ifndef NO_ERRNO
+#if HAVE(ERRNO_H)
errno = ERANGE;
#endif
/* Can't trust HUGE_VAL */
word0(&rv) = Exp_mask;
word1(&rv) = 0;
-#ifdef SET_INEXACT
- /* set overflow bit */
- dval(&rv0) = 1e300;
- dval(&rv0) *= dval(&rv0);
-#endif
goto ret;
}
e1 >>= 4;
@@ -1252,50 +947,30 @@ ovfl:
if (e1 >>= 4) {
if (e1 >= 1 << n_bigtens)
goto undfl;
-#ifdef Avoid_Underflow
if (e1 & Scale_Bit)
scale = 2 * P;
for (j = 0; e1 > 0; j++, e1 >>= 1)
if (e1 & 1)
dval(&rv) *= tinytens[j];
if (scale && (j = (2 * P) + 1 - ((word0(&rv) & Exp_mask) >> Exp_shift)) > 0) {
- /* scaled rv is denormal; zap j low bits */
+ /* scaled rv is denormal; clear j low bits */
if (j >= 32) {
word1(&rv) = 0;
if (j >= 53)
- word0(&rv) = (P + 2) * Exp_msk1;
+ word0(&rv) = (P + 2) * Exp_msk1;
else
- word0(&rv) &= 0xffffffff << (j - 32);
+ word0(&rv) &= 0xffffffff << (j - 32);
} else
word1(&rv) &= 0xffffffff << j;
}
-#else
- for (j = 0; e1 > 1; j++, e1 >>= 1)
- if (e1 & 1)
- dval(&rv) *= tinytens[j];
- /* The last multiplication could underflow. */
- dval(&rv0) = dval(&rv);
- dval(&rv) *= tinytens[j];
- if (!dval(&rv)) {
- dval(&rv) = 2. * dval(&rv0);
- dval(&rv) *= tinytens[j];
-#endif
if (!dval(&rv)) {
undfl:
dval(&rv) = 0.;
-#ifndef NO_ERRNO
+#if HAVE(ERRNO_H)
errno = ERANGE;
#endif
goto ret;
}
-#ifndef Avoid_Underflow
- word0(&rv) = Tiny0;
- word1(&rv) = Tiny1;
- /* The refinement below will clean
- * this approximation up.
- */
- }
-#endif
}
}
@@ -1322,30 +997,15 @@ undfl:
else
bd2 -= bbe;
bs2 = bb2;
-#ifdef Avoid_Underflow
j = bbe - scale;
i = j + bbbits - 1; /* logb(rv) */
if (i < Emin) /* denormal */
j += P - Emin;
else
j = P + 1 - bbbits;
-#else /*Avoid_Underflow*/
-#ifdef Sudden_Underflow
- j = P + 1 - bbbits;
-#else /*Sudden_Underflow*/
- j = bbe;
- i = j + bbbits - 1; /* logb(rv) */
- if (i < Emin) /* denormal */
- j += P - Emin;
- else
- j = P + 1 - bbbits;
-#endif /*Sudden_Underflow*/
-#endif /*Avoid_Underflow*/
bb2 += j;
bd2 += j;
-#ifdef Avoid_Underflow
bd2 += scale;
-#endif
i = bb2 < bd2 ? bb2 : bd2;
if (i > bs2)
i = bs2;
@@ -1376,23 +1036,12 @@ undfl:
* special case of mantissa a power of two.
*/
if (dsign || word1(&rv) || word0(&rv) & Bndry_mask
-#ifdef Avoid_Underflow
|| (word0(&rv) & Exp_mask) <= (2 * P + 1) * Exp_msk1
-#else
- || (word0(&rv) & Exp_mask) <= Exp_msk1
-#endif
) {
-#ifdef SET_INEXACT
- if (!delta->words()[0] && delta->size() <= 1)
- inexact = 0;
-#endif
break;
}
if (!delta.words()[0] && delta.size() <= 1) {
/* exact result */
-#ifdef SET_INEXACT
- inexact = 0;
-#endif
break;
}
lshift(delta, Log2P);
@@ -1405,33 +1054,18 @@ undfl:
if (dsign) {
if ((word0(&rv) & Bndry_mask1) == Bndry_mask1
&& word1(&rv) == (
-#ifdef Avoid_Underflow
(scale && (y = word0(&rv) & Exp_mask) <= 2 * P * Exp_msk1)
? (0xffffffff & (0xffffffff << (2 * P + 1 - (y >> Exp_shift)))) :
-#endif
0xffffffff)) {
/*boundary case -- increment exponent*/
word0(&rv) = (word0(&rv) & Exp_mask) + Exp_msk1;
word1(&rv) = 0;
-#ifdef Avoid_Underflow
dsign = 0;
-#endif
break;
}
} else if (!(word0(&rv) & Bndry_mask) && !word1(&rv)) {
dropDown:
/* boundary case -- decrement exponent */
-#ifdef Sudden_Underflow /*{{*/
- L = word0(&rv) & Exp_mask;
-#ifdef Avoid_Underflow
- if (L <= (scale ? (2 * P + 1) * Exp_msk1 : Exp_msk1))
-#else
- if (L <= Exp_msk1)
-#endif /*Avoid_Underflow*/
- goto undfl;
- L -= Exp_msk1;
-#else /*Sudden_Underflow}{*/
-#ifdef Avoid_Underflow
if (scale) {
L = word0(&rv) & Exp_mask;
if (L <= (2 * P + 1) * Exp_msk1) {
@@ -1443,9 +1077,7 @@ dropDown:
goto undfl;
}
}
-#endif /*Avoid_Underflow*/
L = (word0(&rv) & Exp_mask) - Exp_msk1;
-#endif /*Sudden_Underflow}}*/
word0(&rv) = L | Bndry_mask1;
word1(&rv) = 0xffffffff;
break;
@@ -1456,24 +1088,18 @@ dropDown:
dval(&rv) += ulp(&rv);
else {
dval(&rv) -= ulp(&rv);
-#ifndef Sudden_Underflow
if (!dval(&rv))
goto undfl;
-#endif
}
-#ifdef Avoid_Underflow
dsign = 1 - dsign;
-#endif
break;
}
if ((aadj = ratio(delta, bs)) <= 2.) {
if (dsign)
aadj = aadj1 = 1.;
else if (word1(&rv) || word0(&rv) & Bndry_mask) {
-#ifndef Sudden_Underflow
if (word1(&rv) == Tiny1 && !word0(&rv))
goto undfl;
-#endif
aadj = 1.;
aadj1 = -1.;
} else {
@@ -1489,19 +1115,6 @@ dropDown:
} else {
aadj *= 0.5;
aadj1 = dsign ? aadj : -aadj;
-#ifdef Check_FLT_ROUNDS
- switch (Rounding) {
- case 2: /* towards +infinity */
- aadj1 -= 0.5;
- break;
- case 0: /* towards 0 */
- case 3: /* towards -infinity */
- aadj1 += 0.5;
- }
-#else
- if (!Flt_Rounds)
- aadj1 += 0.5;
-#endif /*Check_FLT_ROUNDS*/
}
y = word0(&rv) & Exp_mask;
@@ -1521,7 +1134,6 @@ dropDown:
}
word0(&rv) += P * Exp_msk1;
} else {
-#ifdef Avoid_Underflow
if (scale && y <= 2 * P * Exp_msk1) {
if (aadj <= 0x7fffffff) {
if ((z = (uint32_t)aadj) <= 0)
@@ -1535,49 +1147,9 @@ dropDown:
}
adj.d = aadj1 * ulp(&rv);
dval(&rv) += adj.d;
-#else
-#ifdef Sudden_Underflow
- if ((word0(&rv) & Exp_mask) <= P * Exp_msk1) {
- dval(&rv0) = dval(&rv);
- word0(&rv) += P * Exp_msk1;
- adj.d = aadj1 * ulp(&rv);
- dval(&rv) += adj.d;
- if ((word0(&rv) & Exp_mask) <= P * Exp_msk1) {
- if (word0(&rv0) == Tiny0 && word1(&rv0) == Tiny1)
- goto undfl;
- word0(&rv) = Tiny0;
- word1(&rv) = Tiny1;
- goto cont;
- }
- word0(&rv) -= P * Exp_msk1;
- } else {
- adj.d = aadj1 * ulp(&rv);
- dval(&rv) += adj.d;
- }
-#else /*Sudden_Underflow*/
- /* Compute adj so that the IEEE rounding rules will
- * correctly round rv + adj in some half-way cases.
- * If rv * ulp(rv) is denormalized (i.e.,
- * y <= (P - 1) * Exp_msk1), we must adjust aadj to avoid
- * trouble from bits lost to denormalization;
- * example: 1.2e-307 .
- */
- if (y <= (P - 1) * Exp_msk1 && aadj > 1.) {
- aadj1 = (double)(int)(aadj + 0.5);
- if (!dsign)
- aadj1 = -aadj1;
- }
- adj.d = aadj1 * ulp(&rv);
- dval(&rv) += adj.d;
-#endif /*Sudden_Underflow*/
-#endif /*Avoid_Underflow*/
}
z = word0(&rv) & Exp_mask;
-#ifndef SET_INEXACT
-#ifdef Avoid_Underflow
- if (!scale)
-#endif
- if (y == z) {
+ if (!scale && y == z) {
/* Can we stop now? */
L = (int32_t)aadj;
aadj -= L;
@@ -1588,39 +1160,19 @@ dropDown:
} else if (aadj < .4999999 / FLT_RADIX)
break;
}
-#endif
cont:
{}
}
-#ifdef SET_INEXACT
- if (inexact) {
- if (!oldinexact) {
- word0(&rv0) = Exp_1 + (70 << Exp_shift);
- word1(&rv0) = 0;
- dval(&rv0) += 1.;
- }
- } else if (!oldinexact)
- clear_inexact();
-#endif
-#ifdef Avoid_Underflow
if (scale) {
word0(&rv0) = Exp_1 - 2 * P * Exp_msk1;
word1(&rv0) = 0;
dval(&rv) *= dval(&rv0);
-#ifndef NO_ERRNO
+#if HAVE(ERRNO_H)
/* try to avoid the bug of testing an 8087 register value */
if (!word0(&rv) && !word1(&rv))
errno = ERANGE;
#endif
}
-#endif /* Avoid_Underflow */
-#ifdef SET_INEXACT
- if (inexact && !(word0(&rv) & Exp_mask)) {
- /* set underflow bit */
- dval(&rv0) = 1e-300;
- dval(&rv0) *= dval(&rv0);
- }
-#endif
ret:
if (se)
*se = const_cast<char*>(s);
@@ -1639,10 +1191,8 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
unsigned long long borrow, carry, y, ys;
#else
uint32_t borrow, carry, y, ys;
-#ifdef Pack_32
uint32_t si, z, zs;
#endif
-#endif
ASSERT(b.size() <= 1 || b.words()[b.size() - 1]);
ASSERT(S.size() <= 1 || S.words()[S.size() - 1]);
@@ -1667,7 +1217,6 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
borrow = y >> 32 & (uint32_t)1;
*bx++ = (uint32_t)y & 0xffffffffUL;
#else
-#ifdef Pack_32
si = *sx++;
ys = (si & 0xffff) * q + carry;
zs = (si >> 16) * q + (ys >> 16);
@@ -1677,13 +1226,6 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
z = (*bx >> 16) - (zs & 0xffff) - borrow;
borrow = (z & 0x10000) >> 16;
bx = storeInc(bx, z, y);
-#else
- ys = *sx++ * q + carry;
- carry = ys >> 16;
- y = *bx - (ys & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- *bx++ = y & 0xffff;
-#endif
#endif
} while (sx <= sxe);
if (!*bxe) {
@@ -1707,7 +1249,6 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
borrow = y >> 32 & (uint32_t)1;
*bx++ = (uint32_t)y & 0xffffffffUL;
#else
-#ifdef Pack_32
si = *sx++;
ys = (si & 0xffff) + carry;
zs = (si >> 16) + (ys >> 16);
@@ -1717,13 +1258,6 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
z = (*bx >> 16) - (zs & 0xffff) - borrow;
borrow = (z & 0x10000) >> 16;
bx = storeInc(bx, z, y);
-#else
- ys = *sx++ + carry;
- carry = ys >> 16;
- y = *bx - (ys & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- *bx++ = y & 0xffff;
-#endif
#endif
} while (sx <= sxe);
bx = b.words();
@@ -1740,7 +1274,7 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
*
* Inspired by "How to Print Floating-Point Numbers Accurately" by
- * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101].
+ * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126].
*
* Modifications:
* 1. Rather than iterating, we use a simple numeric overestimate
@@ -1769,78 +1303,54 @@ static ALWAYS_INLINE int quorem(BigInt& b, BigInt& S)
* "uniformly" distributed input, the probability is
* something like 10^(k-15) that we must resort to the int32_t
* calculation.
+ *
+ * Note: 'leftright' translates to 'generate shortest possible string'.
*/
-
-void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char** rve)
+template<bool roundingNone, bool roundingSignificantFigures, bool roundingDecimalPlaces, bool leftright>
+void dtoa(DtoaBuffer result, double dd, int ndigits, bool& signOut, int& exponentOut, unsigned& precisionOut)
{
- /*
- Arguments ndigits, decpt, sign are similar to those
- of ecvt and fcvt; trailing zeros are suppressed from
- the returned string. If not null, *rve is set to point
- to the end of the return value. If d is +-Infinity or NaN,
- then *decpt is set to 9999.
+ // Exactly one rounding mode must be specified.
+ ASSERT(roundingNone + roundingSignificantFigures + roundingDecimalPlaces == 1);
+ // roundingNone only allowed (only sensible?) with leftright set.
+ ASSERT(!roundingNone || leftright);
- */
+ ASSERT(!isnan(dd) && !isinf(dd));
int bbits, b2, b5, be, dig, i, ieps, ilim = 0, ilim0, ilim1 = 0,
- j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
- spec_case, try_quick;
+ j, j1, k, k0, k_check, m2, m5, s2, s5,
+ spec_case;
int32_t L;
-#ifndef Sudden_Underflow
int denorm;
uint32_t x;
-#endif
- BigInt b, b1, delta, mlo, mhi, S;
+ BigInt b, delta, mlo, mhi, S;
U d2, eps, u;
double ds;
char* s;
char* s0;
-#ifdef SET_INEXACT
- int inexact, oldinexact;
-#endif
u.d = dd;
- if (word0(&u) & Sign_bit) {
- /* set sign for everything, including 0's and NaNs */
- *sign = 1;
- word0(&u) &= ~Sign_bit; /* clear sign bit */
- } else
- *sign = 0;
-
- if ((word0(&u) & Exp_mask) == Exp_mask) {
- /* Infinity or NaN */
- *decpt = 9999;
- if (!word1(&u) && !(word0(&u) & 0xfffff)) {
- strcpy(result, "Infinity");
- if (rve)
- *rve = result + 8;
- } else {
- strcpy(result, "NaN");
- if (rve)
- *rve = result + 3;
- }
- return;
- }
+
+ /* Infinity or NaN */
+ ASSERT((word0(&u) & Exp_mask) != Exp_mask);
+
+ // JavaScript toString conversion treats -0 as 0.
if (!dval(&u)) {
- *decpt = 1;
+ signOut = false;
+ exponentOut = 0;
+ precisionOut = 1;
result[0] = '0';
result[1] = '\0';
- if (rve)
- *rve = result + 1;
return;
}
-#ifdef SET_INEXACT
- try_quick = oldinexact = get_inexact();
- inexact = 1;
-#endif
+ if (word0(&u) & Sign_bit) {
+ signOut = true;
+ word0(&u) &= ~Sign_bit; // clear sign bit
+ } else
+ signOut = false;
d2b(b, &u, &be, &bbits);
-#ifdef Sudden_Underflow
- i = (int)(word0(&u) >> Exp_shift1 & (Exp_mask >> Exp_shift1));
-#else
if ((i = (int)(word0(&u) >> Exp_shift1 & (Exp_mask >> Exp_shift1)))) {
-#endif
dval(&d2) = dval(&u);
word0(&d2) &= Frac_mask1;
word0(&d2) |= Exp_11;
@@ -1868,7 +1378,6 @@ void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char
*/
i -= Bias;
-#ifndef Sudden_Underflow
denorm = 0;
} else {
/* d is denormalized */
@@ -1881,7 +1390,6 @@ void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char
i -= (Bias + (P - 1) - 1) + 1;
denorm = 1;
}
-#endif
ds = (dval(&d2) - 1.5) * 0.289529654602168 + 0.1760912590558 + (i * 0.301029995663981);
k = (int)ds;
if (ds < 0. && ds != k)
@@ -1910,22 +1418,27 @@ void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char
s5 = 0;
}
-#ifndef SET_INEXACT
-#ifdef Check_FLT_ROUNDS
- try_quick = Rounding == 1;
-#else
- try_quick = 1;
-#endif
-#endif /*SET_INEXACT*/
+ if (roundingNone) {
+ ilim = ilim1 = -1;
+ i = 18;
+ ndigits = 0;
+ }
+ if (roundingSignificantFigures) {
+ if (ndigits <= 0)
+ ndigits = 1;
+ ilim = ilim1 = i = ndigits;
+ }
+ if (roundingDecimalPlaces) {
+ i = ndigits + k + 1;
+ ilim = i;
+ ilim1 = i - 1;
+ if (i <= 0)
+ i = 1;
+ }
- leftright = 1;
- ilim = ilim1 = -1;
- i = 18;
- ndigits = 0;
s = s0 = result;
- if (ilim >= 0 && ilim <= Quick_max && try_quick) {
-
+ if (ilim >= 0 && ilim <= Quick_max) {
/* Try to get by with floating-point arithmetic. */
i = 0;
@@ -1978,7 +1491,6 @@ void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char
goto noDigits;
goto fastFailed;
}
-#ifndef No_leftright
if (leftright) {
/* Use Steele & White method of only
* generating digits needed.
@@ -1998,7 +1510,6 @@ void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char
dval(&u) *= 10.;
}
} else {
-#endif
/* Generate ilim digits, then fix them up. */
dval(&eps) *= tens[ilim - 1];
for (i = 1;; i++, dval(&u) *= 10.) {
@@ -2017,9 +1528,7 @@ void dtoa(DtoaBuffer result, double dd, int ndigits, int* decpt, int* sign, char
break;
}
}
-#ifndef No_leftright
}
-#endif
fastFailed:
s = s0;
dval(&u) = dval(&d2);
@@ -2042,18 +1551,8 @@ fastFailed:
for (i = 1;; i++, dval(&u) *= 10.) {
L = (int32_t)(dval(&u) / ds);
dval(&u) -= L * ds;
-#ifdef Check_FLT_ROUNDS
- /* If FLT_ROUNDS == 2, L will usually be high by 1 */
- if (dval(&u) < 0) {
- L--;
- dval(&u) += ds;
- }
-#endif
*s++ = '0' + (int)L;
if (!dval(&u)) {
-#ifdef SET_INEXACT
- inexact = 0;
-#endif
break;
}
if (i == ilim) {
@@ -2079,11 +1578,7 @@ bumpUp:
mhi.clear();
mlo.clear();
if (leftright) {
- i =
-#ifndef Sudden_Underflow
- denorm ? be + (Bias + (P - 1) - 1 + 1) :
-#endif
- 1 + P - bbits;
+ i = denorm ? be + (Bias + (P - 1) - 1 + 1) : 1 + P - bbits;
b2 += i;
s2 += i;
i2b(mhi, 1);
@@ -2104,7 +1599,7 @@ bumpUp:
pow5mult(b, j);
} else
pow5mult(b, b5);
- }
+ }
i2b(S, 1);
if (s5 > 0)
pow5mult(S, s5);
@@ -2112,11 +1607,7 @@ bumpUp:
/* Check for special case that d is a normalized power of 2. */
spec_case = 0;
- if (!word1(&u) && !(word0(&u) & Bndry_mask)
-#ifndef Sudden_Underflow
- && word0(&u) & (Exp_mask & ~Exp_msk1)
-#endif
- ) {
+ if ((roundingNone || leftright) && (!word1(&u) && !(word0(&u) & Bndry_mask) && word0(&u) & (Exp_mask & ~Exp_msk1))) {
/* The special case */
b2 += Log2P;
s2 += Log2P;
@@ -2130,13 +1621,8 @@ bumpUp:
* and for all and pass them and a shift to quorem, so it
* can do shifts and ors to compute the numerator for q.
*/
-#ifdef Pack_32
if ((i = ((s5 ? 32 - hi0bits(S.words()[S.size() - 1]) : 1) + s2) & 0x1f))
i = 32 - i;
-#else
- if ((i = ((s5 ? 32 - hi0bits(S.words()[S.size() - 1]) : 1) + s2) & 0xf))
- i = 16 - i;
-#endif
if (i > 4) {
i -= 4;
b2 += i;
@@ -2161,7 +1647,15 @@ bumpUp:
ilim = ilim1;
}
}
-
+ if (ilim <= 0 && roundingDecimalPlaces) {
+ if (ilim < 0)
+ goto noDigits;
+ multadd(S, 5, 0);
+ // For IEEE-754 unbiased rounding this check should be <=, such that 0.5 would flush to zero.
+ if (cmp(b, S) < 0)
+ goto noDigits;
+ goto oneDigit;
+ }
if (leftright) {
if (m2 > 0)
lshift(mhi, m2);
@@ -2171,10 +1665,8 @@ bumpUp:
*/
mlo = mhi;
- if (spec_case) {
- mhi = mlo;
+ if (spec_case)
lshift(mhi, Log2P);
- }
for (i = 1;;i++) {
dig = quorem(b, S) + '0';
@@ -2184,32 +1676,43 @@ bumpUp:
j = cmp(b, mlo);
diff(delta, S, mhi);
j1 = delta.sign ? 1 : cmp(b, delta);
+#ifdef DTOA_ROUND_BIASED
+ if (j < 0 || !j) {
+#else
+ // FIXME: ECMA-262 specifies that equidistant results round away from
+ // zero, which probably means we shouldn't be on the unbiased code path
+ // (the (word1(&u) & 1) clause is looking highly suspicious). I haven't
+ // yet understood this code well enough to make the call, but we should
+ // probably be enabling DTOA_ROUND_BIASED. I think the interesting corner
+ // case to understand is probably "Math.pow(0.5, 24).toString()".
+ // I believe this value is interesting because I think it is precisely
+ // representable in binary floating point, and its decimal representation
+ // has a single digit that Steele & White reduction can remove, with the
+ // value 5 (thus equidistant from the next numbers above and below).
+ // We produce the correct answer using either codepath, and I don't as
+ // yet understand why. :-)
if (!j1 && !(word1(&u) & 1)) {
if (dig == '9')
goto round9up;
if (j > 0)
dig++;
-#ifdef SET_INEXACT
- else if (!b->x[0] && b->wds <= 1)
- inexact = 0;
-#endif
*s++ = dig;
goto ret;
}
if (j < 0 || (!j && !(word1(&u) & 1))) {
- if (!b.words()[0] && b.size() <= 1) {
-#ifdef SET_INEXACT
- inexact = 0;
#endif
- goto acceptDig;
- }
- if (j1 > 0) {
+ if ((b.words()[0] || b.size() > 1) && (j1 > 0)) {
lshift(b, 1);
j1 = cmp(b, S);
- if ((j1 > 0 || (!j1 && (dig & 1))) && dig++ == '9')
- goto round9up;
+ // For IEEE-754 round-to-even, this check should be (j1 > 0 || (!j1 && (dig & 1))),
+ // but ECMA-262 specifies that equidistant values (e.g. (.5).toFixed()) should
+ // be rounded away from zero.
+ if (j1 >= 0) {
+ if (dig == '9')
+ goto round9up;
+ dig++;
+ }
}
-acceptDig:
*s++ = dig;
goto ret;
}
@@ -2229,25 +1732,25 @@ round9up:
multadd(mlo, 10, 0);
multadd(mhi, 10, 0);
}
- } else
+ } else {
for (i = 1;; i++) {
*s++ = dig = quorem(b, S) + '0';
- if (!b.words()[0] && b.size() <= 1) {
-#ifdef SET_INEXACT
- inexact = 0;
-#endif
+ if (!b.words()[0] && b.size() <= 1)
goto ret;
- }
if (i >= ilim)
break;
multadd(b, 10, 0);
}
+ }
/* Round off last digit */
lshift(b, 1);
j = cmp(b, S);
- if (j > 0 || (!j && (dig & 1))) {
+ // For IEEE-754 round-to-even, this check should be (j > 0 || (!j && (dig & 1))),
+ // but ECMA-262 specifies that equidistant values (e.g. (.5).toFixed()) should
+ // be rounded away from zero.
+ if (j >= 0) {
roundoff:
while (*--s == '9')
if (s == s0) {
@@ -2262,27 +1765,67 @@ roundoff:
}
goto ret;
noDigits:
- k = -1 - ndigits;
- goto ret;
+ exponentOut = 0;
+ precisionOut = 1;
+ result[0] = '0';
+ result[1] = '\0';
+ return;
oneDigit:
*s++ = '1';
k++;
goto ret;
ret:
-#ifdef SET_INEXACT
- if (inexact) {
- if (!oldinexact) {
- word0(&u) = Exp_1 + (70 << Exp_shift);
- word1(&u) = 0;
- dval(&u) += 1.;
- }
- } else if (!oldinexact)
- clear_inexact();
-#endif
+ ASSERT(s > result);
*s = 0;
- *decpt = k + 1;
- if (rve)
- *rve = s;
+ exponentOut = k;
+ precisionOut = s - result;
+}
+
+void dtoa(DtoaBuffer result, double dd, bool& sign, int& exponent, unsigned& precision)
+{
+ // flags are roundingNone, leftright.
+ dtoa<true, false, false, true>(result, dd, 0, sign, exponent, precision);
+}
+
+void dtoaRoundSF(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision)
+{
+ // flag is roundingSignificantFigures.
+ dtoa<false, true, false, false>(result, dd, ndigits, sign, exponent, precision);
+}
+
+void dtoaRoundDP(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision)
+{
+ // flag is roundingDecimalPlaces.
+ dtoa<false, false, true, false>(result, dd, ndigits, sign, exponent, precision);
+}
+
+static ALWAYS_INLINE void copyAsciiToUTF16(UChar* next, const char* src, unsigned size)
+{
+ for (unsigned i = 0; i < size; ++i)
+ *next++ = *src++;
+}
+
+unsigned numberToString(double d, NumberToStringBuffer buffer)
+{
+ // Handle NaN and Infinity.
+ if (isnan(d) || isinf(d)) {
+ if (isnan(d)) {
+ copyAsciiToUTF16(buffer, "NaN", 3);
+ return 3;
+ }
+ if (d > 0) {
+ copyAsciiToUTF16(buffer, "Infinity", 8);
+ return 8;
+ }
+ copyAsciiToUTF16(buffer, "-Infinity", 9);
+ return 9;
+ }
+
+ // Convert to decimal with rounding.
+ DecimalNumber number(d);
+ return number.exponent() >= -6 && number.exponent() < 21
+ ? number.toStringDecimal(buffer)
+ : number.toStringExponential(buffer);
}
} // namespace WTF
diff --git a/JavaScriptCore/wtf/dtoa.h b/JavaScriptCore/wtf/dtoa.h
index bf00ccc..7e4fc41 100644
--- a/JavaScriptCore/wtf/dtoa.h
+++ b/JavaScriptCore/wtf/dtoa.h
@@ -21,11 +21,10 @@
#ifndef WTF_dtoa_h
#define WTF_dtoa_h
-namespace WTF {
-class Mutex;
-}
+#include <wtf/unicode/Unicode.h>
namespace WTF {
+class Mutex;
extern WTF::Mutex* s_dtoaP5Mutex;
@@ -34,10 +33,18 @@ extern WTF::Mutex* s_dtoaP5Mutex;
double strtod(const char* s00, char** se);
typedef char DtoaBuffer[80];
-void dtoa(DtoaBuffer result, double d, int ndigits, int* decpt, int* sign, char** rve);
+
+void dtoa(DtoaBuffer result, double dd, bool& sign, int& exponent, unsigned& precision);
+void dtoaRoundSF(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision);
+void dtoaRoundDP(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision);
+
+// Size = 80 for sizeof(DtoaBuffer) + some sign bits, decimal point, 'e', exponent digits.
+typedef UChar NumberToStringBuffer[96];
+unsigned numberToString(double, NumberToStringBuffer);
} // namespace WTF
-using WTF::DtoaBuffer;
+using WTF::NumberToStringBuffer;
+using WTF::numberToString;
#endif // WTF_dtoa_h
diff --git a/JavaScriptCore/wtf/gobject/GOwnPtr.h b/JavaScriptCore/wtf/gobject/GOwnPtr.h
index 731326e..e04ee9d 100644
--- a/JavaScriptCore/wtf/gobject/GOwnPtr.h
+++ b/JavaScriptCore/wtf/gobject/GOwnPtr.h
@@ -26,15 +26,6 @@
#include <wtf/Assertions.h>
#include <wtf/Noncopyable.h>
-// Forward delcarations at this point avoid the need to include GLib includes
-// in WTF headers.
-typedef struct _GError GError;
-typedef struct _GList GList;
-typedef struct _GCond GCond;
-typedef struct _GMutex GMutex;
-typedef struct _GPatternSpec GPatternSpec;
-typedef struct _GDir GDir;
-typedef struct _GFile GFile;
extern "C" void g_free(void*);
namespace WTF {
diff --git a/JavaScriptCore/wtf/gobject/GRefPtr.h b/JavaScriptCore/wtf/gobject/GRefPtr.h
index 064c87e..1ca55ce 100644
--- a/JavaScriptCore/wtf/gobject/GRefPtr.h
+++ b/JavaScriptCore/wtf/gobject/GRefPtr.h
@@ -27,11 +27,8 @@
#include "PlatformRefPtr.h"
#include <algorithm>
-typedef struct _GHashTable GHashTable;
-typedef struct _GVariant GVariant;
-typedef void* gpointer;
-extern "C" void g_object_unref(gpointer object);
-extern "C" gpointer g_object_ref_sink(gpointer object);
+extern "C" void g_object_unref(gpointer);
+extern "C" gpointer g_object_ref_sink(gpointer);
namespace WTF {
diff --git a/JavaScriptCore/wtf/gtk/GtkTypedefs.h b/JavaScriptCore/wtf/gtk/GtkTypedefs.h
new file mode 100644
index 0000000..ee96f84
--- /dev/null
+++ b/JavaScriptCore/wtf/gtk/GtkTypedefs.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2010 Igalia, S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GtkTypedefs_h
+#define GtkTypedefs_h
+
+/* Vanilla C code does not seem to be able to handle forward-declaration typedefs. */
+#ifdef __cplusplus
+
+typedef char gchar;
+typedef double gdouble;
+typedef float gfloat;
+typedef int gint;
+typedef gint gboolean;
+typedef long glong;
+typedef short gshort;
+typedef unsigned char guchar;
+typedef unsigned int guint;
+typedef unsigned long gulong;
+typedef unsigned short gushort;
+typedef void* gpointer;
+
+typedef struct _cairo_surface cairo_surface_t;
+typedef struct _GCond GCond;
+typedef struct _GDir GDir;
+typedef struct _GdkAtom* GdkAtom;
+typedef struct _GdkCursor GdkCursor;
+typedef struct _GdkDragContext GdkDragContext;
+typedef struct _GdkDrawable GdkDrawable;
+typedef struct _GdkEventConfigure GdkEventConfigure;
+typedef struct _GdkPixbuf GdkPixbuf;
+typedef struct _GError GError;
+typedef struct _GFile GFile;
+typedef struct _GHashTable GHashTable;
+typedef struct _GList GList;
+typedef struct _GMutex GMutex;
+typedef struct _GPatternSpec GPatternSpec;
+typedef struct _GtkAction GtkAction;
+typedef struct _GtkAdjustment GtkAdjustment;
+typedef struct _GtkBorder GtkBorder;
+typedef struct _GtkClipboard GtkClipboard;
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GtkIconInfo GtkIconInfo;
+typedef struct _GtkMenu GtkMenu;
+typedef struct _GtkMenuItem GtkMenuItem;
+typedef struct _GtkObject GtkObject;
+typedef struct _GtkSelectionData GtkSelectionData;
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkTargetList GtkTargetList;
+typedef struct _GtkThemeParts GtkThemeParts;
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GVariant GVariant;
+typedef union _GdkEvent GdkEvent;
+
+#ifdef GTK_API_VERSION_2
+typedef struct _GdkRectangle GdkRectangle;
+#else
+typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
+typedef cairo_rectangle_int_t GdkRectangle;
+#endif
+
+#endif
+
+#endif /* GtkTypedefs_h */
diff --git a/JavaScriptCore/wtf/text/AtomicString.cpp b/JavaScriptCore/wtf/text/AtomicString.cpp
index 6e95292..1981170 100644
--- a/JavaScriptCore/wtf/text/AtomicString.cpp
+++ b/JavaScriptCore/wtf/text/AtomicString.cpp
@@ -130,7 +130,7 @@ static inline bool equal(StringImpl* string, const UChar* characters, unsigned l
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SH4)
+#if CPU(ARM) || CPU(SH4) || CPU(MIPS)
const UChar* stringCharacters = string->characters();
for (unsigned i = 0; i != length; ++i) {
if (*stringCharacters++ != *characters++)
diff --git a/JavaScriptCore/wtf/text/StringHash.h b/JavaScriptCore/wtf/text/StringHash.h
index 8872fb3..bfd05eb 100644
--- a/JavaScriptCore/wtf/text/StringHash.h
+++ b/JavaScriptCore/wtf/text/StringHash.h
@@ -55,7 +55,7 @@ namespace WTF {
// FIXME: perhaps we should have a more abstract macro that indicates when
// going 4 bytes at a time is unsafe
-#if CPU(ARM) || CPU(SH4)
+#if CPU(ARM) || CPU(SH4) || CPU(MIPS)
const UChar* aChars = a->characters();
const UChar* bChars = b->characters();
for (unsigned i = 0; i != aLength; ++i) {
diff --git a/JavaScriptCore/wtf/text/StringImpl.cpp b/JavaScriptCore/wtf/text/StringImpl.cpp
index ab0f009..a667525 100644
--- a/JavaScriptCore/wtf/text/StringImpl.cpp
+++ b/JavaScriptCore/wtf/text/StringImpl.cpp
@@ -31,6 +31,8 @@
#include <wtf/StdLibExtras.h>
#include <wtf/WTFThreadData.h>
+using namespace std;
+
namespace WTF {
using namespace Unicode;
@@ -776,6 +778,10 @@ PassRefPtr<StringImpl> StringImpl::replace(unsigned position, unsigned lengthToR
if (!lengthToReplace && !lengthToInsert)
return this;
UChar* data;
+
+ if ((length() - lengthToReplace) >= (numeric_limits<unsigned>::max() - lengthToInsert))
+ CRASH();
+
PassRefPtr<StringImpl> newImpl =
createUninitialized(length() - lengthToReplace + lengthToInsert, data);
memcpy(data, characters(), position * sizeof(UChar));
@@ -805,9 +811,18 @@ PassRefPtr<StringImpl> StringImpl::replace(UChar pattern, StringImpl* replacemen
if (!matchCount)
return this;
+ if (repStrLength && matchCount > numeric_limits<unsigned>::max() / repStrLength)
+ CRASH();
+
+ unsigned replaceSize = matchCount * repStrLength;
+ unsigned newSize = m_length - matchCount;
+ if (newSize >= (numeric_limits<unsigned>::max() - replaceSize))
+ CRASH();
+
+ newSize += replaceSize;
+
UChar* data;
- PassRefPtr<StringImpl> newImpl =
- createUninitialized(m_length - matchCount + (matchCount * repStrLength), data);
+ PassRefPtr<StringImpl> newImpl = createUninitialized(newSize, data);
// Construct the new data
size_t srcSegmentEnd;
@@ -855,9 +870,17 @@ PassRefPtr<StringImpl> StringImpl::replace(StringImpl* pattern, StringImpl* repl
if (!matchCount)
return this;
+ unsigned newSize = m_length - matchCount * patternLength;
+ if (repStrLength && matchCount > numeric_limits<unsigned>::max() / repStrLength)
+ CRASH();
+
+ if (newSize > (numeric_limits<unsigned>::max() - matchCount * repStrLength))
+ CRASH();
+
+ newSize += matchCount * repStrLength;
+
UChar* data;
- PassRefPtr<StringImpl> newImpl =
- createUninitialized(m_length + matchCount * (repStrLength - patternLength), data);
+ PassRefPtr<StringImpl> newImpl = createUninitialized(newSize, data);
// Construct the new data
size_t srcSegmentEnd;
diff --git a/JavaScriptCore/wtf/text/WTFString.cpp b/JavaScriptCore/wtf/text/WTFString.cpp
index bbff576..a83dbba 100644
--- a/JavaScriptCore/wtf/text/WTFString.cpp
+++ b/JavaScriptCore/wtf/text/WTFString.cpp
@@ -25,10 +25,10 @@
#include <limits>
#include <stdarg.h>
#include <wtf/ASCIICType.h>
-#include <wtf/DecimalNumber.h>
+#include <wtf/text/CString.h>
#include <wtf/StringExtras.h>
#include <wtf/Vector.h>
-#include <wtf/text/CString.h>
+#include <wtf/dtoa.h>
#include <wtf/unicode/UTF8.h>
#include <wtf/unicode/Unicode.h>
@@ -947,49 +947,42 @@ float charactersToFloat(const UChar* data, size_t length, bool* ok)
return static_cast<float>(charactersToDouble(data, length, ok));
}
-static unsigned copyToString(const char* string, unsigned length, NumberToStringBuffer& buffer)
-{
- for (unsigned i = 0; i < length; ++i)
- buffer[i] = string[i];
- return length;
-}
+} // namespace WTF
-static NEVER_INLINE unsigned nanOrInfToString(double x, NumberToStringBuffer& buffer)
+#ifndef NDEBUG
+// For use in the debugger
+String* string(const char*);
+Vector<char> asciiDebug(StringImpl* impl);
+Vector<char> asciiDebug(String& string);
+
+String* string(const char* s)
{
- ASSERT(isnan(x) || isinf(x));
- if (isnan(x))
- return copyToString("NaN", 3, buffer);
- if (x < 0)
- return copyToString("-Infinity", 9, buffer);
- return copyToString("Infinity", 8, buffer);
+ // leaks memory!
+ return new String(s);
}
-// toString converts a number to a string without rounding. For values in the range
-// 1e-6 <= x < 1e+21 the result is formatted as a decimal, with values outside of
-// this range being formatted as an exponential.
-unsigned numberToString(double x, NumberToStringBuffer& buffer)
+Vector<char> asciiDebug(StringImpl* impl)
{
- // Handle NaN and Infinity.
- if (UNLIKELY(isnan(x) || isinf(x)))
- return nanOrInfToString(x, buffer);
-
- // Convert to decimal, no rounding.
- DecimalNumber number(x);
+ if (!impl)
+ return asciiDebug(String("[null]").impl());
- // Format as decimal or exponential, depending on the exponent.
- return number.exponent() >= -6 && number.exponent() < 21
- ? number.toStringDecimal(buffer)
- : number.toStringExponential(buffer);
-}
+ Vector<char> buffer;
+ unsigned length = impl->length();
+ const UChar* characters = impl->characters();
-} // namespace WTF
+ buffer.resize(length + 1);
+ for (unsigned i = 0; i < length; ++i) {
+ UChar ch = characters[i];
+ buffer[i] = ch && (ch < 0x20 || ch > 0x7f) ? '?' : ch;
+ }
+ buffer[length] = '\0';
-#ifndef NDEBUG
-// For use in the debugger - leaks memory
-String* string(const char*);
+ return buffer;
+}
-String* string(const char* s)
+Vector<char> asciiDebug(String& string)
{
- return new String(s);
+ return asciiDebug(string.impl());
}
+
#endif
diff --git a/JavaScriptCore/wtf/text/WTFString.h b/JavaScriptCore/wtf/text/WTFString.h
index 8a6bab6..fafef12 100644
--- a/JavaScriptCore/wtf/text/WTFString.h
+++ b/JavaScriptCore/wtf/text/WTFString.h
@@ -52,10 +52,6 @@ class BString;
namespace WTF {
-// Size = 80 for sizeof(DtoaBuffer) + some sign bits, decimal point, 'e', exponent digits.
-typedef UChar NumberToStringBuffer[96];
-unsigned numberToString(double, NumberToStringBuffer&);
-
class CString;
// Declarations of string operations
@@ -457,7 +453,4 @@ using WTF::charactersToInt;
using WTF::charactersToFloat;
using WTF::charactersToDouble;
-using WTF::NumberToStringBuffer;
-using WTF::numberToString;
-
#endif
diff --git a/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h b/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h
index 5d3eca6..1963576 100644
--- a/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h
+++ b/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h
@@ -27,6 +27,7 @@
// some defines from ICU
+#define U_IS_BMP(c) ((UChar32)(c)<=0xffff)
#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
diff --git a/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h b/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
index aa203a2..badab66 100644
--- a/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
+++ b/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
@@ -64,7 +64,9 @@ typedef uint16_t UChar;
typedef uint32_t UChar32;
// some defines from ICU
+// FIXME: This should use UnicodeMacrosFromICU.h instead!
+#define U_IS_BMP(c) ((UChar32)(c)<=0xffff)
#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h b/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h
index 68da35a..3866568 100644
--- a/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h
+++ b/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h
@@ -29,7 +29,9 @@
#define TO_MASK(x) (1 << (x))
// some defines from ICU needed one or two places
+// FIXME: This should use UnicodeMacrosFromICU.h instead!
+#define U_IS_BMP(c) ((UChar32)(c)<=0xffff)
#define U16_IS_LEAD(c) (((c) & 0xfffffc00) == 0xd800)
#define U16_IS_TRAIL(c) (((c) & 0xfffffc00) == 0xdc00)
#define U16_SURROGATE_OFFSET ((0xd800 << 10UL) + 0xdc00 - 0x10000)
diff --git a/JavaScriptCore/yarr/RegexJIT.cpp b/JavaScriptCore/yarr/RegexJIT.cpp
index 4c21547..7818b52 100644
--- a/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/JavaScriptCore/yarr/RegexJIT.cpp
@@ -1472,17 +1472,7 @@ public:
{
generate();
- RefPtr<ExecutablePool> executablePool = globalData->executableAllocator.poolForSize(size());
- if (!executablePool) {
- m_shouldFallBack = true;
- return;
- }
-
- LinkBuffer patchBuffer(this, executablePool.release(), 0);
- if (!patchBuffer.allocationSuccessful()) {
- m_shouldFallBack = true;
- return;
- }
+ LinkBuffer patchBuffer(this, globalData->executableAllocator.poolForSize(size()), 0);
for (unsigned i = 0; i < m_backtrackRecords.size(); ++i)
patchBuffer.patch(m_backtrackRecords[i].dataLabel, patchBuffer.locationOf(m_backtrackRecords[i].backtrackLocation));
diff --git a/JavaScriptGlue/ChangeLog b/JavaScriptGlue/ChangeLog
index 895e484..1e49a3f 100644
--- a/JavaScriptGlue/ChangeLog
+++ b/JavaScriptGlue/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add PassOwnArrayPtr
+ https://bugs.webkit.org/show_bug.cgi?id=44627
+
+ Add new forwarding header.
+
+ * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Added.
+
2010-08-23 Gavin Barraclough <barraclough@apple.com>
Reviewed by Oliver Hunt.
diff --git a/JavaScriptGlue/Configurations/Version.xcconfig b/JavaScriptGlue/Configurations/Version.xcconfig
index 811d9c4..29f35ef 100644
--- a/JavaScriptGlue/Configurations/Version.xcconfig
+++ b/JavaScriptGlue/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 6;
+MINOR_VERSION = 7;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtrCommon.h b/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtrCommon.h
new file mode 100644
index 0000000..0a226f0
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/OwnArrayPtrCommon.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/OwnArrayPtrCommon.h>
diff --git a/LayoutTests/dom/html/level2/html/button03.js b/LayoutTests/dom/html/level2/html/button03.js
index 1a4ac91..5dc6952 100644
--- a/LayoutTests/dom/html/level2/html/button03.js
+++ b/LayoutTests/dom/html/level2/html/button03.js
@@ -103,7 +103,11 @@ testNode = nodeList.item(0);
vfaction = formNode.action;
- assertEquals("formLink","...",vfaction);
+// WebKit modification: 26-August-2010
+ var expectedAction = document.URL.replace(/[^/]*$/, "") + "...";
+// End WebKit modification
+
+ assertEquals("formLink",expectedAction,vfaction);
}
diff --git a/LayoutTests/dom/xhtml/level2/html/button03.js b/LayoutTests/dom/xhtml/level2/html/button03.js
index 1a4ac91..5dc6952 100644
--- a/LayoutTests/dom/xhtml/level2/html/button03.js
+++ b/LayoutTests/dom/xhtml/level2/html/button03.js
@@ -103,7 +103,11 @@ testNode = nodeList.item(0);
vfaction = formNode.action;
- assertEquals("formLink","...",vfaction);
+// WebKit modification: 26-August-2010
+ var expectedAction = document.URL.replace(/[^/]*$/, "") + "...";
+// End WebKit modification
+
+ assertEquals("formLink",expectedAction,vfaction);
}
diff --git a/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt
new file mode 100644
index 0000000..1a77f93
--- /dev/null
+++ b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt
@@ -0,0 +1,13 @@
+Test that collapseToStart() and collapseToEnd() throw INVALID_STATE_ERR if no selection is made.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS sel.collapseToStart() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS sel.collapseToEnd() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS sel.collapseToStart() is undefined
+PASS sel.collapseToEnd() is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
new file mode 100644
index 0000000..5463fff
--- /dev/null
+++ b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/collapseToX-empty-selection.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js b/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js
new file mode 100644
index 0000000..c1fd73c
--- /dev/null
+++ b/LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.js
@@ -0,0 +1,17 @@
+description("Test that collapseToStart() and collapseToEnd() throw INVALID_STATE_ERR if no selection is made.");
+
+var sel = window.getSelection();
+var textNode = document.createTextNode("abcdef");
+document.body.appendChild(textNode);
+
+shouldThrow("sel.collapseToStart()", "'Error: INVALID_STATE_ERR: DOM Exception 11'");
+shouldThrow("sel.collapseToEnd()", "'Error: INVALID_STATE_ERR: DOM Exception 11'");
+
+sel.selectAllChildren(textNode);
+
+shouldBe("sel.collapseToStart()", "undefined");
+shouldBe("sel.collapseToEnd()", "undefined");
+
+document.body.removeChild(textNode);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/js/resources/js-test-post.js b/LayoutTests/fast/js/resources/js-test-post.js
index 88882c5..11a9e5f 100644
--- a/LayoutTests/fast/js/resources/js-test-post.js
+++ b/LayoutTests/fast/js/resources/js-test-post.js
@@ -1,13 +1,9 @@
-function finishJSTest()
-{
- shouldBeTrue("successfullyParsed");
- debug('<br /><span class="pass">TEST COMPLETE</span>');
- if (window.jsTestIsAsync && window.layoutTestController)
- layoutTestController.notifyDone();
-}
+wasPostTestScriptParsed = true;
if (window.jsTestIsAsync) {
if (window.layoutTestController)
layoutTestController.waitUntilDone();
+ if (window.wasFinishJSTestCalled)
+ finishJSTest();
} else
finishJSTest();
diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js
index aaab749..87db5d4 100644
--- a/LayoutTests/fast/js/resources/js-test-pre.js
+++ b/LayoutTests/fast/js/resources/js-test-pre.js
@@ -280,3 +280,16 @@ function gc() {
gcRec(10)
}
}
+
+// It's possible for an async test to call finishJSTest() before js-test-post.js
+// has been parsed.
+function finishJSTest()
+{
+ wasFinishJSTestCalled = true;
+ if (!window.wasPostTestScriptParsed)
+ return;
+ shouldBeTrue("successfullyParsed");
+ debug('<br /><span class="pass">TEST COMPLETE</span>');
+ if (window.jsTestIsAsync && window.layoutTestController)
+ layoutTestController.notifyDone();
+}
diff --git a/LayoutTests/fast/url/resources/utilities.js b/LayoutTests/fast/url/resources/utilities.js
index 6392198..631bdec 100644
--- a/LayoutTests/fast/url/resources/utilities.js
+++ b/LayoutTests/fast/url/resources/utilities.js
@@ -12,10 +12,18 @@ function canonicalize(url)
function setBaseURL(url)
{
- // According to the HTML5 spec, we're only supposed to honor <base> elements
- // in the <head>, but we use document.write() here to make the test run in
- // Firefox.
- document.write('<base href="' + url + '">');
+ // It would be more elegant to use the DOM here, but we chose document.write()
+ // so the tests ran correctly in Firefox at the time we originally wrote them.
+
+ // Remove any existing base elements.
+ var existingBase = document.getElementsByTagName('base');
+ while (existingBase.length) {
+ var element = existingBase[0];
+ element.parentNode.removeChild(element);
+ }
+
+ // Add a new base element.
+ document.write('<base href="' + url + '">');
}
function segments(url)
diff --git a/LayoutTests/http/tests/resources/network-simulator.php b/LayoutTests/http/tests/resources/network-simulator.php
index 3f1201f..4860028 100644
--- a/LayoutTests/http/tests/resources/network-simulator.php
+++ b/LayoutTests/http/tests/resources/network-simulator.php
@@ -120,6 +120,38 @@ function handleGetResourceCountCommand($path)
}
}
+function handleStartResourceRequestsLog()
+{
+ $resourceLogFile = sys_get_temp_dir() . "/resource-log";
+ file_put_contents($resourceLogFile, "");
+}
+
+function handleClearResourceRequestsLog()
+{
+ $resourceLogFile = sys_get_temp_dir() . "/resource-log";
+ file_put_contents($resourceLogFile, "");
+}
+
+function handleGetResourceRequestsLog()
+{
+ $resourceLogFile = sys_get_temp_dir() . "/resource-log";
+
+ generateNoCacheHTTPHeader();
+ header("Content-Type: text/plain");
+
+ print file_get_contents($resourceLogFile);
+}
+
+function handleLogResourceRequest($path)
+{
+ $resourceLogFile = sys_get_temp_dir() . "/resource-log";
+
+ $newData = "\n".$path;
+ // Documentation says that appends are atomic.
+ file_put_contents($resourceLogFile, $newData, FILE_APPEND);
+ generateResponse($path);
+}
+
$stateFile = sys_get_temp_dir() . "/network-simulator-state";
$command = $_GET['command'];
if ($command) {
@@ -133,6 +165,14 @@ if ($command) {
handleResetResourceCountCommand();
else if ($command == "get-resource-count")
handleGetResourceCountCommand($_GET['path']);
+ else if ($command == "start-resource-request-log")
+ handleStartResourceRequestsLog();
+ else if ($command == "clear-resource-request-log")
+ handleClearResourceRequestsLog();
+ else if ($command == "get-resource-request-log")
+ handleGetResourceRequestsLog();
+ else if ($command == "log-resource-request")
+ handleLogResourceRequest($_GET['path']);
else
echo "Unknown command: " . $command . "\n";
exit();
diff --git a/LayoutTests/http/tests/resources/silence.mpg b/LayoutTests/http/tests/resources/silence.mpg
deleted file mode 100644
index b6bbf20..0000000
--- a/LayoutTests/http/tests/resources/silence.mpg
+++ /dev/null
Binary files differ
diff --git a/LayoutTests/http/tests/resources/test.mp4 b/LayoutTests/http/tests/resources/test.mp4
new file mode 100644
index 0000000..d278c8a
--- /dev/null
+++ b/LayoutTests/http/tests/resources/test.mp4
Binary files differ
diff --git a/LayoutTests/http/tests/resources/test.ogv b/LayoutTests/http/tests/resources/test.ogv
new file mode 100644
index 0000000..c9ee910
--- /dev/null
+++ b/LayoutTests/http/tests/resources/test.ogv
Binary files differ
diff --git a/LayoutTests/platform/android/Skipped b/LayoutTests/platform/android/Skipped
new file mode 100644
index 0000000..f4ab335
--- /dev/null
+++ b/LayoutTests/platform/android/Skipped
@@ -0,0 +1,2 @@
+# Full Screen support is not yet enabled.
+fullscreen/
diff --git a/LayoutTests/storage/indexeddb/database-basics-expected.txt b/LayoutTests/storage/indexeddb/database-basics-expected.txt
index 75c276d..1321f4d 100644
--- a/LayoutTests/storage/indexeddb/database-basics-expected.txt
+++ b/LayoutTests/storage/indexeddb/database-basics-expected.txt
@@ -24,10 +24,26 @@ PASS event.target.readyState is event.target.DONE
db = event.result
PASS db.name is "name"
-PASS db.version is ""
PASS db.objectStores is []
PASS db.objectStores.length is 0
PASS db.objectStores.contains('') is false
+
+Testing setVersion.
+db.setVersion("version a")
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+db.setVersion("version b")
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+PASS db.version is "version b"
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/keyrange-expected.txt b/LayoutTests/storage/indexeddb/keyrange-expected.txt
index fc61b2f..a510a80 100644
--- a/LayoutTests/storage/indexeddb/keyrange-expected.txt
+++ b/LayoutTests/storage/indexeddb/keyrange-expected.txt
@@ -14,7 +14,7 @@ PASS keyRange.flags is keyRange.SINGLE
IDBKeyRange.leftBound(10,true)
PASS keyRange.left is 10
PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_OPEN
+PASS keyRange.flags is keyRange.LEFT_OPEN | keyRange.LEFT_BOUND
IDBKeyRange.leftBound(11,false)
PASS keyRange.left is 11
PASS keyRange.right is null
@@ -26,7 +26,7 @@ PASS keyRange.flags is keyRange.LEFT_BOUND
IDBKeyRange.leftBound('aa',true)
PASS keyRange.left is 'aa'
PASS keyRange.right is null
-PASS keyRange.flags is keyRange.LEFT_OPEN
+PASS keyRange.flags is keyRange.LEFT_OPEN | keyRange.LEFT_BOUND
IDBKeyRange.leftBound('ab',false)
PASS keyRange.left is 'ab'
PASS keyRange.right is null
@@ -38,7 +38,7 @@ PASS keyRange.flags is keyRange.LEFT_BOUND
IDBKeyRange.rightBound(20,true)
PASS keyRange.right is 20
PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_OPEN
+PASS keyRange.flags is keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND
IDBKeyRange.rightBound(21,false)
PASS keyRange.right is 21
PASS keyRange.left is null
@@ -50,7 +50,7 @@ PASS keyRange.flags is keyRange.RIGHT_BOUND
IDBKeyRange.rightBound('ba',true)
PASS keyRange.right is 'ba'
PASS keyRange.left is null
-PASS keyRange.flags is keyRange.RIGHT_OPEN
+PASS keyRange.flags is keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND
IDBKeyRange.rightBound('bb',false)
PASS keyRange.right is 'bb'
PASS keyRange.left is null
@@ -73,17 +73,17 @@ IDBKeyRange.bound(32,42,false,true)
PASS keyRange.left is 32
PASS keyRange.right is 42
PASS leftFlags is keyRange.LEFT_BOUND
-PASS rightFlags is keyRange.RIGHT_OPEN
+PASS rightFlags is keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND
IDBKeyRange.bound(33,43,true,false)
PASS keyRange.left is 33
PASS keyRange.right is 43
-PASS leftFlags is keyRange.LEFT_OPEN
+PASS leftFlags is keyRange.LEFT_OPEN | keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
IDBKeyRange.bound(34,44,true,true)
PASS keyRange.left is 34
PASS keyRange.right is 44
-PASS leftFlags is keyRange.LEFT_OPEN
-PASS rightFlags is keyRange.RIGHT_OPEN
+PASS leftFlags is keyRange.LEFT_OPEN | keyRange.LEFT_BOUND
+PASS rightFlags is keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND
IDBKeyRange.bound('aaa','aba',false,false)
PASS keyRange.left is 'aaa'
PASS keyRange.right is 'aba'
@@ -103,17 +103,17 @@ IDBKeyRange.bound('aad','abd',false,true)
PASS keyRange.left is 'aad'
PASS keyRange.right is 'abd'
PASS leftFlags is keyRange.LEFT_BOUND
-PASS rightFlags is keyRange.RIGHT_OPEN
+PASS rightFlags is keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND
IDBKeyRange.bound('aae','abe',true,false)
PASS keyRange.left is 'aae'
PASS keyRange.right is 'abe'
-PASS leftFlags is keyRange.LEFT_OPEN
+PASS leftFlags is keyRange.LEFT_OPEN | keyRange.LEFT_BOUND
PASS rightFlags is keyRange.RIGHT_BOUND
IDBKeyRange.bound('aaf','abf',true,true)
PASS keyRange.left is 'aaf'
PASS keyRange.right is 'abf'
-PASS leftFlags is keyRange.LEFT_OPEN
-PASS rightFlags is keyRange.RIGHT_OPEN
+PASS leftFlags is keyRange.LEFT_OPEN | keyRange.LEFT_BOUND
+PASS rightFlags is keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt b/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt
new file mode 100644
index 0000000..ce5514a
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/objectstore-cursor-expected.txt
@@ -0,0 +1,886 @@
+Test IndexedDB's objectStore.openCursor + the cursor it produces in depth.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+indexedDB.open('someDB', 'some description')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+db = event.result
+db.createObjectStore('someObjectStore')
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore = event.result
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Success event fired:
+PASS 'result' in event is true
+PASS 'code' in event is false
+PASS 'message' in event is false
+PASS 'source' in event is true
+PASS event.source != null is true
+PASS 'onsuccess' in event.target is true
+PASS 'onerror' in event.target is true
+PASS 'abort' in event.target is true
+PASS 'readyState' in event.target is true
+PASS event.target.readyState is event.target.DONE
+
+objectStore.add('', testData[nextToAdd])
+PASS 'onsuccess' in result is true
+PASS 'onerror' in result is true
+PASS 'abort' in result is true
+PASS 'readyState' in result is true
+An event should fire shortly...
+
+Scheduling tests...
+Running tests...
+
+Next test: lower open bound is 0; sorted ascending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 0; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 0; sorted ascending.
+PASS event.result is null
+
+Next test: upper bound is 0; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 0; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: lower bound is 0; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper open bound is 0; sorted descending.
+PASS event.result is null
+
+Next test: upper bound is 0; sorted descending.
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 0; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 0; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 0; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 0; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 0; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: lower open bound is 0; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: lower bound is 0; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower bound is 0; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 1; sorted ascending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 1; sorted ascending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 1; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 1; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: lower open bound is 1; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: lower bound is 1; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: upper open bound is 1; sorted descending.
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 1; sorted descending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 1; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 1; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 1; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 1; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 1; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: lower open bound is 1; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: lower bound is 1; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: lower bound is 1; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: lower open bound is 2; sorted ascending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 2; sorted ascending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 2; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result is null
+
+Next test: upper bound is 2; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: lower open bound is 2; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: lower bound is 2; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: upper open bound is 2; sorted descending.
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 2; sorted descending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 2; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 2; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 2; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 2; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 2; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: lower open bound is 2; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: lower bound is 2; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: lower bound is 2; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: lower open bound is 3; sorted ascending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 3; sorted ascending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 3; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result is null
+
+Next test: upper bound is 3; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: lower open bound is 3; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: lower bound is 3; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: upper open bound is 3; sorted descending.
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 3; sorted descending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 3; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 3; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 3; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 3; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 3; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: lower open bound is 3; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: lower bound is 3; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: lower bound is 3; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: lower open bound is 4; sorted ascending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 4; sorted ascending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 4; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result is null
+
+Next test: upper bound is 4; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: lower open bound is 4; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 4; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: upper open bound is 4; sorted descending.
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 4; sorted descending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 4; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 4; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 4; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 4; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 4; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 4; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 4; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: lower bound is 4; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: lower open bound is 5; sorted ascending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 5; sorted ascending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 5; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result is null
+
+Next test: upper bound is 5; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 5; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 5; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: upper open bound is 5; sorted descending.
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 5; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 5; upper open bound is 6; sorted ascending.
+PASS event.result is null
+
+Next test: lower open bound is 5; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 5; upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 5; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 5; upper open bound is 6; sorted descending.
+PASS event.result is null
+
+Next test: lower open bound is 5; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower bound is 5; upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower bound is 5; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: lower open bound is 6; sorted ascending.
+PASS event.result is null
+
+Next test: lower bound is 6; sorted ascending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 6; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result is null
+
+Next test: upper bound is 6; sorted ascending.
+PASS event.result.key is testData[0]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 6; sorted descending.
+PASS event.result is null
+
+Next test: lower bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: upper open bound is 6; sorted descending.
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result.key is testData[5]
+PASS event.result.key is testData[4]
+PASS event.result.key is testData[3]
+PASS event.result.key is testData[2]
+PASS event.result.key is testData[1]
+PASS event.result.key is testData[0]
+PASS event.result is null
+
+Next test: lower open bound is 6; upper open bound is 6; sorted ascending.
+PASS event.result is null
+
+Next test: lower open bound is 6; upper bound is 6; sorted ascending.
+PASS event.result is null
+
+Next test: lower bound is 6; upper open bound is 6; sorted ascending.
+PASS event.result is null
+
+Next test: lower bound is 6; upper bound is 6; sorted ascending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+
+Next test: lower open bound is 6; upper open bound is 6; sorted descending.
+PASS event.result is null
+
+Next test: lower open bound is 6; upper bound is 6; sorted descending.
+PASS event.result is null
+
+Next test: lower bound is 6; upper open bound is 6; sorted descending.
+PASS event.result is null
+
+Next test: lower bound is 6; upper bound is 6; sorted descending.
+PASS event.result.key is testData[6]
+PASS event.result is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/storage/indexeddb/objectstore-cursor.html b/LayoutTests/storage/indexeddb/objectstore-cursor.html
new file mode 100644
index 0000000..bc69b43
--- /dev/null
+++ b/LayoutTests/storage/indexeddb/objectstore-cursor.html
@@ -0,0 +1,209 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../../fast/js/resources/js-test-post-function.js"></script>
+<script src="resources/shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+
+description("Test IndexedDB's objectStore.openCursor + the cursor it produces in depth.");
+if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+// In order of how it should be sorted by IndexedDB.
+window.testData = [
+ null,
+ 2,
+ 3,
+ 10,
+ // FIXME: Dates.
+ "A bigger string",
+ "The biggest",
+ "a low string"
+];
+
+function openDatabase()
+{
+ result = evalAndLog("indexedDB.open('someDB', 'some description')");
+ verifyResult(result);
+ result.onsuccess = openObjectStore;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function openObjectStore()
+{
+ verifySuccessEvent(event);
+ window.db = evalAndLog("db = event.result");
+
+ deleteAllObjectStores(db);
+
+ result = evalAndLog("db.createObjectStore('someObjectStore')");
+ verifyResult(result);
+ result.onsuccess = startAddingData;
+ result.onerror = unexpectedErrorCallback;
+}
+
+function startAddingData()
+{
+ verifySuccessEvent(event);
+ window.objectStore = evalAndLog("objectStore = event.result");
+
+ window.nextToAdd = 0;
+ addData();
+}
+
+function addData()
+{
+ // We cheat when called for the first time; we're in the context of the objectStore success event.
+ verifySuccessEvent(event);
+
+ result = evalAndLog("objectStore.add('', testData[nextToAdd])");
+ verifyResult(result);
+ result.onsuccess = ++window.nextToAdd < testData.length ? addData : scheduleTests;
+}
+
+function scheduleTests()
+{
+ debug("Scheduling tests...");
+ window.scheduledTests = [];
+ for (var i = 0; i < testData.length; ++i) {
+ /* left bound, is open, right bound, is open, ascending */
+ scheduledTests.unshift([i, true, null, null, true]);
+ scheduledTests.unshift([i, false, null, null, true]);
+ scheduledTests.unshift([null, null, i, true, true]);
+ scheduledTests.unshift([null, null, i, false, true]);
+ scheduledTests.unshift([i, true, null, null, false]);
+ scheduledTests.unshift([i, false, null, null, false]);
+ scheduledTests.unshift([null, null, i, true, false]);
+ scheduledTests.unshift([null, null, i, false, false]);
+ for (var j = 6; j < testData.length; ++j) {
+ scheduledTests.unshift([i, true, j, true, true]);
+ scheduledTests.unshift([i, true, j, false, true]);
+ scheduledTests.unshift([i, false, j, true, true]);
+ scheduledTests.unshift([i, false, j, false, true]);
+ scheduledTests.unshift([i, true, j, true, false]);
+ scheduledTests.unshift([i, true, j, false, false]);
+ scheduledTests.unshift([i, false, j, true, false]);
+ scheduledTests.unshift([i, false, j, false, false]);
+ }
+ }
+
+ debug("Running tests...");
+ setTimeout(runNextTest, 0);
+}
+
+function runNextTest()
+{
+ if (!scheduledTests.length) {
+ done();
+ return;
+ }
+
+ var test = scheduledTests.pop();
+ window.lower = test[0];
+ window.lowerIsOpen = test[1];
+ window.upper = test[2];
+ window.upperIsOpen = test[3];
+ window.ascending = test[4];
+
+ str = "Next test: ";
+ if (lower !== null) {
+ str += "lower ";
+ if (lowerIsOpen)
+ str += "open ";
+ str += "bound is " + lower + "; ";
+ }
+ if (upper !== null) {
+ str += "upper ";
+ if (upperIsOpen)
+ str += "open ";
+ str += "bound is " + upper + "; ";
+ }
+ if (ascending)
+ str += "sorted ascending.";
+ else
+ str += "sorted descending.";
+
+ debug("");
+ debug(str);
+
+ if (ascending) {
+ if (lower !== null) {
+ if (!lowerIsOpen)
+ window.expectedIndex = lower;
+ else
+ window.expectedIndex = lower+1;
+ } else
+ window.expectedIndex = 0;
+ } else {
+ if (upper !== null) {
+ if (!upperIsOpen)
+ window.expectedIndex = upper;
+ else
+ window.expectedIndex = upper-1;
+ } else
+ window.expectedIndex = testData.length-1;
+ }
+ testWithinBounds();
+
+ var keyRange;
+ if (lower !== null && upper !== null)
+ keyRange = IDBKeyRange.bound(testData[lower], testData[upper], lowerIsOpen, upperIsOpen);
+ else if (lower !== null)
+ keyRange = IDBKeyRange.leftBound(testData[lower], lowerIsOpen);
+ else
+ keyRange = IDBKeyRange.rightBound(testData[upper], upperIsOpen);
+
+ // FIXME: Should be IDBCursor.NEXT : IDBCursor.PREV, but we can't do that yet.
+ var request = objectStore.openCursor(keyRange, ascending ? 0 : 2);
+ request.onsuccess = cursorIteration;
+ request.onerror = unexpectedErrorCallback;
+}
+
+function testWithinBounds()
+{
+ if (expectedIndex < 0 || testData.length <= expectedIndex)
+ window.expectedIndex = null;
+ if (lower !== null && expectedIndex < lower)
+ window.expectedIndex = null;
+ if (upper !== null && upper < expectedIndex)
+ window.expectedIndex = null;
+ if (lower !== null && lowerIsOpen && expectedIndex <= lower)
+ window.expectedIndex = null;
+ if (upper !== null && upperIsOpen && upper <= expectedIndex)
+ window.expectedIndex = null;
+}
+
+function cursorIteration()
+{
+ if (expectedIndex === null) {
+ shouldBeNull("event.result");
+ setTimeout(runNextTest, 0);
+ return;
+ }
+ if (event.result === null) {
+ testFailed("Event.result should not be null.")
+ setTimeout(runNextTest, 0);
+ return;
+ }
+
+ shouldBe("event.result.key", "testData[" + expectedIndex + "]");
+ window.expectedIndex = ascending ? expectedIndex+1 : expectedIndex-1;
+ testWithinBounds();
+
+ request = event.result.continue();
+ // FIXME: The spec says we should not return an IDBRequest and instead re-use the original request.
+ request.onsuccess = cursorIteration;
+ request.onerror = unexpectedErrorCallback;
+}
+
+openDatabase(); // The first step.
+var successfullyParsed = true;
+
+</script>
+</body>
+</html>
diff --git a/LayoutTests/storage/indexeddb/open-cursor-expected.txt b/LayoutTests/storage/indexeddb/open-cursor-expected.txt
index ac58785..e4ddc69 100644
--- a/LayoutTests/storage/indexeddb/open-cursor-expected.txt
+++ b/LayoutTests/storage/indexeddb/open-cursor-expected.txt
@@ -96,7 +96,6 @@ PASS 'abort' in event.target is true
PASS 'readyState' in event.target is true
PASS event.target.readyState is event.target.DONE
-PASS event.result is null
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/storage/indexeddb/script-tests/database-basics.js b/LayoutTests/storage/indexeddb/script-tests/database-basics.js
index a07c684..04ebbd3 100644
--- a/LayoutTests/storage/indexeddb/script-tests/database-basics.js
+++ b/LayoutTests/storage/indexeddb/script-tests/database-basics.js
@@ -8,7 +8,6 @@ function openSuccess()
var db = evalAndLog("db = event.result");
shouldBeEqualToString("db.name", "name");
- shouldBeEqualToString("db.version", "");
shouldBe("db.objectStores", "[]");
shouldBe("db.objectStores.length", "0");
shouldBe("db.objectStores.contains('')", "false");
@@ -16,6 +15,26 @@ function openSuccess()
// FIXME: Test the other properties of IDBDatabase as they're written.
+ debug("");
+ debug("Testing setVersion.");
+ result = evalAndLog('db.setVersion("version a")');
+ verifyResult(result);
+ result.onsuccess = setVersionAgain;
+ result.onError = unexpectedErrorCallback;
+}
+
+function setVersionAgain()
+{
+ result = evalAndLog('db.setVersion("version b")');
+ verifyResult(result);
+ result.onsuccess = checkVersion;
+ result.onError = unexpectedErrorCallback;
+}
+
+function checkVersion()
+{
+ shouldBeEqualToString("db.version", "version b");
+
done();
}
diff --git a/LayoutTests/storage/indexeddb/script-tests/keyrange.js b/LayoutTests/storage/indexeddb/script-tests/keyrange.js
index 26d283f..907d817 100644
--- a/LayoutTests/storage/indexeddb/script-tests/keyrange.js
+++ b/LayoutTests/storage/indexeddb/script-tests/keyrange.js
@@ -15,7 +15,7 @@ function checkLeftBoundKeyRange(value, open)
keyRange = evalAndLog("IDBKeyRange.leftBound(" + value + "," + open + ")");
shouldBe("keyRange.left", "" + value);
shouldBeNull("keyRange.right");
- shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
+ shouldBe("keyRange.flags", open ? "keyRange.LEFT_OPEN | keyRange.LEFT_BOUND" : "keyRange.LEFT_BOUND");
}
function checkRightBoundKeyRange(value, open)
@@ -23,7 +23,7 @@ function checkRightBoundKeyRange(value, open)
keyRange = evalAndLog("IDBKeyRange.rightBound(" + value + "," + open + ")");
shouldBe("keyRange.right", "" + value);
shouldBeNull("keyRange.left");
- shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
+ shouldBe("keyRange.flags", open ? "keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND" : "keyRange.RIGHT_BOUND");
}
function checkBoundKeyRange(left, right, openLeft, openRight)
@@ -32,9 +32,9 @@ function checkBoundKeyRange(left, right, openLeft, openRight)
shouldBe("keyRange.left", "" + left);
shouldBe("keyRange.right", "" + right);
leftFlags = keyRange.flags & (keyRange.LEFT_OPEN | keyRange.LEFT_BOUND);
- shouldBe("leftFlags", openLeft ? "keyRange.LEFT_OPEN" : "keyRange.LEFT_BOUND");
+ shouldBe("leftFlags", openLeft ? "keyRange.LEFT_OPEN | keyRange.LEFT_BOUND" : "keyRange.LEFT_BOUND");
rightFlags = keyRange.flags & (keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND);
- shouldBe("rightFlags", openRight ? "keyRange.RIGHT_OPEN" : "keyRange.RIGHT_BOUND");
+ shouldBe("rightFlags", openRight ? "keyRange.RIGHT_OPEN | keyRange.RIGHT_BOUND" : "keyRange.RIGHT_BOUND");
}
function test()
diff --git a/LayoutTests/storage/indexeddb/script-tests/open-cursor.js b/LayoutTests/storage/indexeddb/script-tests/open-cursor.js
index ff0b711..53ea96b 100644
--- a/LayoutTests/storage/indexeddb/script-tests/open-cursor.js
+++ b/LayoutTests/storage/indexeddb/script-tests/open-cursor.js
@@ -7,7 +7,6 @@ function emptyCursorSuccess()
debug("Empty cursor opened successfully.")
verifySuccessEvent(event);
// FIXME: check that we can iterate the cursor.
- shouldBe("event.result", "null");
done();
}
@@ -18,6 +17,7 @@ function openEmptyCursor()
result = evalAndLog("objectStore.openCursor(keyRange)");
verifyResult(result);
result.onsuccess = emptyCursorSuccess;
+ result.onerror = unexpectedErrorCallback;
}
function cursorSuccess()
@@ -39,6 +39,7 @@ function openCursor()
result = evalAndLog("objectStore.openCursor(keyRange)");
verifyResult(result);
result.onsuccess = cursorSuccess;
+ result.onerror = unexpectedErrorCallback;
}
function populateObjectStore(objectStore)
diff --git a/SunSpider/ChangeLog b/SunSpider/ChangeLog
index b4bbc3c..faa3002 100644
--- a/SunSpider/ChangeLog
+++ b/SunSpider/ChangeLog
@@ -1,3 +1,32 @@
+2010-08-27 Michael Saboff <msaboff@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ Added version 5 and version 6 of V8 tests with modifications similar
+ to the version 4 tests so they'll work with the SunSpider test harness.
+ Note that these files are external source and therefore don't conform
+ to WebKit coding standards.
+ https://bugs.webkit.org/show_bug.cgi?id=44638
+
+ * tests/v8-v5: Added.
+ * tests/v8-v5/LIST: Added.
+ * tests/v8-v5/v8-crypto.js: Added.
+ * tests/v8-v5/v8-deltablue.js: Added.
+ * tests/v8-v5/v8-earley-boyer.js: Added.
+ * tests/v8-v5/v8-raytrace.js: Added.
+ * tests/v8-v5/v8-regexp.js: Added.
+ * tests/v8-v5/v8-richards.js: Added.
+ * tests/v8-v5/v8-splay.js: Added.
+ * tests/v8-v6: Added.
+ * tests/v8-v6/LIST: Added.
+ * tests/v8-v6/v8-crypto.js: Added.
+ * tests/v8-v6/v8-deltablue.js: Added.
+ * tests/v8-v6/v8-earley-boyer.js: Added.
+ * tests/v8-v6/v8-raytrace.js: Added.
+ * tests/v8-v6/v8-regexp.js: Added.
+ * tests/v8-v6/v8-richards.js: Added.
+ * tests/v8-v6/v8-splay.js: Added.
+
2010-07-15 Stephanie Lewis <slewis@apple.com>
Reviewed by Geoff Garen.
diff --git a/SunSpider/tests/v8-v5/LIST b/SunSpider/tests/v8-v5/LIST
new file mode 100644
index 0000000..117011b
--- /dev/null
+++ b/SunSpider/tests/v8-v5/LIST
@@ -0,0 +1,7 @@
+v8-crypto
+v8-deltablue
+v8-earley-boyer
+v8-raytrace
+v8-regexp
+v8-richards
+v8-splay
diff --git a/SunSpider/tests/v8-v5/v8-crypto.js b/SunSpider/tests/v8-v5/v8-crypto.js
new file mode 100644
index 0000000..98e171d
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-crypto.js
@@ -0,0 +1,1695 @@
+/*
+ * Copyright (c) 2003-2005 Tom Wu
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
+ * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * In addition, the following condition applies:
+ *
+ * All redistributions must retain an intact copy of this copyright notice
+ * and disclaimer.
+ */
+
+// Basic JavaScript BN library - subset useful for RSA encryption.
+
+// Bits per digit
+var dbits;
+var BI_DB;
+var BI_DM;
+var BI_DV;
+
+var BI_FP;
+var BI_FV;
+var BI_F1;
+var BI_F2;
+
+// JavaScript engine analysis
+var canary = 0xdeadbeefcafe;
+var j_lm = ((canary&0xffffff)==0xefcafe);
+
+// (public) Constructor
+function BigInteger(a,b,c) {
+ this.array = new Array();
+ if(a != null)
+ if("number" == typeof a) this.fromNumber(a,b,c);
+ else if(b == null && "string" != typeof a) this.fromString(a,256);
+ else this.fromString(a,b);
+}
+
+// return new, unset BigInteger
+function nbi() { return new BigInteger(null); }
+
+// am: Compute w_j += (x*this_i), propagate carries,
+// c is initial carry, returns final carry.
+// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
+// We need to select the fastest one that works in this environment.
+
+// am1: use a single mult and divide to get the high bits,
+// max digit bits should be 26 because
+// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
+function am1(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+ while(--n >= 0) {
+ var v = x*this_array[i++]+w_array[j]+c;
+ c = Math.floor(v/0x4000000);
+ w_array[j++] = v&0x3ffffff;
+ }
+ return c;
+}
+
+// am2 avoids a big mult-and-extract completely.
+// Max digit bits should be <= 30 because we do bitwise ops
+// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
+function am2(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+ var xl = x&0x7fff, xh = x>>15;
+ while(--n >= 0) {
+ var l = this_array[i]&0x7fff;
+ var h = this_array[i++]>>15;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x7fff)<<15)+w_array[j]+(c&0x3fffffff);
+ c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
+ w_array[j++] = l&0x3fffffff;
+ }
+ return c;
+}
+
+// Alternately, set max digit bits to 28 since some
+// browsers slow down when dealing with 32-bit numbers.
+function am3(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+
+ var xl = x&0x3fff, xh = x>>14;
+ while(--n >= 0) {
+ var l = this_array[i]&0x3fff;
+ var h = this_array[i++]>>14;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x3fff)<<14)+w_array[j]+c;
+ c = (l>>28)+(m>>14)+xh*h;
+ w_array[j++] = l&0xfffffff;
+ }
+ return c;
+}
+
+// This is tailored to VMs with 2-bit tagging. It makes sure
+// that all the computations stay within the 29 bits available.
+function am4(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+
+ var xl = x&0x1fff, xh = x>>13;
+ while(--n >= 0) {
+ var l = this_array[i]&0x1fff;
+ var h = this_array[i++]>>13;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x1fff)<<13)+w_array[j]+c;
+ c = (l>>26)+(m>>13)+xh*h;
+ w_array[j++] = l&0x3ffffff;
+ }
+ return c;
+}
+
+// am3/28 is best for SM, Rhino, but am4/26 is best for v8.
+// Kestrel (Opera 9.5) gets its best result with am4/26.
+// IE7 does 9% better with am3/28 than with am4/26.
+// Firefox (SM) gets 10% faster with am3/28 than with am4/26.
+
+setupEngine = function(fn, bits) {
+ BigInteger.prototype.am = fn;
+ dbits = bits;
+
+ BI_DB = dbits;
+ BI_DM = ((1<<dbits)-1);
+ BI_DV = (1<<dbits);
+
+ BI_FP = 52;
+ BI_FV = Math.pow(2,BI_FP);
+ BI_F1 = BI_FP-dbits;
+ BI_F2 = 2*dbits-BI_FP;
+}
+
+
+// Digit conversions
+var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
+var BI_RC = new Array();
+var rr,vv;
+rr = "0".charCodeAt(0);
+for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
+rr = "a".charCodeAt(0);
+for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
+rr = "A".charCodeAt(0);
+for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
+
+function int2char(n) { return BI_RM.charAt(n); }
+function intAt(s,i) {
+ var c = BI_RC[s.charCodeAt(i)];
+ return (c==null)?-1:c;
+}
+
+// (protected) copy this to r
+function bnpCopyTo(r) {
+ var this_array = this.array;
+ var r_array = r.array;
+
+ for(var i = this.t-1; i >= 0; --i) r_array[i] = this_array[i];
+ r.t = this.t;
+ r.s = this.s;
+}
+
+// (protected) set from integer value x, -DV <= x < DV
+function bnpFromInt(x) {
+ var this_array = this.array;
+ this.t = 1;
+ this.s = (x<0)?-1:0;
+ if(x > 0) this_array[0] = x;
+ else if(x < -1) this_array[0] = x+DV;
+ else this.t = 0;
+}
+
+// return bigint initialized to value
+function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
+
+// (protected) set from string and radix
+function bnpFromString(s,b) {
+ var this_array = this.array;
+ var k;
+ if(b == 16) k = 4;
+ else if(b == 8) k = 3;
+ else if(b == 256) k = 8; // byte array
+ else if(b == 2) k = 1;
+ else if(b == 32) k = 5;
+ else if(b == 4) k = 2;
+ else { this.fromRadix(s,b); return; }
+ this.t = 0;
+ this.s = 0;
+ var i = s.length, mi = false, sh = 0;
+ while(--i >= 0) {
+ var x = (k==8)?s[i]&0xff:intAt(s,i);
+ if(x < 0) {
+ if(s.charAt(i) == "-") mi = true;
+ continue;
+ }
+ mi = false;
+ if(sh == 0)
+ this_array[this.t++] = x;
+ else if(sh+k > BI_DB) {
+ this_array[this.t-1] |= (x&((1<<(BI_DB-sh))-1))<<sh;
+ this_array[this.t++] = (x>>(BI_DB-sh));
+ }
+ else
+ this_array[this.t-1] |= x<<sh;
+ sh += k;
+ if(sh >= BI_DB) sh -= BI_DB;
+ }
+ if(k == 8 && (s[0]&0x80) != 0) {
+ this.s = -1;
+ if(sh > 0) this_array[this.t-1] |= ((1<<(BI_DB-sh))-1)<<sh;
+ }
+ this.clamp();
+ if(mi) BigInteger.ZERO.subTo(this,this);
+}
+
+// (protected) clamp off excess high words
+function bnpClamp() {
+ var this_array = this.array;
+ var c = this.s&BI_DM;
+ while(this.t > 0 && this_array[this.t-1] == c) --this.t;
+}
+
+// (public) return string representation in given radix
+function bnToString(b) {
+ var this_array = this.array;
+ if(this.s < 0) return "-"+this.negate().toString(b);
+ var k;
+ if(b == 16) k = 4;
+ else if(b == 8) k = 3;
+ else if(b == 2) k = 1;
+ else if(b == 32) k = 5;
+ else if(b == 4) k = 2;
+ else return this.toRadix(b);
+ var km = (1<<k)-1, d, m = false, r = "", i = this.t;
+ var p = BI_DB-(i*BI_DB)%k;
+ if(i-- > 0) {
+ if(p < BI_DB && (d = this_array[i]>>p) > 0) { m = true; r = int2char(d); }
+ while(i >= 0) {
+ if(p < k) {
+ d = (this_array[i]&((1<<p)-1))<<(k-p);
+ d |= this_array[--i]>>(p+=BI_DB-k);
+ }
+ else {
+ d = (this_array[i]>>(p-=k))&km;
+ if(p <= 0) { p += BI_DB; --i; }
+ }
+ if(d > 0) m = true;
+ if(m) r += int2char(d);
+ }
+ }
+ return m?r:"0";
+}
+
+// (public) -this
+function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
+
+// (public) |this|
+function bnAbs() { return (this.s<0)?this.negate():this; }
+
+// (public) return + if this > a, - if this < a, 0 if equal
+function bnCompareTo(a) {
+ var this_array = this.array;
+ var a_array = a.array;
+
+ var r = this.s-a.s;
+ if(r != 0) return r;
+ var i = this.t;
+ r = i-a.t;
+ if(r != 0) return r;
+ while(--i >= 0) if((r=this_array[i]-a_array[i]) != 0) return r;
+ return 0;
+}
+
+// returns bit length of the integer x
+function nbits(x) {
+ var r = 1, t;
+ if((t=x>>>16) != 0) { x = t; r += 16; }
+ if((t=x>>8) != 0) { x = t; r += 8; }
+ if((t=x>>4) != 0) { x = t; r += 4; }
+ if((t=x>>2) != 0) { x = t; r += 2; }
+ if((t=x>>1) != 0) { x = t; r += 1; }
+ return r;
+}
+
+// (public) return the number of bits in "this"
+function bnBitLength() {
+ var this_array = this.array;
+ if(this.t <= 0) return 0;
+ return BI_DB*(this.t-1)+nbits(this_array[this.t-1]^(this.s&BI_DM));
+}
+
+// (protected) r = this << n*DB
+function bnpDLShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var i;
+ for(i = this.t-1; i >= 0; --i) r_array[i+n] = this_array[i];
+ for(i = n-1; i >= 0; --i) r_array[i] = 0;
+ r.t = this.t+n;
+ r.s = this.s;
+}
+
+// (protected) r = this >> n*DB
+function bnpDRShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ for(var i = n; i < this.t; ++i) r_array[i-n] = this_array[i];
+ r.t = Math.max(this.t-n,0);
+ r.s = this.s;
+}
+
+// (protected) r = this << n
+function bnpLShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var bs = n%BI_DB;
+ var cbs = BI_DB-bs;
+ var bm = (1<<cbs)-1;
+ var ds = Math.floor(n/BI_DB), c = (this.s<<bs)&BI_DM, i;
+ for(i = this.t-1; i >= 0; --i) {
+ r_array[i+ds+1] = (this_array[i]>>cbs)|c;
+ c = (this_array[i]&bm)<<bs;
+ }
+ for(i = ds-1; i >= 0; --i) r_array[i] = 0;
+ r_array[ds] = c;
+ r.t = this.t+ds+1;
+ r.s = this.s;
+ r.clamp();
+}
+
+// (protected) r = this >> n
+function bnpRShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ r.s = this.s;
+ var ds = Math.floor(n/BI_DB);
+ if(ds >= this.t) { r.t = 0; return; }
+ var bs = n%BI_DB;
+ var cbs = BI_DB-bs;
+ var bm = (1<<bs)-1;
+ r_array[0] = this_array[ds]>>bs;
+ for(var i = ds+1; i < this.t; ++i) {
+ r_array[i-ds-1] |= (this_array[i]&bm)<<cbs;
+ r_array[i-ds] = this_array[i]>>bs;
+ }
+ if(bs > 0) r_array[this.t-ds-1] |= (this.s&bm)<<cbs;
+ r.t = this.t-ds;
+ r.clamp();
+}
+
+// (protected) r = this - a
+function bnpSubTo(a,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var a_array = a.array;
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
+ while(i < m) {
+ c += this_array[i]-a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ if(a.t < this.t) {
+ c -= a.s;
+ while(i < this.t) {
+ c += this_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c += this.s;
+ }
+ else {
+ c += this.s;
+ while(i < a.t) {
+ c -= a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c -= a.s;
+ }
+ r.s = (c<0)?-1:0;
+ if(c < -1) r_array[i++] = BI_DV+c;
+ else if(c > 0) r_array[i++] = c;
+ r.t = i;
+ r.clamp();
+}
+
+// (protected) r = this * a, r != this,a (HAC 14.12)
+// "this" should be the larger one if appropriate.
+function bnpMultiplyTo(a,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var x = this.abs(), y = a.abs();
+ var y_array = y.array;
+
+ var i = x.t;
+ r.t = i+y.t;
+ while(--i >= 0) r_array[i] = 0;
+ for(i = 0; i < y.t; ++i) r_array[i+x.t] = x.am(0,y_array[i],r,i,0,x.t);
+ r.s = 0;
+ r.clamp();
+ if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
+}
+
+// (protected) r = this^2, r != this (HAC 14.16)
+function bnpSquareTo(r) {
+ var x = this.abs();
+ var x_array = x.array;
+ var r_array = r.array;
+
+ var i = r.t = 2*x.t;
+ while(--i >= 0) r_array[i] = 0;
+ for(i = 0; i < x.t-1; ++i) {
+ var c = x.am(i,x_array[i],r,2*i,0,1);
+ if((r_array[i+x.t]+=x.am(i+1,2*x_array[i],r,2*i+1,c,x.t-i-1)) >= BI_DV) {
+ r_array[i+x.t] -= BI_DV;
+ r_array[i+x.t+1] = 1;
+ }
+ }
+ if(r.t > 0) r_array[r.t-1] += x.am(i,x_array[i],r,2*i,0,1);
+ r.s = 0;
+ r.clamp();
+}
+
+// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
+// r != q, this != m. q or r may be null.
+function bnpDivRemTo(m,q,r) {
+ var pm = m.abs();
+ if(pm.t <= 0) return;
+ var pt = this.abs();
+ if(pt.t < pm.t) {
+ if(q != null) q.fromInt(0);
+ if(r != null) this.copyTo(r);
+ return;
+ }
+ if(r == null) r = nbi();
+ var y = nbi(), ts = this.s, ms = m.s;
+ var pm_array = pm.array;
+ var nsh = BI_DB-nbits(pm_array[pm.t-1]); // normalize modulus
+ if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
+ else { pm.copyTo(y); pt.copyTo(r); }
+ var ys = y.t;
+
+ var y_array = y.array;
+ var y0 = y_array[ys-1];
+ if(y0 == 0) return;
+ var yt = y0*(1<<BI_F1)+((ys>1)?y_array[ys-2]>>BI_F2:0);
+ var d1 = BI_FV/yt, d2 = (1<<BI_F1)/yt, e = 1<<BI_F2;
+ var i = r.t, j = i-ys, t = (q==null)?nbi():q;
+ y.dlShiftTo(j,t);
+
+ var r_array = r.array;
+ if(r.compareTo(t) >= 0) {
+ r_array[r.t++] = 1;
+ r.subTo(t,r);
+ }
+ BigInteger.ONE.dlShiftTo(ys,t);
+ t.subTo(y,y); // "negative" y so we can replace sub with am later
+ while(y.t < ys) y_array[y.t++] = 0;
+ while(--j >= 0) {
+ // Estimate quotient digit
+ var qd = (r_array[--i]==y0)?BI_DM:Math.floor(r_array[i]*d1+(r_array[i-1]+e)*d2);
+ if((r_array[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
+ y.dlShiftTo(j,t);
+ r.subTo(t,r);
+ while(r_array[i] < --qd) r.subTo(t,r);
+ }
+ }
+ if(q != null) {
+ r.drShiftTo(ys,q);
+ if(ts != ms) BigInteger.ZERO.subTo(q,q);
+ }
+ r.t = ys;
+ r.clamp();
+ if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
+ if(ts < 0) BigInteger.ZERO.subTo(r,r);
+}
+
+// (public) this mod a
+function bnMod(a) {
+ var r = nbi();
+ this.abs().divRemTo(a,null,r);
+ if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
+ return r;
+}
+
+// Modular reduction using "classic" algorithm
+function Classic(m) { this.m = m; }
+function cConvert(x) {
+ if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
+ else return x;
+}
+function cRevert(x) { return x; }
+function cReduce(x) { x.divRemTo(this.m,null,x); }
+function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+Classic.prototype.convert = cConvert;
+Classic.prototype.revert = cRevert;
+Classic.prototype.reduce = cReduce;
+Classic.prototype.mulTo = cMulTo;
+Classic.prototype.sqrTo = cSqrTo;
+
+// (protected) return "-1/this % 2^DB"; useful for Mont. reduction
+// justification:
+// xy == 1 (mod m)
+// xy = 1+km
+// xy(2-xy) = (1+km)(1-km)
+// x[y(2-xy)] = 1-k^2m^2
+// x[y(2-xy)] == 1 (mod m^2)
+// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
+// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
+// JS multiply "overflows" differently from C/C++, so care is needed here.
+function bnpInvDigit() {
+ var this_array = this.array;
+ if(this.t < 1) return 0;
+ var x = this_array[0];
+ if((x&1) == 0) return 0;
+ var y = x&3; // y == 1/x mod 2^2
+ y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
+ y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
+ y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
+ // last step - calculate inverse mod DV directly;
+ // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
+ y = (y*(2-x*y%BI_DV))%BI_DV; // y == 1/x mod 2^dbits
+ // we really want the negative inverse, and -DV < y < DV
+ return (y>0)?BI_DV-y:-y;
+}
+
+// Montgomery reduction
+function Montgomery(m) {
+ this.m = m;
+ this.mp = m.invDigit();
+ this.mpl = this.mp&0x7fff;
+ this.mph = this.mp>>15;
+ this.um = (1<<(BI_DB-15))-1;
+ this.mt2 = 2*m.t;
+}
+
+// xR mod m
+function montConvert(x) {
+ var r = nbi();
+ x.abs().dlShiftTo(this.m.t,r);
+ r.divRemTo(this.m,null,r);
+ if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
+ return r;
+}
+
+// x/R mod m
+function montRevert(x) {
+ var r = nbi();
+ x.copyTo(r);
+ this.reduce(r);
+ return r;
+}
+
+// x = x/R mod m (HAC 14.32)
+function montReduce(x) {
+ var x_array = x.array;
+ while(x.t <= this.mt2) // pad x so am has enough room later
+ x_array[x.t++] = 0;
+ for(var i = 0; i < this.m.t; ++i) {
+ // faster way of calculating u0 = x[i]*mp mod DV
+ var j = x_array[i]&0x7fff;
+ var u0 = (j*this.mpl+(((j*this.mph+(x_array[i]>>15)*this.mpl)&this.um)<<15))&BI_DM;
+ // use am to combine the multiply-shift-add into one call
+ j = i+this.m.t;
+ x_array[j] += this.m.am(0,u0,x,i,0,this.m.t);
+ // propagate carry
+ while(x_array[j] >= BI_DV) { x_array[j] -= BI_DV; x_array[++j]++; }
+ }
+ x.clamp();
+ x.drShiftTo(this.m.t,x);
+ if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
+}
+
+// r = "x^2/R mod m"; x != r
+function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+// r = "xy/R mod m"; x,y != r
+function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+
+Montgomery.prototype.convert = montConvert;
+Montgomery.prototype.revert = montRevert;
+Montgomery.prototype.reduce = montReduce;
+Montgomery.prototype.mulTo = montMulTo;
+Montgomery.prototype.sqrTo = montSqrTo;
+
+// (protected) true iff this is even
+function bnpIsEven() {
+ var this_array = this.array;
+ return ((this.t>0)?(this_array[0]&1):this.s) == 0;
+}
+
+// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
+function bnpExp(e,z) {
+ if(e > 0xffffffff || e < 1) return BigInteger.ONE;
+ var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
+ g.copyTo(r);
+ while(--i >= 0) {
+ z.sqrTo(r,r2);
+ if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
+ else { var t = r; r = r2; r2 = t; }
+ }
+ return z.revert(r);
+}
+
+// (public) this^e % m, 0 <= e < 2^32
+function bnModPowInt(e,m) {
+ var z;
+ if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
+ return this.exp(e,z);
+}
+
+// protected
+BigInteger.prototype.copyTo = bnpCopyTo;
+BigInteger.prototype.fromInt = bnpFromInt;
+BigInteger.prototype.fromString = bnpFromString;
+BigInteger.prototype.clamp = bnpClamp;
+BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
+BigInteger.prototype.drShiftTo = bnpDRShiftTo;
+BigInteger.prototype.lShiftTo = bnpLShiftTo;
+BigInteger.prototype.rShiftTo = bnpRShiftTo;
+BigInteger.prototype.subTo = bnpSubTo;
+BigInteger.prototype.multiplyTo = bnpMultiplyTo;
+BigInteger.prototype.squareTo = bnpSquareTo;
+BigInteger.prototype.divRemTo = bnpDivRemTo;
+BigInteger.prototype.invDigit = bnpInvDigit;
+BigInteger.prototype.isEven = bnpIsEven;
+BigInteger.prototype.exp = bnpExp;
+
+// public
+BigInteger.prototype.toString = bnToString;
+BigInteger.prototype.negate = bnNegate;
+BigInteger.prototype.abs = bnAbs;
+BigInteger.prototype.compareTo = bnCompareTo;
+BigInteger.prototype.bitLength = bnBitLength;
+BigInteger.prototype.mod = bnMod;
+BigInteger.prototype.modPowInt = bnModPowInt;
+
+// "constants"
+BigInteger.ZERO = nbv(0);
+BigInteger.ONE = nbv(1);
+// Copyright (c) 2005 Tom Wu
+// All Rights Reserved.
+// See "LICENSE" for details.
+
+// Extended JavaScript BN functions, required for RSA private ops.
+
+// (public)
+function bnClone() { var r = nbi(); this.copyTo(r); return r; }
+
+// (public) return value as integer
+function bnIntValue() {
+ var this_array = this.array;
+ if(this.s < 0) {
+ if(this.t == 1) return this_array[0]-BI_DV;
+ else if(this.t == 0) return -1;
+ }
+ else if(this.t == 1) return this_array[0];
+ else if(this.t == 0) return 0;
+ // assumes 16 < DB < 32
+ return ((this_array[1]&((1<<(32-BI_DB))-1))<<BI_DB)|this_array[0];
+}
+
+// (public) return value as byte
+function bnByteValue() {
+ var this_array = this.array;
+ return (this.t==0)?this.s:(this_array[0]<<24)>>24;
+}
+
+// (public) return value as short (assumes DB>=16)
+function bnShortValue() {
+ var this_array = this.array;
+ return (this.t==0)?this.s:(this_array[0]<<16)>>16;
+}
+
+// (protected) return x s.t. r^x < DV
+function bnpChunkSize(r) { return Math.floor(Math.LN2*BI_DB/Math.log(r)); }
+
+// (public) 0 if this == 0, 1 if this > 0
+function bnSigNum() {
+ var this_array = this.array;
+ if(this.s < 0) return -1;
+ else if(this.t <= 0 || (this.t == 1 && this_array[0] <= 0)) return 0;
+ else return 1;
+}
+
+// (protected) convert to radix string
+function bnpToRadix(b) {
+ if(b == null) b = 10;
+ if(this.signum() == 0 || b < 2 || b > 36) return "0";
+ var cs = this.chunkSize(b);
+ var a = Math.pow(b,cs);
+ var d = nbv(a), y = nbi(), z = nbi(), r = "";
+ this.divRemTo(d,y,z);
+ while(y.signum() > 0) {
+ r = (a+z.intValue()).toString(b).substr(1) + r;
+ y.divRemTo(d,y,z);
+ }
+ return z.intValue().toString(b) + r;
+}
+
+// (protected) convert from radix string
+function bnpFromRadix(s,b) {
+ this.fromInt(0);
+ if(b == null) b = 10;
+ var cs = this.chunkSize(b);
+ var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
+ for(var i = 0; i < s.length; ++i) {
+ var x = intAt(s,i);
+ if(x < 0) {
+ if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
+ continue;
+ }
+ w = b*w+x;
+ if(++j >= cs) {
+ this.dMultiply(d);
+ this.dAddOffset(w,0);
+ j = 0;
+ w = 0;
+ }
+ }
+ if(j > 0) {
+ this.dMultiply(Math.pow(b,j));
+ this.dAddOffset(w,0);
+ }
+ if(mi) BigInteger.ZERO.subTo(this,this);
+}
+
+// (protected) alternate constructor
+function bnpFromNumber(a,b,c) {
+ if("number" == typeof b) {
+ // new BigInteger(int,int,RNG)
+ if(a < 2) this.fromInt(1);
+ else {
+ this.fromNumber(a,c);
+ if(!this.testBit(a-1)) // force MSB set
+ this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
+ if(this.isEven()) this.dAddOffset(1,0); // force odd
+ while(!this.isProbablePrime(b)) {
+ this.dAddOffset(2,0);
+ if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
+ }
+ }
+ }
+ else {
+ // new BigInteger(int,RNG)
+ var x = new Array(), t = a&7;
+ x.length = (a>>3)+1;
+ b.nextBytes(x);
+ if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;
+ this.fromString(x,256);
+ }
+}
+
+// (public) convert to bigendian byte array
+function bnToByteArray() {
+ var this_array = this.array;
+ var i = this.t, r = new Array();
+ r[0] = this.s;
+ var p = BI_DB-(i*BI_DB)%8, d, k = 0;
+ if(i-- > 0) {
+ if(p < BI_DB && (d = this_array[i]>>p) != (this.s&BI_DM)>>p)
+ r[k++] = d|(this.s<<(BI_DB-p));
+ while(i >= 0) {
+ if(p < 8) {
+ d = (this_array[i]&((1<<p)-1))<<(8-p);
+ d |= this_array[--i]>>(p+=BI_DB-8);
+ }
+ else {
+ d = (this_array[i]>>(p-=8))&0xff;
+ if(p <= 0) { p += BI_DB; --i; }
+ }
+ if((d&0x80) != 0) d |= -256;
+ if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
+ if(k > 0 || d != this.s) r[k++] = d;
+ }
+ }
+ return r;
+}
+
+function bnEquals(a) { return(this.compareTo(a)==0); }
+function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
+function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
+
+// (protected) r = this op a (bitwise)
+function bnpBitwiseTo(a,op,r) {
+ var this_array = this.array;
+ var a_array = a.array;
+ var r_array = r.array;
+ var i, f, m = Math.min(a.t,this.t);
+ for(i = 0; i < m; ++i) r_array[i] = op(this_array[i],a_array[i]);
+ if(a.t < this.t) {
+ f = a.s&BI_DM;
+ for(i = m; i < this.t; ++i) r_array[i] = op(this_array[i],f);
+ r.t = this.t;
+ }
+ else {
+ f = this.s&BI_DM;
+ for(i = m; i < a.t; ++i) r_array[i] = op(f,a_array[i]);
+ r.t = a.t;
+ }
+ r.s = op(this.s,a.s);
+ r.clamp();
+}
+
+// (public) this & a
+function op_and(x,y) { return x&y; }
+function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
+
+// (public) this | a
+function op_or(x,y) { return x|y; }
+function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
+
+// (public) this ^ a
+function op_xor(x,y) { return x^y; }
+function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
+
+// (public) this & ~a
+function op_andnot(x,y) { return x&~y; }
+function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
+
+// (public) ~this
+function bnNot() {
+ var this_array = this.array;
+ var r = nbi();
+ var r_array = r.array;
+
+ for(var i = 0; i < this.t; ++i) r_array[i] = BI_DM&~this_array[i];
+ r.t = this.t;
+ r.s = ~this.s;
+ return r;
+}
+
+// (public) this << n
+function bnShiftLeft(n) {
+ var r = nbi();
+ if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
+ return r;
+}
+
+// (public) this >> n
+function bnShiftRight(n) {
+ var r = nbi();
+ if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
+ return r;
+}
+
+// return index of lowest 1-bit in x, x < 2^31
+function lbit(x) {
+ if(x == 0) return -1;
+ var r = 0;
+ if((x&0xffff) == 0) { x >>= 16; r += 16; }
+ if((x&0xff) == 0) { x >>= 8; r += 8; }
+ if((x&0xf) == 0) { x >>= 4; r += 4; }
+ if((x&3) == 0) { x >>= 2; r += 2; }
+ if((x&1) == 0) ++r;
+ return r;
+}
+
+// (public) returns index of lowest 1-bit (or -1 if none)
+function bnGetLowestSetBit() {
+ var this_array = this.array;
+ for(var i = 0; i < this.t; ++i)
+ if(this_array[i] != 0) return i*BI_DB+lbit(this_array[i]);
+ if(this.s < 0) return this.t*BI_DB;
+ return -1;
+}
+
+// return number of 1 bits in x
+function cbit(x) {
+ var r = 0;
+ while(x != 0) { x &= x-1; ++r; }
+ return r;
+}
+
+// (public) return number of set bits
+function bnBitCount() {
+ var r = 0, x = this.s&BI_DM;
+ for(var i = 0; i < this.t; ++i) r += cbit(this_array[i]^x);
+ return r;
+}
+
+// (public) true iff nth bit is set
+function bnTestBit(n) {
+ var this_array = this.array;
+ var j = Math.floor(n/BI_DB);
+ if(j >= this.t) return(this.s!=0);
+ return((this_array[j]&(1<<(n%BI_DB)))!=0);
+}
+
+// (protected) this op (1<<n)
+function bnpChangeBit(n,op) {
+ var r = BigInteger.ONE.shiftLeft(n);
+ this.bitwiseTo(r,op,r);
+ return r;
+}
+
+// (public) this | (1<<n)
+function bnSetBit(n) { return this.changeBit(n,op_or); }
+
+// (public) this & ~(1<<n)
+function bnClearBit(n) { return this.changeBit(n,op_andnot); }
+
+// (public) this ^ (1<<n)
+function bnFlipBit(n) { return this.changeBit(n,op_xor); }
+
+// (protected) r = this + a
+function bnpAddTo(a,r) {
+ var this_array = this.array;
+ var a_array = a.array;
+ var r_array = r.array;
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
+ while(i < m) {
+ c += this_array[i]+a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ if(a.t < this.t) {
+ c += a.s;
+ while(i < this.t) {
+ c += this_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c += this.s;
+ }
+ else {
+ c += this.s;
+ while(i < a.t) {
+ c += a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c += a.s;
+ }
+ r.s = (c<0)?-1:0;
+ if(c > 0) r_array[i++] = c;
+ else if(c < -1) r_array[i++] = BI_DV+c;
+ r.t = i;
+ r.clamp();
+}
+
+// (public) this + a
+function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
+
+// (public) this - a
+function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
+
+// (public) this * a
+function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
+
+// (public) this / a
+function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
+
+// (public) this % a
+function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
+
+// (public) [this/a,this%a]
+function bnDivideAndRemainder(a) {
+ var q = nbi(), r = nbi();
+ this.divRemTo(a,q,r);
+ return new Array(q,r);
+}
+
+// (protected) this *= n, this >= 0, 1 < n < DV
+function bnpDMultiply(n) {
+ var this_array = this.array;
+ this_array[this.t] = this.am(0,n-1,this,0,0,this.t);
+ ++this.t;
+ this.clamp();
+}
+
+// (protected) this += n << w words, this >= 0
+function bnpDAddOffset(n,w) {
+ var this_array = this.array;
+ while(this.t <= w) this_array[this.t++] = 0;
+ this_array[w] += n;
+ while(this_array[w] >= BI_DV) {
+ this_array[w] -= BI_DV;
+ if(++w >= this.t) this_array[this.t++] = 0;
+ ++this_array[w];
+ }
+}
+
+// A "null" reducer
+function NullExp() {}
+function nNop(x) { return x; }
+function nMulTo(x,y,r) { x.multiplyTo(y,r); }
+function nSqrTo(x,r) { x.squareTo(r); }
+
+NullExp.prototype.convert = nNop;
+NullExp.prototype.revert = nNop;
+NullExp.prototype.mulTo = nMulTo;
+NullExp.prototype.sqrTo = nSqrTo;
+
+// (public) this^e
+function bnPow(e) { return this.exp(e,new NullExp()); }
+
+// (protected) r = lower n words of "this * a", a.t <= n
+// "this" should be the larger one if appropriate.
+function bnpMultiplyLowerTo(a,n,r) {
+ var r_array = r.array;
+ var a_array = a.array;
+ var i = Math.min(this.t+a.t,n);
+ r.s = 0; // assumes a,this >= 0
+ r.t = i;
+ while(i > 0) r_array[--i] = 0;
+ var j;
+ for(j = r.t-this.t; i < j; ++i) r_array[i+this.t] = this.am(0,a_array[i],r,i,0,this.t);
+ for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a_array[i],r,i,0,n-i);
+ r.clamp();
+}
+
+// (protected) r = "this * a" without lower n words, n > 0
+// "this" should be the larger one if appropriate.
+function bnpMultiplyUpperTo(a,n,r) {
+ var r_array = r.array;
+ var a_array = a.array;
+ --n;
+ var i = r.t = this.t+a.t-n;
+ r.s = 0; // assumes a,this >= 0
+ while(--i >= 0) r_array[i] = 0;
+ for(i = Math.max(n-this.t,0); i < a.t; ++i)
+ r_array[this.t+i-n] = this.am(n-i,a_array[i],r,0,0,this.t+i-n);
+ r.clamp();
+ r.drShiftTo(1,r);
+}
+
+// Barrett modular reduction
+function Barrett(m) {
+ // setup Barrett
+ this.r2 = nbi();
+ this.q3 = nbi();
+ BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
+ this.mu = this.r2.divide(m);
+ this.m = m;
+}
+
+function barrettConvert(x) {
+ if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
+ else if(x.compareTo(this.m) < 0) return x;
+ else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
+}
+
+function barrettRevert(x) { return x; }
+
+// x = x mod m (HAC 14.42)
+function barrettReduce(x) {
+ x.drShiftTo(this.m.t-1,this.r2);
+ if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
+ this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
+ this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
+ while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
+ x.subTo(this.r2,x);
+ while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
+}
+
+// r = x^2 mod m; x != r
+function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+// r = x*y mod m; x,y != r
+function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+
+Barrett.prototype.convert = barrettConvert;
+Barrett.prototype.revert = barrettRevert;
+Barrett.prototype.reduce = barrettReduce;
+Barrett.prototype.mulTo = barrettMulTo;
+Barrett.prototype.sqrTo = barrettSqrTo;
+
+// (public) this^e % m (HAC 14.85)
+function bnModPow(e,m) {
+ var e_array = e.array;
+ var i = e.bitLength(), k, r = nbv(1), z;
+ if(i <= 0) return r;
+ else if(i < 18) k = 1;
+ else if(i < 48) k = 3;
+ else if(i < 144) k = 4;
+ else if(i < 768) k = 5;
+ else k = 6;
+ if(i < 8)
+ z = new Classic(m);
+ else if(m.isEven())
+ z = new Barrett(m);
+ else
+ z = new Montgomery(m);
+
+ // precomputation
+ var g = new Array(), n = 3, k1 = k-1, km = (1<<k)-1;
+ g[1] = z.convert(this);
+ if(k > 1) {
+ var g2 = nbi();
+ z.sqrTo(g[1],g2);
+ while(n <= km) {
+ g[n] = nbi();
+ z.mulTo(g2,g[n-2],g[n]);
+ n += 2;
+ }
+ }
+
+ var j = e.t-1, w, is1 = true, r2 = nbi(), t;
+ i = nbits(e_array[j])-1;
+ while(j >= 0) {
+ if(i >= k1) w = (e_array[j]>>(i-k1))&km;
+ else {
+ w = (e_array[j]&((1<<(i+1))-1))<<(k1-i);
+ if(j > 0) w |= e_array[j-1]>>(BI_DB+i-k1);
+ }
+
+ n = k;
+ while((w&1) == 0) { w >>= 1; --n; }
+ if((i -= n) < 0) { i += BI_DB; --j; }
+ if(is1) { // ret == 1, don't bother squaring or multiplying it
+ g[w].copyTo(r);
+ is1 = false;
+ }
+ else {
+ while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
+ if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
+ z.mulTo(r2,g[w],r);
+ }
+
+ while(j >= 0 && (e_array[j]&(1<<i)) == 0) {
+ z.sqrTo(r,r2); t = r; r = r2; r2 = t;
+ if(--i < 0) { i = BI_DB-1; --j; }
+ }
+ }
+ return z.revert(r);
+}
+
+// (public) gcd(this,a) (HAC 14.54)
+function bnGCD(a) {
+ var x = (this.s<0)?this.negate():this.clone();
+ var y = (a.s<0)?a.negate():a.clone();
+ if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
+ var i = x.getLowestSetBit(), g = y.getLowestSetBit();
+ if(g < 0) return x;
+ if(i < g) g = i;
+ if(g > 0) {
+ x.rShiftTo(g,x);
+ y.rShiftTo(g,y);
+ }
+ while(x.signum() > 0) {
+ if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
+ if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
+ if(x.compareTo(y) >= 0) {
+ x.subTo(y,x);
+ x.rShiftTo(1,x);
+ }
+ else {
+ y.subTo(x,y);
+ y.rShiftTo(1,y);
+ }
+ }
+ if(g > 0) y.lShiftTo(g,y);
+ return y;
+}
+
+// (protected) this % n, n < 2^26
+function bnpModInt(n) {
+ var this_array = this.array;
+ if(n <= 0) return 0;
+ var d = BI_DV%n, r = (this.s<0)?n-1:0;
+ if(this.t > 0)
+ if(d == 0) r = this_array[0]%n;
+ else for(var i = this.t-1; i >= 0; --i) r = (d*r+this_array[i])%n;
+ return r;
+}
+
+// (public) 1/this % m (HAC 14.61)
+function bnModInverse(m) {
+ var ac = m.isEven();
+ if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
+ var u = m.clone(), v = this.clone();
+ var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
+ while(u.signum() != 0) {
+ while(u.isEven()) {
+ u.rShiftTo(1,u);
+ if(ac) {
+ if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
+ a.rShiftTo(1,a);
+ }
+ else if(!b.isEven()) b.subTo(m,b);
+ b.rShiftTo(1,b);
+ }
+ while(v.isEven()) {
+ v.rShiftTo(1,v);
+ if(ac) {
+ if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
+ c.rShiftTo(1,c);
+ }
+ else if(!d.isEven()) d.subTo(m,d);
+ d.rShiftTo(1,d);
+ }
+ if(u.compareTo(v) >= 0) {
+ u.subTo(v,u);
+ if(ac) a.subTo(c,a);
+ b.subTo(d,b);
+ }
+ else {
+ v.subTo(u,v);
+ if(ac) c.subTo(a,c);
+ d.subTo(b,d);
+ }
+ }
+ if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
+ if(d.compareTo(m) >= 0) return d.subtract(m);
+ if(d.signum() < 0) d.addTo(m,d); else return d;
+ if(d.signum() < 0) return d.add(m); else return d;
+}
+
+var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509];
+var lplim = (1<<26)/lowprimes[lowprimes.length-1];
+
+// (public) test primality with certainty >= 1-.5^t
+function bnIsProbablePrime(t) {
+ var i, x = this.abs();
+ var x_array = x.array;
+ if(x.t == 1 && x_array[0] <= lowprimes[lowprimes.length-1]) {
+ for(i = 0; i < lowprimes.length; ++i)
+ if(x_array[0] == lowprimes[i]) return true;
+ return false;
+ }
+ if(x.isEven()) return false;
+ i = 1;
+ while(i < lowprimes.length) {
+ var m = lowprimes[i], j = i+1;
+ while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
+ m = x.modInt(m);
+ while(i < j) if(m%lowprimes[i++] == 0) return false;
+ }
+ return x.millerRabin(t);
+}
+
+// (protected) true if probably prime (HAC 4.24, Miller-Rabin)
+function bnpMillerRabin(t) {
+ var n1 = this.subtract(BigInteger.ONE);
+ var k = n1.getLowestSetBit();
+ if(k <= 0) return false;
+ var r = n1.shiftRight(k);
+ t = (t+1)>>1;
+ if(t > lowprimes.length) t = lowprimes.length;
+ var a = nbi();
+ for(var i = 0; i < t; ++i) {
+ a.fromInt(lowprimes[i]);
+ var y = a.modPow(r,this);
+ if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
+ var j = 1;
+ while(j++ < k && y.compareTo(n1) != 0) {
+ y = y.modPowInt(2,this);
+ if(y.compareTo(BigInteger.ONE) == 0) return false;
+ }
+ if(y.compareTo(n1) != 0) return false;
+ }
+ }
+ return true;
+}
+
+// protected
+BigInteger.prototype.chunkSize = bnpChunkSize;
+BigInteger.prototype.toRadix = bnpToRadix;
+BigInteger.prototype.fromRadix = bnpFromRadix;
+BigInteger.prototype.fromNumber = bnpFromNumber;
+BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
+BigInteger.prototype.changeBit = bnpChangeBit;
+BigInteger.prototype.addTo = bnpAddTo;
+BigInteger.prototype.dMultiply = bnpDMultiply;
+BigInteger.prototype.dAddOffset = bnpDAddOffset;
+BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
+BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
+BigInteger.prototype.modInt = bnpModInt;
+BigInteger.prototype.millerRabin = bnpMillerRabin;
+
+// public
+BigInteger.prototype.clone = bnClone;
+BigInteger.prototype.intValue = bnIntValue;
+BigInteger.prototype.byteValue = bnByteValue;
+BigInteger.prototype.shortValue = bnShortValue;
+BigInteger.prototype.signum = bnSigNum;
+BigInteger.prototype.toByteArray = bnToByteArray;
+BigInteger.prototype.equals = bnEquals;
+BigInteger.prototype.min = bnMin;
+BigInteger.prototype.max = bnMax;
+BigInteger.prototype.and = bnAnd;
+BigInteger.prototype.or = bnOr;
+BigInteger.prototype.xor = bnXor;
+BigInteger.prototype.andNot = bnAndNot;
+BigInteger.prototype.not = bnNot;
+BigInteger.prototype.shiftLeft = bnShiftLeft;
+BigInteger.prototype.shiftRight = bnShiftRight;
+BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
+BigInteger.prototype.bitCount = bnBitCount;
+BigInteger.prototype.testBit = bnTestBit;
+BigInteger.prototype.setBit = bnSetBit;
+BigInteger.prototype.clearBit = bnClearBit;
+BigInteger.prototype.flipBit = bnFlipBit;
+BigInteger.prototype.add = bnAdd;
+BigInteger.prototype.subtract = bnSubtract;
+BigInteger.prototype.multiply = bnMultiply;
+BigInteger.prototype.divide = bnDivide;
+BigInteger.prototype.remainder = bnRemainder;
+BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
+BigInteger.prototype.modPow = bnModPow;
+BigInteger.prototype.modInverse = bnModInverse;
+BigInteger.prototype.pow = bnPow;
+BigInteger.prototype.gcd = bnGCD;
+BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
+
+// BigInteger interfaces not implemented in jsbn:
+
+// BigInteger(int signum, byte[] magnitude)
+// double doubleValue()
+// float floatValue()
+// int hashCode()
+// long longValue()
+// static BigInteger valueOf(long val)
+// prng4.js - uses Arcfour as a PRNG
+
+function Arcfour() {
+ this.i = 0;
+ this.j = 0;
+ this.S = new Array();
+}
+
+// Initialize arcfour context from key, an array of ints, each from [0..255]
+function ARC4init(key) {
+ var i, j, t;
+ for(i = 0; i < 256; ++i)
+ this.S[i] = i;
+ j = 0;
+ for(i = 0; i < 256; ++i) {
+ j = (j + this.S[i] + key[i % key.length]) & 255;
+ t = this.S[i];
+ this.S[i] = this.S[j];
+ this.S[j] = t;
+ }
+ this.i = 0;
+ this.j = 0;
+}
+
+function ARC4next() {
+ var t;
+ this.i = (this.i + 1) & 255;
+ this.j = (this.j + this.S[this.i]) & 255;
+ t = this.S[this.i];
+ this.S[this.i] = this.S[this.j];
+ this.S[this.j] = t;
+ return this.S[(t + this.S[this.i]) & 255];
+}
+
+Arcfour.prototype.init = ARC4init;
+Arcfour.prototype.next = ARC4next;
+
+// Plug in your RNG constructor here
+function prng_newstate() {
+ return new Arcfour();
+}
+
+// Pool size must be a multiple of 4 and greater than 32.
+// An array of bytes the size of the pool will be passed to init()
+var rng_psize = 256;
+// Random number generator - requires a PRNG backend, e.g. prng4.js
+
+// For best results, put code like
+// <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
+// in your main HTML document.
+
+var rng_state;
+var rng_pool;
+var rng_pptr;
+
+// Mix in a 32-bit integer into the pool
+function rng_seed_int(x) {
+ rng_pool[rng_pptr++] ^= x & 255;
+ rng_pool[rng_pptr++] ^= (x >> 8) & 255;
+ rng_pool[rng_pptr++] ^= (x >> 16) & 255;
+ rng_pool[rng_pptr++] ^= (x >> 24) & 255;
+ if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
+}
+
+// Mix in the current time (w/milliseconds) into the pool
+function rng_seed_time() {
+ // Use pre-computed date to avoid making the benchmark
+ // results dependent on the current date.
+ rng_seed_int(1122926989487);
+}
+
+// Initialize the pool with junk if needed.
+if(rng_pool == null) {
+ rng_pool = new Array();
+ rng_pptr = 0;
+ var t;
+ while(rng_pptr < rng_psize) { // extract some randomness from Math.random()
+ t = Math.floor(65536 * Math.random());
+ rng_pool[rng_pptr++] = t >>> 8;
+ rng_pool[rng_pptr++] = t & 255;
+ }
+ rng_pptr = 0;
+ rng_seed_time();
+ //rng_seed_int(window.screenX);
+ //rng_seed_int(window.screenY);
+}
+
+function rng_get_byte() {
+ if(rng_state == null) {
+ rng_seed_time();
+ rng_state = prng_newstate();
+ rng_state.init(rng_pool);
+ for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
+ rng_pool[rng_pptr] = 0;
+ rng_pptr = 0;
+ //rng_pool = null;
+ }
+ // TODO: allow reseeding after first request
+ return rng_state.next();
+}
+
+function rng_get_bytes(ba) {
+ var i;
+ for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
+}
+
+function SecureRandom() {}
+
+SecureRandom.prototype.nextBytes = rng_get_bytes;
+// Depends on jsbn.js and rng.js
+
+// convert a (hex) string to a bignum object
+function parseBigInt(str,r) {
+ return new BigInteger(str,r);
+}
+
+function linebrk(s,n) {
+ var ret = "";
+ var i = 0;
+ while(i + n < s.length) {
+ ret += s.substring(i,i+n) + "\n";
+ i += n;
+ }
+ return ret + s.substring(i,s.length);
+}
+
+function byte2Hex(b) {
+ if(b < 0x10)
+ return "0" + b.toString(16);
+ else
+ return b.toString(16);
+}
+
+// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
+function pkcs1pad2(s,n) {
+ if(n < s.length + 11) {
+ alert("Message too long for RSA");
+ return null;
+ }
+ var ba = new Array();
+ var i = s.length - 1;
+ while(i >= 0 && n > 0) ba[--n] = s.charCodeAt(i--);
+ ba[--n] = 0;
+ var rng = new SecureRandom();
+ var x = new Array();
+ while(n > 2) { // random non-zero pad
+ x[0] = 0;
+ while(x[0] == 0) rng.nextBytes(x);
+ ba[--n] = x[0];
+ }
+ ba[--n] = 2;
+ ba[--n] = 0;
+ return new BigInteger(ba);
+}
+
+// "empty" RSA key constructor
+function RSAKey() {
+ this.n = null;
+ this.e = 0;
+ this.d = null;
+ this.p = null;
+ this.q = null;
+ this.dmp1 = null;
+ this.dmq1 = null;
+ this.coeff = null;
+}
+
+// Set the public key fields N and e from hex strings
+function RSASetPublic(N,E) {
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
+ this.n = parseBigInt(N,16);
+ this.e = parseInt(E,16);
+ }
+ else
+ alert("Invalid RSA public key");
+}
+
+// Perform raw public operation on "x": return x^e (mod n)
+function RSADoPublic(x) {
+ return x.modPowInt(this.e, this.n);
+}
+
+// Return the PKCS#1 RSA encryption of "text" as an even-length hex string
+function RSAEncrypt(text) {
+ var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3);
+ if(m == null) return null;
+ var c = this.doPublic(m);
+ if(c == null) return null;
+ var h = c.toString(16);
+ if((h.length & 1) == 0) return h; else return "0" + h;
+}
+
+// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
+//function RSAEncryptB64(text) {
+// var h = this.encrypt(text);
+// if(h) return hex2b64(h); else return null;
+//}
+
+// protected
+RSAKey.prototype.doPublic = RSADoPublic;
+
+// public
+RSAKey.prototype.setPublic = RSASetPublic;
+RSAKey.prototype.encrypt = RSAEncrypt;
+//RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
+// Depends on rsa.js and jsbn2.js
+
+// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext
+function pkcs1unpad2(d,n) {
+ var b = d.toByteArray();
+ var i = 0;
+ while(i < b.length && b[i] == 0) ++i;
+ if(b.length-i != n-1 || b[i] != 2)
+ return null;
+ ++i;
+ while(b[i] != 0)
+ if(++i >= b.length) return null;
+ var ret = "";
+ while(++i < b.length)
+ ret += String.fromCharCode(b[i]);
+ return ret;
+}
+
+// Set the private key fields N, e, and d from hex strings
+function RSASetPrivate(N,E,D) {
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
+ this.n = parseBigInt(N,16);
+ this.e = parseInt(E,16);
+ this.d = parseBigInt(D,16);
+ }
+ else
+ alert("Invalid RSA private key");
+}
+
+// Set the private key fields N, e, d and CRT params from hex strings
+function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) {
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
+ this.n = parseBigInt(N,16);
+ this.e = parseInt(E,16);
+ this.d = parseBigInt(D,16);
+ this.p = parseBigInt(P,16);
+ this.q = parseBigInt(Q,16);
+ this.dmp1 = parseBigInt(DP,16);
+ this.dmq1 = parseBigInt(DQ,16);
+ this.coeff = parseBigInt(C,16);
+ }
+ else
+ alert("Invalid RSA private key");
+}
+
+// Generate a new random private key B bits long, using public expt E
+function RSAGenerate(B,E) {
+ var rng = new SecureRandom();
+ var qs = B>>1;
+ this.e = parseInt(E,16);
+ var ee = new BigInteger(E,16);
+ for(;;) {
+ for(;;) {
+ this.p = new BigInteger(B-qs,1,rng);
+ if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break;
+ }
+ for(;;) {
+ this.q = new BigInteger(qs,1,rng);
+ if(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break;
+ }
+ if(this.p.compareTo(this.q) <= 0) {
+ var t = this.p;
+ this.p = this.q;
+ this.q = t;
+ }
+ var p1 = this.p.subtract(BigInteger.ONE);
+ var q1 = this.q.subtract(BigInteger.ONE);
+ var phi = p1.multiply(q1);
+ if(phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {
+ this.n = this.p.multiply(this.q);
+ this.d = ee.modInverse(phi);
+ this.dmp1 = this.d.mod(p1);
+ this.dmq1 = this.d.mod(q1);
+ this.coeff = this.q.modInverse(this.p);
+ break;
+ }
+ }
+}
+
+// Perform raw private operation on "x": return x^d (mod n)
+function RSADoPrivate(x) {
+ if(this.p == null || this.q == null)
+ return x.modPow(this.d, this.n);
+
+ // TODO: re-calculate any missing CRT params
+ var xp = x.mod(this.p).modPow(this.dmp1, this.p);
+ var xq = x.mod(this.q).modPow(this.dmq1, this.q);
+
+ while(xp.compareTo(xq) < 0)
+ xp = xp.add(this.p);
+ return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
+}
+
+// Return the PKCS#1 RSA decryption of "ctext".
+// "ctext" is an even-length hex string and the output is a plain string.
+function RSADecrypt(ctext) {
+ var c = parseBigInt(ctext, 16);
+ var m = this.doPrivate(c);
+ if(m == null) return null;
+ return pkcs1unpad2(m, (this.n.bitLength()+7)>>3);
+}
+
+// Return the PKCS#1 RSA decryption of "ctext".
+// "ctext" is a Base64-encoded string and the output is a plain string.
+//function RSAB64Decrypt(ctext) {
+// var h = b64tohex(ctext);
+// if(h) return this.decrypt(h); else return null;
+//}
+
+// protected
+RSAKey.prototype.doPrivate = RSADoPrivate;
+
+// public
+RSAKey.prototype.setPrivate = RSASetPrivate;
+RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
+RSAKey.prototype.generate = RSAGenerate;
+RSAKey.prototype.decrypt = RSADecrypt;
+//RSAKey.prototype.b64_decrypt = RSAB64Decrypt;
+
+
+nValue="a5261939975948bb7a58dffe5ff54e65f0498f9175f5a09288810b8975871e99af3b5dd94057b0fc07535f5f97444504fa35169d461d0d30cf0192e307727c065168c788771c561a9400fb49175e9e6aa4e23fe11af69e9412dd23b0cb6684c4c2429bce139e848ab26d0829073351f4acd36074eafd036a5eb83359d2a698d3";
+eValue="10001";
+dValue="8e9912f6d3645894e8d38cb58c0db81ff516cf4c7e5a14c7f1eddb1459d2cded4d8d293fc97aee6aefb861859c8b6a3d1dfe710463e1f9ddc72048c09751971c4a580aa51eb523357a3cc48d31cfad1d4a165066ed92d4748fb6571211da5cb14bc11b6e2df7c1a559e6d5ac1cd5c94703a22891464fba23d0d965086277a161";
+pValue="d090ce58a92c75233a6486cb0a9209bf3583b64f540c76f5294bb97d285eed33aec220bde14b2417951178ac152ceab6da7090905b478195498b352048f15e7d";
+qValue="cab575dc652bb66df15a0359609d51d1db184750c00c6698b90ef3465c99655103edbf0d54c56aec0ce3c4d22592338092a126a0cc49f65a4a30d222b411e58f";
+dmp1Value="1a24bca8e273df2f0e47c199bbf678604e7df7215480c77c8db39f49b000ce2cf7500038acfff5433b7d582a01f1826e6f4d42e1c57f5e1fef7b12aabc59fd25";
+dmq1Value="3d06982efbbe47339e1f6d36b1216b8a741d410b0c662f54f7118b27b9a4ec9d914337eb39841d8666f3034408cf94f5b62f11c402fc994fe15a05493150d9fd";
+coeffValue="3a3e731acd8960b7ff9eb81a7ff93bd1cfa74cbd56987db58b4594fb09c09084db1734c8143f98b602b981aaa9243ca28deb69b5b280ee8dcee0fd2625e53250";
+
+setupEngine(am3, 28);
+
+var TEXT = "The quick brown fox jumped over the extremely lazy frog! " +
+ "Now is the time for all good men to come to the party.";
+var encrypted;
+
+function encrypt() {
+ var RSA = new RSAKey();
+ RSA.setPublic(nValue, eValue);
+ RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
+ encrypted = RSA.encrypt(TEXT);
+}
+
+function decrypt() {
+ var RSA = new RSAKey();
+ RSA.setPublic(nValue, eValue);
+ RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
+ var decrypted = RSA.decrypt(encrypted);
+ if (decrypted != TEXT) {
+ throw new Error("Crypto operation failed");
+ }
+}
+
+for (var i = 0; i < 8; ++i) {
+ encrypt();
+ decrypt();
+}
diff --git a/SunSpider/tests/v8-v5/v8-deltablue.js b/SunSpider/tests/v8-v5/v8-deltablue.js
new file mode 100644
index 0000000..fe28e52
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-deltablue.js
@@ -0,0 +1,877 @@
+// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 1996 John Maloney and Mario Wolczko.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+// This implementation of the DeltaBlue benchmark is derived
+// from the Smalltalk implementation by John Maloney and Mario
+// Wolczko. Some parts have been translated directly, whereas
+// others have been modified more aggresively to make it feel
+// more like a JavaScript program.
+
+/**
+ * A JavaScript implementation of the DeltaBlue constrain-solving
+ * algorithm, as described in:
+ *
+ * "The DeltaBlue Algorithm: An Incremental Constraint Hierarchy Solver"
+ * Bjorn N. Freeman-Benson and John Maloney
+ * January 1990 Communications of the ACM,
+ * also available as University of Washington TR 89-08-06.
+ *
+ * Beware: this benchmark is written in a grotesque style where
+ * the constraint model is built by side-effects from constructors.
+ * I've kept it this way to avoid deviating too much from the original
+ * implementation.
+ */
+
+
+/* --- O b j e c t M o d e l --- */
+
+Object.prototype.inheritsFrom = function (shuper) {
+ function Inheriter() { }
+ Inheriter.prototype = shuper.prototype;
+ this.prototype = new Inheriter();
+ this.superConstructor = shuper;
+}
+
+function OrderedCollection() {
+ this.elms = new Array();
+}
+
+OrderedCollection.prototype.add = function (elm) {
+ this.elms.push(elm);
+}
+
+OrderedCollection.prototype.at = function (index) {
+ return this.elms[index];
+}
+
+OrderedCollection.prototype.size = function () {
+ return this.elms.length;
+}
+
+OrderedCollection.prototype.removeFirst = function () {
+ return this.elms.pop();
+}
+
+OrderedCollection.prototype.remove = function (elm) {
+ var index = 0, skipped = 0;
+ for (var i = 0; i < this.elms.length; i++) {
+ var value = this.elms[i];
+ if (value != elm) {
+ this.elms[index] = value;
+ index++;
+ } else {
+ skipped++;
+ }
+ }
+ for (var i = 0; i < skipped; i++)
+ this.elms.pop();
+}
+
+/* --- *
+ * S t r e n g t h
+ * --- */
+
+/**
+ * Strengths are used to measure the relative importance of constraints.
+ * New strengths may be inserted in the strength hierarchy without
+ * disrupting current constraints. Strengths cannot be created outside
+ * this class, so pointer comparison can be used for value comparison.
+ */
+function Strength(strengthValue, name) {
+ this.strengthValue = strengthValue;
+ this.name = name;
+}
+
+Strength.stronger = function (s1, s2) {
+ return s1.strengthValue < s2.strengthValue;
+}
+
+Strength.weaker = function (s1, s2) {
+ return s1.strengthValue > s2.strengthValue;
+}
+
+Strength.weakestOf = function (s1, s2) {
+ return this.weaker(s1, s2) ? s1 : s2;
+}
+
+Strength.strongest = function (s1, s2) {
+ return this.stronger(s1, s2) ? s1 : s2;
+}
+
+Strength.prototype.nextWeaker = function () {
+ switch (this.strengthValue) {
+ case 0: return Strength.WEAKEST;
+ case 1: return Strength.WEAK_DEFAULT;
+ case 2: return Strength.NORMAL;
+ case 3: return Strength.STRONG_DEFAULT;
+ case 4: return Strength.PREFERRED;
+ case 5: return Strength.REQUIRED;
+ }
+}
+
+// Strength constants.
+Strength.REQUIRED = new Strength(0, "required");
+Strength.STONG_PREFERRED = new Strength(1, "strongPreferred");
+Strength.PREFERRED = new Strength(2, "preferred");
+Strength.STRONG_DEFAULT = new Strength(3, "strongDefault");
+Strength.NORMAL = new Strength(4, "normal");
+Strength.WEAK_DEFAULT = new Strength(5, "weakDefault");
+Strength.WEAKEST = new Strength(6, "weakest");
+
+/* --- *
+ * C o n s t r a i n t
+ * --- */
+
+/**
+ * An abstract class representing a system-maintainable relationship
+ * (or "constraint") between a set of variables. A constraint supplies
+ * a strength instance variable; concrete subclasses provide a means
+ * of storing the constrained variables and other information required
+ * to represent a constraint.
+ */
+function Constraint(strength) {
+ this.strength = strength;
+}
+
+/**
+ * Activate this constraint and attempt to satisfy it.
+ */
+Constraint.prototype.addConstraint = function () {
+ this.addToGraph();
+ planner.incrementalAdd(this);
+}
+
+/**
+ * Attempt to find a way to enforce this constraint. If successful,
+ * record the solution, perhaps modifying the current dataflow
+ * graph. Answer the constraint that this constraint overrides, if
+ * there is one, or nil, if there isn't.
+ * Assume: I am not already satisfied.
+ */
+Constraint.prototype.satisfy = function (mark) {
+ this.chooseMethod(mark);
+ if (!this.isSatisfied()) {
+ if (this.strength == Strength.REQUIRED)
+ alert("Could not satisfy a required constraint!");
+ return null;
+ }
+ this.markInputs(mark);
+ var out = this.output();
+ var overridden = out.determinedBy;
+ if (overridden != null) overridden.markUnsatisfied();
+ out.determinedBy = this;
+ if (!planner.addPropagate(this, mark))
+ alert("Cycle encountered");
+ out.mark = mark;
+ return overridden;
+}
+
+Constraint.prototype.destroyConstraint = function () {
+ if (this.isSatisfied()) planner.incrementalRemove(this);
+ else this.removeFromGraph();
+}
+
+/**
+ * Normal constraints are not input constraints. An input constraint
+ * is one that depends on external state, such as the mouse, the
+ * keybord, a clock, or some arbitraty piece of imperative code.
+ */
+Constraint.prototype.isInput = function () {
+ return false;
+}
+
+/* --- *
+ * U n a r y C o n s t r a i n t
+ * --- */
+
+/**
+ * Abstract superclass for constraints having a single possible output
+ * variable.
+ */
+function UnaryConstraint(v, strength) {
+ UnaryConstraint.superConstructor.call(this, strength);
+ this.myOutput = v;
+ this.satisfied = false;
+ this.addConstraint();
+}
+
+UnaryConstraint.inheritsFrom(Constraint);
+
+/**
+ * Adds this constraint to the constraint graph
+ */
+UnaryConstraint.prototype.addToGraph = function () {
+ this.myOutput.addConstraint(this);
+ this.satisfied = false;
+}
+
+/**
+ * Decides if this constraint can be satisfied and records that
+ * decision.
+ */
+UnaryConstraint.prototype.chooseMethod = function (mark) {
+ this.satisfied = (this.myOutput.mark != mark)
+ && Strength.stronger(this.strength, this.myOutput.walkStrength);
+}
+
+/**
+ * Returns true if this constraint is satisfied in the current solution.
+ */
+UnaryConstraint.prototype.isSatisfied = function () {
+ return this.satisfied;
+}
+
+UnaryConstraint.prototype.markInputs = function (mark) {
+ // has no inputs
+}
+
+/**
+ * Returns the current output variable.
+ */
+UnaryConstraint.prototype.output = function () {
+ return this.myOutput;
+}
+
+/**
+ * Calculate the walkabout strength, the stay flag, and, if it is
+ * 'stay', the value for the current output of this constraint. Assume
+ * this constraint is satisfied.
+ */
+UnaryConstraint.prototype.recalculate = function () {
+ this.myOutput.walkStrength = this.strength;
+ this.myOutput.stay = !this.isInput();
+ if (this.myOutput.stay) this.execute(); // Stay optimization
+}
+
+/**
+ * Records that this constraint is unsatisfied
+ */
+UnaryConstraint.prototype.markUnsatisfied = function () {
+ this.satisfied = false;
+}
+
+UnaryConstraint.prototype.inputsKnown = function () {
+ return true;
+}
+
+UnaryConstraint.prototype.removeFromGraph = function () {
+ if (this.myOutput != null) this.myOutput.removeConstraint(this);
+ this.satisfied = false;
+}
+
+/* --- *
+ * S t a y C o n s t r a i n t
+ * --- */
+
+/**
+ * Variables that should, with some level of preference, stay the same.
+ * Planners may exploit the fact that instances, if satisfied, will not
+ * change their output during plan execution. This is called "stay
+ * optimization".
+ */
+function StayConstraint(v, str) {
+ StayConstraint.superConstructor.call(this, v, str);
+}
+
+StayConstraint.inheritsFrom(UnaryConstraint);
+
+StayConstraint.prototype.execute = function () {
+ // Stay constraints do nothing
+}
+
+/* --- *
+ * E d i t C o n s t r a i n t
+ * --- */
+
+/**
+ * A unary input constraint used to mark a variable that the client
+ * wishes to change.
+ */
+function EditConstraint(v, str) {
+ EditConstraint.superConstructor.call(this, v, str);
+}
+
+EditConstraint.inheritsFrom(UnaryConstraint);
+
+/**
+ * Edits indicate that a variable is to be changed by imperative code.
+ */
+EditConstraint.prototype.isInput = function () {
+ return true;
+}
+
+EditConstraint.prototype.execute = function () {
+ // Edit constraints do nothing
+}
+
+/* --- *
+ * B i n a r y C o n s t r a i n t
+ * --- */
+
+var Direction = new Object();
+Direction.NONE = 0;
+Direction.FORWARD = 1;
+Direction.BACKWARD = -1;
+
+/**
+ * Abstract superclass for constraints having two possible output
+ * variables.
+ */
+function BinaryConstraint(var1, var2, strength) {
+ BinaryConstraint.superConstructor.call(this, strength);
+ this.v1 = var1;
+ this.v2 = var2;
+ this.direction = Direction.NONE;
+ this.addConstraint();
+}
+
+BinaryConstraint.inheritsFrom(Constraint);
+
+/**
+ * Decides if this constratint can be satisfied and which way it
+ * should flow based on the relative strength of the variables related,
+ * and record that decision.
+ */
+BinaryConstraint.prototype.chooseMethod = function (mark) {
+ if (this.v1.mark == mark) {
+ this.direction = (this.v1.mark != mark && Strength.stronger(this.strength, this.v2.walkStrength))
+ ? Direction.FORWARD
+ : Direction.NONE;
+ }
+ if (this.v2.mark == mark) {
+ this.direction = (this.v1.mark != mark && Strength.stronger(this.strength, this.v1.walkStrength))
+ ? Direction.BACKWARD
+ : Direction.NONE;
+ }
+ if (Strength.weaker(this.v1.walkStrength, this.v2.walkStrength)) {
+ this.direction = Strength.stronger(this.strength, this.v1.walkStrength)
+ ? Direction.BACKWARD
+ : Direction.NONE;
+ } else {
+ this.direction = Strength.stronger(this.strength, this.v2.walkStrength)
+ ? Direction.FORWARD
+ : Direction.BACKWARD
+ }
+}
+
+/**
+ * Add this constraint to the constraint graph
+ */
+BinaryConstraint.prototype.addToGraph = function () {
+ this.v1.addConstraint(this);
+ this.v2.addConstraint(this);
+ this.direction = Direction.NONE;
+}
+
+/**
+ * Answer true if this constraint is satisfied in the current solution.
+ */
+BinaryConstraint.prototype.isSatisfied = function () {
+ return this.direction != Direction.NONE;
+}
+
+/**
+ * Mark the input variable with the given mark.
+ */
+BinaryConstraint.prototype.markInputs = function (mark) {
+ this.input().mark = mark;
+}
+
+/**
+ * Returns the current input variable
+ */
+BinaryConstraint.prototype.input = function () {
+ return (this.direction == Direction.FORWARD) ? this.v1 : this.v2;
+}
+
+/**
+ * Returns the current output variable
+ */
+BinaryConstraint.prototype.output = function () {
+ return (this.direction == Direction.FORWARD) ? this.v2 : this.v1;
+}
+
+/**
+ * Calculate the walkabout strength, the stay flag, and, if it is
+ * 'stay', the value for the current output of this
+ * constraint. Assume this constraint is satisfied.
+ */
+BinaryConstraint.prototype.recalculate = function () {
+ var ihn = this.input(), out = this.output();
+ out.walkStrength = Strength.weakestOf(this.strength, ihn.walkStrength);
+ out.stay = ihn.stay;
+ if (out.stay) this.execute();
+}
+
+/**
+ * Record the fact that this constraint is unsatisfied.
+ */
+BinaryConstraint.prototype.markUnsatisfied = function () {
+ this.direction = Direction.NONE;
+}
+
+BinaryConstraint.prototype.inputsKnown = function (mark) {
+ var i = this.input();
+ return i.mark == mark || i.stay || i.determinedBy == null;
+}
+
+BinaryConstraint.prototype.removeFromGraph = function () {
+ if (this.v1 != null) this.v1.removeConstraint(this);
+ if (this.v2 != null) this.v2.removeConstraint(this);
+ this.direction = Direction.NONE;
+}
+
+/* --- *
+ * S c a l e C o n s t r a i n t
+ * --- */
+
+/**
+ * Relates two variables by the linear scaling relationship: "v2 =
+ * (v1 * scale) + offset". Either v1 or v2 may be changed to maintain
+ * this relationship but the scale factor and offset are considered
+ * read-only.
+ */
+function ScaleConstraint(src, scale, offset, dest, strength) {
+ this.direction = Direction.NONE;
+ this.scale = scale;
+ this.offset = offset;
+ ScaleConstraint.superConstructor.call(this, src, dest, strength);
+}
+
+ScaleConstraint.inheritsFrom(BinaryConstraint);
+
+/**
+ * Adds this constraint to the constraint graph.
+ */
+ScaleConstraint.prototype.addToGraph = function () {
+ ScaleConstraint.superConstructor.prototype.addToGraph.call(this);
+ this.scale.addConstraint(this);
+ this.offset.addConstraint(this);
+}
+
+ScaleConstraint.prototype.removeFromGraph = function () {
+ ScaleConstraint.superConstructor.prototype.removeFromGraph.call(this);
+ if (this.scale != null) this.scale.removeConstraint(this);
+ if (this.offset != null) this.offset.removeConstraint(this);
+}
+
+ScaleConstraint.prototype.markInputs = function (mark) {
+ ScaleConstraint.superConstructor.prototype.markInputs.call(this, mark);
+ this.scale.mark = this.offset.mark = mark;
+}
+
+/**
+ * Enforce this constraint. Assume that it is satisfied.
+ */
+ScaleConstraint.prototype.execute = function () {
+ if (this.direction == Direction.FORWARD) {
+ this.v2.value = this.v1.value * this.scale.value + this.offset.value;
+ } else {
+ this.v1.value = (this.v2.value - this.offset.value) / this.scale.value;
+ }
+}
+
+/**
+ * Calculate the walkabout strength, the stay flag, and, if it is
+ * 'stay', the value for the current output of this constraint. Assume
+ * this constraint is satisfied.
+ */
+ScaleConstraint.prototype.recalculate = function () {
+ var ihn = this.input(), out = this.output();
+ out.walkStrength = Strength.weakestOf(this.strength, ihn.walkStrength);
+ out.stay = ihn.stay && this.scale.stay && this.offset.stay;
+ if (out.stay) this.execute();
+}
+
+/* --- *
+ * E q u a l i t y C o n s t r a i n t
+ * --- */
+
+/**
+ * Constrains two variables to have the same value.
+ */
+function EqualityConstraint(var1, var2, strength) {
+ EqualityConstraint.superConstructor.call(this, var1, var2, strength);
+}
+
+EqualityConstraint.inheritsFrom(BinaryConstraint);
+
+/**
+ * Enforce this constraint. Assume that it is satisfied.
+ */
+EqualityConstraint.prototype.execute = function () {
+ this.output().value = this.input().value;
+}
+
+/* --- *
+ * V a r i a b l e
+ * --- */
+
+/**
+ * A constrained variable. In addition to its value, it maintain the
+ * structure of the constraint graph, the current dataflow graph, and
+ * various parameters of interest to the DeltaBlue incremental
+ * constraint solver.
+ **/
+function Variable(name, initialValue) {
+ this.value = initialValue || 0;
+ this.constraints = new OrderedCollection();
+ this.determinedBy = null;
+ this.mark = 0;
+ this.walkStrength = Strength.WEAKEST;
+ this.stay = true;
+ this.name = name;
+}
+
+/**
+ * Add the given constraint to the set of all constraints that refer
+ * this variable.
+ */
+Variable.prototype.addConstraint = function (c) {
+ this.constraints.add(c);
+}
+
+/**
+ * Removes all traces of c from this variable.
+ */
+Variable.prototype.removeConstraint = function (c) {
+ this.constraints.remove(c);
+ if (this.determinedBy == c) this.determinedBy = null;
+}
+
+/* --- *
+ * P l a n n e r
+ * --- */
+
+/**
+ * The DeltaBlue planner
+ */
+function Planner() {
+ this.currentMark = 0;
+}
+
+/**
+ * Attempt to satisfy the given constraint and, if successful,
+ * incrementally update the dataflow graph. Details: If satifying
+ * the constraint is successful, it may override a weaker constraint
+ * on its output. The algorithm attempts to resatisfy that
+ * constraint using some other method. This process is repeated
+ * until either a) it reaches a variable that was not previously
+ * determined by any constraint or b) it reaches a constraint that
+ * is too weak to be satisfied using any of its methods. The
+ * variables of constraints that have been processed are marked with
+ * a unique mark value so that we know where we've been. This allows
+ * the algorithm to avoid getting into an infinite loop even if the
+ * constraint graph has an inadvertent cycle.
+ */
+Planner.prototype.incrementalAdd = function (c) {
+ var mark = this.newMark();
+ var overridden = c.satisfy(mark);
+ while (overridden != null)
+ overridden = overridden.satisfy(mark);
+}
+
+/**
+ * Entry point for retracting a constraint. Remove the given
+ * constraint and incrementally update the dataflow graph.
+ * Details: Retracting the given constraint may allow some currently
+ * unsatisfiable downstream constraint to be satisfied. We therefore collect
+ * a list of unsatisfied downstream constraints and attempt to
+ * satisfy each one in turn. This list is traversed by constraint
+ * strength, strongest first, as a heuristic for avoiding
+ * unnecessarily adding and then overriding weak constraints.
+ * Assume: c is satisfied.
+ */
+Planner.prototype.incrementalRemove = function (c) {
+ var out = c.output();
+ c.markUnsatisfied();
+ c.removeFromGraph();
+ var unsatisfied = this.removePropagateFrom(out);
+ var strength = Strength.REQUIRED;
+ do {
+ for (var i = 0; i < unsatisfied.size(); i++) {
+ var u = unsatisfied.at(i);
+ if (u.strength == strength)
+ this.incrementalAdd(u);
+ }
+ strength = strength.nextWeaker();
+ } while (strength != Strength.WEAKEST);
+}
+
+/**
+ * Select a previously unused mark value.
+ */
+Planner.prototype.newMark = function () {
+ return ++this.currentMark;
+}
+
+/**
+ * Extract a plan for resatisfaction starting from the given source
+ * constraints, usually a set of input constraints. This method
+ * assumes that stay optimization is desired; the plan will contain
+ * only constraints whose output variables are not stay. Constraints
+ * that do no computation, such as stay and edit constraints, are
+ * not included in the plan.
+ * Details: The outputs of a constraint are marked when it is added
+ * to the plan under construction. A constraint may be appended to
+ * the plan when all its input variables are known. A variable is
+ * known if either a) the variable is marked (indicating that has
+ * been computed by a constraint appearing earlier in the plan), b)
+ * the variable is 'stay' (i.e. it is a constant at plan execution
+ * time), or c) the variable is not determined by any
+ * constraint. The last provision is for past states of history
+ * variables, which are not stay but which are also not computed by
+ * any constraint.
+ * Assume: sources are all satisfied.
+ */
+Planner.prototype.makePlan = function (sources) {
+ var mark = this.newMark();
+ var plan = new Plan();
+ var todo = sources;
+ while (todo.size() > 0) {
+ var c = todo.removeFirst();
+ if (c.output().mark != mark && c.inputsKnown(mark)) {
+ plan.addConstraint(c);
+ c.output().mark = mark;
+ this.addConstraintsConsumingTo(c.output(), todo);
+ }
+ }
+ return plan;
+}
+
+/**
+ * Extract a plan for resatisfying starting from the output of the
+ * given constraints, usually a set of input constraints.
+ */
+Planner.prototype.extractPlanFromConstraints = function (constraints) {
+ var sources = new OrderedCollection();
+ for (var i = 0; i < constraints.size(); i++) {
+ var c = constraints.at(i);
+ if (c.isInput() && c.isSatisfied())
+ // not in plan already and eligible for inclusion
+ sources.add(c);
+ }
+ return this.makePlan(sources);
+}
+
+/**
+ * Recompute the walkabout strengths and stay flags of all variables
+ * downstream of the given constraint and recompute the actual
+ * values of all variables whose stay flag is true. If a cycle is
+ * detected, remove the given constraint and answer
+ * false. Otherwise, answer true.
+ * Details: Cycles are detected when a marked variable is
+ * encountered downstream of the given constraint. The sender is
+ * assumed to have marked the inputs of the given constraint with
+ * the given mark. Thus, encountering a marked node downstream of
+ * the output constraint means that there is a path from the
+ * constraint's output to one of its inputs.
+ */
+Planner.prototype.addPropagate = function (c, mark) {
+ var todo = new OrderedCollection();
+ todo.add(c);
+ while (todo.size() > 0) {
+ var d = todo.removeFirst();
+ if (d.output().mark == mark) {
+ this.incrementalRemove(c);
+ return false;
+ }
+ d.recalculate();
+ this.addConstraintsConsumingTo(d.output(), todo);
+ }
+ return true;
+}
+
+
+/**
+ * Update the walkabout strengths and stay flags of all variables
+ * downstream of the given constraint. Answer a collection of
+ * unsatisfied constraints sorted in order of decreasing strength.
+ */
+Planner.prototype.removePropagateFrom = function (out) {
+ out.determinedBy = null;
+ out.walkStrength = Strength.WEAKEST;
+ out.stay = true;
+ var unsatisfied = new OrderedCollection();
+ var todo = new OrderedCollection();
+ todo.add(out);
+ while (todo.size() > 0) {
+ var v = todo.removeFirst();
+ for (var i = 0; i < v.constraints.size(); i++) {
+ var c = v.constraints.at(i);
+ if (!c.isSatisfied())
+ unsatisfied.add(c);
+ }
+ var determining = v.determinedBy;
+ for (var i = 0; i < v.constraints.size(); i++) {
+ var next = v.constraints.at(i);
+ if (next != determining && next.isSatisfied()) {
+ next.recalculate();
+ todo.add(next.output());
+ }
+ }
+ }
+ return unsatisfied;
+}
+
+Planner.prototype.addConstraintsConsumingTo = function (v, coll) {
+ var determining = v.determinedBy;
+ var cc = v.constraints;
+ for (var i = 0; i < cc.size(); i++) {
+ var c = cc.at(i);
+ if (c != determining && c.isSatisfied())
+ coll.add(c);
+ }
+}
+
+/* --- *
+ * P l a n
+ * --- */
+
+/**
+ * A Plan is an ordered list of constraints to be executed in sequence
+ * to resatisfy all currently satisfiable constraints in the face of
+ * one or more changing inputs.
+ */
+function Plan() {
+ this.v = new OrderedCollection();
+}
+
+Plan.prototype.addConstraint = function (c) {
+ this.v.add(c);
+}
+
+Plan.prototype.size = function () {
+ return this.v.size();
+}
+
+Plan.prototype.constraintAt = function (index) {
+ return this.v.at(index);
+}
+
+Plan.prototype.execute = function () {
+ for (var i = 0; i < this.size(); i++) {
+ var c = this.constraintAt(i);
+ c.execute();
+ }
+}
+
+/* --- *
+ * M a i n
+ * --- */
+
+/**
+ * This is the standard DeltaBlue benchmark. A long chain of equality
+ * constraints is constructed with a stay constraint on one end. An
+ * edit constraint is then added to the opposite end and the time is
+ * measured for adding and removing this constraint, and extracting
+ * and executing a constraint satisfaction plan. There are two cases.
+ * In case 1, the added constraint is stronger than the stay
+ * constraint and values must propagate down the entire length of the
+ * chain. In case 2, the added constraint is weaker than the stay
+ * constraint so it cannot be accomodated. The cost in this case is,
+ * of course, very low. Typical situations lie somewhere between these
+ * two extremes.
+ */
+function chainTest(n) {
+ planner = new Planner();
+ var prev = null, first = null, last = null;
+
+ // Build chain of n equality constraints
+ for (var i = 0; i <= n; i++) {
+ var name = "v" + i;
+ var v = new Variable(name);
+ if (prev != null)
+ new EqualityConstraint(prev, v, Strength.REQUIRED);
+ if (i == 0) first = v;
+ if (i == n) last = v;
+ prev = v;
+ }
+
+ new StayConstraint(last, Strength.STRONG_DEFAULT);
+ var edit = new EditConstraint(first, Strength.PREFERRED);
+ var edits = new OrderedCollection();
+ edits.add(edit);
+ var plan = planner.extractPlanFromConstraints(edits);
+ for (var i = 0; i < 100; i++) {
+ first.value = i;
+ plan.execute();
+ if (last.value != i)
+ alert("Chain test failed.");
+ }
+}
+
+/**
+ * This test constructs a two sets of variables related to each
+ * other by a simple linear transformation (scale and offset). The
+ * time is measured to change a variable on either side of the
+ * mapping and to change the scale and offset factors.
+ */
+function projectionTest(n) {
+ planner = new Planner();
+ var scale = new Variable("scale", 10);
+ var offset = new Variable("offset", 1000);
+ var src = null, dst = null;
+
+ var dests = new OrderedCollection();
+ for (var i = 0; i < n; i++) {
+ src = new Variable("src" + i, i);
+ dst = new Variable("dst" + i, i);
+ dests.add(dst);
+ new StayConstraint(src, Strength.NORMAL);
+ new ScaleConstraint(src, scale, offset, dst, Strength.REQUIRED);
+ }
+
+ change(src, 17);
+ if (dst.value != 1170) alert("Projection 1 failed");
+ change(dst, 1050);
+ if (src.value != 5) alert("Projection 2 failed");
+ change(scale, 5);
+ for (var i = 0; i < n - 1; i++) {
+ if (dests.at(i).value != i * 5 + 1000)
+ alert("Projection 3 failed");
+ }
+ change(offset, 2000);
+ for (var i = 0; i < n - 1; i++) {
+ if (dests.at(i).value != i * 5 + 2000)
+ alert("Projection 4 failed");
+ }
+}
+
+function change(v, newValue) {
+ var edit = new EditConstraint(v, Strength.PREFERRED);
+ var edits = new OrderedCollection();
+ edits.add(edit);
+ var plan = planner.extractPlanFromConstraints(edits);
+ for (var i = 0; i < 10; i++) {
+ v.value = newValue;
+ plan.execute();
+ }
+ edit.destroyConstraint();
+}
+
+// Global variable holding the current planner.
+var planner = null;
+
+function deltaBlue() {
+ chainTest(100);
+ projectionTest(100);
+}
+
+for (var i = 0; i < 155; ++i)
+ deltaBlue();
diff --git a/SunSpider/tests/v8-v5/v8-earley-boyer.js b/SunSpider/tests/v8-v5/v8-earley-boyer.js
new file mode 100644
index 0000000..6c4c635
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-earley-boyer.js
@@ -0,0 +1,4683 @@
+// This file is automatically generated by scheme2js, except for the
+// benchmark harness code at the beginning and end of the file.
+
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/*
+ * To use write/prints/... the default-output port has to be set first.
+ * Simply setting SC_DEFAULT_OUT and SC_ERROR_OUT to the desired values
+ * should do the trick.
+ * In the following example the std-out and error-port are redirected to
+ * a DIV.
+function initRuntime() {
+ function escapeHTML(s) {
+ var tmp = s;
+ tmp = tmp.replace(/&/g, "&amp;");
+ tmp = tmp.replace(/</g, "&lt;");
+ tmp = tmp.replace(/>/g, "&gt;");
+ tmp = tmp.replace(/ /g, "&nbsp;");
+ tmp = tmp.replace(/\n/g, "<br />");
+ tmp = tmp.replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp");
+ return tmp;
+
+ }
+
+ document.write("<div id='stdout'></div>");
+ SC_DEFAULT_OUT = new sc_GenericOutputPort(
+ function(s) {
+ var stdout = document.getElementById('stdout');
+ stdout.innerHTML = stdout.innerHTML + escapeHTML(s);
+ });
+ SC_ERROR_OUT = SC_DEFAULT_OUT;
+}
+*/
+
+
+function sc_print_debug() {
+ sc_print.apply(null, arguments);
+}
+/*** META ((export *js*)) */
+var sc_JS_GLOBALS = this;
+
+var __sc_LINE=-1;
+var __sc_FILE="";
+
+/*** META ((export #t)) */
+function sc_alert() {
+ var len = arguments.length;
+ var s = "";
+ var i;
+
+ for( i = 0; i < len; i++ ) {
+ s += sc_toDisplayString(arguments[ i ]);
+ }
+
+ return alert( s );
+}
+
+/*** META ((export #t)) */
+function sc_typeof( x ) {
+ return typeof x;
+}
+
+/*** META ((export #t)) */
+function sc_error() {
+ var a = [sc_jsstring2symbol("*error*")];
+ for (var i = 0; i < arguments.length; i++) {
+ a[i+1] = arguments[i];
+ }
+ throw a;
+}
+
+/*** META ((export #t)
+ (peephole (prefix "throw ")))
+*/
+function sc_raise(obj) {
+ throw obj;
+}
+
+/*** META ((export with-handler-lambda)) */
+function sc_withHandlerLambda(handler, body) {
+ try {
+ return body();
+ } catch(e) {
+ if (!e._internalException)
+ return handler(e);
+ else
+ throw e;
+ }
+}
+
+var sc_properties = new Object();
+
+/*** META ((export #t)) */
+function sc_putpropBang(sym, key, val) {
+ var ht = sc_properties[sym];
+ if (!ht) {
+ ht = new Object();
+ sc_properties[sym] = ht;
+ }
+ ht[key] = val;
+}
+
+/*** META ((export #t)) */
+function sc_getprop(sym, key) {
+ var ht = sc_properties[sym];
+ if (ht) {
+ if (key in ht)
+ return ht[key];
+ else
+ return false;
+ } else
+ return false;
+}
+
+/*** META ((export #t)) */
+function sc_rempropBang(sym, key) {
+ var ht = sc_properties[sym];
+ if (ht)
+ delete ht[key];
+}
+
+/*** META ((export #t)) */
+function sc_any2String(o) {
+ return jsstring2string(sc_toDisplayString(o));
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "==="))
+ (type bool))
+*/
+function sc_isEqv(o1, o2) {
+ return (o1 === o2);
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "==="))
+ (type bool))
+*/
+function sc_isEq(o1, o2) {
+ return (o1 === o2);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isNumber(n) {
+ return (typeof n === "number");
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isComplex(n) {
+ return sc_isNumber(n);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isReal(n) {
+ return sc_isNumber(n);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isRational(n) {
+ return sc_isReal(n);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isInteger(n) {
+ return (parseInt(n) === n);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix ", false")))
+*/
+// we don't have exact numbers...
+function sc_isExact(n) {
+ return false;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ", true"))
+ (type bool))
+*/
+function sc_isInexact(n) {
+ return true;
+}
+
+/*** META ((export = =fx =fl)
+ (type bool)
+ (peephole (infix 2 2 "===")))
+*/
+function sc_equal(x) {
+ for (var i = 1; i < arguments.length; i++)
+ if (x !== arguments[i])
+ return false;
+ return true;
+}
+
+/*** META ((export < <fx <fl)
+ (type bool)
+ (peephole (infix 2 2 "<")))
+*/
+function sc_less(x) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x >= arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export > >fx >fl)
+ (type bool)
+ (peephole (infix 2 2 ">")))
+*/
+function sc_greater(x, y) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x <= arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export <= <=fx <=fl)
+ (type bool)
+ (peephole (infix 2 2 "<=")))
+*/
+function sc_lessEqual(x, y) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x > arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export >= >=fl >=fx)
+ (type bool)
+ (peephole (infix 2 2 ">=")))
+*/
+function sc_greaterEqual(x, y) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x < arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "=== 0")))
+*/
+function sc_isZero(x) {
+ return (x === 0);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "> 0")))
+*/
+function sc_isPositive(x) {
+ return (x > 0);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "< 0")))
+*/
+function sc_isNegative(x) {
+ return (x < 0);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "%2===1")))
+*/
+function sc_isOdd(x) {
+ return (x % 2 === 1);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "%2===0")))
+*/
+function sc_isEven(x) {
+ return (x % 2 === 0);
+}
+
+/*** META ((export #t)) */
+var sc_max = Math.max;
+/*** META ((export #t)) */
+var sc_min = Math.min;
+
+/*** META ((export + +fx +fl)
+ (peephole (infix 0 #f "+" "0")))
+*/
+function sc_plus() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++)
+ sum += arguments[i];
+ return sum;
+}
+
+/*** META ((export * *fx *fl)
+ (peephole (infix 0 #f "*" "1")))
+*/
+function sc_multi() {
+ var product = 1;
+ for (var i = 0; i < arguments.length; i++)
+ product *= arguments[i];
+ return product;
+}
+
+/*** META ((export - -fx -fl)
+ (peephole (minus)))
+*/
+function sc_minus(x) {
+ if (arguments.length === 1)
+ return -x;
+ else {
+ var res = x;
+ for (var i = 1; i < arguments.length; i++)
+ res -= arguments[i];
+ return res;
+ }
+}
+
+/*** META ((export / /fl)
+ (peephole (div)))
+*/
+function sc_div(x) {
+ if (arguments.length === 1)
+ return 1/x;
+ else {
+ var res = x;
+ for (var i = 1; i < arguments.length; i++)
+ res /= arguments[i];
+ return res;
+ }
+}
+
+/*** META ((export #t)) */
+var sc_abs = Math.abs;
+
+/*** META ((export quotient /fx)
+ (peephole (hole 2 "parseInt(" x "/" y ")")))
+*/
+function sc_quotient(x, y) {
+ return parseInt(x / y);
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "%")))
+*/
+function sc_remainder(x, y) {
+ return x % y;
+}
+
+/*** META ((export #t)
+ (peephole (modulo)))
+*/
+function sc_modulo(x, y) {
+ var remainder = x % y;
+ // if they don't have the same sign
+ if ((remainder * y) < 0)
+ return remainder + y;
+ else
+ return remainder;
+}
+
+function sc_euclid_gcd(a, b) {
+ var temp;
+ if (a === 0) return b;
+ if (b === 0) return a;
+ if (a < 0) {a = -a;};
+ if (b < 0) {b = -b;};
+ if (b > a) {temp = a; a = b; b = temp;};
+ while (true) {
+ a %= b;
+ if(a === 0) {return b;};
+ b %= a;
+ if(b === 0) {return a;};
+ };
+ return b;
+}
+
+/*** META ((export #t)) */
+function sc_gcd() {
+ var gcd = 0;
+ for (var i = 0; i < arguments.length; i++)
+ gcd = sc_euclid_gcd(gcd, arguments[i]);
+ return gcd;
+}
+
+/*** META ((export #t)) */
+function sc_lcm() {
+ var lcm = 1;
+ for (var i = 0; i < arguments.length; i++) {
+ var f = Math.round(arguments[i] / sc_euclid_gcd(arguments[i], lcm));
+ lcm *= Math.abs(f);
+ }
+ return lcm;
+}
+
+// LIMITATION: numerator and denominator don't make sense in floating point world.
+//var SC_MAX_DECIMALS = 1000000
+//
+// function sc_numerator(x) {
+// var rounded = Math.round(x * SC_MAX_DECIMALS);
+// return Math.round(rounded / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
+// }
+
+// function sc_denominator(x) {
+// var rounded = Math.round(x * SC_MAX_DECIMALS);
+// return Math.round(SC_MAX_DECIMALS / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
+// }
+
+/*** META ((export #t)) */
+var sc_floor = Math.floor;
+/*** META ((export #t)) */
+var sc_ceiling = Math.ceil;
+/*** META ((export #t)) */
+var sc_truncate = parseInt;
+/*** META ((export #t)) */
+var sc_round = Math.round;
+
+// LIMITATION: sc_rationalize doesn't make sense in a floating point world.
+
+/*** META ((export #t)) */
+var sc_exp = Math.exp;
+/*** META ((export #t)) */
+var sc_log = Math.log;
+/*** META ((export #t)) */
+var sc_sin = Math.sin;
+/*** META ((export #t)) */
+var sc_cos = Math.cos;
+/*** META ((export #t)) */
+var sc_tan = Math.tan;
+/*** META ((export #t)) */
+var sc_asin = Math.asin;
+/*** META ((export #t)) */
+var sc_acos = Math.acos;
+/*** META ((export #t)) */
+var sc_atan = Math.atan;
+
+/*** META ((export #t)) */
+var sc_sqrt = Math.sqrt;
+/*** META ((export #t)) */
+var sc_expt = Math.pow;
+
+// LIMITATION: we don't have complex numbers.
+// LIMITATION: the following functions are hence not implemented.
+// LIMITATION: make-rectangular, make-polar, real-part, imag-part, magnitude, angle
+// LIMITATION: 2 argument atan
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_exact2inexact(x) {
+ return x;
+}
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_inexact2exact(x) {
+ return x;
+}
+
+function sc_number2jsstring(x, radix) {
+ if (radix)
+ return x.toString(radix);
+ else
+ return x.toString();
+}
+
+function sc_jsstring2number(s, radix) {
+ if (s === "") return false;
+
+ if (radix) {
+ var t = parseInt(s, radix);
+ if (!t && t !== 0) return false;
+ // verify that each char is in range. (parseInt ignores leading
+ // white and trailing chars)
+ var allowedChars = "01234567890abcdefghijklmnopqrstuvwxyz".substring(0, radix+1);
+ if ((new RegExp("^["+allowedChars+"]*$", "i")).test(s))
+ return t;
+ else return false;
+ } else {
+ var t = +s; // does not ignore trailing chars.
+ if (!t && t !== 0) return false;
+ // simply verify that first char is not whitespace.
+ var c = s.charAt(0);
+ // if +c is 0, but the char is not "0", then we have a whitespace.
+ if (+c === 0 && c !== "0") return false;
+ return t;
+ }
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (not)))
+*/
+function sc_not(b) {
+ return b === false;
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isBoolean(b) {
+ return (b === true) || (b === false);
+}
+
+function sc_Pair(car, cdr) {
+ this.car = car;
+ this.cdr = cdr;
+}
+
+sc_Pair.prototype.toString = function() {
+ return sc_toDisplayString(this);
+};
+sc_Pair.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
+ var current = this;
+
+ var res = "(";
+
+ while(true) {
+ res += writeOrDisplay(current.car);
+ if (sc_isPair(current.cdr)) {
+ res += " ";
+ current = current.cdr;
+ } else if (current.cdr !== null) {
+ res += " . " + writeOrDisplay(current.cdr);
+ break;
+ } else // current.cdr == null
+ break;
+ }
+
+ res += ")";
+
+ return res;
+};
+sc_Pair.prototype.sc_toDisplayString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toDisplayString);
+};
+sc_Pair.prototype.sc_toWriteString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toWriteString);
+};
+// sc_Pair.prototype.sc_toWriteCircleString in IO.js
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_Pair")))
+*/
+function sc_isPair(p) {
+ return (p instanceof sc_Pair);
+}
+
+function sc_isPairEqual(p1, p2, comp) {
+ return (comp(p1.car, p2.car) && comp(p1.cdr, p2.cdr));
+}
+
+/*** META ((export #t)
+ (peephole (hole 2 "new sc_Pair(" car ", " cdr ")")))
+*/
+function sc_cons(car, cdr) {
+ return new sc_Pair(car, cdr);
+}
+
+/*** META ((export cons*)) */
+function sc_consStar() {
+ var res = arguments[arguments.length - 1];
+ for (var i = arguments.length-2; i >= 0; i--)
+ res = new sc_Pair(arguments[i], res);
+ return res;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".car")))
+*/
+function sc_car(p) {
+ return p.car;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".cdr")))
+*/
+function sc_cdr(p) {
+ return p.cdr;
+}
+
+/*** META ((export #t)
+ (peephole (hole 2 p ".car = " val)))
+*/
+function sc_setCarBang(p, val) {
+ p.car = val;
+}
+
+/*** META ((export #t)
+ (peephole (hole 2 p ".cdr = " val)))
+*/
+function sc_setCdrBang(p, val) {
+ p.cdr = val;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".car.car")))
+*/
+function sc_caar(p) { return p.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car")))
+*/
+function sc_cadr(p) { return p.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr")))
+*/
+function sc_cdar(p) { return p.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr")))
+*/
+function sc_cddr(p) { return p.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.car")))
+*/
+function sc_caaar(p) { return p.car.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.car")))
+*/
+function sc_cadar(p) { return p.car.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.car")))
+*/
+function sc_caadr(p) { return p.cdr.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.car")))
+*/
+function sc_caddr(p) { return p.cdr.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.cdr")))
+*/
+function sc_cdaar(p) { return p.car.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.cdr")))
+*/
+function sc_cdadr(p) { return p.cdr.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.cdr")))
+*/
+function sc_cddar(p) { return p.car.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.cdr")))
+*/
+function sc_cdddr(p) { return p.cdr.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.car.car")))
+*/
+function sc_caaaar(p) { return p.car.car.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.car.car")))
+*/
+function sc_caadar(p) { return p.car.cdr.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.car.car")))
+*/
+function sc_caaadr(p) { return p.cdr.car.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.car.car")))
+*/
+function sc_caaddr(p) { return p.cdr.cdr.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.car.cdr")))
+*/
+function sc_cdaaar(p) { return p.car.car.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.car.cdr")))
+*/
+function sc_cdadar(p) { return p.car.cdr.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.car.cdr")))
+*/
+function sc_cdaadr(p) { return p.cdr.car.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.car.cdr")))
+*/
+function sc_cdaddr(p) { return p.cdr.cdr.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.cdr.car")))
+*/
+function sc_cadaar(p) { return p.car.car.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.cdr.car")))
+*/
+function sc_caddar(p) { return p.car.cdr.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.cdr.car")))
+*/
+function sc_cadadr(p) { return p.cdr.car.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.cdr.car")))
+*/
+function sc_cadddr(p) { return p.cdr.cdr.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.cdr.cdr")))
+*/
+function sc_cddaar(p) { return p.car.car.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.cdr.cdr")))
+*/
+function sc_cdddar(p) { return p.car.cdr.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.cdr.cdr")))
+*/
+function sc_cddadr(p) { return p.cdr.car.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.cdr.cdr")))
+*/
+function sc_cddddr(p) { return p.cdr.cdr.cdr.cdr; }
+
+/*** META ((export #t)) */
+function sc_lastPair(l) {
+ if (!sc_isPair(l)) sc_error("sc_lastPair: pair expected");
+ var res = l;
+ var cdr = l.cdr;
+ while (sc_isPair(cdr)) {
+ res = cdr;
+ cdr = res.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " === null")))
+*/
+function sc_isNull(o) {
+ return (o === null);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isList(o) {
+ var rabbit;
+ var turtle;
+
+ var rabbit = o;
+ var turtle = o;
+ while (true) {
+ if (rabbit === null ||
+ (rabbit instanceof sc_Pair && rabbit.cdr === null))
+ return true; // end of list
+ else if ((rabbit instanceof sc_Pair) &&
+ (rabbit.cdr instanceof sc_Pair)) {
+ rabbit = rabbit.cdr.cdr;
+ turtle = turtle.cdr;
+ if (rabbit === turtle) return false; // cycle
+ } else
+ return false; // not pair
+ }
+}
+
+/*** META ((export #t)) */
+function sc_list() {
+ var res = null;
+ var a = arguments;
+ for (var i = a.length-1; i >= 0; i--)
+ res = new sc_Pair(a[i], res);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_iota(num, init) {
+ var res = null;
+ if (!init) init = 0;
+ for (var i = num - 1; i >= 0; i--)
+ res = new sc_Pair(i + init, res);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_makeList(nbEls, fill) {
+ var res = null;
+ for (var i = 0; i < nbEls; i++)
+ res = new sc_Pair(fill, res);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_length(l) {
+ var res = 0;
+ while (l !== null) {
+ res++;
+ l = l.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_remq(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ while (l !== null) {
+ if (l.car !== o) {
+ tail.cdr = sc_cons(l.car, null);
+ tail = tail.cdr;
+ }
+ l = l.cdr;
+ }
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_remqBang(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ var needsAssig = true;
+ while (l !== null) {
+ if (l.car === o) {
+ needsAssig = true;
+ } else {
+ if (needsAssig) {
+ tail.cdr = l;
+ needsAssig = false;
+ }
+ tail = l;
+ }
+ l = l.cdr;
+ }
+ tail.cdr = null;
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_delete(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ while (l !== null) {
+ if (!sc_isEqual(l.car, o)) {
+ tail.cdr = sc_cons(l.car, null);
+ tail = tail.cdr;
+ }
+ l = l.cdr;
+ }
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_deleteBang(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ var needsAssig = true;
+ while (l !== null) {
+ if (sc_isEqual(l.car, o)) {
+ needsAssig = true;
+ } else {
+ if (needsAssig) {
+ tail.cdr = l;
+ needsAssig = false;
+ }
+ tail = l;
+ }
+ l = l.cdr;
+ }
+ tail.cdr = null;
+ return dummy.cdr;
+}
+
+function sc_reverseAppendBang(l1, l2) {
+ var res = l2;
+ while (l1 !== null) {
+ var tmp = res;
+ res = l1;
+ l1 = l1.cdr;
+ res.cdr = tmp;
+ }
+ return res;
+}
+
+function sc_dualAppend(l1, l2) {
+ if (l1 === null) return l2;
+ if (l2 === null) return l1;
+ var rev = sc_reverse(l1);
+ return sc_reverseAppendBang(rev, l2);
+}
+
+/*** META ((export #t)) */
+function sc_append() {
+ if (arguments.length === 0)
+ return null;
+ var res = arguments[arguments.length - 1];
+ for (var i = arguments.length - 2; i >= 0; i--)
+ res = sc_dualAppend(arguments[i], res);
+ return res;
+}
+
+function sc_dualAppendBang(l1, l2) {
+ if (l1 === null) return l2;
+ if (l2 === null) return l1;
+ var tmp = l1;
+ while (tmp.cdr !== null) tmp=tmp.cdr;
+ tmp.cdr = l2;
+ return l1;
+}
+
+/*** META ((export #t)) */
+function sc_appendBang() {
+ var res = null;
+ for (var i = 0; i < arguments.length; i++)
+ res = sc_dualAppendBang(res, arguments[i]);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_reverse(l1) {
+ var res = null;
+ while (l1 !== null) {
+ res = sc_cons(l1.car, res);
+ l1 = l1.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_reverseBang(l) {
+ return sc_reverseAppendBang(l, null);
+}
+
+/*** META ((export #t)) */
+function sc_listTail(l, k) {
+ var res = l;
+ for (var i = 0; i < k; i++) {
+ res = res.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_listRef(l, k) {
+ return sc_listTail(l, k).car;
+}
+
+/* // unoptimized generic versions
+function sc_memX(o, l, comp) {
+ while (l != null) {
+ if (comp(l.car, o))
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+function sc_memq(o, l) { return sc_memX(o, l, sc_isEq); }
+function sc_memv(o, l) { return sc_memX(o, l, sc_isEqv); }
+function sc_member(o, l) { return sc_memX(o, l, sc_isEqual); }
+*/
+
+/* optimized versions */
+/*** META ((export #t)) */
+function sc_memq(o, l) {
+ while (l !== null) {
+ if (l.car === o)
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_memv(o, l) {
+ while (l !== null) {
+ if (l.car === o)
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_member(o, l) {
+ while (l !== null) {
+ if (sc_isEqual(l.car,o))
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+
+/* // generic unoptimized versions
+function sc_assX(o, al, comp) {
+ while (al != null) {
+ if (comp(al.car.car, o))
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+function sc_assq(o, al) { return sc_assX(o, al, sc_isEq); }
+function sc_assv(o, al) { return sc_assX(o, al, sc_isEqv); }
+function sc_assoc(o, al) { return sc_assX(o, al, sc_isEqual); }
+*/
+// optimized versions
+/*** META ((export #t)) */
+function sc_assq(o, al) {
+ while (al !== null) {
+ if (al.car.car === o)
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_assv(o, al) {
+ while (al !== null) {
+ if (al.car.car === o)
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_assoc(o, al) {
+ while (al !== null) {
+ if (sc_isEqual(al.car.car, o))
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+
+/* can be used for mutable strings and characters */
+function sc_isCharStringEqual(cs1, cs2) { return cs1.val === cs2.val; }
+function sc_isCharStringLess(cs1, cs2) { return cs1.val < cs2.val; }
+function sc_isCharStringGreater(cs1, cs2) { return cs1.val > cs2.val; }
+function sc_isCharStringLessEqual(cs1, cs2) { return cs1.val <= cs2.val; }
+function sc_isCharStringGreaterEqual(cs1, cs2) { return cs1.val >= cs2.val; }
+function sc_isCharStringCIEqual(cs1, cs2)
+ { return cs1.val.toLowerCase() === cs2.val.toLowerCase(); }
+function sc_isCharStringCILess(cs1, cs2)
+ { return cs1.val.toLowerCase() < cs2.val.toLowerCase(); }
+function sc_isCharStringCIGreater(cs1, cs2)
+ { return cs1.val.toLowerCase() > cs2.val.toLowerCase(); }
+function sc_isCharStringCILessEqual(cs1, cs2)
+ { return cs1.val.toLowerCase() <= cs2.val.toLowerCase(); }
+function sc_isCharStringCIGreaterEqual(cs1, cs2)
+ { return cs1.val.toLowerCase() >= cs2.val.toLowerCase(); }
+
+
+
+
+function sc_Char(c) {
+ var cached = sc_Char.lazy[c];
+ if (cached)
+ return cached;
+ this.val = c;
+ sc_Char.lazy[c] = this;
+ // add return, so FF does not complain.
+ return undefined;
+}
+sc_Char.lazy = new Object();
+// thanks to Eric
+sc_Char.char2readable = {
+ "\000": "#\\null",
+ "\007": "#\\bell",
+ "\010": "#\\backspace",
+ "\011": "#\\tab",
+ "\012": "#\\newline",
+ "\014": "#\\page",
+ "\015": "#\\return",
+ "\033": "#\\escape",
+ "\040": "#\\space",
+ "\177": "#\\delete",
+
+ /* poeticless names */
+ "\001": "#\\soh",
+ "\002": "#\\stx",
+ "\003": "#\\etx",
+ "\004": "#\\eot",
+ "\005": "#\\enq",
+ "\006": "#\\ack",
+
+ "\013": "#\\vt",
+ "\016": "#\\so",
+ "\017": "#\\si",
+
+ "\020": "#\\dle",
+ "\021": "#\\dc1",
+ "\022": "#\\dc2",
+ "\023": "#\\dc3",
+ "\024": "#\\dc4",
+ "\025": "#\\nak",
+ "\026": "#\\syn",
+ "\027": "#\\etb",
+
+ "\030": "#\\can",
+ "\031": "#\\em",
+ "\032": "#\\sub",
+ "\033": "#\\esc",
+ "\034": "#\\fs",
+ "\035": "#\\gs",
+ "\036": "#\\rs",
+ "\037": "#\\us"};
+
+sc_Char.readable2char = {
+ "null": "\000",
+ "bell": "\007",
+ "backspace": "\010",
+ "tab": "\011",
+ "newline": "\012",
+ "page": "\014",
+ "return": "\015",
+ "escape": "\033",
+ "space": "\040",
+ "delete": "\000",
+ "soh": "\001",
+ "stx": "\002",
+ "etx": "\003",
+ "eot": "\004",
+ "enq": "\005",
+ "ack": "\006",
+ "bel": "\007",
+ "bs": "\010",
+ "ht": "\011",
+ "nl": "\012",
+ "vt": "\013",
+ "np": "\014",
+ "cr": "\015",
+ "so": "\016",
+ "si": "\017",
+ "dle": "\020",
+ "dc1": "\021",
+ "dc2": "\022",
+ "dc3": "\023",
+ "dc4": "\024",
+ "nak": "\025",
+ "syn": "\026",
+ "etb": "\027",
+ "can": "\030",
+ "em": "\031",
+ "sub": "\032",
+ "esc": "\033",
+ "fs": "\034",
+ "gs": "\035",
+ "rs": "\036",
+ "us": "\037",
+ "sp": "\040",
+ "del": "\177"};
+
+sc_Char.prototype.toString = function() {
+ return this.val;
+};
+// sc_toDisplayString == toString
+sc_Char.prototype.sc_toWriteString = function() {
+ var entry = sc_Char.char2readable[this.val];
+ if (entry)
+ return entry;
+ else
+ return "#\\" + this.val;
+};
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "instanceof sc_Char")))
+*/
+function sc_isChar(c) {
+ return (c instanceof sc_Char);
+}
+
+/*** META ((export char=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val === " c2 ".val")))
+*/
+var sc_isCharEqual = sc_isCharStringEqual;
+/*** META ((export char<?)
+ (type bool)
+ (peephole (hole 2 c1 ".val < " c2 ".val")))
+*/
+var sc_isCharLess = sc_isCharStringLess;
+/*** META ((export char>?)
+ (type bool)
+ (peephole (hole 2 c1 ".val > " c2 ".val")))
+*/
+var sc_isCharGreater = sc_isCharStringGreater;
+/*** META ((export char<=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val <= " c2 ".val")))
+*/
+var sc_isCharLessEqual = sc_isCharStringLessEqual;
+/*** META ((export char>=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val >= " c2 ".val")))
+*/
+var sc_isCharGreaterEqual = sc_isCharStringGreaterEqual;
+/*** META ((export char-ci=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() === " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCIEqual = sc_isCharStringCIEqual;
+/*** META ((export char-ci<?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() < " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCILess = sc_isCharStringCILess;
+/*** META ((export char-ci>?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() > " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCIGreater = sc_isCharStringCIGreater;
+/*** META ((export char-ci<=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() <= " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCILessEqual = sc_isCharStringCILessEqual;
+/*** META ((export char-ci>=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() >= " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCIGreaterEqual = sc_isCharStringCIGreaterEqual;
+
+var SC_NUMBER_CLASS = "0123456789";
+var SC_WHITESPACE_CLASS = ' \r\n\t\f';
+var SC_LOWER_CLASS = 'abcdefghijklmnopqrstuvwxyz';
+var SC_UPPER_CLASS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+
+function sc_isCharOfClass(c, cl) { return (cl.indexOf(c) != -1); }
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isCharAlphabetic(c)
+ { return sc_isCharOfClass(c.val, SC_LOWER_CLASS) ||
+ sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "SC_NUMBER_CLASS.indexOf(" c ".val) != -1")))
+*/
+function sc_isCharNumeric(c)
+ { return sc_isCharOfClass(c.val, SC_NUMBER_CLASS); }
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isCharWhitespace(c) {
+ var tmp = c.val;
+ return tmp === " " || tmp === "\r" || tmp === "\n" || tmp === "\t" || tmp === "\f";
+}
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "SC_UPPER_CLASS.indexOf(" c ".val) != -1")))
+*/
+function sc_isCharUpperCase(c)
+ { return sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "SC_LOWER_CLASS.indexOf(" c ".val) != -1")))
+*/
+function sc_isCharLowerCase(c)
+ { return sc_isCharOfClass(c.val, SC_LOWER_CLASS); }
+
+/*** META ((export #t)
+ (peephole (postfix ".val.charCodeAt(0)")))
+*/
+function sc_char2integer(c)
+ { return c.val.charCodeAt(0); }
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Char(String.fromCharCode(" n "))")))
+*/
+function sc_integer2char(n)
+ { return new sc_Char(String.fromCharCode(n)); }
+
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Char(" c ".val.toUpperCase())")))
+*/
+function sc_charUpcase(c)
+ { return new sc_Char(c.val.toUpperCase()); }
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Char(" c ".val.toLowerCase())")))
+*/
+function sc_charDowncase(c)
+ { return new sc_Char(c.val.toLowerCase()); }
+
+function sc_makeJSStringOfLength(k, c) {
+ var fill;
+ if (c === undefined)
+ fill = " ";
+ else
+ fill = c;
+ var res = "";
+ var len = 1;
+ // every round doubles the size of fill.
+ while (k >= len) {
+ if (k & len)
+ res = res.concat(fill);
+ fill = fill.concat(fill);
+ len *= 2;
+ }
+ return res;
+}
+
+function sc_makejsString(k, c) {
+ var fill;
+ if (c)
+ fill = c.val;
+ else
+ fill = " ";
+ return sc_makeJSStringOfLength(k, fill);
+}
+
+function sc_jsstring2list(s) {
+ var res = null;
+ for (var i = s.length - 1; i >= 0; i--)
+ res = sc_cons(new sc_Char(s.charAt(i)), res);
+ return res;
+}
+
+function sc_list2jsstring(l) {
+ var a = new Array();
+ while(l !== null) {
+ a.push(l.car.val);
+ l = l.cdr;
+ }
+ return "".concat.apply("", a);
+}
+
+var sc_Vector = Array;
+
+sc_Vector.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
+ if (this.length === 0) return "#()";
+
+ var res = "#(" + writeOrDisplay(this[0]);
+ for (var i = 1; i < this.length; i++)
+ res += " " + writeOrDisplay(this[i]);
+ res += ")";
+ return res;
+};
+sc_Vector.prototype.sc_toDisplayString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toDisplayString);
+};
+sc_Vector.prototype.sc_toWriteString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toWriteString);
+};
+
+/*** META ((export vector? array?)
+ (type bool)
+ (peephole (postfix " instanceof sc_Vector")))
+*/
+function sc_isVector(v) {
+ return (v instanceof sc_Vector);
+}
+
+// only applies to vectors
+function sc_isVectorEqual(v1, v2, comp) {
+ if (v1.length !== v2.length) return false;
+ for (var i = 0; i < v1.length; i++)
+ if (!comp(v1[i], v2[i])) return false;
+ return true;
+}
+
+/*** META ((export make-vector make-array)) */
+function sc_makeVector(size, fill) {
+ var a = new sc_Vector(size);
+ if (fill !== undefined)
+ sc_vectorFillBang(a, fill);
+ return a;
+}
+
+/*** META ((export vector array)
+ (peephole (vector)))
+*/
+function sc_vector() {
+ var a = new sc_Vector();
+ for (var i = 0; i < arguments.length; i++)
+ a.push(arguments[i]);
+ return a;
+}
+
+/*** META ((export vector-length array-length)
+ (peephole (postfix ".length")))
+*/
+function sc_vectorLength(v) {
+ return v.length;
+}
+
+/*** META ((export vector-ref array-ref)
+ (peephole (hole 2 v "[" pos "]")))
+*/
+function sc_vectorRef(v, pos) {
+ return v[pos];
+}
+
+/*** META ((export vector-set! array-set!)
+ (peephole (hole 3 v "[" pos "] = " val)))
+*/
+function sc_vectorSetBang(v, pos, val) {
+ v[pos] = val;
+}
+
+/*** META ((export vector->list array->list)) */
+function sc_vector2list(a) {
+ var res = null;
+ for (var i = a.length-1; i >= 0; i--)
+ res = sc_cons(a[i], res);
+ return res;
+}
+
+/*** META ((export list->vector list->array)) */
+function sc_list2vector(l) {
+ var a = new sc_Vector();
+ while(l !== null) {
+ a.push(l.car);
+ l = l.cdr;
+ }
+ return a;
+}
+
+/*** META ((export vector-fill! array-fill!)) */
+function sc_vectorFillBang(a, fill) {
+ for (var i = 0; i < a.length; i++)
+ a[i] = fill;
+}
+
+
+/*** META ((export #t)) */
+function sc_copyVector(a, len) {
+ if (len <= a.length)
+ return a.slice(0, len);
+ else {
+ var tmp = a.concat();
+ tmp.length = len;
+ return tmp;
+ }
+}
+
+/*** META ((export #t)
+ (peephole (hole 3 a ".slice(" start "," end ")")))
+*/
+function sc_vectorCopy(a, start, end) {
+ return a.slice(start, end);
+}
+
+/*** META ((export #t)) */
+function sc_vectorCopyBang(target, tstart, source, sstart, send) {
+ if (!sstart) sstart = 0;
+ if (!send) send = source.length;
+
+ // if target == source we don't want to overwrite not yet copied elements.
+ if (tstart <= sstart) {
+ for (var i = tstart, j = sstart; j < send; i++, j++) {
+ target[i] = source[j];
+ }
+ } else {
+ var diff = send - sstart;
+ for (var i = tstart + diff - 1, j = send - 1;
+ j >= sstart;
+ i--, j--) {
+ target[i] = source[j];
+ }
+ }
+ return target;
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "typeof " o " === 'function'")))
+*/
+function sc_isProcedure(o) {
+ return (typeof o === "function");
+}
+
+/*** META ((export #t)) */
+function sc_apply(proc) {
+ var args = new Array();
+ // first part of arguments are not in list-form.
+ for (var i = 1; i < arguments.length - 1; i++)
+ args.push(arguments[i]);
+ var l = arguments[arguments.length - 1];
+ while (l !== null) {
+ args.push(l.car);
+ l = l.cdr;
+ }
+ return proc.apply(null, args);
+}
+
+/*** META ((export #t)) */
+function sc_map(proc, l1) {
+ if (l1 === undefined)
+ return null;
+ // else
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ var revres = null;
+ while (l1 !== null) {
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ revres = sc_cons(proc.apply(null, applyArgs), revres);
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_mapBang(proc, l1) {
+ if (l1 === undefined)
+ return null;
+ // else
+ var l1_orig = l1;
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ while (l1 !== null) {
+ var tmp = l1;
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ tmp.car = proc.apply(null, applyArgs);
+ }
+ return l1_orig;
+}
+
+/*** META ((export #t)) */
+function sc_forEach(proc, l1) {
+ if (l1 === undefined)
+ return undefined;
+ // else
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ while (l1 !== null) {
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ proc.apply(null, applyArgs);
+ }
+ // add return so FF does not complain.
+ return undefined;
+}
+
+/*** META ((export #t)) */
+function sc_filter(proc, l1) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ while (l1 !== null) {
+ if (proc(l1.car) !== false) {
+ tail.cdr = sc_cons(l1.car, null);
+ tail = tail.cdr;
+ }
+ l1 = l1.cdr;
+ }
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_filterBang(proc, l1) {
+ var head = sc_cons("dummy", l1);
+ var it = head;
+ var next = l1;
+ while (next !== null) {
+ if (proc(next.car) !== false) {
+ it.cdr = next
+ it = next;
+ }
+ next = next.cdr;
+ }
+ it.cdr = null;
+ return head.cdr;
+}
+
+function sc_filterMap1(proc, l1) {
+ var revres = null;
+ while (l1 !== null) {
+ var tmp = proc(l1.car)
+ if (tmp !== false) revres = sc_cons(tmp, revres);
+ l1 = l1.cdr;
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+function sc_filterMap2(proc, l1, l2) {
+ var revres = null;
+ while (l1 !== null) {
+ var tmp = proc(l1.car, l2.car);
+ if(tmp !== false) revres = sc_cons(tmp, revres);
+ l1 = l1.cdr;
+ l2 = l2.cdr
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_filterMap(proc, l1, l2, l3) {
+ if (l2 === undefined)
+ return sc_filterMap1(proc, l1);
+ else if (l3 === undefined)
+ return sc_filterMap2(proc, l1, l2);
+ // else
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ var revres = null;
+ while (l1 !== null) {
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ var tmp = proc.apply(null, applyArgs);
+ if(tmp !== false) revres = sc_cons(tmp, revres);
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_any(proc, l) {
+ var revres = null;
+ while (l !== null) {
+ var tmp = proc(l.car);
+ if(tmp !== false) return tmp;
+ l = l.cdr;
+ }
+ return false;
+}
+
+/*** META ((export any?)
+ (peephole (hole 2 "sc_any(" proc "," l ") !== false")))
+*/
+function sc_anyPred(proc, l) {
+ return sc_any(proc, l)!== false;
+}
+
+/*** META ((export #t)) */
+function sc_every(proc, l) {
+ var revres = null;
+ var tmp = true;
+ while (l !== null) {
+ tmp = proc(l.car);
+ if (tmp === false) return false;
+ l = l.cdr;
+ }
+ return tmp;
+}
+
+/*** META ((export every?)
+ (peephole (hole 2 "sc_every(" proc "," l ") !== false")))
+*/
+function sc_everyPred(proc, l) {
+ var tmp = sc_every(proc, l);
+ if (tmp !== false) return true;
+ return false;
+}
+
+/*** META ((export #t)
+ (peephole (postfix "()")))
+*/
+function sc_force(o) {
+ return o();
+}
+
+/*** META ((export #t)) */
+function sc_makePromise(proc) {
+ var isResultReady = false;
+ var result = undefined;
+ return function() {
+ if (!isResultReady) {
+ var tmp = proc();
+ if (!isResultReady) {
+ isResultReady = true;
+ result = tmp;
+ }
+ }
+ return result;
+ };
+}
+
+function sc_Values(values) {
+ this.values = values;
+}
+
+/*** META ((export #t)
+ (peephole (values)))
+*/
+function sc_values() {
+ if (arguments.length === 1)
+ return arguments[0];
+ else
+ return new sc_Values(arguments);
+}
+
+/*** META ((export #t)) */
+function sc_callWithValues(producer, consumer) {
+ var produced = producer();
+ if (produced instanceof sc_Values)
+ return consumer.apply(null, produced.values);
+ else
+ return consumer(produced);
+}
+
+/*** META ((export #t)) */
+function sc_dynamicWind(before, thunk, after) {
+ before();
+ try {
+ var res = thunk();
+ return res;
+ } finally {
+ after();
+ }
+}
+
+
+// TODO: eval/scheme-report-environment/null-environment/interaction-environment
+
+// LIMITATION: 'load' doesn't exist without files.
+// LIMITATION: transcript-on/transcript-off doesn't exist without files.
+
+
+function sc_Struct(name) {
+ this.name = name;
+}
+sc_Struct.prototype.sc_toDisplayString = function() {
+ return "#<struct" + sc_hash(this) + ">";
+};
+sc_Struct.prototype.sc_toWriteString = sc_Struct.prototype.sc_toDisplayString;
+
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Struct(" name ")")))
+*/
+function sc_makeStruct(name) {
+ return new sc_Struct(name);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_Struct")))
+*/
+function sc_isStruct(o) {
+ return (o instanceof sc_Struct);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 2 "(" 1 " instanceof sc_Struct) && ( " 1 ".name === " 0 ")")))
+*/
+function sc_isStructNamed(name, s) {
+ return ((s instanceof sc_Struct) && (s.name === name));
+}
+
+/*** META ((export struct-field)
+ (peephole (hole 3 0 "[" 2 "]")))
+*/
+function sc_getStructField(s, name, field) {
+ return s[field];
+}
+
+/*** META ((export struct-field-set!)
+ (peephole (hole 4 0 "[" 2 "] = " 3)))
+*/
+function sc_setStructFieldBang(s, name, field, val) {
+ s[field] = val;
+}
+
+/*** META ((export #t)
+ (peephole (prefix "~")))
+*/
+function sc_bitNot(x) {
+ return ~x;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "&")))
+*/
+function sc_bitAnd(x, y) {
+ return x & y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "|")))
+*/
+function sc_bitOr(x, y) {
+ return x | y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "^")))
+*/
+function sc_bitXor(x, y) {
+ return x ^ y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "<<")))
+*/
+function sc_bitLsh(x, y) {
+ return x << y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 ">>")))
+*/
+function sc_bitRsh(x, y) {
+ return x >> y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 ">>>")))
+*/
+function sc_bitUrsh(x, y) {
+ return x >>> y;
+}
+
+/*** META ((export js-field js-property)
+ (peephole (hole 2 o "[" field "]")))
+*/
+function sc_jsField(o, field) {
+ return o[field];
+}
+
+/*** META ((export js-field-set! js-property-set!)
+ (peephole (hole 3 o "[" field "] = " val)))
+*/
+function sc_setJsFieldBang(o, field, val) {
+ return o[field] = val;
+}
+
+/*** META ((export js-field-delete! js-property-delete!)
+ (peephole (hole 2 "delete" o "[" field "]")))
+*/
+function sc_deleteJsFieldBang(o, field) {
+ delete o[field];
+}
+
+/*** META ((export #t)
+ (peephole (jsCall)))
+*/
+function sc_jsCall(o, fun) {
+ var args = new Array();
+ for (var i = 2; i < arguments.length; i++)
+ args[i-2] = arguments[i];
+ return fun.apply(o, args);
+}
+
+/*** META ((export #t)
+ (peephole (jsMethodCall)))
+*/
+function sc_jsMethodCall(o, field) {
+ var args = new Array();
+ for (var i = 2; i < arguments.length; i++)
+ args[i-2] = arguments[i];
+ return o[field].apply(o, args);
+}
+
+/*** META ((export new js-new)
+ (peephole (jsNew)))
+*/
+function sc_jsNew(c) {
+ var evalStr = "new c(";
+ evalStr +=arguments.length > 1? "arguments[1]": "";
+ for (var i = 2; i < arguments.length; i++)
+ evalStr += ", arguments[" + i + "]";
+ evalStr +=")";
+ return eval(evalStr);
+}
+
+// ======================== RegExp ====================
+/*** META ((export #t)) */
+function sc_pregexp(re) {
+ return new RegExp(sc_string2jsstring(re));
+}
+
+/*** META ((export #t)) */
+function sc_pregexpMatch(re, s) {
+ var reg = (re instanceof RegExp) ? re : sc_pregexp(re);
+ var tmp = reg.exec(sc_string2jsstring(s));
+
+ if (tmp == null) return false;
+
+ var res = null;
+ for (var i = tmp.length-1; i >= 0; i--) {
+ if (tmp[i] !== null) {
+ res = sc_cons(sc_jsstring2string(tmp[i]), res);
+ } else {
+ res = sc_cons(false, res);
+ }
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_pregexpReplace(re, s1, s2) {
+ var reg;
+ var jss1 = sc_string2jsstring(s1);
+ var jss2 = sc_string2jsstring(s2);
+
+ if (re instanceof RegExp) {
+ if (re.global)
+ reg = re;
+ else
+ reg = new RegExp(re.source);
+ } else {
+ reg = new RegExp(sc_string2jsstring(re));
+ }
+
+ return jss1.replace(reg, jss2);
+}
+
+/*** META ((export pregexp-replace*)) */
+function sc_pregexpReplaceAll(re, s1, s2) {
+ var reg;
+ var jss1 = sc_string2jsstring(s1);
+ var jss2 = sc_string2jsstring(s2);
+
+ if (re instanceof RegExp) {
+ if (re.global)
+ reg = re;
+ else
+ reg = new RegExp(re.source, "g");
+ } else {
+ reg = new RegExp(sc_string2jsstring(re), "g");
+ }
+
+ return jss1.replace(reg, jss2);
+}
+
+/*** META ((export #t)) */
+function sc_pregexpSplit(re, s) {
+ var reg = ((re instanceof RegExp) ?
+ re :
+ new RegExp(sc_string2jsstring(re)));
+ var jss = sc_string2jsstring(s);
+ var tmp = jss.split(reg);
+
+ if (tmp == null) return false;
+
+ return sc_vector2list(tmp);
+}
+
+
+/* =========================================================================== */
+/* Other library stuff */
+/* =========================================================================== */
+
+/*** META ((export #t)
+ (peephole (hole 1 "Math.floor(Math.random()*" 'n ")")))
+*/
+function sc_random(n) {
+ return Math.floor(Math.random()*n);
+}
+
+/*** META ((export current-date)
+ (peephole (hole 0 "new Date()")))
+*/
+function sc_currentDate() {
+ return new Date();
+}
+
+function sc_Hashtable() {
+}
+sc_Hashtable.prototype.toString = function() {
+ return "#{%hashtable}";
+};
+// sc_toWriteString == sc_toDisplayString == toString
+
+function sc_HashtableElement(key, val) {
+ this.key = key;
+ this.val = val;
+}
+
+/*** META ((export #t)
+ (peephole (hole 0 "new sc_Hashtable()")))
+*/
+function sc_makeHashtable() {
+ return new sc_Hashtable();
+}
+
+/*** META ((export #t)) */
+function sc_hashtablePutBang(ht, key, val) {
+ var hash = sc_hash(key);
+ ht[hash] = new sc_HashtableElement(key, val);
+}
+
+/*** META ((export #t)) */
+function sc_hashtableGet(ht, key) {
+ var hash = sc_hash(key);
+ if (hash in ht)
+ return ht[hash].val;
+ else
+ return false;
+}
+
+/*** META ((export #t)) */
+function sc_hashtableForEach(ht, f) {
+ for (var v in ht) {
+ if (ht[v] instanceof sc_HashtableElement)
+ f(ht[v].key, ht[v].val);
+ }
+}
+
+/*** META ((export hashtable-contains?)
+ (peephole (hole 2 "sc_hash(" 1 ") in " 0)))
+*/
+function sc_hashtableContains(ht, key) {
+ var hash = sc_hash(key);
+ if (hash in ht)
+ return true;
+ else
+ return false;
+}
+
+var SC_HASH_COUNTER = 0;
+
+function sc_hash(o) {
+ if (o === null)
+ return "null";
+ else if (o === undefined)
+ return "undefined";
+ else if (o === true)
+ return "true";
+ else if (o === false)
+ return "false";
+ else if (typeof o === "number")
+ return "num-" + o;
+ else if (typeof o === "string")
+ return "jsstr-" + o;
+ else if (o.sc_getHash)
+ return o.sc_getHash();
+ else
+ return sc_counterHash.call(o);
+}
+function sc_counterHash() {
+ if (!this.sc_hash) {
+ this.sc_hash = "hash-" + SC_HASH_COUNTER;
+ SC_HASH_COUNTER++;
+ }
+ return this.sc_hash;
+}
+
+function sc_Trampoline(args, maxTailCalls) {
+ this['__trampoline return__'] = true;
+ this.args = args;
+ this.MAX_TAIL_CALLs = maxTailCalls;
+}
+// TODO: call/cc stuff
+sc_Trampoline.prototype.restart = function() {
+ var o = this;
+ while (true) {
+ // set both globals.
+ SC_TAIL_OBJECT.calls = o.MAX_TAIL_CALLs-1;
+ var fun = o.args.callee;
+ var res = fun.apply(SC_TAIL_OBJECT, o.args);
+ if (res instanceof sc_Trampoline)
+ o = res;
+ else
+ return res;
+ }
+}
+
+/*** META ((export bind-exit-lambda)) */
+function sc_bindExitLambda(proc) {
+ var escape_obj = new sc_BindExitException();
+ var escape = function(res) {
+ escape_obj.res = res;
+ throw escape_obj;
+ };
+ try {
+ return proc(escape);
+ } catch(e) {
+ if (e === escape_obj) {
+ return e.res;
+ }
+ throw e;
+ }
+}
+function sc_BindExitException() {
+ this._internalException = true;
+}
+
+var SC_SCM2JS_GLOBALS = new Object();
+
+// default tail-call depth.
+// normally the program should set it again. but just in case...
+var SC_TAIL_OBJECT = new Object();
+SC_SCM2JS_GLOBALS.TAIL_OBJECT = SC_TAIL_OBJECT;
+// ======================== I/O =======================
+
+/*------------------------------------------------------------------*/
+
+function sc_EOF() {
+}
+var SC_EOF_OBJECT = new sc_EOF();
+
+function sc_Port() {
+}
+
+/* --------------- Input ports -------------------------------------*/
+
+function sc_InputPort() {
+}
+sc_InputPort.prototype = new sc_Port();
+
+sc_InputPort.prototype.peekChar = function() {
+ if (!("peeked" in this))
+ this.peeked = this.getNextChar();
+ return this.peeked;
+}
+sc_InputPort.prototype.readChar = function() {
+ var tmp = this.peekChar();
+ delete this.peeked;
+ return tmp;
+}
+sc_InputPort.prototype.isCharReady = function() {
+ return true;
+}
+sc_InputPort.prototype.close = function() {
+ // do nothing
+}
+
+/* .............. String port ..........................*/
+function sc_ErrorInputPort() {
+};
+sc_ErrorInputPort.prototype = new sc_InputPort();
+sc_ErrorInputPort.prototype.getNextChar = function() {
+ throw "can't read from error-port.";
+};
+sc_ErrorInputPort.prototype.isCharReady = function() {
+ return false;
+};
+
+
+/* .............. String port ..........................*/
+
+function sc_StringInputPort(jsStr) {
+ // we are going to do some charAts on the str.
+ // instead of recreating all the time a String-object, we
+ // create one in the beginning. (not sure, if this is really an optim)
+ this.str = new String(jsStr);
+ this.pos = 0;
+}
+sc_StringInputPort.prototype = new sc_InputPort();
+sc_StringInputPort.prototype.getNextChar = function() {
+ if (this.pos >= this.str.length)
+ return SC_EOF_OBJECT;
+ return this.str.charAt(this.pos++);
+};
+
+/* ------------- Read and other lib-funs -------------------------------*/
+function sc_Token(type, val, pos) {
+ this.type = type;
+ this.val = val;
+ this.pos = pos;
+}
+sc_Token.EOF = 0/*EOF*/;
+sc_Token.OPEN_PAR = 1/*OPEN_PAR*/;
+sc_Token.CLOSE_PAR = 2/*CLOSE_PAR*/;
+sc_Token.OPEN_BRACE = 3/*OPEN_BRACE*/;
+sc_Token.CLOSE_BRACE = 4/*CLOSE_BRACE*/;
+sc_Token.OPEN_BRACKET = 5/*OPEN_BRACKET*/;
+sc_Token.CLOSE_BRACKET = 6/*CLOSE_BRACKET*/;
+sc_Token.WHITESPACE = 7/*WHITESPACE*/;
+sc_Token.QUOTE = 8/*QUOTE*/;
+sc_Token.ID = 9/*ID*/;
+sc_Token.DOT = 10/*DOT*/;
+sc_Token.STRING = 11/*STRING*/;
+sc_Token.NUMBER = 12/*NUMBER*/;
+sc_Token.ERROR = 13/*ERROR*/;
+sc_Token.VECTOR_BEGIN = 14/*VECTOR_BEGIN*/;
+sc_Token.TRUE = 15/*TRUE*/;
+sc_Token.FALSE = 16/*FALSE*/;
+sc_Token.UNSPECIFIED = 17/*UNSPECIFIED*/;
+sc_Token.REFERENCE = 18/*REFERENCE*/;
+sc_Token.STORE = 19/*STORE*/;
+sc_Token.CHAR = 20/*CHAR*/;
+
+var SC_ID_CLASS = SC_LOWER_CLASS + SC_UPPER_CLASS + "!$%*+-./:<=>?@^_~";
+function sc_Tokenizer(port) {
+ this.port = port;
+}
+sc_Tokenizer.prototype.peekToken = function() {
+ if (this.peeked)
+ return this.peeked;
+ var newToken = this.nextToken();
+ this.peeked = newToken;
+ return newToken;
+};
+sc_Tokenizer.prototype.readToken = function() {
+ var tmp = this.peekToken();
+ delete this.peeked;
+ return tmp;
+};
+sc_Tokenizer.prototype.nextToken = function() {
+ var port = this.port;
+
+ function isNumberChar(c) {
+ return (c >= "0" && c <= "9");
+ };
+ function isIdOrNumberChar(c) {
+ return SC_ID_CLASS.indexOf(c) != -1 || // ID-char
+ (c >= "0" && c <= "9");
+ }
+ function isWhitespace(c) {
+ return c === " " || c === "\r" || c === "\n" || c === "\t" || c === "\f";
+ };
+ function isWhitespaceOrEOF(c) {
+ return isWhitespace(c) || c === SC_EOF_OBJECT;
+ };
+
+ function readString() {
+ res = "";
+ while (true) {
+ var c = port.readChar();
+ switch (c) {
+ case '"':
+ return new sc_Token(11/*STRING*/, res);
+ case "\\":
+ var tmp = port.readChar();
+ switch (tmp) {
+ case '0': res += "\0"; break;
+ case 'a': res += "\a"; break;
+ case 'b': res += "\b"; break;
+ case 'f': res += "\f"; break;
+ case 'n': res += "\n"; break;
+ case 'r': res += "\r"; break;
+ case 't': res += "\t"; break;
+ case 'v': res += "\v"; break;
+ case '"': res += '"'; break;
+ case '\\': res += '\\'; break;
+ case 'x':
+ /* hexa-number */
+ var nb = 0;
+ while (true) {
+ var hexC = port.peekChar();
+ if (hexC >= '0' && hexC <= '9') {
+ port.readChar();
+ nb = nb * 16 + hexC.charCodeAt(0) - '0'.charCodeAt(0);
+ } else if (hexC >= 'a' && hexC <= 'f') {
+ port.readChar();
+ nb = nb * 16 + hexC.charCodeAt(0) - 'a'.charCodeAt(0);
+ } else if (hexC >= 'A' && hexC <= 'F') {
+ port.readChar();
+ nb = nb * 16 + hexC.charCodeAt(0) - 'A'.charCodeAt(0);
+ } else {
+ // next char isn't part of hex.
+ res += String.fromCharCode(nb);
+ break;
+ }
+ }
+ break;
+ default:
+ if (tmp === SC_EOF_OBJECT) {
+ return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res);
+ }
+ res += tmp;
+ }
+ break;
+ default:
+ if (c === SC_EOF_OBJECT) {
+ return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res);
+ }
+ res += c;
+ }
+ }
+ };
+ function readIdOrNumber(firstChar) {
+ var res = firstChar;
+ while (isIdOrNumberChar(port.peekChar()))
+ res += port.readChar();
+ if (isNaN(res))
+ return new sc_Token(9/*ID*/, res);
+ else
+ return new sc_Token(12/*NUMBER*/, res - 0);
+ };
+
+ function skipWhitespaceAndComments() {
+ var done = false;
+ while (!done) {
+ done = true;
+ while (isWhitespace(port.peekChar()))
+ port.readChar();
+ if (port.peekChar() === ';') {
+ port.readChar();
+ done = false;
+ while (true) {
+ curChar = port.readChar();
+ if (curChar === SC_EOF_OBJECT ||
+ curChar === '\n')
+ break;
+ }
+ }
+ }
+ };
+
+ function readDot() {
+ if (isWhitespace(port.peekChar()))
+ return new sc_Token(10/*DOT*/);
+ else
+ return readIdOrNumber(".");
+ };
+
+ function readSharp() {
+ var c = port.readChar();
+ if (isWhitespace(c))
+ return new sc_Token(13/*ERROR*/, "bad #-pattern0.");
+
+ // reference
+ if (isNumberChar(c)) {
+ var nb = c - 0;
+ while (isNumberChar(port.peekChar()))
+ nb = nb*10 + (port.readChar() - 0);
+ switch (port.readChar()) {
+ case '#':
+ return new sc_Token(18/*REFERENCE*/, nb);
+ case '=':
+ return new sc_Token(19/*STORE*/, nb);
+ default:
+ return new sc_Token(13/*ERROR*/, "bad #-pattern1." + nb);
+ }
+ }
+
+ if (c === "(")
+ return new sc_Token(14/*VECTOR_BEGIN*/);
+
+ if (c === "\\") { // character
+ var tmp = ""
+ while (!isWhitespaceOrEOF(port.peekChar()))
+ tmp += port.readChar();
+ switch (tmp.length) {
+ case 0: // it's escaping a whitespace char:
+ if (sc_isEOFObject(port.peekChar))
+ return new sc_Token(13/*ERROR*/, "bad #-pattern2.");
+ else
+ return new sc_Token(20/*CHAR*/, port.readChar());
+ case 1:
+ return new sc_Token(20/*CHAR*/, tmp);
+ default:
+ var entry = sc_Char.readable2char[tmp.toLowerCase()];
+ if (entry)
+ return new sc_Token(20/*CHAR*/, entry);
+ else
+ return new sc_Token(13/*ERROR*/, "unknown character description: #\\" + tmp);
+ }
+ }
+
+ // some constants (#t, #f, #unspecified)
+ var res;
+ var needing;
+ switch (c) {
+ case 't': res = new sc_Token(15/*TRUE*/, true); needing = ""; break;
+ case 'f': res = new sc_Token(16/*FALSE*/, false); needing = ""; break;
+ case 'u': res = new sc_Token(17/*UNSPECIFIED*/, undefined); needing = "nspecified"; break;
+ default:
+ return new sc_Token(13/*ERROR*/, "bad #-pattern3: " + c);
+ }
+ while(true) {
+ c = port.peekChar();
+ if ((isWhitespaceOrEOF(c) || c === ')') &&
+ needing == "")
+ return res;
+ else if (isWhitespace(c) || needing == "")
+ return new sc_Token(13/*ERROR*/, "bad #-pattern4 " + c + " " + needing);
+ else if (needing.charAt(0) == c) {
+ port.readChar(); // consume
+ needing = needing.slice(1);
+ } else
+ return new sc_Token(13/*ERROR*/, "bad #-pattern5");
+ }
+
+ };
+
+ skipWhitespaceAndComments();
+ var curChar = port.readChar();
+ if (curChar === SC_EOF_OBJECT)
+ return new sc_Token(0/*EOF*/, curChar);
+ switch (curChar)
+ {
+ case " ":
+ case "\n":
+ case "\t":
+ return readWhitespace();
+ case "(":
+ return new sc_Token(1/*OPEN_PAR*/);
+ case ")":
+ return new sc_Token(2/*CLOSE_PAR*/);
+ case "{":
+ return new sc_Token(3/*OPEN_BRACE*/);
+ case "}":
+ return new sc_Token(4/*CLOSE_BRACE*/);
+ case "[":
+ return new sc_Token(5/*OPEN_BRACKET*/);
+ case "]":
+ return new sc_Token(6/*CLOSE_BRACKET*/);
+ case "'":
+ return new sc_Token(8/*QUOTE*/);
+ case "#":
+ return readSharp();
+ case ".":
+ return readDot();
+ case '"':
+ return readString();
+ default:
+ if (isIdOrNumberChar(curChar))
+ return readIdOrNumber(curChar);
+ throw "unexpected character: " + curChar;
+ }
+};
+
+function sc_Reader(tokenizer) {
+ this.tokenizer = tokenizer;
+ this.backref = new Array();
+}
+sc_Reader.prototype.read = function() {
+ function readList(listBeginType) {
+ function matchesPeer(open, close) {
+ return open === 1/*OPEN_PAR*/ && close === 2/*CLOSE_PAR*/
+ || open === 3/*OPEN_BRACE*/ && close === 4/*CLOSE_BRACE*/
+ || open === 5/*OPEN_BRACKET*/ && close === 6/*CLOSE_BRACKET*/;
+ };
+ var res = null;
+
+ while (true) {
+ var token = tokenizer.peekToken();
+
+ switch (token.type) {
+ case 2/*CLOSE_PAR*/:
+ case 4/*CLOSE_BRACE*/:
+ case 6/*CLOSE_BRACKET*/:
+ if (matchesPeer(listBeginType, token.type)) {
+ tokenizer.readToken(); // consume token
+ return sc_reverseBang(res);
+ } else
+ throw "closing par doesn't match: " + listBeginType
+ + " " + listEndType;
+
+ case 0/*EOF*/:
+ throw "unexpected end of file";
+
+ case 10/*DOT*/:
+ tokenizer.readToken(); // consume token
+ var cdr = this.read();
+ var par = tokenizer.readToken();
+ if (!matchesPeer(listBeginType, par.type))
+ throw "closing par doesn't match: " + listBeginType
+ + " " + par.type;
+ else
+ return sc_reverseAppendBang(res, cdr);
+
+
+ default:
+ res = sc_cons(this.read(), res);
+ }
+ }
+ };
+ function readQuote() {
+ return sc_cons("quote", sc_cons(this.read(), null));
+ };
+ function readVector() {
+ // opening-parenthesis is already consumed
+ var a = new Array();
+ while (true) {
+ var token = tokenizer.peekToken();
+ switch (token.type) {
+ case 2/*CLOSE_PAR*/:
+ tokenizer.readToken();
+ return a;
+
+ default:
+ a.push(this.read());
+ }
+ }
+ };
+
+ function storeRefence(nb) {
+ var tmp = this.read();
+ this.backref[nb] = tmp;
+ return tmp;
+ };
+
+ function readReference(nb) {
+ if (nb in this.backref)
+ return this.backref[nb];
+ else
+ throw "bad reference: " + nb;
+ };
+
+ var tokenizer = this.tokenizer;
+
+ var token = tokenizer.readToken();
+
+ // handle error
+ if (token.type === 13/*ERROR*/)
+ throw token.val;
+
+ switch (token.type) {
+ case 1/*OPEN_PAR*/:
+ case 3/*OPEN_BRACE*/:
+ case 5/*OPEN_BRACKET*/:
+ return readList.call(this, token.type);
+ case 8/*QUOTE*/:
+ return readQuote.call(this);
+ case 11/*STRING*/:
+ return sc_jsstring2string(token.val);
+ case 20/*CHAR*/:
+ return new sc_Char(token.val);
+ case 14/*VECTOR_BEGIN*/:
+ return readVector.call(this);
+ case 18/*REFERENCE*/:
+ return readReference.call(this, token.val);
+ case 19/*STORE*/:
+ return storeRefence.call(this, token.val);
+ case 9/*ID*/:
+ return sc_jsstring2symbol(token.val);
+ case 0/*EOF*/:
+ case 12/*NUMBER*/:
+ case 15/*TRUE*/:
+ case 16/*FALSE*/:
+ case 17/*UNSPECIFIED*/:
+ return token.val;
+ default:
+ throw "unexpected token " + token.type + " " + token.val;
+ }
+};
+
+/*** META ((export #t)) */
+function sc_read(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ var reader = new sc_Reader(new sc_Tokenizer(port));
+ return reader.read();
+}
+/*** META ((export #t)) */
+function sc_readChar(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ var t = port.readChar();
+ return t === SC_EOF_OBJECT? t: new sc_Char(t);
+}
+/*** META ((export #t)) */
+function sc_peekChar(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ var t = port.peekChar();
+ return t === SC_EOF_OBJECT? t: new sc_Char(t);
+}
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isCharReady(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ return port.isCharReady();
+}
+/*** META ((export #t)
+ (peephole (postfix ".close()")))
+*/
+function sc_closeInputPort(p) {
+ return p.close();
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_InputPort")))
+*/
+function sc_isInputPort(o) {
+ return (o instanceof sc_InputPort);
+}
+
+/*** META ((export eof-object?)
+ (type bool)
+ (peephole (postfix " === SC_EOF_OBJECT")))
+*/
+function sc_isEOFObject(o) {
+ return o === SC_EOF_OBJECT;
+}
+
+/*** META ((export #t)
+ (peephole (hole 0 "SC_DEFAULT_IN")))
+*/
+function sc_currentInputPort() {
+ return SC_DEFAULT_IN;
+}
+
+/* ------------ file operations are not supported -----------*/
+/*** META ((export #t)) */
+function sc_callWithInputFile(s, proc) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_callWithOutputFile(s, proc) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_withInputFromFile(s, thunk) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToFile(s, thunk) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_openInputFile(s) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_openOutputFile(s) {
+ throw "can't open " + s;
+}
+
+/* ----------------------------------------------------------------------------*/
+/*** META ((export #t)) */
+function sc_basename(p) {
+ var i = p.lastIndexOf('/');
+
+ if(i >= 0)
+ return p.substring(i + 1, p.length);
+ else
+ return '';
+}
+
+/*** META ((export #t)) */
+function sc_dirname(p) {
+ var i = p.lastIndexOf('/');
+
+ if(i >= 0)
+ return p.substring(0, i);
+ else
+ return '';
+}
+
+/* ----------------------------------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_withInputFromPort(p, thunk) {
+ try {
+ var tmp = SC_DEFAULT_IN; // THREAD: shared var.
+ SC_DEFAULT_IN = p;
+ return thunk();
+ } finally {
+ SC_DEFAULT_IN = tmp;
+ }
+}
+
+/*** META ((export #t)) */
+function sc_withInputFromString(s, thunk) {
+ return sc_withInputFromPort(new sc_StringInputPort(sc_string2jsstring(s)), thunk);
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToPort(p, thunk) {
+ try {
+ var tmp = SC_DEFAULT_OUT; // THREAD: shared var.
+ SC_DEFAULT_OUT = p;
+ return thunk();
+ } finally {
+ SC_DEFAULT_OUT = tmp;
+ }
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToString(thunk) {
+ var p = new sc_StringOutputPort();
+ sc_withOutputToPort(p, thunk);
+ return p.close();
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToProcedure(proc, thunk) {
+ var t = function(s) { proc(sc_jsstring2string(s)); };
+ return sc_withOutputToPort(new sc_GenericOutputPort(t), thunk);
+}
+
+/*** META ((export #t)
+ (peephole (hole 0 "new sc_StringOutputPort()")))
+*/
+function sc_openOutputString() {
+ return new sc_StringOutputPort();
+}
+
+/*** META ((export #t)) */
+function sc_openInputString(str) {
+ return new sc_StringInputPort(sc_string2jsstring(str));
+}
+
+/* ----------------------------------------------------------------------------*/
+
+function sc_OutputPort() {
+}
+sc_OutputPort.prototype = new sc_Port();
+sc_OutputPort.prototype.appendJSString = function(obj) {
+ /* do nothing */
+}
+sc_OutputPort.prototype.close = function() {
+ /* do nothing */
+}
+
+function sc_StringOutputPort() {
+ this.res = "";
+}
+sc_StringOutputPort.prototype = new sc_OutputPort();
+sc_StringOutputPort.prototype.appendJSString = function(s) {
+ this.res += s;
+}
+sc_StringOutputPort.prototype.close = function() {
+ return sc_jsstring2string(this.res);
+}
+
+/*** META ((export #t)) */
+function sc_getOutputString(sp) {
+ return sc_jsstring2string(sp.res);
+}
+
+
+function sc_ErrorOutputPort() {
+}
+sc_ErrorOutputPort.prototype = new sc_OutputPort();
+sc_ErrorOutputPort.prototype.appendJSString = function(s) {
+ throw "don't write on ErrorPort!";
+}
+sc_ErrorOutputPort.prototype.close = function() {
+ /* do nothing */
+}
+
+function sc_GenericOutputPort(appendJSString, close) {
+ this.appendJSString = appendJSString;
+ if (close)
+ this.close = close;
+}
+sc_GenericOutputPort.prototype = new sc_OutputPort();
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_OutputPort")))
+*/
+function sc_isOutputPort(o) {
+ return (o instanceof sc_OutputPort);
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".close()")))
+*/
+function sc_closeOutputPort(p) {
+ return p.close();
+}
+
+/* ------------------ write ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_write(o, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(sc_toWriteString(o));
+}
+
+function sc_toWriteString(o) {
+ if (o === null)
+ return "()";
+ else if (o === true)
+ return "#t";
+ else if (o === false)
+ return "#f";
+ else if (o === undefined)
+ return "#unspecified";
+ else if (typeof o === 'function')
+ return "#<procedure " + sc_hash(o) + ">";
+ else if (o.sc_toWriteString)
+ return o.sc_toWriteString();
+ else
+ return o.toString();
+}
+
+function sc_escapeWriteString(s) {
+ var res = "";
+ var j = 0;
+ for (i = 0; i < s.length; i++) {
+ switch (s.charAt(i)) {
+ case "\0": res += s.substring(j, i) + "\\0"; j = i + 1; break;
+ case "\b": res += s.substring(j, i) + "\\b"; j = i + 1; break;
+ case "\f": res += s.substring(j, i) + "\\f"; j = i + 1; break;
+ case "\n": res += s.substring(j, i) + "\\n"; j = i + 1; break;
+ case "\r": res += s.substring(j, i) + "\\r"; j = i + 1; break;
+ case "\t": res += s.substring(j, i) + "\\t"; j = i + 1; break;
+ case "\v": res += s.substring(j, i) + "\\v"; j = i + 1; break;
+ case '"': res += s.substring(j, i) + '\\"'; j = i + 1; break;
+ case "\\": res += s.substring(j, i) + "\\\\"; j = i + 1; break;
+ default:
+ var c = s.charAt(i);
+ if ("\a" !== "a" && c == "\a") {
+ res += s.substring(j, i) + "\\a"; j = i + 1; continue;
+ }
+ if ("\v" !== "v" && c == "\v") {
+ res += s.substring(j, i) + "\\v"; j = i + 1; continue;
+ }
+ //if (s.charAt(i) < ' ' || s.charCodeAt(i) > 127) {
+ // CARE: Manuel is this OK with HOP?
+ if (s.charAt(i) < ' ') {
+ /* non printable character and special chars */
+ res += s.substring(j, i) + "\\x" + s.charCodeAt(i).toString(16);
+ j = i + 1;
+ }
+ // else just let i increase...
+ }
+ }
+ res += s.substring(j, i);
+ return res;
+}
+
+/* ------------------ display ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_display(o, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(sc_toDisplayString(o));
+}
+
+function sc_toDisplayString(o) {
+ if (o === null)
+ return "()";
+ else if (o === true)
+ return "#t";
+ else if (o === false)
+ return "#f";
+ else if (o === undefined)
+ return "#unspecified";
+ else if (typeof o === 'function')
+ return "#<procedure " + sc_hash(o) + ">";
+ else if (o.sc_toDisplayString)
+ return o.sc_toDisplayString();
+ else
+ return o.toString();
+}
+
+/* ------------------ newline ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_newline(p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString("\n");
+}
+
+/* ------------------ write-char ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_writeChar(c, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(c.val);
+}
+
+/* ------------------ write-circle ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_writeCircle(o, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(sc_toWriteCircleString(o));
+}
+
+function sc_toWriteCircleString(o) {
+ var symb = sc_gensym("writeCircle");
+ var nbPointer = new Object();
+ nbPointer.nb = 0;
+ sc_prepWriteCircle(o, symb, nbPointer);
+ return sc_genToWriteCircleString(o, symb);
+}
+
+function sc_prepWriteCircle(o, symb, nbPointer) {
+ // TODO sc_Struct
+ if (o instanceof sc_Pair ||
+ o instanceof sc_Vector) {
+ if (o[symb] !== undefined) {
+ // not the first visit.
+ o[symb]++;
+ // unless there is already a number, assign one.
+ if (!o[symb + "nb"]) o[symb + "nb"] = nbPointer.nb++;
+ return;
+ }
+ o[symb] = 0;
+ if (o instanceof sc_Pair) {
+ sc_prepWriteCircle(o.car, symb, nbPointer);
+ sc_prepWriteCircle(o.cdr, symb, nbPointer);
+ } else {
+ for (var i = 0; i < o.length; i++)
+ sc_prepWriteCircle(o[i], symb, nbPointer);
+ }
+ }
+}
+
+function sc_genToWriteCircleString(o, symb) {
+ if (!(o instanceof sc_Pair ||
+ o instanceof sc_Vector))
+ return sc_toWriteString(o);
+ return o.sc_toWriteCircleString(symb);
+}
+sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) {
+ if (this[symb + "use"]) { // use-flag is set. Just use it.
+ var nb = this[symb + "nb"];
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+ if (inList)
+ return '. #' + nb + '#';
+ else
+ return '#' + nb + '#';
+ }
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+
+ var res = "";
+
+ if (this[symb] !== undefined) { // implies > 0
+ this[symb + "use"] = true;
+ if (inList)
+ res += '. #' + this[symb + "nb"] + '=';
+ else
+ res += '#' + this[symb + "nb"] + '=';
+ inList = false;
+ }
+
+ if (!inList)
+ res += "(";
+
+ // print car
+ res += sc_genToWriteCircleString(this.car, symb);
+
+ if (sc_isPair(this.cdr)) {
+ res += " " + this.cdr.sc_toWriteCircleString(symb, true);
+ } else if (this.cdr !== null) {
+ res += " . " + sc_genToWriteCircleString(this.cdr, symb);
+ }
+ if (!inList)
+ res += ")";
+ return res;
+};
+sc_Vector.prototype.sc_toWriteCircleString = function(symb) {
+ if (this[symb + "use"]) { // use-flag is set. Just use it.
+ var nb = this[symb + "nb"];
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+ return '#' + nb + '#';
+ }
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+
+ var res = "";
+ if (this[symb] !== undefined) { // implies > 0
+ this[symb + "use"] = true;
+ res += '#' + this[symb + "nb"] + '=';
+ }
+ res += "#(";
+ for (var i = 0; i < this.length; i++) {
+ res += sc_genToWriteCircleString(this[i], symb);
+ if (i < this.length - 1) res += " ";
+ }
+ res += ")";
+ return res;
+};
+
+
+/* ------------------ print ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_print(s) {
+ if (arguments.length === 1) {
+ sc_display(s);
+ sc_newline();
+ }
+ else {
+ for (var i = 0; i < arguments.length; i++)
+ sc_display(arguments[i]);
+ sc_newline();
+ }
+}
+
+/* ------------------ format ---------------------------------------------------*/
+/*** META ((export #t)) */
+function sc_format(s, args) {
+ var len = s.length;
+ var p = new sc_StringOutputPort();
+ var i = 0, j = 1;
+
+ while( i < len ) {
+ var i2 = s.indexOf("~", i);
+
+ if (i2 == -1) {
+ p.appendJSString( s.substring( i, len ) );
+ return p.close();
+ } else {
+ if (i2 > i) {
+ if (i2 == (len - 1)) {
+ p.appendJSString(s.substring(i, len));
+ return p.close();
+ } else {
+ p.appendJSString(s.substring(i, i2));
+ i = i2;
+ }
+ }
+
+ switch(s.charCodeAt(i2 + 1)) {
+ case 65:
+ case 97:
+ // a
+ sc_display(arguments[j], p);
+ i += 2; j++;
+ break;
+
+ case 83:
+ case 115:
+ // s
+ sc_write(arguments[j], p);
+ i += 2; j++;
+ break;
+
+ case 86:
+ case 118:
+ // v
+ sc_display(arguments[j], p);
+ p.appendJSString("\n");
+ i += 2; j++;
+ break;
+
+ case 67:
+ case 99:
+ // c
+ p.appendJSString(String.fromCharCode(arguments[j]));
+ i += 2; j++;
+ break;
+
+ case 88:
+ case 120:
+ // x
+ p.appendJSString(arguments[j].toString(6));
+ i += 2; j++;
+ break;
+
+ case 79:
+ case 111:
+ // o
+ p.appendJSString(arguments[j].toString(8));
+ i += 2; j++;
+ break;
+
+ case 66:
+ case 98:
+ // b
+ p.appendJSString(arguments[j].toString(2));
+ i += 2; j++;
+ break;
+
+ case 37:
+ case 110:
+ // %, n
+ p.appendJSString("\n");
+ i += 2; break;
+
+ case 114:
+ // r
+ p.appendJSString("\r");
+ i += 2; break;
+
+ case 126:
+ // ~
+ p.appendJSString("~");
+ i += 2; break;
+
+ default:
+ sc_error( "format: illegal ~"
+ + String.fromCharCode(s.charCodeAt(i2 + 1))
+ + " sequence" );
+ return "";
+ }
+ }
+ }
+
+ return p.close();
+}
+
+/* ------------------ global ports ---------------------------------------------------*/
+
+var SC_DEFAULT_IN = new sc_ErrorInputPort();
+var SC_DEFAULT_OUT = new sc_ErrorOutputPort();
+var SC_ERROR_OUT = new sc_ErrorOutputPort();
+
+var sc_SYMBOL_PREFIX = "\u1E9C";
+var sc_KEYWORD_PREFIX = "\u1E9D";
+
+/*** META ((export #t)
+ (peephole (id))) */
+function sc_jsstring2string(s) {
+ return s;
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9C' +")))
+*/
+function sc_jsstring2symbol(s) {
+ return sc_SYMBOL_PREFIX + s;
+}
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_string2jsstring(s) {
+ return s;
+}
+
+/*** META ((export #t)
+ (peephole (symbol2jsstring_immutable)))
+*/
+function sc_symbol2jsstring(s) {
+ return s.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".slice(1)")))
+*/
+function sc_keyword2jsstring(k) {
+ return k.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9D' +")))
+*/
+function sc_jsstring2keyword(s) {
+ return sc_KEYWORD_PREFIX + s;
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isKeyword(s) {
+ return (typeof s === "string") &&
+ (s.charAt(0) === sc_KEYWORD_PREFIX);
+}
+
+
+/*** META ((export #t)) */
+var sc_gensym = function() {
+ var counter = 1000;
+ return function(sym) {
+ counter++;
+ if (!sym) sym = sc_SYMBOL_PREFIX;
+ return sym + "s" + counter + "~" + "^sC-GeNsYm ";
+ };
+}();
+
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isEqual(o1, o2) {
+ return ((o1 === o2) ||
+ (sc_isPair(o1) && sc_isPair(o2)
+ && sc_isPairEqual(o1, o2, sc_isEqual)) ||
+ (sc_isVector(o1) && sc_isVector(o2)
+ && sc_isVectorEqual(o1, o2, sc_isEqual)));
+}
+
+/*** META ((export number->symbol integer->symbol)) */
+function sc_number2symbol(x, radix) {
+ return sc_SYMBOL_PREFIX + sc_number2jsstring(x, radix);
+}
+
+/*** META ((export number->string integer->string)) */
+var sc_number2string = sc_number2jsstring;
+
+/*** META ((export #t)) */
+function sc_symbol2number(s, radix) {
+ return sc_jsstring2number(s.slice(1), radix);
+}
+
+/*** META ((export #t)) */
+var sc_string2number = sc_jsstring2number;
+
+/*** META ((export #t)
+ (peephole (prefix "+" s)))
+ ;; peephole will only apply if no radix is given.
+*/
+function sc_string2integer(s, radix) {
+ if (!radix) return +s;
+ return parseInt(s, radix);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "+")))
+*/
+function sc_string2real(s) {
+ return +s;
+}
+
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isSymbol(s) {
+ return (typeof s === "string") &&
+ (s.charAt(0) === sc_SYMBOL_PREFIX);
+}
+
+/*** META ((export #t)
+ (peephole (symbol2string_immutable)))
+*/
+function sc_symbol2string(s) {
+ return s.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9C' +")))
+*/
+function sc_string2symbol(s) {
+ return sc_SYMBOL_PREFIX + s;
+}
+
+/*** META ((export symbol-append)
+ (peephole (symbolAppend_immutable)))
+*/
+function sc_symbolAppend() {
+ var res = sc_SYMBOL_PREFIX;
+ for (var i = 0; i < arguments.length; i++)
+ res += arguments[i].slice(1);
+ return res;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".val")))
+*/
+function sc_char2string(c) { return c.val; }
+
+/*** META ((export #t)
+ (peephole (hole 1 "'\\u1E9C' + " c ".val")))
+*/
+function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; }
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isString(s) {
+ return (typeof s === "string") &&
+ (s.charAt(0) !== sc_SYMBOL_PREFIX);
+}
+
+/*** META ((export #t)) */
+var sc_makeString = sc_makejsString;
+
+
+/*** META ((export #t)) */
+function sc_string() {
+ for (var i = 0; i < arguments.length; i++)
+ arguments[i] = arguments[i].val;
+ return "".concat.apply("", arguments);
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".length")))
+*/
+function sc_stringLength(s) { return s.length; }
+
+/*** META ((export #t)) */
+function sc_stringRef(s, k) {
+ return new sc_Char(s.charAt(k));
+}
+
+/* there's no stringSet in the immutable version
+function sc_stringSet(s, k, c)
+*/
+
+
+/*** META ((export string=?)
+ (type bool)
+ (peephole (hole 2 str1 " === " str2)))
+*/
+function sc_isStringEqual(s1, s2) {
+ return s1 === s2;
+}
+/*** META ((export string<?)
+ (type bool)
+ (peephole (hole 2 str1 " < " str2)))
+*/
+function sc_isStringLess(s1, s2) {
+ return s1 < s2;
+}
+/*** META ((export string>?)
+ (type bool)
+ (peephole (hole 2 str1 " > " str2)))
+*/
+function sc_isStringGreater(s1, s2) {
+ return s1 > s2;
+}
+/*** META ((export string<=?)
+ (type bool)
+ (peephole (hole 2 str1 " <= " str2)))
+*/
+function sc_isStringLessEqual(s1, s2) {
+ return s1 <= s2;
+}
+/*** META ((export string>=?)
+ (type bool)
+ (peephole (hole 2 str1 " >= " str2)))
+*/
+function sc_isStringGreaterEqual(s1, s2) {
+ return s1 >= s2;
+}
+/*** META ((export string-ci=?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() === " str2 ".toLowerCase()")))
+*/
+function sc_isStringCIEqual(s1, s2) {
+ return s1.toLowerCase() === s2.toLowerCase();
+}
+/*** META ((export string-ci<?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() < " str2 ".toLowerCase()")))
+*/
+function sc_isStringCILess(s1, s2) {
+ return s1.toLowerCase() < s2.toLowerCase();
+}
+/*** META ((export string-ci>?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() > " str2 ".toLowerCase()")))
+*/
+function sc_isStringCIGreater(s1, s2) {
+ return s1.toLowerCase() > s2.toLowerCase();
+}
+/*** META ((export string-ci<=?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() <= " str2 ".toLowerCase()")))
+*/
+function sc_isStringCILessEqual(s1, s2) {
+ return s1.toLowerCase() <= s2.toLowerCase();
+}
+/*** META ((export string-ci>=?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() >= " str2 ".toLowerCase()")))
+*/
+function sc_isStringCIGreaterEqual(s1, s2) {
+ return s1.toLowerCase() >= s2.toLowerCase();
+}
+
+/*** META ((export #t)
+ (peephole (hole 3 s ".substring(" start ", " end ")")))
+*/
+function sc_substring(s, start, end) {
+ return s.substring(start, end);
+}
+
+/*** META ((export #t))
+*/
+function sc_isSubstring_at(s1, s2, i) {
+ return s2 == s1.substring(i, i+ s2.length);
+}
+
+/*** META ((export #t)
+ (peephole (infix 0 #f "+" "''")))
+*/
+function sc_stringAppend() {
+ return "".concat.apply("", arguments);
+}
+
+/*** META ((export #t)) */
+var sc_string2list = sc_jsstring2list;
+
+/*** META ((export #t)) */
+var sc_list2string = sc_list2jsstring;
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_stringCopy(s) {
+ return s;
+}
+
+/* there's no string-fill in the immutable version
+function sc_stringFill(s, c)
+*/
+
+/*** META ((export #t)
+ (peephole (postfix ".slice(1)")))
+*/
+function sc_keyword2string(o) {
+ return o.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9D' +")))
+*/
+function sc_string2keyword(o) {
+ return sc_KEYWORD_PREFIX + o;
+}
+
+String.prototype.sc_toDisplayString = function() {
+ if (this.charAt(0) === sc_SYMBOL_PREFIX)
+ // TODO: care for symbols with spaces (escape-chars symbols).
+ return this.slice(1);
+ else if (this.charAt(0) === sc_KEYWORD_PREFIX)
+ return ":" + this.slice(1);
+ else
+ return this.toString();
+};
+
+String.prototype.sc_toWriteString = function() {
+ if (this.charAt(0) === sc_SYMBOL_PREFIX)
+ // TODO: care for symbols with spaces (escape-chars symbols).
+ return this.slice(1);
+ else if (this.charAt(0) === sc_KEYWORD_PREFIX)
+ return ":" + this.slice(1);
+ else
+ return '"' + sc_escapeWriteString(this) + '"';
+};
+/* Exported Variables */
+var BgL_testzd2boyerzd2;
+var BgL_nboyerzd2benchmarkzd2;
+var BgL_setupzd2boyerzd2;
+/* End Exports */
+
+var translate_term_nboyer;
+var translate_args_nboyer;
+var untranslate_term_nboyer;
+var BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer;
+var BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer;
+var translate_alist_nboyer;
+var apply_subst_nboyer;
+var apply_subst_lst_nboyer;
+var tautologyp_nboyer;
+var if_constructor_nboyer;
+var rewrite_count_nboyer;
+var rewrite_nboyer;
+var rewrite_args_nboyer;
+var unify_subst_nboyer;
+var one_way_unify1_nboyer;
+var false_term_nboyer;
+var true_term_nboyer;
+var trans_of_implies1_nboyer;
+var is_term_equal_nboyer;
+var is_term_member_nboyer;
+var const_nboyer;
+var sc_const_3_nboyer;
+var sc_const_4_nboyer;
+{
+ (sc_const_4_nboyer = (new sc_Pair("\u1E9Cimplies",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cu",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cw",null)))))),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cw",null)))))),null)))))));
+ (sc_const_3_nboyer = sc_list((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccompile",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Ccodegen",(new sc_Pair((new sc_Pair("\u1E9Coptimize",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreaterp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clesseqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cboolean",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ciff",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceven1",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Codd",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccountps-",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccountps-loop",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfact-",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfact-loop",(new sc_Pair("\u1E9Ci",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdivides",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-true",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-false",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctautology-checker",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctautologyp",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfalsify",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfalsify1",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime1",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair("\u1E9Cp",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))))),(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cc",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cplus-fringe",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair("\u1E9Cenvrn",null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmc-flatten",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cintersect",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Ck",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ck",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Csort-lp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus1",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Ci",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cbase",null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cj",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cj",(new sc_Pair((1),null)))))),null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Ci",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cw",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cz",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnlistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csamefringe",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cz",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cw",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair(sc_list("\u1E9Cand", (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Ca",null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cb",null)))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cl",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cl",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdsort",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx1",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx2",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx3",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx4",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx5",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx6",(new sc_Pair("\u1E9Cx7",null)))))),null)))))),null)))))),null)))))),null)))))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((6),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx7",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cy",(new sc_Pair((2),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csigma",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Ci",null)))),null)))))),(new sc_Pair((2),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cz",null)))),null)))))),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Ca",null)))),null)))),(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Cb",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair("\u1E9Cz",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cassignedp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair((new sc_Pair("\u1E9Cset",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cval",(new sc_Pair("\u1E9Cmem",null)))))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair("\u1E9Cval",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cmem",null)))))),null)))))))),null))))))));
+ (const_nboyer = (new sc_Pair((new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))))),null)))))))))));
+ BgL_nboyerzd2benchmarkzd2 = function() {
+ var args = null;
+ for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) {
+ args = sc_cons(arguments[sc_tmp], args);
+ }
+ var n;
+ return ((n = ((args === null)?(0):(args.car))), (BgL_setupzd2boyerzd2()), (BgL_runzd2benchmarkzd2(("nboyer"+(sc_number2string(n))), (1), function() {
+ return (BgL_testzd2boyerzd2(n));
+ }, function(rewrites) {
+ if ((sc_isNumber(rewrites)))
+ switch (n) {
+ case (0):
+ return (rewrites===(95024));
+ break;
+ case (1):
+ return (rewrites===(591777));
+ break;
+ case (2):
+ return (rewrites===(1813975));
+ break;
+ case (3):
+ return (rewrites===(5375678));
+ break;
+ case (4):
+ return (rewrites===(16445406));
+ break;
+ case (5):
+ return (rewrites===(51507739));
+ break;
+ default:
+ return true;
+ break;
+ }
+ else
+ return false;
+ })));
+ };
+ BgL_setupzd2boyerzd2 = function() {
+ return true;
+ };
+ BgL_testzd2boyerzd2 = function() {
+ return true;
+ };
+ translate_term_nboyer = function(term) {
+ var lst;
+ return (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((translate_term_nboyer((lst.car))), (translate_args_nboyer((lst.cdr))))))))));
+ };
+ translate_args_nboyer = function(lst) {
+ var sc_lst_5;
+ var term;
+ return ((lst === null)?null:(new sc_Pair(((term = (lst.car)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))), ((sc_lst_5 = (lst.cdr)), ((sc_lst_5 === null)?null:(new sc_Pair((translate_term_nboyer((sc_lst_5.car))), (translate_args_nboyer((sc_lst_5.cdr))))))))));
+ };
+ untranslate_term_nboyer = function(term) {
+ var optrOpnd;
+ var tail1131;
+ var L1127;
+ var falseHead1130;
+ var symbol_record;
+ if (!(term instanceof sc_Pair))
+ return term;
+ else
+ {
+ (falseHead1130 = (new sc_Pair(null, null)));
+ (L1127 = (term.cdr));
+ (tail1131 = falseHead1130);
+ while (!(L1127 === null)) {
+ {
+ (tail1131.cdr = (new sc_Pair((untranslate_term_nboyer((L1127.car))), null)));
+ (tail1131 = (tail1131.cdr));
+ (L1127 = (L1127.cdr));
+ }
+ }
+ (optrOpnd = (falseHead1130.cdr));
+ return (new sc_Pair(((symbol_record = (term.car)), (symbol_record[(0)])), optrOpnd));
+ }
+ };
+ BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer = function(sym) {
+ var r;
+ var x;
+ return ((x = (sc_assq(sym, BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), ((x!== false)?(x.cdr):((r = [sym, null]), (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = (new sc_Pair((new sc_Pair(sym, r)), BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), r)));
+ };
+ (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
+ translate_alist_nboyer = function(alist) {
+ var sc_alist_6;
+ var term;
+ return ((alist === null)?null:(new sc_Pair((new sc_Pair((alist.car.car), ((term = (alist.car.cdr)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))))), ((sc_alist_6 = (alist.cdr)), ((sc_alist_6 === null)?null:(new sc_Pair((new sc_Pair((sc_alist_6.car.car), (translate_term_nboyer((sc_alist_6.car.cdr))))), (translate_alist_nboyer((sc_alist_6.cdr))))))))));
+ };
+ apply_subst_nboyer = function(alist, term) {
+ var lst;
+ var temp_temp;
+ return (!(term instanceof sc_Pair)?((temp_temp = (sc_assq(term, alist))), ((temp_temp!== false)?(temp_temp.cdr):term)):(new sc_Pair((term.car), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), (apply_subst_lst_nboyer(alist, (lst.cdr))))))))));
+ };
+ apply_subst_lst_nboyer = function(alist, lst) {
+ var sc_lst_7;
+ return ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), ((sc_lst_7 = (lst.cdr)), ((sc_lst_7 === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (sc_lst_7.car))), (apply_subst_lst_nboyer(alist, (sc_lst_7.cdr))))))))));
+ };
+ tautologyp_nboyer = function(sc_x_11, true_lst, false_lst) {
+ var tmp1125;
+ var x;
+ var tmp1126;
+ var sc_x_8;
+ var sc_tmp1125_9;
+ var sc_tmp1126_10;
+ var sc_x_11;
+ var true_lst;
+ var false_lst;
+ while (true) {
+ if ((((sc_tmp1126_10 = (is_term_equal_nboyer(sc_x_11, true_term_nboyer))), ((sc_tmp1126_10!== false)?sc_tmp1126_10:(is_term_member_nboyer(sc_x_11, true_lst))))!== false))
+ return true;
+ else
+ if ((((sc_tmp1125_9 = (is_term_equal_nboyer(sc_x_11, false_term_nboyer))), ((sc_tmp1125_9!== false)?sc_tmp1125_9:(is_term_member_nboyer(sc_x_11, false_lst))))!== false))
+ return false;
+ else
+ if (!(sc_x_11 instanceof sc_Pair))
+ return false;
+ else
+ if (((sc_x_11.car)===if_constructor_nboyer))
+ if ((((sc_x_8 = (sc_x_11.cdr.car)), (tmp1126 = (is_term_equal_nboyer(sc_x_8, true_term_nboyer))), ((tmp1126!== false)?tmp1126:(is_term_member_nboyer(sc_x_8, true_lst))))!== false))
+ (sc_x_11 = (sc_x_11.cdr.cdr.car));
+ else
+ if ((((x = (sc_x_11.cdr.car)), (tmp1125 = (is_term_equal_nboyer(x, false_term_nboyer))), ((tmp1125!== false)?tmp1125:(is_term_member_nboyer(x, false_lst))))!== false))
+ (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
+ else
+ if (((tautologyp_nboyer((sc_x_11.cdr.cdr.car), (new sc_Pair((sc_x_11.cdr.car), true_lst)), false_lst))!== false))
+ {
+ (false_lst = (new sc_Pair((sc_x_11.cdr.car), false_lst)));
+ (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
+ }
+ else
+ return false;
+ else
+ return false;
+ }
+ };
+ (if_constructor_nboyer = "\u1E9C*");
+ (rewrite_count_nboyer = (0));
+ rewrite_nboyer = function(term) {
+ var term2;
+ var sc_term_12;
+ var lst;
+ var symbol_record;
+ var sc_lst_13;
+ {
+ (++rewrite_count_nboyer);
+ if (!(term instanceof sc_Pair))
+ return term;
+ else
+ {
+ (sc_term_12 = (new sc_Pair((term.car), ((sc_lst_13 = (term.cdr)), ((sc_lst_13 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_13.car))), (rewrite_args_nboyer((sc_lst_13.cdr))))))))));
+ (lst = ((symbol_record = (term.car)), (symbol_record[(1)])));
+ while (true) {
+ if ((lst === null))
+ return sc_term_12;
+ else
+ if ((((term2 = ((lst.car).cdr.car)), (unify_subst_nboyer = null), (one_way_unify1_nboyer(sc_term_12, term2)))!== false))
+ return (rewrite_nboyer((apply_subst_nboyer(unify_subst_nboyer, ((lst.car).cdr.cdr.car)))));
+ else
+ (lst = (lst.cdr));
+ }
+ }
+ }
+ };
+ rewrite_args_nboyer = function(lst) {
+ var sc_lst_14;
+ return ((lst === null)?null:(new sc_Pair((rewrite_nboyer((lst.car))), ((sc_lst_14 = (lst.cdr)), ((sc_lst_14 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_14.car))), (rewrite_args_nboyer((sc_lst_14.cdr))))))))));
+ };
+ (unify_subst_nboyer = "\u1E9C*");
+ one_way_unify1_nboyer = function(term1, term2) {
+ var lst1;
+ var lst2;
+ var temp_temp;
+ if (!(term2 instanceof sc_Pair))
+ {
+ (temp_temp = (sc_assq(term2, unify_subst_nboyer)));
+ if ((temp_temp!== false))
+ return (is_term_equal_nboyer(term1, (temp_temp.cdr)));
+ else
+ if ((sc_isNumber(term2)))
+ return (sc_isEqual(term1, term2));
+ else
+ {
+ (unify_subst_nboyer = (new sc_Pair((new sc_Pair(term2, term1)), unify_subst_nboyer)));
+ return true;
+ }
+ }
+ else
+ if (!(term1 instanceof sc_Pair))
+ return false;
+ else
+ if (((term1.car)===(term2.car)))
+ {
+ (lst1 = (term1.cdr));
+ (lst2 = (term2.cdr));
+ while (true) {
+ if ((lst1 === null))
+ return (lst2 === null);
+ else
+ if ((lst2 === null))
+ return false;
+ else
+ if (((one_way_unify1_nboyer((lst1.car), (lst2.car)))!== false))
+ {
+ (lst1 = (lst1.cdr));
+ (lst2 = (lst2.cdr));
+ }
+ else
+ return false;
+ }
+ }
+ else
+ return false;
+ };
+ (false_term_nboyer = "\u1E9C*");
+ (true_term_nboyer = "\u1E9C*");
+ trans_of_implies1_nboyer = function(n) {
+ var sc_n_15;
+ return ((sc_isEqual(n, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (n-(1)), n)), ((sc_n_15 = (n-(1))), ((sc_isEqual(sc_n_15, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (sc_n_15-(1)), sc_n_15)), (trans_of_implies1_nboyer((sc_n_15-(1)))))))))));
+ };
+ is_term_equal_nboyer = function(x, y) {
+ var lst1;
+ var lst2;
+ var r2;
+ var r1;
+ if ((x instanceof sc_Pair))
+ if ((y instanceof sc_Pair))
+ if ((((r1 = (x.car)), (r2 = (y.car)), (r1===r2))!== false))
+ {
+ (lst1 = (x.cdr));
+ (lst2 = (y.cdr));
+ while (true) {
+ if ((lst1 === null))
+ return (lst2 === null);
+ else
+ if ((lst2 === null))
+ return false;
+ else
+ if (((is_term_equal_nboyer((lst1.car), (lst2.car)))!== false))
+ {
+ (lst1 = (lst1.cdr));
+ (lst2 = (lst2.cdr));
+ }
+ else
+ return false;
+ }
+ }
+ else
+ return false;
+ else
+ return false;
+ else
+ return (sc_isEqual(x, y));
+ };
+ is_term_member_nboyer = function(x, lst) {
+ var x;
+ var lst;
+ while (true) {
+ if ((lst === null))
+ return false;
+ else
+ if (((is_term_equal_nboyer(x, (lst.car)))!== false))
+ return true;
+ else
+ (lst = (lst.cdr));
+ }
+ };
+ BgL_setupzd2boyerzd2 = function() {
+ var symbol_record;
+ var value;
+ var BgL_sc_symbolzd2record_16zd2;
+ var sym;
+ var sc_sym_17;
+ var term;
+ var lst;
+ var sc_term_18;
+ var sc_term_19;
+ {
+ (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
+ (if_constructor_nboyer = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer("\u1E9Cif")));
+ (false_term_nboyer = ((sc_term_19 = (new sc_Pair("\u1E9Cf",null))), (!(sc_term_19 instanceof sc_Pair)?sc_term_19:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_19.car))), (translate_args_nboyer((sc_term_19.cdr))))))));
+ (true_term_nboyer = ((sc_term_18 = (new sc_Pair("\u1E9Ct",null))), (!(sc_term_18 instanceof sc_Pair)?sc_term_18:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_18.car))), (translate_args_nboyer((sc_term_18.cdr))))))));
+ (lst = sc_const_3_nboyer);
+ while (!(lst === null)) {
+ {
+ (term = (lst.car));
+ if (((term instanceof sc_Pair)&&(((term.car)==="\u1E9Cequal")&&((term.cdr.car) instanceof sc_Pair))))
+ {
+ (sc_sym_17 = ((term.cdr.car).car));
+ (value = (new sc_Pair((!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr)))))), ((sym = ((term.cdr.car).car)), (BgL_sc_symbolzd2record_16zd2 = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sym))), (BgL_sc_symbolzd2record_16zd2[(1)])))));
+ (symbol_record = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sc_sym_17)));
+ (symbol_record[(1)] = value);
+ }
+ else
+ (sc_error("ADD-LEMMA did not like term: ", term));
+ (lst = (lst.cdr));
+ }
+ }
+ return true;
+ }
+ };
+ BgL_testzd2boyerzd2 = function(n) {
+ var optrOpnd;
+ var term;
+ var sc_n_20;
+ var answer;
+ var sc_term_21;
+ var sc_term_22;
+ {
+ (rewrite_count_nboyer = (0));
+ (term = sc_const_4_nboyer);
+ (sc_n_20 = n);
+ while (!(sc_n_20=== 0)) {
+ {
+ (term = (sc_list("\u1E9Cor", term, (new sc_Pair("\u1E9Cf",null)))));
+ (--sc_n_20);
+ }
+ }
+ (sc_term_22 = term);
+ if (!(sc_term_22 instanceof sc_Pair))
+ (optrOpnd = sc_term_22);
+ else
+ (optrOpnd = (new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_22.car))), (translate_args_nboyer((sc_term_22.cdr))))));
+ (sc_term_21 = (apply_subst_nboyer(((const_nboyer === null)?null:(new sc_Pair((new sc_Pair((const_nboyer.car.car), (translate_term_nboyer((const_nboyer.car.cdr))))), (translate_alist_nboyer((const_nboyer.cdr)))))), optrOpnd)));
+ (answer = (tautologyp_nboyer((rewrite_nboyer(sc_term_21)), null, null)));
+ (sc_write(rewrite_count_nboyer));
+ (sc_display(" rewrites"));
+ (sc_newline());
+ if ((answer!== false))
+ return rewrite_count_nboyer;
+ else
+ return false;
+ }
+ };
+}
+/* Exported Variables */
+var BgL_parsezd2ze3nbzd2treesze3;
+var BgL_earleyzd2benchmarkzd2;
+var BgL_parsezd2ze3parsedzf3zc2;
+var test;
+var BgL_parsezd2ze3treesz31;
+var BgL_makezd2parserzd2;
+/* End Exports */
+
+var const_earley;
+{
+ (const_earley = (new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair((new sc_Pair("\u1E9Ca",null)),(new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair("\u1E9Cs",null)))),null)))))),null)));
+ BgL_makezd2parserzd2 = function(grammar, lexer) {
+ var i;
+ var parser_descr;
+ var def_loop;
+ var nb_nts;
+ var names;
+ var steps;
+ var predictors;
+ var enders;
+ var starters;
+ var nts;
+ var sc_names_1;
+ var sc_steps_2;
+ var sc_predictors_3;
+ var sc_enders_4;
+ var sc_starters_5;
+ var nb_confs;
+ var BgL_sc_defzd2loop_6zd2;
+ var BgL_sc_nbzd2nts_7zd2;
+ var sc_nts_8;
+ var BgL_sc_defzd2loop_9zd2;
+ var ind;
+ {
+ ind = function(nt, sc_nts_10) {
+ var i;
+ {
+ (i = ((sc_nts_10.length)-(1)));
+ while (true) {
+ if ((i>=(0)))
+ if ((sc_isEqual((sc_nts_10[i]), nt)))
+ return i;
+ else
+ (--i);
+ else
+ return false;
+ }
+ }
+ };
+ (sc_nts_8 = ((BgL_sc_defzd2loop_9zd2 = function(defs, sc_nts_11) {
+ var rule_loop;
+ var head;
+ var def;
+ return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, sc_nts_12) {
+ var nt;
+ var l;
+ var sc_nts_13;
+ var rule;
+ if ((rules instanceof sc_Pair))
+ {
+ (rule = (rules.car));
+ (l = rule);
+ (sc_nts_13 = sc_nts_12);
+ while ((l instanceof sc_Pair)) {
+ {
+ (nt = (l.car));
+ (l = (l.cdr));
+ (sc_nts_13 = (((sc_member(nt, sc_nts_13))!== false)?sc_nts_13:(new sc_Pair(nt, sc_nts_13))));
+ }
+ }
+ return (rule_loop((rules.cdr), sc_nts_13));
+ }
+ else
+ return (BgL_sc_defzd2loop_9zd2((defs.cdr), sc_nts_12));
+ }), (rule_loop((def.cdr), (((sc_member(head, sc_nts_11))!== false)?sc_nts_11:(new sc_Pair(head, sc_nts_11)))))):(sc_list2vector((sc_reverse(sc_nts_11)))));
+ }), (BgL_sc_defzd2loop_9zd2(grammar, null))));
+ (BgL_sc_nbzd2nts_7zd2 = (sc_nts_8.length));
+ (nb_confs = (((BgL_sc_defzd2loop_6zd2 = function(defs, BgL_sc_nbzd2confs_14zd2) {
+ var rule_loop;
+ var def;
+ return ((defs instanceof sc_Pair)?((def = (defs.car)), (rule_loop = function(rules, BgL_sc_nbzd2confs_15zd2) {
+ var l;
+ var BgL_sc_nbzd2confs_16zd2;
+ var rule;
+ if ((rules instanceof sc_Pair))
+ {
+ (rule = (rules.car));
+ (l = rule);
+ (BgL_sc_nbzd2confs_16zd2 = BgL_sc_nbzd2confs_15zd2);
+ while ((l instanceof sc_Pair)) {
+ {
+ (l = (l.cdr));
+ (++BgL_sc_nbzd2confs_16zd2);
+ }
+ }
+ return (rule_loop((rules.cdr), (BgL_sc_nbzd2confs_16zd2+(1))));
+ }
+ else
+ return (BgL_sc_defzd2loop_6zd2((defs.cdr), BgL_sc_nbzd2confs_15zd2));
+ }), (rule_loop((def.cdr), BgL_sc_nbzd2confs_14zd2))):BgL_sc_nbzd2confs_14zd2);
+ }), (BgL_sc_defzd2loop_6zd2(grammar, (0))))+BgL_sc_nbzd2nts_7zd2));
+ (sc_starters_5 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+ (sc_enders_4 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+ (sc_predictors_3 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+ (sc_steps_2 = (sc_makeVector(nb_confs, false)));
+ (sc_names_1 = (sc_makeVector(nb_confs, false)));
+ (nts = sc_nts_8);
+ (starters = sc_starters_5);
+ (enders = sc_enders_4);
+ (predictors = sc_predictors_3);
+ (steps = sc_steps_2);
+ (names = sc_names_1);
+ (nb_nts = (sc_nts_8.length));
+ (i = (nb_nts-(1)));
+ while ((i>=(0))) {
+ {
+ (sc_steps_2[i] = (i-nb_nts));
+ (sc_names_1[i] = (sc_list((sc_nts_8[i]), (0))));
+ (sc_enders_4[i] = (sc_list(i)));
+ (--i);
+ }
+ }
+ def_loop = function(defs, conf) {
+ var rule_loop;
+ var head;
+ var def;
+ return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, conf, rule_num) {
+ var i;
+ var sc_i_17;
+ var nt;
+ var l;
+ var sc_conf_18;
+ var sc_i_19;
+ var rule;
+ if ((rules instanceof sc_Pair))
+ {
+ (rule = (rules.car));
+ (names[conf] = (sc_list(head, rule_num)));
+ (sc_i_19 = (ind(head, nts)));
+ (starters[sc_i_19] = (new sc_Pair(conf, (starters[sc_i_19]))));
+ (l = rule);
+ (sc_conf_18 = conf);
+ while ((l instanceof sc_Pair)) {
+ {
+ (nt = (l.car));
+ (steps[sc_conf_18] = (ind(nt, nts)));
+ (sc_i_17 = (ind(nt, nts)));
+ (predictors[sc_i_17] = (new sc_Pair(sc_conf_18, (predictors[sc_i_17]))));
+ (l = (l.cdr));
+ (++sc_conf_18);
+ }
+ }
+ (steps[sc_conf_18] = ((ind(head, nts))-nb_nts));
+ (i = (ind(head, nts)));
+ (enders[i] = (new sc_Pair(sc_conf_18, (enders[i]))));
+ return (rule_loop((rules.cdr), (sc_conf_18+(1)), (rule_num+(1))));
+ }
+ else
+ return (def_loop((defs.cdr), conf));
+ }), (rule_loop((def.cdr), conf, (1)))):undefined);
+ };
+ (def_loop(grammar, (sc_nts_8.length)));
+ (parser_descr = [lexer, sc_nts_8, sc_starters_5, sc_enders_4, sc_predictors_3, sc_steps_2, sc_names_1]);
+ return function(input) {
+ var optrOpnd;
+ var sc_optrOpnd_20;
+ var sc_optrOpnd_21;
+ var sc_optrOpnd_22;
+ var loop1;
+ var BgL_sc_stateza2_23za2;
+ var toks;
+ var BgL_sc_nbzd2nts_24zd2;
+ var sc_steps_25;
+ var sc_enders_26;
+ var state_num;
+ var BgL_sc_statesza2_27za2;
+ var states;
+ var i;
+ var conf;
+ var l;
+ var tok_nts;
+ var sc_i_28;
+ var sc_i_29;
+ var l1;
+ var l2;
+ var tok;
+ var tail1129;
+ var L1125;
+ var goal_enders;
+ var BgL_sc_statesza2_30za2;
+ var BgL_sc_nbzd2nts_31zd2;
+ var BgL_sc_nbzd2confs_32zd2;
+ var nb_toks;
+ var goal_starters;
+ var sc_states_33;
+ var BgL_sc_nbzd2confs_34zd2;
+ var BgL_sc_nbzd2toks_35zd2;
+ var sc_toks_36;
+ var falseHead1128;
+ var sc_names_37;
+ var sc_steps_38;
+ var sc_predictors_39;
+ var sc_enders_40;
+ var sc_starters_41;
+ var sc_nts_42;
+ var lexer;
+ var sc_ind_43;
+ var make_states;
+ var BgL_sc_confzd2setzd2getza2_44za2;
+ var conf_set_merge_new_bang;
+ var conf_set_adjoin;
+ var BgL_sc_confzd2setzd2adjoinza2_45za2;
+ var BgL_sc_confzd2setzd2adjoinza2za2_46z00;
+ var conf_set_union;
+ var forw;
+ var is_parsed;
+ var deriv_trees;
+ var BgL_sc_derivzd2treesza2_47z70;
+ var nb_deriv_trees;
+ var BgL_sc_nbzd2derivzd2treesza2_48za2;
+ {
+ sc_ind_43 = function(nt, sc_nts_49) {
+ var i;
+ {
+ (i = ((sc_nts_49.length)-(1)));
+ while (true) {
+ if ((i>=(0)))
+ if ((sc_isEqual((sc_nts_49[i]), nt)))
+ return i;
+ else
+ (--i);
+ else
+ return false;
+ }
+ }
+ };
+ make_states = function(BgL_sc_nbzd2toks_50zd2, BgL_sc_nbzd2confs_51zd2) {
+ var v;
+ var i;
+ var sc_states_52;
+ {
+ (sc_states_52 = (sc_makeVector((BgL_sc_nbzd2toks_50zd2+(1)), false)));
+ (i = BgL_sc_nbzd2toks_50zd2);
+ while ((i>=(0))) {
+ {
+ (v = (sc_makeVector((BgL_sc_nbzd2confs_51zd2+(1)), false)));
+ (v[(0)] = (-1));
+ (sc_states_52[i] = v);
+ (--i);
+ }
+ }
+ return sc_states_52;
+ }
+ };
+ BgL_sc_confzd2setzd2getza2_44za2 = function(state, BgL_sc_statezd2num_53zd2, sc_conf_54) {
+ var conf_set;
+ var BgL_sc_confzd2set_55zd2;
+ return ((BgL_sc_confzd2set_55zd2 = (state[(sc_conf_54+(1))])), ((BgL_sc_confzd2set_55zd2!== false)?BgL_sc_confzd2set_55zd2:((conf_set = (sc_makeVector((BgL_sc_statezd2num_53zd2+(6)), false))), (conf_set[(1)] = (-3)), (conf_set[(2)] = (-1)), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)), (state[(sc_conf_54+(1))] = conf_set), conf_set)));
+ };
+ conf_set_merge_new_bang = function(conf_set) {
+ return ((conf_set[((conf_set[(1)])+(5))] = (conf_set[(4)])), (conf_set[(1)] = (conf_set[(3)])), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)));
+ };
+ conf_set_adjoin = function(state, conf_set, sc_conf_56, i) {
+ var tail;
+ return ((tail = (conf_set[(3)])), (conf_set[(i+(5))] = (-1)), (conf_set[(tail+(5))] = i), (conf_set[(3)] = i), ((tail<(0))?((conf_set[(0)] = (state[(0)])), (state[(0)] = sc_conf_56)):undefined));
+ };
+ BgL_sc_confzd2setzd2adjoinza2_45za2 = function(sc_states_57, BgL_sc_statezd2num_58zd2, l, i) {
+ var conf_set;
+ var sc_conf_59;
+ var l1;
+ var state;
+ {
+ (state = (sc_states_57[BgL_sc_statezd2num_58zd2]));
+ (l1 = l);
+ while ((l1 instanceof sc_Pair)) {
+ {
+ (sc_conf_59 = (l1.car));
+ (conf_set = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_58zd2, sc_conf_59)));
+ if (((conf_set[(i+(5))])=== false))
+ {
+ (conf_set_adjoin(state, conf_set, sc_conf_59, i));
+ (l1 = (l1.cdr));
+ }
+ else
+ (l1 = (l1.cdr));
+ }
+ }
+ return undefined;
+ }
+ };
+ BgL_sc_confzd2setzd2adjoinza2za2_46z00 = function(sc_states_60, BgL_sc_statesza2_61za2, BgL_sc_statezd2num_62zd2, sc_conf_63, i) {
+ var BgL_sc_confzd2setza2_64z70;
+ var BgL_sc_stateza2_65za2;
+ var conf_set;
+ var state;
+ return ((state = (sc_states_60[BgL_sc_statezd2num_62zd2])), ((((conf_set = (state[(sc_conf_63+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)?((BgL_sc_stateza2_65za2 = (BgL_sc_statesza2_61za2[BgL_sc_statezd2num_62zd2])), (BgL_sc_confzd2setza2_64z70 = (BgL_sc_confzd2setzd2getza2_44za2(BgL_sc_stateza2_65za2, BgL_sc_statezd2num_62zd2, sc_conf_63))), (((BgL_sc_confzd2setza2_64z70[(i+(5))])=== false)?(conf_set_adjoin(BgL_sc_stateza2_65za2, BgL_sc_confzd2setza2_64z70, sc_conf_63, i)):undefined), true):false));
+ };
+ conf_set_union = function(state, conf_set, sc_conf_66, other_set) {
+ var i;
+ {
+ (i = (other_set[(2)]));
+ while ((i>=(0))) {
+ if (((conf_set[(i+(5))])=== false))
+ {
+ (conf_set_adjoin(state, conf_set, sc_conf_66, i));
+ (i = (other_set[(i+(5))]));
+ }
+ else
+ (i = (other_set[(i+(5))]));
+ }
+ return undefined;
+ }
+ };
+ forw = function(sc_states_67, BgL_sc_statezd2num_68zd2, sc_starters_69, sc_enders_70, sc_predictors_71, sc_steps_72, sc_nts_73) {
+ var next_set;
+ var next;
+ var conf_set;
+ var ender;
+ var l;
+ var starter_set;
+ var starter;
+ var sc_l_74;
+ var sc_loop1_75;
+ var head;
+ var BgL_sc_confzd2set_76zd2;
+ var BgL_sc_statezd2num_77zd2;
+ var state;
+ var sc_states_78;
+ var preds;
+ var BgL_sc_confzd2set_79zd2;
+ var step;
+ var sc_conf_80;
+ var BgL_sc_nbzd2nts_81zd2;
+ var sc_state_82;
+ {
+ (sc_state_82 = (sc_states_67[BgL_sc_statezd2num_68zd2]));
+ (BgL_sc_nbzd2nts_81zd2 = (sc_nts_73.length));
+ while (true) {
+ {
+ (sc_conf_80 = (sc_state_82[(0)]));
+ if ((sc_conf_80>=(0)))
+ {
+ (step = (sc_steps_72[sc_conf_80]));
+ (BgL_sc_confzd2set_79zd2 = (sc_state_82[(sc_conf_80+(1))]));
+ (head = (BgL_sc_confzd2set_79zd2[(4)]));
+ (sc_state_82[(0)] = (BgL_sc_confzd2set_79zd2[(0)]));
+ (conf_set_merge_new_bang(BgL_sc_confzd2set_79zd2));
+ if ((step>=(0)))
+ {
+ (sc_l_74 = (sc_starters_69[step]));
+ while ((sc_l_74 instanceof sc_Pair)) {
+ {
+ (starter = (sc_l_74.car));
+ (starter_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, starter)));
+ if (((starter_set[(BgL_sc_statezd2num_68zd2+(5))])=== false))
+ {
+ (conf_set_adjoin(sc_state_82, starter_set, starter, BgL_sc_statezd2num_68zd2));
+ (sc_l_74 = (sc_l_74.cdr));
+ }
+ else
+ (sc_l_74 = (sc_l_74.cdr));
+ }
+ }
+ (l = (sc_enders_70[step]));
+ while ((l instanceof sc_Pair)) {
+ {
+ (ender = (l.car));
+ if ((((conf_set = (sc_state_82[(ender+(1))])), ((conf_set!== false)?(conf_set[(BgL_sc_statezd2num_68zd2+(5))]):false))!== false))
+ {
+ (next = (sc_conf_80+(1)));
+ (next_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, next)));
+ (conf_set_union(sc_state_82, next_set, next, BgL_sc_confzd2set_79zd2));
+ (l = (l.cdr));
+ }
+ else
+ (l = (l.cdr));
+ }
+ }
+ }
+ else
+ {
+ (preds = (sc_predictors_71[(step+BgL_sc_nbzd2nts_81zd2)]));
+ (sc_states_78 = sc_states_67);
+ (state = sc_state_82);
+ (BgL_sc_statezd2num_77zd2 = BgL_sc_statezd2num_68zd2);
+ (BgL_sc_confzd2set_76zd2 = BgL_sc_confzd2set_79zd2);
+ sc_loop1_75 = function(l) {
+ var sc_state_83;
+ var BgL_sc_nextzd2set_84zd2;
+ var sc_next_85;
+ var pred_set;
+ var i;
+ var pred;
+ if ((l instanceof sc_Pair))
+ {
+ (pred = (l.car));
+ (i = head);
+ while ((i>=(0))) {
+ {
+ (pred_set = ((sc_state_83 = (sc_states_78[i])), (sc_state_83[(pred+(1))])));
+ if ((pred_set!== false))
+ {
+ (sc_next_85 = (pred+(1)));
+ (BgL_sc_nextzd2set_84zd2 = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_77zd2, sc_next_85)));
+ (conf_set_union(state, BgL_sc_nextzd2set_84zd2, sc_next_85, pred_set));
+ }
+ (i = (BgL_sc_confzd2set_76zd2[(i+(5))]));
+ }
+ }
+ return (sc_loop1_75((l.cdr)));
+ }
+ else
+ return undefined;
+ };
+ (sc_loop1_75(preds));
+ }
+ }
+ else
+ return undefined;
+ }
+ }
+ }
+ };
+ is_parsed = function(nt, i, j, sc_nts_86, sc_enders_87, sc_states_88) {
+ var conf_set;
+ var state;
+ var sc_conf_89;
+ var l;
+ var BgL_sc_ntza2_90za2;
+ {
+ (BgL_sc_ntza2_90za2 = (sc_ind_43(nt, sc_nts_86)));
+ if ((BgL_sc_ntza2_90za2!== false))
+ {
+ (sc_nts_86.length);
+ (l = (sc_enders_87[BgL_sc_ntza2_90za2]));
+ while (true) {
+ if ((l instanceof sc_Pair))
+ {
+ (sc_conf_89 = (l.car));
+ if ((((state = (sc_states_88[j])), (conf_set = (state[(sc_conf_89+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+ return true;
+ else
+ (l = (l.cdr));
+ }
+ else
+ return false;
+ }
+ }
+ else
+ return false;
+ }
+ };
+ deriv_trees = function(sc_conf_91, i, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2) {
+ var sc_loop1_98;
+ var prev;
+ var name;
+ return ((name = (sc_names_94[sc_conf_91])), ((name!== false)?((sc_conf_91<BgL_sc_nbzd2nts_97zd2)?(sc_list((sc_list(name, ((sc_toks_95[i]).car))))):(sc_list((sc_list(name))))):((prev = (sc_conf_91-(1))), (sc_loop1_98 = function(l1, l2) {
+ var loop2;
+ var ender_set;
+ var state;
+ var ender;
+ var l1;
+ var l2;
+ while (true) {
+ if ((l1 instanceof sc_Pair))
+ {
+ (ender = (l1.car));
+ (ender_set = ((state = (sc_states_96[j])), (state[(ender+(1))])));
+ if ((ender_set!== false))
+ {
+ loop2 = function(k, l2) {
+ var loop3;
+ var ender_trees;
+ var prev_trees;
+ var conf_set;
+ var sc_state_99;
+ var k;
+ var l2;
+ while (true) {
+ if ((k>=(0)))
+ if (((k>=i)&&(((sc_state_99 = (sc_states_96[k])), (conf_set = (sc_state_99[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
+ {
+ (prev_trees = (deriv_trees(prev, i, k, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
+ (ender_trees = (deriv_trees(ender, k, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
+ loop3 = function(l3, l2) {
+ var l4;
+ var sc_l2_100;
+ var ender_tree;
+ if ((l3 instanceof sc_Pair))
+ {
+ (ender_tree = (sc_list((l3.car))));
+ (l4 = prev_trees);
+ (sc_l2_100 = l2);
+ while ((l4 instanceof sc_Pair)) {
+ {
+ (sc_l2_100 = (new sc_Pair((sc_append((l4.car), ender_tree)), sc_l2_100)));
+ (l4 = (l4.cdr));
+ }
+ }
+ return (loop3((l3.cdr), sc_l2_100));
+ }
+ else
+ return (loop2((ender_set[(k+(5))]), l2));
+ };
+ return (loop3(ender_trees, l2));
+ }
+ else
+ (k = (ender_set[(k+(5))]));
+ else
+ return (sc_loop1_98((l1.cdr), l2));
+ }
+ };
+ return (loop2((ender_set[(2)]), l2));
+ }
+ else
+ (l1 = (l1.cdr));
+ }
+ else
+ return l2;
+ }
+ }), (sc_loop1_98((sc_enders_92[(sc_steps_93[prev])]), null)))));
+ };
+ BgL_sc_derivzd2treesza2_47z70 = function(nt, i, j, sc_nts_101, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106) {
+ var conf_set;
+ var state;
+ var sc_conf_107;
+ var l;
+ var trees;
+ var BgL_sc_nbzd2nts_108zd2;
+ var BgL_sc_ntza2_109za2;
+ {
+ (BgL_sc_ntza2_109za2 = (sc_ind_43(nt, sc_nts_101)));
+ if ((BgL_sc_ntza2_109za2!== false))
+ {
+ (BgL_sc_nbzd2nts_108zd2 = (sc_nts_101.length));
+ (l = (sc_enders_102[BgL_sc_ntza2_109za2]));
+ (trees = null);
+ while ((l instanceof sc_Pair)) {
+ {
+ (sc_conf_107 = (l.car));
+ if ((((state = (sc_states_106[j])), (conf_set = (state[(sc_conf_107+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+ {
+ (l = (l.cdr));
+ (trees = (sc_append((deriv_trees(sc_conf_107, i, j, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106, BgL_sc_nbzd2nts_108zd2)), trees)));
+ }
+ else
+ (l = (l.cdr));
+ }
+ }
+ return trees;
+ }
+ else
+ return false;
+ }
+ };
+ nb_deriv_trees = function(sc_conf_110, i, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2) {
+ var sc_loop1_116;
+ var tmp1124;
+ var prev;
+ return ((prev = (sc_conf_110-(1))), ((((tmp1124 = (sc_conf_110<BgL_sc_nbzd2nts_115zd2)), ((tmp1124!== false)?tmp1124:((sc_steps_112[prev])<(0))))!== false)?(1):((sc_loop1_116 = function(l, sc_n_118) {
+ var nb_ender_trees;
+ var nb_prev_trees;
+ var conf_set;
+ var state;
+ var k;
+ var n;
+ var ender_set;
+ var sc_state_117;
+ var ender;
+ var l;
+ var sc_n_118;
+ while (true) {
+ if ((l instanceof sc_Pair))
+ {
+ (ender = (l.car));
+ (ender_set = ((sc_state_117 = (sc_states_114[j])), (sc_state_117[(ender+(1))])));
+ if ((ender_set!== false))
+ {
+ (k = (ender_set[(2)]));
+ (n = sc_n_118);
+ while ((k>=(0))) {
+ if (((k>=i)&&(((state = (sc_states_114[k])), (conf_set = (state[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
+ {
+ (nb_prev_trees = (nb_deriv_trees(prev, i, k, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
+ (nb_ender_trees = (nb_deriv_trees(ender, k, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
+ (k = (ender_set[(k+(5))]));
+ (n +=(nb_prev_trees*nb_ender_trees));
+ }
+ else
+ (k = (ender_set[(k+(5))]));
+ }
+ return (sc_loop1_116((l.cdr), n));
+ }
+ else
+ (l = (l.cdr));
+ }
+ else
+ return sc_n_118;
+ }
+ }), (sc_loop1_116((sc_enders_111[(sc_steps_112[prev])]), (0))))));
+ };
+ BgL_sc_nbzd2derivzd2treesza2_48za2 = function(nt, i, j, sc_nts_119, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123) {
+ var conf_set;
+ var state;
+ var sc_conf_124;
+ var l;
+ var nb_trees;
+ var BgL_sc_nbzd2nts_125zd2;
+ var BgL_sc_ntza2_126za2;
+ {
+ (BgL_sc_ntza2_126za2 = (sc_ind_43(nt, sc_nts_119)));
+ if ((BgL_sc_ntza2_126za2!== false))
+ {
+ (BgL_sc_nbzd2nts_125zd2 = (sc_nts_119.length));
+ (l = (sc_enders_120[BgL_sc_ntza2_126za2]));
+ (nb_trees = (0));
+ while ((l instanceof sc_Pair)) {
+ {
+ (sc_conf_124 = (l.car));
+ if ((((state = (sc_states_123[j])), (conf_set = (state[(sc_conf_124+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+ {
+ (l = (l.cdr));
+ (nb_trees = ((nb_deriv_trees(sc_conf_124, i, j, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123, BgL_sc_nbzd2nts_125zd2))+nb_trees));
+ }
+ else
+ (l = (l.cdr));
+ }
+ }
+ return nb_trees;
+ }
+ else
+ return false;
+ }
+ };
+ (lexer = (parser_descr[(0)]));
+ (sc_nts_42 = (parser_descr[(1)]));
+ (sc_starters_41 = (parser_descr[(2)]));
+ (sc_enders_40 = (parser_descr[(3)]));
+ (sc_predictors_39 = (parser_descr[(4)]));
+ (sc_steps_38 = (parser_descr[(5)]));
+ (sc_names_37 = (parser_descr[(6)]));
+ (falseHead1128 = (new sc_Pair(null, null)));
+ (L1125 = (lexer(input)));
+ (tail1129 = falseHead1128);
+ while (!(L1125 === null)) {
+ {
+ (tok = (L1125.car));
+ (l1 = (tok.cdr));
+ (l2 = null);
+ while ((l1 instanceof sc_Pair)) {
+ {
+ (sc_i_29 = (sc_ind_43((l1.car), sc_nts_42)));
+ if ((sc_i_29!== false))
+ {
+ (l1 = (l1.cdr));
+ (l2 = (new sc_Pair(sc_i_29, l2)));
+ }
+ else
+ (l1 = (l1.cdr));
+ }
+ }
+ (sc_optrOpnd_22 = (new sc_Pair((tok.car), (sc_reverse(l2)))));
+ (sc_optrOpnd_21 = (new sc_Pair(sc_optrOpnd_22, null)));
+ (tail1129.cdr = sc_optrOpnd_21);
+ (tail1129 = (tail1129.cdr));
+ (L1125 = (L1125.cdr));
+ }
+ }
+ (sc_optrOpnd_20 = (falseHead1128.cdr));
+ (sc_toks_36 = (sc_list2vector(sc_optrOpnd_20)));
+ (BgL_sc_nbzd2toks_35zd2 = (sc_toks_36.length));
+ (BgL_sc_nbzd2confs_34zd2 = (sc_steps_38.length));
+ (sc_states_33 = (make_states(BgL_sc_nbzd2toks_35zd2, BgL_sc_nbzd2confs_34zd2)));
+ (goal_starters = (sc_starters_41[(0)]));
+ (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (0), goal_starters, (0)));
+ (forw(sc_states_33, (0), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
+ (sc_i_28 = (0));
+ while ((sc_i_28<BgL_sc_nbzd2toks_35zd2)) {
+ {
+ (tok_nts = ((sc_toks_36[sc_i_28]).cdr));
+ (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (sc_i_28+(1)), tok_nts, sc_i_28));
+ (forw(sc_states_33, (sc_i_28+(1)), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
+ (++sc_i_28);
+ }
+ }
+ (nb_toks = (sc_toks_36.length));
+ (BgL_sc_nbzd2confs_32zd2 = (sc_steps_38.length));
+ (BgL_sc_nbzd2nts_31zd2 = (sc_nts_42.length));
+ (BgL_sc_statesza2_30za2 = (make_states(nb_toks, BgL_sc_nbzd2confs_32zd2)));
+ (goal_enders = (sc_enders_40[(0)]));
+ (l = goal_enders);
+ while ((l instanceof sc_Pair)) {
+ {
+ (conf = (l.car));
+ (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_33, BgL_sc_statesza2_30za2, nb_toks, conf, (0)));
+ (l = (l.cdr));
+ }
+ }
+ (i = nb_toks);
+ while ((i>=(0))) {
+ {
+ (states = sc_states_33);
+ (BgL_sc_statesza2_27za2 = BgL_sc_statesza2_30za2);
+ (state_num = i);
+ (sc_enders_26 = sc_enders_40);
+ (sc_steps_25 = sc_steps_38);
+ (BgL_sc_nbzd2nts_24zd2 = BgL_sc_nbzd2nts_31zd2);
+ (toks = sc_toks_36);
+ (BgL_sc_stateza2_23za2 = (BgL_sc_statesza2_30za2[i]));
+ loop1 = function() {
+ var sc_loop1_127;
+ var prev;
+ var BgL_sc_statesza2_128za2;
+ var sc_states_129;
+ var j;
+ var i;
+ var sc_i_130;
+ var head;
+ var conf_set;
+ var sc_conf_131;
+ {
+ (sc_conf_131 = (BgL_sc_stateza2_23za2[(0)]));
+ if ((sc_conf_131>=(0)))
+ {
+ (conf_set = (BgL_sc_stateza2_23za2[(sc_conf_131+(1))]));
+ (head = (conf_set[(4)]));
+ (BgL_sc_stateza2_23za2[(0)] = (conf_set[(0)]));
+ (conf_set_merge_new_bang(conf_set));
+ (sc_i_130 = head);
+ while ((sc_i_130>=(0))) {
+ {
+ (i = sc_i_130);
+ (j = state_num);
+ (sc_states_129 = states);
+ (BgL_sc_statesza2_128za2 = BgL_sc_statesza2_27za2);
+ (prev = (sc_conf_131-(1)));
+ if (((sc_conf_131>=BgL_sc_nbzd2nts_24zd2)&&((sc_steps_25[prev])>=(0))))
+ {
+ sc_loop1_127 = function(l) {
+ var k;
+ var ender_set;
+ var state;
+ var ender;
+ var l;
+ while (true) {
+ if ((l instanceof sc_Pair))
+ {
+ (ender = (l.car));
+ (ender_set = ((state = (sc_states_129[j])), (state[(ender+(1))])));
+ if ((ender_set!== false))
+ {
+ (k = (ender_set[(2)]));
+ while ((k>=(0))) {
+ {
+ if ((k>=i))
+ if (((BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, k, prev, i))!== false))
+ (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, j, ender, k));
+ (k = (ender_set[(k+(5))]));
+ }
+ }
+ return (sc_loop1_127((l.cdr)));
+ }
+ else
+ (l = (l.cdr));
+ }
+ else
+ return undefined;
+ }
+ };
+ (sc_loop1_127((sc_enders_26[(sc_steps_25[prev])])));
+ }
+ (sc_i_130 = (conf_set[(sc_i_130+(5))]));
+ }
+ }
+ return (loop1());
+ }
+ else
+ return undefined;
+ }
+ };
+ (loop1());
+ (--i);
+ }
+ }
+ (optrOpnd = BgL_sc_statesza2_30za2);
+ return [sc_nts_42, sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_names_37, sc_toks_36, optrOpnd, is_parsed, BgL_sc_derivzd2treesza2_47z70, BgL_sc_nbzd2derivzd2treesza2_48za2];
+ }
+ };
+ }
+ };
+ BgL_parsezd2ze3parsedzf3zc2 = function(parse, nt, i, j) {
+ var is_parsed;
+ var states;
+ var enders;
+ var nts;
+ return ((nts = (parse[(0)])), (enders = (parse[(2)])), (states = (parse[(7)])), (is_parsed = (parse[(8)])), (is_parsed(nt, i, j, nts, enders, states)));
+ };
+ BgL_parsezd2ze3treesz31 = function(parse, nt, i, j) {
+ var BgL_sc_derivzd2treesza2_132z70;
+ var states;
+ var toks;
+ var names;
+ var steps;
+ var enders;
+ var nts;
+ return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (names = (parse[(5)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_derivzd2treesza2_132z70 = (parse[(9)])), (BgL_sc_derivzd2treesza2_132z70(nt, i, j, nts, enders, steps, names, toks, states)));
+ };
+ BgL_parsezd2ze3nbzd2treesze3 = function(parse, nt, i, j) {
+ var BgL_sc_nbzd2derivzd2treesza2_133za2;
+ var states;
+ var toks;
+ var steps;
+ var enders;
+ var nts;
+ return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_nbzd2derivzd2treesza2_133za2 = (parse[(10)])), (BgL_sc_nbzd2derivzd2treesza2_133za2(nt, i, j, nts, enders, steps, toks, states)));
+ };
+ test = function(k) {
+ var x;
+ var p;
+ return ((p = (BgL_makezd2parserzd2(const_earley, function(l) {
+ var sc_x_134;
+ var tail1134;
+ var L1130;
+ var falseHead1133;
+ {
+ (falseHead1133 = (new sc_Pair(null, null)));
+ (tail1134 = falseHead1133);
+ (L1130 = l);
+ while (!(L1130 === null)) {
+ {
+ (tail1134.cdr = (new sc_Pair(((sc_x_134 = (L1130.car)), (sc_list(sc_x_134, sc_x_134))), null)));
+ (tail1134 = (tail1134.cdr));
+ (L1130 = (L1130.cdr));
+ }
+ }
+ return (falseHead1133.cdr);
+ }
+ }))), (x = (p((sc_vector2list((sc_makeVector(k, "\u1E9Ca"))))))), (sc_length((BgL_parsezd2ze3treesz31(x, "\u1E9Cs", (0), k)))));
+ };
+ BgL_earleyzd2benchmarkzd2 = function() {
+ var args = null;
+ for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) {
+ args = sc_cons(arguments[sc_tmp], args);
+ }
+ var k;
+ return ((k = ((args === null)?(7):(args.car))), (BgL_runzd2benchmarkzd2("earley", (1), function() {
+ return (test(k));
+ }, function(result) {
+ return ((sc_display(result)), (sc_newline()), result == 132);
+ })));
+ };
+}
+
+
+/************* END OF GENERATED CODE *************/
+// Invoke this function to run a benchmark.
+// The first argument is a string identifying the benchmark.
+// The second argument is the number of times to run the benchmark.
+// The third argument is a function that runs the benchmark.
+// The fourth argument is a unary function that warns if the result
+// returned by the benchmark is incorrect.
+//
+// Example:
+// RunBenchmark("new Array()",
+// 1,
+// function () { new Array(1000000); }
+// function (v) {
+// return (v instanceof Array) && (v.length == 1000000);
+// });
+
+SC_DEFAULT_OUT = new sc_GenericOutputPort(function(s) {});
+SC_ERROR_OUT = SC_DEFAULT_OUT;
+
+function RunBenchmark(name, count, run, warn) {
+ for (var n = 0; n < count; ++n) {
+ result = run();
+ if (!warn(result)) {
+ throw new Error("Earley or Boyer did incorrect number of rewrites");
+ }
+ }
+}
+
+var BgL_runzd2benchmarkzd2 = RunBenchmark;
+
+for (var i = 0; i < 4; ++i) {
+ BgL_earleyzd2benchmarkzd2();
+ BgL_nboyerzd2benchmarkzd2();
+}
diff --git a/SunSpider/tests/v8-v5/v8-raytrace.js b/SunSpider/tests/v8-v5/v8-raytrace.js
new file mode 100644
index 0000000..0a7a292
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-raytrace.js
@@ -0,0 +1,933 @@
+// The ray tracer code in this file is written by Adam Burmister. It
+// is available in its original form from:
+//
+// http://labs.flog.nz.co/raytracer/
+//
+// It has been modified slightly by Google to work as a standalone
+// benchmark, but the all the computational code remains
+// untouched. This file also contains a copy of parts of the Prototype
+// JavaScript framework which is used by the ray tracer.
+
+// Variable used to hold a number that can be used to verify that
+// the scene was ray traced correctly.
+var checkNumber;
+
+
+// ------------------------------------------------------------------------
+// ------------------------------------------------------------------------
+
+// The following is a copy of parts of the Prototype JavaScript library:
+
+// Prototype JavaScript framework, version 1.5.0
+// (c) 2005-2007 Sam Stephenson
+//
+// Prototype is freely distributable under the terms of an MIT-style license.
+// For details, see the Prototype web site: http://prototype.conio.net/
+
+
+var Class = {
+ create: function() {
+ return function() {
+ this.initialize.apply(this, arguments);
+ }
+ }
+};
+
+
+Object.extend = function(destination, source) {
+ for (var property in source) {
+ destination[property] = source[property];
+ }
+ return destination;
+};
+
+
+// ------------------------------------------------------------------------
+// ------------------------------------------------------------------------
+
+// The rest of this file is the actual ray tracer written by Adam
+// Burmister. It's a concatenation of the following files:
+//
+// flog/color.js
+// flog/light.js
+// flog/vector.js
+// flog/ray.js
+// flog/scene.js
+// flog/material/basematerial.js
+// flog/material/solid.js
+// flog/material/chessboard.js
+// flog/shape/baseshape.js
+// flog/shape/sphere.js
+// flog/shape/plane.js
+// flog/intersectioninfo.js
+// flog/camera.js
+// flog/background.js
+// flog/engine.js
+
+
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Color = Class.create();
+
+Flog.RayTracer.Color.prototype = {
+ red : 0.0,
+ green : 0.0,
+ blue : 0.0,
+
+ initialize : function(r, g, b) {
+ if(!r) r = 0.0;
+ if(!g) g = 0.0;
+ if(!b) b = 0.0;
+
+ this.red = r;
+ this.green = g;
+ this.blue = b;
+ },
+
+ add : function(c1, c2){
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red + c2.red;
+ result.green = c1.green + c2.green;
+ result.blue = c1.blue + c2.blue;
+
+ return result;
+ },
+
+ addScalar: function(c1, s){
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red + s;
+ result.green = c1.green + s;
+ result.blue = c1.blue + s;
+
+ result.limit();
+
+ return result;
+ },
+
+ subtract: function(c1, c2){
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red - c2.red;
+ result.green = c1.green - c2.green;
+ result.blue = c1.blue - c2.blue;
+
+ return result;
+ },
+
+ multiply : function(c1, c2) {
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red * c2.red;
+ result.green = c1.green * c2.green;
+ result.blue = c1.blue * c2.blue;
+
+ return result;
+ },
+
+ multiplyScalar : function(c1, f) {
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red * f;
+ result.green = c1.green * f;
+ result.blue = c1.blue * f;
+
+ return result;
+ },
+
+ divideFactor : function(c1, f) {
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red / f;
+ result.green = c1.green / f;
+ result.blue = c1.blue / f;
+
+ return result;
+ },
+
+ limit: function(){
+ this.red = (this.red > 0.0) ? ( (this.red > 1.0) ? 1.0 : this.red ) : 0.0;
+ this.green = (this.green > 0.0) ? ( (this.green > 1.0) ? 1.0 : this.green ) : 0.0;
+ this.blue = (this.blue > 0.0) ? ( (this.blue > 1.0) ? 1.0 : this.blue ) : 0.0;
+ },
+
+ distance : function(color) {
+ var d = Math.abs(this.red - color.red) + Math.abs(this.green - color.green) + Math.abs(this.blue - color.blue);
+ return d;
+ },
+
+ blend: function(c1, c2, w){
+ var result = new Flog.RayTracer.Color(0,0,0);
+ result = Flog.RayTracer.Color.prototype.add(
+ Flog.RayTracer.Color.prototype.multiplyScalar(c1, 1 - w),
+ Flog.RayTracer.Color.prototype.multiplyScalar(c2, w)
+ );
+ return result;
+ },
+
+ brightness : function() {
+ var r = Math.floor(this.red*255);
+ var g = Math.floor(this.green*255);
+ var b = Math.floor(this.blue*255);
+ return (r * 77 + g * 150 + b * 29) >> 8;
+ },
+
+ toString : function () {
+ var r = Math.floor(this.red*255);
+ var g = Math.floor(this.green*255);
+ var b = Math.floor(this.blue*255);
+
+ return "rgb("+ r +","+ g +","+ b +")";
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Light = Class.create();
+
+Flog.RayTracer.Light.prototype = {
+ position: null,
+ color: null,
+ intensity: 10.0,
+
+ initialize : function(pos, color, intensity) {
+ this.position = pos;
+ this.color = color;
+ this.intensity = (intensity ? intensity : 10.0);
+ },
+
+ getIntensity: function(distance){
+ if(distance >= intensity) return 0;
+
+ return Math.pow((intensity - distance) / strength, 0.2);
+ },
+
+ toString : function () {
+ return 'Light [' + this.position.x + ',' + this.position.y + ',' + this.position.z + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Vector = Class.create();
+
+Flog.RayTracer.Vector.prototype = {
+ x : 0.0,
+ y : 0.0,
+ z : 0.0,
+
+ initialize : function(x, y, z) {
+ this.x = (x ? x : 0);
+ this.y = (y ? y : 0);
+ this.z = (z ? z : 0);
+ },
+
+ copy: function(vector){
+ this.x = vector.x;
+ this.y = vector.y;
+ this.z = vector.z;
+ },
+
+ normalize : function() {
+ var m = this.magnitude();
+ return new Flog.RayTracer.Vector(this.x / m, this.y / m, this.z / m);
+ },
+
+ magnitude : function() {
+ return Math.sqrt((this.x * this.x) + (this.y * this.y) + (this.z * this.z));
+ },
+
+ cross : function(w) {
+ return new Flog.RayTracer.Vector(
+ -this.z * w.y + this.y * w.z,
+ this.z * w.x - this.x * w.z,
+ -this.y * w.x + this.x * w.y);
+ },
+
+ dot : function(w) {
+ return this.x * w.x + this.y * w.y + this.z * w.z;
+ },
+
+ add : function(v, w) {
+ return new Flog.RayTracer.Vector(w.x + v.x, w.y + v.y, w.z + v.z);
+ },
+
+ subtract : function(v, w) {
+ if(!w || !v) throw 'Vectors must be defined [' + v + ',' + w + ']';
+ return new Flog.RayTracer.Vector(v.x - w.x, v.y - w.y, v.z - w.z);
+ },
+
+ multiplyVector : function(v, w) {
+ return new Flog.RayTracer.Vector(v.x * w.x, v.y * w.y, v.z * w.z);
+ },
+
+ multiplyScalar : function(v, w) {
+ return new Flog.RayTracer.Vector(v.x * w, v.y * w, v.z * w);
+ },
+
+ toString : function () {
+ return 'Vector [' + this.x + ',' + this.y + ',' + this.z + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Ray = Class.create();
+
+Flog.RayTracer.Ray.prototype = {
+ position : null,
+ direction : null,
+ initialize : function(pos, dir) {
+ this.position = pos;
+ this.direction = dir;
+ },
+
+ toString : function () {
+ return 'Ray [' + this.position + ',' + this.direction + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Scene = Class.create();
+
+Flog.RayTracer.Scene.prototype = {
+ camera : null,
+ shapes : [],
+ lights : [],
+ background : null,
+
+ initialize : function() {
+ this.camera = new Flog.RayTracer.Camera(
+ new Flog.RayTracer.Vector(0,0,-5),
+ new Flog.RayTracer.Vector(0,0,1),
+ new Flog.RayTracer.Vector(0,1,0)
+ );
+ this.shapes = new Array();
+ this.lights = new Array();
+ this.background = new Flog.RayTracer.Background(new Flog.RayTracer.Color(0,0,0.5), 0.2);
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Material) == 'undefined') Flog.RayTracer.Material = {};
+
+Flog.RayTracer.Material.BaseMaterial = Class.create();
+
+Flog.RayTracer.Material.BaseMaterial.prototype = {
+
+ gloss: 2.0, // [0...infinity] 0 = matt
+ transparency: 0.0, // 0=opaque
+ reflection: 0.0, // [0...infinity] 0 = no reflection
+ refraction: 0.50,
+ hasTexture: false,
+
+ initialize : function() {
+
+ },
+
+ getColor: function(u, v){
+
+ },
+
+ wrapUp: function(t){
+ t = t % 2.0;
+ if(t < -1) t += 2.0;
+ if(t >= 1) t -= 2.0;
+ return t;
+ },
+
+ toString : function () {
+ return 'Material [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Material.Solid = Class.create();
+
+Flog.RayTracer.Material.Solid.prototype = Object.extend(
+ new Flog.RayTracer.Material.BaseMaterial(), {
+ initialize : function(color, reflection, refraction, transparency, gloss) {
+ this.color = color;
+ this.reflection = reflection;
+ this.transparency = transparency;
+ this.gloss = gloss;
+ this.hasTexture = false;
+ },
+
+ getColor: function(u, v){
+ return this.color;
+ },
+
+ toString : function () {
+ return 'SolidMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+ }
+);
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Material.Chessboard = Class.create();
+
+Flog.RayTracer.Material.Chessboard.prototype = Object.extend(
+ new Flog.RayTracer.Material.BaseMaterial(), {
+ colorEven: null,
+ colorOdd: null,
+ density: 0.5,
+
+ initialize : function(colorEven, colorOdd, reflection, transparency, gloss, density) {
+ this.colorEven = colorEven;
+ this.colorOdd = colorOdd;
+ this.reflection = reflection;
+ this.transparency = transparency;
+ this.gloss = gloss;
+ this.density = density;
+ this.hasTexture = true;
+ },
+
+ getColor: function(u, v){
+ var t = this.wrapUp(u * this.density) * this.wrapUp(v * this.density);
+
+ if(t < 0.0)
+ return this.colorEven;
+ else
+ return this.colorOdd;
+ },
+
+ toString : function () {
+ return 'ChessMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+ }
+);
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};
+
+Flog.RayTracer.Shape.BaseShape = Class.create();
+
+Flog.RayTracer.Shape.BaseShape.prototype = {
+ position: null,
+ material: null,
+
+ initialize : function() {
+ this.position = new Vector(0,0,0);
+ this.material = new Flog.RayTracer.Material.SolidMaterial(
+ new Flog.RayTracer.Color(1,0,1),
+ 0,
+ 0,
+ 0
+ );
+ },
+
+ toString : function () {
+ return 'Material [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};
+
+Flog.RayTracer.Shape.Sphere = Class.create();
+
+Flog.RayTracer.Shape.Sphere.prototype = {
+ initialize : function(pos, radius, material) {
+ this.radius = radius;
+ this.position = pos;
+ this.material = material;
+ },
+
+ intersect: function(ray){
+ var info = new Flog.RayTracer.IntersectionInfo();
+ info.shape = this;
+
+ var dst = Flog.RayTracer.Vector.prototype.subtract(ray.position, this.position);
+
+ var B = dst.dot(ray.direction);
+ var C = dst.dot(dst) - (this.radius * this.radius);
+ var D = (B * B) - C;
+
+ if(D > 0){ // intersection!
+ info.isHit = true;
+ info.distance = (-B) - Math.sqrt(D);
+ info.position = Flog.RayTracer.Vector.prototype.add(
+ ray.position,
+ Flog.RayTracer.Vector.prototype.multiplyScalar(
+ ray.direction,
+ info.distance
+ )
+ );
+ info.normal = Flog.RayTracer.Vector.prototype.subtract(
+ info.position,
+ this.position
+ ).normalize();
+
+ info.color = this.material.getColor(0,0);
+ } else {
+ info.isHit = false;
+ }
+ return info;
+ },
+
+ toString : function () {
+ return 'Sphere [position=' + this.position + ', radius=' + this.radius + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};
+
+Flog.RayTracer.Shape.Plane = Class.create();
+
+Flog.RayTracer.Shape.Plane.prototype = {
+ d: 0.0,
+
+ initialize : function(pos, d, material) {
+ this.position = pos;
+ this.d = d;
+ this.material = material;
+ },
+
+ intersect: function(ray){
+ var info = new Flog.RayTracer.IntersectionInfo();
+
+ var Vd = this.position.dot(ray.direction);
+ if(Vd == 0) return info; // no intersection
+
+ var t = -(this.position.dot(ray.position) + this.d) / Vd;
+ if(t <= 0) return info;
+
+ info.shape = this;
+ info.isHit = true;
+ info.position = Flog.RayTracer.Vector.prototype.add(
+ ray.position,
+ Flog.RayTracer.Vector.prototype.multiplyScalar(
+ ray.direction,
+ t
+ )
+ );
+ info.normal = this.position;
+ info.distance = t;
+
+ if(this.material.hasTexture){
+ var vU = new Flog.RayTracer.Vector(this.position.y, this.position.z, -this.position.x);
+ var vV = vU.cross(this.position);
+ var u = info.position.dot(vU);
+ var v = info.position.dot(vV);
+ info.color = this.material.getColor(u,v);
+ } else {
+ info.color = this.material.getColor(0,0);
+ }
+
+ return info;
+ },
+
+ toString : function () {
+ return 'Plane [' + this.position + ', d=' + this.d + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.IntersectionInfo = Class.create();
+
+Flog.RayTracer.IntersectionInfo.prototype = {
+ isHit: false,
+ hitCount: 0,
+ shape: null,
+ position: null,
+ normal: null,
+ color: null,
+ distance: null,
+
+ initialize : function() {
+ this.color = new Flog.RayTracer.Color(0,0,0);
+ },
+
+ toString : function () {
+ return 'Intersection [' + this.position + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Camera = Class.create();
+
+Flog.RayTracer.Camera.prototype = {
+ position: null,
+ lookAt: null,
+ equator: null,
+ up: null,
+ screen: null,
+
+ initialize : function(pos, lookAt, up) {
+ this.position = pos;
+ this.lookAt = lookAt;
+ this.up = up;
+ this.equator = lookAt.normalize().cross(this.up);
+ this.screen = Flog.RayTracer.Vector.prototype.add(this.position, this.lookAt);
+ },
+
+ getRay: function(vx, vy){
+ var pos = Flog.RayTracer.Vector.prototype.subtract(
+ this.screen,
+ Flog.RayTracer.Vector.prototype.subtract(
+ Flog.RayTracer.Vector.prototype.multiplyScalar(this.equator, vx),
+ Flog.RayTracer.Vector.prototype.multiplyScalar(this.up, vy)
+ )
+ );
+ pos.y = pos.y * -1;
+ var dir = Flog.RayTracer.Vector.prototype.subtract(
+ pos,
+ this.position
+ );
+
+ var ray = new Flog.RayTracer.Ray(pos, dir.normalize());
+
+ return ray;
+ },
+
+ toString : function () {
+ return 'Ray []';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Background = Class.create();
+
+Flog.RayTracer.Background.prototype = {
+ color : null,
+ ambience : 0.0,
+
+ initialize : function(color, ambience) {
+ this.color = color;
+ this.ambience = ambience;
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Engine = Class.create();
+
+Flog.RayTracer.Engine.prototype = {
+ canvas: null, /* 2d context we can render to */
+
+ initialize: function(options){
+ this.options = Object.extend({
+ canvasHeight: 100,
+ canvasWidth: 100,
+ pixelWidth: 2,
+ pixelHeight: 2,
+ renderDiffuse: false,
+ renderShadows: false,
+ renderHighlights: false,
+ renderReflections: false,
+ rayDepth: 2
+ }, options || {});
+
+ this.options.canvasHeight /= this.options.pixelHeight;
+ this.options.canvasWidth /= this.options.pixelWidth;
+
+ /* TODO: dynamically include other scripts */
+ },
+
+ setPixel: function(x, y, color){
+ var pxW, pxH;
+ pxW = this.options.pixelWidth;
+ pxH = this.options.pixelHeight;
+
+ if (this.canvas) {
+ this.canvas.fillStyle = color.toString();
+ this.canvas.fillRect (x * pxW, y * pxH, pxW, pxH);
+ } else {
+ if (x === y) {
+ checkNumber += color.brightness();
+ }
+ // print(x * pxW, y * pxH, pxW, pxH);
+ }
+ },
+
+ renderScene: function(scene, canvas){
+ checkNumber = 0;
+ /* Get canvas */
+ if (canvas) {
+ this.canvas = canvas.getContext("2d");
+ } else {
+ this.canvas = null;
+ }
+
+ var canvasHeight = this.options.canvasHeight;
+ var canvasWidth = this.options.canvasWidth;
+
+ for(var y=0; y < canvasHeight; y++){
+ for(var x=0; x < canvasWidth; x++){
+ var yp = y * 1.0 / canvasHeight * 2 - 1;
+ var xp = x * 1.0 / canvasWidth * 2 - 1;
+
+ var ray = scene.camera.getRay(xp, yp);
+
+ var color = this.getPixelColor(ray, scene);
+
+ this.setPixel(x, y, color);
+ }
+ }
+ if (checkNumber !== 2321) {
+ throw new Error("Scene rendered incorrectly");
+ }
+ },
+
+ getPixelColor: function(ray, scene){
+ var info = this.testIntersection(ray, scene, null);
+ if(info.isHit){
+ var color = this.rayTrace(info, ray, scene, 0);
+ return color;
+ }
+ return scene.background.color;
+ },
+
+ testIntersection: function(ray, scene, exclude){
+ var hits = 0;
+ var best = new Flog.RayTracer.IntersectionInfo();
+ best.distance = 2000;
+
+ for(var i=0; i<scene.shapes.length; i++){
+ var shape = scene.shapes[i];
+
+ if(shape != exclude){
+ var info = shape.intersect(ray);
+ if(info.isHit && info.distance >= 0 && info.distance < best.distance){
+ best = info;
+ hits++;
+ }
+ }
+ }
+ best.hitCount = hits;
+ return best;
+ },
+
+ getReflectionRay: function(P,N,V){
+ var c1 = -N.dot(V);
+ var R1 = Flog.RayTracer.Vector.prototype.add(
+ Flog.RayTracer.Vector.prototype.multiplyScalar(N, 2*c1),
+ V
+ );
+ return new Flog.RayTracer.Ray(P, R1);
+ },
+
+ rayTrace: function(info, ray, scene, depth){
+ // Calc ambient
+ var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
+ var oldColor = color;
+ var shininess = Math.pow(10, info.shape.material.gloss + 1);
+
+ for(var i=0; i<scene.lights.length; i++){
+ var light = scene.lights[i];
+
+ // Calc diffuse lighting
+ var v = Flog.RayTracer.Vector.prototype.subtract(
+ light.position,
+ info.position
+ ).normalize();
+
+ if(this.options.renderDiffuse){
+ var L = v.dot(info.normal);
+ if(L > 0.0){
+ color = Flog.RayTracer.Color.prototype.add(
+ color,
+ Flog.RayTracer.Color.prototype.multiply(
+ info.color,
+ Flog.RayTracer.Color.prototype.multiplyScalar(
+ light.color,
+ L
+ )
+ )
+ );
+ }
+ }
+
+ // The greater the depth the more accurate the colours, but
+ // this is exponentially (!) expensive
+ if(depth <= this.options.rayDepth){
+ // calculate reflection ray
+ if(this.options.renderReflections && info.shape.material.reflection > 0)
+ {
+ var reflectionRay = this.getReflectionRay(info.position, info.normal, ray.direction);
+ var refl = this.testIntersection(reflectionRay, scene, info.shape);
+
+ if (refl.isHit && refl.distance > 0){
+ refl.color = this.rayTrace(refl, reflectionRay, scene, depth + 1);
+ } else {
+ refl.color = scene.background.color;
+ }
+
+ color = Flog.RayTracer.Color.prototype.blend(
+ color,
+ refl.color,
+ info.shape.material.reflection
+ );
+ }
+
+ // Refraction
+ /* TODO */
+ }
+
+ /* Render shadows and highlights */
+
+ var shadowInfo = new Flog.RayTracer.IntersectionInfo();
+
+ if(this.options.renderShadows){
+ var shadowRay = new Flog.RayTracer.Ray(info.position, v);
+
+ shadowInfo = this.testIntersection(shadowRay, scene, info.shape);
+ if(shadowInfo.isHit && shadowInfo.shape != info.shape /*&& shadowInfo.shape.type != 'PLANE'*/){
+ var vA = Flog.RayTracer.Color.prototype.multiplyScalar(color, 0.5);
+ var dB = (0.5 * Math.pow(shadowInfo.shape.material.transparency, 0.5));
+ color = Flog.RayTracer.Color.prototype.addScalar(vA,dB);
+ }
+ }
+
+ // Phong specular highlights
+ if(this.options.renderHighlights && !shadowInfo.isHit && info.shape.material.gloss > 0){
+ var Lv = Flog.RayTracer.Vector.prototype.subtract(
+ info.shape.position,
+ light.position
+ ).normalize();
+
+ var E = Flog.RayTracer.Vector.prototype.subtract(
+ scene.camera.position,
+ info.shape.position
+ ).normalize();
+
+ var H = Flog.RayTracer.Vector.prototype.subtract(
+ E,
+ Lv
+ ).normalize();
+
+ var glossWeight = Math.pow(Math.max(info.normal.dot(H), 0), shininess);
+ color = Flog.RayTracer.Color.prototype.add(
+ Flog.RayTracer.Color.prototype.multiplyScalar(light.color, glossWeight),
+ color
+ );
+ }
+ }
+ color.limit();
+ return color;
+ }
+};
+
+
+function renderScene(){
+ var scene = new Flog.RayTracer.Scene();
+
+ scene.camera = new Flog.RayTracer.Camera(
+ new Flog.RayTracer.Vector(0, 0, -15),
+ new Flog.RayTracer.Vector(-0.2, 0, 5),
+ new Flog.RayTracer.Vector(0, 1, 0)
+ );
+
+ scene.background = new Flog.RayTracer.Background(
+ new Flog.RayTracer.Color(0.5, 0.5, 0.5),
+ 0.4
+ );
+
+ var sphere = new Flog.RayTracer.Shape.Sphere(
+ new Flog.RayTracer.Vector(-1.5, 1.5, 2),
+ 1.5,
+ new Flog.RayTracer.Material.Solid(
+ new Flog.RayTracer.Color(0,0.5,0.5),
+ 0.3,
+ 0.0,
+ 0.0,
+ 2.0
+ )
+ );
+
+ var sphere1 = new Flog.RayTracer.Shape.Sphere(
+ new Flog.RayTracer.Vector(1, 0.25, 1),
+ 0.5,
+ new Flog.RayTracer.Material.Solid(
+ new Flog.RayTracer.Color(0.9,0.9,0.9),
+ 0.1,
+ 0.0,
+ 0.0,
+ 1.5
+ )
+ );
+
+ var plane = new Flog.RayTracer.Shape.Plane(
+ new Flog.RayTracer.Vector(0.1, 0.9, -0.5).normalize(),
+ 1.2,
+ new Flog.RayTracer.Material.Chessboard(
+ new Flog.RayTracer.Color(1,1,1),
+ new Flog.RayTracer.Color(0,0,0),
+ 0.2,
+ 0.0,
+ 1.0,
+ 0.7
+ )
+ );
+
+ scene.shapes.push(plane);
+ scene.shapes.push(sphere);
+ scene.shapes.push(sphere1);
+
+ var light = new Flog.RayTracer.Light(
+ new Flog.RayTracer.Vector(5, 10, -1),
+ new Flog.RayTracer.Color(0.8, 0.8, 0.8)
+ );
+
+ var light1 = new Flog.RayTracer.Light(
+ new Flog.RayTracer.Vector(-3, 5, -15),
+ new Flog.RayTracer.Color(0.8, 0.8, 0.8),
+ 100
+ );
+
+ scene.lights.push(light);
+ scene.lights.push(light1);
+
+ var imageWidth = 100; // $F('imageWidth');
+ var imageHeight = 100; // $F('imageHeight');
+ var pixelSize = "5,5".split(','); // $F('pixelSize').split(',');
+ var renderDiffuse = true; // $F('renderDiffuse');
+ var renderShadows = true; // $F('renderShadows');
+ var renderHighlights = true; // $F('renderHighlights');
+ var renderReflections = true; // $F('renderReflections');
+ var rayDepth = 2;//$F('rayDepth');
+
+ var raytracer = new Flog.RayTracer.Engine(
+ {
+ canvasWidth: imageWidth,
+ canvasHeight: imageHeight,
+ pixelWidth: pixelSize[0],
+ pixelHeight: pixelSize[1],
+ "renderDiffuse": renderDiffuse,
+ "renderHighlights": renderHighlights,
+ "renderShadows": renderShadows,
+ "renderReflections": renderReflections,
+ "rayDepth": rayDepth
+ }
+ );
+
+ raytracer.renderScene(scene, null, 0);
+}
+
+for (var i = 0; i < 6; ++i)
+ renderScene();
diff --git a/SunSpider/tests/v8-v5/v8-regexp.js b/SunSpider/tests/v8-v5/v8-regexp.js
new file mode 100644
index 0000000..a3ac081
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-regexp.js
@@ -0,0 +1,1613 @@
+// Copyright 2009 the V8 project authors. 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.
+
+// Automatically generated on 2009-01-30.
+
+// This benchmark is generated by loading 50 of the most popular pages
+// on the web and logging all regexp operations performed. Each
+// operation is given a weight that is calculated from an estimate of
+// the popularity of the pages where it occurs and the number of times
+// it is executed while loading each page. Finally the literal
+// letters in the data are encoded using ROT13 in a way that does not
+// affect how the regexps match their input.
+
+function runRegExpBenchmark() {
+ var re0 = /^ba/;
+ var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/;
+ var re2 = /^\s*|\s*$/g;
+ var re3 = /\bQBZPbageby_cynprubyqre\b/;
+ var re4 = /,/;
+ var re5 = /\bQBZPbageby_cynprubyqre\b/g;
+ var re6 = /^[\s\xa0]+|[\s\xa0]+$/g;
+ var re7 = /(\d*)(\D*)/g;
+ var re8 = /=/;
+ var re9 = /(^|\s)lhv\-h(\s|$)/;
+ var str0 = 'Zbmvyyn/5.0 (Jvaqbjf; H; Jvaqbjf AG 5.1; ra-HF) NccyrJroXvg/528.9 (XUGZY, yvxr Trpxb) Puebzr/2.0.157.0 Fnsnev/528.9';
+ var re10 = /\#/g;
+ var re11 = /\./g;
+ var re12 = /'/g;
+ var re13 = /\?[\w\W]*(sevraqvq|punaaryvq|tebhcvq)=([^\&\?#]*)/i;
+ var str1 = 'Fubpxjnir Synfu 9.0 e115';
+ var re14 = /\s+/g;
+ var re15 = /^\s*(\S*(\s+\S+)*)\s*$/;
+ var re16 = /(-[a-z])/i;
+ function runBlock0() {
+ for (var i = 0; i < 6511; i++) {
+ re0.exec('pyvpx');
+ }
+ for (var i = 0; i < 1844; i++) {
+ re1.exec('uggc://jjj.snprobbx.pbz/ybtva.cuc');
+ }
+ for (var i = 0; i < 739; i++) {
+ 'QBZPbageby_cynprubyqre'.replace(re2, '');
+ }
+ for (var i = 0; i < 598; i++) {
+ re1.exec('uggc://jjj.snprobbx.pbz/');
+ }
+ for (var i = 0; i < 454; i++) {
+ re1.exec('uggc://jjj.snprobbx.pbz/fepu.cuc');
+ }
+ for (var i = 0; i < 352; i++) {
+ /qqqq|qqq|qq|q|ZZZZ|ZZZ|ZZ|Z|llll|ll|l|uu|u|UU|U|zz|z|ff|f|gg|g|sss|ss|s|mmm|mm|m/g.exec('qqqq, ZZZ q, llll');
+ }
+ for (var i = 0; i < 312; i++) {
+ re3.exec('vachggrkg QBZPbageby_cynprubyqre');
+ }
+ for (var i = 0; i < 282; i++) {
+ re4.exec('/ZlFcnprUbzrcntr/Vaqrk-FvgrUbzr,10000000');
+ }
+ for (var i = 0; i < 177; i++) {
+ 'vachggrkg'.replace(re5, '');
+ }
+ for (var i = 0; i < 170; i++) {
+ '528.9'.replace(re6, '');
+ re7.exec('528');
+ }
+ for (var i = 0; i < 156; i++) {
+ re8.exec('VCPhygher=ra-HF');
+ re8.exec('CersreerqPhygher=ra-HF');
+ }
+ for (var i = 0; i < 144; i++) {
+ re0.exec('xrlcerff');
+ }
+ for (var i = 0; i < 139; i++) {
+ '521'.replace(re6, '');
+ re7.exec('521');
+ re9.exec('');
+ /JroXvg\/(\S+)/.exec(str0);
+ }
+ for (var i = 0; i < 137; i++) {
+ 'qvi .so_zrah'.replace(re10, '');
+ 'qvi .so_zrah'.replace(/\[/g, '');
+ 'qvi.so_zrah'.replace(re11, '');
+ }
+ for (var i = 0; i < 117; i++) {
+ 'uvqqra_ryrz'.replace(re2, '');
+ }
+ for (var i = 0; i < 95; i++) {
+ /(?:^|;)\s*sevraqfgre_ynat=([^;]*)/.exec('sevraqfgre_naba=nvq%3Qn6ss9p85n868ro9s059pn854735956o3%26ers%3Q%26df%3Q%26vpgl%3QHF');
+ }
+ for (var i = 0; i < 93; i++) {
+ 'uggc://ubzr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ re13.exec('uggc://ubzr.zlfcnpr.pbz/vaqrk.psz');
+ }
+ for (var i = 0; i < 92; i++) {
+ str1.replace(/([a-zA-Z]|\s)+/, '');
+ }
+ for (var i = 0; i < 85; i++) {
+ 'svefg'.replace(re14, '');
+ 'svefg'.replace(re15, '');
+ 'uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ 'ynfg'.replace(re14, '');
+ 'ynfg'.replace(re15, '');
+ re16.exec('qvfcynl');
+ re13.exec('uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz');
+ }
+ }
+ var re17 = /(^|[^\\])\"\\\/Qngr\((-?[0-9]+)\)\\\/\"/g;
+ var str2 = '{"anzr":"","ahzoreSbezng":{"PheeraplQrpvznyQvtvgf":2,"PheeraplQrpvznyFrcnengbe":".","VfErnqBayl":gehr,"PheeraplTebhcFvmrf":[3],"AhzoreTebhcFvmrf":[3],"CrepragTebhcFvmrf":[3],"PheeraplTebhcFrcnengbe":",","PheeraplFlzoby":"\xa4","AnAFlzoby":"AnA","PheeraplArtngvirCnggrea":0,"AhzoreArtngvirCnggrea":1,"CrepragCbfvgvirCnggrea":0,"CrepragArtngvirCnggrea":0,"ArtngvirVasvavglFlzoby":"-Vasvavgl","ArtngvirFvta":"-","AhzoreQrpvznyQvtvgf":2,"AhzoreQrpvznyFrcnengbe":".","AhzoreTebhcFrcnengbe":",","PheeraplCbfvgvirCnggrea":0,"CbfvgvirVasvavglFlzoby":"Vasvavgl","CbfvgvirFvta":"+","CrepragQrpvznyQvtvgf":2,"CrepragQrpvznyFrcnengbe":".","CrepragTebhcFrcnengbe":",","CrepragFlzoby":"%","CreZvyyrFlzoby":"\u2030","AngvirQvtvgf":["0","1","2","3","4","5","6","7","8","9"],"QvtvgFhofgvghgvba":1},"qngrGvzrSbezng":{"NZQrfvtangbe":"NZ","Pnyraqne":{"ZvaFhccbegrqQngrGvzr":"@-62135568000000@","ZnkFhccbegrqQngrGvzr":"@253402300799999@","NytbevguzGlcr":1,"PnyraqneGlcr":1,"Renf":[1],"GjbQvtvgLrneZnk":2029,"VfErnqBayl":gehr},"QngrFrcnengbe":"/","SvefgQnlBsJrrx":0,"PnyraqneJrrxEhyr":0,"ShyyQngrGvzrCnggrea":"qqqq, qq ZZZZ llll UU:zz:ff","YbatQngrCnggrea":"qqqq, qq ZZZZ llll","YbatGvzrCnggrea":"UU:zz:ff","ZbaguQnlCnggrea":"ZZZZ qq","CZQrfvtangbe":"CZ","ESP1123Cnggrea":"qqq, qq ZZZ llll UU\':\'zz\':\'ff \'TZG\'","FubegQngrCnggrea":"ZZ/qq/llll","FubegGvzrCnggrea":"UU:zz","FbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq\'G\'UU\':\'zz\':\'ff","GvzrFrcnengbe":":","HavirefnyFbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq UU\':\'zz\':\'ff\'M\'","LrneZbaguCnggrea":"llll ZZZZ","NooerivngrqQnlAnzrf":["Fha","Zba","Ghr","Jrq","Guh","Sev","Fng"],"FubegrfgQnlAnzrf":["Fh","Zb","Gh","Jr","Gu","Se","Fn"],"QnlAnzrf":["Fhaqnl","Zbaqnl","Ghrfqnl","Jrqarfqnl","Guhefqnl","Sevqnl","Fngheqnl"],"NooerivngrqZbaguAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""],"VfErnqBayl":gehr,"AngvirPnyraqneAnzr":"Tertbevna Pnyraqne","NooerivngrqZbaguTravgvirAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguTravgvirAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""]}}';
+ var str3 = '{"anzr":"ra-HF","ahzoreSbezng":{"PheeraplQrpvznyQvtvgf":2,"PheeraplQrpvznyFrcnengbe":".","VfErnqBayl":snyfr,"PheeraplTebhcFvmrf":[3],"AhzoreTebhcFvmrf":[3],"CrepragTebhcFvmrf":[3],"PheeraplTebhcFrcnengbe":",","PheeraplFlzoby":"$","AnAFlzoby":"AnA","PheeraplArtngvirCnggrea":0,"AhzoreArtngvirCnggrea":1,"CrepragCbfvgvirCnggrea":0,"CrepragArtngvirCnggrea":0,"ArtngvirVasvavglFlzoby":"-Vasvavgl","ArtngvirFvta":"-","AhzoreQrpvznyQvtvgf":2,"AhzoreQrpvznyFrcnengbe":".","AhzoreTebhcFrcnengbe":",","PheeraplCbfvgvirCnggrea":0,"CbfvgvirVasvavglFlzoby":"Vasvavgl","CbfvgvirFvta":"+","CrepragQrpvznyQvtvgf":2,"CrepragQrpvznyFrcnengbe":".","CrepragTebhcFrcnengbe":",","CrepragFlzoby":"%","CreZvyyrFlzoby":"\u2030","AngvirQvtvgf":["0","1","2","3","4","5","6","7","8","9"],"QvtvgFhofgvghgvba":1},"qngrGvzrSbezng":{"NZQrfvtangbe":"NZ","Pnyraqne":{"ZvaFhccbegrqQngrGvzr":"@-62135568000000@","ZnkFhccbegrqQngrGvzr":"@253402300799999@","NytbevguzGlcr":1,"PnyraqneGlcr":1,"Renf":[1],"GjbQvtvgLrneZnk":2029,"VfErnqBayl":snyfr},"QngrFrcnengbe":"/","SvefgQnlBsJrrx":0,"PnyraqneJrrxEhyr":0,"ShyyQngrGvzrCnggrea":"qqqq, ZZZZ qq, llll u:zz:ff gg","YbatQngrCnggrea":"qqqq, ZZZZ qq, llll","YbatGvzrCnggrea":"u:zz:ff gg","ZbaguQnlCnggrea":"ZZZZ qq","CZQrfvtangbe":"CZ","ESP1123Cnggrea":"qqq, qq ZZZ llll UU\':\'zz\':\'ff \'TZG\'","FubegQngrCnggrea":"Z/q/llll","FubegGvzrCnggrea":"u:zz gg","FbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq\'G\'UU\':\'zz\':\'ff","GvzrFrcnengbe":":","HavirefnyFbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq UU\':\'zz\':\'ff\'M\'","LrneZbaguCnggrea":"ZZZZ, llll","NooerivngrqQnlAnzrf":["Fha","Zba","Ghr","Jrq","Guh","Sev","Fng"],"FubegrfgQnlAnzrf":["Fh","Zb","Gh","Jr","Gu","Se","Fn"],"QnlAnzrf":["Fhaqnl","Zbaqnl","Ghrfqnl","Jrqarfqnl","Guhefqnl","Sevqnl","Fngheqnl"],"NooerivngrqZbaguAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""],"VfErnqBayl":snyfr,"AngvirPnyraqneAnzr":"Tertbevna Pnyraqne","NooerivngrqZbaguTravgvirAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguTravgvirAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""]}}';
+ var str4 = 'HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str5 = 'HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var re18 = /^\s+|\s+$/g;
+ var str6 = 'uggc://jjj.snprobbx.pbz/vaqrk.cuc';
+ var re19 = /(?:^|\s+)ba(?:\s+|$)/;
+ var re20 = /[+, ]/;
+ var re21 = /ybnqrq|pbzcyrgr/;
+ var str7 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(d1)c=d1.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+d1.Cnaryf[c].Jvqgu,o=g+d1.Cnaryf[c].Urvtug;vs((pheK<y)||(pheK>e)||(pheL<g)||(pheL>o)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(d1&&d1.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(d1)d1.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(d1)d1.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;d1.IjTc=d2(n,c){ine nq=d1;vs(vfAnA(c)){sbe(ine v=0;v<nq.Cnaryf.yratgu;v++)vs(nq.Cnaryf[v].Anzr==c)erghea v;erghea 0;}erghea c;};;d1.IjTpy=d2(n,c,p){ine cn=d1.Cnaryf[IjTc(n,c)];vs(!cn)erghea 0;vs(vfAnA(p)){sbe(ine v=0;v<cn.Pyvpxguehf.yratgu;v++)vs(cn.Pyvpxguehf[v].Anzr==p)erghea v;erghea 0;}erghea p;};;d1.IjGenpr=d2(n,f){gel{vs(jvaqbj["Ij"+"QtQ"])jvaqbj["Ij"+"QtQ"](n,1,f);}pngpu(r){}};;d1.IjYvzvg1=d2(n,f){ine nq=d1,vh=f.fcyvg("/");sbe(ine v=0,p=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;d1.IjYvzvg0=d2(n,f){ine nq=d1,vh=f.fcyvg("/");sbe(ine v=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;d1.IjRVST=d2(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",d1.rvsg);};;d1.IjNavzSHC=d2(n,c){ine nq=d1;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ <nq.NshG)frgGvzrbhg(("IjNavzSHC(NQ_VQ,"+c+")"),nq.NshC);ryfr{k=-1000;l=k;}cna.YrsgBssfrg=k;cna.GbcBssfrg=l;IjNhErcb(n,c);};;d1.IjTrgErnyCbfvgvba=d2(n,b,j){erghea IjBOEC.nccyl(guvf,nethzragf);};;d1.IjPnapryGvzrbhg=d2(n,c){c=IjTc(n,c);ine cay=d1.Cnaryf[c];vs(cay&&cay.UgU!=""){pyrneGvzrbhg(cay.UgU);}};;d1.IjPnapryNyyGvzrbhgf=d2(n){vs(d1.YbpxGvzrbhgPunatrf)erghea;sbe(ine c=0;c<d1.bac;c++)IjPnapryGvzrbhg(n,c);};;d1.IjFgnegGvzrbhg=d2(n,c,bG){c=IjTc(n,c);ine cay=d1.Cnaryf[c];vs(cay&&((cay.UvqrGvzrbhgInyhr>0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;d1.IjErfrgGvzrbhg=d2(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;d1.IjErfrgNyyGvzrbhgf=d2(n){sbe(ine c=0;c<d1.bac;c++)IjErfrgGvzrbhg(n,c);};;d1.IjQrgnpure=d2(n,rig,sap){gel{vs(IjQVR5)riny("jvaqbj.qrgnpuRirag(\'ba"+rig+"\',"+sap+"NQ_VQ)");ryfr vs(!IjQVRZnp)riny("jvaqbj.erzbirRiragYvfgrare(\'"+rig+"\',"+sap+"NQ_VQ,snyfr)");}pngpu(r){}};;d1.IjPyrnaHc=d2(n){IjCvat(n,"G");ine nq=d1;sbe(ine v=0;v<nq.Cnaryf.yratgu;v++){IjUvqrCnary(n,v,gehr);}gel{IjTrgBow(nq.gya).vaareUGZY="";}pngpu(r){}vs(nq.gya!=nq.gya2)gel{IjTrgBow(nq.gya2).vaareUGZY="";}pngpu(r){}gel{d1=ahyy;}pngpu(r){}gel{IjQrgnpure(n,"haybnq","IjHayNQ_VQ");}pngpu(r){}gel{jvaqbj.IjHayNQ_VQ=ahyy;}pngpu(r){}gel{IjQrgnpure(n,"fpebyy","IjFeNQ_VQ");}pngpu(r){}gel{jvaqbj.IjFeNQ_VQ=ahyy;}pngpu(r){}gel{IjQrgnpure(n,"erfvmr","IjEmNQ_VQ");}pngpu(r){}gel{jvaqbj.IjEmNQ_VQ=ahyy;}pngpu(r){}gel{IjQrgnpure(n';
+ var str8 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(jvaqbj.IjNqNQ_VQ)c=jvaqbj.IjNqNQ_VQ.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Jvqgu,o=g+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Urvtug;vs((pheK<y)||(pheK>e)||(pheL<g)||(pheL>o)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(jvaqbj.IjNqNQ_VQ&&jvaqbj.IjNqNQ_VQ.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjTc=shapgvba(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(vfAnA(c)){sbe(ine v=0;v<nq.Cnaryf.yratgu;v++)vs(nq.Cnaryf[v].Anzr==c)erghea v;erghea 0;}erghea c;};;jvaqbj.IjNqNQ_VQ.IjTpy=shapgvba(n,c,p){ine cn=jvaqbj.IjNqNQ_VQ.Cnaryf[IjTc(n,c)];vs(!cn)erghea 0;vs(vfAnA(p)){sbe(ine v=0;v<cn.Pyvpxguehf.yratgu;v++)vs(cn.Pyvpxguehf[v].Anzr==p)erghea v;erghea 0;}erghea p;};;jvaqbj.IjNqNQ_VQ.IjGenpr=shapgvba(n,f){gel{vs(jvaqbj["Ij"+"QtQ"])jvaqbj["Ij"+"QtQ"](n,1,f);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjYvzvg1=shapgvba(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0,p=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;jvaqbj.IjNqNQ_VQ.IjYvzvg0=shapgvba(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;jvaqbj.IjNqNQ_VQ.IjRVST=shapgvba(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",jvaqbj.IjNqNQ_VQ.rvsg);};;jvaqbj.IjNqNQ_VQ.IjNavzSHC=shapgvba(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ <nq.NshG)frgGvzrbhg(("IjNavzSHC(NQ_VQ,"+c+")"),nq.NshC);ryfr{k=-1000;l=k;}cna.YrsgBssfrg=k;cna.GbcBssfrg=l;IjNhErcb(n,c);};;jvaqbj.IjNqNQ_VQ.IjTrgErnyCbfvgvba=shapgvba(n,b,j){erghea IjBOEC.nccyl(guvf,nethzragf);};;jvaqbj.IjNqNQ_VQ.IjPnapryGvzrbhg=shapgvba(n,c){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&cay.UgU!=""){pyrneGvzrbhg(cay.UgU);}};;jvaqbj.IjNqNQ_VQ.IjPnapryNyyGvzrbhgf=shapgvba(n){vs(jvaqbj.IjNqNQ_VQ.YbpxGvzrbhgPunatrf)erghea;sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjPnapryGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjFgnegGvzrbhg=shapgvba(n,c,bG){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&((cay.UvqrGvzrbhgInyhr>0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;jvaqbj.IjNqNQ_VQ.IjErfrgGvzrbhg=shapgvba(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;jvaqbj.IjNqNQ_VQ.IjErfrgNyyGvzrbhgf=shapgvba(n){sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjErfrgGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjQrgnpure=shapgvba(n,rig,sap){gel{vs(IjQVR5)riny("jvaqbj.qrgnpuRirag(\'ba"+rig+"\',"+sap+"NQ_VQ)");ryfr vs(!IjQVRZnp)riny("jvaqbj.erzbir';
+ var str9 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(jvaqbj.IjNqNQ_VQ)c=jvaqbj.IjNqNQ_VQ.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Jvqgu,o=g+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Urvtug;vs((pheK<y)||(pheK>e)||(pheL<g)||(pheL>o)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(jvaqbj.IjNqNQ_VQ&&jvaqbj.IjNqNQ_VQ.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjTc=d2(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(vfAnA(c)){sbe(ine v=0;v<nq.Cnaryf.yratgu;v++)vs(nq.Cnaryf[v].Anzr==c)erghea v;erghea 0;}erghea c;};;jvaqbj.IjNqNQ_VQ.IjTpy=d2(n,c,p){ine cn=jvaqbj.IjNqNQ_VQ.Cnaryf[IjTc(n,c)];vs(!cn)erghea 0;vs(vfAnA(p)){sbe(ine v=0;v<cn.Pyvpxguehf.yratgu;v++)vs(cn.Pyvpxguehf[v].Anzr==p)erghea v;erghea 0;}erghea p;};;jvaqbj.IjNqNQ_VQ.IjGenpr=d2(n,f){gel{vs(jvaqbj["Ij"+"QtQ"])jvaqbj["Ij"+"QtQ"](n,1,f);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjYvzvg1=d2(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0,p=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;jvaqbj.IjNqNQ_VQ.IjYvzvg0=d2(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;jvaqbj.IjNqNQ_VQ.IjRVST=d2(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",jvaqbj.IjNqNQ_VQ.rvsg);};;jvaqbj.IjNqNQ_VQ.IjNavzSHC=d2(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ <nq.NshG)frgGvzrbhg(("IjNavzSHC(NQ_VQ,"+c+")"),nq.NshC);ryfr{k=-1000;l=k;}cna.YrsgBssfrg=k;cna.GbcBssfrg=l;IjNhErcb(n,c);};;jvaqbj.IjNqNQ_VQ.IjTrgErnyCbfvgvba=d2(n,b,j){erghea IjBOEC.nccyl(guvf,nethzragf);};;jvaqbj.IjNqNQ_VQ.IjPnapryGvzrbhg=d2(n,c){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&cay.UgU!=""){pyrneGvzrbhg(cay.UgU);}};;jvaqbj.IjNqNQ_VQ.IjPnapryNyyGvzrbhgf=d2(n){vs(jvaqbj.IjNqNQ_VQ.YbpxGvzrbhgPunatrf)erghea;sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjPnapryGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjFgnegGvzrbhg=d2(n,c,bG){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&((cay.UvqrGvzrbhgInyhr>0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;jvaqbj.IjNqNQ_VQ.IjErfrgGvzrbhg=d2(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;jvaqbj.IjNqNQ_VQ.IjErfrgNyyGvzrbhgf=d2(n){sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjErfrgGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjQrgnpure=d2(n,rig,sap){gel{vs(IjQVR5)riny("jvaqbj.qrgnpuRirag(\'ba"+rig+"\',"+sap+"NQ_VQ)");ryfr vs(!IjQVRZnp)riny("jvaqbj.erzbirRiragYvfgrare(\'"+rig+"\',"+sap+"NQ_VQ,snyfr)");}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjPyrna';
+ function runBlock1() {
+ for (var i = 0; i < 81; i++) {
+ re8.exec('VC=74.125.75.1');
+ }
+ for (var i = 0; i < 78; i++) {
+ '9.0 e115'.replace(/(\s)+e/, '');
+ 'k'.replace(/./, '');
+ str2.replace(re17, '');
+ str3.replace(re17, '');
+ re8.exec('144631658');
+ re8.exec('Pbhagel=IIZ%3Q');
+ re8.exec('Pbhagel=IIZ=');
+ re8.exec('CersreerqPhygherCraqvat=');
+ re8.exec(str4);
+ re8.exec(str5);
+ re8.exec('__hgzp=144631658');
+ re8.exec('gvzrMbar=-8');
+ re8.exec('gvzrMbar=0');
+ /Fnsnev\/(\d+\.\d+)/.exec(str0);
+ re3.exec('vachggrkg QBZPbageby_cynprubyqre');
+ re0.exec('xrlqbja');
+ re0.exec('xrlhc');
+ }
+ for (var i = 0; i < 77; i++) {
+ 'uggc://zrffntvat.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ re13.exec('uggc://zrffntvat.zlfcnpr.pbz/vaqrk.psz');
+ }
+ for (var i = 0; i < 73; i++) {
+ 'FrffvbaFgbentr=%7O%22GnoThvq%22%3N%7O%22thvq%22%3N1231367125017%7Q%7Q'.replace(re18, '');
+ }
+ for (var i = 0; i < 72; i++) {
+ re1.exec(str6);
+ }
+ for (var i = 0; i < 71; i++) {
+ re19.exec('');
+ }
+ for (var i = 0; i < 70; i++) {
+ '3.5.0.0'.replace(re11, '');
+ str7.replace(/d1/g, '');
+ str8.replace(/NQ_VQ/g, '');
+ str9.replace(/d2/g, '');
+ 'NI%3Q1_CI%3Q1_PI%3Q1_EI%3Q1_HI%3Q1_HP%3Q1_IC%3Q0.0.0.0_IH%3Q0'.replace(/_/g, '');
+ 'svz_zlfcnpr_ubzrcntr_abgybttrqva,svz_zlfcnpr_aba_HTP,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
+ re21.exec('ybnqvat');
+ }
+ for (var i = 0; i < 68; i++) {
+ re1.exec('#');
+ /(?:ZFVR.(\d+\.\d+))|(?:(?:Sversbk|TenaCnenqvfb|Vprjrnfry).(\d+\.\d+))|(?:Bcren.(\d+\.\d+))|(?:NccyrJroXvg.(\d+(?:\.\d+)?))/.exec(str0);
+ /(Znp BF K)|(Jvaqbjf;)/.exec(str0);
+ /Trpxb\/([0-9]+)/.exec(str0);
+ re21.exec('ybnqrq');
+ }
+ for (var i = 0; i < 49; i++) {
+ re16.exec('pbybe');
+ }
+ for (var i = 0; i < 44; i++) {
+ 'uggc://sevraqf.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ re13.exec('uggc://sevraqf.zlfcnpr.pbz/vaqrk.psz');
+ }
+ }
+ var re22 = /\bso_zrah\b/;
+ var re23 = /^(?:(?:[^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/;
+ var re24 = /uggcf?:\/\/([^\/]+\.)?snprobbx\.pbz\//;
+ var re25 = /"/g;
+ var re26 = /^([^?#]+)(?:\?([^#]*))?(#.*)?/;
+ function runBlock2() {
+ for (var i = 0; i < 40; i++) {
+ 'fryrpgrq'.replace(re14, '');
+ 'fryrpgrq'.replace(re15, '');
+ }
+ for (var i = 0; i < 39; i++) {
+ 'vachggrkg uvqqra_ryrz'.replace(/\buvqqra_ryrz\b/g, '');
+ re3.exec('vachggrkg ');
+ re3.exec('vachggrkg');
+ re22.exec('HVYvaxOhggba');
+ re22.exec('HVYvaxOhggba_E');
+ re22.exec('HVYvaxOhggba_EJ');
+ re22.exec('zrah_ybtva_pbagnvare');
+ /\buvqqra_ryrz\b/.exec('vachgcnffjbeq');
+ }
+ for (var i = 0; i < 37; i++) {
+ re8.exec('111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904');
+ re8.exec('SbeprqRkcvengvba=633669315660164980');
+ re8.exec('FrffvbaQQS2=111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904');
+ }
+ for (var i = 0; i < 35; i++) {
+ 'puvyq p1 svefg'.replace(re14, '');
+ 'puvyq p1 svefg'.replace(re15, '');
+ 'sylbhg pybfrq'.replace(re14, '');
+ 'sylbhg pybfrq'.replace(re15, '');
+ }
+ for (var i = 0; i < 34; i++) {
+ re19.exec('gno2');
+ re19.exec('gno3');
+ re8.exec('44132r503660');
+ re8.exec('SbeprqRkcvengvba=633669316860113296');
+ re8.exec('AFP_zp_dfctwzs-aowb_80=44132r503660');
+ re8.exec('FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696');
+ re8.exec('s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696');
+ }
+ for (var i = 0; i < 32; i++) {
+ /puebzr/i.exec(str0);
+ }
+ for (var i = 0; i < 31; i++) {
+ 'uggc://jjj.snprobbx.pbz/'.replace(re23, '');
+ re8.exec('SbeprqRkcvengvba=633669358527244818');
+ re8.exec('VC=66.249.85.130');
+ re8.exec('FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58');
+ re8.exec('s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58');
+ re24.exec('uggc://jjj.snprobbx.pbz/');
+ }
+ for (var i = 0; i < 30; i++) {
+ '419'.replace(re6, '');
+ /(?:^|\s+)gvzrfgnzc(?:\s+|$)/.exec('gvzrfgnzc');
+ re7.exec('419');
+ }
+ for (var i = 0; i < 29; i++) {
+ 'uggc://jjj.snprobbx.pbz/ybtva.cuc'.replace(re23, '');
+ }
+ for (var i = 0; i < 28; i++) {
+ 'Funer guvf tnqtrg'.replace(re25, '');
+ 'Funer guvf tnqtrg'.replace(re12, '');
+ re26.exec('uggc://jjj.tbbtyr.pbz/vt/qverpgbel');
+ }
+ }
+ var re27 = /-\D/g;
+ var re28 = /\bnpgvingr\b/;
+ var re29 = /%2R/gi;
+ var re30 = /%2S/gi;
+ var re31 = /^(mu-(PA|GJ)|wn|xb)$/;
+ var re32 = /\s?;\s?/;
+ var re33 = /%\w?$/;
+ var re34 = /TNQP=([^;]*)/i;
+ var str10 = 'FrffvbaQQS2=111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669315660164980&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str11 = 'FrffvbaQQS2=111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904; __hgzm=144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.3426875219718084000.1231363570.1231363570.1231363570.1; __hgzo=144631658.0.10.1231363570; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669315660164980&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str12 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231363514065&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231363514065&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Subzr.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1326469221.1231363557&tn_fvq=1231363557&tn_uvq=1114636509&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str13 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669315660164980&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str14 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669315660164980&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var re35 = /[<>]/g;
+ var str15 = 'FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669316860113296&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzs-aowb_80=44132r503660';
+ var str16 = 'FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696; AFP_zp_dfctwzs-aowb_80=44132r503660; __hgzm=144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.965867047679498800.1231363638.1231363638.1231363638.1; __hgzo=144631658.0.10.1231363638; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669316860113296&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str17 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231363621014&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231363621014&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyr.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=348699119.1231363624&tn_fvq=1231363624&tn_uvq=895511034&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str18 = 'uggc://jjj.yrobapbva.se/yv';
+ var str19 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669316860113296&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str20 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669316860113296&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ function runBlock3() {
+ for (var i = 0; i < 27; i++) {
+ 'e115'.replace(/[A-Za-z]/g, '');
+ }
+ for (var i = 0; i < 23; i++) {
+ 'qvfcynl'.replace(re27, '');
+ 'cbfvgvba'.replace(re27, '');
+ }
+ for (var i = 0; i < 22; i++) {
+ 'unaqyr'.replace(re14, '');
+ 'unaqyr'.replace(re15, '');
+ 'yvar'.replace(re14, '');
+ 'yvar'.replace(re15, '');
+ 'cnerag puebzr6 fvatyr1 gno'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1 gno'.replace(re15, '');
+ 'fyvqre'.replace(re14, '');
+ 'fyvqre'.replace(re15, '');
+ re28.exec('');
+ }
+ for (var i = 0; i < 21; i++) {
+ 'uggc://jjj.zlfcnpr.pbz/'.replace(re12, '');
+ re13.exec('uggc://jjj.zlfcnpr.pbz/');
+ }
+ for (var i = 0; i < 20; i++) {
+ 'cntrivrj'.replace(re29, '');
+ 'cntrivrj'.replace(re30, '');
+ re19.exec('ynfg');
+ re19.exec('ba svefg');
+ re8.exec('VC=74.125.75.3');
+ }
+ for (var i = 0; i < 19; i++) {
+ re31.exec('ra');
+ }
+ for (var i = 0; i < 18; i++) {
+ str10.split(re32);
+ str11.split(re32);
+ str12.replace(re33, '');
+ re8.exec('144631658.0.10.1231363570');
+ re8.exec('144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.3426875219718084000.1231363570.1231363570.1231363570.1');
+ re8.exec(str13);
+ re8.exec(str14);
+ re8.exec('__hgzn=144631658.3426875219718084000.1231363570.1231363570.1231363570.1');
+ re8.exec('__hgzo=144631658.0.10.1231363570');
+ re8.exec('__hgzm=144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str10);
+ re34.exec(str11);
+ }
+ for (var i = 0; i < 17; i++) {
+ str0.match(/zfvr/gi);
+ str0.match(/bcren/gi);
+ str15.split(re32);
+ str16.split(re32);
+ 'ohggba'.replace(re14, '');
+ 'ohggba'.replace(re15, '');
+ 'puvyq p1 svefg sylbhg pybfrq'.replace(re14, '');
+ 'puvyq p1 svefg sylbhg pybfrq'.replace(re15, '');
+ 'pvgvrf'.replace(re14, '');
+ 'pvgvrf'.replace(re15, '');
+ 'pybfrq'.replace(re14, '');
+ 'pybfrq'.replace(re15, '');
+ 'qry'.replace(re14, '');
+ 'qry'.replace(re15, '');
+ 'uqy_zba'.replace(re14, '');
+ 'uqy_zba'.replace(re15, '');
+ str17.replace(re33, '');
+ str18.replace(/%3P/g, '');
+ str18.replace(/%3R/g, '');
+ str18.replace(/%3q/g, '');
+ str18.replace(re35, '');
+ 'yvaxyvfg16'.replace(re14, '');
+ 'yvaxyvfg16'.replace(re15, '');
+ 'zvahf'.replace(re14, '');
+ 'zvahf'.replace(re15, '');
+ 'bcra'.replace(re14, '');
+ 'bcra'.replace(re15, '');
+ 'cnerag puebzr5 fvatyr1 ps NU'.replace(re14, '');
+ 'cnerag puebzr5 fvatyr1 ps NU'.replace(re15, '');
+ 'cynlre'.replace(re14, '');
+ 'cynlre'.replace(re15, '');
+ 'cyhf'.replace(re14, '');
+ 'cyhf'.replace(re15, '');
+ 'cb_uqy'.replace(re14, '');
+ 'cb_uqy'.replace(re15, '');
+ 'hyJVzt'.replace(re14, '');
+ 'hyJVzt'.replace(re15, '');
+ re8.exec('144631658.0.10.1231363638');
+ re8.exec('144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.965867047679498800.1231363638.1231363638.1231363638.1');
+ re8.exec('4413268q3660');
+ re8.exec('4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n');
+ re8.exec('SbeprqRkcvengvba=633669321699093060');
+ re8.exec('VC=74.125.75.20');
+ re8.exec(str19);
+ re8.exec(str20);
+ re8.exec('AFP_zp_tfwsbrg-aowb_80=4413268q3660');
+ re8.exec('FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n');
+ re8.exec('__hgzn=144631658.965867047679498800.1231363638.1231363638.1231363638.1');
+ re8.exec('__hgzo=144631658.0.10.1231363638');
+ re8.exec('__hgzm=144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str15);
+ re34.exec(str16);
+ }
+ }
+ var re36 = /uers|fep|fryrpgrq/;
+ var re37 = /\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g;
+ var re38 = /^(\w+|\*)$/;
+ var str21 = 'FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58; ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669358527244818&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str22 = 'FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58; __hgzm=144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.4127520630321984500.1231367822.1231367822.1231367822.1; __hgzo=144631658.0.10.1231367822; __hgzp=144631658; ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669358527244818&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str23 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231367803797&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367803797&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Szrffntvat.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1192552091.1231367807&tn_fvq=1231367807&tn_uvq=1155446857&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str24 = 'ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669358527244818&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str25 = 'ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669358527244818&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str26 = 'hy.ynat-fryrpgbe';
+ var re39 = /\\/g;
+ var re40 = / /g;
+ var re41 = /\/\xc4\/t/;
+ var re42 = /\/\xd6\/t/;
+ var re43 = /\/\xdc\/t/;
+ var re44 = /\/\xdf\/t/;
+ var re45 = /\/\xe4\/t/;
+ var re46 = /\/\xf6\/t/;
+ var re47 = /\/\xfc\/t/;
+ var re48 = /\W/g;
+ var re49 = /uers|fep|fglyr/;
+ function runBlock4() {
+ for (var i = 0; i < 16; i++) {
+ ''.replace(/\*/g, '');
+ /\bnpgvir\b/.exec('npgvir');
+ /sversbk/i.exec(str0);
+ re36.exec('glcr');
+ /zfvr/i.exec(str0);
+ /bcren/i.exec(str0);
+ }
+ for (var i = 0; i < 15; i++) {
+ str21.split(re32);
+ str22.split(re32);
+ 'uggc://ohyyrgvaf.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ str23.replace(re33, '');
+ 'yv'.replace(re37, '');
+ 'yv'.replace(re18, '');
+ re8.exec('144631658.0.10.1231367822');
+ re8.exec('144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.4127520630321984500.1231367822.1231367822.1231367822.1');
+ re8.exec(str24);
+ re8.exec(str25);
+ re8.exec('__hgzn=144631658.4127520630321984500.1231367822.1231367822.1231367822.1');
+ re8.exec('__hgzo=144631658.0.10.1231367822');
+ re8.exec('__hgzm=144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str21);
+ re34.exec(str22);
+ /\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)["']?(.*?)["']?)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g.exec(str26);
+ re13.exec('uggc://ohyyrgvaf.zlfcnpr.pbz/vaqrk.psz');
+ re38.exec('yv');
+ }
+ for (var i = 0; i < 14; i++) {
+ ''.replace(re18, '');
+ '9.0 e115'.replace(/(\s+e|\s+o[0-9]+)/, '');
+ 'Funer guvf tnqtrg'.replace(/</g, '');
+ 'Funer guvf tnqtrg'.replace(/>/g, '');
+ 'Funer guvf tnqtrg'.replace(re39, '');
+ 'uggc://cebsvyrrqvg.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ 'grnfre'.replace(re40, '');
+ 'grnfre'.replace(re41, '');
+ 'grnfre'.replace(re42, '');
+ 'grnfre'.replace(re43, '');
+ 'grnfre'.replace(re44, '');
+ 'grnfre'.replace(re45, '');
+ 'grnfre'.replace(re46, '');
+ 'grnfre'.replace(re47, '');
+ 'grnfre'.replace(re48, '');
+ re16.exec('znetva-gbc');
+ re16.exec('cbfvgvba');
+ re19.exec('gno1');
+ re9.exec('qz');
+ re9.exec('qg');
+ re9.exec('zbqobk');
+ re9.exec('zbqobkva');
+ re9.exec('zbqgvgyr');
+ re13.exec('uggc://cebsvyrrqvg.zlfcnpr.pbz/vaqrk.psz');
+ re26.exec('/vt/znvytnqtrg');
+ re49.exec('glcr');
+ }
+ }
+ var re50 = /(?:^|\s+)fryrpgrq(?:\s+|$)/;
+ var re51 = /\&/g;
+ var re52 = /\+/g;
+ var re53 = /\?/g;
+ var re54 = /\t/g;
+ var re55 = /(\$\{nqiHey\})|(\$nqiHey\b)/g;
+ var re56 = /(\$\{cngu\})|(\$cngu\b)/g;
+ function runBlock5() {
+ for (var i = 0; i < 13; i++) {
+ 'purpx'.replace(re14, '');
+ 'purpx'.replace(re15, '');
+ 'pvgl'.replace(re14, '');
+ 'pvgl'.replace(re15, '');
+ 'qrpe fyvqrgrkg'.replace(re14, '');
+ 'qrpe fyvqrgrkg'.replace(re15, '');
+ 'svefg fryrpgrq'.replace(re14, '');
+ 'svefg fryrpgrq'.replace(re15, '');
+ 'uqy_rag'.replace(re14, '');
+ 'uqy_rag'.replace(re15, '');
+ 'vape fyvqrgrkg'.replace(re14, '');
+ 'vape fyvqrgrkg'.replace(re15, '');
+ 'vachggrkg QBZPbageby_cynprubyqre'.replace(re5, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq'.replace(re15, '');
+ 'cb_guz'.replace(re14, '');
+ 'cb_guz'.replace(re15, '');
+ 'fhozvg'.replace(re14, '');
+ 'fhozvg'.replace(re15, '');
+ re50.exec('');
+ /NccyrJroXvg\/([^\s]*)/.exec(str0);
+ /XUGZY/.exec(str0);
+ }
+ for (var i = 0; i < 12; i++) {
+ '${cebg}://${ubfg}${cngu}/${dz}'.replace(/(\$\{cebg\})|(\$cebg\b)/g, '');
+ '1'.replace(re40, '');
+ '1'.replace(re10, '');
+ '1'.replace(re51, '');
+ '1'.replace(re52, '');
+ '1'.replace(re53, '');
+ '1'.replace(re39, '');
+ '1'.replace(re54, '');
+ '9.0 e115'.replace(/^(.*)\..*$/, '');
+ '9.0 e115'.replace(/^.*e(.*)$/, '');
+ '<!-- ${nqiHey} -->'.replace(re55, '');
+ '<fpevcg glcr="grkg/wninfpevcg" fep="${nqiHey}"></fpevcg>'.replace(re55, '');
+ str1.replace(/^.*\s+(\S+\s+\S+$)/, '');
+ 'tzk%2Subzrcntr%2Sfgneg%2Sqr%2S'.replace(re30, '');
+ 'tzk'.replace(re30, '');
+ 'uggc://${ubfg}${cngu}/${dz}'.replace(/(\$\{ubfg\})|(\$ubfg\b)/g, '');
+ 'uggc://nqpyvrag.hvzfrei.arg${cngu}/${dz}'.replace(re56, '');
+ 'uggc://nqpyvrag.hvzfrei.arg/wf.at/${dz}'.replace(/(\$\{dz\})|(\$dz\b)/g, '');
+ 'frpgvba'.replace(re29, '');
+ 'frpgvba'.replace(re30, '');
+ 'fvgr'.replace(re29, '');
+ 'fvgr'.replace(re30, '');
+ 'fcrpvny'.replace(re29, '');
+ 'fcrpvny'.replace(re30, '');
+ re36.exec('anzr');
+ /e/.exec('9.0 e115');
+ }
+ }
+ var re57 = /##yv4##/gi;
+ var re58 = /##yv16##/gi;
+ var re59 = /##yv19##/gi;
+ var str27 = '<hy pynff="nqi">##yv4##Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.##yv16##Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str28 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.##yv16##Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str29 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str30 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.<yv vq="YvOYG19" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg19.cat)">Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str31 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.<yv vq="YvOYG19" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg19.cat)">Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.<oe> <oe> ##N##Yrnea zber##/N##</hy>';
+ var str32 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.<yv vq="YvOYG19" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg19.cat)">Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.<oe> <oe> <n uers="uggc://znvy.yvir.pbz/znvy/nobhg.nfck" gnetrg="_oynax">Yrnea zber##/N##</hy>';
+ var str33 = 'Bar Jvaqbjf Yvir VQ trgf lbh vagb <o>Ubgznvy</o>, <o>Zrffratre</o>, <o>Kobk YVIR</o> \u2014 naq bgure cynprf lbh frr #~#argjbexybtb#~#';
+ var re60 = /(?:^|\s+)bss(?:\s+|$)/;
+ var re61 = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;
+ var re62 = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
+ var str34 = '${1}://${2}${3}${4}${5}';
+ var str35 = ' O=6gnyg0g4znrrn&o=3&f=gc; Q=_lyu=K3bQZGSxnT4lZzD3OS9GNmV3ZGLkAQxRpTyxNmRlZmRmAmNkAQLRqTImqNZjOUEgpTjQnJ5xMKtgoN--; SCF=qy';
+ function runBlock6() {
+ for (var i = 0; i < 11; i++) {
+ str27.replace(/##yv0##/gi, '');
+ str27.replace(re57, '');
+ str28.replace(re58, '');
+ str29.replace(re59, '');
+ str30.replace(/##\/o##/gi, '');
+ str30.replace(/##\/v##/gi, '');
+ str30.replace(/##\/h##/gi, '');
+ str30.replace(/##o##/gi, '');
+ str30.replace(/##oe##/gi, '');
+ str30.replace(/##v##/gi, '');
+ str30.replace(/##h##/gi, '');
+ str31.replace(/##n##/gi, '');
+ str32.replace(/##\/n##/gi, '');
+ str33.replace(/#~#argjbexybtb#~#/g, '');
+ / Zbovyr\//.exec(str0);
+ /##yv1##/gi.exec(str27);
+ /##yv10##/gi.exec(str28);
+ /##yv11##/gi.exec(str28);
+ /##yv12##/gi.exec(str28);
+ /##yv13##/gi.exec(str28);
+ /##yv14##/gi.exec(str28);
+ /##yv15##/gi.exec(str28);
+ re58.exec(str28);
+ /##yv17##/gi.exec(str29);
+ /##yv18##/gi.exec(str29);
+ re59.exec(str29);
+ /##yv2##/gi.exec(str27);
+ /##yv20##/gi.exec(str30);
+ /##yv21##/gi.exec(str30);
+ /##yv22##/gi.exec(str30);
+ /##yv23##/gi.exec(str30);
+ /##yv3##/gi.exec(str27);
+ re57.exec(str27);
+ /##yv5##/gi.exec(str28);
+ /##yv6##/gi.exec(str28);
+ /##yv7##/gi.exec(str28);
+ /##yv8##/gi.exec(str28);
+ /##yv9##/gi.exec(str28);
+ re8.exec('473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29');
+ re8.exec('SbeprqRkcvengvba=633669325184628362');
+ re8.exec('FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29');
+ /AbxvnA[^\/]*/.exec(str0);
+ }
+ for (var i = 0; i < 10; i++) {
+ ' bss'.replace(/(?:^|\s+)bss(?:\s+|$)/g, '');
+ str34.replace(/(\$\{0\})|(\$0\b)/g, '');
+ str34.replace(/(\$\{1\})|(\$1\b)/g, '');
+ str34.replace(/(\$\{pbzcyrgr\})|(\$pbzcyrgr\b)/g, '');
+ str34.replace(/(\$\{sentzrag\})|(\$sentzrag\b)/g, '');
+ str34.replace(/(\$\{ubfgcbeg\})|(\$ubfgcbeg\b)/g, '');
+ str34.replace(re56, '');
+ str34.replace(/(\$\{cebgbpby\})|(\$cebgbpby\b)/g, '');
+ str34.replace(/(\$\{dhrel\})|(\$dhrel\b)/g, '');
+ 'nqfvmr'.replace(re29, '');
+ 'nqfvmr'.replace(re30, '');
+ 'uggc://${2}${3}${4}${5}'.replace(/(\$\{2\})|(\$2\b)/g, '');
+ 'uggc://wf.hv-cbegny.qr${3}${4}${5}'.replace(/(\$\{3\})|(\$3\b)/g, '');
+ 'arjf'.replace(re40, '');
+ 'arjf'.replace(re41, '');
+ 'arjf'.replace(re42, '');
+ 'arjf'.replace(re43, '');
+ 'arjf'.replace(re44, '');
+ 'arjf'.replace(re45, '');
+ 'arjf'.replace(re46, '');
+ 'arjf'.replace(re47, '');
+ 'arjf'.replace(re48, '');
+ / PC=i=(\d+)&oe=(.)/.exec(str35);
+ re60.exec(' ');
+ re60.exec(' bss');
+ re60.exec('');
+ re19.exec(' ');
+ re19.exec('svefg ba');
+ re19.exec('ynfg vtaber');
+ re19.exec('ba');
+ re9.exec('scnq so ');
+ re9.exec('zrqvgobk');
+ re9.exec('hsgy');
+ re9.exec('lhv-h');
+ /Fnsnev|Xbadhrebe|XUGZY/gi.exec(str0);
+ re61.exec('uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf');
+ re62.exec('#Ybtva_rznvy');
+ }
+ }
+ var re63 = /\{0\}/g;
+ var str36 = 'FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n; ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_tfwsbrg-aowb_80=4413268q3660';
+ var str37 = 'FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n; AFP_zp_tfwsbrg-aowb_80=4413268q3660; __hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.2294274870215848400.1231364074.1231364074.1231364074.1; __hgzo=144631658.0.10.1231364074; __hgzp=144631658; ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str38 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231364057761&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364057761&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Ssevraqf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1667363813.1231364061&tn_fvq=1231364061&tn_uvq=1917563877&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str39 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str40 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ function runBlock7() {
+ for (var i = 0; i < 9; i++) {
+ '0'.replace(re40, '');
+ '0'.replace(re10, '');
+ '0'.replace(re51, '');
+ '0'.replace(re52, '');
+ '0'.replace(re53, '');
+ '0'.replace(re39, '');
+ '0'.replace(re54, '');
+ 'Lrf'.replace(re40, '');
+ 'Lrf'.replace(re10, '');
+ 'Lrf'.replace(re51, '');
+ 'Lrf'.replace(re52, '');
+ 'Lrf'.replace(re53, '');
+ 'Lrf'.replace(re39, '');
+ 'Lrf'.replace(re54, '');
+ }
+ for (var i = 0; i < 8; i++) {
+ 'Pybfr {0}'.replace(re63, '');
+ 'Bcra {0}'.replace(re63, '');
+ str36.split(re32);
+ str37.split(re32);
+ 'puvyq p1 svefg gnournqref'.replace(re14, '');
+ 'puvyq p1 svefg gnournqref'.replace(re15, '');
+ 'uqy_fcb'.replace(re14, '');
+ 'uqy_fcb'.replace(re15, '');
+ 'uvag'.replace(re14, '');
+ 'uvag'.replace(re15, '');
+ str38.replace(re33, '');
+ 'yvfg'.replace(re14, '');
+ 'yvfg'.replace(re15, '');
+ 'at_bhgre'.replace(re30, '');
+ 'cnerag puebzr5 qbhoyr2 NU'.replace(re14, '');
+ 'cnerag puebzr5 qbhoyr2 NU'.replace(re15, '');
+ 'cnerag puebzr5 dhnq5 ps NU osyvax zbarl'.replace(re14, '');
+ 'cnerag puebzr5 dhnq5 ps NU osyvax zbarl'.replace(re15, '');
+ 'cnerag puebzr6 fvatyr1'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1'.replace(re15, '');
+ 'cb_qrs'.replace(re14, '');
+ 'cb_qrs'.replace(re15, '');
+ 'gnopbagrag'.replace(re14, '');
+ 'gnopbagrag'.replace(re15, '');
+ 'iv_svefg_gvzr'.replace(re30, '');
+ /(^|.)(ronl|qri-ehf3.wbg)(|fgberf|zbgbef|yvirnhpgvbaf|jvxv|rkcerff|punggre).(pbz(|.nh|.pa|.ux|.zl|.ft|.oe|.zk)|pb(.hx|.xe|.am)|pn|qr|se|vg|ay|or|ng|pu|vr|va|rf|cy|cu|fr)$/i.exec('cntrf.ronl.pbz');
+ re8.exec('144631658.0.10.1231364074');
+ re8.exec('144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.2294274870215848400.1231364074.1231364074.1231364074.1');
+ re8.exec('4413241q3660');
+ re8.exec('SbeprqRkcvengvba=633669357391353591');
+ re8.exec(str39);
+ re8.exec(str40);
+ re8.exec('AFP_zp_kkk-gdzogv_80=4413241q3660');
+ re8.exec('FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7');
+ re8.exec('__hgzn=144631658.2294274870215848400.1231364074.1231364074.1231364074.1');
+ re8.exec('__hgzo=144631658.0.10.1231364074');
+ re8.exec('__hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7');
+ re34.exec(str36);
+ re34.exec(str37);
+ }
+ }
+ var re64 = /\b[a-z]/g;
+ var re65 = /^uggc:\/\//;
+ var re66 = /(?:^|\s+)qvfnoyrq(?:\s+|$)/;
+ var str41 = 'uggc://cebsvyr.zlfcnpr.pbz/Zbqhyrf/Nccyvpngvbaf/Cntrf/Pnainf.nfck';
+ function runBlock8() {
+ for (var i = 0; i < 7; i++) {
+ str1.match(/\d+/g);
+ 'nsgre'.replace(re64, '');
+ 'orsber'.replace(re64, '');
+ 'obggbz'.replace(re64, '');
+ 'ohvygva_jrngure.kzy'.replace(re65, '');
+ 'ohggba'.replace(re37, '');
+ 'ohggba'.replace(re18, '');
+ 'qngrgvzr.kzy'.replace(re65, '');
+ 'uggc://eff.paa.pbz/eff/paa_gbcfgbevrf.eff'.replace(re65, '');
+ 'vachg'.replace(re37, '');
+ 'vachg'.replace(re18, '');
+ 'vafvqr'.replace(re64, '');
+ 'cbvagre'.replace(re27, '');
+ 'cbfvgvba'.replace(/[A-Z]/g, '');
+ 'gbc'.replace(re27, '');
+ 'gbc'.replace(re64, '');
+ 'hy'.replace(re37, '');
+ 'hy'.replace(re18, '');
+ str26.replace(re37, '');
+ str26.replace(re18, '');
+ 'lbhghor_vtbbtyr/i2/lbhghor.kzy'.replace(re65, '');
+ 'm-vaqrk'.replace(re27, '');
+ /#([\w-]+)/.exec(str26);
+ re16.exec('urvtug');
+ re16.exec('znetvaGbc');
+ re16.exec('jvqgu');
+ re19.exec('gno0 svefg ba');
+ re19.exec('gno0 ba');
+ re19.exec('gno4 ynfg');
+ re19.exec('gno4');
+ re19.exec('gno5');
+ re19.exec('gno6');
+ re19.exec('gno7');
+ re19.exec('gno8');
+ /NqborNVE\/([^\s]*)/.exec(str0);
+ /NccyrJroXvg\/([^ ]*)/.exec(str0);
+ /XUGZY/gi.exec(str0);
+ /^(?:obql|ugzy)$/i.exec('YV');
+ re38.exec('ohggba');
+ re38.exec('vachg');
+ re38.exec('hy');
+ re38.exec(str26);
+ /^(\w+|\*)/.exec(str26);
+ /znp|jva|yvahk/i.exec('Jva32');
+ /eton?\([\d\s,]+\)/.exec('fgngvp');
+ }
+ for (var i = 0; i < 6; i++) {
+ ''.replace(/\r/g, '');
+ '/'.replace(re40, '');
+ '/'.replace(re10, '');
+ '/'.replace(re51, '');
+ '/'.replace(re52, '');
+ '/'.replace(re53, '');
+ '/'.replace(re39, '');
+ '/'.replace(re54, '');
+ 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/{0}?[NDO]&{1}&{2}&[NDR]'.replace(re63, '');
+ str41.replace(re12, '');
+ 'uggc://jjj.snprobbx.pbz/fepu.cuc'.replace(re23, '');
+ 'freivpr'.replace(re40, '');
+ 'freivpr'.replace(re41, '');
+ 'freivpr'.replace(re42, '');
+ 'freivpr'.replace(re43, '');
+ 'freivpr'.replace(re44, '');
+ 'freivpr'.replace(re45, '');
+ 'freivpr'.replace(re46, '');
+ 'freivpr'.replace(re47, '');
+ 'freivpr'.replace(re48, '');
+ /((ZFVR\s+([6-9]|\d\d)\.))/.exec(str0);
+ re66.exec('');
+ re50.exec('fryrpgrq');
+ re8.exec('8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn');
+ re8.exec('SbeprqRkcvengvba=633669340386893867');
+ re8.exec('VC=74.125.75.17');
+ re8.exec('FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn');
+ /Xbadhrebe|Fnsnev|XUGZY/.exec(str0);
+ re13.exec(str41);
+ re49.exec('unfsbphf');
+ }
+ }
+ var re67 = /zrah_byq/g;
+ var str42 = 'FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669325184628362&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str43 = 'FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29; __hgzm=144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.3931862196947939300.1231364380.1231364380.1231364380.1; __hgzo=144631658.0.10.1231364380; __hgzp=144631658; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669325184628362&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str44 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_vzntrf_wf&qg=1231364373088&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364373088&punaary=svz_zlfcnpr_hfre-ivrj-pbzzragf%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Spbzzrag.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1158737789.1231364375&tn_fvq=1231364375&tn_uvq=415520832&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str45 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669325184628362&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str46 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669325184628362&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var re68 = /^([#.]?)((?:[\w\u0128-\uffff*_-]|\\.)*)/;
+ var re69 = /\{1\}/g;
+ var re70 = /\s+/;
+ var re71 = /(\$\{4\})|(\$4\b)/g;
+ var re72 = /(\$\{5\})|(\$5\b)/g;
+ var re73 = /\{2\}/g;
+ var re74 = /[^+>] [^+>]/;
+ var re75 = /\bucpyv\s*=\s*([^;]*)/i;
+ var re76 = /\bucuvqr\s*=\s*([^;]*)/i;
+ var re77 = /\bucfie\s*=\s*([^;]*)/i;
+ var re78 = /\bhfucjrn\s*=\s*([^;]*)/i;
+ var re79 = /\bmvc\s*=\s*([^;]*)/i;
+ var re80 = /^((?:[\w\u0128-\uffff*_-]|\\.)+)(#)((?:[\w\u0128-\uffff*_-]|\\.)+)/;
+ var re81 = /^([>+~])\s*(\w*)/i;
+ var re82 = /^>\s*((?:[\w\u0128-\uffff*_-]|\\.)+)/;
+ var re83 = /^[\s[]?shapgvba/;
+ var re84 = /v\/g.tvs#(.*)/i;
+ var str47 = '#Zbq-Vasb-Vasb-WninFpevcgUvag';
+ var str48 = ',n.svryqOgaPnapry';
+ var str49 = 'FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669357391353591&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_kkk-gdzogv_80=4413241q3660';
+ var str50 = 'FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7; AFP_zp_kkk-gdzogv_80=4413241q3660; AFP_zp_kkk-aowb_80=4413235p3660; __hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1; __hgzo=144631658.0.10.1231367708; __hgzp=144631658; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669357391353591&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str51 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231367691141&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367691141&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Sjjj.zlfcnpr.pbz%2S&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=320757904.1231367694&tn_fvq=1231367694&tn_uvq=1758792003&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str52 = 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&aqu=1&g=7%2S0%2S2009%2014%3N38%3N42%203%20480&af=zfacbegny&cntrAnzr=HF%20UCZFSGJ&t=uggc%3N%2S%2Sjjj.zfa.pbz%2S&f=1024k768&p=24&x=L&oj=994&ou=634&uc=A&{2}&[NDR]';
+ var str53 = 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq qbhoyr2 ps';
+ var str54 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669357391353591&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str55 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669357391353591&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str56 = 'ne;ng;nh;or;oe;pn;pu;py;pa;qr;qx;rf;sv;se;to;ux;vq;vr;va;vg;wc;xe;zk;zl;ay;ab;am;cu;cy;cg;eh;fr;ft;gu;ge;gj;mn;';
+ var str57 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886&GHVQ=1';
+ var str58 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886';
+ var str59 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886; mvc=m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1';
+ var str60 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886; mvc=m:94043|yn:37.4154|yb:-122.0585|p:HF';
+ var str61 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/29/4RQP4969777N048NPS4RRR3PO2S7S.wct';
+ var str62 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/OQ/63NP9O94NS5OQP1249Q9S1ROP7NS3.wct';
+ var str63 = 'zbmvyyn/5.0 (jvaqbjf; h; jvaqbjf ag 5.1; ra-hf) nccyrjroxvg/528.9 (xugzy, yvxr trpxb) puebzr/2.0.157.0 fnsnev/528.9';
+ function runBlock9() {
+ for (var i = 0; i < 5; i++) {
+ str42.split(re32);
+ str43.split(re32);
+ 'svz_zlfcnpr_hfre-ivrj-pbzzragf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
+ str44.replace(re33, '');
+ 'zrah_arj zrah_arj_gbttyr zrah_gbttyr'.replace(re67, '');
+ 'zrah_byq zrah_byq_gbttyr zrah_gbttyr'.replace(re67, '');
+ re8.exec('102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98');
+ re8.exec('144631658.0.10.1231364380');
+ re8.exec('144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.3931862196947939300.1231364380.1231364380.1231364380.1');
+ re8.exec('441326q33660');
+ re8.exec('SbeprqRkcvengvba=633669341278771470');
+ re8.exec(str45);
+ re8.exec(str46);
+ re8.exec('AFP_zp_dfctwzssrwh-aowb_80=441326q33660');
+ re8.exec('FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98');
+ re8.exec('__hgzn=144631658.3931862196947939300.1231364380.1231364380.1231364380.1');
+ re8.exec('__hgzo=144631658.0.10.1231364380');
+ re8.exec('__hgzm=144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ }
+ for (var i = 0; i < 4; i++) {
+ ' yvfg1'.replace(re14, '');
+ ' yvfg1'.replace(re15, '');
+ ' yvfg2'.replace(re14, '');
+ ' yvfg2'.replace(re15, '');
+ ' frneputebhc1'.replace(re14, '');
+ ' frneputebhc1'.replace(re15, '');
+ str47.replace(re68, '');
+ str47.replace(re18, '');
+ ''.replace(/&/g, '');
+ ''.replace(re35, '');
+ '(..-{0})(\|(\d+)|)'.replace(re63, '');
+ str48.replace(re18, '');
+ '//vzt.jro.qr/vij/FC/${cngu}/${anzr}/${inyhr}?gf=${abj}'.replace(re56, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/${anzr}/${inyhr}?gf=${abj}'.replace(/(\$\{anzr\})|(\$anzr\b)/g, '');
+ '<fcna pynff="urnq"><o>Jvaqbjf Yvir Ubgznvy</o></fcna><fcna pynff="zft">{1}</fcna>'.replace(re69, '');
+ '<fcna pynff="urnq"><o>{0}</o></fcna><fcna pynff="zft">{1}</fcna>'.replace(re63, '');
+ '<fcna pynff="fvtahc"><n uers=uggc://jjj.ubgznvy.pbz><o>{1}</o></n></fcna>'.replace(re69, '');
+ '<fcna pynff="fvtahc"><n uers={0}><o>{1}</o></n></fcna>'.replace(re63, '');
+ 'Vzntrf'.replace(re15, '');
+ 'ZFA'.replace(re15, '');
+ 'Zncf'.replace(re15, '');
+ 'Zbq-Vasb-Vasb-WninFpevcgUvag'.replace(re39, '');
+ 'Arjf'.replace(re15, '');
+ str49.split(re32);
+ str50.split(re32);
+ 'Ivqrb'.replace(re15, '');
+ 'Jro'.replace(re15, '');
+ 'n'.replace(re39, '');
+ 'nwnkFgneg'.split(re70);
+ 'nwnkFgbc'.split(re70);
+ 'ovaq'.replace(re14, '');
+ 'ovaq'.replace(re15, '');
+ 'oevatf lbh zber. Zber fcnpr (5TO), zber frphevgl, fgvyy serr.'.replace(re63, '');
+ 'puvyq p1 svefg qrpx'.replace(re14, '');
+ 'puvyq p1 svefg qrpx'.replace(re15, '');
+ 'puvyq p1 svefg qbhoyr2'.replace(re14, '');
+ 'puvyq p1 svefg qbhoyr2'.replace(re15, '');
+ 'puvyq p2 ynfg'.replace(re14, '');
+ 'puvyq p2 ynfg'.replace(re15, '');
+ 'puvyq p2'.replace(re14, '');
+ 'puvyq p2'.replace(re15, '');
+ 'puvyq p3'.replace(re14, '');
+ 'puvyq p3'.replace(re15, '');
+ 'puvyq p4 ynfg'.replace(re14, '');
+ 'puvyq p4 ynfg'.replace(re15, '');
+ 'pbclevtug'.replace(re14, '');
+ 'pbclevtug'.replace(re15, '');
+ 'qZFAZR_1'.replace(re14, '');
+ 'qZFAZR_1'.replace(re15, '');
+ 'qbhoyr2 ps'.replace(re14, '');
+ 'qbhoyr2 ps'.replace(re15, '');
+ 'qbhoyr2'.replace(re14, '');
+ 'qbhoyr2'.replace(re15, '');
+ 'uqy_arj'.replace(re14, '');
+ 'uqy_arj'.replace(re15, '');
+ 'uc_fubccvatobk'.replace(re30, '');
+ 'ugzy%2Rvq'.replace(re29, '');
+ 'ugzy%2Rvq'.replace(re30, '');
+ str51.replace(re33, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${5}'.replace(re72, '');
+ str52.replace(re73, '');
+ 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&{1}&{2}&[NDR]'.replace(re69, '');
+ 'vztZFSG'.replace(re14, '');
+ 'vztZFSG'.replace(re15, '');
+ 'zfasbbg1 ps'.replace(re14, '');
+ 'zfasbbg1 ps'.replace(re15, '');
+ str53.replace(re14, '');
+ str53.replace(re15, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re15, '');
+ 'cevznel'.replace(re14, '');
+ 'cevznel'.replace(re15, '');
+ 'erpgnatyr'.replace(re30, '');
+ 'frpbaqnel'.replace(re14, '');
+ 'frpbaqnel'.replace(re15, '');
+ 'haybnq'.split(re70);
+ '{0}{1}1'.replace(re63, '');
+ '|{1}1'.replace(re69, '');
+ /(..-HF)(\|(\d+)|)/i.exec('xb-xe,ra-va,gu-gu');
+ re4.exec('/ZlFcnprNccf/NccPnainf,45000012');
+ re8.exec('144631658.0.10.1231367708');
+ re8.exec('144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.2770915348920628700.1231367708.1231367708.1231367708.1');
+ re8.exec('4413235p3660');
+ re8.exec('441327q73660');
+ re8.exec('9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473');
+ re8.exec('SbeprqRkcvengvba=633669350559478880');
+ re8.exec(str54);
+ re8.exec(str55);
+ re8.exec('AFP_zp_dfctwzs-aowb_80=441327q73660');
+ re8.exec('AFP_zp_kkk-aowb_80=4413235p3660');
+ re8.exec('FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473');
+ re8.exec('__hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1');
+ re8.exec('__hgzo=144631658.0.10.1231367708');
+ re8.exec('__hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str49);
+ re34.exec(str50);
+ /ZFVR\s+5[.]01/.exec(str0);
+ /HF(?=;)/i.exec(str56);
+ re74.exec(str47);
+ re28.exec('svefg npgvir svefgNpgvir');
+ re28.exec('ynfg');
+ /\bp:(..)/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF');
+ re75.exec(str57);
+ re75.exec(str58);
+ re76.exec(str57);
+ re76.exec(str58);
+ re77.exec(str57);
+ re77.exec(str58);
+ /\bhfucce\s*=\s*([^;]*)/i.exec(str59);
+ re78.exec(str57);
+ re78.exec(str58);
+ /\bjci\s*=\s*([^;]*)/i.exec(str59);
+ re79.exec(str58);
+ re79.exec(str60);
+ re79.exec(str59);
+ /\|p:([a-z]{2})/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1');
+ re80.exec(str47);
+ re61.exec('cebgbglcr.wf');
+ re68.exec(str47);
+ re81.exec(str47);
+ re82.exec(str47);
+ /^Fubpxjnir Synfu (\d)/.exec(str1);
+ /^Fubpxjnir Synfu (\d+)/.exec(str1);
+ re83.exec('[bowrpg tybony]');
+ re62.exec(str47);
+ re84.exec(str61);
+ re84.exec(str62);
+ /jroxvg/.exec(str63);
+ }
+ }
+ var re85 = /eaq_zbqobkva/;
+ var str64 = '1231365729213';
+ var str65 = '74.125.75.3-1057165600.29978900';
+ var str66 = '74.125.75.3-1057165600.29978900.1231365730214';
+ var str67 = 'Frnepu%20Zvpebfbsg.pbz';
+ var str68 = 'FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn; ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669340386893867&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str69 = 'FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn; __hgzm=144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1877536177953918500.1231365779.1231365779.1231365779.1; __hgzo=144631658.0.10.1231365779; __hgzp=144631658; ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669340386893867&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str70 = 'I=3%26THVQ=757q3ss871q44o7o805n8113n5p72q52';
+ var str71 = 'I=3&THVQ=757q3ss871q44o7o805n8113n5p72q52';
+ var str72 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231365765292&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231365765292&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Sohyyrgvaf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1579793869.1231365768&tn_fvq=1231365768&tn_uvq=2056210897&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str73 = 'frnepu.zvpebfbsg.pbz';
+ var str74 = 'frnepu.zvpebfbsg.pbz/';
+ var str75 = 'ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669340386893867&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str76 = 'ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669340386893867&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ function runBlock10() {
+ for (var i = 0; i < 3; i++) {
+ '%3Szxg=ra-HF'.replace(re39, '');
+ '-8'.replace(re40, '');
+ '-8'.replace(re10, '');
+ '-8'.replace(re51, '');
+ '-8'.replace(re52, '');
+ '-8'.replace(re53, '');
+ '-8'.replace(re39, '');
+ '-8'.replace(re54, '');
+ '1.5'.replace(re40, '');
+ '1.5'.replace(re10, '');
+ '1.5'.replace(re51, '');
+ '1.5'.replace(re52, '');
+ '1.5'.replace(re53, '');
+ '1.5'.replace(re39, '');
+ '1.5'.replace(re54, '');
+ '1024k768'.replace(re40, '');
+ '1024k768'.replace(re10, '');
+ '1024k768'.replace(re51, '');
+ '1024k768'.replace(re52, '');
+ '1024k768'.replace(re53, '');
+ '1024k768'.replace(re39, '');
+ '1024k768'.replace(re54, '');
+ str64.replace(re40, '');
+ str64.replace(re10, '');
+ str64.replace(re51, '');
+ str64.replace(re52, '');
+ str64.replace(re53, '');
+ str64.replace(re39, '');
+ str64.replace(re54, '');
+ '14'.replace(re40, '');
+ '14'.replace(re10, '');
+ '14'.replace(re51, '');
+ '14'.replace(re52, '');
+ '14'.replace(re53, '');
+ '14'.replace(re39, '');
+ '14'.replace(re54, '');
+ '24'.replace(re40, '');
+ '24'.replace(re10, '');
+ '24'.replace(re51, '');
+ '24'.replace(re52, '');
+ '24'.replace(re53, '');
+ '24'.replace(re39, '');
+ '24'.replace(re54, '');
+ str65.replace(re40, '');
+ str65.replace(re10, '');
+ str65.replace(re51, '');
+ str65.replace(re52, '');
+ str65.replace(re53, '');
+ str65.replace(re39, '');
+ str65.replace(re54, '');
+ str66.replace(re40, '');
+ str66.replace(re10, '');
+ str66.replace(re51, '');
+ str66.replace(re52, '');
+ str66.replace(re53, '');
+ str66.replace(re39, '');
+ str66.replace(re54, '');
+ '9.0'.replace(re40, '');
+ '9.0'.replace(re10, '');
+ '9.0'.replace(re51, '');
+ '9.0'.replace(re52, '');
+ '9.0'.replace(re53, '');
+ '9.0'.replace(re39, '');
+ '9.0'.replace(re54, '');
+ '994k634'.replace(re40, '');
+ '994k634'.replace(re10, '');
+ '994k634'.replace(re51, '');
+ '994k634'.replace(re52, '');
+ '994k634'.replace(re53, '');
+ '994k634'.replace(re39, '');
+ '994k634'.replace(re54, '');
+ '?zxg=ra-HF'.replace(re40, '');
+ '?zxg=ra-HF'.replace(re10, '');
+ '?zxg=ra-HF'.replace(re51, '');
+ '?zxg=ra-HF'.replace(re52, '');
+ '?zxg=ra-HF'.replace(re53, '');
+ '?zxg=ra-HF'.replace(re54, '');
+ 'PAA.pbz'.replace(re25, '');
+ 'PAA.pbz'.replace(re12, '');
+ 'PAA.pbz'.replace(re39, '');
+ 'Qngr & Gvzr'.replace(re25, '');
+ 'Qngr & Gvzr'.replace(re12, '');
+ 'Qngr & Gvzr'.replace(re39, '');
+ 'Frnepu Zvpebfbsg.pbz'.replace(re40, '');
+ 'Frnepu Zvpebfbsg.pbz'.replace(re54, '');
+ str67.replace(re10, '');
+ str67.replace(re51, '');
+ str67.replace(re52, '');
+ str67.replace(re53, '');
+ str67.replace(re39, '');
+ str68.split(re32);
+ str69.split(re32);
+ str70.replace(re52, '');
+ str70.replace(re53, '');
+ str70.replace(re39, '');
+ str71.replace(re40, '');
+ str71.replace(re10, '');
+ str71.replace(re51, '');
+ str71.replace(re54, '');
+ 'Jrngure'.replace(re25, '');
+ 'Jrngure'.replace(re12, '');
+ 'Jrngure'.replace(re39, '');
+ 'LbhGhor'.replace(re25, '');
+ 'LbhGhor'.replace(re12, '');
+ 'LbhGhor'.replace(re39, '');
+ str72.replace(re33, '');
+ 'erzbgr_vsenzr_1'.replace(/^erzbgr_vsenzr_/, '');
+ str73.replace(re40, '');
+ str73.replace(re10, '');
+ str73.replace(re51, '');
+ str73.replace(re52, '');
+ str73.replace(re53, '');
+ str73.replace(re39, '');
+ str73.replace(re54, '');
+ str74.replace(re40, '');
+ str74.replace(re10, '');
+ str74.replace(re51, '');
+ str74.replace(re52, '');
+ str74.replace(re53, '');
+ str74.replace(re39, '');
+ str74.replace(re54, '');
+ 'lhv-h'.replace(/\-/g, '');
+ re9.exec('p');
+ re9.exec('qz p');
+ re9.exec('zbqynory');
+ re9.exec('lhv-h svefg');
+ re8.exec('144631658.0.10.1231365779');
+ re8.exec('144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.1877536177953918500.1231365779.1231365779.1231365779.1');
+ re8.exec(str75);
+ re8.exec(str76);
+ re8.exec('__hgzn=144631658.1877536177953918500.1231365779.1231365779.1231365779.1');
+ re8.exec('__hgzo=144631658.0.10.1231365779');
+ re8.exec('__hgzm=144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str68);
+ re34.exec(str69);
+ /^$/.exec('');
+ re31.exec('qr');
+ /^znk\d+$/.exec('');
+ /^zva\d+$/.exec('');
+ /^erfgber$/.exec('');
+ re85.exec('zbqobkva zbqobk_abcnqqvat ');
+ re85.exec('zbqgvgyr');
+ re85.exec('eaq_zbqobkva ');
+ re85.exec('eaq_zbqgvgyr ');
+ /frpgvba\d+_pbagragf/.exec('obggbz_ani');
+ }
+ }
+ var re86 = /;\s*/;
+ var re87 = /(\$\{inyhr\})|(\$inyhr\b)/g;
+ var re88 = /(\$\{abj\})|(\$abj\b)/g;
+ var re89 = /\s+$/;
+ var re90 = /^\s+/;
+ var re91 = /(\\\"|\x00-|\x1f|\x7f-|\x9f|\u00ad|\u0600-|\u0604|\u070f|\u17b4|\u17b5|\u200c-|\u200f|\u2028-|\u202f|\u2060-|\u206f|\ufeff|\ufff0-|\uffff)/g;
+ var re92 = /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/;
+ var re93 = /^([:.#]*)((?:[\w\u0128-\uffff*_-]|\\.)+)/;
+ var re94 = /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/;
+ var str77 = '#fubhgobk .pybfr';
+ var str78 = 'FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669341278771470&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzssrwh-aowb_80=441326q33660';
+ var str79 = 'FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98; AFP_zp_dfctwzssrwh-aowb_80=441326q33660; __hgzm=144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1670816052019209000.1231365869.1231365869.1231365869.1; __hgzo=144631658.0.10.1231365869; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669341278771470&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str80 = 'FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669350559478880&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzs-aowb_80=441327q73660';
+ var str81 = 'FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473; AFP_zp_dfctwzs-aowb_80=441327q73660; __hgzm=144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1796080716621419500.1231367054.1231367054.1231367054.1; __hgzo=144631658.0.10.1231367054; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669350559478880&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str82 = '[glcr=fhozvg]';
+ var str83 = 'n.svryqOga,n.svryqOgaPnapry';
+ var str84 = 'n.svryqOgaPnapry';
+ var str85 = 'oyvpxchaxg';
+ var str86 = 'qvi.bow-nppbeqvba qg';
+ var str87 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_nccf_wf&qg=1231367052227&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367052227&punaary=svz_zlfcnpr_nccf-pnainf%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyr.zlfcnpr.pbz%2SZbqhyrf%2SNccyvpngvbaf%2SCntrf%2SPnainf.nfck&nq_glcr=grkg&rvq=6083027&rn=0&sez=1&tn_ivq=716357910.1231367056&tn_fvq=1231367056&tn_uvq=1387206491&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str88 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231365851658&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231365851658&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyrrqvg.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1979828129.1231365855&tn_fvq=1231365855&tn_uvq=2085229649&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str89 = 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55023338617756?[NDO]&aqu=1&g=7%2S0%2S2009%2014%3N12%3N47%203%20480&af=zfacbegny&cntrAnzr=HF%20UCZFSGJ&t=uggc%3N%2S%2Sjjj.zfa.pbz%2S&f=0k0&p=43835816&x=A&oj=994&ou=634&uc=A&{2}&[NDR]';
+ var str90 = 'zrgn[anzr=nwnkHey]';
+ var str91 = 'anpuevpugra';
+ var str92 = 'b oS={\'oT\':1.1};x $8n(B){z(B!=o9)};x $S(B){O(!$8n(B))z A;O(B.4L)z\'T\';b S=7t B;O(S==\'2P\'&&B.p4){23(B.7f){12 1:z\'T\';12 3:z/\S/.2g(B.8M)?\'ox\':\'oh\'}}O(S==\'2P\'||S==\'x\'){23(B.nE){12 2V:z\'1O\';12 7I:z\'5a\';12 18:z\'4B\'}O(7t B.I==\'4F\'){O(B.3u)z\'pG\';O(B.8e)z\'1p\'}}z S};x $2p(){b 4E={};Z(b v=0;v<1p.I;v++){Z(b X 1o 1p[v]){b nc=1p[v][X];b 6E=4E[X];O(6E&&$S(nc)==\'2P\'&&$S(6E)==\'2P\')4E[X]=$2p(6E,nc);17 4E[X]=nc}}z 4E};b $E=7p.E=x(){b 1d=1p;O(!1d[1])1d=[p,1d[0]];Z(b X 1o 1d[1])1d[0][X]=1d[1][X];z 1d[0]};b $4D=7p.pJ=x(){Z(b v=0,y=1p.I;v<y;v++){1p[v].E=x(1J){Z(b 1I 1o 1J){O(!p.1Y[1I])p.1Y[1I]=1J[1I];O(!p[1I])p[1I]=$4D.6C(1I)}}}};$4D.6C=x(1I){z x(L){z p.1Y[1I].3H(L,2V.1Y.nV.1F(1p,1))}};$4D(7F,2V,6J,nb);b 3l=x(B){B=B||{};B.E=$E;z B};b pK=Y 3l(H);b pZ=Y 3l(C);C.6f=C.35(\'6f\')[0];x $2O(B){z!!(B||B===0)};x $5S(B,n8){z $8n(B)?B:n8};x $7K(3c,1m){z 1q.na(1q.7K()*(1m-3c+1)+3c)};x $3N(){z Y 97().os()};x $4M(1U){pv(1U);pa(1U);z 1S};H.43=!!(C.5Z);O(H.nB)H.31=H[H.7q?\'py\':\'nL\']=1r;17 O(C.9N&&!C.om&&!oy.oZ)H.pF=H.4Z=H[H.43?\'pt\':\'65\']=1r;17 O(C.po!=1S)H.7J=1r;O(7t 5B==\'o9\'){b 5B=x(){};O(H.4Z)C.nd("pW");5B.1Y=(H.4Z)?H["[[oN.1Y]]"]:{}}5B.1Y.4L=1r;O(H.nL)5s{C.oX("pp",A,1r)}4K(r){};b 18=x(1X){b 63=x(){z(1p[0]!==1S&&p.1w&&$S(p.1w)==\'x\')?p.1w.3H(p,1p):p};$E(63,p);63.1Y=1X;63.nE=18;z 63};18.1z=x(){};18.1Y={E:x(1X){b 7x=Y p(1S);Z(b X 1o 1X){b nC=7x[X];7x[X]=18.nY(nC,1X[X])}z Y 18(7x)},3d:x(){Z(b v=0,y=1p.I;v<y;v++)$E(p.1Y,1p[v])}};18.nY=x(2b,2n){O(2b&&2b!=2n){b S=$S(2n);O(S!=$S(2b))z 2n;23(S){12\'x\':b 7R=x(){p.1e=1p.8e.1e;z 2n.3H(p,1p)};7R.1e=2b;z 7R;12\'2P\':z $2p(2b,2n)}}z 2n};b 8o=Y 18({oQ:x(J){p.4w=p.4w||[];p.4w.1x(J);z p},7g:x(){O(p.4w&&p.4w.I)p.4w.9J().2x(10,p)},oP:x(){p.4w=[]}});b 2d=Y 18({1V:x(S,J){O(J!=18.1z){p.$19=p.$19||{};p.$19[S]=p.$19[S]||[];p.$19[S].5j(J)}z p},1v:x(S,1d,2x){O(p.$19&&p.$19[S]){p.$19[S].1b(x(J){J.3n({\'L\':p,\'2x\':2x,\'1p\':1d})()},p)}z p},3M:x(S,J){O(p.$19&&p.$19[S])p.$19[S].2U(J);z p}});b 4v=Y 18({2H:x(){p.P=$2p.3H(1S,[p.P].E(1p));O(!p.1V)z p;Z(b 3O 1o p.P){O($S(p.P[3O]==\'x\')&&3O.2g(/^5P[N-M]/))p.1V(3O,p.P[3O])}z p}});2V.E({7y:x(J,L){Z(b v=0,w=p.I;v<w;v++)J.1F(L,p[v],v,p)},3s:x(J,L){b 54=[];Z(b v=0,w=p.I;v<w;v++){O(J.1F(L,p[v],v,p))54.1x(p[v])}z 54},2X:x(J,L){b 54=[];Z(b v=0,w=p.I;v<w;v++)54[v]=J.1F(L,p[v],v,p);z 54},4i:x(J,L){Z(b v=0,w=p.I;v<w;v++){O(!J.1F(L,p[v],v,p))z A}z 1r},ob:x(J,L){Z(b v=0,w=p.I;v<w;v++){O(J.1F(L,p[v],v,p))z 1r}z A},3F:x(3u,15){b 3A=p.I;Z(b v=(15<0)?1q.1m(0,3A+15):15||0;v<3A;v++){O(p[v]===3u)z v}z-1},8z:x(1u,I){1u=1u||0;O(1u<0)1u=p.I+1u;I=I||(p.I-1u);b 89=[];Z(b v=0;v<I;v++)89[v]=p[1u++];z 89},2U:x(3u){b v=0;b 3A=p.I;6L(v<3A){O(p[v]===3u){p.6l(v,1);3A--}17{v++}}z p},1y:x(3u,15){z p.3F(3u,15)!=-1},oz:x(1C){b B={},I=1q.3c(p.I,1C.I);Z(b v=0;v<I;v++)B[1C[v]]=p[v];z B},E:x(1O){Z(b v=0,w=1O.I;v<w;v++)p.1x(1O[v]);z p},2p:x(1O){Z(b v=0,y=1O.I;v<y;v++)p.5j(1O[v]);z p},5j:x(3u){O(!p.1y(3u))p.1x(3u);z p},oc:x(){z p[$7K(0,p.I-1)]||A},7L:x(){z p[p.I-1]||A}});2V.1Y.1b=2V.1Y.7y;2V.1Y.2g=2V.1Y.1y;x $N(1O){z 2V.8z(1O)};x $1b(3J,J,L){O(3J&&7t 3J.I==\'4F\'&&$S(3J)!=\'2P\')2V.7y(3J,J,L);17 Z(b 1j 1o 3J)J.1F(L||3J,3J[1j],1j)};6J.E({2g:x(6b,2F){z(($S(6b)==\'2R\')?Y 7I(6b,2F):6b).2g(p)},3p:x(){z 5K(p,10)},o4:x(){z 69(p)},7A:x(){z p.3y(/-\D/t,x(2G){z 2G.7G(1).nW()})},9b:x(){z p.3y(/\w[N-M]/t,x(2G){z(2G.7G(0)+\'-\'+2G.7G(1).5O())})},8V:x(){z p.3y(/\b[n-m]/t,x(2G){z 2G.nW()})},5L:x(){z p.3y(/^\s+|\s+$/t,\'\')},7j:x(){z p.3y(/\s{2,}/t,\' \').5L()},5V:x(1O){b 1i=p.2G(/\d{1,3}/t);z(1i)?1i.5V(1O):A},5U:x(1O){b 3P=p.2G(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);z(3P)?3P.nV(1).5U(1O):A},1y:x(2R,f){z(f)?(f+p+f).3F(f+2R+f)>-1:p.3F(2R)>-1},nX:x(){z p.3y(/([.*+?^${}()|[\]\/\\])/t,\'\\$1\')}});2V.E({5V:x(1O){O(p.I<3)z A;O(p.I==4&&p[3]==0&&!1O)z\'p5\';b 3P=[];Z(b v=0;v<3;v++){b 52=(p[v]-0).4h(16);3P.1x((52.I==1)?\'0\'+52:52)}z 1O?3P:\'#\'+3P.2u(\'\')},5U:x(1O){O(p.I!=3)z A;b 1i=[];Z(b v=0;v<3;v++){1i.1x(5K((p[v].I==1)?p[v]+p[v]:p[v],16))}z 1O?1i:\'1i(\'+1i.2u(\',\')+\')\'}});7F.E({3n:x(P){b J=p;P=$2p({\'L\':J,\'V\':A,\'1p\':1S,\'2x\':A,\'4s\':A,\'6W\':A},P);O($2O(P.1p)&&$S(P.1p)!=\'1O\')P.1p=[P.1p];z x(V){b 1d;O(P.V){V=V||H.V;1d=[(P.V===1r)?V:Y P.V(V)];O(P.1p)1d.E(P.1p)}17 1d=P.1p||1p;b 3C=x(){z J.3H($5S(P';
+ var str93 = 'hagreunyghat';
+ var str94 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669341278771470&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str95 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669350559478880&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str96 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669341278771470&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str97 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669350559478880&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str98 = 'shapgvba (){Cuk.Nccyvpngvba.Frghc.Pber();Cuk.Nccyvpngvba.Frghc.Nwnk();Cuk.Nccyvpngvba.Frghc.Synfu();Cuk.Nccyvpngvba.Frghc.Zbqhyrf()}';
+ function runBlock11() {
+ for (var i = 0; i < 2; i++) {
+ ' .pybfr'.replace(re18, '');
+ ' n.svryqOgaPnapry'.replace(re18, '');
+ ' qg'.replace(re18, '');
+ str77.replace(re68, '');
+ str77.replace(re18, '');
+ ''.replace(re39, '');
+ ''.replace(/^/, '');
+ ''.split(re86);
+ '*'.replace(re39, '');
+ '*'.replace(re68, '');
+ '*'.replace(re18, '');
+ '.pybfr'.replace(re68, '');
+ '.pybfr'.replace(re18, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/fperra/${inyhr}?gf=${abj}'.replace(re87, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/fperra/1024?gf=${abj}'.replace(re88, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/jvafvmr/${inyhr}?gf=${abj}'.replace(re87, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/jvafvmr/992/608?gf=${abj}'.replace(re88, '');
+ '300k120'.replace(re30, '');
+ '300k250'.replace(re30, '');
+ '310k120'.replace(re30, '');
+ '310k170'.replace(re30, '');
+ '310k250'.replace(re30, '');
+ '9.0 e115'.replace(/^.*\.(.*)\s.*$/, '');
+ 'Nppbeqvba'.replace(re2, '');
+ 'Nxghryy\x0a'.replace(re89, '');
+ 'Nxghryy\x0a'.replace(re90, '');
+ 'Nccyvpngvba'.replace(re2, '');
+ 'Oyvpxchaxg\x0a'.replace(re89, '');
+ 'Oyvpxchaxg\x0a'.replace(re90, '');
+ 'Svanamra\x0a'.replace(re89, '');
+ 'Svanamra\x0a'.replace(re90, '');
+ 'Tnzrf\x0a'.replace(re89, '');
+ 'Tnzrf\x0a'.replace(re90, '');
+ 'Ubebfxbc\x0a'.replace(re89, '');
+ 'Ubebfxbc\x0a'.replace(re90, '');
+ 'Xvab\x0a'.replace(re89, '');
+ 'Xvab\x0a'.replace(re90, '');
+ 'Zbqhyrf'.replace(re2, '');
+ 'Zhfvx\x0a'.replace(re89, '');
+ 'Zhfvx\x0a'.replace(re90, '');
+ 'Anpuevpugra\x0a'.replace(re89, '');
+ 'Anpuevpugra\x0a'.replace(re90, '');
+ 'Cuk'.replace(re2, '');
+ 'ErdhrfgSvavfu'.split(re70);
+ 'ErdhrfgSvavfu.NWNK.Cuk'.split(re70);
+ 'Ebhgr\x0a'.replace(re89, '');
+ 'Ebhgr\x0a'.replace(re90, '');
+ str78.split(re32);
+ str79.split(re32);
+ str80.split(re32);
+ str81.split(re32);
+ 'Fcbeg\x0a'.replace(re89, '');
+ 'Fcbeg\x0a'.replace(re90, '');
+ 'GI-Fcbg\x0a'.replace(re89, '');
+ 'GI-Fcbg\x0a'.replace(re90, '');
+ 'Gbhe\x0a'.replace(re89, '');
+ 'Gbhe\x0a'.replace(re90, '');
+ 'Hagreunyghat\x0a'.replace(re89, '');
+ 'Hagreunyghat\x0a'.replace(re90, '');
+ 'Ivqrb\x0a'.replace(re89, '');
+ 'Ivqrb\x0a'.replace(re90, '');
+ 'Jrggre\x0a'.replace(re89, '');
+ 'Jrggre\x0a'.replace(re90, '');
+ str82.replace(re68, '');
+ str82.replace(re18, '');
+ str83.replace(re68, '');
+ str83.replace(re18, '');
+ str84.replace(re68, '');
+ str84.replace(re18, '');
+ 'nqiFreivprObk'.replace(re30, '');
+ 'nqiFubccvatObk'.replace(re30, '');
+ 'nwnk'.replace(re39, '');
+ 'nxghryy'.replace(re40, '');
+ 'nxghryy'.replace(re41, '');
+ 'nxghryy'.replace(re42, '');
+ 'nxghryy'.replace(re43, '');
+ 'nxghryy'.replace(re44, '');
+ 'nxghryy'.replace(re45, '');
+ 'nxghryy'.replace(re46, '');
+ 'nxghryy'.replace(re47, '');
+ 'nxghryy'.replace(re48, '');
+ str85.replace(re40, '');
+ str85.replace(re41, '');
+ str85.replace(re42, '');
+ str85.replace(re43, '');
+ str85.replace(re44, '');
+ str85.replace(re45, '');
+ str85.replace(re46, '');
+ str85.replace(re47, '');
+ str85.replace(re48, '');
+ 'pngrtbel'.replace(re29, '');
+ 'pngrtbel'.replace(re30, '');
+ 'pybfr'.replace(re39, '');
+ 'qvi'.replace(re39, '');
+ str86.replace(re68, '');
+ str86.replace(re18, '');
+ 'qg'.replace(re39, '');
+ 'qg'.replace(re68, '');
+ 'qg'.replace(re18, '');
+ 'rzorq'.replace(re39, '');
+ 'rzorq'.replace(re68, '');
+ 'rzorq'.replace(re18, '');
+ 'svryqOga'.replace(re39, '');
+ 'svryqOgaPnapry'.replace(re39, '');
+ 'svz_zlfcnpr_nccf-pnainf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
+ 'svanamra'.replace(re40, '');
+ 'svanamra'.replace(re41, '');
+ 'svanamra'.replace(re42, '');
+ 'svanamra'.replace(re43, '');
+ 'svanamra'.replace(re44, '');
+ 'svanamra'.replace(re45, '');
+ 'svanamra'.replace(re46, '');
+ 'svanamra'.replace(re47, '');
+ 'svanamra'.replace(re48, '');
+ 'sbphf'.split(re70);
+ 'sbphf.gno sbphfva.gno'.split(re70);
+ 'sbphfva'.split(re70);
+ 'sbez'.replace(re39, '');
+ 'sbez.nwnk'.replace(re68, '');
+ 'sbez.nwnk'.replace(re18, '');
+ 'tnzrf'.replace(re40, '');
+ 'tnzrf'.replace(re41, '');
+ 'tnzrf'.replace(re42, '');
+ 'tnzrf'.replace(re43, '');
+ 'tnzrf'.replace(re44, '');
+ 'tnzrf'.replace(re45, '');
+ 'tnzrf'.replace(re46, '');
+ 'tnzrf'.replace(re47, '');
+ 'tnzrf'.replace(re48, '');
+ 'ubzrcntr'.replace(re30, '');
+ 'ubebfxbc'.replace(re40, '');
+ 'ubebfxbc'.replace(re41, '');
+ 'ubebfxbc'.replace(re42, '');
+ 'ubebfxbc'.replace(re43, '');
+ 'ubebfxbc'.replace(re44, '');
+ 'ubebfxbc'.replace(re45, '');
+ 'ubebfxbc'.replace(re46, '');
+ 'ubebfxbc'.replace(re47, '');
+ 'ubebfxbc'.replace(re48, '');
+ 'uc_cebzbobk_ugzy%2Puc_cebzbobk_vzt'.replace(re30, '');
+ 'uc_erpgnatyr'.replace(re30, '');
+ str87.replace(re33, '');
+ str88.replace(re33, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf${5}'.replace(re72, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/qlaYvo.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/qlaYvo.wf${5}'.replace(re72, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/rssrpgYvo.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/rssrpgYvo.wf${5}'.replace(re72, '');
+ str89.replace(re73, '');
+ 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55023338617756?[NDO]&{1}&{2}&[NDR]'.replace(re69, '');
+ str6.replace(re23, '');
+ 'xvab'.replace(re40, '');
+ 'xvab'.replace(re41, '');
+ 'xvab'.replace(re42, '');
+ 'xvab'.replace(re43, '');
+ 'xvab'.replace(re44, '');
+ 'xvab'.replace(re45, '');
+ 'xvab'.replace(re46, '');
+ 'xvab'.replace(re47, '');
+ 'xvab'.replace(re48, '');
+ 'ybnq'.split(re70);
+ 'zrqvnzbqgno lhv-anifrg lhv-anifrg-gbc'.replace(re18, '');
+ 'zrgn'.replace(re39, '');
+ str90.replace(re68, '');
+ str90.replace(re18, '');
+ 'zbhfrzbir'.split(re70);
+ 'zbhfrzbir.gno'.split(re70);
+ str63.replace(/^.*jroxvg\/(\d+(\.\d+)?).*$/, '');
+ 'zhfvx'.replace(re40, '');
+ 'zhfvx'.replace(re41, '');
+ 'zhfvx'.replace(re42, '');
+ 'zhfvx'.replace(re43, '');
+ 'zhfvx'.replace(re44, '');
+ 'zhfvx'.replace(re45, '');
+ 'zhfvx'.replace(re46, '');
+ 'zhfvx'.replace(re47, '');
+ 'zhfvx'.replace(re48, '');
+ 'zlfcnpr_nccf_pnainf'.replace(re52, '');
+ str91.replace(re40, '');
+ str91.replace(re41, '');
+ str91.replace(re42, '');
+ str91.replace(re43, '');
+ str91.replace(re44, '');
+ str91.replace(re45, '');
+ str91.replace(re46, '');
+ str91.replace(re47, '');
+ str91.replace(re48, '');
+ 'anzr'.replace(re39, '');
+ str92.replace(/\b\w+\b/g, '');
+ 'bow-nppbeqvba'.replace(re39, '');
+ 'bowrpg'.replace(re39, '');
+ 'bowrpg'.replace(re68, '');
+ 'bowrpg'.replace(re18, '');
+ 'cnenzf%2Rfglyrf'.replace(re29, '');
+ 'cnenzf%2Rfglyrf'.replace(re30, '');
+ 'cbchc'.replace(re30, '');
+ 'ebhgr'.replace(re40, '');
+ 'ebhgr'.replace(re41, '');
+ 'ebhgr'.replace(re42, '');
+ 'ebhgr'.replace(re43, '');
+ 'ebhgr'.replace(re44, '');
+ 'ebhgr'.replace(re45, '');
+ 'ebhgr'.replace(re46, '');
+ 'ebhgr'.replace(re47, '');
+ 'ebhgr'.replace(re48, '');
+ 'freivprobk_uc'.replace(re30, '');
+ 'fubccvatobk_uc'.replace(re30, '');
+ 'fubhgobk'.replace(re39, '');
+ 'fcbeg'.replace(re40, '');
+ 'fcbeg'.replace(re41, '');
+ 'fcbeg'.replace(re42, '');
+ 'fcbeg'.replace(re43, '');
+ 'fcbeg'.replace(re44, '');
+ 'fcbeg'.replace(re45, '');
+ 'fcbeg'.replace(re46, '');
+ 'fcbeg'.replace(re47, '');
+ 'fcbeg'.replace(re48, '');
+ 'gbhe'.replace(re40, '');
+ 'gbhe'.replace(re41, '');
+ 'gbhe'.replace(re42, '');
+ 'gbhe'.replace(re43, '');
+ 'gbhe'.replace(re44, '');
+ 'gbhe'.replace(re45, '');
+ 'gbhe'.replace(re46, '');
+ 'gbhe'.replace(re47, '');
+ 'gbhe'.replace(re48, '');
+ 'gi-fcbg'.replace(re40, '');
+ 'gi-fcbg'.replace(re41, '');
+ 'gi-fcbg'.replace(re42, '');
+ 'gi-fcbg'.replace(re43, '');
+ 'gi-fcbg'.replace(re44, '');
+ 'gi-fcbg'.replace(re45, '');
+ 'gi-fcbg'.replace(re46, '');
+ 'gi-fcbg'.replace(re47, '');
+ 'gi-fcbg'.replace(re48, '');
+ 'glcr'.replace(re39, '');
+ 'haqrsvarq'.replace(/\//g, '');
+ str93.replace(re40, '');
+ str93.replace(re41, '');
+ str93.replace(re42, '');
+ str93.replace(re43, '');
+ str93.replace(re44, '');
+ str93.replace(re45, '');
+ str93.replace(re46, '');
+ str93.replace(re47, '');
+ str93.replace(re48, '');
+ 'ivqrb'.replace(re40, '');
+ 'ivqrb'.replace(re41, '');
+ 'ivqrb'.replace(re42, '');
+ 'ivqrb'.replace(re43, '');
+ 'ivqrb'.replace(re44, '');
+ 'ivqrb'.replace(re45, '');
+ 'ivqrb'.replace(re46, '');
+ 'ivqrb'.replace(re47, '');
+ 'ivqrb'.replace(re48, '');
+ 'ivfvgf=1'.split(re86);
+ 'jrggre'.replace(re40, '');
+ 'jrggre'.replace(re41, '');
+ 'jrggre'.replace(re42, '');
+ 'jrggre'.replace(re43, '');
+ 'jrggre'.replace(re44, '');
+ 'jrggre'.replace(re45, '');
+ 'jrggre'.replace(re46, '');
+ 'jrggre'.replace(re47, '');
+ 'jrggre'.replace(re48, '');
+ /#[a-z0-9]+$/i.exec('uggc://jjj.fpuhryreim.arg/Qrsnhyg');
+ re66.exec('fryrpgrq');
+ /(?:^|\s+)lhv-ani(?:\s+|$)/.exec('sff lhv-ani');
+ /(?:^|\s+)lhv-anifrg(?:\s+|$)/.exec('zrqvnzbqgno lhv-anifrg');
+ /(?:^|\s+)lhv-anifrg-gbc(?:\s+|$)/.exec('zrqvnzbqgno lhv-anifrg');
+ re91.exec('GnoThvq');
+ re91.exec('thvq');
+ /(pbzcngvoyr|jroxvg)/.exec(str63);
+ /.+(?:ei|vg|en|vr)[\/: ]([\d.]+)/.exec(str63);
+ re8.exec('144631658.0.10.1231365869');
+ re8.exec('144631658.0.10.1231367054');
+ re8.exec('144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.1670816052019209000.1231365869.1231365869.1231365869.1');
+ re8.exec('144631658.1796080716621419500.1231367054.1231367054.1231367054.1');
+ re8.exec(str94);
+ re8.exec(str95);
+ re8.exec(str96);
+ re8.exec(str97);
+ re8.exec('__hgzn=144631658.1670816052019209000.1231365869.1231365869.1231365869.1');
+ re8.exec('__hgzn=144631658.1796080716621419500.1231367054.1231367054.1231367054.1');
+ re8.exec('__hgzo=144631658.0.10.1231365869');
+ re8.exec('__hgzo=144631658.0.10.1231367054');
+ re8.exec('__hgzm=144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('__hgzm=144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str78);
+ re34.exec(str79);
+ re34.exec(str81);
+ re74.exec(str77);
+ re74.exec('*');
+ re74.exec(str82);
+ re74.exec(str83);
+ re74.exec(str86);
+ re74.exec('rzorq');
+ re74.exec('sbez.nwnk');
+ re74.exec(str90);
+ re74.exec('bowrpg');
+ /\/onfr.wf(\?.+)?$/.exec('/uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf');
+ re28.exec('uvag ynfgUvag ynfg');
+ re75.exec('');
+ re76.exec('');
+ re77.exec('');
+ re78.exec('');
+ re80.exec(str77);
+ re80.exec('*');
+ re80.exec('.pybfr');
+ re80.exec(str82);
+ re80.exec(str83);
+ re80.exec(str84);
+ re80.exec(str86);
+ re80.exec('qg');
+ re80.exec('rzorq');
+ re80.exec('sbez.nwnk');
+ re80.exec(str90);
+ re80.exec('bowrpg');
+ re61.exec('qlaYvo.wf');
+ re61.exec('rssrpgYvo.wf');
+ re61.exec('uggc://jjj.tzk.arg/qr/?fgnghf=uvajrvf');
+ re92.exec(' .pybfr');
+ re92.exec(' n.svryqOgaPnapry');
+ re92.exec(' qg');
+ re92.exec(str48);
+ re92.exec('.nwnk');
+ re92.exec('.svryqOga,n.svryqOgaPnapry');
+ re92.exec('.svryqOgaPnapry');
+ re92.exec('.bow-nppbeqvba qg');
+ re68.exec(str77);
+ re68.exec('*');
+ re68.exec('.pybfr');
+ re68.exec(str82);
+ re68.exec(str83);
+ re68.exec(str84);
+ re68.exec(str86);
+ re68.exec('qg');
+ re68.exec('rzorq');
+ re68.exec('sbez.nwnk');
+ re68.exec(str90);
+ re68.exec('bowrpg');
+ re93.exec(' .pybfr');
+ re93.exec(' n.svryqOgaPnapry');
+ re93.exec(' qg');
+ re93.exec(str48);
+ re93.exec('.nwnk');
+ re93.exec('.svryqOga,n.svryqOgaPnapry');
+ re93.exec('.svryqOgaPnapry');
+ re93.exec('.bow-nppbeqvba qg');
+ re81.exec(str77);
+ re81.exec('*');
+ re81.exec(str48);
+ re81.exec('.pybfr');
+ re81.exec(str82);
+ re81.exec(str83);
+ re81.exec(str84);
+ re81.exec(str86);
+ re81.exec('qg');
+ re81.exec('rzorq');
+ re81.exec('sbez.nwnk');
+ re81.exec(str90);
+ re81.exec('bowrpg');
+ re94.exec(' .pybfr');
+ re94.exec(' n.svryqOgaPnapry');
+ re94.exec(' qg');
+ re94.exec(str48);
+ re94.exec('.nwnk');
+ re94.exec('.svryqOga,n.svryqOgaPnapry');
+ re94.exec('.svryqOgaPnapry');
+ re94.exec('.bow-nppbeqvba qg');
+ re94.exec('[anzr=nwnkHey]');
+ re94.exec(str82);
+ re31.exec('rf');
+ re31.exec('wn');
+ re82.exec(str77);
+ re82.exec('*');
+ re82.exec(str48);
+ re82.exec('.pybfr');
+ re82.exec(str82);
+ re82.exec(str83);
+ re82.exec(str84);
+ re82.exec(str86);
+ re82.exec('qg');
+ re82.exec('rzorq');
+ re82.exec('sbez.nwnk');
+ re82.exec(str90);
+ re82.exec('bowrpg');
+ re83.exec(str98);
+ re83.exec('shapgvba sbphf() { [angvir pbqr] }');
+ re62.exec('#Ybtva');
+ re62.exec('#Ybtva_cnffjbeq');
+ re62.exec(str77);
+ re62.exec('#fubhgobkWf');
+ re62.exec('#fubhgobkWfReebe');
+ re62.exec('#fubhgobkWfFhpprff');
+ re62.exec('*');
+ re62.exec(str82);
+ re62.exec(str83);
+ re62.exec(str86);
+ re62.exec('rzorq');
+ re62.exec('sbez.nwnk');
+ re62.exec(str90);
+ re62.exec('bowrpg');
+ re49.exec('pbagrag');
+ re24.exec(str6);
+ /xbadhrebe/.exec(str63);
+ /znp/.exec('jva32');
+ /zbmvyyn/.exec(str63);
+ /zfvr/.exec(str63);
+ /ag\s5\.1/.exec(str63);
+ /bcren/.exec(str63);
+ /fnsnev/.exec(str63);
+ /jva/.exec('jva32');
+ /jvaqbjf/.exec(str63);
+ }
+ }
+ for (var i = 0; i < 5; i++) {
+ runBlock0();
+ runBlock1();
+ runBlock2();
+ runBlock3();
+ runBlock4();
+ runBlock5();
+ runBlock6();
+ runBlock7();
+ runBlock8();
+ runBlock9();
+ runBlock10();
+ runBlock11();
+ }
+}
+
+for (var i = 0; i < 3; ++i)
+ runRegExpBenchmark();
diff --git a/SunSpider/tests/v8-v5/v8-richards.js b/SunSpider/tests/v8-v5/v8-richards.js
new file mode 100644
index 0000000..b1a50ea
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-richards.js
@@ -0,0 +1,537 @@
+// Copyright 2006-2008 the V8 project authors. 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 is a JavaScript implementation of the Richards
+// benchmark from:
+//
+// http://www.cl.cam.ac.uk/~mr10/Bench.html
+//
+// The benchmark was originally implemented in BCPL by
+// Martin Richards.
+
+
+/**
+ * The Richards benchmark simulates the task dispatcher of an
+ * operating system.
+ **/
+function runRichards() {
+ var scheduler = new Scheduler();
+ scheduler.addIdleTask(ID_IDLE, 0, null, COUNT);
+
+ var queue = new Packet(null, ID_WORKER, KIND_WORK);
+ queue = new Packet(queue, ID_WORKER, KIND_WORK);
+ scheduler.addWorkerTask(ID_WORKER, 1000, queue);
+
+ queue = new Packet(null, ID_DEVICE_A, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE);
+ scheduler.addHandlerTask(ID_HANDLER_A, 2000, queue);
+
+ queue = new Packet(null, ID_DEVICE_B, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE);
+ scheduler.addHandlerTask(ID_HANDLER_B, 3000, queue);
+
+ scheduler.addDeviceTask(ID_DEVICE_A, 4000, null);
+
+ scheduler.addDeviceTask(ID_DEVICE_B, 5000, null);
+
+ scheduler.schedule();
+
+ if (scheduler.queueCount != EXPECTED_QUEUE_COUNT ||
+ scheduler.holdCount != EXPECTED_HOLD_COUNT) {
+ var msg =
+ "Error during execution: queueCount = " + scheduler.queueCount +
+ ", holdCount = " + scheduler.holdCount + ".";
+ throw new Error(msg);
+ }
+}
+
+var COUNT = 1000;
+
+/**
+ * These two constants specify how many times a packet is queued and
+ * how many times a task is put on hold in a correct run of richards.
+ * They don't have any meaning a such but are characteristic of a
+ * correct run so if the actual queue or hold count is different from
+ * the expected there must be a bug in the implementation.
+ **/
+var EXPECTED_QUEUE_COUNT = 2322;
+var EXPECTED_HOLD_COUNT = 928;
+
+
+/**
+ * A scheduler can be used to schedule a set of tasks based on their relative
+ * priorities. Scheduling is done by maintaining a list of task control blocks
+ * which holds tasks and the data queue they are processing.
+ * @constructor
+ */
+function Scheduler() {
+ this.queueCount = 0;
+ this.holdCount = 0;
+ this.blocks = new Array(NUMBER_OF_IDS);
+ this.list = null;
+ this.currentTcb = null;
+ this.currentId = null;
+}
+
+var ID_IDLE = 0;
+var ID_WORKER = 1;
+var ID_HANDLER_A = 2;
+var ID_HANDLER_B = 3;
+var ID_DEVICE_A = 4;
+var ID_DEVICE_B = 5;
+var NUMBER_OF_IDS = 6;
+
+var KIND_DEVICE = 0;
+var KIND_WORK = 1;
+
+/**
+ * Add an idle task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ * @param {int} count the number of times to schedule the task
+ */
+Scheduler.prototype.addIdleTask = function (id, priority, queue, count) {
+ this.addRunningTask(id, priority, queue, new IdleTask(this, 1, count));
+};
+
+/**
+ * Add a work task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ */
+Scheduler.prototype.addWorkerTask = function (id, priority, queue) {
+ this.addTask(id, priority, queue, new WorkerTask(this, ID_HANDLER_A, 0));
+};
+
+/**
+ * Add a handler task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ */
+Scheduler.prototype.addHandlerTask = function (id, priority, queue) {
+ this.addTask(id, priority, queue, new HandlerTask(this));
+};
+
+/**
+ * Add a handler task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ */
+Scheduler.prototype.addDeviceTask = function (id, priority, queue) {
+ this.addTask(id, priority, queue, new DeviceTask(this))
+};
+
+/**
+ * Add the specified task and mark it as running.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ * @param {Task} task the task to add
+ */
+Scheduler.prototype.addRunningTask = function (id, priority, queue, task) {
+ this.addTask(id, priority, queue, task);
+ this.currentTcb.setRunning();
+};
+
+/**
+ * Add the specified task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ * @param {Task} task the task to add
+ */
+Scheduler.prototype.addTask = function (id, priority, queue, task) {
+ this.currentTcb = new TaskControlBlock(this.list, id, priority, queue, task);
+ this.list = this.currentTcb;
+ this.blocks[id] = this.currentTcb;
+};
+
+/**
+ * Execute the tasks managed by this scheduler.
+ */
+Scheduler.prototype.schedule = function () {
+ this.currentTcb = this.list;
+ while (this.currentTcb != null) {
+ if (this.currentTcb.isHeldOrSuspended()) {
+ this.currentTcb = this.currentTcb.link;
+ } else {
+ this.currentId = this.currentTcb.id;
+ this.currentTcb = this.currentTcb.run();
+ }
+ }
+};
+
+/**
+ * Release a task that is currently blocked and return the next block to run.
+ * @param {int} id the id of the task to suspend
+ */
+Scheduler.prototype.release = function (id) {
+ var tcb = this.blocks[id];
+ if (tcb == null) return tcb;
+ tcb.markAsNotHeld();
+ if (tcb.priority > this.currentTcb.priority) {
+ return tcb;
+ } else {
+ return this.currentTcb;
+ }
+};
+
+/**
+ * Block the currently executing task and return the next task control block
+ * to run. The blocked task will not be made runnable until it is explicitly
+ * released, even if new work is added to it.
+ */
+Scheduler.prototype.holdCurrent = function () {
+ this.holdCount++;
+ this.currentTcb.markAsHeld();
+ return this.currentTcb.link;
+};
+
+/**
+ * Suspend the currently executing task and return the next task control block
+ * to run. If new work is added to the suspended task it will be made runnable.
+ */
+Scheduler.prototype.suspendCurrent = function () {
+ this.currentTcb.markAsSuspended();
+ return this.currentTcb;
+};
+
+/**
+ * Add the specified packet to the end of the worklist used by the task
+ * associated with the packet and make the task runnable if it is currently
+ * suspended.
+ * @param {Packet} packet the packet to add
+ */
+Scheduler.prototype.queue = function (packet) {
+ var t = this.blocks[packet.id];
+ if (t == null) return t;
+ this.queueCount++;
+ packet.link = null;
+ packet.id = this.currentId;
+ return t.checkPriorityAdd(this.currentTcb, packet);
+};
+
+/**
+ * A task control block manages a task and the queue of work packages associated
+ * with it.
+ * @param {TaskControlBlock} link the preceding block in the linked block list
+ * @param {int} id the id of this block
+ * @param {int} priority the priority of this block
+ * @param {Packet} queue the queue of packages to be processed by the task
+ * @param {Task} task the task
+ * @constructor
+ */
+function TaskControlBlock(link, id, priority, queue, task) {
+ this.link = link;
+ this.id = id;
+ this.priority = priority;
+ this.queue = queue;
+ this.task = task;
+ if (queue == null) {
+ this.state = STATE_SUSPENDED;
+ } else {
+ this.state = STATE_SUSPENDED_RUNNABLE;
+ }
+}
+
+/**
+ * The task is running and is currently scheduled.
+ */
+var STATE_RUNNING = 0;
+
+/**
+ * The task has packets left to process.
+ */
+var STATE_RUNNABLE = 1;
+
+/**
+ * The task is not currently running. The task is not blocked as such and may
+* be started by the scheduler.
+ */
+var STATE_SUSPENDED = 2;
+
+/**
+ * The task is blocked and cannot be run until it is explicitly released.
+ */
+var STATE_HELD = 4;
+
+var STATE_SUSPENDED_RUNNABLE = STATE_SUSPENDED | STATE_RUNNABLE;
+var STATE_NOT_HELD = ~STATE_HELD;
+
+TaskControlBlock.prototype.setRunning = function () {
+ this.state = STATE_RUNNING;
+};
+
+TaskControlBlock.prototype.markAsNotHeld = function () {
+ this.state = this.state & STATE_NOT_HELD;
+};
+
+TaskControlBlock.prototype.markAsHeld = function () {
+ this.state = this.state | STATE_HELD;
+};
+
+TaskControlBlock.prototype.isHeldOrSuspended = function () {
+ return (this.state & STATE_HELD) != 0 || (this.state == STATE_SUSPENDED);
+};
+
+TaskControlBlock.prototype.markAsSuspended = function () {
+ this.state = this.state | STATE_SUSPENDED;
+};
+
+TaskControlBlock.prototype.markAsRunnable = function () {
+ this.state = this.state | STATE_RUNNABLE;
+};
+
+/**
+ * Runs this task, if it is ready to be run, and returns the next task to run.
+ */
+TaskControlBlock.prototype.run = function () {
+ var packet;
+ if (this.state == STATE_SUSPENDED_RUNNABLE) {
+ packet = this.queue;
+ this.queue = packet.link;
+ if (this.queue == null) {
+ this.state = STATE_RUNNING;
+ } else {
+ this.state = STATE_RUNNABLE;
+ }
+ } else {
+ packet = null;
+ }
+ return this.task.run(packet);
+};
+
+/**
+ * Adds a packet to the worklist of this block's task, marks this as runnable if
+ * necessary, and returns the next runnable object to run (the one
+ * with the highest priority).
+ */
+TaskControlBlock.prototype.checkPriorityAdd = function (task, packet) {
+ if (this.queue == null) {
+ this.queue = packet;
+ this.markAsRunnable();
+ if (this.priority > task.priority) return this;
+ } else {
+ this.queue = packet.addTo(this.queue);
+ }
+ return task;
+};
+
+TaskControlBlock.prototype.toString = function () {
+ return "tcb { " + this.task + "@" + this.state + " }";
+};
+
+/**
+ * An idle task doesn't do any work itself but cycles control between the two
+ * device tasks.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @param {int} v1 a seed value that controls how the device tasks are scheduled
+ * @param {int} count the number of times this task should be scheduled
+ * @constructor
+ */
+function IdleTask(scheduler, v1, count) {
+ this.scheduler = scheduler;
+ this.v1 = v1;
+ this.count = count;
+}
+
+IdleTask.prototype.run = function (packet) {
+ this.count--;
+ if (this.count == 0) return this.scheduler.holdCurrent();
+ if ((this.v1 & 1) == 0) {
+ this.v1 = this.v1 >> 1;
+ return this.scheduler.release(ID_DEVICE_A);
+ } else {
+ this.v1 = (this.v1 >> 1) ^ 0xD008;
+ return this.scheduler.release(ID_DEVICE_B);
+ }
+};
+
+IdleTask.prototype.toString = function () {
+ return "IdleTask"
+};
+
+/**
+ * A task that suspends itself after each time it has been run to simulate
+ * waiting for data from an external device.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @constructor
+ */
+function DeviceTask(scheduler) {
+ this.scheduler = scheduler;
+ this.v1 = null;
+}
+
+DeviceTask.prototype.run = function (packet) {
+ if (packet == null) {
+ if (this.v1 == null) return this.scheduler.suspendCurrent();
+ var v = this.v1;
+ this.v1 = null;
+ return this.scheduler.queue(v);
+ } else {
+ this.v1 = packet;
+ return this.scheduler.holdCurrent();
+ }
+};
+
+DeviceTask.prototype.toString = function () {
+ return "DeviceTask";
+};
+
+/**
+ * A task that manipulates work packets.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @param {int} v1 a seed used to specify how work packets are manipulated
+ * @param {int} v2 another seed used to specify how work packets are manipulated
+ * @constructor
+ */
+function WorkerTask(scheduler, v1, v2) {
+ this.scheduler = scheduler;
+ this.v1 = v1;
+ this.v2 = v2;
+}
+
+WorkerTask.prototype.run = function (packet) {
+ if (packet == null) {
+ return this.scheduler.suspendCurrent();
+ } else {
+ if (this.v1 == ID_HANDLER_A) {
+ this.v1 = ID_HANDLER_B;
+ } else {
+ this.v1 = ID_HANDLER_A;
+ }
+ packet.id = this.v1;
+ packet.a1 = 0;
+ for (var i = 0; i < DATA_SIZE; i++) {
+ this.v2++;
+ if (this.v2 > 26) this.v2 = 1;
+ packet.a2[i] = this.v2;
+ }
+ return this.scheduler.queue(packet);
+ }
+};
+
+WorkerTask.prototype.toString = function () {
+ return "WorkerTask";
+};
+
+/**
+ * A task that manipulates work packets and then suspends itself.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @constructor
+ */
+function HandlerTask(scheduler) {
+ this.scheduler = scheduler;
+ this.v1 = null;
+ this.v2 = null;
+}
+
+HandlerTask.prototype.run = function (packet) {
+ if (packet != null) {
+ if (packet.kind == KIND_WORK) {
+ this.v1 = packet.addTo(this.v1);
+ } else {
+ this.v2 = packet.addTo(this.v2);
+ }
+ }
+ if (this.v1 != null) {
+ var count = this.v1.a1;
+ var v;
+ if (count < DATA_SIZE) {
+ if (this.v2 != null) {
+ v = this.v2;
+ this.v2 = this.v2.link;
+ v.a1 = this.v1.a2[count];
+ this.v1.a1 = count + 1;
+ return this.scheduler.queue(v);
+ }
+ } else {
+ v = this.v1;
+ this.v1 = this.v1.link;
+ return this.scheduler.queue(v);
+ }
+ }
+ return this.scheduler.suspendCurrent();
+};
+
+HandlerTask.prototype.toString = function () {
+ return "HandlerTask";
+};
+
+/* --- *
+ * P a c k e t
+ * --- */
+
+var DATA_SIZE = 4;
+
+/**
+ * A simple package of data that is manipulated by the tasks. The exact layout
+ * of the payload data carried by a packet is not importaint, and neither is the
+ * nature of the work performed on packets by the tasks.
+ *
+ * Besides carrying data, packets form linked lists and are hence used both as
+ * data and worklists.
+ * @param {Packet} link the tail of the linked list of packets
+ * @param {int} id an ID for this packet
+ * @param {int} kind the type of this packet
+ * @constructor
+ */
+function Packet(link, id, kind) {
+ this.link = link;
+ this.id = id;
+ this.kind = kind;
+ this.a1 = 0;
+ this.a2 = new Array(DATA_SIZE);
+}
+
+/**
+ * Add this packet to the end of a worklist, and return the worklist.
+ * @param {Packet} queue the worklist to add this packet to
+ */
+Packet.prototype.addTo = function (queue) {
+ this.link = null;
+ if (queue == null) return this;
+ var peek, next = queue;
+ while ((peek = next.link) != null)
+ next = peek;
+ next.link = this;
+ return queue;
+};
+
+Packet.prototype.toString = function () {
+ return "Packet";
+};
+
+for (var i = 0; i < 350; ++i)
+ runRichards();
diff --git a/SunSpider/tests/v8-v5/v8-splay.js b/SunSpider/tests/v8-v5/v8-splay.js
new file mode 100644
index 0000000..abdbbde
--- /dev/null
+++ b/SunSpider/tests/v8-v5/v8-splay.js
@@ -0,0 +1,377 @@
+// Copyright 2009 the V8 project authors. 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 benchmark is based on a JavaScript log processing module used
+// by the V8 profiler to generate execution time profiles for runs of
+// JavaScript applications, and it effectively measures how fast the
+// JavaScript engine is at allocating nodes and reclaiming the memory
+// used for old nodes. Because of the way splay trees work, the engine
+// also has to deal with a lot of changes to the large tree object
+// graph.
+
+// Configuration.
+var kSplayTreeSize = 8000;
+var kSplayTreeModifications = 80;
+var kSplayTreePayloadDepth = 5;
+
+var splayTree = null;
+
+
+function GeneratePayloadTree(depth, key) {
+ if (depth == 0) {
+ return {
+ array : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
+ string : 'String for key ' + key + ' in leaf node'
+ };
+ } else {
+ return {
+ left: GeneratePayloadTree(depth - 1, key),
+ right: GeneratePayloadTree(depth - 1, key)
+ };
+ }
+}
+
+
+function GenerateKey() {
+ // The benchmark framework guarantees that Math.random is
+ // deterministic; see base.js.
+ return Math.random();
+}
+
+
+function InsertNewNode() {
+ // Insert new node with a unique key.
+ var key;
+ do {
+ key = GenerateKey();
+ } while (splayTree.find(key) != null);
+ splayTree.insert(key, GeneratePayloadTree(kSplayTreePayloadDepth, key));
+ return key;
+}
+
+
+
+function SplaySetup() {
+ splayTree = new SplayTree();
+ for (var i = 0; i < kSplayTreeSize; i++) InsertNewNode();
+}
+
+
+function SplayTearDown() {
+ // Allow the garbage collector to reclaim the memory
+ // used by the splay tree no matter how we exit the
+ // tear down function.
+ var keys = splayTree.exportKeys();
+ splayTree = null;
+
+ // Verify that the splay tree has the right size.
+ var length = keys.length;
+ if (length != kSplayTreeSize) {
+ throw new Error("Splay tree has wrong size");
+ }
+
+ // Verify that the splay tree has sorted, unique keys.
+ for (var i = 0; i < length - 1; i++) {
+ if (keys[i] >= keys[i + 1]) {
+ throw new Error("Splay tree not sorted");
+ }
+ }
+}
+
+
+function SplayRun() {
+ // Replace a few nodes in the splay tree.
+ for (var i = 0; i < kSplayTreeModifications; i++) {
+ var key = InsertNewNode();
+ var greatest = splayTree.findGreatestLessThan(key);
+ if (greatest == null) splayTree.remove(key);
+ else splayTree.remove(greatest.key);
+ }
+}
+
+
+/**
+ * Constructs a Splay tree. A splay tree is a self-balancing binary
+ * search tree with the additional property that recently accessed
+ * elements are quick to access again. It performs basic operations
+ * such as insertion, look-up and removal in O(log(n)) amortized time.
+ *
+ * @constructor
+ */
+function SplayTree() {
+};
+
+
+/**
+ * Pointer to the root node of the tree.
+ *
+ * @type {SplayTree.Node}
+ * @private
+ */
+SplayTree.prototype.root_ = null;
+
+
+/**
+ * @return {boolean} Whether the tree is empty.
+ */
+SplayTree.prototype.isEmpty = function() {
+ return !this.root_;
+};
+
+
+/**
+ * Inserts a node into the tree with the specified key and value if
+ * the tree does not already contain a node with the specified key. If
+ * the value is inserted, it becomes the root of the tree.
+ *
+ * @param {number} key Key to insert into the tree.
+ * @param {*} value Value to insert into the tree.
+ */
+SplayTree.prototype.insert = function(key, value) {
+ if (this.isEmpty()) {
+ this.root_ = new SplayTree.Node(key, value);
+ return;
+ }
+ // Splay on the key to move the last node on the search path for
+ // the key to the root of the tree.
+ this.splay_(key);
+ if (this.root_.key == key) {
+ return;
+ }
+ var node = new SplayTree.Node(key, value);
+ if (key > this.root_.key) {
+ node.left = this.root_;
+ node.right = this.root_.right;
+ this.root_.right = null;
+ } else {
+ node.right = this.root_;
+ node.left = this.root_.left;
+ this.root_.left = null;
+ }
+ this.root_ = node;
+};
+
+
+/**
+ * Removes a node with the specified key from the tree if the tree
+ * contains a node with this key. The removed node is returned. If the
+ * key is not found, an exception is thrown.
+ *
+ * @param {number} key Key to find and remove from the tree.
+ * @return {SplayTree.Node} The removed node.
+ */
+SplayTree.prototype.remove = function(key) {
+ if (this.isEmpty()) {
+ throw Error('Key not found: ' + key);
+ }
+ this.splay_(key);
+ if (this.root_.key != key) {
+ throw Error('Key not found: ' + key);
+ }
+ var removed = this.root_;
+ if (!this.root_.left) {
+ this.root_ = this.root_.right;
+ } else {
+ var right = this.root_.right;
+ this.root_ = this.root_.left;
+ // Splay to make sure that the new root has an empty right child.
+ this.splay_(key);
+ // Insert the original right child as the right child of the new
+ // root.
+ this.root_.right = right;
+ }
+ return removed;
+};
+
+
+/**
+ * Returns the node having the specified key or null if the tree doesn't contain
+ * a node with the specified key.
+ *
+ * @param {number} key Key to find in the tree.
+ * @return {SplayTree.Node} Node having the specified key.
+ */
+SplayTree.prototype.find = function(key) {
+ if (this.isEmpty()) {
+ return null;
+ }
+ this.splay_(key);
+ return this.root_.key == key ? this.root_ : null;
+};
+
+
+/**
+ * @return {SplayTree.Node} Node having the maximum key value that
+ * is less or equal to the specified key value.
+ */
+SplayTree.prototype.findGreatestLessThan = function(key) {
+ if (this.isEmpty()) {
+ return null;
+ }
+ // Splay on the key to move the node with the given key or the last
+ // node on the search path to the top of the tree.
+ this.splay_(key);
+ // Now the result is either the root node or the greatest node in
+ // the left subtree.
+ if (this.root_.key <= key) {
+ return this.root_;
+ } else if (this.root_.left) {
+ return this.findMax(this.root_.left);
+ } else {
+ return null;
+ }
+};
+
+
+/**
+ * @return {Array<*>} An array containing all the keys of tree's nodes.
+ */
+SplayTree.prototype.exportKeys = function() {
+ var result = [];
+ if (!this.isEmpty()) {
+ this.root_.traverse_(function(node) { result.push(node.key); });
+ }
+ return result;
+};
+
+
+/**
+ * Perform the splay operation for the given key. Moves the node with
+ * the given key to the top of the tree. If no node has the given
+ * key, the last node on the search path is moved to the top of the
+ * tree. This is the simplified top-down splaying algorithm from:
+ * "Self-adjusting Binary Search Trees" by Sleator and Tarjan
+ *
+ * @param {number} key Key to splay the tree on.
+ * @private
+ */
+SplayTree.prototype.splay_ = function(key) {
+ if (this.isEmpty()) {
+ return;
+ }
+ // Create a dummy node. The use of the dummy node is a bit
+ // counter-intuitive: The right child of the dummy node will hold
+ // the L tree of the algorithm. The left child of the dummy node
+ // will hold the R tree of the algorithm. Using a dummy node, left
+ // and right will always be nodes and we avoid special cases.
+ var dummy, left, right;
+ dummy = left = right = new SplayTree.Node(null, null);
+ var current = this.root_;
+ while (true) {
+ if (key < current.key) {
+ if (!current.left) {
+ break;
+ }
+ if (key < current.left.key) {
+ // Rotate right.
+ var tmp = current.left;
+ current.left = tmp.right;
+ tmp.right = current;
+ current = tmp;
+ if (!current.left) {
+ break;
+ }
+ }
+ // Link right.
+ right.left = current;
+ right = current;
+ current = current.left;
+ } else if (key > current.key) {
+ if (!current.right) {
+ break;
+ }
+ if (key > current.right.key) {
+ // Rotate left.
+ var tmp = current.right;
+ current.right = tmp.left;
+ tmp.left = current;
+ current = tmp;
+ if (!current.right) {
+ break;
+ }
+ }
+ // Link left.
+ left.right = current;
+ left = current;
+ current = current.right;
+ } else {
+ break;
+ }
+ }
+ // Assemble.
+ left.right = current.left;
+ right.left = current.right;
+ current.left = dummy.right;
+ current.right = dummy.left;
+ this.root_ = current;
+};
+
+
+/**
+ * Constructs a Splay tree node.
+ *
+ * @param {number} key Key.
+ * @param {*} value Value.
+ */
+SplayTree.Node = function(key, value) {
+ this.key = key;
+ this.value = value;
+};
+
+
+/**
+ * @type {SplayTree.Node}
+ */
+SplayTree.Node.prototype.left = null;
+
+
+/**
+ * @type {SplayTree.Node}
+ */
+SplayTree.Node.prototype.right = null;
+
+
+/**
+ * Performs an ordered traversal of the subtree starting at
+ * this SplayTree.Node.
+ *
+ * @param {function(SplayTree.Node)} f Visitor function.
+ * @private
+ */
+SplayTree.Node.prototype.traverse_ = function(f) {
+ var current = this;
+ while (current) {
+ var left = current.left;
+ if (left) left.traverse_(f);
+ f(current);
+ current = current.right;
+ }
+};
+
+SplaySetup();
+SplayRun();
+SplayTearDown();
diff --git a/SunSpider/tests/v8-v6/LIST b/SunSpider/tests/v8-v6/LIST
new file mode 100644
index 0000000..117011b
--- /dev/null
+++ b/SunSpider/tests/v8-v6/LIST
@@ -0,0 +1,7 @@
+v8-crypto
+v8-deltablue
+v8-earley-boyer
+v8-raytrace
+v8-regexp
+v8-richards
+v8-splay
diff --git a/SunSpider/tests/v8-v6/v8-crypto.js b/SunSpider/tests/v8-v6/v8-crypto.js
new file mode 100644
index 0000000..98e171d
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-crypto.js
@@ -0,0 +1,1695 @@
+/*
+ * Copyright (c) 2003-2005 Tom Wu
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
+ * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * In addition, the following condition applies:
+ *
+ * All redistributions must retain an intact copy of this copyright notice
+ * and disclaimer.
+ */
+
+// Basic JavaScript BN library - subset useful for RSA encryption.
+
+// Bits per digit
+var dbits;
+var BI_DB;
+var BI_DM;
+var BI_DV;
+
+var BI_FP;
+var BI_FV;
+var BI_F1;
+var BI_F2;
+
+// JavaScript engine analysis
+var canary = 0xdeadbeefcafe;
+var j_lm = ((canary&0xffffff)==0xefcafe);
+
+// (public) Constructor
+function BigInteger(a,b,c) {
+ this.array = new Array();
+ if(a != null)
+ if("number" == typeof a) this.fromNumber(a,b,c);
+ else if(b == null && "string" != typeof a) this.fromString(a,256);
+ else this.fromString(a,b);
+}
+
+// return new, unset BigInteger
+function nbi() { return new BigInteger(null); }
+
+// am: Compute w_j += (x*this_i), propagate carries,
+// c is initial carry, returns final carry.
+// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
+// We need to select the fastest one that works in this environment.
+
+// am1: use a single mult and divide to get the high bits,
+// max digit bits should be 26 because
+// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
+function am1(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+ while(--n >= 0) {
+ var v = x*this_array[i++]+w_array[j]+c;
+ c = Math.floor(v/0x4000000);
+ w_array[j++] = v&0x3ffffff;
+ }
+ return c;
+}
+
+// am2 avoids a big mult-and-extract completely.
+// Max digit bits should be <= 30 because we do bitwise ops
+// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
+function am2(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+ var xl = x&0x7fff, xh = x>>15;
+ while(--n >= 0) {
+ var l = this_array[i]&0x7fff;
+ var h = this_array[i++]>>15;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x7fff)<<15)+w_array[j]+(c&0x3fffffff);
+ c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
+ w_array[j++] = l&0x3fffffff;
+ }
+ return c;
+}
+
+// Alternately, set max digit bits to 28 since some
+// browsers slow down when dealing with 32-bit numbers.
+function am3(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+
+ var xl = x&0x3fff, xh = x>>14;
+ while(--n >= 0) {
+ var l = this_array[i]&0x3fff;
+ var h = this_array[i++]>>14;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x3fff)<<14)+w_array[j]+c;
+ c = (l>>28)+(m>>14)+xh*h;
+ w_array[j++] = l&0xfffffff;
+ }
+ return c;
+}
+
+// This is tailored to VMs with 2-bit tagging. It makes sure
+// that all the computations stay within the 29 bits available.
+function am4(i,x,w,j,c,n) {
+ var this_array = this.array;
+ var w_array = w.array;
+
+ var xl = x&0x1fff, xh = x>>13;
+ while(--n >= 0) {
+ var l = this_array[i]&0x1fff;
+ var h = this_array[i++]>>13;
+ var m = xh*l+h*xl;
+ l = xl*l+((m&0x1fff)<<13)+w_array[j]+c;
+ c = (l>>26)+(m>>13)+xh*h;
+ w_array[j++] = l&0x3ffffff;
+ }
+ return c;
+}
+
+// am3/28 is best for SM, Rhino, but am4/26 is best for v8.
+// Kestrel (Opera 9.5) gets its best result with am4/26.
+// IE7 does 9% better with am3/28 than with am4/26.
+// Firefox (SM) gets 10% faster with am3/28 than with am4/26.
+
+setupEngine = function(fn, bits) {
+ BigInteger.prototype.am = fn;
+ dbits = bits;
+
+ BI_DB = dbits;
+ BI_DM = ((1<<dbits)-1);
+ BI_DV = (1<<dbits);
+
+ BI_FP = 52;
+ BI_FV = Math.pow(2,BI_FP);
+ BI_F1 = BI_FP-dbits;
+ BI_F2 = 2*dbits-BI_FP;
+}
+
+
+// Digit conversions
+var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
+var BI_RC = new Array();
+var rr,vv;
+rr = "0".charCodeAt(0);
+for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
+rr = "a".charCodeAt(0);
+for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
+rr = "A".charCodeAt(0);
+for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
+
+function int2char(n) { return BI_RM.charAt(n); }
+function intAt(s,i) {
+ var c = BI_RC[s.charCodeAt(i)];
+ return (c==null)?-1:c;
+}
+
+// (protected) copy this to r
+function bnpCopyTo(r) {
+ var this_array = this.array;
+ var r_array = r.array;
+
+ for(var i = this.t-1; i >= 0; --i) r_array[i] = this_array[i];
+ r.t = this.t;
+ r.s = this.s;
+}
+
+// (protected) set from integer value x, -DV <= x < DV
+function bnpFromInt(x) {
+ var this_array = this.array;
+ this.t = 1;
+ this.s = (x<0)?-1:0;
+ if(x > 0) this_array[0] = x;
+ else if(x < -1) this_array[0] = x+DV;
+ else this.t = 0;
+}
+
+// return bigint initialized to value
+function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
+
+// (protected) set from string and radix
+function bnpFromString(s,b) {
+ var this_array = this.array;
+ var k;
+ if(b == 16) k = 4;
+ else if(b == 8) k = 3;
+ else if(b == 256) k = 8; // byte array
+ else if(b == 2) k = 1;
+ else if(b == 32) k = 5;
+ else if(b == 4) k = 2;
+ else { this.fromRadix(s,b); return; }
+ this.t = 0;
+ this.s = 0;
+ var i = s.length, mi = false, sh = 0;
+ while(--i >= 0) {
+ var x = (k==8)?s[i]&0xff:intAt(s,i);
+ if(x < 0) {
+ if(s.charAt(i) == "-") mi = true;
+ continue;
+ }
+ mi = false;
+ if(sh == 0)
+ this_array[this.t++] = x;
+ else if(sh+k > BI_DB) {
+ this_array[this.t-1] |= (x&((1<<(BI_DB-sh))-1))<<sh;
+ this_array[this.t++] = (x>>(BI_DB-sh));
+ }
+ else
+ this_array[this.t-1] |= x<<sh;
+ sh += k;
+ if(sh >= BI_DB) sh -= BI_DB;
+ }
+ if(k == 8 && (s[0]&0x80) != 0) {
+ this.s = -1;
+ if(sh > 0) this_array[this.t-1] |= ((1<<(BI_DB-sh))-1)<<sh;
+ }
+ this.clamp();
+ if(mi) BigInteger.ZERO.subTo(this,this);
+}
+
+// (protected) clamp off excess high words
+function bnpClamp() {
+ var this_array = this.array;
+ var c = this.s&BI_DM;
+ while(this.t > 0 && this_array[this.t-1] == c) --this.t;
+}
+
+// (public) return string representation in given radix
+function bnToString(b) {
+ var this_array = this.array;
+ if(this.s < 0) return "-"+this.negate().toString(b);
+ var k;
+ if(b == 16) k = 4;
+ else if(b == 8) k = 3;
+ else if(b == 2) k = 1;
+ else if(b == 32) k = 5;
+ else if(b == 4) k = 2;
+ else return this.toRadix(b);
+ var km = (1<<k)-1, d, m = false, r = "", i = this.t;
+ var p = BI_DB-(i*BI_DB)%k;
+ if(i-- > 0) {
+ if(p < BI_DB && (d = this_array[i]>>p) > 0) { m = true; r = int2char(d); }
+ while(i >= 0) {
+ if(p < k) {
+ d = (this_array[i]&((1<<p)-1))<<(k-p);
+ d |= this_array[--i]>>(p+=BI_DB-k);
+ }
+ else {
+ d = (this_array[i]>>(p-=k))&km;
+ if(p <= 0) { p += BI_DB; --i; }
+ }
+ if(d > 0) m = true;
+ if(m) r += int2char(d);
+ }
+ }
+ return m?r:"0";
+}
+
+// (public) -this
+function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; }
+
+// (public) |this|
+function bnAbs() { return (this.s<0)?this.negate():this; }
+
+// (public) return + if this > a, - if this < a, 0 if equal
+function bnCompareTo(a) {
+ var this_array = this.array;
+ var a_array = a.array;
+
+ var r = this.s-a.s;
+ if(r != 0) return r;
+ var i = this.t;
+ r = i-a.t;
+ if(r != 0) return r;
+ while(--i >= 0) if((r=this_array[i]-a_array[i]) != 0) return r;
+ return 0;
+}
+
+// returns bit length of the integer x
+function nbits(x) {
+ var r = 1, t;
+ if((t=x>>>16) != 0) { x = t; r += 16; }
+ if((t=x>>8) != 0) { x = t; r += 8; }
+ if((t=x>>4) != 0) { x = t; r += 4; }
+ if((t=x>>2) != 0) { x = t; r += 2; }
+ if((t=x>>1) != 0) { x = t; r += 1; }
+ return r;
+}
+
+// (public) return the number of bits in "this"
+function bnBitLength() {
+ var this_array = this.array;
+ if(this.t <= 0) return 0;
+ return BI_DB*(this.t-1)+nbits(this_array[this.t-1]^(this.s&BI_DM));
+}
+
+// (protected) r = this << n*DB
+function bnpDLShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var i;
+ for(i = this.t-1; i >= 0; --i) r_array[i+n] = this_array[i];
+ for(i = n-1; i >= 0; --i) r_array[i] = 0;
+ r.t = this.t+n;
+ r.s = this.s;
+}
+
+// (protected) r = this >> n*DB
+function bnpDRShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ for(var i = n; i < this.t; ++i) r_array[i-n] = this_array[i];
+ r.t = Math.max(this.t-n,0);
+ r.s = this.s;
+}
+
+// (protected) r = this << n
+function bnpLShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var bs = n%BI_DB;
+ var cbs = BI_DB-bs;
+ var bm = (1<<cbs)-1;
+ var ds = Math.floor(n/BI_DB), c = (this.s<<bs)&BI_DM, i;
+ for(i = this.t-1; i >= 0; --i) {
+ r_array[i+ds+1] = (this_array[i]>>cbs)|c;
+ c = (this_array[i]&bm)<<bs;
+ }
+ for(i = ds-1; i >= 0; --i) r_array[i] = 0;
+ r_array[ds] = c;
+ r.t = this.t+ds+1;
+ r.s = this.s;
+ r.clamp();
+}
+
+// (protected) r = this >> n
+function bnpRShiftTo(n,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ r.s = this.s;
+ var ds = Math.floor(n/BI_DB);
+ if(ds >= this.t) { r.t = 0; return; }
+ var bs = n%BI_DB;
+ var cbs = BI_DB-bs;
+ var bm = (1<<bs)-1;
+ r_array[0] = this_array[ds]>>bs;
+ for(var i = ds+1; i < this.t; ++i) {
+ r_array[i-ds-1] |= (this_array[i]&bm)<<cbs;
+ r_array[i-ds] = this_array[i]>>bs;
+ }
+ if(bs > 0) r_array[this.t-ds-1] |= (this.s&bm)<<cbs;
+ r.t = this.t-ds;
+ r.clamp();
+}
+
+// (protected) r = this - a
+function bnpSubTo(a,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var a_array = a.array;
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
+ while(i < m) {
+ c += this_array[i]-a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ if(a.t < this.t) {
+ c -= a.s;
+ while(i < this.t) {
+ c += this_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c += this.s;
+ }
+ else {
+ c += this.s;
+ while(i < a.t) {
+ c -= a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c -= a.s;
+ }
+ r.s = (c<0)?-1:0;
+ if(c < -1) r_array[i++] = BI_DV+c;
+ else if(c > 0) r_array[i++] = c;
+ r.t = i;
+ r.clamp();
+}
+
+// (protected) r = this * a, r != this,a (HAC 14.12)
+// "this" should be the larger one if appropriate.
+function bnpMultiplyTo(a,r) {
+ var this_array = this.array;
+ var r_array = r.array;
+ var x = this.abs(), y = a.abs();
+ var y_array = y.array;
+
+ var i = x.t;
+ r.t = i+y.t;
+ while(--i >= 0) r_array[i] = 0;
+ for(i = 0; i < y.t; ++i) r_array[i+x.t] = x.am(0,y_array[i],r,i,0,x.t);
+ r.s = 0;
+ r.clamp();
+ if(this.s != a.s) BigInteger.ZERO.subTo(r,r);
+}
+
+// (protected) r = this^2, r != this (HAC 14.16)
+function bnpSquareTo(r) {
+ var x = this.abs();
+ var x_array = x.array;
+ var r_array = r.array;
+
+ var i = r.t = 2*x.t;
+ while(--i >= 0) r_array[i] = 0;
+ for(i = 0; i < x.t-1; ++i) {
+ var c = x.am(i,x_array[i],r,2*i,0,1);
+ if((r_array[i+x.t]+=x.am(i+1,2*x_array[i],r,2*i+1,c,x.t-i-1)) >= BI_DV) {
+ r_array[i+x.t] -= BI_DV;
+ r_array[i+x.t+1] = 1;
+ }
+ }
+ if(r.t > 0) r_array[r.t-1] += x.am(i,x_array[i],r,2*i,0,1);
+ r.s = 0;
+ r.clamp();
+}
+
+// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
+// r != q, this != m. q or r may be null.
+function bnpDivRemTo(m,q,r) {
+ var pm = m.abs();
+ if(pm.t <= 0) return;
+ var pt = this.abs();
+ if(pt.t < pm.t) {
+ if(q != null) q.fromInt(0);
+ if(r != null) this.copyTo(r);
+ return;
+ }
+ if(r == null) r = nbi();
+ var y = nbi(), ts = this.s, ms = m.s;
+ var pm_array = pm.array;
+ var nsh = BI_DB-nbits(pm_array[pm.t-1]); // normalize modulus
+ if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
+ else { pm.copyTo(y); pt.copyTo(r); }
+ var ys = y.t;
+
+ var y_array = y.array;
+ var y0 = y_array[ys-1];
+ if(y0 == 0) return;
+ var yt = y0*(1<<BI_F1)+((ys>1)?y_array[ys-2]>>BI_F2:0);
+ var d1 = BI_FV/yt, d2 = (1<<BI_F1)/yt, e = 1<<BI_F2;
+ var i = r.t, j = i-ys, t = (q==null)?nbi():q;
+ y.dlShiftTo(j,t);
+
+ var r_array = r.array;
+ if(r.compareTo(t) >= 0) {
+ r_array[r.t++] = 1;
+ r.subTo(t,r);
+ }
+ BigInteger.ONE.dlShiftTo(ys,t);
+ t.subTo(y,y); // "negative" y so we can replace sub with am later
+ while(y.t < ys) y_array[y.t++] = 0;
+ while(--j >= 0) {
+ // Estimate quotient digit
+ var qd = (r_array[--i]==y0)?BI_DM:Math.floor(r_array[i]*d1+(r_array[i-1]+e)*d2);
+ if((r_array[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
+ y.dlShiftTo(j,t);
+ r.subTo(t,r);
+ while(r_array[i] < --qd) r.subTo(t,r);
+ }
+ }
+ if(q != null) {
+ r.drShiftTo(ys,q);
+ if(ts != ms) BigInteger.ZERO.subTo(q,q);
+ }
+ r.t = ys;
+ r.clamp();
+ if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
+ if(ts < 0) BigInteger.ZERO.subTo(r,r);
+}
+
+// (public) this mod a
+function bnMod(a) {
+ var r = nbi();
+ this.abs().divRemTo(a,null,r);
+ if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r);
+ return r;
+}
+
+// Modular reduction using "classic" algorithm
+function Classic(m) { this.m = m; }
+function cConvert(x) {
+ if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
+ else return x;
+}
+function cRevert(x) { return x; }
+function cReduce(x) { x.divRemTo(this.m,null,x); }
+function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+Classic.prototype.convert = cConvert;
+Classic.prototype.revert = cRevert;
+Classic.prototype.reduce = cReduce;
+Classic.prototype.mulTo = cMulTo;
+Classic.prototype.sqrTo = cSqrTo;
+
+// (protected) return "-1/this % 2^DB"; useful for Mont. reduction
+// justification:
+// xy == 1 (mod m)
+// xy = 1+km
+// xy(2-xy) = (1+km)(1-km)
+// x[y(2-xy)] = 1-k^2m^2
+// x[y(2-xy)] == 1 (mod m^2)
+// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
+// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
+// JS multiply "overflows" differently from C/C++, so care is needed here.
+function bnpInvDigit() {
+ var this_array = this.array;
+ if(this.t < 1) return 0;
+ var x = this_array[0];
+ if((x&1) == 0) return 0;
+ var y = x&3; // y == 1/x mod 2^2
+ y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
+ y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
+ y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
+ // last step - calculate inverse mod DV directly;
+ // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
+ y = (y*(2-x*y%BI_DV))%BI_DV; // y == 1/x mod 2^dbits
+ // we really want the negative inverse, and -DV < y < DV
+ return (y>0)?BI_DV-y:-y;
+}
+
+// Montgomery reduction
+function Montgomery(m) {
+ this.m = m;
+ this.mp = m.invDigit();
+ this.mpl = this.mp&0x7fff;
+ this.mph = this.mp>>15;
+ this.um = (1<<(BI_DB-15))-1;
+ this.mt2 = 2*m.t;
+}
+
+// xR mod m
+function montConvert(x) {
+ var r = nbi();
+ x.abs().dlShiftTo(this.m.t,r);
+ r.divRemTo(this.m,null,r);
+ if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r);
+ return r;
+}
+
+// x/R mod m
+function montRevert(x) {
+ var r = nbi();
+ x.copyTo(r);
+ this.reduce(r);
+ return r;
+}
+
+// x = x/R mod m (HAC 14.32)
+function montReduce(x) {
+ var x_array = x.array;
+ while(x.t <= this.mt2) // pad x so am has enough room later
+ x_array[x.t++] = 0;
+ for(var i = 0; i < this.m.t; ++i) {
+ // faster way of calculating u0 = x[i]*mp mod DV
+ var j = x_array[i]&0x7fff;
+ var u0 = (j*this.mpl+(((j*this.mph+(x_array[i]>>15)*this.mpl)&this.um)<<15))&BI_DM;
+ // use am to combine the multiply-shift-add into one call
+ j = i+this.m.t;
+ x_array[j] += this.m.am(0,u0,x,i,0,this.m.t);
+ // propagate carry
+ while(x_array[j] >= BI_DV) { x_array[j] -= BI_DV; x_array[++j]++; }
+ }
+ x.clamp();
+ x.drShiftTo(this.m.t,x);
+ if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
+}
+
+// r = "x^2/R mod m"; x != r
+function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+// r = "xy/R mod m"; x,y != r
+function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+
+Montgomery.prototype.convert = montConvert;
+Montgomery.prototype.revert = montRevert;
+Montgomery.prototype.reduce = montReduce;
+Montgomery.prototype.mulTo = montMulTo;
+Montgomery.prototype.sqrTo = montSqrTo;
+
+// (protected) true iff this is even
+function bnpIsEven() {
+ var this_array = this.array;
+ return ((this.t>0)?(this_array[0]&1):this.s) == 0;
+}
+
+// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
+function bnpExp(e,z) {
+ if(e > 0xffffffff || e < 1) return BigInteger.ONE;
+ var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
+ g.copyTo(r);
+ while(--i >= 0) {
+ z.sqrTo(r,r2);
+ if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
+ else { var t = r; r = r2; r2 = t; }
+ }
+ return z.revert(r);
+}
+
+// (public) this^e % m, 0 <= e < 2^32
+function bnModPowInt(e,m) {
+ var z;
+ if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
+ return this.exp(e,z);
+}
+
+// protected
+BigInteger.prototype.copyTo = bnpCopyTo;
+BigInteger.prototype.fromInt = bnpFromInt;
+BigInteger.prototype.fromString = bnpFromString;
+BigInteger.prototype.clamp = bnpClamp;
+BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
+BigInteger.prototype.drShiftTo = bnpDRShiftTo;
+BigInteger.prototype.lShiftTo = bnpLShiftTo;
+BigInteger.prototype.rShiftTo = bnpRShiftTo;
+BigInteger.prototype.subTo = bnpSubTo;
+BigInteger.prototype.multiplyTo = bnpMultiplyTo;
+BigInteger.prototype.squareTo = bnpSquareTo;
+BigInteger.prototype.divRemTo = bnpDivRemTo;
+BigInteger.prototype.invDigit = bnpInvDigit;
+BigInteger.prototype.isEven = bnpIsEven;
+BigInteger.prototype.exp = bnpExp;
+
+// public
+BigInteger.prototype.toString = bnToString;
+BigInteger.prototype.negate = bnNegate;
+BigInteger.prototype.abs = bnAbs;
+BigInteger.prototype.compareTo = bnCompareTo;
+BigInteger.prototype.bitLength = bnBitLength;
+BigInteger.prototype.mod = bnMod;
+BigInteger.prototype.modPowInt = bnModPowInt;
+
+// "constants"
+BigInteger.ZERO = nbv(0);
+BigInteger.ONE = nbv(1);
+// Copyright (c) 2005 Tom Wu
+// All Rights Reserved.
+// See "LICENSE" for details.
+
+// Extended JavaScript BN functions, required for RSA private ops.
+
+// (public)
+function bnClone() { var r = nbi(); this.copyTo(r); return r; }
+
+// (public) return value as integer
+function bnIntValue() {
+ var this_array = this.array;
+ if(this.s < 0) {
+ if(this.t == 1) return this_array[0]-BI_DV;
+ else if(this.t == 0) return -1;
+ }
+ else if(this.t == 1) return this_array[0];
+ else if(this.t == 0) return 0;
+ // assumes 16 < DB < 32
+ return ((this_array[1]&((1<<(32-BI_DB))-1))<<BI_DB)|this_array[0];
+}
+
+// (public) return value as byte
+function bnByteValue() {
+ var this_array = this.array;
+ return (this.t==0)?this.s:(this_array[0]<<24)>>24;
+}
+
+// (public) return value as short (assumes DB>=16)
+function bnShortValue() {
+ var this_array = this.array;
+ return (this.t==0)?this.s:(this_array[0]<<16)>>16;
+}
+
+// (protected) return x s.t. r^x < DV
+function bnpChunkSize(r) { return Math.floor(Math.LN2*BI_DB/Math.log(r)); }
+
+// (public) 0 if this == 0, 1 if this > 0
+function bnSigNum() {
+ var this_array = this.array;
+ if(this.s < 0) return -1;
+ else if(this.t <= 0 || (this.t == 1 && this_array[0] <= 0)) return 0;
+ else return 1;
+}
+
+// (protected) convert to radix string
+function bnpToRadix(b) {
+ if(b == null) b = 10;
+ if(this.signum() == 0 || b < 2 || b > 36) return "0";
+ var cs = this.chunkSize(b);
+ var a = Math.pow(b,cs);
+ var d = nbv(a), y = nbi(), z = nbi(), r = "";
+ this.divRemTo(d,y,z);
+ while(y.signum() > 0) {
+ r = (a+z.intValue()).toString(b).substr(1) + r;
+ y.divRemTo(d,y,z);
+ }
+ return z.intValue().toString(b) + r;
+}
+
+// (protected) convert from radix string
+function bnpFromRadix(s,b) {
+ this.fromInt(0);
+ if(b == null) b = 10;
+ var cs = this.chunkSize(b);
+ var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
+ for(var i = 0; i < s.length; ++i) {
+ var x = intAt(s,i);
+ if(x < 0) {
+ if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
+ continue;
+ }
+ w = b*w+x;
+ if(++j >= cs) {
+ this.dMultiply(d);
+ this.dAddOffset(w,0);
+ j = 0;
+ w = 0;
+ }
+ }
+ if(j > 0) {
+ this.dMultiply(Math.pow(b,j));
+ this.dAddOffset(w,0);
+ }
+ if(mi) BigInteger.ZERO.subTo(this,this);
+}
+
+// (protected) alternate constructor
+function bnpFromNumber(a,b,c) {
+ if("number" == typeof b) {
+ // new BigInteger(int,int,RNG)
+ if(a < 2) this.fromInt(1);
+ else {
+ this.fromNumber(a,c);
+ if(!this.testBit(a-1)) // force MSB set
+ this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);
+ if(this.isEven()) this.dAddOffset(1,0); // force odd
+ while(!this.isProbablePrime(b)) {
+ this.dAddOffset(2,0);
+ if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this);
+ }
+ }
+ }
+ else {
+ // new BigInteger(int,RNG)
+ var x = new Array(), t = a&7;
+ x.length = (a>>3)+1;
+ b.nextBytes(x);
+ if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;
+ this.fromString(x,256);
+ }
+}
+
+// (public) convert to bigendian byte array
+function bnToByteArray() {
+ var this_array = this.array;
+ var i = this.t, r = new Array();
+ r[0] = this.s;
+ var p = BI_DB-(i*BI_DB)%8, d, k = 0;
+ if(i-- > 0) {
+ if(p < BI_DB && (d = this_array[i]>>p) != (this.s&BI_DM)>>p)
+ r[k++] = d|(this.s<<(BI_DB-p));
+ while(i >= 0) {
+ if(p < 8) {
+ d = (this_array[i]&((1<<p)-1))<<(8-p);
+ d |= this_array[--i]>>(p+=BI_DB-8);
+ }
+ else {
+ d = (this_array[i]>>(p-=8))&0xff;
+ if(p <= 0) { p += BI_DB; --i; }
+ }
+ if((d&0x80) != 0) d |= -256;
+ if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
+ if(k > 0 || d != this.s) r[k++] = d;
+ }
+ }
+ return r;
+}
+
+function bnEquals(a) { return(this.compareTo(a)==0); }
+function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
+function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
+
+// (protected) r = this op a (bitwise)
+function bnpBitwiseTo(a,op,r) {
+ var this_array = this.array;
+ var a_array = a.array;
+ var r_array = r.array;
+ var i, f, m = Math.min(a.t,this.t);
+ for(i = 0; i < m; ++i) r_array[i] = op(this_array[i],a_array[i]);
+ if(a.t < this.t) {
+ f = a.s&BI_DM;
+ for(i = m; i < this.t; ++i) r_array[i] = op(this_array[i],f);
+ r.t = this.t;
+ }
+ else {
+ f = this.s&BI_DM;
+ for(i = m; i < a.t; ++i) r_array[i] = op(f,a_array[i]);
+ r.t = a.t;
+ }
+ r.s = op(this.s,a.s);
+ r.clamp();
+}
+
+// (public) this & a
+function op_and(x,y) { return x&y; }
+function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
+
+// (public) this | a
+function op_or(x,y) { return x|y; }
+function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
+
+// (public) this ^ a
+function op_xor(x,y) { return x^y; }
+function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
+
+// (public) this & ~a
+function op_andnot(x,y) { return x&~y; }
+function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
+
+// (public) ~this
+function bnNot() {
+ var this_array = this.array;
+ var r = nbi();
+ var r_array = r.array;
+
+ for(var i = 0; i < this.t; ++i) r_array[i] = BI_DM&~this_array[i];
+ r.t = this.t;
+ r.s = ~this.s;
+ return r;
+}
+
+// (public) this << n
+function bnShiftLeft(n) {
+ var r = nbi();
+ if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
+ return r;
+}
+
+// (public) this >> n
+function bnShiftRight(n) {
+ var r = nbi();
+ if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
+ return r;
+}
+
+// return index of lowest 1-bit in x, x < 2^31
+function lbit(x) {
+ if(x == 0) return -1;
+ var r = 0;
+ if((x&0xffff) == 0) { x >>= 16; r += 16; }
+ if((x&0xff) == 0) { x >>= 8; r += 8; }
+ if((x&0xf) == 0) { x >>= 4; r += 4; }
+ if((x&3) == 0) { x >>= 2; r += 2; }
+ if((x&1) == 0) ++r;
+ return r;
+}
+
+// (public) returns index of lowest 1-bit (or -1 if none)
+function bnGetLowestSetBit() {
+ var this_array = this.array;
+ for(var i = 0; i < this.t; ++i)
+ if(this_array[i] != 0) return i*BI_DB+lbit(this_array[i]);
+ if(this.s < 0) return this.t*BI_DB;
+ return -1;
+}
+
+// return number of 1 bits in x
+function cbit(x) {
+ var r = 0;
+ while(x != 0) { x &= x-1; ++r; }
+ return r;
+}
+
+// (public) return number of set bits
+function bnBitCount() {
+ var r = 0, x = this.s&BI_DM;
+ for(var i = 0; i < this.t; ++i) r += cbit(this_array[i]^x);
+ return r;
+}
+
+// (public) true iff nth bit is set
+function bnTestBit(n) {
+ var this_array = this.array;
+ var j = Math.floor(n/BI_DB);
+ if(j >= this.t) return(this.s!=0);
+ return((this_array[j]&(1<<(n%BI_DB)))!=0);
+}
+
+// (protected) this op (1<<n)
+function bnpChangeBit(n,op) {
+ var r = BigInteger.ONE.shiftLeft(n);
+ this.bitwiseTo(r,op,r);
+ return r;
+}
+
+// (public) this | (1<<n)
+function bnSetBit(n) { return this.changeBit(n,op_or); }
+
+// (public) this & ~(1<<n)
+function bnClearBit(n) { return this.changeBit(n,op_andnot); }
+
+// (public) this ^ (1<<n)
+function bnFlipBit(n) { return this.changeBit(n,op_xor); }
+
+// (protected) r = this + a
+function bnpAddTo(a,r) {
+ var this_array = this.array;
+ var a_array = a.array;
+ var r_array = r.array;
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
+ while(i < m) {
+ c += this_array[i]+a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ if(a.t < this.t) {
+ c += a.s;
+ while(i < this.t) {
+ c += this_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c += this.s;
+ }
+ else {
+ c += this.s;
+ while(i < a.t) {
+ c += a_array[i];
+ r_array[i++] = c&BI_DM;
+ c >>= BI_DB;
+ }
+ c += a.s;
+ }
+ r.s = (c<0)?-1:0;
+ if(c > 0) r_array[i++] = c;
+ else if(c < -1) r_array[i++] = BI_DV+c;
+ r.t = i;
+ r.clamp();
+}
+
+// (public) this + a
+function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
+
+// (public) this - a
+function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
+
+// (public) this * a
+function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
+
+// (public) this / a
+function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
+
+// (public) this % a
+function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
+
+// (public) [this/a,this%a]
+function bnDivideAndRemainder(a) {
+ var q = nbi(), r = nbi();
+ this.divRemTo(a,q,r);
+ return new Array(q,r);
+}
+
+// (protected) this *= n, this >= 0, 1 < n < DV
+function bnpDMultiply(n) {
+ var this_array = this.array;
+ this_array[this.t] = this.am(0,n-1,this,0,0,this.t);
+ ++this.t;
+ this.clamp();
+}
+
+// (protected) this += n << w words, this >= 0
+function bnpDAddOffset(n,w) {
+ var this_array = this.array;
+ while(this.t <= w) this_array[this.t++] = 0;
+ this_array[w] += n;
+ while(this_array[w] >= BI_DV) {
+ this_array[w] -= BI_DV;
+ if(++w >= this.t) this_array[this.t++] = 0;
+ ++this_array[w];
+ }
+}
+
+// A "null" reducer
+function NullExp() {}
+function nNop(x) { return x; }
+function nMulTo(x,y,r) { x.multiplyTo(y,r); }
+function nSqrTo(x,r) { x.squareTo(r); }
+
+NullExp.prototype.convert = nNop;
+NullExp.prototype.revert = nNop;
+NullExp.prototype.mulTo = nMulTo;
+NullExp.prototype.sqrTo = nSqrTo;
+
+// (public) this^e
+function bnPow(e) { return this.exp(e,new NullExp()); }
+
+// (protected) r = lower n words of "this * a", a.t <= n
+// "this" should be the larger one if appropriate.
+function bnpMultiplyLowerTo(a,n,r) {
+ var r_array = r.array;
+ var a_array = a.array;
+ var i = Math.min(this.t+a.t,n);
+ r.s = 0; // assumes a,this >= 0
+ r.t = i;
+ while(i > 0) r_array[--i] = 0;
+ var j;
+ for(j = r.t-this.t; i < j; ++i) r_array[i+this.t] = this.am(0,a_array[i],r,i,0,this.t);
+ for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a_array[i],r,i,0,n-i);
+ r.clamp();
+}
+
+// (protected) r = "this * a" without lower n words, n > 0
+// "this" should be the larger one if appropriate.
+function bnpMultiplyUpperTo(a,n,r) {
+ var r_array = r.array;
+ var a_array = a.array;
+ --n;
+ var i = r.t = this.t+a.t-n;
+ r.s = 0; // assumes a,this >= 0
+ while(--i >= 0) r_array[i] = 0;
+ for(i = Math.max(n-this.t,0); i < a.t; ++i)
+ r_array[this.t+i-n] = this.am(n-i,a_array[i],r,0,0,this.t+i-n);
+ r.clamp();
+ r.drShiftTo(1,r);
+}
+
+// Barrett modular reduction
+function Barrett(m) {
+ // setup Barrett
+ this.r2 = nbi();
+ this.q3 = nbi();
+ BigInteger.ONE.dlShiftTo(2*m.t,this.r2);
+ this.mu = this.r2.divide(m);
+ this.m = m;
+}
+
+function barrettConvert(x) {
+ if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
+ else if(x.compareTo(this.m) < 0) return x;
+ else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
+}
+
+function barrettRevert(x) { return x; }
+
+// x = x mod m (HAC 14.42)
+function barrettReduce(x) {
+ x.drShiftTo(this.m.t-1,this.r2);
+ if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
+ this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
+ this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
+ while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
+ x.subTo(this.r2,x);
+ while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
+}
+
+// r = x^2 mod m; x != r
+function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
+
+// r = x*y mod m; x,y != r
+function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
+
+Barrett.prototype.convert = barrettConvert;
+Barrett.prototype.revert = barrettRevert;
+Barrett.prototype.reduce = barrettReduce;
+Barrett.prototype.mulTo = barrettMulTo;
+Barrett.prototype.sqrTo = barrettSqrTo;
+
+// (public) this^e % m (HAC 14.85)
+function bnModPow(e,m) {
+ var e_array = e.array;
+ var i = e.bitLength(), k, r = nbv(1), z;
+ if(i <= 0) return r;
+ else if(i < 18) k = 1;
+ else if(i < 48) k = 3;
+ else if(i < 144) k = 4;
+ else if(i < 768) k = 5;
+ else k = 6;
+ if(i < 8)
+ z = new Classic(m);
+ else if(m.isEven())
+ z = new Barrett(m);
+ else
+ z = new Montgomery(m);
+
+ // precomputation
+ var g = new Array(), n = 3, k1 = k-1, km = (1<<k)-1;
+ g[1] = z.convert(this);
+ if(k > 1) {
+ var g2 = nbi();
+ z.sqrTo(g[1],g2);
+ while(n <= km) {
+ g[n] = nbi();
+ z.mulTo(g2,g[n-2],g[n]);
+ n += 2;
+ }
+ }
+
+ var j = e.t-1, w, is1 = true, r2 = nbi(), t;
+ i = nbits(e_array[j])-1;
+ while(j >= 0) {
+ if(i >= k1) w = (e_array[j]>>(i-k1))&km;
+ else {
+ w = (e_array[j]&((1<<(i+1))-1))<<(k1-i);
+ if(j > 0) w |= e_array[j-1]>>(BI_DB+i-k1);
+ }
+
+ n = k;
+ while((w&1) == 0) { w >>= 1; --n; }
+ if((i -= n) < 0) { i += BI_DB; --j; }
+ if(is1) { // ret == 1, don't bother squaring or multiplying it
+ g[w].copyTo(r);
+ is1 = false;
+ }
+ else {
+ while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
+ if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
+ z.mulTo(r2,g[w],r);
+ }
+
+ while(j >= 0 && (e_array[j]&(1<<i)) == 0) {
+ z.sqrTo(r,r2); t = r; r = r2; r2 = t;
+ if(--i < 0) { i = BI_DB-1; --j; }
+ }
+ }
+ return z.revert(r);
+}
+
+// (public) gcd(this,a) (HAC 14.54)
+function bnGCD(a) {
+ var x = (this.s<0)?this.negate():this.clone();
+ var y = (a.s<0)?a.negate():a.clone();
+ if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
+ var i = x.getLowestSetBit(), g = y.getLowestSetBit();
+ if(g < 0) return x;
+ if(i < g) g = i;
+ if(g > 0) {
+ x.rShiftTo(g,x);
+ y.rShiftTo(g,y);
+ }
+ while(x.signum() > 0) {
+ if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
+ if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
+ if(x.compareTo(y) >= 0) {
+ x.subTo(y,x);
+ x.rShiftTo(1,x);
+ }
+ else {
+ y.subTo(x,y);
+ y.rShiftTo(1,y);
+ }
+ }
+ if(g > 0) y.lShiftTo(g,y);
+ return y;
+}
+
+// (protected) this % n, n < 2^26
+function bnpModInt(n) {
+ var this_array = this.array;
+ if(n <= 0) return 0;
+ var d = BI_DV%n, r = (this.s<0)?n-1:0;
+ if(this.t > 0)
+ if(d == 0) r = this_array[0]%n;
+ else for(var i = this.t-1; i >= 0; --i) r = (d*r+this_array[i])%n;
+ return r;
+}
+
+// (public) 1/this % m (HAC 14.61)
+function bnModInverse(m) {
+ var ac = m.isEven();
+ if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
+ var u = m.clone(), v = this.clone();
+ var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
+ while(u.signum() != 0) {
+ while(u.isEven()) {
+ u.rShiftTo(1,u);
+ if(ac) {
+ if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
+ a.rShiftTo(1,a);
+ }
+ else if(!b.isEven()) b.subTo(m,b);
+ b.rShiftTo(1,b);
+ }
+ while(v.isEven()) {
+ v.rShiftTo(1,v);
+ if(ac) {
+ if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
+ c.rShiftTo(1,c);
+ }
+ else if(!d.isEven()) d.subTo(m,d);
+ d.rShiftTo(1,d);
+ }
+ if(u.compareTo(v) >= 0) {
+ u.subTo(v,u);
+ if(ac) a.subTo(c,a);
+ b.subTo(d,b);
+ }
+ else {
+ v.subTo(u,v);
+ if(ac) c.subTo(a,c);
+ d.subTo(b,d);
+ }
+ }
+ if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
+ if(d.compareTo(m) >= 0) return d.subtract(m);
+ if(d.signum() < 0) d.addTo(m,d); else return d;
+ if(d.signum() < 0) return d.add(m); else return d;
+}
+
+var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509];
+var lplim = (1<<26)/lowprimes[lowprimes.length-1];
+
+// (public) test primality with certainty >= 1-.5^t
+function bnIsProbablePrime(t) {
+ var i, x = this.abs();
+ var x_array = x.array;
+ if(x.t == 1 && x_array[0] <= lowprimes[lowprimes.length-1]) {
+ for(i = 0; i < lowprimes.length; ++i)
+ if(x_array[0] == lowprimes[i]) return true;
+ return false;
+ }
+ if(x.isEven()) return false;
+ i = 1;
+ while(i < lowprimes.length) {
+ var m = lowprimes[i], j = i+1;
+ while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
+ m = x.modInt(m);
+ while(i < j) if(m%lowprimes[i++] == 0) return false;
+ }
+ return x.millerRabin(t);
+}
+
+// (protected) true if probably prime (HAC 4.24, Miller-Rabin)
+function bnpMillerRabin(t) {
+ var n1 = this.subtract(BigInteger.ONE);
+ var k = n1.getLowestSetBit();
+ if(k <= 0) return false;
+ var r = n1.shiftRight(k);
+ t = (t+1)>>1;
+ if(t > lowprimes.length) t = lowprimes.length;
+ var a = nbi();
+ for(var i = 0; i < t; ++i) {
+ a.fromInt(lowprimes[i]);
+ var y = a.modPow(r,this);
+ if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
+ var j = 1;
+ while(j++ < k && y.compareTo(n1) != 0) {
+ y = y.modPowInt(2,this);
+ if(y.compareTo(BigInteger.ONE) == 0) return false;
+ }
+ if(y.compareTo(n1) != 0) return false;
+ }
+ }
+ return true;
+}
+
+// protected
+BigInteger.prototype.chunkSize = bnpChunkSize;
+BigInteger.prototype.toRadix = bnpToRadix;
+BigInteger.prototype.fromRadix = bnpFromRadix;
+BigInteger.prototype.fromNumber = bnpFromNumber;
+BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
+BigInteger.prototype.changeBit = bnpChangeBit;
+BigInteger.prototype.addTo = bnpAddTo;
+BigInteger.prototype.dMultiply = bnpDMultiply;
+BigInteger.prototype.dAddOffset = bnpDAddOffset;
+BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
+BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
+BigInteger.prototype.modInt = bnpModInt;
+BigInteger.prototype.millerRabin = bnpMillerRabin;
+
+// public
+BigInteger.prototype.clone = bnClone;
+BigInteger.prototype.intValue = bnIntValue;
+BigInteger.prototype.byteValue = bnByteValue;
+BigInteger.prototype.shortValue = bnShortValue;
+BigInteger.prototype.signum = bnSigNum;
+BigInteger.prototype.toByteArray = bnToByteArray;
+BigInteger.prototype.equals = bnEquals;
+BigInteger.prototype.min = bnMin;
+BigInteger.prototype.max = bnMax;
+BigInteger.prototype.and = bnAnd;
+BigInteger.prototype.or = bnOr;
+BigInteger.prototype.xor = bnXor;
+BigInteger.prototype.andNot = bnAndNot;
+BigInteger.prototype.not = bnNot;
+BigInteger.prototype.shiftLeft = bnShiftLeft;
+BigInteger.prototype.shiftRight = bnShiftRight;
+BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
+BigInteger.prototype.bitCount = bnBitCount;
+BigInteger.prototype.testBit = bnTestBit;
+BigInteger.prototype.setBit = bnSetBit;
+BigInteger.prototype.clearBit = bnClearBit;
+BigInteger.prototype.flipBit = bnFlipBit;
+BigInteger.prototype.add = bnAdd;
+BigInteger.prototype.subtract = bnSubtract;
+BigInteger.prototype.multiply = bnMultiply;
+BigInteger.prototype.divide = bnDivide;
+BigInteger.prototype.remainder = bnRemainder;
+BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
+BigInteger.prototype.modPow = bnModPow;
+BigInteger.prototype.modInverse = bnModInverse;
+BigInteger.prototype.pow = bnPow;
+BigInteger.prototype.gcd = bnGCD;
+BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
+
+// BigInteger interfaces not implemented in jsbn:
+
+// BigInteger(int signum, byte[] magnitude)
+// double doubleValue()
+// float floatValue()
+// int hashCode()
+// long longValue()
+// static BigInteger valueOf(long val)
+// prng4.js - uses Arcfour as a PRNG
+
+function Arcfour() {
+ this.i = 0;
+ this.j = 0;
+ this.S = new Array();
+}
+
+// Initialize arcfour context from key, an array of ints, each from [0..255]
+function ARC4init(key) {
+ var i, j, t;
+ for(i = 0; i < 256; ++i)
+ this.S[i] = i;
+ j = 0;
+ for(i = 0; i < 256; ++i) {
+ j = (j + this.S[i] + key[i % key.length]) & 255;
+ t = this.S[i];
+ this.S[i] = this.S[j];
+ this.S[j] = t;
+ }
+ this.i = 0;
+ this.j = 0;
+}
+
+function ARC4next() {
+ var t;
+ this.i = (this.i + 1) & 255;
+ this.j = (this.j + this.S[this.i]) & 255;
+ t = this.S[this.i];
+ this.S[this.i] = this.S[this.j];
+ this.S[this.j] = t;
+ return this.S[(t + this.S[this.i]) & 255];
+}
+
+Arcfour.prototype.init = ARC4init;
+Arcfour.prototype.next = ARC4next;
+
+// Plug in your RNG constructor here
+function prng_newstate() {
+ return new Arcfour();
+}
+
+// Pool size must be a multiple of 4 and greater than 32.
+// An array of bytes the size of the pool will be passed to init()
+var rng_psize = 256;
+// Random number generator - requires a PRNG backend, e.g. prng4.js
+
+// For best results, put code like
+// <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
+// in your main HTML document.
+
+var rng_state;
+var rng_pool;
+var rng_pptr;
+
+// Mix in a 32-bit integer into the pool
+function rng_seed_int(x) {
+ rng_pool[rng_pptr++] ^= x & 255;
+ rng_pool[rng_pptr++] ^= (x >> 8) & 255;
+ rng_pool[rng_pptr++] ^= (x >> 16) & 255;
+ rng_pool[rng_pptr++] ^= (x >> 24) & 255;
+ if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
+}
+
+// Mix in the current time (w/milliseconds) into the pool
+function rng_seed_time() {
+ // Use pre-computed date to avoid making the benchmark
+ // results dependent on the current date.
+ rng_seed_int(1122926989487);
+}
+
+// Initialize the pool with junk if needed.
+if(rng_pool == null) {
+ rng_pool = new Array();
+ rng_pptr = 0;
+ var t;
+ while(rng_pptr < rng_psize) { // extract some randomness from Math.random()
+ t = Math.floor(65536 * Math.random());
+ rng_pool[rng_pptr++] = t >>> 8;
+ rng_pool[rng_pptr++] = t & 255;
+ }
+ rng_pptr = 0;
+ rng_seed_time();
+ //rng_seed_int(window.screenX);
+ //rng_seed_int(window.screenY);
+}
+
+function rng_get_byte() {
+ if(rng_state == null) {
+ rng_seed_time();
+ rng_state = prng_newstate();
+ rng_state.init(rng_pool);
+ for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
+ rng_pool[rng_pptr] = 0;
+ rng_pptr = 0;
+ //rng_pool = null;
+ }
+ // TODO: allow reseeding after first request
+ return rng_state.next();
+}
+
+function rng_get_bytes(ba) {
+ var i;
+ for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
+}
+
+function SecureRandom() {}
+
+SecureRandom.prototype.nextBytes = rng_get_bytes;
+// Depends on jsbn.js and rng.js
+
+// convert a (hex) string to a bignum object
+function parseBigInt(str,r) {
+ return new BigInteger(str,r);
+}
+
+function linebrk(s,n) {
+ var ret = "";
+ var i = 0;
+ while(i + n < s.length) {
+ ret += s.substring(i,i+n) + "\n";
+ i += n;
+ }
+ return ret + s.substring(i,s.length);
+}
+
+function byte2Hex(b) {
+ if(b < 0x10)
+ return "0" + b.toString(16);
+ else
+ return b.toString(16);
+}
+
+// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
+function pkcs1pad2(s,n) {
+ if(n < s.length + 11) {
+ alert("Message too long for RSA");
+ return null;
+ }
+ var ba = new Array();
+ var i = s.length - 1;
+ while(i >= 0 && n > 0) ba[--n] = s.charCodeAt(i--);
+ ba[--n] = 0;
+ var rng = new SecureRandom();
+ var x = new Array();
+ while(n > 2) { // random non-zero pad
+ x[0] = 0;
+ while(x[0] == 0) rng.nextBytes(x);
+ ba[--n] = x[0];
+ }
+ ba[--n] = 2;
+ ba[--n] = 0;
+ return new BigInteger(ba);
+}
+
+// "empty" RSA key constructor
+function RSAKey() {
+ this.n = null;
+ this.e = 0;
+ this.d = null;
+ this.p = null;
+ this.q = null;
+ this.dmp1 = null;
+ this.dmq1 = null;
+ this.coeff = null;
+}
+
+// Set the public key fields N and e from hex strings
+function RSASetPublic(N,E) {
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
+ this.n = parseBigInt(N,16);
+ this.e = parseInt(E,16);
+ }
+ else
+ alert("Invalid RSA public key");
+}
+
+// Perform raw public operation on "x": return x^e (mod n)
+function RSADoPublic(x) {
+ return x.modPowInt(this.e, this.n);
+}
+
+// Return the PKCS#1 RSA encryption of "text" as an even-length hex string
+function RSAEncrypt(text) {
+ var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3);
+ if(m == null) return null;
+ var c = this.doPublic(m);
+ if(c == null) return null;
+ var h = c.toString(16);
+ if((h.length & 1) == 0) return h; else return "0" + h;
+}
+
+// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
+//function RSAEncryptB64(text) {
+// var h = this.encrypt(text);
+// if(h) return hex2b64(h); else return null;
+//}
+
+// protected
+RSAKey.prototype.doPublic = RSADoPublic;
+
+// public
+RSAKey.prototype.setPublic = RSASetPublic;
+RSAKey.prototype.encrypt = RSAEncrypt;
+//RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
+// Depends on rsa.js and jsbn2.js
+
+// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext
+function pkcs1unpad2(d,n) {
+ var b = d.toByteArray();
+ var i = 0;
+ while(i < b.length && b[i] == 0) ++i;
+ if(b.length-i != n-1 || b[i] != 2)
+ return null;
+ ++i;
+ while(b[i] != 0)
+ if(++i >= b.length) return null;
+ var ret = "";
+ while(++i < b.length)
+ ret += String.fromCharCode(b[i]);
+ return ret;
+}
+
+// Set the private key fields N, e, and d from hex strings
+function RSASetPrivate(N,E,D) {
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
+ this.n = parseBigInt(N,16);
+ this.e = parseInt(E,16);
+ this.d = parseBigInt(D,16);
+ }
+ else
+ alert("Invalid RSA private key");
+}
+
+// Set the private key fields N, e, d and CRT params from hex strings
+function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) {
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
+ this.n = parseBigInt(N,16);
+ this.e = parseInt(E,16);
+ this.d = parseBigInt(D,16);
+ this.p = parseBigInt(P,16);
+ this.q = parseBigInt(Q,16);
+ this.dmp1 = parseBigInt(DP,16);
+ this.dmq1 = parseBigInt(DQ,16);
+ this.coeff = parseBigInt(C,16);
+ }
+ else
+ alert("Invalid RSA private key");
+}
+
+// Generate a new random private key B bits long, using public expt E
+function RSAGenerate(B,E) {
+ var rng = new SecureRandom();
+ var qs = B>>1;
+ this.e = parseInt(E,16);
+ var ee = new BigInteger(E,16);
+ for(;;) {
+ for(;;) {
+ this.p = new BigInteger(B-qs,1,rng);
+ if(this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break;
+ }
+ for(;;) {
+ this.q = new BigInteger(qs,1,rng);
+ if(this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break;
+ }
+ if(this.p.compareTo(this.q) <= 0) {
+ var t = this.p;
+ this.p = this.q;
+ this.q = t;
+ }
+ var p1 = this.p.subtract(BigInteger.ONE);
+ var q1 = this.q.subtract(BigInteger.ONE);
+ var phi = p1.multiply(q1);
+ if(phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {
+ this.n = this.p.multiply(this.q);
+ this.d = ee.modInverse(phi);
+ this.dmp1 = this.d.mod(p1);
+ this.dmq1 = this.d.mod(q1);
+ this.coeff = this.q.modInverse(this.p);
+ break;
+ }
+ }
+}
+
+// Perform raw private operation on "x": return x^d (mod n)
+function RSADoPrivate(x) {
+ if(this.p == null || this.q == null)
+ return x.modPow(this.d, this.n);
+
+ // TODO: re-calculate any missing CRT params
+ var xp = x.mod(this.p).modPow(this.dmp1, this.p);
+ var xq = x.mod(this.q).modPow(this.dmq1, this.q);
+
+ while(xp.compareTo(xq) < 0)
+ xp = xp.add(this.p);
+ return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
+}
+
+// Return the PKCS#1 RSA decryption of "ctext".
+// "ctext" is an even-length hex string and the output is a plain string.
+function RSADecrypt(ctext) {
+ var c = parseBigInt(ctext, 16);
+ var m = this.doPrivate(c);
+ if(m == null) return null;
+ return pkcs1unpad2(m, (this.n.bitLength()+7)>>3);
+}
+
+// Return the PKCS#1 RSA decryption of "ctext".
+// "ctext" is a Base64-encoded string and the output is a plain string.
+//function RSAB64Decrypt(ctext) {
+// var h = b64tohex(ctext);
+// if(h) return this.decrypt(h); else return null;
+//}
+
+// protected
+RSAKey.prototype.doPrivate = RSADoPrivate;
+
+// public
+RSAKey.prototype.setPrivate = RSASetPrivate;
+RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
+RSAKey.prototype.generate = RSAGenerate;
+RSAKey.prototype.decrypt = RSADecrypt;
+//RSAKey.prototype.b64_decrypt = RSAB64Decrypt;
+
+
+nValue="a5261939975948bb7a58dffe5ff54e65f0498f9175f5a09288810b8975871e99af3b5dd94057b0fc07535f5f97444504fa35169d461d0d30cf0192e307727c065168c788771c561a9400fb49175e9e6aa4e23fe11af69e9412dd23b0cb6684c4c2429bce139e848ab26d0829073351f4acd36074eafd036a5eb83359d2a698d3";
+eValue="10001";
+dValue="8e9912f6d3645894e8d38cb58c0db81ff516cf4c7e5a14c7f1eddb1459d2cded4d8d293fc97aee6aefb861859c8b6a3d1dfe710463e1f9ddc72048c09751971c4a580aa51eb523357a3cc48d31cfad1d4a165066ed92d4748fb6571211da5cb14bc11b6e2df7c1a559e6d5ac1cd5c94703a22891464fba23d0d965086277a161";
+pValue="d090ce58a92c75233a6486cb0a9209bf3583b64f540c76f5294bb97d285eed33aec220bde14b2417951178ac152ceab6da7090905b478195498b352048f15e7d";
+qValue="cab575dc652bb66df15a0359609d51d1db184750c00c6698b90ef3465c99655103edbf0d54c56aec0ce3c4d22592338092a126a0cc49f65a4a30d222b411e58f";
+dmp1Value="1a24bca8e273df2f0e47c199bbf678604e7df7215480c77c8db39f49b000ce2cf7500038acfff5433b7d582a01f1826e6f4d42e1c57f5e1fef7b12aabc59fd25";
+dmq1Value="3d06982efbbe47339e1f6d36b1216b8a741d410b0c662f54f7118b27b9a4ec9d914337eb39841d8666f3034408cf94f5b62f11c402fc994fe15a05493150d9fd";
+coeffValue="3a3e731acd8960b7ff9eb81a7ff93bd1cfa74cbd56987db58b4594fb09c09084db1734c8143f98b602b981aaa9243ca28deb69b5b280ee8dcee0fd2625e53250";
+
+setupEngine(am3, 28);
+
+var TEXT = "The quick brown fox jumped over the extremely lazy frog! " +
+ "Now is the time for all good men to come to the party.";
+var encrypted;
+
+function encrypt() {
+ var RSA = new RSAKey();
+ RSA.setPublic(nValue, eValue);
+ RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
+ encrypted = RSA.encrypt(TEXT);
+}
+
+function decrypt() {
+ var RSA = new RSAKey();
+ RSA.setPublic(nValue, eValue);
+ RSA.setPrivateEx(nValue, eValue, dValue, pValue, qValue, dmp1Value, dmq1Value, coeffValue);
+ var decrypted = RSA.decrypt(encrypted);
+ if (decrypted != TEXT) {
+ throw new Error("Crypto operation failed");
+ }
+}
+
+for (var i = 0; i < 8; ++i) {
+ encrypt();
+ decrypt();
+}
diff --git a/SunSpider/tests/v8-v6/v8-deltablue.js b/SunSpider/tests/v8-v6/v8-deltablue.js
new file mode 100644
index 0000000..5c3e233
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-deltablue.js
@@ -0,0 +1,877 @@
+// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 1996 John Maloney and Mario Wolczko.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+// This implementation of the DeltaBlue benchmark is derived
+// from the Smalltalk implementation by John Maloney and Mario
+// Wolczko. Some parts have been translated directly, whereas
+// others have been modified more aggresively to make it feel
+// more like a JavaScript program.
+
+/**
+ * A JavaScript implementation of the DeltaBlue constraint-solving
+ * algorithm, as described in:
+ *
+ * "The DeltaBlue Algorithm: An Incremental Constraint Hierarchy Solver"
+ * Bjorn N. Freeman-Benson and John Maloney
+ * January 1990 Communications of the ACM,
+ * also available as University of Washington TR 89-08-06.
+ *
+ * Beware: this benchmark is written in a grotesque style where
+ * the constraint model is built by side-effects from constructors.
+ * I've kept it this way to avoid deviating too much from the original
+ * implementation.
+ */
+
+
+/* --- O b j e c t M o d e l --- */
+
+Object.prototype.inheritsFrom = function (shuper) {
+ function Inheriter() { }
+ Inheriter.prototype = shuper.prototype;
+ this.prototype = new Inheriter();
+ this.superConstructor = shuper;
+}
+
+function OrderedCollection() {
+ this.elms = new Array();
+}
+
+OrderedCollection.prototype.add = function (elm) {
+ this.elms.push(elm);
+}
+
+OrderedCollection.prototype.at = function (index) {
+ return this.elms[index];
+}
+
+OrderedCollection.prototype.size = function () {
+ return this.elms.length;
+}
+
+OrderedCollection.prototype.removeFirst = function () {
+ return this.elms.pop();
+}
+
+OrderedCollection.prototype.remove = function (elm) {
+ var index = 0, skipped = 0;
+ for (var i = 0; i < this.elms.length; i++) {
+ var value = this.elms[i];
+ if (value != elm) {
+ this.elms[index] = value;
+ index++;
+ } else {
+ skipped++;
+ }
+ }
+ for (var i = 0; i < skipped; i++)
+ this.elms.pop();
+}
+
+/* --- *
+ * S t r e n g t h
+ * --- */
+
+/**
+ * Strengths are used to measure the relative importance of constraints.
+ * New strengths may be inserted in the strength hierarchy without
+ * disrupting current constraints. Strengths cannot be created outside
+ * this class, so pointer comparison can be used for value comparison.
+ */
+function Strength(strengthValue, name) {
+ this.strengthValue = strengthValue;
+ this.name = name;
+}
+
+Strength.stronger = function (s1, s2) {
+ return s1.strengthValue < s2.strengthValue;
+}
+
+Strength.weaker = function (s1, s2) {
+ return s1.strengthValue > s2.strengthValue;
+}
+
+Strength.weakestOf = function (s1, s2) {
+ return this.weaker(s1, s2) ? s1 : s2;
+}
+
+Strength.strongest = function (s1, s2) {
+ return this.stronger(s1, s2) ? s1 : s2;
+}
+
+Strength.prototype.nextWeaker = function () {
+ switch (this.strengthValue) {
+ case 0: return Strength.WEAKEST;
+ case 1: return Strength.WEAK_DEFAULT;
+ case 2: return Strength.NORMAL;
+ case 3: return Strength.STRONG_DEFAULT;
+ case 4: return Strength.PREFERRED;
+ case 5: return Strength.REQUIRED;
+ }
+}
+
+// Strength constants.
+Strength.REQUIRED = new Strength(0, "required");
+Strength.STONG_PREFERRED = new Strength(1, "strongPreferred");
+Strength.PREFERRED = new Strength(2, "preferred");
+Strength.STRONG_DEFAULT = new Strength(3, "strongDefault");
+Strength.NORMAL = new Strength(4, "normal");
+Strength.WEAK_DEFAULT = new Strength(5, "weakDefault");
+Strength.WEAKEST = new Strength(6, "weakest");
+
+/* --- *
+ * C o n s t r a i n t
+ * --- */
+
+/**
+ * An abstract class representing a system-maintainable relationship
+ * (or "constraint") between a set of variables. A constraint supplies
+ * a strength instance variable; concrete subclasses provide a means
+ * of storing the constrained variables and other information required
+ * to represent a constraint.
+ */
+function Constraint(strength) {
+ this.strength = strength;
+}
+
+/**
+ * Activate this constraint and attempt to satisfy it.
+ */
+Constraint.prototype.addConstraint = function () {
+ this.addToGraph();
+ planner.incrementalAdd(this);
+}
+
+/**
+ * Attempt to find a way to enforce this constraint. If successful,
+ * record the solution, perhaps modifying the current dataflow
+ * graph. Answer the constraint that this constraint overrides, if
+ * there is one, or nil, if there isn't.
+ * Assume: I am not already satisfied.
+ */
+Constraint.prototype.satisfy = function (mark) {
+ this.chooseMethod(mark);
+ if (!this.isSatisfied()) {
+ if (this.strength == Strength.REQUIRED)
+ alert("Could not satisfy a required constraint!");
+ return null;
+ }
+ this.markInputs(mark);
+ var out = this.output();
+ var overridden = out.determinedBy;
+ if (overridden != null) overridden.markUnsatisfied();
+ out.determinedBy = this;
+ if (!planner.addPropagate(this, mark))
+ alert("Cycle encountered");
+ out.mark = mark;
+ return overridden;
+}
+
+Constraint.prototype.destroyConstraint = function () {
+ if (this.isSatisfied()) planner.incrementalRemove(this);
+ else this.removeFromGraph();
+}
+
+/**
+ * Normal constraints are not input constraints. An input constraint
+ * is one that depends on external state, such as the mouse, the
+ * keybord, a clock, or some arbitraty piece of imperative code.
+ */
+Constraint.prototype.isInput = function () {
+ return false;
+}
+
+/* --- *
+ * U n a r y C o n s t r a i n t
+ * --- */
+
+/**
+ * Abstract superclass for constraints having a single possible output
+ * variable.
+ */
+function UnaryConstraint(v, strength) {
+ UnaryConstraint.superConstructor.call(this, strength);
+ this.myOutput = v;
+ this.satisfied = false;
+ this.addConstraint();
+}
+
+UnaryConstraint.inheritsFrom(Constraint);
+
+/**
+ * Adds this constraint to the constraint graph
+ */
+UnaryConstraint.prototype.addToGraph = function () {
+ this.myOutput.addConstraint(this);
+ this.satisfied = false;
+}
+
+/**
+ * Decides if this constraint can be satisfied and records that
+ * decision.
+ */
+UnaryConstraint.prototype.chooseMethod = function (mark) {
+ this.satisfied = (this.myOutput.mark != mark)
+ && Strength.stronger(this.strength, this.myOutput.walkStrength);
+}
+
+/**
+ * Returns true if this constraint is satisfied in the current solution.
+ */
+UnaryConstraint.prototype.isSatisfied = function () {
+ return this.satisfied;
+}
+
+UnaryConstraint.prototype.markInputs = function (mark) {
+ // has no inputs
+}
+
+/**
+ * Returns the current output variable.
+ */
+UnaryConstraint.prototype.output = function () {
+ return this.myOutput;
+}
+
+/**
+ * Calculate the walkabout strength, the stay flag, and, if it is
+ * 'stay', the value for the current output of this constraint. Assume
+ * this constraint is satisfied.
+ */
+UnaryConstraint.prototype.recalculate = function () {
+ this.myOutput.walkStrength = this.strength;
+ this.myOutput.stay = !this.isInput();
+ if (this.myOutput.stay) this.execute(); // Stay optimization
+}
+
+/**
+ * Records that this constraint is unsatisfied
+ */
+UnaryConstraint.prototype.markUnsatisfied = function () {
+ this.satisfied = false;
+}
+
+UnaryConstraint.prototype.inputsKnown = function () {
+ return true;
+}
+
+UnaryConstraint.prototype.removeFromGraph = function () {
+ if (this.myOutput != null) this.myOutput.removeConstraint(this);
+ this.satisfied = false;
+}
+
+/* --- *
+ * S t a y C o n s t r a i n t
+ * --- */
+
+/**
+ * Variables that should, with some level of preference, stay the same.
+ * Planners may exploit the fact that instances, if satisfied, will not
+ * change their output during plan execution. This is called "stay
+ * optimization".
+ */
+function StayConstraint(v, str) {
+ StayConstraint.superConstructor.call(this, v, str);
+}
+
+StayConstraint.inheritsFrom(UnaryConstraint);
+
+StayConstraint.prototype.execute = function () {
+ // Stay constraints do nothing
+}
+
+/* --- *
+ * E d i t C o n s t r a i n t
+ * --- */
+
+/**
+ * A unary input constraint used to mark a variable that the client
+ * wishes to change.
+ */
+function EditConstraint(v, str) {
+ EditConstraint.superConstructor.call(this, v, str);
+}
+
+EditConstraint.inheritsFrom(UnaryConstraint);
+
+/**
+ * Edits indicate that a variable is to be changed by imperative code.
+ */
+EditConstraint.prototype.isInput = function () {
+ return true;
+}
+
+EditConstraint.prototype.execute = function () {
+ // Edit constraints do nothing
+}
+
+/* --- *
+ * B i n a r y C o n s t r a i n t
+ * --- */
+
+var Direction = new Object();
+Direction.NONE = 0;
+Direction.FORWARD = 1;
+Direction.BACKWARD = -1;
+
+/**
+ * Abstract superclass for constraints having two possible output
+ * variables.
+ */
+function BinaryConstraint(var1, var2, strength) {
+ BinaryConstraint.superConstructor.call(this, strength);
+ this.v1 = var1;
+ this.v2 = var2;
+ this.direction = Direction.NONE;
+ this.addConstraint();
+}
+
+BinaryConstraint.inheritsFrom(Constraint);
+
+/**
+ * Decides if this constraint can be satisfied and which way it
+ * should flow based on the relative strength of the variables related,
+ * and record that decision.
+ */
+BinaryConstraint.prototype.chooseMethod = function (mark) {
+ if (this.v1.mark == mark) {
+ this.direction = (this.v2.mark != mark && Strength.stronger(this.strength, this.v2.walkStrength))
+ ? Direction.FORWARD
+ : Direction.NONE;
+ }
+ if (this.v2.mark == mark) {
+ this.direction = (this.v1.mark != mark && Strength.stronger(this.strength, this.v1.walkStrength))
+ ? Direction.BACKWARD
+ : Direction.NONE;
+ }
+ if (Strength.weaker(this.v1.walkStrength, this.v2.walkStrength)) {
+ this.direction = Strength.stronger(this.strength, this.v1.walkStrength)
+ ? Direction.BACKWARD
+ : Direction.NONE;
+ } else {
+ this.direction = Strength.stronger(this.strength, this.v2.walkStrength)
+ ? Direction.FORWARD
+ : Direction.BACKWARD
+ }
+}
+
+/**
+ * Add this constraint to the constraint graph
+ */
+BinaryConstraint.prototype.addToGraph = function () {
+ this.v1.addConstraint(this);
+ this.v2.addConstraint(this);
+ this.direction = Direction.NONE;
+}
+
+/**
+ * Answer true if this constraint is satisfied in the current solution.
+ */
+BinaryConstraint.prototype.isSatisfied = function () {
+ return this.direction != Direction.NONE;
+}
+
+/**
+ * Mark the input variable with the given mark.
+ */
+BinaryConstraint.prototype.markInputs = function (mark) {
+ this.input().mark = mark;
+}
+
+/**
+ * Returns the current input variable
+ */
+BinaryConstraint.prototype.input = function () {
+ return (this.direction == Direction.FORWARD) ? this.v1 : this.v2;
+}
+
+/**
+ * Returns the current output variable
+ */
+BinaryConstraint.prototype.output = function () {
+ return (this.direction == Direction.FORWARD) ? this.v2 : this.v1;
+}
+
+/**
+ * Calculate the walkabout strength, the stay flag, and, if it is
+ * 'stay', the value for the current output of this
+ * constraint. Assume this constraint is satisfied.
+ */
+BinaryConstraint.prototype.recalculate = function () {
+ var ihn = this.input(), out = this.output();
+ out.walkStrength = Strength.weakestOf(this.strength, ihn.walkStrength);
+ out.stay = ihn.stay;
+ if (out.stay) this.execute();
+}
+
+/**
+ * Record the fact that this constraint is unsatisfied.
+ */
+BinaryConstraint.prototype.markUnsatisfied = function () {
+ this.direction = Direction.NONE;
+}
+
+BinaryConstraint.prototype.inputsKnown = function (mark) {
+ var i = this.input();
+ return i.mark == mark || i.stay || i.determinedBy == null;
+}
+
+BinaryConstraint.prototype.removeFromGraph = function () {
+ if (this.v1 != null) this.v1.removeConstraint(this);
+ if (this.v2 != null) this.v2.removeConstraint(this);
+ this.direction = Direction.NONE;
+}
+
+/* --- *
+ * S c a l e C o n s t r a i n t
+ * --- */
+
+/**
+ * Relates two variables by the linear scaling relationship: "v2 =
+ * (v1 * scale) + offset". Either v1 or v2 may be changed to maintain
+ * this relationship but the scale factor and offset are considered
+ * read-only.
+ */
+function ScaleConstraint(src, scale, offset, dest, strength) {
+ this.direction = Direction.NONE;
+ this.scale = scale;
+ this.offset = offset;
+ ScaleConstraint.superConstructor.call(this, src, dest, strength);
+}
+
+ScaleConstraint.inheritsFrom(BinaryConstraint);
+
+/**
+ * Adds this constraint to the constraint graph.
+ */
+ScaleConstraint.prototype.addToGraph = function () {
+ ScaleConstraint.superConstructor.prototype.addToGraph.call(this);
+ this.scale.addConstraint(this);
+ this.offset.addConstraint(this);
+}
+
+ScaleConstraint.prototype.removeFromGraph = function () {
+ ScaleConstraint.superConstructor.prototype.removeFromGraph.call(this);
+ if (this.scale != null) this.scale.removeConstraint(this);
+ if (this.offset != null) this.offset.removeConstraint(this);
+}
+
+ScaleConstraint.prototype.markInputs = function (mark) {
+ ScaleConstraint.superConstructor.prototype.markInputs.call(this, mark);
+ this.scale.mark = this.offset.mark = mark;
+}
+
+/**
+ * Enforce this constraint. Assume that it is satisfied.
+ */
+ScaleConstraint.prototype.execute = function () {
+ if (this.direction == Direction.FORWARD) {
+ this.v2.value = this.v1.value * this.scale.value + this.offset.value;
+ } else {
+ this.v1.value = (this.v2.value - this.offset.value) / this.scale.value;
+ }
+}
+
+/**
+ * Calculate the walkabout strength, the stay flag, and, if it is
+ * 'stay', the value for the current output of this constraint. Assume
+ * this constraint is satisfied.
+ */
+ScaleConstraint.prototype.recalculate = function () {
+ var ihn = this.input(), out = this.output();
+ out.walkStrength = Strength.weakestOf(this.strength, ihn.walkStrength);
+ out.stay = ihn.stay && this.scale.stay && this.offset.stay;
+ if (out.stay) this.execute();
+}
+
+/* --- *
+ * E q u a l i t y C o n s t r a i n t
+ * --- */
+
+/**
+ * Constrains two variables to have the same value.
+ */
+function EqualityConstraint(var1, var2, strength) {
+ EqualityConstraint.superConstructor.call(this, var1, var2, strength);
+}
+
+EqualityConstraint.inheritsFrom(BinaryConstraint);
+
+/**
+ * Enforce this constraint. Assume that it is satisfied.
+ */
+EqualityConstraint.prototype.execute = function () {
+ this.output().value = this.input().value;
+}
+
+/* --- *
+ * V a r i a b l e
+ * --- */
+
+/**
+ * A constrained variable. In addition to its value, it maintain the
+ * structure of the constraint graph, the current dataflow graph, and
+ * various parameters of interest to the DeltaBlue incremental
+ * constraint solver.
+ **/
+function Variable(name, initialValue) {
+ this.value = initialValue || 0;
+ this.constraints = new OrderedCollection();
+ this.determinedBy = null;
+ this.mark = 0;
+ this.walkStrength = Strength.WEAKEST;
+ this.stay = true;
+ this.name = name;
+}
+
+/**
+ * Add the given constraint to the set of all constraints that refer
+ * this variable.
+ */
+Variable.prototype.addConstraint = function (c) {
+ this.constraints.add(c);
+}
+
+/**
+ * Removes all traces of c from this variable.
+ */
+Variable.prototype.removeConstraint = function (c) {
+ this.constraints.remove(c);
+ if (this.determinedBy == c) this.determinedBy = null;
+}
+
+/* --- *
+ * P l a n n e r
+ * --- */
+
+/**
+ * The DeltaBlue planner
+ */
+function Planner() {
+ this.currentMark = 0;
+}
+
+/**
+ * Attempt to satisfy the given constraint and, if successful,
+ * incrementally update the dataflow graph. Details: If satifying
+ * the constraint is successful, it may override a weaker constraint
+ * on its output. The algorithm attempts to resatisfy that
+ * constraint using some other method. This process is repeated
+ * until either a) it reaches a variable that was not previously
+ * determined by any constraint or b) it reaches a constraint that
+ * is too weak to be satisfied using any of its methods. The
+ * variables of constraints that have been processed are marked with
+ * a unique mark value so that we know where we've been. This allows
+ * the algorithm to avoid getting into an infinite loop even if the
+ * constraint graph has an inadvertent cycle.
+ */
+Planner.prototype.incrementalAdd = function (c) {
+ var mark = this.newMark();
+ var overridden = c.satisfy(mark);
+ while (overridden != null)
+ overridden = overridden.satisfy(mark);
+}
+
+/**
+ * Entry point for retracting a constraint. Remove the given
+ * constraint and incrementally update the dataflow graph.
+ * Details: Retracting the given constraint may allow some currently
+ * unsatisfiable downstream constraint to be satisfied. We therefore collect
+ * a list of unsatisfied downstream constraints and attempt to
+ * satisfy each one in turn. This list is traversed by constraint
+ * strength, strongest first, as a heuristic for avoiding
+ * unnecessarily adding and then overriding weak constraints.
+ * Assume: c is satisfied.
+ */
+Planner.prototype.incrementalRemove = function (c) {
+ var out = c.output();
+ c.markUnsatisfied();
+ c.removeFromGraph();
+ var unsatisfied = this.removePropagateFrom(out);
+ var strength = Strength.REQUIRED;
+ do {
+ for (var i = 0; i < unsatisfied.size(); i++) {
+ var u = unsatisfied.at(i);
+ if (u.strength == strength)
+ this.incrementalAdd(u);
+ }
+ strength = strength.nextWeaker();
+ } while (strength != Strength.WEAKEST);
+}
+
+/**
+ * Select a previously unused mark value.
+ */
+Planner.prototype.newMark = function () {
+ return ++this.currentMark;
+}
+
+/**
+ * Extract a plan for resatisfaction starting from the given source
+ * constraints, usually a set of input constraints. This method
+ * assumes that stay optimization is desired; the plan will contain
+ * only constraints whose output variables are not stay. Constraints
+ * that do no computation, such as stay and edit constraints, are
+ * not included in the plan.
+ * Details: The outputs of a constraint are marked when it is added
+ * to the plan under construction. A constraint may be appended to
+ * the plan when all its input variables are known. A variable is
+ * known if either a) the variable is marked (indicating that has
+ * been computed by a constraint appearing earlier in the plan), b)
+ * the variable is 'stay' (i.e. it is a constant at plan execution
+ * time), or c) the variable is not determined by any
+ * constraint. The last provision is for past states of history
+ * variables, which are not stay but which are also not computed by
+ * any constraint.
+ * Assume: sources are all satisfied.
+ */
+Planner.prototype.makePlan = function (sources) {
+ var mark = this.newMark();
+ var plan = new Plan();
+ var todo = sources;
+ while (todo.size() > 0) {
+ var c = todo.removeFirst();
+ if (c.output().mark != mark && c.inputsKnown(mark)) {
+ plan.addConstraint(c);
+ c.output().mark = mark;
+ this.addConstraintsConsumingTo(c.output(), todo);
+ }
+ }
+ return plan;
+}
+
+/**
+ * Extract a plan for resatisfying starting from the output of the
+ * given constraints, usually a set of input constraints.
+ */
+Planner.prototype.extractPlanFromConstraints = function (constraints) {
+ var sources = new OrderedCollection();
+ for (var i = 0; i < constraints.size(); i++) {
+ var c = constraints.at(i);
+ if (c.isInput() && c.isSatisfied())
+ // not in plan already and eligible for inclusion
+ sources.add(c);
+ }
+ return this.makePlan(sources);
+}
+
+/**
+ * Recompute the walkabout strengths and stay flags of all variables
+ * downstream of the given constraint and recompute the actual
+ * values of all variables whose stay flag is true. If a cycle is
+ * detected, remove the given constraint and answer
+ * false. Otherwise, answer true.
+ * Details: Cycles are detected when a marked variable is
+ * encountered downstream of the given constraint. The sender is
+ * assumed to have marked the inputs of the given constraint with
+ * the given mark. Thus, encountering a marked node downstream of
+ * the output constraint means that there is a path from the
+ * constraint's output to one of its inputs.
+ */
+Planner.prototype.addPropagate = function (c, mark) {
+ var todo = new OrderedCollection();
+ todo.add(c);
+ while (todo.size() > 0) {
+ var d = todo.removeFirst();
+ if (d.output().mark == mark) {
+ this.incrementalRemove(c);
+ return false;
+ }
+ d.recalculate();
+ this.addConstraintsConsumingTo(d.output(), todo);
+ }
+ return true;
+}
+
+
+/**
+ * Update the walkabout strengths and stay flags of all variables
+ * downstream of the given constraint. Answer a collection of
+ * unsatisfied constraints sorted in order of decreasing strength.
+ */
+Planner.prototype.removePropagateFrom = function (out) {
+ out.determinedBy = null;
+ out.walkStrength = Strength.WEAKEST;
+ out.stay = true;
+ var unsatisfied = new OrderedCollection();
+ var todo = new OrderedCollection();
+ todo.add(out);
+ while (todo.size() > 0) {
+ var v = todo.removeFirst();
+ for (var i = 0; i < v.constraints.size(); i++) {
+ var c = v.constraints.at(i);
+ if (!c.isSatisfied())
+ unsatisfied.add(c);
+ }
+ var determining = v.determinedBy;
+ for (var i = 0; i < v.constraints.size(); i++) {
+ var next = v.constraints.at(i);
+ if (next != determining && next.isSatisfied()) {
+ next.recalculate();
+ todo.add(next.output());
+ }
+ }
+ }
+ return unsatisfied;
+}
+
+Planner.prototype.addConstraintsConsumingTo = function (v, coll) {
+ var determining = v.determinedBy;
+ var cc = v.constraints;
+ for (var i = 0; i < cc.size(); i++) {
+ var c = cc.at(i);
+ if (c != determining && c.isSatisfied())
+ coll.add(c);
+ }
+}
+
+/* --- *
+ * P l a n
+ * --- */
+
+/**
+ * A Plan is an ordered list of constraints to be executed in sequence
+ * to resatisfy all currently satisfiable constraints in the face of
+ * one or more changing inputs.
+ */
+function Plan() {
+ this.v = new OrderedCollection();
+}
+
+Plan.prototype.addConstraint = function (c) {
+ this.v.add(c);
+}
+
+Plan.prototype.size = function () {
+ return this.v.size();
+}
+
+Plan.prototype.constraintAt = function (index) {
+ return this.v.at(index);
+}
+
+Plan.prototype.execute = function () {
+ for (var i = 0; i < this.size(); i++) {
+ var c = this.constraintAt(i);
+ c.execute();
+ }
+}
+
+/* --- *
+ * M a i n
+ * --- */
+
+/**
+ * This is the standard DeltaBlue benchmark. A long chain of equality
+ * constraints is constructed with a stay constraint on one end. An
+ * edit constraint is then added to the opposite end and the time is
+ * measured for adding and removing this constraint, and extracting
+ * and executing a constraint satisfaction plan. There are two cases.
+ * In case 1, the added constraint is stronger than the stay
+ * constraint and values must propagate down the entire length of the
+ * chain. In case 2, the added constraint is weaker than the stay
+ * constraint so it cannot be accomodated. The cost in this case is,
+ * of course, very low. Typical situations lie somewhere between these
+ * two extremes.
+ */
+function chainTest(n) {
+ planner = new Planner();
+ var prev = null, first = null, last = null;
+
+ // Build chain of n equality constraints
+ for (var i = 0; i <= n; i++) {
+ var name = "v" + i;
+ var v = new Variable(name);
+ if (prev != null)
+ new EqualityConstraint(prev, v, Strength.REQUIRED);
+ if (i == 0) first = v;
+ if (i == n) last = v;
+ prev = v;
+ }
+
+ new StayConstraint(last, Strength.STRONG_DEFAULT);
+ var edit = new EditConstraint(first, Strength.PREFERRED);
+ var edits = new OrderedCollection();
+ edits.add(edit);
+ var plan = planner.extractPlanFromConstraints(edits);
+ for (var i = 0; i < 100; i++) {
+ first.value = i;
+ plan.execute();
+ if (last.value != i)
+ alert("Chain test failed.");
+ }
+}
+
+/**
+ * This test constructs a two sets of variables related to each
+ * other by a simple linear transformation (scale and offset). The
+ * time is measured to change a variable on either side of the
+ * mapping and to change the scale and offset factors.
+ */
+function projectionTest(n) {
+ planner = new Planner();
+ var scale = new Variable("scale", 10);
+ var offset = new Variable("offset", 1000);
+ var src = null, dst = null;
+
+ var dests = new OrderedCollection();
+ for (var i = 0; i < n; i++) {
+ src = new Variable("src" + i, i);
+ dst = new Variable("dst" + i, i);
+ dests.add(dst);
+ new StayConstraint(src, Strength.NORMAL);
+ new ScaleConstraint(src, scale, offset, dst, Strength.REQUIRED);
+ }
+
+ change(src, 17);
+ if (dst.value != 1170) alert("Projection 1 failed");
+ change(dst, 1050);
+ if (src.value != 5) alert("Projection 2 failed");
+ change(scale, 5);
+ for (var i = 0; i < n - 1; i++) {
+ if (dests.at(i).value != i * 5 + 1000)
+ alert("Projection 3 failed");
+ }
+ change(offset, 2000);
+ for (var i = 0; i < n - 1; i++) {
+ if (dests.at(i).value != i * 5 + 2000)
+ alert("Projection 4 failed");
+ }
+}
+
+function change(v, newValue) {
+ var edit = new EditConstraint(v, Strength.PREFERRED);
+ var edits = new OrderedCollection();
+ edits.add(edit);
+ var plan = planner.extractPlanFromConstraints(edits);
+ for (var i = 0; i < 10; i++) {
+ v.value = newValue;
+ plan.execute();
+ }
+ edit.destroyConstraint();
+}
+
+// Global variable holding the current planner.
+var planner = null;
+
+function deltaBlue() {
+ chainTest(100);
+ projectionTest(100);
+}
+
+for (var i = 0; i < 155; ++i)
+ deltaBlue();
diff --git a/SunSpider/tests/v8-v6/v8-earley-boyer.js b/SunSpider/tests/v8-v6/v8-earley-boyer.js
new file mode 100644
index 0000000..6c4c635
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-earley-boyer.js
@@ -0,0 +1,4683 @@
+// This file is automatically generated by scheme2js, except for the
+// benchmark harness code at the beginning and end of the file.
+
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/************* GENERATED FILE - DO NOT EDIT *************/
+/*
+ * To use write/prints/... the default-output port has to be set first.
+ * Simply setting SC_DEFAULT_OUT and SC_ERROR_OUT to the desired values
+ * should do the trick.
+ * In the following example the std-out and error-port are redirected to
+ * a DIV.
+function initRuntime() {
+ function escapeHTML(s) {
+ var tmp = s;
+ tmp = tmp.replace(/&/g, "&amp;");
+ tmp = tmp.replace(/</g, "&lt;");
+ tmp = tmp.replace(/>/g, "&gt;");
+ tmp = tmp.replace(/ /g, "&nbsp;");
+ tmp = tmp.replace(/\n/g, "<br />");
+ tmp = tmp.replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp");
+ return tmp;
+
+ }
+
+ document.write("<div id='stdout'></div>");
+ SC_DEFAULT_OUT = new sc_GenericOutputPort(
+ function(s) {
+ var stdout = document.getElementById('stdout');
+ stdout.innerHTML = stdout.innerHTML + escapeHTML(s);
+ });
+ SC_ERROR_OUT = SC_DEFAULT_OUT;
+}
+*/
+
+
+function sc_print_debug() {
+ sc_print.apply(null, arguments);
+}
+/*** META ((export *js*)) */
+var sc_JS_GLOBALS = this;
+
+var __sc_LINE=-1;
+var __sc_FILE="";
+
+/*** META ((export #t)) */
+function sc_alert() {
+ var len = arguments.length;
+ var s = "";
+ var i;
+
+ for( i = 0; i < len; i++ ) {
+ s += sc_toDisplayString(arguments[ i ]);
+ }
+
+ return alert( s );
+}
+
+/*** META ((export #t)) */
+function sc_typeof( x ) {
+ return typeof x;
+}
+
+/*** META ((export #t)) */
+function sc_error() {
+ var a = [sc_jsstring2symbol("*error*")];
+ for (var i = 0; i < arguments.length; i++) {
+ a[i+1] = arguments[i];
+ }
+ throw a;
+}
+
+/*** META ((export #t)
+ (peephole (prefix "throw ")))
+*/
+function sc_raise(obj) {
+ throw obj;
+}
+
+/*** META ((export with-handler-lambda)) */
+function sc_withHandlerLambda(handler, body) {
+ try {
+ return body();
+ } catch(e) {
+ if (!e._internalException)
+ return handler(e);
+ else
+ throw e;
+ }
+}
+
+var sc_properties = new Object();
+
+/*** META ((export #t)) */
+function sc_putpropBang(sym, key, val) {
+ var ht = sc_properties[sym];
+ if (!ht) {
+ ht = new Object();
+ sc_properties[sym] = ht;
+ }
+ ht[key] = val;
+}
+
+/*** META ((export #t)) */
+function sc_getprop(sym, key) {
+ var ht = sc_properties[sym];
+ if (ht) {
+ if (key in ht)
+ return ht[key];
+ else
+ return false;
+ } else
+ return false;
+}
+
+/*** META ((export #t)) */
+function sc_rempropBang(sym, key) {
+ var ht = sc_properties[sym];
+ if (ht)
+ delete ht[key];
+}
+
+/*** META ((export #t)) */
+function sc_any2String(o) {
+ return jsstring2string(sc_toDisplayString(o));
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "==="))
+ (type bool))
+*/
+function sc_isEqv(o1, o2) {
+ return (o1 === o2);
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "==="))
+ (type bool))
+*/
+function sc_isEq(o1, o2) {
+ return (o1 === o2);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isNumber(n) {
+ return (typeof n === "number");
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isComplex(n) {
+ return sc_isNumber(n);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isReal(n) {
+ return sc_isNumber(n);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isRational(n) {
+ return sc_isReal(n);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isInteger(n) {
+ return (parseInt(n) === n);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix ", false")))
+*/
+// we don't have exact numbers...
+function sc_isExact(n) {
+ return false;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ", true"))
+ (type bool))
+*/
+function sc_isInexact(n) {
+ return true;
+}
+
+/*** META ((export = =fx =fl)
+ (type bool)
+ (peephole (infix 2 2 "===")))
+*/
+function sc_equal(x) {
+ for (var i = 1; i < arguments.length; i++)
+ if (x !== arguments[i])
+ return false;
+ return true;
+}
+
+/*** META ((export < <fx <fl)
+ (type bool)
+ (peephole (infix 2 2 "<")))
+*/
+function sc_less(x) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x >= arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export > >fx >fl)
+ (type bool)
+ (peephole (infix 2 2 ">")))
+*/
+function sc_greater(x, y) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x <= arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export <= <=fx <=fl)
+ (type bool)
+ (peephole (infix 2 2 "<=")))
+*/
+function sc_lessEqual(x, y) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x > arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export >= >=fl >=fx)
+ (type bool)
+ (peephole (infix 2 2 ">=")))
+*/
+function sc_greaterEqual(x, y) {
+ for (var i = 1; i < arguments.length; i++) {
+ if (x < arguments[i])
+ return false;
+ x = arguments[i];
+ }
+ return true;
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "=== 0")))
+*/
+function sc_isZero(x) {
+ return (x === 0);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "> 0")))
+*/
+function sc_isPositive(x) {
+ return (x > 0);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "< 0")))
+*/
+function sc_isNegative(x) {
+ return (x < 0);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "%2===1")))
+*/
+function sc_isOdd(x) {
+ return (x % 2 === 1);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "%2===0")))
+*/
+function sc_isEven(x) {
+ return (x % 2 === 0);
+}
+
+/*** META ((export #t)) */
+var sc_max = Math.max;
+/*** META ((export #t)) */
+var sc_min = Math.min;
+
+/*** META ((export + +fx +fl)
+ (peephole (infix 0 #f "+" "0")))
+*/
+function sc_plus() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++)
+ sum += arguments[i];
+ return sum;
+}
+
+/*** META ((export * *fx *fl)
+ (peephole (infix 0 #f "*" "1")))
+*/
+function sc_multi() {
+ var product = 1;
+ for (var i = 0; i < arguments.length; i++)
+ product *= arguments[i];
+ return product;
+}
+
+/*** META ((export - -fx -fl)
+ (peephole (minus)))
+*/
+function sc_minus(x) {
+ if (arguments.length === 1)
+ return -x;
+ else {
+ var res = x;
+ for (var i = 1; i < arguments.length; i++)
+ res -= arguments[i];
+ return res;
+ }
+}
+
+/*** META ((export / /fl)
+ (peephole (div)))
+*/
+function sc_div(x) {
+ if (arguments.length === 1)
+ return 1/x;
+ else {
+ var res = x;
+ for (var i = 1; i < arguments.length; i++)
+ res /= arguments[i];
+ return res;
+ }
+}
+
+/*** META ((export #t)) */
+var sc_abs = Math.abs;
+
+/*** META ((export quotient /fx)
+ (peephole (hole 2 "parseInt(" x "/" y ")")))
+*/
+function sc_quotient(x, y) {
+ return parseInt(x / y);
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "%")))
+*/
+function sc_remainder(x, y) {
+ return x % y;
+}
+
+/*** META ((export #t)
+ (peephole (modulo)))
+*/
+function sc_modulo(x, y) {
+ var remainder = x % y;
+ // if they don't have the same sign
+ if ((remainder * y) < 0)
+ return remainder + y;
+ else
+ return remainder;
+}
+
+function sc_euclid_gcd(a, b) {
+ var temp;
+ if (a === 0) return b;
+ if (b === 0) return a;
+ if (a < 0) {a = -a;};
+ if (b < 0) {b = -b;};
+ if (b > a) {temp = a; a = b; b = temp;};
+ while (true) {
+ a %= b;
+ if(a === 0) {return b;};
+ b %= a;
+ if(b === 0) {return a;};
+ };
+ return b;
+}
+
+/*** META ((export #t)) */
+function sc_gcd() {
+ var gcd = 0;
+ for (var i = 0; i < arguments.length; i++)
+ gcd = sc_euclid_gcd(gcd, arguments[i]);
+ return gcd;
+}
+
+/*** META ((export #t)) */
+function sc_lcm() {
+ var lcm = 1;
+ for (var i = 0; i < arguments.length; i++) {
+ var f = Math.round(arguments[i] / sc_euclid_gcd(arguments[i], lcm));
+ lcm *= Math.abs(f);
+ }
+ return lcm;
+}
+
+// LIMITATION: numerator and denominator don't make sense in floating point world.
+//var SC_MAX_DECIMALS = 1000000
+//
+// function sc_numerator(x) {
+// var rounded = Math.round(x * SC_MAX_DECIMALS);
+// return Math.round(rounded / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
+// }
+
+// function sc_denominator(x) {
+// var rounded = Math.round(x * SC_MAX_DECIMALS);
+// return Math.round(SC_MAX_DECIMALS / sc_euclid_gcd(rounded, SC_MAX_DECIMALS));
+// }
+
+/*** META ((export #t)) */
+var sc_floor = Math.floor;
+/*** META ((export #t)) */
+var sc_ceiling = Math.ceil;
+/*** META ((export #t)) */
+var sc_truncate = parseInt;
+/*** META ((export #t)) */
+var sc_round = Math.round;
+
+// LIMITATION: sc_rationalize doesn't make sense in a floating point world.
+
+/*** META ((export #t)) */
+var sc_exp = Math.exp;
+/*** META ((export #t)) */
+var sc_log = Math.log;
+/*** META ((export #t)) */
+var sc_sin = Math.sin;
+/*** META ((export #t)) */
+var sc_cos = Math.cos;
+/*** META ((export #t)) */
+var sc_tan = Math.tan;
+/*** META ((export #t)) */
+var sc_asin = Math.asin;
+/*** META ((export #t)) */
+var sc_acos = Math.acos;
+/*** META ((export #t)) */
+var sc_atan = Math.atan;
+
+/*** META ((export #t)) */
+var sc_sqrt = Math.sqrt;
+/*** META ((export #t)) */
+var sc_expt = Math.pow;
+
+// LIMITATION: we don't have complex numbers.
+// LIMITATION: the following functions are hence not implemented.
+// LIMITATION: make-rectangular, make-polar, real-part, imag-part, magnitude, angle
+// LIMITATION: 2 argument atan
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_exact2inexact(x) {
+ return x;
+}
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_inexact2exact(x) {
+ return x;
+}
+
+function sc_number2jsstring(x, radix) {
+ if (radix)
+ return x.toString(radix);
+ else
+ return x.toString();
+}
+
+function sc_jsstring2number(s, radix) {
+ if (s === "") return false;
+
+ if (radix) {
+ var t = parseInt(s, radix);
+ if (!t && t !== 0) return false;
+ // verify that each char is in range. (parseInt ignores leading
+ // white and trailing chars)
+ var allowedChars = "01234567890abcdefghijklmnopqrstuvwxyz".substring(0, radix+1);
+ if ((new RegExp("^["+allowedChars+"]*$", "i")).test(s))
+ return t;
+ else return false;
+ } else {
+ var t = +s; // does not ignore trailing chars.
+ if (!t && t !== 0) return false;
+ // simply verify that first char is not whitespace.
+ var c = s.charAt(0);
+ // if +c is 0, but the char is not "0", then we have a whitespace.
+ if (+c === 0 && c !== "0") return false;
+ return t;
+ }
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (not)))
+*/
+function sc_not(b) {
+ return b === false;
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isBoolean(b) {
+ return (b === true) || (b === false);
+}
+
+function sc_Pair(car, cdr) {
+ this.car = car;
+ this.cdr = cdr;
+}
+
+sc_Pair.prototype.toString = function() {
+ return sc_toDisplayString(this);
+};
+sc_Pair.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
+ var current = this;
+
+ var res = "(";
+
+ while(true) {
+ res += writeOrDisplay(current.car);
+ if (sc_isPair(current.cdr)) {
+ res += " ";
+ current = current.cdr;
+ } else if (current.cdr !== null) {
+ res += " . " + writeOrDisplay(current.cdr);
+ break;
+ } else // current.cdr == null
+ break;
+ }
+
+ res += ")";
+
+ return res;
+};
+sc_Pair.prototype.sc_toDisplayString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toDisplayString);
+};
+sc_Pair.prototype.sc_toWriteString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toWriteString);
+};
+// sc_Pair.prototype.sc_toWriteCircleString in IO.js
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_Pair")))
+*/
+function sc_isPair(p) {
+ return (p instanceof sc_Pair);
+}
+
+function sc_isPairEqual(p1, p2, comp) {
+ return (comp(p1.car, p2.car) && comp(p1.cdr, p2.cdr));
+}
+
+/*** META ((export #t)
+ (peephole (hole 2 "new sc_Pair(" car ", " cdr ")")))
+*/
+function sc_cons(car, cdr) {
+ return new sc_Pair(car, cdr);
+}
+
+/*** META ((export cons*)) */
+function sc_consStar() {
+ var res = arguments[arguments.length - 1];
+ for (var i = arguments.length-2; i >= 0; i--)
+ res = new sc_Pair(arguments[i], res);
+ return res;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".car")))
+*/
+function sc_car(p) {
+ return p.car;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".cdr")))
+*/
+function sc_cdr(p) {
+ return p.cdr;
+}
+
+/*** META ((export #t)
+ (peephole (hole 2 p ".car = " val)))
+*/
+function sc_setCarBang(p, val) {
+ p.car = val;
+}
+
+/*** META ((export #t)
+ (peephole (hole 2 p ".cdr = " val)))
+*/
+function sc_setCdrBang(p, val) {
+ p.cdr = val;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".car.car")))
+*/
+function sc_caar(p) { return p.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car")))
+*/
+function sc_cadr(p) { return p.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr")))
+*/
+function sc_cdar(p) { return p.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr")))
+*/
+function sc_cddr(p) { return p.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.car")))
+*/
+function sc_caaar(p) { return p.car.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.car")))
+*/
+function sc_cadar(p) { return p.car.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.car")))
+*/
+function sc_caadr(p) { return p.cdr.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.car")))
+*/
+function sc_caddr(p) { return p.cdr.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.cdr")))
+*/
+function sc_cdaar(p) { return p.car.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.cdr")))
+*/
+function sc_cdadr(p) { return p.cdr.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.cdr")))
+*/
+function sc_cddar(p) { return p.car.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.cdr")))
+*/
+function sc_cdddr(p) { return p.cdr.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.car.car")))
+*/
+function sc_caaaar(p) { return p.car.car.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.car.car")))
+*/
+function sc_caadar(p) { return p.car.cdr.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.car.car")))
+*/
+function sc_caaadr(p) { return p.cdr.car.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.car.car")))
+*/
+function sc_caaddr(p) { return p.cdr.cdr.car.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.car.cdr")))
+*/
+function sc_cdaaar(p) { return p.car.car.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.car.cdr")))
+*/
+function sc_cdadar(p) { return p.car.cdr.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.car.cdr")))
+*/
+function sc_cdaadr(p) { return p.cdr.car.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.car.cdr")))
+*/
+function sc_cdaddr(p) { return p.cdr.cdr.car.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.cdr.car")))
+*/
+function sc_cadaar(p) { return p.car.car.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.cdr.car")))
+*/
+function sc_caddar(p) { return p.car.cdr.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.cdr.car")))
+*/
+function sc_cadadr(p) { return p.cdr.car.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.cdr.car")))
+*/
+function sc_cadddr(p) { return p.cdr.cdr.cdr.car; }
+/*** META ((export #t)
+ (peephole (postfix ".car.car.cdr.cdr")))
+*/
+function sc_cddaar(p) { return p.car.car.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".car.cdr.cdr.cdr")))
+*/
+function sc_cdddar(p) { return p.car.cdr.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.car.cdr.cdr")))
+*/
+function sc_cddadr(p) { return p.cdr.car.cdr.cdr; }
+/*** META ((export #t)
+ (peephole (postfix ".cdr.cdr.cdr.cdr")))
+*/
+function sc_cddddr(p) { return p.cdr.cdr.cdr.cdr; }
+
+/*** META ((export #t)) */
+function sc_lastPair(l) {
+ if (!sc_isPair(l)) sc_error("sc_lastPair: pair expected");
+ var res = l;
+ var cdr = l.cdr;
+ while (sc_isPair(cdr)) {
+ res = cdr;
+ cdr = res.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " === null")))
+*/
+function sc_isNull(o) {
+ return (o === null);
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isList(o) {
+ var rabbit;
+ var turtle;
+
+ var rabbit = o;
+ var turtle = o;
+ while (true) {
+ if (rabbit === null ||
+ (rabbit instanceof sc_Pair && rabbit.cdr === null))
+ return true; // end of list
+ else if ((rabbit instanceof sc_Pair) &&
+ (rabbit.cdr instanceof sc_Pair)) {
+ rabbit = rabbit.cdr.cdr;
+ turtle = turtle.cdr;
+ if (rabbit === turtle) return false; // cycle
+ } else
+ return false; // not pair
+ }
+}
+
+/*** META ((export #t)) */
+function sc_list() {
+ var res = null;
+ var a = arguments;
+ for (var i = a.length-1; i >= 0; i--)
+ res = new sc_Pair(a[i], res);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_iota(num, init) {
+ var res = null;
+ if (!init) init = 0;
+ for (var i = num - 1; i >= 0; i--)
+ res = new sc_Pair(i + init, res);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_makeList(nbEls, fill) {
+ var res = null;
+ for (var i = 0; i < nbEls; i++)
+ res = new sc_Pair(fill, res);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_length(l) {
+ var res = 0;
+ while (l !== null) {
+ res++;
+ l = l.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_remq(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ while (l !== null) {
+ if (l.car !== o) {
+ tail.cdr = sc_cons(l.car, null);
+ tail = tail.cdr;
+ }
+ l = l.cdr;
+ }
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_remqBang(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ var needsAssig = true;
+ while (l !== null) {
+ if (l.car === o) {
+ needsAssig = true;
+ } else {
+ if (needsAssig) {
+ tail.cdr = l;
+ needsAssig = false;
+ }
+ tail = l;
+ }
+ l = l.cdr;
+ }
+ tail.cdr = null;
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_delete(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ while (l !== null) {
+ if (!sc_isEqual(l.car, o)) {
+ tail.cdr = sc_cons(l.car, null);
+ tail = tail.cdr;
+ }
+ l = l.cdr;
+ }
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_deleteBang(o, l) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ var needsAssig = true;
+ while (l !== null) {
+ if (sc_isEqual(l.car, o)) {
+ needsAssig = true;
+ } else {
+ if (needsAssig) {
+ tail.cdr = l;
+ needsAssig = false;
+ }
+ tail = l;
+ }
+ l = l.cdr;
+ }
+ tail.cdr = null;
+ return dummy.cdr;
+}
+
+function sc_reverseAppendBang(l1, l2) {
+ var res = l2;
+ while (l1 !== null) {
+ var tmp = res;
+ res = l1;
+ l1 = l1.cdr;
+ res.cdr = tmp;
+ }
+ return res;
+}
+
+function sc_dualAppend(l1, l2) {
+ if (l1 === null) return l2;
+ if (l2 === null) return l1;
+ var rev = sc_reverse(l1);
+ return sc_reverseAppendBang(rev, l2);
+}
+
+/*** META ((export #t)) */
+function sc_append() {
+ if (arguments.length === 0)
+ return null;
+ var res = arguments[arguments.length - 1];
+ for (var i = arguments.length - 2; i >= 0; i--)
+ res = sc_dualAppend(arguments[i], res);
+ return res;
+}
+
+function sc_dualAppendBang(l1, l2) {
+ if (l1 === null) return l2;
+ if (l2 === null) return l1;
+ var tmp = l1;
+ while (tmp.cdr !== null) tmp=tmp.cdr;
+ tmp.cdr = l2;
+ return l1;
+}
+
+/*** META ((export #t)) */
+function sc_appendBang() {
+ var res = null;
+ for (var i = 0; i < arguments.length; i++)
+ res = sc_dualAppendBang(res, arguments[i]);
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_reverse(l1) {
+ var res = null;
+ while (l1 !== null) {
+ res = sc_cons(l1.car, res);
+ l1 = l1.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_reverseBang(l) {
+ return sc_reverseAppendBang(l, null);
+}
+
+/*** META ((export #t)) */
+function sc_listTail(l, k) {
+ var res = l;
+ for (var i = 0; i < k; i++) {
+ res = res.cdr;
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_listRef(l, k) {
+ return sc_listTail(l, k).car;
+}
+
+/* // unoptimized generic versions
+function sc_memX(o, l, comp) {
+ while (l != null) {
+ if (comp(l.car, o))
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+function sc_memq(o, l) { return sc_memX(o, l, sc_isEq); }
+function sc_memv(o, l) { return sc_memX(o, l, sc_isEqv); }
+function sc_member(o, l) { return sc_memX(o, l, sc_isEqual); }
+*/
+
+/* optimized versions */
+/*** META ((export #t)) */
+function sc_memq(o, l) {
+ while (l !== null) {
+ if (l.car === o)
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_memv(o, l) {
+ while (l !== null) {
+ if (l.car === o)
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_member(o, l) {
+ while (l !== null) {
+ if (sc_isEqual(l.car,o))
+ return l;
+ l = l.cdr;
+ }
+ return false;
+}
+
+/* // generic unoptimized versions
+function sc_assX(o, al, comp) {
+ while (al != null) {
+ if (comp(al.car.car, o))
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+function sc_assq(o, al) { return sc_assX(o, al, sc_isEq); }
+function sc_assv(o, al) { return sc_assX(o, al, sc_isEqv); }
+function sc_assoc(o, al) { return sc_assX(o, al, sc_isEqual); }
+*/
+// optimized versions
+/*** META ((export #t)) */
+function sc_assq(o, al) {
+ while (al !== null) {
+ if (al.car.car === o)
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_assv(o, al) {
+ while (al !== null) {
+ if (al.car.car === o)
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+/*** META ((export #t)) */
+function sc_assoc(o, al) {
+ while (al !== null) {
+ if (sc_isEqual(al.car.car, o))
+ return al.car;
+ al = al.cdr;
+ }
+ return false;
+}
+
+/* can be used for mutable strings and characters */
+function sc_isCharStringEqual(cs1, cs2) { return cs1.val === cs2.val; }
+function sc_isCharStringLess(cs1, cs2) { return cs1.val < cs2.val; }
+function sc_isCharStringGreater(cs1, cs2) { return cs1.val > cs2.val; }
+function sc_isCharStringLessEqual(cs1, cs2) { return cs1.val <= cs2.val; }
+function sc_isCharStringGreaterEqual(cs1, cs2) { return cs1.val >= cs2.val; }
+function sc_isCharStringCIEqual(cs1, cs2)
+ { return cs1.val.toLowerCase() === cs2.val.toLowerCase(); }
+function sc_isCharStringCILess(cs1, cs2)
+ { return cs1.val.toLowerCase() < cs2.val.toLowerCase(); }
+function sc_isCharStringCIGreater(cs1, cs2)
+ { return cs1.val.toLowerCase() > cs2.val.toLowerCase(); }
+function sc_isCharStringCILessEqual(cs1, cs2)
+ { return cs1.val.toLowerCase() <= cs2.val.toLowerCase(); }
+function sc_isCharStringCIGreaterEqual(cs1, cs2)
+ { return cs1.val.toLowerCase() >= cs2.val.toLowerCase(); }
+
+
+
+
+function sc_Char(c) {
+ var cached = sc_Char.lazy[c];
+ if (cached)
+ return cached;
+ this.val = c;
+ sc_Char.lazy[c] = this;
+ // add return, so FF does not complain.
+ return undefined;
+}
+sc_Char.lazy = new Object();
+// thanks to Eric
+sc_Char.char2readable = {
+ "\000": "#\\null",
+ "\007": "#\\bell",
+ "\010": "#\\backspace",
+ "\011": "#\\tab",
+ "\012": "#\\newline",
+ "\014": "#\\page",
+ "\015": "#\\return",
+ "\033": "#\\escape",
+ "\040": "#\\space",
+ "\177": "#\\delete",
+
+ /* poeticless names */
+ "\001": "#\\soh",
+ "\002": "#\\stx",
+ "\003": "#\\etx",
+ "\004": "#\\eot",
+ "\005": "#\\enq",
+ "\006": "#\\ack",
+
+ "\013": "#\\vt",
+ "\016": "#\\so",
+ "\017": "#\\si",
+
+ "\020": "#\\dle",
+ "\021": "#\\dc1",
+ "\022": "#\\dc2",
+ "\023": "#\\dc3",
+ "\024": "#\\dc4",
+ "\025": "#\\nak",
+ "\026": "#\\syn",
+ "\027": "#\\etb",
+
+ "\030": "#\\can",
+ "\031": "#\\em",
+ "\032": "#\\sub",
+ "\033": "#\\esc",
+ "\034": "#\\fs",
+ "\035": "#\\gs",
+ "\036": "#\\rs",
+ "\037": "#\\us"};
+
+sc_Char.readable2char = {
+ "null": "\000",
+ "bell": "\007",
+ "backspace": "\010",
+ "tab": "\011",
+ "newline": "\012",
+ "page": "\014",
+ "return": "\015",
+ "escape": "\033",
+ "space": "\040",
+ "delete": "\000",
+ "soh": "\001",
+ "stx": "\002",
+ "etx": "\003",
+ "eot": "\004",
+ "enq": "\005",
+ "ack": "\006",
+ "bel": "\007",
+ "bs": "\010",
+ "ht": "\011",
+ "nl": "\012",
+ "vt": "\013",
+ "np": "\014",
+ "cr": "\015",
+ "so": "\016",
+ "si": "\017",
+ "dle": "\020",
+ "dc1": "\021",
+ "dc2": "\022",
+ "dc3": "\023",
+ "dc4": "\024",
+ "nak": "\025",
+ "syn": "\026",
+ "etb": "\027",
+ "can": "\030",
+ "em": "\031",
+ "sub": "\032",
+ "esc": "\033",
+ "fs": "\034",
+ "gs": "\035",
+ "rs": "\036",
+ "us": "\037",
+ "sp": "\040",
+ "del": "\177"};
+
+sc_Char.prototype.toString = function() {
+ return this.val;
+};
+// sc_toDisplayString == toString
+sc_Char.prototype.sc_toWriteString = function() {
+ var entry = sc_Char.char2readable[this.val];
+ if (entry)
+ return entry;
+ else
+ return "#\\" + this.val;
+};
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix "instanceof sc_Char")))
+*/
+function sc_isChar(c) {
+ return (c instanceof sc_Char);
+}
+
+/*** META ((export char=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val === " c2 ".val")))
+*/
+var sc_isCharEqual = sc_isCharStringEqual;
+/*** META ((export char<?)
+ (type bool)
+ (peephole (hole 2 c1 ".val < " c2 ".val")))
+*/
+var sc_isCharLess = sc_isCharStringLess;
+/*** META ((export char>?)
+ (type bool)
+ (peephole (hole 2 c1 ".val > " c2 ".val")))
+*/
+var sc_isCharGreater = sc_isCharStringGreater;
+/*** META ((export char<=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val <= " c2 ".val")))
+*/
+var sc_isCharLessEqual = sc_isCharStringLessEqual;
+/*** META ((export char>=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val >= " c2 ".val")))
+*/
+var sc_isCharGreaterEqual = sc_isCharStringGreaterEqual;
+/*** META ((export char-ci=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() === " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCIEqual = sc_isCharStringCIEqual;
+/*** META ((export char-ci<?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() < " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCILess = sc_isCharStringCILess;
+/*** META ((export char-ci>?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() > " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCIGreater = sc_isCharStringCIGreater;
+/*** META ((export char-ci<=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() <= " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCILessEqual = sc_isCharStringCILessEqual;
+/*** META ((export char-ci>=?)
+ (type bool)
+ (peephole (hole 2 c1 ".val.toLowerCase() >= " c2 ".val.toLowerCase()")))
+*/
+var sc_isCharCIGreaterEqual = sc_isCharStringCIGreaterEqual;
+
+var SC_NUMBER_CLASS = "0123456789";
+var SC_WHITESPACE_CLASS = ' \r\n\t\f';
+var SC_LOWER_CLASS = 'abcdefghijklmnopqrstuvwxyz';
+var SC_UPPER_CLASS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+
+function sc_isCharOfClass(c, cl) { return (cl.indexOf(c) != -1); }
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isCharAlphabetic(c)
+ { return sc_isCharOfClass(c.val, SC_LOWER_CLASS) ||
+ sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "SC_NUMBER_CLASS.indexOf(" c ".val) != -1")))
+*/
+function sc_isCharNumeric(c)
+ { return sc_isCharOfClass(c.val, SC_NUMBER_CLASS); }
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isCharWhitespace(c) {
+ var tmp = c.val;
+ return tmp === " " || tmp === "\r" || tmp === "\n" || tmp === "\t" || tmp === "\f";
+}
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "SC_UPPER_CLASS.indexOf(" c ".val) != -1")))
+*/
+function sc_isCharUpperCase(c)
+ { return sc_isCharOfClass(c.val, SC_UPPER_CLASS); }
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "SC_LOWER_CLASS.indexOf(" c ".val) != -1")))
+*/
+function sc_isCharLowerCase(c)
+ { return sc_isCharOfClass(c.val, SC_LOWER_CLASS); }
+
+/*** META ((export #t)
+ (peephole (postfix ".val.charCodeAt(0)")))
+*/
+function sc_char2integer(c)
+ { return c.val.charCodeAt(0); }
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Char(String.fromCharCode(" n "))")))
+*/
+function sc_integer2char(n)
+ { return new sc_Char(String.fromCharCode(n)); }
+
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Char(" c ".val.toUpperCase())")))
+*/
+function sc_charUpcase(c)
+ { return new sc_Char(c.val.toUpperCase()); }
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Char(" c ".val.toLowerCase())")))
+*/
+function sc_charDowncase(c)
+ { return new sc_Char(c.val.toLowerCase()); }
+
+function sc_makeJSStringOfLength(k, c) {
+ var fill;
+ if (c === undefined)
+ fill = " ";
+ else
+ fill = c;
+ var res = "";
+ var len = 1;
+ // every round doubles the size of fill.
+ while (k >= len) {
+ if (k & len)
+ res = res.concat(fill);
+ fill = fill.concat(fill);
+ len *= 2;
+ }
+ return res;
+}
+
+function sc_makejsString(k, c) {
+ var fill;
+ if (c)
+ fill = c.val;
+ else
+ fill = " ";
+ return sc_makeJSStringOfLength(k, fill);
+}
+
+function sc_jsstring2list(s) {
+ var res = null;
+ for (var i = s.length - 1; i >= 0; i--)
+ res = sc_cons(new sc_Char(s.charAt(i)), res);
+ return res;
+}
+
+function sc_list2jsstring(l) {
+ var a = new Array();
+ while(l !== null) {
+ a.push(l.car.val);
+ l = l.cdr;
+ }
+ return "".concat.apply("", a);
+}
+
+var sc_Vector = Array;
+
+sc_Vector.prototype.sc_toWriteOrDisplayString = function(writeOrDisplay) {
+ if (this.length === 0) return "#()";
+
+ var res = "#(" + writeOrDisplay(this[0]);
+ for (var i = 1; i < this.length; i++)
+ res += " " + writeOrDisplay(this[i]);
+ res += ")";
+ return res;
+};
+sc_Vector.prototype.sc_toDisplayString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toDisplayString);
+};
+sc_Vector.prototype.sc_toWriteString = function() {
+ return this.sc_toWriteOrDisplayString(sc_toWriteString);
+};
+
+/*** META ((export vector? array?)
+ (type bool)
+ (peephole (postfix " instanceof sc_Vector")))
+*/
+function sc_isVector(v) {
+ return (v instanceof sc_Vector);
+}
+
+// only applies to vectors
+function sc_isVectorEqual(v1, v2, comp) {
+ if (v1.length !== v2.length) return false;
+ for (var i = 0; i < v1.length; i++)
+ if (!comp(v1[i], v2[i])) return false;
+ return true;
+}
+
+/*** META ((export make-vector make-array)) */
+function sc_makeVector(size, fill) {
+ var a = new sc_Vector(size);
+ if (fill !== undefined)
+ sc_vectorFillBang(a, fill);
+ return a;
+}
+
+/*** META ((export vector array)
+ (peephole (vector)))
+*/
+function sc_vector() {
+ var a = new sc_Vector();
+ for (var i = 0; i < arguments.length; i++)
+ a.push(arguments[i]);
+ return a;
+}
+
+/*** META ((export vector-length array-length)
+ (peephole (postfix ".length")))
+*/
+function sc_vectorLength(v) {
+ return v.length;
+}
+
+/*** META ((export vector-ref array-ref)
+ (peephole (hole 2 v "[" pos "]")))
+*/
+function sc_vectorRef(v, pos) {
+ return v[pos];
+}
+
+/*** META ((export vector-set! array-set!)
+ (peephole (hole 3 v "[" pos "] = " val)))
+*/
+function sc_vectorSetBang(v, pos, val) {
+ v[pos] = val;
+}
+
+/*** META ((export vector->list array->list)) */
+function sc_vector2list(a) {
+ var res = null;
+ for (var i = a.length-1; i >= 0; i--)
+ res = sc_cons(a[i], res);
+ return res;
+}
+
+/*** META ((export list->vector list->array)) */
+function sc_list2vector(l) {
+ var a = new sc_Vector();
+ while(l !== null) {
+ a.push(l.car);
+ l = l.cdr;
+ }
+ return a;
+}
+
+/*** META ((export vector-fill! array-fill!)) */
+function sc_vectorFillBang(a, fill) {
+ for (var i = 0; i < a.length; i++)
+ a[i] = fill;
+}
+
+
+/*** META ((export #t)) */
+function sc_copyVector(a, len) {
+ if (len <= a.length)
+ return a.slice(0, len);
+ else {
+ var tmp = a.concat();
+ tmp.length = len;
+ return tmp;
+ }
+}
+
+/*** META ((export #t)
+ (peephole (hole 3 a ".slice(" start "," end ")")))
+*/
+function sc_vectorCopy(a, start, end) {
+ return a.slice(start, end);
+}
+
+/*** META ((export #t)) */
+function sc_vectorCopyBang(target, tstart, source, sstart, send) {
+ if (!sstart) sstart = 0;
+ if (!send) send = source.length;
+
+ // if target == source we don't want to overwrite not yet copied elements.
+ if (tstart <= sstart) {
+ for (var i = tstart, j = sstart; j < send; i++, j++) {
+ target[i] = source[j];
+ }
+ } else {
+ var diff = send - sstart;
+ for (var i = tstart + diff - 1, j = send - 1;
+ j >= sstart;
+ i--, j--) {
+ target[i] = source[j];
+ }
+ }
+ return target;
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 1 "typeof " o " === 'function'")))
+*/
+function sc_isProcedure(o) {
+ return (typeof o === "function");
+}
+
+/*** META ((export #t)) */
+function sc_apply(proc) {
+ var args = new Array();
+ // first part of arguments are not in list-form.
+ for (var i = 1; i < arguments.length - 1; i++)
+ args.push(arguments[i]);
+ var l = arguments[arguments.length - 1];
+ while (l !== null) {
+ args.push(l.car);
+ l = l.cdr;
+ }
+ return proc.apply(null, args);
+}
+
+/*** META ((export #t)) */
+function sc_map(proc, l1) {
+ if (l1 === undefined)
+ return null;
+ // else
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ var revres = null;
+ while (l1 !== null) {
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ revres = sc_cons(proc.apply(null, applyArgs), revres);
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_mapBang(proc, l1) {
+ if (l1 === undefined)
+ return null;
+ // else
+ var l1_orig = l1;
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ while (l1 !== null) {
+ var tmp = l1;
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ tmp.car = proc.apply(null, applyArgs);
+ }
+ return l1_orig;
+}
+
+/*** META ((export #t)) */
+function sc_forEach(proc, l1) {
+ if (l1 === undefined)
+ return undefined;
+ // else
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ while (l1 !== null) {
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ proc.apply(null, applyArgs);
+ }
+ // add return so FF does not complain.
+ return undefined;
+}
+
+/*** META ((export #t)) */
+function sc_filter(proc, l1) {
+ var dummy = { cdr : null };
+ var tail = dummy;
+ while (l1 !== null) {
+ if (proc(l1.car) !== false) {
+ tail.cdr = sc_cons(l1.car, null);
+ tail = tail.cdr;
+ }
+ l1 = l1.cdr;
+ }
+ return dummy.cdr;
+}
+
+/*** META ((export #t)) */
+function sc_filterBang(proc, l1) {
+ var head = sc_cons("dummy", l1);
+ var it = head;
+ var next = l1;
+ while (next !== null) {
+ if (proc(next.car) !== false) {
+ it.cdr = next
+ it = next;
+ }
+ next = next.cdr;
+ }
+ it.cdr = null;
+ return head.cdr;
+}
+
+function sc_filterMap1(proc, l1) {
+ var revres = null;
+ while (l1 !== null) {
+ var tmp = proc(l1.car)
+ if (tmp !== false) revres = sc_cons(tmp, revres);
+ l1 = l1.cdr;
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+function sc_filterMap2(proc, l1, l2) {
+ var revres = null;
+ while (l1 !== null) {
+ var tmp = proc(l1.car, l2.car);
+ if(tmp !== false) revres = sc_cons(tmp, revres);
+ l1 = l1.cdr;
+ l2 = l2.cdr
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_filterMap(proc, l1, l2, l3) {
+ if (l2 === undefined)
+ return sc_filterMap1(proc, l1);
+ else if (l3 === undefined)
+ return sc_filterMap2(proc, l1, l2);
+ // else
+ var nbApplyArgs = arguments.length - 1;
+ var applyArgs = new Array(nbApplyArgs);
+ var revres = null;
+ while (l1 !== null) {
+ for (var i = 0; i < nbApplyArgs; i++) {
+ applyArgs[i] = arguments[i + 1].car;
+ arguments[i + 1] = arguments[i + 1].cdr;
+ }
+ var tmp = proc.apply(null, applyArgs);
+ if(tmp !== false) revres = sc_cons(tmp, revres);
+ }
+ return sc_reverseAppendBang(revres, null);
+}
+
+/*** META ((export #t)) */
+function sc_any(proc, l) {
+ var revres = null;
+ while (l !== null) {
+ var tmp = proc(l.car);
+ if(tmp !== false) return tmp;
+ l = l.cdr;
+ }
+ return false;
+}
+
+/*** META ((export any?)
+ (peephole (hole 2 "sc_any(" proc "," l ") !== false")))
+*/
+function sc_anyPred(proc, l) {
+ return sc_any(proc, l)!== false;
+}
+
+/*** META ((export #t)) */
+function sc_every(proc, l) {
+ var revres = null;
+ var tmp = true;
+ while (l !== null) {
+ tmp = proc(l.car);
+ if (tmp === false) return false;
+ l = l.cdr;
+ }
+ return tmp;
+}
+
+/*** META ((export every?)
+ (peephole (hole 2 "sc_every(" proc "," l ") !== false")))
+*/
+function sc_everyPred(proc, l) {
+ var tmp = sc_every(proc, l);
+ if (tmp !== false) return true;
+ return false;
+}
+
+/*** META ((export #t)
+ (peephole (postfix "()")))
+*/
+function sc_force(o) {
+ return o();
+}
+
+/*** META ((export #t)) */
+function sc_makePromise(proc) {
+ var isResultReady = false;
+ var result = undefined;
+ return function() {
+ if (!isResultReady) {
+ var tmp = proc();
+ if (!isResultReady) {
+ isResultReady = true;
+ result = tmp;
+ }
+ }
+ return result;
+ };
+}
+
+function sc_Values(values) {
+ this.values = values;
+}
+
+/*** META ((export #t)
+ (peephole (values)))
+*/
+function sc_values() {
+ if (arguments.length === 1)
+ return arguments[0];
+ else
+ return new sc_Values(arguments);
+}
+
+/*** META ((export #t)) */
+function sc_callWithValues(producer, consumer) {
+ var produced = producer();
+ if (produced instanceof sc_Values)
+ return consumer.apply(null, produced.values);
+ else
+ return consumer(produced);
+}
+
+/*** META ((export #t)) */
+function sc_dynamicWind(before, thunk, after) {
+ before();
+ try {
+ var res = thunk();
+ return res;
+ } finally {
+ after();
+ }
+}
+
+
+// TODO: eval/scheme-report-environment/null-environment/interaction-environment
+
+// LIMITATION: 'load' doesn't exist without files.
+// LIMITATION: transcript-on/transcript-off doesn't exist without files.
+
+
+function sc_Struct(name) {
+ this.name = name;
+}
+sc_Struct.prototype.sc_toDisplayString = function() {
+ return "#<struct" + sc_hash(this) + ">";
+};
+sc_Struct.prototype.sc_toWriteString = sc_Struct.prototype.sc_toDisplayString;
+
+/*** META ((export #t)
+ (peephole (hole 1 "new sc_Struct(" name ")")))
+*/
+function sc_makeStruct(name) {
+ return new sc_Struct(name);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_Struct")))
+*/
+function sc_isStruct(o) {
+ return (o instanceof sc_Struct);
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (hole 2 "(" 1 " instanceof sc_Struct) && ( " 1 ".name === " 0 ")")))
+*/
+function sc_isStructNamed(name, s) {
+ return ((s instanceof sc_Struct) && (s.name === name));
+}
+
+/*** META ((export struct-field)
+ (peephole (hole 3 0 "[" 2 "]")))
+*/
+function sc_getStructField(s, name, field) {
+ return s[field];
+}
+
+/*** META ((export struct-field-set!)
+ (peephole (hole 4 0 "[" 2 "] = " 3)))
+*/
+function sc_setStructFieldBang(s, name, field, val) {
+ s[field] = val;
+}
+
+/*** META ((export #t)
+ (peephole (prefix "~")))
+*/
+function sc_bitNot(x) {
+ return ~x;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "&")))
+*/
+function sc_bitAnd(x, y) {
+ return x & y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "|")))
+*/
+function sc_bitOr(x, y) {
+ return x | y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "^")))
+*/
+function sc_bitXor(x, y) {
+ return x ^ y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 "<<")))
+*/
+function sc_bitLsh(x, y) {
+ return x << y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 ">>")))
+*/
+function sc_bitRsh(x, y) {
+ return x >> y;
+}
+
+/*** META ((export #t)
+ (peephole (infix 2 2 ">>>")))
+*/
+function sc_bitUrsh(x, y) {
+ return x >>> y;
+}
+
+/*** META ((export js-field js-property)
+ (peephole (hole 2 o "[" field "]")))
+*/
+function sc_jsField(o, field) {
+ return o[field];
+}
+
+/*** META ((export js-field-set! js-property-set!)
+ (peephole (hole 3 o "[" field "] = " val)))
+*/
+function sc_setJsFieldBang(o, field, val) {
+ return o[field] = val;
+}
+
+/*** META ((export js-field-delete! js-property-delete!)
+ (peephole (hole 2 "delete" o "[" field "]")))
+*/
+function sc_deleteJsFieldBang(o, field) {
+ delete o[field];
+}
+
+/*** META ((export #t)
+ (peephole (jsCall)))
+*/
+function sc_jsCall(o, fun) {
+ var args = new Array();
+ for (var i = 2; i < arguments.length; i++)
+ args[i-2] = arguments[i];
+ return fun.apply(o, args);
+}
+
+/*** META ((export #t)
+ (peephole (jsMethodCall)))
+*/
+function sc_jsMethodCall(o, field) {
+ var args = new Array();
+ for (var i = 2; i < arguments.length; i++)
+ args[i-2] = arguments[i];
+ return o[field].apply(o, args);
+}
+
+/*** META ((export new js-new)
+ (peephole (jsNew)))
+*/
+function sc_jsNew(c) {
+ var evalStr = "new c(";
+ evalStr +=arguments.length > 1? "arguments[1]": "";
+ for (var i = 2; i < arguments.length; i++)
+ evalStr += ", arguments[" + i + "]";
+ evalStr +=")";
+ return eval(evalStr);
+}
+
+// ======================== RegExp ====================
+/*** META ((export #t)) */
+function sc_pregexp(re) {
+ return new RegExp(sc_string2jsstring(re));
+}
+
+/*** META ((export #t)) */
+function sc_pregexpMatch(re, s) {
+ var reg = (re instanceof RegExp) ? re : sc_pregexp(re);
+ var tmp = reg.exec(sc_string2jsstring(s));
+
+ if (tmp == null) return false;
+
+ var res = null;
+ for (var i = tmp.length-1; i >= 0; i--) {
+ if (tmp[i] !== null) {
+ res = sc_cons(sc_jsstring2string(tmp[i]), res);
+ } else {
+ res = sc_cons(false, res);
+ }
+ }
+ return res;
+}
+
+/*** META ((export #t)) */
+function sc_pregexpReplace(re, s1, s2) {
+ var reg;
+ var jss1 = sc_string2jsstring(s1);
+ var jss2 = sc_string2jsstring(s2);
+
+ if (re instanceof RegExp) {
+ if (re.global)
+ reg = re;
+ else
+ reg = new RegExp(re.source);
+ } else {
+ reg = new RegExp(sc_string2jsstring(re));
+ }
+
+ return jss1.replace(reg, jss2);
+}
+
+/*** META ((export pregexp-replace*)) */
+function sc_pregexpReplaceAll(re, s1, s2) {
+ var reg;
+ var jss1 = sc_string2jsstring(s1);
+ var jss2 = sc_string2jsstring(s2);
+
+ if (re instanceof RegExp) {
+ if (re.global)
+ reg = re;
+ else
+ reg = new RegExp(re.source, "g");
+ } else {
+ reg = new RegExp(sc_string2jsstring(re), "g");
+ }
+
+ return jss1.replace(reg, jss2);
+}
+
+/*** META ((export #t)) */
+function sc_pregexpSplit(re, s) {
+ var reg = ((re instanceof RegExp) ?
+ re :
+ new RegExp(sc_string2jsstring(re)));
+ var jss = sc_string2jsstring(s);
+ var tmp = jss.split(reg);
+
+ if (tmp == null) return false;
+
+ return sc_vector2list(tmp);
+}
+
+
+/* =========================================================================== */
+/* Other library stuff */
+/* =========================================================================== */
+
+/*** META ((export #t)
+ (peephole (hole 1 "Math.floor(Math.random()*" 'n ")")))
+*/
+function sc_random(n) {
+ return Math.floor(Math.random()*n);
+}
+
+/*** META ((export current-date)
+ (peephole (hole 0 "new Date()")))
+*/
+function sc_currentDate() {
+ return new Date();
+}
+
+function sc_Hashtable() {
+}
+sc_Hashtable.prototype.toString = function() {
+ return "#{%hashtable}";
+};
+// sc_toWriteString == sc_toDisplayString == toString
+
+function sc_HashtableElement(key, val) {
+ this.key = key;
+ this.val = val;
+}
+
+/*** META ((export #t)
+ (peephole (hole 0 "new sc_Hashtable()")))
+*/
+function sc_makeHashtable() {
+ return new sc_Hashtable();
+}
+
+/*** META ((export #t)) */
+function sc_hashtablePutBang(ht, key, val) {
+ var hash = sc_hash(key);
+ ht[hash] = new sc_HashtableElement(key, val);
+}
+
+/*** META ((export #t)) */
+function sc_hashtableGet(ht, key) {
+ var hash = sc_hash(key);
+ if (hash in ht)
+ return ht[hash].val;
+ else
+ return false;
+}
+
+/*** META ((export #t)) */
+function sc_hashtableForEach(ht, f) {
+ for (var v in ht) {
+ if (ht[v] instanceof sc_HashtableElement)
+ f(ht[v].key, ht[v].val);
+ }
+}
+
+/*** META ((export hashtable-contains?)
+ (peephole (hole 2 "sc_hash(" 1 ") in " 0)))
+*/
+function sc_hashtableContains(ht, key) {
+ var hash = sc_hash(key);
+ if (hash in ht)
+ return true;
+ else
+ return false;
+}
+
+var SC_HASH_COUNTER = 0;
+
+function sc_hash(o) {
+ if (o === null)
+ return "null";
+ else if (o === undefined)
+ return "undefined";
+ else if (o === true)
+ return "true";
+ else if (o === false)
+ return "false";
+ else if (typeof o === "number")
+ return "num-" + o;
+ else if (typeof o === "string")
+ return "jsstr-" + o;
+ else if (o.sc_getHash)
+ return o.sc_getHash();
+ else
+ return sc_counterHash.call(o);
+}
+function sc_counterHash() {
+ if (!this.sc_hash) {
+ this.sc_hash = "hash-" + SC_HASH_COUNTER;
+ SC_HASH_COUNTER++;
+ }
+ return this.sc_hash;
+}
+
+function sc_Trampoline(args, maxTailCalls) {
+ this['__trampoline return__'] = true;
+ this.args = args;
+ this.MAX_TAIL_CALLs = maxTailCalls;
+}
+// TODO: call/cc stuff
+sc_Trampoline.prototype.restart = function() {
+ var o = this;
+ while (true) {
+ // set both globals.
+ SC_TAIL_OBJECT.calls = o.MAX_TAIL_CALLs-1;
+ var fun = o.args.callee;
+ var res = fun.apply(SC_TAIL_OBJECT, o.args);
+ if (res instanceof sc_Trampoline)
+ o = res;
+ else
+ return res;
+ }
+}
+
+/*** META ((export bind-exit-lambda)) */
+function sc_bindExitLambda(proc) {
+ var escape_obj = new sc_BindExitException();
+ var escape = function(res) {
+ escape_obj.res = res;
+ throw escape_obj;
+ };
+ try {
+ return proc(escape);
+ } catch(e) {
+ if (e === escape_obj) {
+ return e.res;
+ }
+ throw e;
+ }
+}
+function sc_BindExitException() {
+ this._internalException = true;
+}
+
+var SC_SCM2JS_GLOBALS = new Object();
+
+// default tail-call depth.
+// normally the program should set it again. but just in case...
+var SC_TAIL_OBJECT = new Object();
+SC_SCM2JS_GLOBALS.TAIL_OBJECT = SC_TAIL_OBJECT;
+// ======================== I/O =======================
+
+/*------------------------------------------------------------------*/
+
+function sc_EOF() {
+}
+var SC_EOF_OBJECT = new sc_EOF();
+
+function sc_Port() {
+}
+
+/* --------------- Input ports -------------------------------------*/
+
+function sc_InputPort() {
+}
+sc_InputPort.prototype = new sc_Port();
+
+sc_InputPort.prototype.peekChar = function() {
+ if (!("peeked" in this))
+ this.peeked = this.getNextChar();
+ return this.peeked;
+}
+sc_InputPort.prototype.readChar = function() {
+ var tmp = this.peekChar();
+ delete this.peeked;
+ return tmp;
+}
+sc_InputPort.prototype.isCharReady = function() {
+ return true;
+}
+sc_InputPort.prototype.close = function() {
+ // do nothing
+}
+
+/* .............. String port ..........................*/
+function sc_ErrorInputPort() {
+};
+sc_ErrorInputPort.prototype = new sc_InputPort();
+sc_ErrorInputPort.prototype.getNextChar = function() {
+ throw "can't read from error-port.";
+};
+sc_ErrorInputPort.prototype.isCharReady = function() {
+ return false;
+};
+
+
+/* .............. String port ..........................*/
+
+function sc_StringInputPort(jsStr) {
+ // we are going to do some charAts on the str.
+ // instead of recreating all the time a String-object, we
+ // create one in the beginning. (not sure, if this is really an optim)
+ this.str = new String(jsStr);
+ this.pos = 0;
+}
+sc_StringInputPort.prototype = new sc_InputPort();
+sc_StringInputPort.prototype.getNextChar = function() {
+ if (this.pos >= this.str.length)
+ return SC_EOF_OBJECT;
+ return this.str.charAt(this.pos++);
+};
+
+/* ------------- Read and other lib-funs -------------------------------*/
+function sc_Token(type, val, pos) {
+ this.type = type;
+ this.val = val;
+ this.pos = pos;
+}
+sc_Token.EOF = 0/*EOF*/;
+sc_Token.OPEN_PAR = 1/*OPEN_PAR*/;
+sc_Token.CLOSE_PAR = 2/*CLOSE_PAR*/;
+sc_Token.OPEN_BRACE = 3/*OPEN_BRACE*/;
+sc_Token.CLOSE_BRACE = 4/*CLOSE_BRACE*/;
+sc_Token.OPEN_BRACKET = 5/*OPEN_BRACKET*/;
+sc_Token.CLOSE_BRACKET = 6/*CLOSE_BRACKET*/;
+sc_Token.WHITESPACE = 7/*WHITESPACE*/;
+sc_Token.QUOTE = 8/*QUOTE*/;
+sc_Token.ID = 9/*ID*/;
+sc_Token.DOT = 10/*DOT*/;
+sc_Token.STRING = 11/*STRING*/;
+sc_Token.NUMBER = 12/*NUMBER*/;
+sc_Token.ERROR = 13/*ERROR*/;
+sc_Token.VECTOR_BEGIN = 14/*VECTOR_BEGIN*/;
+sc_Token.TRUE = 15/*TRUE*/;
+sc_Token.FALSE = 16/*FALSE*/;
+sc_Token.UNSPECIFIED = 17/*UNSPECIFIED*/;
+sc_Token.REFERENCE = 18/*REFERENCE*/;
+sc_Token.STORE = 19/*STORE*/;
+sc_Token.CHAR = 20/*CHAR*/;
+
+var SC_ID_CLASS = SC_LOWER_CLASS + SC_UPPER_CLASS + "!$%*+-./:<=>?@^_~";
+function sc_Tokenizer(port) {
+ this.port = port;
+}
+sc_Tokenizer.prototype.peekToken = function() {
+ if (this.peeked)
+ return this.peeked;
+ var newToken = this.nextToken();
+ this.peeked = newToken;
+ return newToken;
+};
+sc_Tokenizer.prototype.readToken = function() {
+ var tmp = this.peekToken();
+ delete this.peeked;
+ return tmp;
+};
+sc_Tokenizer.prototype.nextToken = function() {
+ var port = this.port;
+
+ function isNumberChar(c) {
+ return (c >= "0" && c <= "9");
+ };
+ function isIdOrNumberChar(c) {
+ return SC_ID_CLASS.indexOf(c) != -1 || // ID-char
+ (c >= "0" && c <= "9");
+ }
+ function isWhitespace(c) {
+ return c === " " || c === "\r" || c === "\n" || c === "\t" || c === "\f";
+ };
+ function isWhitespaceOrEOF(c) {
+ return isWhitespace(c) || c === SC_EOF_OBJECT;
+ };
+
+ function readString() {
+ res = "";
+ while (true) {
+ var c = port.readChar();
+ switch (c) {
+ case '"':
+ return new sc_Token(11/*STRING*/, res);
+ case "\\":
+ var tmp = port.readChar();
+ switch (tmp) {
+ case '0': res += "\0"; break;
+ case 'a': res += "\a"; break;
+ case 'b': res += "\b"; break;
+ case 'f': res += "\f"; break;
+ case 'n': res += "\n"; break;
+ case 'r': res += "\r"; break;
+ case 't': res += "\t"; break;
+ case 'v': res += "\v"; break;
+ case '"': res += '"'; break;
+ case '\\': res += '\\'; break;
+ case 'x':
+ /* hexa-number */
+ var nb = 0;
+ while (true) {
+ var hexC = port.peekChar();
+ if (hexC >= '0' && hexC <= '9') {
+ port.readChar();
+ nb = nb * 16 + hexC.charCodeAt(0) - '0'.charCodeAt(0);
+ } else if (hexC >= 'a' && hexC <= 'f') {
+ port.readChar();
+ nb = nb * 16 + hexC.charCodeAt(0) - 'a'.charCodeAt(0);
+ } else if (hexC >= 'A' && hexC <= 'F') {
+ port.readChar();
+ nb = nb * 16 + hexC.charCodeAt(0) - 'A'.charCodeAt(0);
+ } else {
+ // next char isn't part of hex.
+ res += String.fromCharCode(nb);
+ break;
+ }
+ }
+ break;
+ default:
+ if (tmp === SC_EOF_OBJECT) {
+ return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res);
+ }
+ res += tmp;
+ }
+ break;
+ default:
+ if (c === SC_EOF_OBJECT) {
+ return new sc_Token(13/*ERROR*/, "unclosed string-literal" + res);
+ }
+ res += c;
+ }
+ }
+ };
+ function readIdOrNumber(firstChar) {
+ var res = firstChar;
+ while (isIdOrNumberChar(port.peekChar()))
+ res += port.readChar();
+ if (isNaN(res))
+ return new sc_Token(9/*ID*/, res);
+ else
+ return new sc_Token(12/*NUMBER*/, res - 0);
+ };
+
+ function skipWhitespaceAndComments() {
+ var done = false;
+ while (!done) {
+ done = true;
+ while (isWhitespace(port.peekChar()))
+ port.readChar();
+ if (port.peekChar() === ';') {
+ port.readChar();
+ done = false;
+ while (true) {
+ curChar = port.readChar();
+ if (curChar === SC_EOF_OBJECT ||
+ curChar === '\n')
+ break;
+ }
+ }
+ }
+ };
+
+ function readDot() {
+ if (isWhitespace(port.peekChar()))
+ return new sc_Token(10/*DOT*/);
+ else
+ return readIdOrNumber(".");
+ };
+
+ function readSharp() {
+ var c = port.readChar();
+ if (isWhitespace(c))
+ return new sc_Token(13/*ERROR*/, "bad #-pattern0.");
+
+ // reference
+ if (isNumberChar(c)) {
+ var nb = c - 0;
+ while (isNumberChar(port.peekChar()))
+ nb = nb*10 + (port.readChar() - 0);
+ switch (port.readChar()) {
+ case '#':
+ return new sc_Token(18/*REFERENCE*/, nb);
+ case '=':
+ return new sc_Token(19/*STORE*/, nb);
+ default:
+ return new sc_Token(13/*ERROR*/, "bad #-pattern1." + nb);
+ }
+ }
+
+ if (c === "(")
+ return new sc_Token(14/*VECTOR_BEGIN*/);
+
+ if (c === "\\") { // character
+ var tmp = ""
+ while (!isWhitespaceOrEOF(port.peekChar()))
+ tmp += port.readChar();
+ switch (tmp.length) {
+ case 0: // it's escaping a whitespace char:
+ if (sc_isEOFObject(port.peekChar))
+ return new sc_Token(13/*ERROR*/, "bad #-pattern2.");
+ else
+ return new sc_Token(20/*CHAR*/, port.readChar());
+ case 1:
+ return new sc_Token(20/*CHAR*/, tmp);
+ default:
+ var entry = sc_Char.readable2char[tmp.toLowerCase()];
+ if (entry)
+ return new sc_Token(20/*CHAR*/, entry);
+ else
+ return new sc_Token(13/*ERROR*/, "unknown character description: #\\" + tmp);
+ }
+ }
+
+ // some constants (#t, #f, #unspecified)
+ var res;
+ var needing;
+ switch (c) {
+ case 't': res = new sc_Token(15/*TRUE*/, true); needing = ""; break;
+ case 'f': res = new sc_Token(16/*FALSE*/, false); needing = ""; break;
+ case 'u': res = new sc_Token(17/*UNSPECIFIED*/, undefined); needing = "nspecified"; break;
+ default:
+ return new sc_Token(13/*ERROR*/, "bad #-pattern3: " + c);
+ }
+ while(true) {
+ c = port.peekChar();
+ if ((isWhitespaceOrEOF(c) || c === ')') &&
+ needing == "")
+ return res;
+ else if (isWhitespace(c) || needing == "")
+ return new sc_Token(13/*ERROR*/, "bad #-pattern4 " + c + " " + needing);
+ else if (needing.charAt(0) == c) {
+ port.readChar(); // consume
+ needing = needing.slice(1);
+ } else
+ return new sc_Token(13/*ERROR*/, "bad #-pattern5");
+ }
+
+ };
+
+ skipWhitespaceAndComments();
+ var curChar = port.readChar();
+ if (curChar === SC_EOF_OBJECT)
+ return new sc_Token(0/*EOF*/, curChar);
+ switch (curChar)
+ {
+ case " ":
+ case "\n":
+ case "\t":
+ return readWhitespace();
+ case "(":
+ return new sc_Token(1/*OPEN_PAR*/);
+ case ")":
+ return new sc_Token(2/*CLOSE_PAR*/);
+ case "{":
+ return new sc_Token(3/*OPEN_BRACE*/);
+ case "}":
+ return new sc_Token(4/*CLOSE_BRACE*/);
+ case "[":
+ return new sc_Token(5/*OPEN_BRACKET*/);
+ case "]":
+ return new sc_Token(6/*CLOSE_BRACKET*/);
+ case "'":
+ return new sc_Token(8/*QUOTE*/);
+ case "#":
+ return readSharp();
+ case ".":
+ return readDot();
+ case '"':
+ return readString();
+ default:
+ if (isIdOrNumberChar(curChar))
+ return readIdOrNumber(curChar);
+ throw "unexpected character: " + curChar;
+ }
+};
+
+function sc_Reader(tokenizer) {
+ this.tokenizer = tokenizer;
+ this.backref = new Array();
+}
+sc_Reader.prototype.read = function() {
+ function readList(listBeginType) {
+ function matchesPeer(open, close) {
+ return open === 1/*OPEN_PAR*/ && close === 2/*CLOSE_PAR*/
+ || open === 3/*OPEN_BRACE*/ && close === 4/*CLOSE_BRACE*/
+ || open === 5/*OPEN_BRACKET*/ && close === 6/*CLOSE_BRACKET*/;
+ };
+ var res = null;
+
+ while (true) {
+ var token = tokenizer.peekToken();
+
+ switch (token.type) {
+ case 2/*CLOSE_PAR*/:
+ case 4/*CLOSE_BRACE*/:
+ case 6/*CLOSE_BRACKET*/:
+ if (matchesPeer(listBeginType, token.type)) {
+ tokenizer.readToken(); // consume token
+ return sc_reverseBang(res);
+ } else
+ throw "closing par doesn't match: " + listBeginType
+ + " " + listEndType;
+
+ case 0/*EOF*/:
+ throw "unexpected end of file";
+
+ case 10/*DOT*/:
+ tokenizer.readToken(); // consume token
+ var cdr = this.read();
+ var par = tokenizer.readToken();
+ if (!matchesPeer(listBeginType, par.type))
+ throw "closing par doesn't match: " + listBeginType
+ + " " + par.type;
+ else
+ return sc_reverseAppendBang(res, cdr);
+
+
+ default:
+ res = sc_cons(this.read(), res);
+ }
+ }
+ };
+ function readQuote() {
+ return sc_cons("quote", sc_cons(this.read(), null));
+ };
+ function readVector() {
+ // opening-parenthesis is already consumed
+ var a = new Array();
+ while (true) {
+ var token = tokenizer.peekToken();
+ switch (token.type) {
+ case 2/*CLOSE_PAR*/:
+ tokenizer.readToken();
+ return a;
+
+ default:
+ a.push(this.read());
+ }
+ }
+ };
+
+ function storeRefence(nb) {
+ var tmp = this.read();
+ this.backref[nb] = tmp;
+ return tmp;
+ };
+
+ function readReference(nb) {
+ if (nb in this.backref)
+ return this.backref[nb];
+ else
+ throw "bad reference: " + nb;
+ };
+
+ var tokenizer = this.tokenizer;
+
+ var token = tokenizer.readToken();
+
+ // handle error
+ if (token.type === 13/*ERROR*/)
+ throw token.val;
+
+ switch (token.type) {
+ case 1/*OPEN_PAR*/:
+ case 3/*OPEN_BRACE*/:
+ case 5/*OPEN_BRACKET*/:
+ return readList.call(this, token.type);
+ case 8/*QUOTE*/:
+ return readQuote.call(this);
+ case 11/*STRING*/:
+ return sc_jsstring2string(token.val);
+ case 20/*CHAR*/:
+ return new sc_Char(token.val);
+ case 14/*VECTOR_BEGIN*/:
+ return readVector.call(this);
+ case 18/*REFERENCE*/:
+ return readReference.call(this, token.val);
+ case 19/*STORE*/:
+ return storeRefence.call(this, token.val);
+ case 9/*ID*/:
+ return sc_jsstring2symbol(token.val);
+ case 0/*EOF*/:
+ case 12/*NUMBER*/:
+ case 15/*TRUE*/:
+ case 16/*FALSE*/:
+ case 17/*UNSPECIFIED*/:
+ return token.val;
+ default:
+ throw "unexpected token " + token.type + " " + token.val;
+ }
+};
+
+/*** META ((export #t)) */
+function sc_read(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ var reader = new sc_Reader(new sc_Tokenizer(port));
+ return reader.read();
+}
+/*** META ((export #t)) */
+function sc_readChar(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ var t = port.readChar();
+ return t === SC_EOF_OBJECT? t: new sc_Char(t);
+}
+/*** META ((export #t)) */
+function sc_peekChar(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ var t = port.peekChar();
+ return t === SC_EOF_OBJECT? t: new sc_Char(t);
+}
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isCharReady(port) {
+ if (port === undefined) // we assume the port hasn't been given.
+ port = SC_DEFAULT_IN; // THREAD: shared var...
+ return port.isCharReady();
+}
+/*** META ((export #t)
+ (peephole (postfix ".close()")))
+*/
+function sc_closeInputPort(p) {
+ return p.close();
+}
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_InputPort")))
+*/
+function sc_isInputPort(o) {
+ return (o instanceof sc_InputPort);
+}
+
+/*** META ((export eof-object?)
+ (type bool)
+ (peephole (postfix " === SC_EOF_OBJECT")))
+*/
+function sc_isEOFObject(o) {
+ return o === SC_EOF_OBJECT;
+}
+
+/*** META ((export #t)
+ (peephole (hole 0 "SC_DEFAULT_IN")))
+*/
+function sc_currentInputPort() {
+ return SC_DEFAULT_IN;
+}
+
+/* ------------ file operations are not supported -----------*/
+/*** META ((export #t)) */
+function sc_callWithInputFile(s, proc) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_callWithOutputFile(s, proc) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_withInputFromFile(s, thunk) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToFile(s, thunk) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_openInputFile(s) {
+ throw "can't open " + s;
+}
+
+/*** META ((export #t)) */
+function sc_openOutputFile(s) {
+ throw "can't open " + s;
+}
+
+/* ----------------------------------------------------------------------------*/
+/*** META ((export #t)) */
+function sc_basename(p) {
+ var i = p.lastIndexOf('/');
+
+ if(i >= 0)
+ return p.substring(i + 1, p.length);
+ else
+ return '';
+}
+
+/*** META ((export #t)) */
+function sc_dirname(p) {
+ var i = p.lastIndexOf('/');
+
+ if(i >= 0)
+ return p.substring(0, i);
+ else
+ return '';
+}
+
+/* ----------------------------------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_withInputFromPort(p, thunk) {
+ try {
+ var tmp = SC_DEFAULT_IN; // THREAD: shared var.
+ SC_DEFAULT_IN = p;
+ return thunk();
+ } finally {
+ SC_DEFAULT_IN = tmp;
+ }
+}
+
+/*** META ((export #t)) */
+function sc_withInputFromString(s, thunk) {
+ return sc_withInputFromPort(new sc_StringInputPort(sc_string2jsstring(s)), thunk);
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToPort(p, thunk) {
+ try {
+ var tmp = SC_DEFAULT_OUT; // THREAD: shared var.
+ SC_DEFAULT_OUT = p;
+ return thunk();
+ } finally {
+ SC_DEFAULT_OUT = tmp;
+ }
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToString(thunk) {
+ var p = new sc_StringOutputPort();
+ sc_withOutputToPort(p, thunk);
+ return p.close();
+}
+
+/*** META ((export #t)) */
+function sc_withOutputToProcedure(proc, thunk) {
+ var t = function(s) { proc(sc_jsstring2string(s)); };
+ return sc_withOutputToPort(new sc_GenericOutputPort(t), thunk);
+}
+
+/*** META ((export #t)
+ (peephole (hole 0 "new sc_StringOutputPort()")))
+*/
+function sc_openOutputString() {
+ return new sc_StringOutputPort();
+}
+
+/*** META ((export #t)) */
+function sc_openInputString(str) {
+ return new sc_StringInputPort(sc_string2jsstring(str));
+}
+
+/* ----------------------------------------------------------------------------*/
+
+function sc_OutputPort() {
+}
+sc_OutputPort.prototype = new sc_Port();
+sc_OutputPort.prototype.appendJSString = function(obj) {
+ /* do nothing */
+}
+sc_OutputPort.prototype.close = function() {
+ /* do nothing */
+}
+
+function sc_StringOutputPort() {
+ this.res = "";
+}
+sc_StringOutputPort.prototype = new sc_OutputPort();
+sc_StringOutputPort.prototype.appendJSString = function(s) {
+ this.res += s;
+}
+sc_StringOutputPort.prototype.close = function() {
+ return sc_jsstring2string(this.res);
+}
+
+/*** META ((export #t)) */
+function sc_getOutputString(sp) {
+ return sc_jsstring2string(sp.res);
+}
+
+
+function sc_ErrorOutputPort() {
+}
+sc_ErrorOutputPort.prototype = new sc_OutputPort();
+sc_ErrorOutputPort.prototype.appendJSString = function(s) {
+ throw "don't write on ErrorPort!";
+}
+sc_ErrorOutputPort.prototype.close = function() {
+ /* do nothing */
+}
+
+function sc_GenericOutputPort(appendJSString, close) {
+ this.appendJSString = appendJSString;
+ if (close)
+ this.close = close;
+}
+sc_GenericOutputPort.prototype = new sc_OutputPort();
+
+/*** META ((export #t)
+ (type bool)
+ (peephole (postfix " instanceof sc_OutputPort")))
+*/
+function sc_isOutputPort(o) {
+ return (o instanceof sc_OutputPort);
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".close()")))
+*/
+function sc_closeOutputPort(p) {
+ return p.close();
+}
+
+/* ------------------ write ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_write(o, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(sc_toWriteString(o));
+}
+
+function sc_toWriteString(o) {
+ if (o === null)
+ return "()";
+ else if (o === true)
+ return "#t";
+ else if (o === false)
+ return "#f";
+ else if (o === undefined)
+ return "#unspecified";
+ else if (typeof o === 'function')
+ return "#<procedure " + sc_hash(o) + ">";
+ else if (o.sc_toWriteString)
+ return o.sc_toWriteString();
+ else
+ return o.toString();
+}
+
+function sc_escapeWriteString(s) {
+ var res = "";
+ var j = 0;
+ for (i = 0; i < s.length; i++) {
+ switch (s.charAt(i)) {
+ case "\0": res += s.substring(j, i) + "\\0"; j = i + 1; break;
+ case "\b": res += s.substring(j, i) + "\\b"; j = i + 1; break;
+ case "\f": res += s.substring(j, i) + "\\f"; j = i + 1; break;
+ case "\n": res += s.substring(j, i) + "\\n"; j = i + 1; break;
+ case "\r": res += s.substring(j, i) + "\\r"; j = i + 1; break;
+ case "\t": res += s.substring(j, i) + "\\t"; j = i + 1; break;
+ case "\v": res += s.substring(j, i) + "\\v"; j = i + 1; break;
+ case '"': res += s.substring(j, i) + '\\"'; j = i + 1; break;
+ case "\\": res += s.substring(j, i) + "\\\\"; j = i + 1; break;
+ default:
+ var c = s.charAt(i);
+ if ("\a" !== "a" && c == "\a") {
+ res += s.substring(j, i) + "\\a"; j = i + 1; continue;
+ }
+ if ("\v" !== "v" && c == "\v") {
+ res += s.substring(j, i) + "\\v"; j = i + 1; continue;
+ }
+ //if (s.charAt(i) < ' ' || s.charCodeAt(i) > 127) {
+ // CARE: Manuel is this OK with HOP?
+ if (s.charAt(i) < ' ') {
+ /* non printable character and special chars */
+ res += s.substring(j, i) + "\\x" + s.charCodeAt(i).toString(16);
+ j = i + 1;
+ }
+ // else just let i increase...
+ }
+ }
+ res += s.substring(j, i);
+ return res;
+}
+
+/* ------------------ display ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_display(o, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(sc_toDisplayString(o));
+}
+
+function sc_toDisplayString(o) {
+ if (o === null)
+ return "()";
+ else if (o === true)
+ return "#t";
+ else if (o === false)
+ return "#f";
+ else if (o === undefined)
+ return "#unspecified";
+ else if (typeof o === 'function')
+ return "#<procedure " + sc_hash(o) + ">";
+ else if (o.sc_toDisplayString)
+ return o.sc_toDisplayString();
+ else
+ return o.toString();
+}
+
+/* ------------------ newline ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_newline(p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString("\n");
+}
+
+/* ------------------ write-char ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_writeChar(c, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(c.val);
+}
+
+/* ------------------ write-circle ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_writeCircle(o, p) {
+ if (p === undefined) // we assume not given
+ p = SC_DEFAULT_OUT;
+ p.appendJSString(sc_toWriteCircleString(o));
+}
+
+function sc_toWriteCircleString(o) {
+ var symb = sc_gensym("writeCircle");
+ var nbPointer = new Object();
+ nbPointer.nb = 0;
+ sc_prepWriteCircle(o, symb, nbPointer);
+ return sc_genToWriteCircleString(o, symb);
+}
+
+function sc_prepWriteCircle(o, symb, nbPointer) {
+ // TODO sc_Struct
+ if (o instanceof sc_Pair ||
+ o instanceof sc_Vector) {
+ if (o[symb] !== undefined) {
+ // not the first visit.
+ o[symb]++;
+ // unless there is already a number, assign one.
+ if (!o[symb + "nb"]) o[symb + "nb"] = nbPointer.nb++;
+ return;
+ }
+ o[symb] = 0;
+ if (o instanceof sc_Pair) {
+ sc_prepWriteCircle(o.car, symb, nbPointer);
+ sc_prepWriteCircle(o.cdr, symb, nbPointer);
+ } else {
+ for (var i = 0; i < o.length; i++)
+ sc_prepWriteCircle(o[i], symb, nbPointer);
+ }
+ }
+}
+
+function sc_genToWriteCircleString(o, symb) {
+ if (!(o instanceof sc_Pair ||
+ o instanceof sc_Vector))
+ return sc_toWriteString(o);
+ return o.sc_toWriteCircleString(symb);
+}
+sc_Pair.prototype.sc_toWriteCircleString = function(symb, inList) {
+ if (this[symb + "use"]) { // use-flag is set. Just use it.
+ var nb = this[symb + "nb"];
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+ if (inList)
+ return '. #' + nb + '#';
+ else
+ return '#' + nb + '#';
+ }
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+
+ var res = "";
+
+ if (this[symb] !== undefined) { // implies > 0
+ this[symb + "use"] = true;
+ if (inList)
+ res += '. #' + this[symb + "nb"] + '=';
+ else
+ res += '#' + this[symb + "nb"] + '=';
+ inList = false;
+ }
+
+ if (!inList)
+ res += "(";
+
+ // print car
+ res += sc_genToWriteCircleString(this.car, symb);
+
+ if (sc_isPair(this.cdr)) {
+ res += " " + this.cdr.sc_toWriteCircleString(symb, true);
+ } else if (this.cdr !== null) {
+ res += " . " + sc_genToWriteCircleString(this.cdr, symb);
+ }
+ if (!inList)
+ res += ")";
+ return res;
+};
+sc_Vector.prototype.sc_toWriteCircleString = function(symb) {
+ if (this[symb + "use"]) { // use-flag is set. Just use it.
+ var nb = this[symb + "nb"];
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+ return '#' + nb + '#';
+ }
+ if (this[symb]-- === 0) { // if we are the last use. remove all fields.
+ delete this[symb];
+ delete this[symb + "nb"];
+ delete this[symb + "use"];
+ }
+
+ var res = "";
+ if (this[symb] !== undefined) { // implies > 0
+ this[symb + "use"] = true;
+ res += '#' + this[symb + "nb"] + '=';
+ }
+ res += "#(";
+ for (var i = 0; i < this.length; i++) {
+ res += sc_genToWriteCircleString(this[i], symb);
+ if (i < this.length - 1) res += " ";
+ }
+ res += ")";
+ return res;
+};
+
+
+/* ------------------ print ---------------------------------------------------*/
+
+/*** META ((export #t)) */
+function sc_print(s) {
+ if (arguments.length === 1) {
+ sc_display(s);
+ sc_newline();
+ }
+ else {
+ for (var i = 0; i < arguments.length; i++)
+ sc_display(arguments[i]);
+ sc_newline();
+ }
+}
+
+/* ------------------ format ---------------------------------------------------*/
+/*** META ((export #t)) */
+function sc_format(s, args) {
+ var len = s.length;
+ var p = new sc_StringOutputPort();
+ var i = 0, j = 1;
+
+ while( i < len ) {
+ var i2 = s.indexOf("~", i);
+
+ if (i2 == -1) {
+ p.appendJSString( s.substring( i, len ) );
+ return p.close();
+ } else {
+ if (i2 > i) {
+ if (i2 == (len - 1)) {
+ p.appendJSString(s.substring(i, len));
+ return p.close();
+ } else {
+ p.appendJSString(s.substring(i, i2));
+ i = i2;
+ }
+ }
+
+ switch(s.charCodeAt(i2 + 1)) {
+ case 65:
+ case 97:
+ // a
+ sc_display(arguments[j], p);
+ i += 2; j++;
+ break;
+
+ case 83:
+ case 115:
+ // s
+ sc_write(arguments[j], p);
+ i += 2; j++;
+ break;
+
+ case 86:
+ case 118:
+ // v
+ sc_display(arguments[j], p);
+ p.appendJSString("\n");
+ i += 2; j++;
+ break;
+
+ case 67:
+ case 99:
+ // c
+ p.appendJSString(String.fromCharCode(arguments[j]));
+ i += 2; j++;
+ break;
+
+ case 88:
+ case 120:
+ // x
+ p.appendJSString(arguments[j].toString(6));
+ i += 2; j++;
+ break;
+
+ case 79:
+ case 111:
+ // o
+ p.appendJSString(arguments[j].toString(8));
+ i += 2; j++;
+ break;
+
+ case 66:
+ case 98:
+ // b
+ p.appendJSString(arguments[j].toString(2));
+ i += 2; j++;
+ break;
+
+ case 37:
+ case 110:
+ // %, n
+ p.appendJSString("\n");
+ i += 2; break;
+
+ case 114:
+ // r
+ p.appendJSString("\r");
+ i += 2; break;
+
+ case 126:
+ // ~
+ p.appendJSString("~");
+ i += 2; break;
+
+ default:
+ sc_error( "format: illegal ~"
+ + String.fromCharCode(s.charCodeAt(i2 + 1))
+ + " sequence" );
+ return "";
+ }
+ }
+ }
+
+ return p.close();
+}
+
+/* ------------------ global ports ---------------------------------------------------*/
+
+var SC_DEFAULT_IN = new sc_ErrorInputPort();
+var SC_DEFAULT_OUT = new sc_ErrorOutputPort();
+var SC_ERROR_OUT = new sc_ErrorOutputPort();
+
+var sc_SYMBOL_PREFIX = "\u1E9C";
+var sc_KEYWORD_PREFIX = "\u1E9D";
+
+/*** META ((export #t)
+ (peephole (id))) */
+function sc_jsstring2string(s) {
+ return s;
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9C' +")))
+*/
+function sc_jsstring2symbol(s) {
+ return sc_SYMBOL_PREFIX + s;
+}
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_string2jsstring(s) {
+ return s;
+}
+
+/*** META ((export #t)
+ (peephole (symbol2jsstring_immutable)))
+*/
+function sc_symbol2jsstring(s) {
+ return s.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".slice(1)")))
+*/
+function sc_keyword2jsstring(k) {
+ return k.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9D' +")))
+*/
+function sc_jsstring2keyword(s) {
+ return sc_KEYWORD_PREFIX + s;
+}
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isKeyword(s) {
+ return (typeof s === "string") &&
+ (s.charAt(0) === sc_KEYWORD_PREFIX);
+}
+
+
+/*** META ((export #t)) */
+var sc_gensym = function() {
+ var counter = 1000;
+ return function(sym) {
+ counter++;
+ if (!sym) sym = sc_SYMBOL_PREFIX;
+ return sym + "s" + counter + "~" + "^sC-GeNsYm ";
+ };
+}();
+
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isEqual(o1, o2) {
+ return ((o1 === o2) ||
+ (sc_isPair(o1) && sc_isPair(o2)
+ && sc_isPairEqual(o1, o2, sc_isEqual)) ||
+ (sc_isVector(o1) && sc_isVector(o2)
+ && sc_isVectorEqual(o1, o2, sc_isEqual)));
+}
+
+/*** META ((export number->symbol integer->symbol)) */
+function sc_number2symbol(x, radix) {
+ return sc_SYMBOL_PREFIX + sc_number2jsstring(x, radix);
+}
+
+/*** META ((export number->string integer->string)) */
+var sc_number2string = sc_number2jsstring;
+
+/*** META ((export #t)) */
+function sc_symbol2number(s, radix) {
+ return sc_jsstring2number(s.slice(1), radix);
+}
+
+/*** META ((export #t)) */
+var sc_string2number = sc_jsstring2number;
+
+/*** META ((export #t)
+ (peephole (prefix "+" s)))
+ ;; peephole will only apply if no radix is given.
+*/
+function sc_string2integer(s, radix) {
+ if (!radix) return +s;
+ return parseInt(s, radix);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "+")))
+*/
+function sc_string2real(s) {
+ return +s;
+}
+
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isSymbol(s) {
+ return (typeof s === "string") &&
+ (s.charAt(0) === sc_SYMBOL_PREFIX);
+}
+
+/*** META ((export #t)
+ (peephole (symbol2string_immutable)))
+*/
+function sc_symbol2string(s) {
+ return s.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9C' +")))
+*/
+function sc_string2symbol(s) {
+ return sc_SYMBOL_PREFIX + s;
+}
+
+/*** META ((export symbol-append)
+ (peephole (symbolAppend_immutable)))
+*/
+function sc_symbolAppend() {
+ var res = sc_SYMBOL_PREFIX;
+ for (var i = 0; i < arguments.length; i++)
+ res += arguments[i].slice(1);
+ return res;
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".val")))
+*/
+function sc_char2string(c) { return c.val; }
+
+/*** META ((export #t)
+ (peephole (hole 1 "'\\u1E9C' + " c ".val")))
+*/
+function sc_char2symbol(c) { return sc_SYMBOL_PREFIX + c.val; }
+
+/*** META ((export #t)
+ (type bool))
+*/
+function sc_isString(s) {
+ return (typeof s === "string") &&
+ (s.charAt(0) !== sc_SYMBOL_PREFIX);
+}
+
+/*** META ((export #t)) */
+var sc_makeString = sc_makejsString;
+
+
+/*** META ((export #t)) */
+function sc_string() {
+ for (var i = 0; i < arguments.length; i++)
+ arguments[i] = arguments[i].val;
+ return "".concat.apply("", arguments);
+}
+
+/*** META ((export #t)
+ (peephole (postfix ".length")))
+*/
+function sc_stringLength(s) { return s.length; }
+
+/*** META ((export #t)) */
+function sc_stringRef(s, k) {
+ return new sc_Char(s.charAt(k));
+}
+
+/* there's no stringSet in the immutable version
+function sc_stringSet(s, k, c)
+*/
+
+
+/*** META ((export string=?)
+ (type bool)
+ (peephole (hole 2 str1 " === " str2)))
+*/
+function sc_isStringEqual(s1, s2) {
+ return s1 === s2;
+}
+/*** META ((export string<?)
+ (type bool)
+ (peephole (hole 2 str1 " < " str2)))
+*/
+function sc_isStringLess(s1, s2) {
+ return s1 < s2;
+}
+/*** META ((export string>?)
+ (type bool)
+ (peephole (hole 2 str1 " > " str2)))
+*/
+function sc_isStringGreater(s1, s2) {
+ return s1 > s2;
+}
+/*** META ((export string<=?)
+ (type bool)
+ (peephole (hole 2 str1 " <= " str2)))
+*/
+function sc_isStringLessEqual(s1, s2) {
+ return s1 <= s2;
+}
+/*** META ((export string>=?)
+ (type bool)
+ (peephole (hole 2 str1 " >= " str2)))
+*/
+function sc_isStringGreaterEqual(s1, s2) {
+ return s1 >= s2;
+}
+/*** META ((export string-ci=?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() === " str2 ".toLowerCase()")))
+*/
+function sc_isStringCIEqual(s1, s2) {
+ return s1.toLowerCase() === s2.toLowerCase();
+}
+/*** META ((export string-ci<?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() < " str2 ".toLowerCase()")))
+*/
+function sc_isStringCILess(s1, s2) {
+ return s1.toLowerCase() < s2.toLowerCase();
+}
+/*** META ((export string-ci>?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() > " str2 ".toLowerCase()")))
+*/
+function sc_isStringCIGreater(s1, s2) {
+ return s1.toLowerCase() > s2.toLowerCase();
+}
+/*** META ((export string-ci<=?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() <= " str2 ".toLowerCase()")))
+*/
+function sc_isStringCILessEqual(s1, s2) {
+ return s1.toLowerCase() <= s2.toLowerCase();
+}
+/*** META ((export string-ci>=?)
+ (type bool)
+ (peephole (hole 2 str1 ".toLowerCase() >= " str2 ".toLowerCase()")))
+*/
+function sc_isStringCIGreaterEqual(s1, s2) {
+ return s1.toLowerCase() >= s2.toLowerCase();
+}
+
+/*** META ((export #t)
+ (peephole (hole 3 s ".substring(" start ", " end ")")))
+*/
+function sc_substring(s, start, end) {
+ return s.substring(start, end);
+}
+
+/*** META ((export #t))
+*/
+function sc_isSubstring_at(s1, s2, i) {
+ return s2 == s1.substring(i, i+ s2.length);
+}
+
+/*** META ((export #t)
+ (peephole (infix 0 #f "+" "''")))
+*/
+function sc_stringAppend() {
+ return "".concat.apply("", arguments);
+}
+
+/*** META ((export #t)) */
+var sc_string2list = sc_jsstring2list;
+
+/*** META ((export #t)) */
+var sc_list2string = sc_list2jsstring;
+
+/*** META ((export #t)
+ (peephole (id)))
+*/
+function sc_stringCopy(s) {
+ return s;
+}
+
+/* there's no string-fill in the immutable version
+function sc_stringFill(s, c)
+*/
+
+/*** META ((export #t)
+ (peephole (postfix ".slice(1)")))
+*/
+function sc_keyword2string(o) {
+ return o.slice(1);
+}
+
+/*** META ((export #t)
+ (peephole (prefix "'\\u1E9D' +")))
+*/
+function sc_string2keyword(o) {
+ return sc_KEYWORD_PREFIX + o;
+}
+
+String.prototype.sc_toDisplayString = function() {
+ if (this.charAt(0) === sc_SYMBOL_PREFIX)
+ // TODO: care for symbols with spaces (escape-chars symbols).
+ return this.slice(1);
+ else if (this.charAt(0) === sc_KEYWORD_PREFIX)
+ return ":" + this.slice(1);
+ else
+ return this.toString();
+};
+
+String.prototype.sc_toWriteString = function() {
+ if (this.charAt(0) === sc_SYMBOL_PREFIX)
+ // TODO: care for symbols with spaces (escape-chars symbols).
+ return this.slice(1);
+ else if (this.charAt(0) === sc_KEYWORD_PREFIX)
+ return ":" + this.slice(1);
+ else
+ return '"' + sc_escapeWriteString(this) + '"';
+};
+/* Exported Variables */
+var BgL_testzd2boyerzd2;
+var BgL_nboyerzd2benchmarkzd2;
+var BgL_setupzd2boyerzd2;
+/* End Exports */
+
+var translate_term_nboyer;
+var translate_args_nboyer;
+var untranslate_term_nboyer;
+var BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer;
+var BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer;
+var translate_alist_nboyer;
+var apply_subst_nboyer;
+var apply_subst_lst_nboyer;
+var tautologyp_nboyer;
+var if_constructor_nboyer;
+var rewrite_count_nboyer;
+var rewrite_nboyer;
+var rewrite_args_nboyer;
+var unify_subst_nboyer;
+var one_way_unify1_nboyer;
+var false_term_nboyer;
+var true_term_nboyer;
+var trans_of_implies1_nboyer;
+var is_term_equal_nboyer;
+var is_term_member_nboyer;
+var const_nboyer;
+var sc_const_3_nboyer;
+var sc_const_4_nboyer;
+{
+ (sc_const_4_nboyer = (new sc_Pair("\u1E9Cimplies",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cu",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cw",null)))))),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cw",null)))))),null)))))));
+ (sc_const_3_nboyer = sc_list((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccompile",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Ccodegen",(new sc_Pair((new sc_Pair("\u1E9Coptimize",(new sc_Pair("\u1E9Cform",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreaterp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clesseqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cboolean",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ciff",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ceven1",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Codd",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccountps-",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccountps-loop",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cpred",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfact-",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfact-loop",(new sc_Pair("\u1E9Ci",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdivides",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-true",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassume-false",(new sc_Pair("\u1E9Cvar",(new sc_Pair("\u1E9Calist",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cvar",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))),(new sc_Pair("\u1E9Calist",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctautology-checker",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctautologyp",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfalsify",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfalsify1",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime1",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cx",null)))),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair("\u1E9Cp",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cimplies",(new sc_Pair("\u1E9Cp",(new sc_Pair("\u1E9Cq",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cp",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cq",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair((new sc_Pair("\u1E9Cf",null)),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Ct",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))))),(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",(new sc_Pair("\u1E9Ce",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cc",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cplus-fringe",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cexec",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cpds",(new sc_Pair("\u1E9Cenvrn",null)))))))),(new sc_Pair("\u1E9Cenvrn",null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmc-flatten",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Cintersect",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Ck",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ck",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair((new sc_Pair("\u1E9Cexp",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ck",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Cy",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Creverse-loop",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Csort-lp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ccount-list",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus1",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cl",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Ci",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cbase",null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cj",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cj",(new sc_Pair((1),null)))))),null)))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Ci",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cpower-eval",(new sc_Pair((new sc_Pair("\u1E9Cbig-plus",(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cpower-rep",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Cbase",null)))))))))),(new sc_Pair("\u1E9Cbase",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cj",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Ca",null)))),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cw",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cx",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cc",null)))))),null)))))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cb",(new sc_Pair("\u1E9Cc",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cz",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Cgcd",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair((new sc_Pair("\u1E9Cnormalize",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cvalue",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cy",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnlistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csamefringe",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((1),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair((new sc_Pair("\u1E9Cgreatest-factor",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ctimes-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cprime-list",(new sc_Pair("\u1E9Cy",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Cz",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cz",null)))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cz",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cw",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cgreatereqp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cor",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cand",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cy",(new sc_Pair((1),null)))))),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((1),null)))))),(new sc_Pair(sc_list("\u1E9Cand", (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair("\u1E9Cb",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Ca",null)))), (new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cb",null)))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csub1",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cl",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cl",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cl",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdsort",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Csort2",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx1",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx2",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx3",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx4",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx5",(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair("\u1E9Cx6",(new sc_Pair("\u1E9Cx7",null)))))),null)))))),null)))))),null)))))),null)))))),null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((6),(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cx7",null)))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((2),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair("\u1E9Cy",(new sc_Pair((2),null)))))),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Csigma",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ci",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Ci",null)))),null)))))),(new sc_Pair((2),null)))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cz",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnot",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cz",null)))),null)))))),null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair((new sc_Pair("\u1E9Cdelete",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmeaning",(new sc_Pair((new sc_Pair("\u1E9Cplus-tree",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair("\u1E9Ca",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cadd1",(new sc_Pair("\u1E9Cy",null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cnumberp",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cnth",(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Ci",null)))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Cb",null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Ca",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Clast",(new sc_Pair("\u1E9Ca",null)))),null)))),(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair("\u1E9Cb",null)))))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clessp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ct",null)),(new sc_Pair("\u1E9Cz",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cf",null)),(new sc_Pair("\u1E9Cz",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Cassignedp",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Ca",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cassignment",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cb",null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccar",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cgopher",(new sc_Pair("\u1E9Cx",null)))),null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Clistp",(new sc_Pair("\u1E9Cx",null)))),(new sc_Pair((new sc_Pair("\u1E9Ccdr",(new sc_Pair((new sc_Pair("\u1E9Cflatten",(new sc_Pair("\u1E9Cx",null)))),null)))),(new sc_Pair((new sc_Pair("\u1E9Ccons",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cquotient",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cx",null)))))),(new sc_Pair("\u1E9Cy",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Czerop",(new sc_Pair("\u1E9Cy",null)))),(new sc_Pair((new sc_Pair("\u1E9Czero",null)),(new sc_Pair((new sc_Pair("\u1E9Cfix",(new sc_Pair("\u1E9Cx",null)))),null)))))))),null)))))), (new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair((new sc_Pair("\u1E9Cset",(new sc_Pair("\u1E9Ci",(new sc_Pair("\u1E9Cval",(new sc_Pair("\u1E9Cmem",null)))))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cif",(new sc_Pair((new sc_Pair("\u1E9Ceqp",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Ci",null)))))),(new sc_Pair("\u1E9Cval",(new sc_Pair((new sc_Pair("\u1E9Cget",(new sc_Pair("\u1E9Cj",(new sc_Pair("\u1E9Cmem",null)))))),null)))))))),null))))))));
+ (const_nboyer = (new sc_Pair((new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair((new sc_Pair("\u1E9Czero",null)),null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cy",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair((new sc_Pair("\u1E9Ctimes",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Cc",(new sc_Pair("\u1E9Cd",null)))))),null)))))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cz",(new sc_Pair("\u1E9Cf",(new sc_Pair((new sc_Pair("\u1E9Creverse",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair((new sc_Pair("\u1E9Cappend",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cnil",null)),null)))))),null)))),null)))))),(new sc_Pair((new sc_Pair("\u1E9Cu",(new sc_Pair("\u1E9Cequal",(new sc_Pair((new sc_Pair("\u1E9Cplus",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cdifference",(new sc_Pair("\u1E9Cx",(new sc_Pair("\u1E9Cy",null)))))),null)))))))),(new sc_Pair((new sc_Pair("\u1E9Cw",(new sc_Pair("\u1E9Clessp",(new sc_Pair((new sc_Pair("\u1E9Cremainder",(new sc_Pair("\u1E9Ca",(new sc_Pair("\u1E9Cb",null)))))),(new sc_Pair((new sc_Pair("\u1E9Cmember",(new sc_Pair("\u1E9Ca",(new sc_Pair((new sc_Pair("\u1E9Clength",(new sc_Pair("\u1E9Cb",null)))),null)))))),null)))))))),null)))))))))));
+ BgL_nboyerzd2benchmarkzd2 = function() {
+ var args = null;
+ for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) {
+ args = sc_cons(arguments[sc_tmp], args);
+ }
+ var n;
+ return ((n = ((args === null)?(0):(args.car))), (BgL_setupzd2boyerzd2()), (BgL_runzd2benchmarkzd2(("nboyer"+(sc_number2string(n))), (1), function() {
+ return (BgL_testzd2boyerzd2(n));
+ }, function(rewrites) {
+ if ((sc_isNumber(rewrites)))
+ switch (n) {
+ case (0):
+ return (rewrites===(95024));
+ break;
+ case (1):
+ return (rewrites===(591777));
+ break;
+ case (2):
+ return (rewrites===(1813975));
+ break;
+ case (3):
+ return (rewrites===(5375678));
+ break;
+ case (4):
+ return (rewrites===(16445406));
+ break;
+ case (5):
+ return (rewrites===(51507739));
+ break;
+ default:
+ return true;
+ break;
+ }
+ else
+ return false;
+ })));
+ };
+ BgL_setupzd2boyerzd2 = function() {
+ return true;
+ };
+ BgL_testzd2boyerzd2 = function() {
+ return true;
+ };
+ translate_term_nboyer = function(term) {
+ var lst;
+ return (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((translate_term_nboyer((lst.car))), (translate_args_nboyer((lst.cdr))))))))));
+ };
+ translate_args_nboyer = function(lst) {
+ var sc_lst_5;
+ var term;
+ return ((lst === null)?null:(new sc_Pair(((term = (lst.car)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))), ((sc_lst_5 = (lst.cdr)), ((sc_lst_5 === null)?null:(new sc_Pair((translate_term_nboyer((sc_lst_5.car))), (translate_args_nboyer((sc_lst_5.cdr))))))))));
+ };
+ untranslate_term_nboyer = function(term) {
+ var optrOpnd;
+ var tail1131;
+ var L1127;
+ var falseHead1130;
+ var symbol_record;
+ if (!(term instanceof sc_Pair))
+ return term;
+ else
+ {
+ (falseHead1130 = (new sc_Pair(null, null)));
+ (L1127 = (term.cdr));
+ (tail1131 = falseHead1130);
+ while (!(L1127 === null)) {
+ {
+ (tail1131.cdr = (new sc_Pair((untranslate_term_nboyer((L1127.car))), null)));
+ (tail1131 = (tail1131.cdr));
+ (L1127 = (L1127.cdr));
+ }
+ }
+ (optrOpnd = (falseHead1130.cdr));
+ return (new sc_Pair(((symbol_record = (term.car)), (symbol_record[(0)])), optrOpnd));
+ }
+ };
+ BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer = function(sym) {
+ var r;
+ var x;
+ return ((x = (sc_assq(sym, BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), ((x!== false)?(x.cdr):((r = [sym, null]), (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = (new sc_Pair((new sc_Pair(sym, r)), BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer))), r)));
+ };
+ (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
+ translate_alist_nboyer = function(alist) {
+ var sc_alist_6;
+ var term;
+ return ((alist === null)?null:(new sc_Pair((new sc_Pair((alist.car.car), ((term = (alist.car.cdr)), (!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr))))))))), ((sc_alist_6 = (alist.cdr)), ((sc_alist_6 === null)?null:(new sc_Pair((new sc_Pair((sc_alist_6.car.car), (translate_term_nboyer((sc_alist_6.car.cdr))))), (translate_alist_nboyer((sc_alist_6.cdr))))))))));
+ };
+ apply_subst_nboyer = function(alist, term) {
+ var lst;
+ var temp_temp;
+ return (!(term instanceof sc_Pair)?((temp_temp = (sc_assq(term, alist))), ((temp_temp!== false)?(temp_temp.cdr):term)):(new sc_Pair((term.car), ((lst = (term.cdr)), ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), (apply_subst_lst_nboyer(alist, (lst.cdr))))))))));
+ };
+ apply_subst_lst_nboyer = function(alist, lst) {
+ var sc_lst_7;
+ return ((lst === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (lst.car))), ((sc_lst_7 = (lst.cdr)), ((sc_lst_7 === null)?null:(new sc_Pair((apply_subst_nboyer(alist, (sc_lst_7.car))), (apply_subst_lst_nboyer(alist, (sc_lst_7.cdr))))))))));
+ };
+ tautologyp_nboyer = function(sc_x_11, true_lst, false_lst) {
+ var tmp1125;
+ var x;
+ var tmp1126;
+ var sc_x_8;
+ var sc_tmp1125_9;
+ var sc_tmp1126_10;
+ var sc_x_11;
+ var true_lst;
+ var false_lst;
+ while (true) {
+ if ((((sc_tmp1126_10 = (is_term_equal_nboyer(sc_x_11, true_term_nboyer))), ((sc_tmp1126_10!== false)?sc_tmp1126_10:(is_term_member_nboyer(sc_x_11, true_lst))))!== false))
+ return true;
+ else
+ if ((((sc_tmp1125_9 = (is_term_equal_nboyer(sc_x_11, false_term_nboyer))), ((sc_tmp1125_9!== false)?sc_tmp1125_9:(is_term_member_nboyer(sc_x_11, false_lst))))!== false))
+ return false;
+ else
+ if (!(sc_x_11 instanceof sc_Pair))
+ return false;
+ else
+ if (((sc_x_11.car)===if_constructor_nboyer))
+ if ((((sc_x_8 = (sc_x_11.cdr.car)), (tmp1126 = (is_term_equal_nboyer(sc_x_8, true_term_nboyer))), ((tmp1126!== false)?tmp1126:(is_term_member_nboyer(sc_x_8, true_lst))))!== false))
+ (sc_x_11 = (sc_x_11.cdr.cdr.car));
+ else
+ if ((((x = (sc_x_11.cdr.car)), (tmp1125 = (is_term_equal_nboyer(x, false_term_nboyer))), ((tmp1125!== false)?tmp1125:(is_term_member_nboyer(x, false_lst))))!== false))
+ (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
+ else
+ if (((tautologyp_nboyer((sc_x_11.cdr.cdr.car), (new sc_Pair((sc_x_11.cdr.car), true_lst)), false_lst))!== false))
+ {
+ (false_lst = (new sc_Pair((sc_x_11.cdr.car), false_lst)));
+ (sc_x_11 = (sc_x_11.cdr.cdr.cdr.car));
+ }
+ else
+ return false;
+ else
+ return false;
+ }
+ };
+ (if_constructor_nboyer = "\u1E9C*");
+ (rewrite_count_nboyer = (0));
+ rewrite_nboyer = function(term) {
+ var term2;
+ var sc_term_12;
+ var lst;
+ var symbol_record;
+ var sc_lst_13;
+ {
+ (++rewrite_count_nboyer);
+ if (!(term instanceof sc_Pair))
+ return term;
+ else
+ {
+ (sc_term_12 = (new sc_Pair((term.car), ((sc_lst_13 = (term.cdr)), ((sc_lst_13 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_13.car))), (rewrite_args_nboyer((sc_lst_13.cdr))))))))));
+ (lst = ((symbol_record = (term.car)), (symbol_record[(1)])));
+ while (true) {
+ if ((lst === null))
+ return sc_term_12;
+ else
+ if ((((term2 = ((lst.car).cdr.car)), (unify_subst_nboyer = null), (one_way_unify1_nboyer(sc_term_12, term2)))!== false))
+ return (rewrite_nboyer((apply_subst_nboyer(unify_subst_nboyer, ((lst.car).cdr.cdr.car)))));
+ else
+ (lst = (lst.cdr));
+ }
+ }
+ }
+ };
+ rewrite_args_nboyer = function(lst) {
+ var sc_lst_14;
+ return ((lst === null)?null:(new sc_Pair((rewrite_nboyer((lst.car))), ((sc_lst_14 = (lst.cdr)), ((sc_lst_14 === null)?null:(new sc_Pair((rewrite_nboyer((sc_lst_14.car))), (rewrite_args_nboyer((sc_lst_14.cdr))))))))));
+ };
+ (unify_subst_nboyer = "\u1E9C*");
+ one_way_unify1_nboyer = function(term1, term2) {
+ var lst1;
+ var lst2;
+ var temp_temp;
+ if (!(term2 instanceof sc_Pair))
+ {
+ (temp_temp = (sc_assq(term2, unify_subst_nboyer)));
+ if ((temp_temp!== false))
+ return (is_term_equal_nboyer(term1, (temp_temp.cdr)));
+ else
+ if ((sc_isNumber(term2)))
+ return (sc_isEqual(term1, term2));
+ else
+ {
+ (unify_subst_nboyer = (new sc_Pair((new sc_Pair(term2, term1)), unify_subst_nboyer)));
+ return true;
+ }
+ }
+ else
+ if (!(term1 instanceof sc_Pair))
+ return false;
+ else
+ if (((term1.car)===(term2.car)))
+ {
+ (lst1 = (term1.cdr));
+ (lst2 = (term2.cdr));
+ while (true) {
+ if ((lst1 === null))
+ return (lst2 === null);
+ else
+ if ((lst2 === null))
+ return false;
+ else
+ if (((one_way_unify1_nboyer((lst1.car), (lst2.car)))!== false))
+ {
+ (lst1 = (lst1.cdr));
+ (lst2 = (lst2.cdr));
+ }
+ else
+ return false;
+ }
+ }
+ else
+ return false;
+ };
+ (false_term_nboyer = "\u1E9C*");
+ (true_term_nboyer = "\u1E9C*");
+ trans_of_implies1_nboyer = function(n) {
+ var sc_n_15;
+ return ((sc_isEqual(n, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (n-(1)), n)), ((sc_n_15 = (n-(1))), ((sc_isEqual(sc_n_15, (1)))?(sc_list("\u1E9Cimplies", (0), (1))):(sc_list("\u1E9Cand", (sc_list("\u1E9Cimplies", (sc_n_15-(1)), sc_n_15)), (trans_of_implies1_nboyer((sc_n_15-(1)))))))))));
+ };
+ is_term_equal_nboyer = function(x, y) {
+ var lst1;
+ var lst2;
+ var r2;
+ var r1;
+ if ((x instanceof sc_Pair))
+ if ((y instanceof sc_Pair))
+ if ((((r1 = (x.car)), (r2 = (y.car)), (r1===r2))!== false))
+ {
+ (lst1 = (x.cdr));
+ (lst2 = (y.cdr));
+ while (true) {
+ if ((lst1 === null))
+ return (lst2 === null);
+ else
+ if ((lst2 === null))
+ return false;
+ else
+ if (((is_term_equal_nboyer((lst1.car), (lst2.car)))!== false))
+ {
+ (lst1 = (lst1.cdr));
+ (lst2 = (lst2.cdr));
+ }
+ else
+ return false;
+ }
+ }
+ else
+ return false;
+ else
+ return false;
+ else
+ return (sc_isEqual(x, y));
+ };
+ is_term_member_nboyer = function(x, lst) {
+ var x;
+ var lst;
+ while (true) {
+ if ((lst === null))
+ return false;
+ else
+ if (((is_term_equal_nboyer(x, (lst.car)))!== false))
+ return true;
+ else
+ (lst = (lst.cdr));
+ }
+ };
+ BgL_setupzd2boyerzd2 = function() {
+ var symbol_record;
+ var value;
+ var BgL_sc_symbolzd2record_16zd2;
+ var sym;
+ var sc_sym_17;
+ var term;
+ var lst;
+ var sc_term_18;
+ var sc_term_19;
+ {
+ (BgL_sc_za2symbolzd2recordszd2alistza2_2z00_nboyer = null);
+ (if_constructor_nboyer = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer("\u1E9Cif")));
+ (false_term_nboyer = ((sc_term_19 = (new sc_Pair("\u1E9Cf",null))), (!(sc_term_19 instanceof sc_Pair)?sc_term_19:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_19.car))), (translate_args_nboyer((sc_term_19.cdr))))))));
+ (true_term_nboyer = ((sc_term_18 = (new sc_Pair("\u1E9Ct",null))), (!(sc_term_18 instanceof sc_Pair)?sc_term_18:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_18.car))), (translate_args_nboyer((sc_term_18.cdr))))))));
+ (lst = sc_const_3_nboyer);
+ while (!(lst === null)) {
+ {
+ (term = (lst.car));
+ if (((term instanceof sc_Pair)&&(((term.car)==="\u1E9Cequal")&&((term.cdr.car) instanceof sc_Pair))))
+ {
+ (sc_sym_17 = ((term.cdr.car).car));
+ (value = (new sc_Pair((!(term instanceof sc_Pair)?term:(new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((term.car))), (translate_args_nboyer((term.cdr)))))), ((sym = ((term.cdr.car).car)), (BgL_sc_symbolzd2record_16zd2 = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sym))), (BgL_sc_symbolzd2record_16zd2[(1)])))));
+ (symbol_record = (BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer(sc_sym_17)));
+ (symbol_record[(1)] = value);
+ }
+ else
+ (sc_error("ADD-LEMMA did not like term: ", term));
+ (lst = (lst.cdr));
+ }
+ }
+ return true;
+ }
+ };
+ BgL_testzd2boyerzd2 = function(n) {
+ var optrOpnd;
+ var term;
+ var sc_n_20;
+ var answer;
+ var sc_term_21;
+ var sc_term_22;
+ {
+ (rewrite_count_nboyer = (0));
+ (term = sc_const_4_nboyer);
+ (sc_n_20 = n);
+ while (!(sc_n_20=== 0)) {
+ {
+ (term = (sc_list("\u1E9Cor", term, (new sc_Pair("\u1E9Cf",null)))));
+ (--sc_n_20);
+ }
+ }
+ (sc_term_22 = term);
+ if (!(sc_term_22 instanceof sc_Pair))
+ (optrOpnd = sc_term_22);
+ else
+ (optrOpnd = (new sc_Pair((BgL_sc_symbolzd2ze3symbolzd2record_1ze3_nboyer((sc_term_22.car))), (translate_args_nboyer((sc_term_22.cdr))))));
+ (sc_term_21 = (apply_subst_nboyer(((const_nboyer === null)?null:(new sc_Pair((new sc_Pair((const_nboyer.car.car), (translate_term_nboyer((const_nboyer.car.cdr))))), (translate_alist_nboyer((const_nboyer.cdr)))))), optrOpnd)));
+ (answer = (tautologyp_nboyer((rewrite_nboyer(sc_term_21)), null, null)));
+ (sc_write(rewrite_count_nboyer));
+ (sc_display(" rewrites"));
+ (sc_newline());
+ if ((answer!== false))
+ return rewrite_count_nboyer;
+ else
+ return false;
+ }
+ };
+}
+/* Exported Variables */
+var BgL_parsezd2ze3nbzd2treesze3;
+var BgL_earleyzd2benchmarkzd2;
+var BgL_parsezd2ze3parsedzf3zc2;
+var test;
+var BgL_parsezd2ze3treesz31;
+var BgL_makezd2parserzd2;
+/* End Exports */
+
+var const_earley;
+{
+ (const_earley = (new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair((new sc_Pair("\u1E9Ca",null)),(new sc_Pair((new sc_Pair("\u1E9Cs",(new sc_Pair("\u1E9Cs",null)))),null)))))),null)));
+ BgL_makezd2parserzd2 = function(grammar, lexer) {
+ var i;
+ var parser_descr;
+ var def_loop;
+ var nb_nts;
+ var names;
+ var steps;
+ var predictors;
+ var enders;
+ var starters;
+ var nts;
+ var sc_names_1;
+ var sc_steps_2;
+ var sc_predictors_3;
+ var sc_enders_4;
+ var sc_starters_5;
+ var nb_confs;
+ var BgL_sc_defzd2loop_6zd2;
+ var BgL_sc_nbzd2nts_7zd2;
+ var sc_nts_8;
+ var BgL_sc_defzd2loop_9zd2;
+ var ind;
+ {
+ ind = function(nt, sc_nts_10) {
+ var i;
+ {
+ (i = ((sc_nts_10.length)-(1)));
+ while (true) {
+ if ((i>=(0)))
+ if ((sc_isEqual((sc_nts_10[i]), nt)))
+ return i;
+ else
+ (--i);
+ else
+ return false;
+ }
+ }
+ };
+ (sc_nts_8 = ((BgL_sc_defzd2loop_9zd2 = function(defs, sc_nts_11) {
+ var rule_loop;
+ var head;
+ var def;
+ return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, sc_nts_12) {
+ var nt;
+ var l;
+ var sc_nts_13;
+ var rule;
+ if ((rules instanceof sc_Pair))
+ {
+ (rule = (rules.car));
+ (l = rule);
+ (sc_nts_13 = sc_nts_12);
+ while ((l instanceof sc_Pair)) {
+ {
+ (nt = (l.car));
+ (l = (l.cdr));
+ (sc_nts_13 = (((sc_member(nt, sc_nts_13))!== false)?sc_nts_13:(new sc_Pair(nt, sc_nts_13))));
+ }
+ }
+ return (rule_loop((rules.cdr), sc_nts_13));
+ }
+ else
+ return (BgL_sc_defzd2loop_9zd2((defs.cdr), sc_nts_12));
+ }), (rule_loop((def.cdr), (((sc_member(head, sc_nts_11))!== false)?sc_nts_11:(new sc_Pair(head, sc_nts_11)))))):(sc_list2vector((sc_reverse(sc_nts_11)))));
+ }), (BgL_sc_defzd2loop_9zd2(grammar, null))));
+ (BgL_sc_nbzd2nts_7zd2 = (sc_nts_8.length));
+ (nb_confs = (((BgL_sc_defzd2loop_6zd2 = function(defs, BgL_sc_nbzd2confs_14zd2) {
+ var rule_loop;
+ var def;
+ return ((defs instanceof sc_Pair)?((def = (defs.car)), (rule_loop = function(rules, BgL_sc_nbzd2confs_15zd2) {
+ var l;
+ var BgL_sc_nbzd2confs_16zd2;
+ var rule;
+ if ((rules instanceof sc_Pair))
+ {
+ (rule = (rules.car));
+ (l = rule);
+ (BgL_sc_nbzd2confs_16zd2 = BgL_sc_nbzd2confs_15zd2);
+ while ((l instanceof sc_Pair)) {
+ {
+ (l = (l.cdr));
+ (++BgL_sc_nbzd2confs_16zd2);
+ }
+ }
+ return (rule_loop((rules.cdr), (BgL_sc_nbzd2confs_16zd2+(1))));
+ }
+ else
+ return (BgL_sc_defzd2loop_6zd2((defs.cdr), BgL_sc_nbzd2confs_15zd2));
+ }), (rule_loop((def.cdr), BgL_sc_nbzd2confs_14zd2))):BgL_sc_nbzd2confs_14zd2);
+ }), (BgL_sc_defzd2loop_6zd2(grammar, (0))))+BgL_sc_nbzd2nts_7zd2));
+ (sc_starters_5 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+ (sc_enders_4 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+ (sc_predictors_3 = (sc_makeVector(BgL_sc_nbzd2nts_7zd2, null)));
+ (sc_steps_2 = (sc_makeVector(nb_confs, false)));
+ (sc_names_1 = (sc_makeVector(nb_confs, false)));
+ (nts = sc_nts_8);
+ (starters = sc_starters_5);
+ (enders = sc_enders_4);
+ (predictors = sc_predictors_3);
+ (steps = sc_steps_2);
+ (names = sc_names_1);
+ (nb_nts = (sc_nts_8.length));
+ (i = (nb_nts-(1)));
+ while ((i>=(0))) {
+ {
+ (sc_steps_2[i] = (i-nb_nts));
+ (sc_names_1[i] = (sc_list((sc_nts_8[i]), (0))));
+ (sc_enders_4[i] = (sc_list(i)));
+ (--i);
+ }
+ }
+ def_loop = function(defs, conf) {
+ var rule_loop;
+ var head;
+ var def;
+ return ((defs instanceof sc_Pair)?((def = (defs.car)), (head = (def.car)), (rule_loop = function(rules, conf, rule_num) {
+ var i;
+ var sc_i_17;
+ var nt;
+ var l;
+ var sc_conf_18;
+ var sc_i_19;
+ var rule;
+ if ((rules instanceof sc_Pair))
+ {
+ (rule = (rules.car));
+ (names[conf] = (sc_list(head, rule_num)));
+ (sc_i_19 = (ind(head, nts)));
+ (starters[sc_i_19] = (new sc_Pair(conf, (starters[sc_i_19]))));
+ (l = rule);
+ (sc_conf_18 = conf);
+ while ((l instanceof sc_Pair)) {
+ {
+ (nt = (l.car));
+ (steps[sc_conf_18] = (ind(nt, nts)));
+ (sc_i_17 = (ind(nt, nts)));
+ (predictors[sc_i_17] = (new sc_Pair(sc_conf_18, (predictors[sc_i_17]))));
+ (l = (l.cdr));
+ (++sc_conf_18);
+ }
+ }
+ (steps[sc_conf_18] = ((ind(head, nts))-nb_nts));
+ (i = (ind(head, nts)));
+ (enders[i] = (new sc_Pair(sc_conf_18, (enders[i]))));
+ return (rule_loop((rules.cdr), (sc_conf_18+(1)), (rule_num+(1))));
+ }
+ else
+ return (def_loop((defs.cdr), conf));
+ }), (rule_loop((def.cdr), conf, (1)))):undefined);
+ };
+ (def_loop(grammar, (sc_nts_8.length)));
+ (parser_descr = [lexer, sc_nts_8, sc_starters_5, sc_enders_4, sc_predictors_3, sc_steps_2, sc_names_1]);
+ return function(input) {
+ var optrOpnd;
+ var sc_optrOpnd_20;
+ var sc_optrOpnd_21;
+ var sc_optrOpnd_22;
+ var loop1;
+ var BgL_sc_stateza2_23za2;
+ var toks;
+ var BgL_sc_nbzd2nts_24zd2;
+ var sc_steps_25;
+ var sc_enders_26;
+ var state_num;
+ var BgL_sc_statesza2_27za2;
+ var states;
+ var i;
+ var conf;
+ var l;
+ var tok_nts;
+ var sc_i_28;
+ var sc_i_29;
+ var l1;
+ var l2;
+ var tok;
+ var tail1129;
+ var L1125;
+ var goal_enders;
+ var BgL_sc_statesza2_30za2;
+ var BgL_sc_nbzd2nts_31zd2;
+ var BgL_sc_nbzd2confs_32zd2;
+ var nb_toks;
+ var goal_starters;
+ var sc_states_33;
+ var BgL_sc_nbzd2confs_34zd2;
+ var BgL_sc_nbzd2toks_35zd2;
+ var sc_toks_36;
+ var falseHead1128;
+ var sc_names_37;
+ var sc_steps_38;
+ var sc_predictors_39;
+ var sc_enders_40;
+ var sc_starters_41;
+ var sc_nts_42;
+ var lexer;
+ var sc_ind_43;
+ var make_states;
+ var BgL_sc_confzd2setzd2getza2_44za2;
+ var conf_set_merge_new_bang;
+ var conf_set_adjoin;
+ var BgL_sc_confzd2setzd2adjoinza2_45za2;
+ var BgL_sc_confzd2setzd2adjoinza2za2_46z00;
+ var conf_set_union;
+ var forw;
+ var is_parsed;
+ var deriv_trees;
+ var BgL_sc_derivzd2treesza2_47z70;
+ var nb_deriv_trees;
+ var BgL_sc_nbzd2derivzd2treesza2_48za2;
+ {
+ sc_ind_43 = function(nt, sc_nts_49) {
+ var i;
+ {
+ (i = ((sc_nts_49.length)-(1)));
+ while (true) {
+ if ((i>=(0)))
+ if ((sc_isEqual((sc_nts_49[i]), nt)))
+ return i;
+ else
+ (--i);
+ else
+ return false;
+ }
+ }
+ };
+ make_states = function(BgL_sc_nbzd2toks_50zd2, BgL_sc_nbzd2confs_51zd2) {
+ var v;
+ var i;
+ var sc_states_52;
+ {
+ (sc_states_52 = (sc_makeVector((BgL_sc_nbzd2toks_50zd2+(1)), false)));
+ (i = BgL_sc_nbzd2toks_50zd2);
+ while ((i>=(0))) {
+ {
+ (v = (sc_makeVector((BgL_sc_nbzd2confs_51zd2+(1)), false)));
+ (v[(0)] = (-1));
+ (sc_states_52[i] = v);
+ (--i);
+ }
+ }
+ return sc_states_52;
+ }
+ };
+ BgL_sc_confzd2setzd2getza2_44za2 = function(state, BgL_sc_statezd2num_53zd2, sc_conf_54) {
+ var conf_set;
+ var BgL_sc_confzd2set_55zd2;
+ return ((BgL_sc_confzd2set_55zd2 = (state[(sc_conf_54+(1))])), ((BgL_sc_confzd2set_55zd2!== false)?BgL_sc_confzd2set_55zd2:((conf_set = (sc_makeVector((BgL_sc_statezd2num_53zd2+(6)), false))), (conf_set[(1)] = (-3)), (conf_set[(2)] = (-1)), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)), (state[(sc_conf_54+(1))] = conf_set), conf_set)));
+ };
+ conf_set_merge_new_bang = function(conf_set) {
+ return ((conf_set[((conf_set[(1)])+(5))] = (conf_set[(4)])), (conf_set[(1)] = (conf_set[(3)])), (conf_set[(3)] = (-1)), (conf_set[(4)] = (-1)));
+ };
+ conf_set_adjoin = function(state, conf_set, sc_conf_56, i) {
+ var tail;
+ return ((tail = (conf_set[(3)])), (conf_set[(i+(5))] = (-1)), (conf_set[(tail+(5))] = i), (conf_set[(3)] = i), ((tail<(0))?((conf_set[(0)] = (state[(0)])), (state[(0)] = sc_conf_56)):undefined));
+ };
+ BgL_sc_confzd2setzd2adjoinza2_45za2 = function(sc_states_57, BgL_sc_statezd2num_58zd2, l, i) {
+ var conf_set;
+ var sc_conf_59;
+ var l1;
+ var state;
+ {
+ (state = (sc_states_57[BgL_sc_statezd2num_58zd2]));
+ (l1 = l);
+ while ((l1 instanceof sc_Pair)) {
+ {
+ (sc_conf_59 = (l1.car));
+ (conf_set = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_58zd2, sc_conf_59)));
+ if (((conf_set[(i+(5))])=== false))
+ {
+ (conf_set_adjoin(state, conf_set, sc_conf_59, i));
+ (l1 = (l1.cdr));
+ }
+ else
+ (l1 = (l1.cdr));
+ }
+ }
+ return undefined;
+ }
+ };
+ BgL_sc_confzd2setzd2adjoinza2za2_46z00 = function(sc_states_60, BgL_sc_statesza2_61za2, BgL_sc_statezd2num_62zd2, sc_conf_63, i) {
+ var BgL_sc_confzd2setza2_64z70;
+ var BgL_sc_stateza2_65za2;
+ var conf_set;
+ var state;
+ return ((state = (sc_states_60[BgL_sc_statezd2num_62zd2])), ((((conf_set = (state[(sc_conf_63+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)?((BgL_sc_stateza2_65za2 = (BgL_sc_statesza2_61za2[BgL_sc_statezd2num_62zd2])), (BgL_sc_confzd2setza2_64z70 = (BgL_sc_confzd2setzd2getza2_44za2(BgL_sc_stateza2_65za2, BgL_sc_statezd2num_62zd2, sc_conf_63))), (((BgL_sc_confzd2setza2_64z70[(i+(5))])=== false)?(conf_set_adjoin(BgL_sc_stateza2_65za2, BgL_sc_confzd2setza2_64z70, sc_conf_63, i)):undefined), true):false));
+ };
+ conf_set_union = function(state, conf_set, sc_conf_66, other_set) {
+ var i;
+ {
+ (i = (other_set[(2)]));
+ while ((i>=(0))) {
+ if (((conf_set[(i+(5))])=== false))
+ {
+ (conf_set_adjoin(state, conf_set, sc_conf_66, i));
+ (i = (other_set[(i+(5))]));
+ }
+ else
+ (i = (other_set[(i+(5))]));
+ }
+ return undefined;
+ }
+ };
+ forw = function(sc_states_67, BgL_sc_statezd2num_68zd2, sc_starters_69, sc_enders_70, sc_predictors_71, sc_steps_72, sc_nts_73) {
+ var next_set;
+ var next;
+ var conf_set;
+ var ender;
+ var l;
+ var starter_set;
+ var starter;
+ var sc_l_74;
+ var sc_loop1_75;
+ var head;
+ var BgL_sc_confzd2set_76zd2;
+ var BgL_sc_statezd2num_77zd2;
+ var state;
+ var sc_states_78;
+ var preds;
+ var BgL_sc_confzd2set_79zd2;
+ var step;
+ var sc_conf_80;
+ var BgL_sc_nbzd2nts_81zd2;
+ var sc_state_82;
+ {
+ (sc_state_82 = (sc_states_67[BgL_sc_statezd2num_68zd2]));
+ (BgL_sc_nbzd2nts_81zd2 = (sc_nts_73.length));
+ while (true) {
+ {
+ (sc_conf_80 = (sc_state_82[(0)]));
+ if ((sc_conf_80>=(0)))
+ {
+ (step = (sc_steps_72[sc_conf_80]));
+ (BgL_sc_confzd2set_79zd2 = (sc_state_82[(sc_conf_80+(1))]));
+ (head = (BgL_sc_confzd2set_79zd2[(4)]));
+ (sc_state_82[(0)] = (BgL_sc_confzd2set_79zd2[(0)]));
+ (conf_set_merge_new_bang(BgL_sc_confzd2set_79zd2));
+ if ((step>=(0)))
+ {
+ (sc_l_74 = (sc_starters_69[step]));
+ while ((sc_l_74 instanceof sc_Pair)) {
+ {
+ (starter = (sc_l_74.car));
+ (starter_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, starter)));
+ if (((starter_set[(BgL_sc_statezd2num_68zd2+(5))])=== false))
+ {
+ (conf_set_adjoin(sc_state_82, starter_set, starter, BgL_sc_statezd2num_68zd2));
+ (sc_l_74 = (sc_l_74.cdr));
+ }
+ else
+ (sc_l_74 = (sc_l_74.cdr));
+ }
+ }
+ (l = (sc_enders_70[step]));
+ while ((l instanceof sc_Pair)) {
+ {
+ (ender = (l.car));
+ if ((((conf_set = (sc_state_82[(ender+(1))])), ((conf_set!== false)?(conf_set[(BgL_sc_statezd2num_68zd2+(5))]):false))!== false))
+ {
+ (next = (sc_conf_80+(1)));
+ (next_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, next)));
+ (conf_set_union(sc_state_82, next_set, next, BgL_sc_confzd2set_79zd2));
+ (l = (l.cdr));
+ }
+ else
+ (l = (l.cdr));
+ }
+ }
+ }
+ else
+ {
+ (preds = (sc_predictors_71[(step+BgL_sc_nbzd2nts_81zd2)]));
+ (sc_states_78 = sc_states_67);
+ (state = sc_state_82);
+ (BgL_sc_statezd2num_77zd2 = BgL_sc_statezd2num_68zd2);
+ (BgL_sc_confzd2set_76zd2 = BgL_sc_confzd2set_79zd2);
+ sc_loop1_75 = function(l) {
+ var sc_state_83;
+ var BgL_sc_nextzd2set_84zd2;
+ var sc_next_85;
+ var pred_set;
+ var i;
+ var pred;
+ if ((l instanceof sc_Pair))
+ {
+ (pred = (l.car));
+ (i = head);
+ while ((i>=(0))) {
+ {
+ (pred_set = ((sc_state_83 = (sc_states_78[i])), (sc_state_83[(pred+(1))])));
+ if ((pred_set!== false))
+ {
+ (sc_next_85 = (pred+(1)));
+ (BgL_sc_nextzd2set_84zd2 = (BgL_sc_confzd2setzd2getza2_44za2(state, BgL_sc_statezd2num_77zd2, sc_next_85)));
+ (conf_set_union(state, BgL_sc_nextzd2set_84zd2, sc_next_85, pred_set));
+ }
+ (i = (BgL_sc_confzd2set_76zd2[(i+(5))]));
+ }
+ }
+ return (sc_loop1_75((l.cdr)));
+ }
+ else
+ return undefined;
+ };
+ (sc_loop1_75(preds));
+ }
+ }
+ else
+ return undefined;
+ }
+ }
+ }
+ };
+ is_parsed = function(nt, i, j, sc_nts_86, sc_enders_87, sc_states_88) {
+ var conf_set;
+ var state;
+ var sc_conf_89;
+ var l;
+ var BgL_sc_ntza2_90za2;
+ {
+ (BgL_sc_ntza2_90za2 = (sc_ind_43(nt, sc_nts_86)));
+ if ((BgL_sc_ntza2_90za2!== false))
+ {
+ (sc_nts_86.length);
+ (l = (sc_enders_87[BgL_sc_ntza2_90za2]));
+ while (true) {
+ if ((l instanceof sc_Pair))
+ {
+ (sc_conf_89 = (l.car));
+ if ((((state = (sc_states_88[j])), (conf_set = (state[(sc_conf_89+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+ return true;
+ else
+ (l = (l.cdr));
+ }
+ else
+ return false;
+ }
+ }
+ else
+ return false;
+ }
+ };
+ deriv_trees = function(sc_conf_91, i, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2) {
+ var sc_loop1_98;
+ var prev;
+ var name;
+ return ((name = (sc_names_94[sc_conf_91])), ((name!== false)?((sc_conf_91<BgL_sc_nbzd2nts_97zd2)?(sc_list((sc_list(name, ((sc_toks_95[i]).car))))):(sc_list((sc_list(name))))):((prev = (sc_conf_91-(1))), (sc_loop1_98 = function(l1, l2) {
+ var loop2;
+ var ender_set;
+ var state;
+ var ender;
+ var l1;
+ var l2;
+ while (true) {
+ if ((l1 instanceof sc_Pair))
+ {
+ (ender = (l1.car));
+ (ender_set = ((state = (sc_states_96[j])), (state[(ender+(1))])));
+ if ((ender_set!== false))
+ {
+ loop2 = function(k, l2) {
+ var loop3;
+ var ender_trees;
+ var prev_trees;
+ var conf_set;
+ var sc_state_99;
+ var k;
+ var l2;
+ while (true) {
+ if ((k>=(0)))
+ if (((k>=i)&&(((sc_state_99 = (sc_states_96[k])), (conf_set = (sc_state_99[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
+ {
+ (prev_trees = (deriv_trees(prev, i, k, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
+ (ender_trees = (deriv_trees(ender, k, j, sc_enders_92, sc_steps_93, sc_names_94, sc_toks_95, sc_states_96, BgL_sc_nbzd2nts_97zd2)));
+ loop3 = function(l3, l2) {
+ var l4;
+ var sc_l2_100;
+ var ender_tree;
+ if ((l3 instanceof sc_Pair))
+ {
+ (ender_tree = (sc_list((l3.car))));
+ (l4 = prev_trees);
+ (sc_l2_100 = l2);
+ while ((l4 instanceof sc_Pair)) {
+ {
+ (sc_l2_100 = (new sc_Pair((sc_append((l4.car), ender_tree)), sc_l2_100)));
+ (l4 = (l4.cdr));
+ }
+ }
+ return (loop3((l3.cdr), sc_l2_100));
+ }
+ else
+ return (loop2((ender_set[(k+(5))]), l2));
+ };
+ return (loop3(ender_trees, l2));
+ }
+ else
+ (k = (ender_set[(k+(5))]));
+ else
+ return (sc_loop1_98((l1.cdr), l2));
+ }
+ };
+ return (loop2((ender_set[(2)]), l2));
+ }
+ else
+ (l1 = (l1.cdr));
+ }
+ else
+ return l2;
+ }
+ }), (sc_loop1_98((sc_enders_92[(sc_steps_93[prev])]), null)))));
+ };
+ BgL_sc_derivzd2treesza2_47z70 = function(nt, i, j, sc_nts_101, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106) {
+ var conf_set;
+ var state;
+ var sc_conf_107;
+ var l;
+ var trees;
+ var BgL_sc_nbzd2nts_108zd2;
+ var BgL_sc_ntza2_109za2;
+ {
+ (BgL_sc_ntza2_109za2 = (sc_ind_43(nt, sc_nts_101)));
+ if ((BgL_sc_ntza2_109za2!== false))
+ {
+ (BgL_sc_nbzd2nts_108zd2 = (sc_nts_101.length));
+ (l = (sc_enders_102[BgL_sc_ntza2_109za2]));
+ (trees = null);
+ while ((l instanceof sc_Pair)) {
+ {
+ (sc_conf_107 = (l.car));
+ if ((((state = (sc_states_106[j])), (conf_set = (state[(sc_conf_107+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+ {
+ (l = (l.cdr));
+ (trees = (sc_append((deriv_trees(sc_conf_107, i, j, sc_enders_102, sc_steps_103, sc_names_104, sc_toks_105, sc_states_106, BgL_sc_nbzd2nts_108zd2)), trees)));
+ }
+ else
+ (l = (l.cdr));
+ }
+ }
+ return trees;
+ }
+ else
+ return false;
+ }
+ };
+ nb_deriv_trees = function(sc_conf_110, i, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2) {
+ var sc_loop1_116;
+ var tmp1124;
+ var prev;
+ return ((prev = (sc_conf_110-(1))), ((((tmp1124 = (sc_conf_110<BgL_sc_nbzd2nts_115zd2)), ((tmp1124!== false)?tmp1124:((sc_steps_112[prev])<(0))))!== false)?(1):((sc_loop1_116 = function(l, sc_n_118) {
+ var nb_ender_trees;
+ var nb_prev_trees;
+ var conf_set;
+ var state;
+ var k;
+ var n;
+ var ender_set;
+ var sc_state_117;
+ var ender;
+ var l;
+ var sc_n_118;
+ while (true) {
+ if ((l instanceof sc_Pair))
+ {
+ (ender = (l.car));
+ (ender_set = ((sc_state_117 = (sc_states_114[j])), (sc_state_117[(ender+(1))])));
+ if ((ender_set!== false))
+ {
+ (k = (ender_set[(2)]));
+ (n = sc_n_118);
+ while ((k>=(0))) {
+ if (((k>=i)&&(((state = (sc_states_114[k])), (conf_set = (state[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
+ {
+ (nb_prev_trees = (nb_deriv_trees(prev, i, k, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
+ (nb_ender_trees = (nb_deriv_trees(ender, k, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
+ (k = (ender_set[(k+(5))]));
+ (n +=(nb_prev_trees*nb_ender_trees));
+ }
+ else
+ (k = (ender_set[(k+(5))]));
+ }
+ return (sc_loop1_116((l.cdr), n));
+ }
+ else
+ (l = (l.cdr));
+ }
+ else
+ return sc_n_118;
+ }
+ }), (sc_loop1_116((sc_enders_111[(sc_steps_112[prev])]), (0))))));
+ };
+ BgL_sc_nbzd2derivzd2treesza2_48za2 = function(nt, i, j, sc_nts_119, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123) {
+ var conf_set;
+ var state;
+ var sc_conf_124;
+ var l;
+ var nb_trees;
+ var BgL_sc_nbzd2nts_125zd2;
+ var BgL_sc_ntza2_126za2;
+ {
+ (BgL_sc_ntza2_126za2 = (sc_ind_43(nt, sc_nts_119)));
+ if ((BgL_sc_ntza2_126za2!== false))
+ {
+ (BgL_sc_nbzd2nts_125zd2 = (sc_nts_119.length));
+ (l = (sc_enders_120[BgL_sc_ntza2_126za2]));
+ (nb_trees = (0));
+ while ((l instanceof sc_Pair)) {
+ {
+ (sc_conf_124 = (l.car));
+ if ((((state = (sc_states_123[j])), (conf_set = (state[(sc_conf_124+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false))
+ {
+ (l = (l.cdr));
+ (nb_trees = ((nb_deriv_trees(sc_conf_124, i, j, sc_enders_120, sc_steps_121, sc_toks_122, sc_states_123, BgL_sc_nbzd2nts_125zd2))+nb_trees));
+ }
+ else
+ (l = (l.cdr));
+ }
+ }
+ return nb_trees;
+ }
+ else
+ return false;
+ }
+ };
+ (lexer = (parser_descr[(0)]));
+ (sc_nts_42 = (parser_descr[(1)]));
+ (sc_starters_41 = (parser_descr[(2)]));
+ (sc_enders_40 = (parser_descr[(3)]));
+ (sc_predictors_39 = (parser_descr[(4)]));
+ (sc_steps_38 = (parser_descr[(5)]));
+ (sc_names_37 = (parser_descr[(6)]));
+ (falseHead1128 = (new sc_Pair(null, null)));
+ (L1125 = (lexer(input)));
+ (tail1129 = falseHead1128);
+ while (!(L1125 === null)) {
+ {
+ (tok = (L1125.car));
+ (l1 = (tok.cdr));
+ (l2 = null);
+ while ((l1 instanceof sc_Pair)) {
+ {
+ (sc_i_29 = (sc_ind_43((l1.car), sc_nts_42)));
+ if ((sc_i_29!== false))
+ {
+ (l1 = (l1.cdr));
+ (l2 = (new sc_Pair(sc_i_29, l2)));
+ }
+ else
+ (l1 = (l1.cdr));
+ }
+ }
+ (sc_optrOpnd_22 = (new sc_Pair((tok.car), (sc_reverse(l2)))));
+ (sc_optrOpnd_21 = (new sc_Pair(sc_optrOpnd_22, null)));
+ (tail1129.cdr = sc_optrOpnd_21);
+ (tail1129 = (tail1129.cdr));
+ (L1125 = (L1125.cdr));
+ }
+ }
+ (sc_optrOpnd_20 = (falseHead1128.cdr));
+ (sc_toks_36 = (sc_list2vector(sc_optrOpnd_20)));
+ (BgL_sc_nbzd2toks_35zd2 = (sc_toks_36.length));
+ (BgL_sc_nbzd2confs_34zd2 = (sc_steps_38.length));
+ (sc_states_33 = (make_states(BgL_sc_nbzd2toks_35zd2, BgL_sc_nbzd2confs_34zd2)));
+ (goal_starters = (sc_starters_41[(0)]));
+ (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (0), goal_starters, (0)));
+ (forw(sc_states_33, (0), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
+ (sc_i_28 = (0));
+ while ((sc_i_28<BgL_sc_nbzd2toks_35zd2)) {
+ {
+ (tok_nts = ((sc_toks_36[sc_i_28]).cdr));
+ (BgL_sc_confzd2setzd2adjoinza2_45za2(sc_states_33, (sc_i_28+(1)), tok_nts, sc_i_28));
+ (forw(sc_states_33, (sc_i_28+(1)), sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_nts_42));
+ (++sc_i_28);
+ }
+ }
+ (nb_toks = (sc_toks_36.length));
+ (BgL_sc_nbzd2confs_32zd2 = (sc_steps_38.length));
+ (BgL_sc_nbzd2nts_31zd2 = (sc_nts_42.length));
+ (BgL_sc_statesza2_30za2 = (make_states(nb_toks, BgL_sc_nbzd2confs_32zd2)));
+ (goal_enders = (sc_enders_40[(0)]));
+ (l = goal_enders);
+ while ((l instanceof sc_Pair)) {
+ {
+ (conf = (l.car));
+ (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_33, BgL_sc_statesza2_30za2, nb_toks, conf, (0)));
+ (l = (l.cdr));
+ }
+ }
+ (i = nb_toks);
+ while ((i>=(0))) {
+ {
+ (states = sc_states_33);
+ (BgL_sc_statesza2_27za2 = BgL_sc_statesza2_30za2);
+ (state_num = i);
+ (sc_enders_26 = sc_enders_40);
+ (sc_steps_25 = sc_steps_38);
+ (BgL_sc_nbzd2nts_24zd2 = BgL_sc_nbzd2nts_31zd2);
+ (toks = sc_toks_36);
+ (BgL_sc_stateza2_23za2 = (BgL_sc_statesza2_30za2[i]));
+ loop1 = function() {
+ var sc_loop1_127;
+ var prev;
+ var BgL_sc_statesza2_128za2;
+ var sc_states_129;
+ var j;
+ var i;
+ var sc_i_130;
+ var head;
+ var conf_set;
+ var sc_conf_131;
+ {
+ (sc_conf_131 = (BgL_sc_stateza2_23za2[(0)]));
+ if ((sc_conf_131>=(0)))
+ {
+ (conf_set = (BgL_sc_stateza2_23za2[(sc_conf_131+(1))]));
+ (head = (conf_set[(4)]));
+ (BgL_sc_stateza2_23za2[(0)] = (conf_set[(0)]));
+ (conf_set_merge_new_bang(conf_set));
+ (sc_i_130 = head);
+ while ((sc_i_130>=(0))) {
+ {
+ (i = sc_i_130);
+ (j = state_num);
+ (sc_states_129 = states);
+ (BgL_sc_statesza2_128za2 = BgL_sc_statesza2_27za2);
+ (prev = (sc_conf_131-(1)));
+ if (((sc_conf_131>=BgL_sc_nbzd2nts_24zd2)&&((sc_steps_25[prev])>=(0))))
+ {
+ sc_loop1_127 = function(l) {
+ var k;
+ var ender_set;
+ var state;
+ var ender;
+ var l;
+ while (true) {
+ if ((l instanceof sc_Pair))
+ {
+ (ender = (l.car));
+ (ender_set = ((state = (sc_states_129[j])), (state[(ender+(1))])));
+ if ((ender_set!== false))
+ {
+ (k = (ender_set[(2)]));
+ while ((k>=(0))) {
+ {
+ if ((k>=i))
+ if (((BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, k, prev, i))!== false))
+ (BgL_sc_confzd2setzd2adjoinza2za2_46z00(sc_states_129, BgL_sc_statesza2_128za2, j, ender, k));
+ (k = (ender_set[(k+(5))]));
+ }
+ }
+ return (sc_loop1_127((l.cdr)));
+ }
+ else
+ (l = (l.cdr));
+ }
+ else
+ return undefined;
+ }
+ };
+ (sc_loop1_127((sc_enders_26[(sc_steps_25[prev])])));
+ }
+ (sc_i_130 = (conf_set[(sc_i_130+(5))]));
+ }
+ }
+ return (loop1());
+ }
+ else
+ return undefined;
+ }
+ };
+ (loop1());
+ (--i);
+ }
+ }
+ (optrOpnd = BgL_sc_statesza2_30za2);
+ return [sc_nts_42, sc_starters_41, sc_enders_40, sc_predictors_39, sc_steps_38, sc_names_37, sc_toks_36, optrOpnd, is_parsed, BgL_sc_derivzd2treesza2_47z70, BgL_sc_nbzd2derivzd2treesza2_48za2];
+ }
+ };
+ }
+ };
+ BgL_parsezd2ze3parsedzf3zc2 = function(parse, nt, i, j) {
+ var is_parsed;
+ var states;
+ var enders;
+ var nts;
+ return ((nts = (parse[(0)])), (enders = (parse[(2)])), (states = (parse[(7)])), (is_parsed = (parse[(8)])), (is_parsed(nt, i, j, nts, enders, states)));
+ };
+ BgL_parsezd2ze3treesz31 = function(parse, nt, i, j) {
+ var BgL_sc_derivzd2treesza2_132z70;
+ var states;
+ var toks;
+ var names;
+ var steps;
+ var enders;
+ var nts;
+ return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (names = (parse[(5)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_derivzd2treesza2_132z70 = (parse[(9)])), (BgL_sc_derivzd2treesza2_132z70(nt, i, j, nts, enders, steps, names, toks, states)));
+ };
+ BgL_parsezd2ze3nbzd2treesze3 = function(parse, nt, i, j) {
+ var BgL_sc_nbzd2derivzd2treesza2_133za2;
+ var states;
+ var toks;
+ var steps;
+ var enders;
+ var nts;
+ return ((nts = (parse[(0)])), (enders = (parse[(2)])), (steps = (parse[(4)])), (toks = (parse[(6)])), (states = (parse[(7)])), (BgL_sc_nbzd2derivzd2treesza2_133za2 = (parse[(10)])), (BgL_sc_nbzd2derivzd2treesza2_133za2(nt, i, j, nts, enders, steps, toks, states)));
+ };
+ test = function(k) {
+ var x;
+ var p;
+ return ((p = (BgL_makezd2parserzd2(const_earley, function(l) {
+ var sc_x_134;
+ var tail1134;
+ var L1130;
+ var falseHead1133;
+ {
+ (falseHead1133 = (new sc_Pair(null, null)));
+ (tail1134 = falseHead1133);
+ (L1130 = l);
+ while (!(L1130 === null)) {
+ {
+ (tail1134.cdr = (new sc_Pair(((sc_x_134 = (L1130.car)), (sc_list(sc_x_134, sc_x_134))), null)));
+ (tail1134 = (tail1134.cdr));
+ (L1130 = (L1130.cdr));
+ }
+ }
+ return (falseHead1133.cdr);
+ }
+ }))), (x = (p((sc_vector2list((sc_makeVector(k, "\u1E9Ca"))))))), (sc_length((BgL_parsezd2ze3treesz31(x, "\u1E9Cs", (0), k)))));
+ };
+ BgL_earleyzd2benchmarkzd2 = function() {
+ var args = null;
+ for (var sc_tmp = arguments.length - 1; sc_tmp >= 0; sc_tmp--) {
+ args = sc_cons(arguments[sc_tmp], args);
+ }
+ var k;
+ return ((k = ((args === null)?(7):(args.car))), (BgL_runzd2benchmarkzd2("earley", (1), function() {
+ return (test(k));
+ }, function(result) {
+ return ((sc_display(result)), (sc_newline()), result == 132);
+ })));
+ };
+}
+
+
+/************* END OF GENERATED CODE *************/
+// Invoke this function to run a benchmark.
+// The first argument is a string identifying the benchmark.
+// The second argument is the number of times to run the benchmark.
+// The third argument is a function that runs the benchmark.
+// The fourth argument is a unary function that warns if the result
+// returned by the benchmark is incorrect.
+//
+// Example:
+// RunBenchmark("new Array()",
+// 1,
+// function () { new Array(1000000); }
+// function (v) {
+// return (v instanceof Array) && (v.length == 1000000);
+// });
+
+SC_DEFAULT_OUT = new sc_GenericOutputPort(function(s) {});
+SC_ERROR_OUT = SC_DEFAULT_OUT;
+
+function RunBenchmark(name, count, run, warn) {
+ for (var n = 0; n < count; ++n) {
+ result = run();
+ if (!warn(result)) {
+ throw new Error("Earley or Boyer did incorrect number of rewrites");
+ }
+ }
+}
+
+var BgL_runzd2benchmarkzd2 = RunBenchmark;
+
+for (var i = 0; i < 4; ++i) {
+ BgL_earleyzd2benchmarkzd2();
+ BgL_nboyerzd2benchmarkzd2();
+}
diff --git a/SunSpider/tests/v8-v6/v8-raytrace.js b/SunSpider/tests/v8-v6/v8-raytrace.js
new file mode 100644
index 0000000..1805ae5
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-raytrace.js
@@ -0,0 +1,902 @@
+// The ray tracer code in this file is written by Adam Burmister. It
+// is available in its original form from:
+//
+// http://labs.flog.nz.co/raytracer/
+//
+// It has been modified slightly by Google to work as a standalone
+// benchmark, but the all the computational code remains
+// untouched. This file also contains a copy of parts of the Prototype
+// JavaScript framework which is used by the ray tracer.
+
+// Variable used to hold a number that can be used to verify that
+// the scene was ray traced correctly.
+var checkNumber;
+
+
+// ------------------------------------------------------------------------
+// ------------------------------------------------------------------------
+
+// The following is a copy of parts of the Prototype JavaScript library:
+
+// Prototype JavaScript framework, version 1.5.0
+// (c) 2005-2007 Sam Stephenson
+//
+// Prototype is freely distributable under the terms of an MIT-style license.
+// For details, see the Prototype web site: http://prototype.conio.net/
+
+
+var Class = {
+ create: function() {
+ return function() {
+ this.initialize.apply(this, arguments);
+ }
+ }
+};
+
+
+Object.extend = function(destination, source) {
+ for (var property in source) {
+ destination[property] = source[property];
+ }
+ return destination;
+};
+
+
+// ------------------------------------------------------------------------
+// ------------------------------------------------------------------------
+
+// The rest of this file is the actual ray tracer written by Adam
+// Burmister. It's a concatenation of the following files:
+//
+// flog/color.js
+// flog/light.js
+// flog/vector.js
+// flog/ray.js
+// flog/scene.js
+// flog/material/basematerial.js
+// flog/material/solid.js
+// flog/material/chessboard.js
+// flog/shape/baseshape.js
+// flog/shape/sphere.js
+// flog/shape/plane.js
+// flog/intersectioninfo.js
+// flog/camera.js
+// flog/background.js
+// flog/engine.js
+
+
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Color = Class.create();
+
+Flog.RayTracer.Color.prototype = {
+ red : 0.0,
+ green : 0.0,
+ blue : 0.0,
+
+ initialize : function(r, g, b) {
+ if(!r) r = 0.0;
+ if(!g) g = 0.0;
+ if(!b) b = 0.0;
+
+ this.red = r;
+ this.green = g;
+ this.blue = b;
+ },
+
+ add : function(c1, c2){
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red + c2.red;
+ result.green = c1.green + c2.green;
+ result.blue = c1.blue + c2.blue;
+
+ return result;
+ },
+
+ addScalar: function(c1, s){
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red + s;
+ result.green = c1.green + s;
+ result.blue = c1.blue + s;
+
+ result.limit();
+
+ return result;
+ },
+
+ subtract: function(c1, c2){
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red - c2.red;
+ result.green = c1.green - c2.green;
+ result.blue = c1.blue - c2.blue;
+
+ return result;
+ },
+
+ multiply : function(c1, c2) {
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red * c2.red;
+ result.green = c1.green * c2.green;
+ result.blue = c1.blue * c2.blue;
+
+ return result;
+ },
+
+ multiplyScalar : function(c1, f) {
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red * f;
+ result.green = c1.green * f;
+ result.blue = c1.blue * f;
+
+ return result;
+ },
+
+ divideFactor : function(c1, f) {
+ var result = new Flog.RayTracer.Color(0,0,0);
+
+ result.red = c1.red / f;
+ result.green = c1.green / f;
+ result.blue = c1.blue / f;
+
+ return result;
+ },
+
+ limit: function(){
+ this.red = (this.red > 0.0) ? ( (this.red > 1.0) ? 1.0 : this.red ) : 0.0;
+ this.green = (this.green > 0.0) ? ( (this.green > 1.0) ? 1.0 : this.green ) : 0.0;
+ this.blue = (this.blue > 0.0) ? ( (this.blue > 1.0) ? 1.0 : this.blue ) : 0.0;
+ },
+
+ distance : function(color) {
+ var d = Math.abs(this.red - color.red) + Math.abs(this.green - color.green) + Math.abs(this.blue - color.blue);
+ return d;
+ },
+
+ blend: function(c1, c2, w){
+ var result = new Flog.RayTracer.Color(0,0,0);
+ result = Flog.RayTracer.Color.prototype.add(
+ Flog.RayTracer.Color.prototype.multiplyScalar(c1, 1 - w),
+ Flog.RayTracer.Color.prototype.multiplyScalar(c2, w)
+ );
+ return result;
+ },
+
+ brightness : function() {
+ var r = Math.floor(this.red*255);
+ var g = Math.floor(this.green*255);
+ var b = Math.floor(this.blue*255);
+ return (r * 77 + g * 150 + b * 29) >> 8;
+ },
+
+ toString : function () {
+ var r = Math.floor(this.red*255);
+ var g = Math.floor(this.green*255);
+ var b = Math.floor(this.blue*255);
+
+ return "rgb("+ r +","+ g +","+ b +")";
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Light = Class.create();
+
+Flog.RayTracer.Light.prototype = {
+ position: null,
+ color: null,
+ intensity: 10.0,
+
+ initialize : function(pos, color, intensity) {
+ this.position = pos;
+ this.color = color;
+ this.intensity = (intensity ? intensity : 10.0);
+ },
+
+ toString : function () {
+ return 'Light [' + this.position.x + ',' + this.position.y + ',' + this.position.z + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Vector = Class.create();
+
+Flog.RayTracer.Vector.prototype = {
+ x : 0.0,
+ y : 0.0,
+ z : 0.0,
+
+ initialize : function(x, y, z) {
+ this.x = (x ? x : 0);
+ this.y = (y ? y : 0);
+ this.z = (z ? z : 0);
+ },
+
+ copy: function(vector){
+ this.x = vector.x;
+ this.y = vector.y;
+ this.z = vector.z;
+ },
+
+ normalize : function() {
+ var m = this.magnitude();
+ return new Flog.RayTracer.Vector(this.x / m, this.y / m, this.z / m);
+ },
+
+ magnitude : function() {
+ return Math.sqrt((this.x * this.x) + (this.y * this.y) + (this.z * this.z));
+ },
+
+ cross : function(w) {
+ return new Flog.RayTracer.Vector(
+ -this.z * w.y + this.y * w.z,
+ this.z * w.x - this.x * w.z,
+ -this.y * w.x + this.x * w.y);
+ },
+
+ dot : function(w) {
+ return this.x * w.x + this.y * w.y + this.z * w.z;
+ },
+
+ add : function(v, w) {
+ return new Flog.RayTracer.Vector(w.x + v.x, w.y + v.y, w.z + v.z);
+ },
+
+ subtract : function(v, w) {
+ if(!w || !v) throw 'Vectors must be defined [' + v + ',' + w + ']';
+ return new Flog.RayTracer.Vector(v.x - w.x, v.y - w.y, v.z - w.z);
+ },
+
+ multiplyVector : function(v, w) {
+ return new Flog.RayTracer.Vector(v.x * w.x, v.y * w.y, v.z * w.z);
+ },
+
+ multiplyScalar : function(v, w) {
+ return new Flog.RayTracer.Vector(v.x * w, v.y * w, v.z * w);
+ },
+
+ toString : function () {
+ return 'Vector [' + this.x + ',' + this.y + ',' + this.z + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Ray = Class.create();
+
+Flog.RayTracer.Ray.prototype = {
+ position : null,
+ direction : null,
+ initialize : function(pos, dir) {
+ this.position = pos;
+ this.direction = dir;
+ },
+
+ toString : function () {
+ return 'Ray [' + this.position + ',' + this.direction + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Scene = Class.create();
+
+Flog.RayTracer.Scene.prototype = {
+ camera : null,
+ shapes : [],
+ lights : [],
+ background : null,
+
+ initialize : function() {
+ this.camera = new Flog.RayTracer.Camera(
+ new Flog.RayTracer.Vector(0,0,-5),
+ new Flog.RayTracer.Vector(0,0,1),
+ new Flog.RayTracer.Vector(0,1,0)
+ );
+ this.shapes = new Array();
+ this.lights = new Array();
+ this.background = new Flog.RayTracer.Background(new Flog.RayTracer.Color(0,0,0.5), 0.2);
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Material) == 'undefined') Flog.RayTracer.Material = {};
+
+Flog.RayTracer.Material.BaseMaterial = Class.create();
+
+Flog.RayTracer.Material.BaseMaterial.prototype = {
+
+ gloss: 2.0, // [0...infinity] 0 = matt
+ transparency: 0.0, // 0=opaque
+ reflection: 0.0, // [0...infinity] 0 = no reflection
+ refraction: 0.50,
+ hasTexture: false,
+
+ initialize : function() {
+
+ },
+
+ getColor: function(u, v){
+
+ },
+
+ wrapUp: function(t){
+ t = t % 2.0;
+ if(t < -1) t += 2.0;
+ if(t >= 1) t -= 2.0;
+ return t;
+ },
+
+ toString : function () {
+ return 'Material [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Material.Solid = Class.create();
+
+Flog.RayTracer.Material.Solid.prototype = Object.extend(
+ new Flog.RayTracer.Material.BaseMaterial(), {
+ initialize : function(color, reflection, refraction, transparency, gloss) {
+ this.color = color;
+ this.reflection = reflection;
+ this.transparency = transparency;
+ this.gloss = gloss;
+ this.hasTexture = false;
+ },
+
+ getColor: function(u, v){
+ return this.color;
+ },
+
+ toString : function () {
+ return 'SolidMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+ }
+);
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Material.Chessboard = Class.create();
+
+Flog.RayTracer.Material.Chessboard.prototype = Object.extend(
+ new Flog.RayTracer.Material.BaseMaterial(), {
+ colorEven: null,
+ colorOdd: null,
+ density: 0.5,
+
+ initialize : function(colorEven, colorOdd, reflection, transparency, gloss, density) {
+ this.colorEven = colorEven;
+ this.colorOdd = colorOdd;
+ this.reflection = reflection;
+ this.transparency = transparency;
+ this.gloss = gloss;
+ this.density = density;
+ this.hasTexture = true;
+ },
+
+ getColor: function(u, v){
+ var t = this.wrapUp(u * this.density) * this.wrapUp(v * this.density);
+
+ if(t < 0.0)
+ return this.colorEven;
+ else
+ return this.colorOdd;
+ },
+
+ toString : function () {
+ return 'ChessMaterial [gloss=' + this.gloss + ', transparency=' + this.transparency + ', hasTexture=' + this.hasTexture +']';
+ }
+ }
+);
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};
+
+Flog.RayTracer.Shape.Sphere = Class.create();
+
+Flog.RayTracer.Shape.Sphere.prototype = {
+ initialize : function(pos, radius, material) {
+ this.radius = radius;
+ this.position = pos;
+ this.material = material;
+ },
+
+ intersect: function(ray){
+ var info = new Flog.RayTracer.IntersectionInfo();
+ info.shape = this;
+
+ var dst = Flog.RayTracer.Vector.prototype.subtract(ray.position, this.position);
+
+ var B = dst.dot(ray.direction);
+ var C = dst.dot(dst) - (this.radius * this.radius);
+ var D = (B * B) - C;
+
+ if(D > 0){ // intersection!
+ info.isHit = true;
+ info.distance = (-B) - Math.sqrt(D);
+ info.position = Flog.RayTracer.Vector.prototype.add(
+ ray.position,
+ Flog.RayTracer.Vector.prototype.multiplyScalar(
+ ray.direction,
+ info.distance
+ )
+ );
+ info.normal = Flog.RayTracer.Vector.prototype.subtract(
+ info.position,
+ this.position
+ ).normalize();
+
+ info.color = this.material.getColor(0,0);
+ } else {
+ info.isHit = false;
+ }
+ return info;
+ },
+
+ toString : function () {
+ return 'Sphere [position=' + this.position + ', radius=' + this.radius + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+if(typeof(Flog.RayTracer.Shape) == 'undefined') Flog.RayTracer.Shape = {};
+
+Flog.RayTracer.Shape.Plane = Class.create();
+
+Flog.RayTracer.Shape.Plane.prototype = {
+ d: 0.0,
+
+ initialize : function(pos, d, material) {
+ this.position = pos;
+ this.d = d;
+ this.material = material;
+ },
+
+ intersect: function(ray){
+ var info = new Flog.RayTracer.IntersectionInfo();
+
+ var Vd = this.position.dot(ray.direction);
+ if(Vd == 0) return info; // no intersection
+
+ var t = -(this.position.dot(ray.position) + this.d) / Vd;
+ if(t <= 0) return info;
+
+ info.shape = this;
+ info.isHit = true;
+ info.position = Flog.RayTracer.Vector.prototype.add(
+ ray.position,
+ Flog.RayTracer.Vector.prototype.multiplyScalar(
+ ray.direction,
+ t
+ )
+ );
+ info.normal = this.position;
+ info.distance = t;
+
+ if(this.material.hasTexture){
+ var vU = new Flog.RayTracer.Vector(this.position.y, this.position.z, -this.position.x);
+ var vV = vU.cross(this.position);
+ var u = info.position.dot(vU);
+ var v = info.position.dot(vV);
+ info.color = this.material.getColor(u,v);
+ } else {
+ info.color = this.material.getColor(0,0);
+ }
+
+ return info;
+ },
+
+ toString : function () {
+ return 'Plane [' + this.position + ', d=' + this.d + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.IntersectionInfo = Class.create();
+
+Flog.RayTracer.IntersectionInfo.prototype = {
+ isHit: false,
+ hitCount: 0,
+ shape: null,
+ position: null,
+ normal: null,
+ color: null,
+ distance: null,
+
+ initialize : function() {
+ this.color = new Flog.RayTracer.Color(0,0,0);
+ },
+
+ toString : function () {
+ return 'Intersection [' + this.position + ']';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Camera = Class.create();
+
+Flog.RayTracer.Camera.prototype = {
+ position: null,
+ lookAt: null,
+ equator: null,
+ up: null,
+ screen: null,
+
+ initialize : function(pos, lookAt, up) {
+ this.position = pos;
+ this.lookAt = lookAt;
+ this.up = up;
+ this.equator = lookAt.normalize().cross(this.up);
+ this.screen = Flog.RayTracer.Vector.prototype.add(this.position, this.lookAt);
+ },
+
+ getRay: function(vx, vy){
+ var pos = Flog.RayTracer.Vector.prototype.subtract(
+ this.screen,
+ Flog.RayTracer.Vector.prototype.subtract(
+ Flog.RayTracer.Vector.prototype.multiplyScalar(this.equator, vx),
+ Flog.RayTracer.Vector.prototype.multiplyScalar(this.up, vy)
+ )
+ );
+ pos.y = pos.y * -1;
+ var dir = Flog.RayTracer.Vector.prototype.subtract(
+ pos,
+ this.position
+ );
+
+ var ray = new Flog.RayTracer.Ray(pos, dir.normalize());
+
+ return ray;
+ },
+
+ toString : function () {
+ return 'Ray []';
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Background = Class.create();
+
+Flog.RayTracer.Background.prototype = {
+ color : null,
+ ambience : 0.0,
+
+ initialize : function(color, ambience) {
+ this.color = color;
+ this.ambience = ambience;
+ }
+}
+/* Fake a Flog.* namespace */
+if(typeof(Flog) == 'undefined') var Flog = {};
+if(typeof(Flog.RayTracer) == 'undefined') Flog.RayTracer = {};
+
+Flog.RayTracer.Engine = Class.create();
+
+Flog.RayTracer.Engine.prototype = {
+ canvas: null, /* 2d context we can render to */
+
+ initialize: function(options){
+ this.options = Object.extend({
+ canvasHeight: 100,
+ canvasWidth: 100,
+ pixelWidth: 2,
+ pixelHeight: 2,
+ renderDiffuse: false,
+ renderShadows: false,
+ renderHighlights: false,
+ renderReflections: false,
+ rayDepth: 2
+ }, options || {});
+
+ this.options.canvasHeight /= this.options.pixelHeight;
+ this.options.canvasWidth /= this.options.pixelWidth;
+
+ /* TODO: dynamically include other scripts */
+ },
+
+ setPixel: function(x, y, color){
+ var pxW, pxH;
+ pxW = this.options.pixelWidth;
+ pxH = this.options.pixelHeight;
+
+ if (this.canvas) {
+ this.canvas.fillStyle = color.toString();
+ this.canvas.fillRect (x * pxW, y * pxH, pxW, pxH);
+ } else {
+ if (x === y) {
+ checkNumber += color.brightness();
+ }
+ // print(x * pxW, y * pxH, pxW, pxH);
+ }
+ },
+
+ renderScene: function(scene, canvas){
+ checkNumber = 0;
+ /* Get canvas */
+ if (canvas) {
+ this.canvas = canvas.getContext("2d");
+ } else {
+ this.canvas = null;
+ }
+
+ var canvasHeight = this.options.canvasHeight;
+ var canvasWidth = this.options.canvasWidth;
+
+ for(var y=0; y < canvasHeight; y++){
+ for(var x=0; x < canvasWidth; x++){
+ var yp = y * 1.0 / canvasHeight * 2 - 1;
+ var xp = x * 1.0 / canvasWidth * 2 - 1;
+
+ var ray = scene.camera.getRay(xp, yp);
+
+ var color = this.getPixelColor(ray, scene);
+
+ this.setPixel(x, y, color);
+ }
+ }
+ if (checkNumber !== 2321) {
+ throw new Error("Scene rendered incorrectly");
+ }
+ },
+
+ getPixelColor: function(ray, scene){
+ var info = this.testIntersection(ray, scene, null);
+ if(info.isHit){
+ var color = this.rayTrace(info, ray, scene, 0);
+ return color;
+ }
+ return scene.background.color;
+ },
+
+ testIntersection: function(ray, scene, exclude){
+ var hits = 0;
+ var best = new Flog.RayTracer.IntersectionInfo();
+ best.distance = 2000;
+
+ for(var i=0; i<scene.shapes.length; i++){
+ var shape = scene.shapes[i];
+
+ if(shape != exclude){
+ var info = shape.intersect(ray);
+ if(info.isHit && info.distance >= 0 && info.distance < best.distance){
+ best = info;
+ hits++;
+ }
+ }
+ }
+ best.hitCount = hits;
+ return best;
+ },
+
+ getReflectionRay: function(P,N,V){
+ var c1 = -N.dot(V);
+ var R1 = Flog.RayTracer.Vector.prototype.add(
+ Flog.RayTracer.Vector.prototype.multiplyScalar(N, 2*c1),
+ V
+ );
+ return new Flog.RayTracer.Ray(P, R1);
+ },
+
+ rayTrace: function(info, ray, scene, depth){
+ // Calc ambient
+ var color = Flog.RayTracer.Color.prototype.multiplyScalar(info.color, scene.background.ambience);
+ var oldColor = color;
+ var shininess = Math.pow(10, info.shape.material.gloss + 1);
+
+ for(var i=0; i<scene.lights.length; i++){
+ var light = scene.lights[i];
+
+ // Calc diffuse lighting
+ var v = Flog.RayTracer.Vector.prototype.subtract(
+ light.position,
+ info.position
+ ).normalize();
+
+ if(this.options.renderDiffuse){
+ var L = v.dot(info.normal);
+ if(L > 0.0){
+ color = Flog.RayTracer.Color.prototype.add(
+ color,
+ Flog.RayTracer.Color.prototype.multiply(
+ info.color,
+ Flog.RayTracer.Color.prototype.multiplyScalar(
+ light.color,
+ L
+ )
+ )
+ );
+ }
+ }
+
+ // The greater the depth the more accurate the colours, but
+ // this is exponentially (!) expensive
+ if(depth <= this.options.rayDepth){
+ // calculate reflection ray
+ if(this.options.renderReflections && info.shape.material.reflection > 0)
+ {
+ var reflectionRay = this.getReflectionRay(info.position, info.normal, ray.direction);
+ var refl = this.testIntersection(reflectionRay, scene, info.shape);
+
+ if (refl.isHit && refl.distance > 0){
+ refl.color = this.rayTrace(refl, reflectionRay, scene, depth + 1);
+ } else {
+ refl.color = scene.background.color;
+ }
+
+ color = Flog.RayTracer.Color.prototype.blend(
+ color,
+ refl.color,
+ info.shape.material.reflection
+ );
+ }
+
+ // Refraction
+ /* TODO */
+ }
+
+ /* Render shadows and highlights */
+
+ var shadowInfo = new Flog.RayTracer.IntersectionInfo();
+
+ if(this.options.renderShadows){
+ var shadowRay = new Flog.RayTracer.Ray(info.position, v);
+
+ shadowInfo = this.testIntersection(shadowRay, scene, info.shape);
+ if(shadowInfo.isHit && shadowInfo.shape != info.shape /*&& shadowInfo.shape.type != 'PLANE'*/){
+ var vA = Flog.RayTracer.Color.prototype.multiplyScalar(color, 0.5);
+ var dB = (0.5 * Math.pow(shadowInfo.shape.material.transparency, 0.5));
+ color = Flog.RayTracer.Color.prototype.addScalar(vA,dB);
+ }
+ }
+
+ // Phong specular highlights
+ if(this.options.renderHighlights && !shadowInfo.isHit && info.shape.material.gloss > 0){
+ var Lv = Flog.RayTracer.Vector.prototype.subtract(
+ info.shape.position,
+ light.position
+ ).normalize();
+
+ var E = Flog.RayTracer.Vector.prototype.subtract(
+ scene.camera.position,
+ info.shape.position
+ ).normalize();
+
+ var H = Flog.RayTracer.Vector.prototype.subtract(
+ E,
+ Lv
+ ).normalize();
+
+ var glossWeight = Math.pow(Math.max(info.normal.dot(H), 0), shininess);
+ color = Flog.RayTracer.Color.prototype.add(
+ Flog.RayTracer.Color.prototype.multiplyScalar(light.color, glossWeight),
+ color
+ );
+ }
+ }
+ color.limit();
+ return color;
+ }
+};
+
+
+function renderScene(){
+ var scene = new Flog.RayTracer.Scene();
+
+ scene.camera = new Flog.RayTracer.Camera(
+ new Flog.RayTracer.Vector(0, 0, -15),
+ new Flog.RayTracer.Vector(-0.2, 0, 5),
+ new Flog.RayTracer.Vector(0, 1, 0)
+ );
+
+ scene.background = new Flog.RayTracer.Background(
+ new Flog.RayTracer.Color(0.5, 0.5, 0.5),
+ 0.4
+ );
+
+ var sphere = new Flog.RayTracer.Shape.Sphere(
+ new Flog.RayTracer.Vector(-1.5, 1.5, 2),
+ 1.5,
+ new Flog.RayTracer.Material.Solid(
+ new Flog.RayTracer.Color(0,0.5,0.5),
+ 0.3,
+ 0.0,
+ 0.0,
+ 2.0
+ )
+ );
+
+ var sphere1 = new Flog.RayTracer.Shape.Sphere(
+ new Flog.RayTracer.Vector(1, 0.25, 1),
+ 0.5,
+ new Flog.RayTracer.Material.Solid(
+ new Flog.RayTracer.Color(0.9,0.9,0.9),
+ 0.1,
+ 0.0,
+ 0.0,
+ 1.5
+ )
+ );
+
+ var plane = new Flog.RayTracer.Shape.Plane(
+ new Flog.RayTracer.Vector(0.1, 0.9, -0.5).normalize(),
+ 1.2,
+ new Flog.RayTracer.Material.Chessboard(
+ new Flog.RayTracer.Color(1,1,1),
+ new Flog.RayTracer.Color(0,0,0),
+ 0.2,
+ 0.0,
+ 1.0,
+ 0.7
+ )
+ );
+
+ scene.shapes.push(plane);
+ scene.shapes.push(sphere);
+ scene.shapes.push(sphere1);
+
+ var light = new Flog.RayTracer.Light(
+ new Flog.RayTracer.Vector(5, 10, -1),
+ new Flog.RayTracer.Color(0.8, 0.8, 0.8)
+ );
+
+ var light1 = new Flog.RayTracer.Light(
+ new Flog.RayTracer.Vector(-3, 5, -15),
+ new Flog.RayTracer.Color(0.8, 0.8, 0.8),
+ 100
+ );
+
+ scene.lights.push(light);
+ scene.lights.push(light1);
+
+ var imageWidth = 100; // $F('imageWidth');
+ var imageHeight = 100; // $F('imageHeight');
+ var pixelSize = "5,5".split(','); // $F('pixelSize').split(',');
+ var renderDiffuse = true; // $F('renderDiffuse');
+ var renderShadows = true; // $F('renderShadows');
+ var renderHighlights = true; // $F('renderHighlights');
+ var renderReflections = true; // $F('renderReflections');
+ var rayDepth = 2;//$F('rayDepth');
+
+ var raytracer = new Flog.RayTracer.Engine(
+ {
+ canvasWidth: imageWidth,
+ canvasHeight: imageHeight,
+ pixelWidth: pixelSize[0],
+ pixelHeight: pixelSize[1],
+ "renderDiffuse": renderDiffuse,
+ "renderHighlights": renderHighlights,
+ "renderShadows": renderShadows,
+ "renderReflections": renderReflections,
+ "rayDepth": rayDepth
+ }
+ );
+
+ raytracer.renderScene(scene, null, 0);
+}
+
+for (var i = 0; i < 6; ++i)
+ renderScene();
diff --git a/SunSpider/tests/v8-v6/v8-regexp.js b/SunSpider/tests/v8-v6/v8-regexp.js
new file mode 100644
index 0000000..a3ac081
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-regexp.js
@@ -0,0 +1,1613 @@
+// Copyright 2009 the V8 project authors. 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.
+
+// Automatically generated on 2009-01-30.
+
+// This benchmark is generated by loading 50 of the most popular pages
+// on the web and logging all regexp operations performed. Each
+// operation is given a weight that is calculated from an estimate of
+// the popularity of the pages where it occurs and the number of times
+// it is executed while loading each page. Finally the literal
+// letters in the data are encoded using ROT13 in a way that does not
+// affect how the regexps match their input.
+
+function runRegExpBenchmark() {
+ var re0 = /^ba/;
+ var re1 = /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/;
+ var re2 = /^\s*|\s*$/g;
+ var re3 = /\bQBZPbageby_cynprubyqre\b/;
+ var re4 = /,/;
+ var re5 = /\bQBZPbageby_cynprubyqre\b/g;
+ var re6 = /^[\s\xa0]+|[\s\xa0]+$/g;
+ var re7 = /(\d*)(\D*)/g;
+ var re8 = /=/;
+ var re9 = /(^|\s)lhv\-h(\s|$)/;
+ var str0 = 'Zbmvyyn/5.0 (Jvaqbjf; H; Jvaqbjf AG 5.1; ra-HF) NccyrJroXvg/528.9 (XUGZY, yvxr Trpxb) Puebzr/2.0.157.0 Fnsnev/528.9';
+ var re10 = /\#/g;
+ var re11 = /\./g;
+ var re12 = /'/g;
+ var re13 = /\?[\w\W]*(sevraqvq|punaaryvq|tebhcvq)=([^\&\?#]*)/i;
+ var str1 = 'Fubpxjnir Synfu 9.0 e115';
+ var re14 = /\s+/g;
+ var re15 = /^\s*(\S*(\s+\S+)*)\s*$/;
+ var re16 = /(-[a-z])/i;
+ function runBlock0() {
+ for (var i = 0; i < 6511; i++) {
+ re0.exec('pyvpx');
+ }
+ for (var i = 0; i < 1844; i++) {
+ re1.exec('uggc://jjj.snprobbx.pbz/ybtva.cuc');
+ }
+ for (var i = 0; i < 739; i++) {
+ 'QBZPbageby_cynprubyqre'.replace(re2, '');
+ }
+ for (var i = 0; i < 598; i++) {
+ re1.exec('uggc://jjj.snprobbx.pbz/');
+ }
+ for (var i = 0; i < 454; i++) {
+ re1.exec('uggc://jjj.snprobbx.pbz/fepu.cuc');
+ }
+ for (var i = 0; i < 352; i++) {
+ /qqqq|qqq|qq|q|ZZZZ|ZZZ|ZZ|Z|llll|ll|l|uu|u|UU|U|zz|z|ff|f|gg|g|sss|ss|s|mmm|mm|m/g.exec('qqqq, ZZZ q, llll');
+ }
+ for (var i = 0; i < 312; i++) {
+ re3.exec('vachggrkg QBZPbageby_cynprubyqre');
+ }
+ for (var i = 0; i < 282; i++) {
+ re4.exec('/ZlFcnprUbzrcntr/Vaqrk-FvgrUbzr,10000000');
+ }
+ for (var i = 0; i < 177; i++) {
+ 'vachggrkg'.replace(re5, '');
+ }
+ for (var i = 0; i < 170; i++) {
+ '528.9'.replace(re6, '');
+ re7.exec('528');
+ }
+ for (var i = 0; i < 156; i++) {
+ re8.exec('VCPhygher=ra-HF');
+ re8.exec('CersreerqPhygher=ra-HF');
+ }
+ for (var i = 0; i < 144; i++) {
+ re0.exec('xrlcerff');
+ }
+ for (var i = 0; i < 139; i++) {
+ '521'.replace(re6, '');
+ re7.exec('521');
+ re9.exec('');
+ /JroXvg\/(\S+)/.exec(str0);
+ }
+ for (var i = 0; i < 137; i++) {
+ 'qvi .so_zrah'.replace(re10, '');
+ 'qvi .so_zrah'.replace(/\[/g, '');
+ 'qvi.so_zrah'.replace(re11, '');
+ }
+ for (var i = 0; i < 117; i++) {
+ 'uvqqra_ryrz'.replace(re2, '');
+ }
+ for (var i = 0; i < 95; i++) {
+ /(?:^|;)\s*sevraqfgre_ynat=([^;]*)/.exec('sevraqfgre_naba=nvq%3Qn6ss9p85n868ro9s059pn854735956o3%26ers%3Q%26df%3Q%26vpgl%3QHF');
+ }
+ for (var i = 0; i < 93; i++) {
+ 'uggc://ubzr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ re13.exec('uggc://ubzr.zlfcnpr.pbz/vaqrk.psz');
+ }
+ for (var i = 0; i < 92; i++) {
+ str1.replace(/([a-zA-Z]|\s)+/, '');
+ }
+ for (var i = 0; i < 85; i++) {
+ 'svefg'.replace(re14, '');
+ 'svefg'.replace(re15, '');
+ 'uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ 'ynfg'.replace(re14, '');
+ 'ynfg'.replace(re15, '');
+ re16.exec('qvfcynl');
+ re13.exec('uggc://cebsvyr.zlfcnpr.pbz/vaqrk.psz');
+ }
+ }
+ var re17 = /(^|[^\\])\"\\\/Qngr\((-?[0-9]+)\)\\\/\"/g;
+ var str2 = '{"anzr":"","ahzoreSbezng":{"PheeraplQrpvznyQvtvgf":2,"PheeraplQrpvznyFrcnengbe":".","VfErnqBayl":gehr,"PheeraplTebhcFvmrf":[3],"AhzoreTebhcFvmrf":[3],"CrepragTebhcFvmrf":[3],"PheeraplTebhcFrcnengbe":",","PheeraplFlzoby":"\xa4","AnAFlzoby":"AnA","PheeraplArtngvirCnggrea":0,"AhzoreArtngvirCnggrea":1,"CrepragCbfvgvirCnggrea":0,"CrepragArtngvirCnggrea":0,"ArtngvirVasvavglFlzoby":"-Vasvavgl","ArtngvirFvta":"-","AhzoreQrpvznyQvtvgf":2,"AhzoreQrpvznyFrcnengbe":".","AhzoreTebhcFrcnengbe":",","PheeraplCbfvgvirCnggrea":0,"CbfvgvirVasvavglFlzoby":"Vasvavgl","CbfvgvirFvta":"+","CrepragQrpvznyQvtvgf":2,"CrepragQrpvznyFrcnengbe":".","CrepragTebhcFrcnengbe":",","CrepragFlzoby":"%","CreZvyyrFlzoby":"\u2030","AngvirQvtvgf":["0","1","2","3","4","5","6","7","8","9"],"QvtvgFhofgvghgvba":1},"qngrGvzrSbezng":{"NZQrfvtangbe":"NZ","Pnyraqne":{"ZvaFhccbegrqQngrGvzr":"@-62135568000000@","ZnkFhccbegrqQngrGvzr":"@253402300799999@","NytbevguzGlcr":1,"PnyraqneGlcr":1,"Renf":[1],"GjbQvtvgLrneZnk":2029,"VfErnqBayl":gehr},"QngrFrcnengbe":"/","SvefgQnlBsJrrx":0,"PnyraqneJrrxEhyr":0,"ShyyQngrGvzrCnggrea":"qqqq, qq ZZZZ llll UU:zz:ff","YbatQngrCnggrea":"qqqq, qq ZZZZ llll","YbatGvzrCnggrea":"UU:zz:ff","ZbaguQnlCnggrea":"ZZZZ qq","CZQrfvtangbe":"CZ","ESP1123Cnggrea":"qqq, qq ZZZ llll UU\':\'zz\':\'ff \'TZG\'","FubegQngrCnggrea":"ZZ/qq/llll","FubegGvzrCnggrea":"UU:zz","FbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq\'G\'UU\':\'zz\':\'ff","GvzrFrcnengbe":":","HavirefnyFbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq UU\':\'zz\':\'ff\'M\'","LrneZbaguCnggrea":"llll ZZZZ","NooerivngrqQnlAnzrf":["Fha","Zba","Ghr","Jrq","Guh","Sev","Fng"],"FubegrfgQnlAnzrf":["Fh","Zb","Gh","Jr","Gu","Se","Fn"],"QnlAnzrf":["Fhaqnl","Zbaqnl","Ghrfqnl","Jrqarfqnl","Guhefqnl","Sevqnl","Fngheqnl"],"NooerivngrqZbaguAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""],"VfErnqBayl":gehr,"AngvirPnyraqneAnzr":"Tertbevna Pnyraqne","NooerivngrqZbaguTravgvirAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguTravgvirAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""]}}';
+ var str3 = '{"anzr":"ra-HF","ahzoreSbezng":{"PheeraplQrpvznyQvtvgf":2,"PheeraplQrpvznyFrcnengbe":".","VfErnqBayl":snyfr,"PheeraplTebhcFvmrf":[3],"AhzoreTebhcFvmrf":[3],"CrepragTebhcFvmrf":[3],"PheeraplTebhcFrcnengbe":",","PheeraplFlzoby":"$","AnAFlzoby":"AnA","PheeraplArtngvirCnggrea":0,"AhzoreArtngvirCnggrea":1,"CrepragCbfvgvirCnggrea":0,"CrepragArtngvirCnggrea":0,"ArtngvirVasvavglFlzoby":"-Vasvavgl","ArtngvirFvta":"-","AhzoreQrpvznyQvtvgf":2,"AhzoreQrpvznyFrcnengbe":".","AhzoreTebhcFrcnengbe":",","PheeraplCbfvgvirCnggrea":0,"CbfvgvirVasvavglFlzoby":"Vasvavgl","CbfvgvirFvta":"+","CrepragQrpvznyQvtvgf":2,"CrepragQrpvznyFrcnengbe":".","CrepragTebhcFrcnengbe":",","CrepragFlzoby":"%","CreZvyyrFlzoby":"\u2030","AngvirQvtvgf":["0","1","2","3","4","5","6","7","8","9"],"QvtvgFhofgvghgvba":1},"qngrGvzrSbezng":{"NZQrfvtangbe":"NZ","Pnyraqne":{"ZvaFhccbegrqQngrGvzr":"@-62135568000000@","ZnkFhccbegrqQngrGvzr":"@253402300799999@","NytbevguzGlcr":1,"PnyraqneGlcr":1,"Renf":[1],"GjbQvtvgLrneZnk":2029,"VfErnqBayl":snyfr},"QngrFrcnengbe":"/","SvefgQnlBsJrrx":0,"PnyraqneJrrxEhyr":0,"ShyyQngrGvzrCnggrea":"qqqq, ZZZZ qq, llll u:zz:ff gg","YbatQngrCnggrea":"qqqq, ZZZZ qq, llll","YbatGvzrCnggrea":"u:zz:ff gg","ZbaguQnlCnggrea":"ZZZZ qq","CZQrfvtangbe":"CZ","ESP1123Cnggrea":"qqq, qq ZZZ llll UU\':\'zz\':\'ff \'TZG\'","FubegQngrCnggrea":"Z/q/llll","FubegGvzrCnggrea":"u:zz gg","FbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq\'G\'UU\':\'zz\':\'ff","GvzrFrcnengbe":":","HavirefnyFbegnoyrQngrGvzrCnggrea":"llll\'-\'ZZ\'-\'qq UU\':\'zz\':\'ff\'M\'","LrneZbaguCnggrea":"ZZZZ, llll","NooerivngrqQnlAnzrf":["Fha","Zba","Ghr","Jrq","Guh","Sev","Fng"],"FubegrfgQnlAnzrf":["Fh","Zb","Gh","Jr","Gu","Se","Fn"],"QnlAnzrf":["Fhaqnl","Zbaqnl","Ghrfqnl","Jrqarfqnl","Guhefqnl","Sevqnl","Fngheqnl"],"NooerivngrqZbaguAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""],"VfErnqBayl":snyfr,"AngvirPnyraqneAnzr":"Tertbevna Pnyraqne","NooerivngrqZbaguTravgvirAnzrf":["Wna","Sro","Zne","Nce","Znl","Wha","Why","Nht","Frc","Bpg","Abi","Qrp",""],"ZbaguTravgvirAnzrf":["Wnahnel","Sroehnel","Znepu","Ncevy","Znl","Whar","Whyl","Nhthfg","Frcgrzore","Bpgbore","Abirzore","Qrprzore",""]}}';
+ var str4 = 'HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str5 = 'HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var re18 = /^\s+|\s+$/g;
+ var str6 = 'uggc://jjj.snprobbx.pbz/vaqrk.cuc';
+ var re19 = /(?:^|\s+)ba(?:\s+|$)/;
+ var re20 = /[+, ]/;
+ var re21 = /ybnqrq|pbzcyrgr/;
+ var str7 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(d1)c=d1.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+d1.Cnaryf[c].Jvqgu,o=g+d1.Cnaryf[c].Urvtug;vs((pheK<y)||(pheK>e)||(pheL<g)||(pheL>o)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(d1&&d1.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(d1)d1.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(d1)d1.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;d1.IjTc=d2(n,c){ine nq=d1;vs(vfAnA(c)){sbe(ine v=0;v<nq.Cnaryf.yratgu;v++)vs(nq.Cnaryf[v].Anzr==c)erghea v;erghea 0;}erghea c;};;d1.IjTpy=d2(n,c,p){ine cn=d1.Cnaryf[IjTc(n,c)];vs(!cn)erghea 0;vs(vfAnA(p)){sbe(ine v=0;v<cn.Pyvpxguehf.yratgu;v++)vs(cn.Pyvpxguehf[v].Anzr==p)erghea v;erghea 0;}erghea p;};;d1.IjGenpr=d2(n,f){gel{vs(jvaqbj["Ij"+"QtQ"])jvaqbj["Ij"+"QtQ"](n,1,f);}pngpu(r){}};;d1.IjYvzvg1=d2(n,f){ine nq=d1,vh=f.fcyvg("/");sbe(ine v=0,p=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;d1.IjYvzvg0=d2(n,f){ine nq=d1,vh=f.fcyvg("/");sbe(ine v=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;d1.IjRVST=d2(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",d1.rvsg);};;d1.IjNavzSHC=d2(n,c){ine nq=d1;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ <nq.NshG)frgGvzrbhg(("IjNavzSHC(NQ_VQ,"+c+")"),nq.NshC);ryfr{k=-1000;l=k;}cna.YrsgBssfrg=k;cna.GbcBssfrg=l;IjNhErcb(n,c);};;d1.IjTrgErnyCbfvgvba=d2(n,b,j){erghea IjBOEC.nccyl(guvf,nethzragf);};;d1.IjPnapryGvzrbhg=d2(n,c){c=IjTc(n,c);ine cay=d1.Cnaryf[c];vs(cay&&cay.UgU!=""){pyrneGvzrbhg(cay.UgU);}};;d1.IjPnapryNyyGvzrbhgf=d2(n){vs(d1.YbpxGvzrbhgPunatrf)erghea;sbe(ine c=0;c<d1.bac;c++)IjPnapryGvzrbhg(n,c);};;d1.IjFgnegGvzrbhg=d2(n,c,bG){c=IjTc(n,c);ine cay=d1.Cnaryf[c];vs(cay&&((cay.UvqrGvzrbhgInyhr>0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;d1.IjErfrgGvzrbhg=d2(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;d1.IjErfrgNyyGvzrbhgf=d2(n){sbe(ine c=0;c<d1.bac;c++)IjErfrgGvzrbhg(n,c);};;d1.IjQrgnpure=d2(n,rig,sap){gel{vs(IjQVR5)riny("jvaqbj.qrgnpuRirag(\'ba"+rig+"\',"+sap+"NQ_VQ)");ryfr vs(!IjQVRZnp)riny("jvaqbj.erzbirRiragYvfgrare(\'"+rig+"\',"+sap+"NQ_VQ,snyfr)");}pngpu(r){}};;d1.IjPyrnaHc=d2(n){IjCvat(n,"G");ine nq=d1;sbe(ine v=0;v<nq.Cnaryf.yratgu;v++){IjUvqrCnary(n,v,gehr);}gel{IjTrgBow(nq.gya).vaareUGZY="";}pngpu(r){}vs(nq.gya!=nq.gya2)gel{IjTrgBow(nq.gya2).vaareUGZY="";}pngpu(r){}gel{d1=ahyy;}pngpu(r){}gel{IjQrgnpure(n,"haybnq","IjHayNQ_VQ");}pngpu(r){}gel{jvaqbj.IjHayNQ_VQ=ahyy;}pngpu(r){}gel{IjQrgnpure(n,"fpebyy","IjFeNQ_VQ");}pngpu(r){}gel{jvaqbj.IjFeNQ_VQ=ahyy;}pngpu(r){}gel{IjQrgnpure(n,"erfvmr","IjEmNQ_VQ");}pngpu(r){}gel{jvaqbj.IjEmNQ_VQ=ahyy;}pngpu(r){}gel{IjQrgnpure(n';
+ var str8 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(jvaqbj.IjNqNQ_VQ)c=jvaqbj.IjNqNQ_VQ.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Jvqgu,o=g+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Urvtug;vs((pheK<y)||(pheK>e)||(pheL<g)||(pheL>o)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(jvaqbj.IjNqNQ_VQ&&jvaqbj.IjNqNQ_VQ.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjTc=shapgvba(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(vfAnA(c)){sbe(ine v=0;v<nq.Cnaryf.yratgu;v++)vs(nq.Cnaryf[v].Anzr==c)erghea v;erghea 0;}erghea c;};;jvaqbj.IjNqNQ_VQ.IjTpy=shapgvba(n,c,p){ine cn=jvaqbj.IjNqNQ_VQ.Cnaryf[IjTc(n,c)];vs(!cn)erghea 0;vs(vfAnA(p)){sbe(ine v=0;v<cn.Pyvpxguehf.yratgu;v++)vs(cn.Pyvpxguehf[v].Anzr==p)erghea v;erghea 0;}erghea p;};;jvaqbj.IjNqNQ_VQ.IjGenpr=shapgvba(n,f){gel{vs(jvaqbj["Ij"+"QtQ"])jvaqbj["Ij"+"QtQ"](n,1,f);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjYvzvg1=shapgvba(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0,p=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;jvaqbj.IjNqNQ_VQ.IjYvzvg0=shapgvba(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;jvaqbj.IjNqNQ_VQ.IjRVST=shapgvba(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",jvaqbj.IjNqNQ_VQ.rvsg);};;jvaqbj.IjNqNQ_VQ.IjNavzSHC=shapgvba(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ <nq.NshG)frgGvzrbhg(("IjNavzSHC(NQ_VQ,"+c+")"),nq.NshC);ryfr{k=-1000;l=k;}cna.YrsgBssfrg=k;cna.GbcBssfrg=l;IjNhErcb(n,c);};;jvaqbj.IjNqNQ_VQ.IjTrgErnyCbfvgvba=shapgvba(n,b,j){erghea IjBOEC.nccyl(guvf,nethzragf);};;jvaqbj.IjNqNQ_VQ.IjPnapryGvzrbhg=shapgvba(n,c){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&cay.UgU!=""){pyrneGvzrbhg(cay.UgU);}};;jvaqbj.IjNqNQ_VQ.IjPnapryNyyGvzrbhgf=shapgvba(n){vs(jvaqbj.IjNqNQ_VQ.YbpxGvzrbhgPunatrf)erghea;sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjPnapryGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjFgnegGvzrbhg=shapgvba(n,c,bG){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&((cay.UvqrGvzrbhgInyhr>0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;jvaqbj.IjNqNQ_VQ.IjErfrgGvzrbhg=shapgvba(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;jvaqbj.IjNqNQ_VQ.IjErfrgNyyGvzrbhgf=shapgvba(n){sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjErfrgGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjQrgnpure=shapgvba(n,rig,sap){gel{vs(IjQVR5)riny("jvaqbj.qrgnpuRirag(\'ba"+rig+"\',"+sap+"NQ_VQ)");ryfr vs(!IjQVRZnp)riny("jvaqbj.erzbir';
+ var str9 = ';;jvaqbj.IjPurpxZbhfrCbfvgvbaNQ_VQ=shapgvba(r){vs(!r)ine r=jvaqbj.rirag;ine c=-1;vs(jvaqbj.IjNqNQ_VQ)c=jvaqbj.IjNqNQ_VQ.EbyybssCnary;ine bo=IjTrgBow("IjCnayNQ_VQ_"+c);vs(bo&&bo.fglyr.ivfvovyvgl=="ivfvoyr"){ine fns=IjFns?8:0;ine pheK=r.pyvragK+IjBOFpe("U")+fns,pheL=r.pyvragL+IjBOFpe("I")+fns;ine y=IjBOEC(NQ_VQ,bo,"Y"),g=IjBOEC(NQ_VQ,bo,"G");ine e=y+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Jvqgu,o=g+jvaqbj.IjNqNQ_VQ.Cnaryf[c].Urvtug;vs((pheK<y)||(pheK>e)||(pheL<g)||(pheL>o)){vs(jvaqbj.IjBaEbyybssNQ_VQ)IjBaEbyybssNQ_VQ(c);ryfr IjPybfrNq(NQ_VQ,c,gehr,"");}ryfr erghea;}IjPnapryZbhfrYvfgrareNQ_VQ();};;jvaqbj.IjFrgEbyybssCnaryNQ_VQ=shapgvba(c){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;c=IjTc(NQ_VQ,c);vs(jvaqbj.IjNqNQ_VQ&&jvaqbj.IjNqNQ_VQ.EbyybssCnary>-1)IjPnapryZbhfrYvfgrareNQ_VQ();vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=c;gel{vs(q.nqqRiragYvfgrare)q.nqqRiragYvfgrare(z,s,snyfr);ryfr vs(q.nggnpuRirag)q.nggnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjPnapryZbhfrYvfgrareNQ_VQ=shapgvba(){ine z="zbhfrzbir",q=qbphzrag,s=IjPurpxZbhfrCbfvgvbaNQ_VQ;vs(jvaqbj.IjNqNQ_VQ)jvaqbj.IjNqNQ_VQ.EbyybssCnary=-1;gel{vs(q.erzbirRiragYvfgrare)q.erzbirRiragYvfgrare(z,s,snyfr);ryfr vs(q.qrgnpuRirag)q.qrgnpuRirag("ba"+z,s);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjTc=d2(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(vfAnA(c)){sbe(ine v=0;v<nq.Cnaryf.yratgu;v++)vs(nq.Cnaryf[v].Anzr==c)erghea v;erghea 0;}erghea c;};;jvaqbj.IjNqNQ_VQ.IjTpy=d2(n,c,p){ine cn=jvaqbj.IjNqNQ_VQ.Cnaryf[IjTc(n,c)];vs(!cn)erghea 0;vs(vfAnA(p)){sbe(ine v=0;v<cn.Pyvpxguehf.yratgu;v++)vs(cn.Pyvpxguehf[v].Anzr==p)erghea v;erghea 0;}erghea p;};;jvaqbj.IjNqNQ_VQ.IjGenpr=d2(n,f){gel{vs(jvaqbj["Ij"+"QtQ"])jvaqbj["Ij"+"QtQ"](n,1,f);}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjYvzvg1=d2(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0,p=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.FzV.yratgu>0)nq.FzV+="/";nq.FzV+=vh[v];nq.FtZ[nq.FtZ.yratgu]=snyfr;}}};;jvaqbj.IjNqNQ_VQ.IjYvzvg0=d2(n,f){ine nq=jvaqbj.IjNqNQ_VQ,vh=f.fcyvg("/");sbe(ine v=0;v<vh.yratgu;v++){vs(vh[v].yratgu>0){vs(nq.OvC.yratgu>0)nq.OvC+="/";nq.OvC+=vh[v];}}};;jvaqbj.IjNqNQ_VQ.IjRVST=d2(n,c){jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]=IjTrgBow("IjCnayNQ_VQ_"+c+"_Bow");vs(jvaqbj["IjCnayNQ_VQ_"+c+"_Bow"]==ahyy)frgGvzrbhg("IjRVST(NQ_VQ,"+c+")",jvaqbj.IjNqNQ_VQ.rvsg);};;jvaqbj.IjNqNQ_VQ.IjNavzSHC=d2(n,c){ine nq=jvaqbj.IjNqNQ_VQ;vs(c>nq.Cnaryf.yratgu)erghea;ine cna=nq.Cnaryf[c],nn=gehr,on=gehr,yn=gehr,en=gehr,cn=nq.Cnaryf[0],sf=nq.ShF,j=cn.Jvqgu,u=cn.Urvtug;vs(j=="100%"){j=sf;en=snyfr;yn=snyfr;}vs(u=="100%"){u=sf;nn=snyfr;on=snyfr;}vs(cn.YnY=="Y")yn=snyfr;vs(cn.YnY=="E")en=snyfr;vs(cn.GnY=="G")nn=snyfr;vs(cn.GnY=="O")on=snyfr;ine k=0,l=0;fjvgpu(nq.NshP%8){pnfr 0:oernx;pnfr 1:vs(nn)l=-sf;oernx;pnfr 2:k=j-sf;oernx;pnfr 3:vs(en)k=j;oernx;pnfr 4:k=j-sf;l=u-sf;oernx;pnfr 5:k=j-sf;vs(on)l=u;oernx;pnfr 6:l=u-sf;oernx;pnfr 7:vs(yn)k=-sf;l=u-sf;oernx;}vs(nq.NshP++ <nq.NshG)frgGvzrbhg(("IjNavzSHC(NQ_VQ,"+c+")"),nq.NshC);ryfr{k=-1000;l=k;}cna.YrsgBssfrg=k;cna.GbcBssfrg=l;IjNhErcb(n,c);};;jvaqbj.IjNqNQ_VQ.IjTrgErnyCbfvgvba=d2(n,b,j){erghea IjBOEC.nccyl(guvf,nethzragf);};;jvaqbj.IjNqNQ_VQ.IjPnapryGvzrbhg=d2(n,c){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&cay.UgU!=""){pyrneGvzrbhg(cay.UgU);}};;jvaqbj.IjNqNQ_VQ.IjPnapryNyyGvzrbhgf=d2(n){vs(jvaqbj.IjNqNQ_VQ.YbpxGvzrbhgPunatrf)erghea;sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjPnapryGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjFgnegGvzrbhg=d2(n,c,bG){c=IjTc(n,c);ine cay=jvaqbj.IjNqNQ_VQ.Cnaryf[c];vs(cay&&((cay.UvqrGvzrbhgInyhr>0)||(nethzragf.yratgu==3&&bG>0))){pyrneGvzrbhg(cay.UgU);cay.UgU=frgGvzrbhg(cay.UvqrNpgvba,(nethzragf.yratgu==3?bG:cay.UvqrGvzrbhgInyhr));}};;jvaqbj.IjNqNQ_VQ.IjErfrgGvzrbhg=d2(n,c,bG){c=IjTc(n,c);IjPnapryGvzrbhg(n,c);riny("IjFgnegGvzrbhg(NQ_VQ,c"+(nethzragf.yratgu==3?",bG":"")+")");};;jvaqbj.IjNqNQ_VQ.IjErfrgNyyGvzrbhgf=d2(n){sbe(ine c=0;c<jvaqbj.IjNqNQ_VQ.bac;c++)IjErfrgGvzrbhg(n,c);};;jvaqbj.IjNqNQ_VQ.IjQrgnpure=d2(n,rig,sap){gel{vs(IjQVR5)riny("jvaqbj.qrgnpuRirag(\'ba"+rig+"\',"+sap+"NQ_VQ)");ryfr vs(!IjQVRZnp)riny("jvaqbj.erzbirRiragYvfgrare(\'"+rig+"\',"+sap+"NQ_VQ,snyfr)");}pngpu(r){}};;jvaqbj.IjNqNQ_VQ.IjPyrna';
+ function runBlock1() {
+ for (var i = 0; i < 81; i++) {
+ re8.exec('VC=74.125.75.1');
+ }
+ for (var i = 0; i < 78; i++) {
+ '9.0 e115'.replace(/(\s)+e/, '');
+ 'k'.replace(/./, '');
+ str2.replace(re17, '');
+ str3.replace(re17, '');
+ re8.exec('144631658');
+ re8.exec('Pbhagel=IIZ%3Q');
+ re8.exec('Pbhagel=IIZ=');
+ re8.exec('CersreerqPhygherCraqvat=');
+ re8.exec(str4);
+ re8.exec(str5);
+ re8.exec('__hgzp=144631658');
+ re8.exec('gvzrMbar=-8');
+ re8.exec('gvzrMbar=0');
+ /Fnsnev\/(\d+\.\d+)/.exec(str0);
+ re3.exec('vachggrkg QBZPbageby_cynprubyqre');
+ re0.exec('xrlqbja');
+ re0.exec('xrlhc');
+ }
+ for (var i = 0; i < 77; i++) {
+ 'uggc://zrffntvat.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ re13.exec('uggc://zrffntvat.zlfcnpr.pbz/vaqrk.psz');
+ }
+ for (var i = 0; i < 73; i++) {
+ 'FrffvbaFgbentr=%7O%22GnoThvq%22%3N%7O%22thvq%22%3N1231367125017%7Q%7Q'.replace(re18, '');
+ }
+ for (var i = 0; i < 72; i++) {
+ re1.exec(str6);
+ }
+ for (var i = 0; i < 71; i++) {
+ re19.exec('');
+ }
+ for (var i = 0; i < 70; i++) {
+ '3.5.0.0'.replace(re11, '');
+ str7.replace(/d1/g, '');
+ str8.replace(/NQ_VQ/g, '');
+ str9.replace(/d2/g, '');
+ 'NI%3Q1_CI%3Q1_PI%3Q1_EI%3Q1_HI%3Q1_HP%3Q1_IC%3Q0.0.0.0_IH%3Q0'.replace(/_/g, '');
+ 'svz_zlfcnpr_ubzrcntr_abgybttrqva,svz_zlfcnpr_aba_HTP,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
+ re21.exec('ybnqvat');
+ }
+ for (var i = 0; i < 68; i++) {
+ re1.exec('#');
+ /(?:ZFVR.(\d+\.\d+))|(?:(?:Sversbk|TenaCnenqvfb|Vprjrnfry).(\d+\.\d+))|(?:Bcren.(\d+\.\d+))|(?:NccyrJroXvg.(\d+(?:\.\d+)?))/.exec(str0);
+ /(Znp BF K)|(Jvaqbjf;)/.exec(str0);
+ /Trpxb\/([0-9]+)/.exec(str0);
+ re21.exec('ybnqrq');
+ }
+ for (var i = 0; i < 49; i++) {
+ re16.exec('pbybe');
+ }
+ for (var i = 0; i < 44; i++) {
+ 'uggc://sevraqf.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ re13.exec('uggc://sevraqf.zlfcnpr.pbz/vaqrk.psz');
+ }
+ }
+ var re22 = /\bso_zrah\b/;
+ var re23 = /^(?:(?:[^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/;
+ var re24 = /uggcf?:\/\/([^\/]+\.)?snprobbx\.pbz\//;
+ var re25 = /"/g;
+ var re26 = /^([^?#]+)(?:\?([^#]*))?(#.*)?/;
+ function runBlock2() {
+ for (var i = 0; i < 40; i++) {
+ 'fryrpgrq'.replace(re14, '');
+ 'fryrpgrq'.replace(re15, '');
+ }
+ for (var i = 0; i < 39; i++) {
+ 'vachggrkg uvqqra_ryrz'.replace(/\buvqqra_ryrz\b/g, '');
+ re3.exec('vachggrkg ');
+ re3.exec('vachggrkg');
+ re22.exec('HVYvaxOhggba');
+ re22.exec('HVYvaxOhggba_E');
+ re22.exec('HVYvaxOhggba_EJ');
+ re22.exec('zrah_ybtva_pbagnvare');
+ /\buvqqra_ryrz\b/.exec('vachgcnffjbeq');
+ }
+ for (var i = 0; i < 37; i++) {
+ re8.exec('111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904');
+ re8.exec('SbeprqRkcvengvba=633669315660164980');
+ re8.exec('FrffvbaQQS2=111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904');
+ }
+ for (var i = 0; i < 35; i++) {
+ 'puvyq p1 svefg'.replace(re14, '');
+ 'puvyq p1 svefg'.replace(re15, '');
+ 'sylbhg pybfrq'.replace(re14, '');
+ 'sylbhg pybfrq'.replace(re15, '');
+ }
+ for (var i = 0; i < 34; i++) {
+ re19.exec('gno2');
+ re19.exec('gno3');
+ re8.exec('44132r503660');
+ re8.exec('SbeprqRkcvengvba=633669316860113296');
+ re8.exec('AFP_zp_dfctwzs-aowb_80=44132r503660');
+ re8.exec('FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696');
+ re8.exec('s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696');
+ }
+ for (var i = 0; i < 32; i++) {
+ /puebzr/i.exec(str0);
+ }
+ for (var i = 0; i < 31; i++) {
+ 'uggc://jjj.snprobbx.pbz/'.replace(re23, '');
+ re8.exec('SbeprqRkcvengvba=633669358527244818');
+ re8.exec('VC=66.249.85.130');
+ re8.exec('FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58');
+ re8.exec('s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58');
+ re24.exec('uggc://jjj.snprobbx.pbz/');
+ }
+ for (var i = 0; i < 30; i++) {
+ '419'.replace(re6, '');
+ /(?:^|\s+)gvzrfgnzc(?:\s+|$)/.exec('gvzrfgnzc');
+ re7.exec('419');
+ }
+ for (var i = 0; i < 29; i++) {
+ 'uggc://jjj.snprobbx.pbz/ybtva.cuc'.replace(re23, '');
+ }
+ for (var i = 0; i < 28; i++) {
+ 'Funer guvf tnqtrg'.replace(re25, '');
+ 'Funer guvf tnqtrg'.replace(re12, '');
+ re26.exec('uggc://jjj.tbbtyr.pbz/vt/qverpgbel');
+ }
+ }
+ var re27 = /-\D/g;
+ var re28 = /\bnpgvingr\b/;
+ var re29 = /%2R/gi;
+ var re30 = /%2S/gi;
+ var re31 = /^(mu-(PA|GJ)|wn|xb)$/;
+ var re32 = /\s?;\s?/;
+ var re33 = /%\w?$/;
+ var re34 = /TNQP=([^;]*)/i;
+ var str10 = 'FrffvbaQQS2=111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669315660164980&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str11 = 'FrffvbaQQS2=111soqs57qo8o8480qo18sor2011r3n591q7s6s37r120904; __hgzm=144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.3426875219718084000.1231363570.1231363570.1231363570.1; __hgzo=144631658.0.10.1231363570; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669315660164980&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str12 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231363514065&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231363514065&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Subzr.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1326469221.1231363557&tn_fvq=1231363557&tn_uvq=1114636509&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str13 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669315660164980&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str14 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669315660164980&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var re35 = /[<>]/g;
+ var str15 = 'FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669316860113296&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzs-aowb_80=44132r503660';
+ var str16 = 'FrffvbaQQS2=s6r4579npn4rn2135s904r0s75pp1o5334p6s6pospo12696; AFP_zp_dfctwzs-aowb_80=44132r503660; __hgzm=144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.965867047679498800.1231363638.1231363638.1231363638.1; __hgzo=144631658.0.10.1231363638; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669316860113296&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str17 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231363621014&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231363621014&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyr.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=348699119.1231363624&tn_fvq=1231363624&tn_uvq=895511034&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str18 = 'uggc://jjj.yrobapbva.se/yv';
+ var str19 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669316860113296&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str20 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669316860113296&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ function runBlock3() {
+ for (var i = 0; i < 27; i++) {
+ 'e115'.replace(/[A-Za-z]/g, '');
+ }
+ for (var i = 0; i < 23; i++) {
+ 'qvfcynl'.replace(re27, '');
+ 'cbfvgvba'.replace(re27, '');
+ }
+ for (var i = 0; i < 22; i++) {
+ 'unaqyr'.replace(re14, '');
+ 'unaqyr'.replace(re15, '');
+ 'yvar'.replace(re14, '');
+ 'yvar'.replace(re15, '');
+ 'cnerag puebzr6 fvatyr1 gno'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1 gno'.replace(re15, '');
+ 'fyvqre'.replace(re14, '');
+ 'fyvqre'.replace(re15, '');
+ re28.exec('');
+ }
+ for (var i = 0; i < 21; i++) {
+ 'uggc://jjj.zlfcnpr.pbz/'.replace(re12, '');
+ re13.exec('uggc://jjj.zlfcnpr.pbz/');
+ }
+ for (var i = 0; i < 20; i++) {
+ 'cntrivrj'.replace(re29, '');
+ 'cntrivrj'.replace(re30, '');
+ re19.exec('ynfg');
+ re19.exec('ba svefg');
+ re8.exec('VC=74.125.75.3');
+ }
+ for (var i = 0; i < 19; i++) {
+ re31.exec('ra');
+ }
+ for (var i = 0; i < 18; i++) {
+ str10.split(re32);
+ str11.split(re32);
+ str12.replace(re33, '');
+ re8.exec('144631658.0.10.1231363570');
+ re8.exec('144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.3426875219718084000.1231363570.1231363570.1231363570.1');
+ re8.exec(str13);
+ re8.exec(str14);
+ re8.exec('__hgzn=144631658.3426875219718084000.1231363570.1231363570.1231363570.1');
+ re8.exec('__hgzo=144631658.0.10.1231363570');
+ re8.exec('__hgzm=144631658.1231363570.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str10);
+ re34.exec(str11);
+ }
+ for (var i = 0; i < 17; i++) {
+ str0.match(/zfvr/gi);
+ str0.match(/bcren/gi);
+ str15.split(re32);
+ str16.split(re32);
+ 'ohggba'.replace(re14, '');
+ 'ohggba'.replace(re15, '');
+ 'puvyq p1 svefg sylbhg pybfrq'.replace(re14, '');
+ 'puvyq p1 svefg sylbhg pybfrq'.replace(re15, '');
+ 'pvgvrf'.replace(re14, '');
+ 'pvgvrf'.replace(re15, '');
+ 'pybfrq'.replace(re14, '');
+ 'pybfrq'.replace(re15, '');
+ 'qry'.replace(re14, '');
+ 'qry'.replace(re15, '');
+ 'uqy_zba'.replace(re14, '');
+ 'uqy_zba'.replace(re15, '');
+ str17.replace(re33, '');
+ str18.replace(/%3P/g, '');
+ str18.replace(/%3R/g, '');
+ str18.replace(/%3q/g, '');
+ str18.replace(re35, '');
+ 'yvaxyvfg16'.replace(re14, '');
+ 'yvaxyvfg16'.replace(re15, '');
+ 'zvahf'.replace(re14, '');
+ 'zvahf'.replace(re15, '');
+ 'bcra'.replace(re14, '');
+ 'bcra'.replace(re15, '');
+ 'cnerag puebzr5 fvatyr1 ps NU'.replace(re14, '');
+ 'cnerag puebzr5 fvatyr1 ps NU'.replace(re15, '');
+ 'cynlre'.replace(re14, '');
+ 'cynlre'.replace(re15, '');
+ 'cyhf'.replace(re14, '');
+ 'cyhf'.replace(re15, '');
+ 'cb_uqy'.replace(re14, '');
+ 'cb_uqy'.replace(re15, '');
+ 'hyJVzt'.replace(re14, '');
+ 'hyJVzt'.replace(re15, '');
+ re8.exec('144631658.0.10.1231363638');
+ re8.exec('144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.965867047679498800.1231363638.1231363638.1231363638.1');
+ re8.exec('4413268q3660');
+ re8.exec('4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n');
+ re8.exec('SbeprqRkcvengvba=633669321699093060');
+ re8.exec('VC=74.125.75.20');
+ re8.exec(str19);
+ re8.exec(str20);
+ re8.exec('AFP_zp_tfwsbrg-aowb_80=4413268q3660');
+ re8.exec('FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n');
+ re8.exec('__hgzn=144631658.965867047679498800.1231363638.1231363638.1231363638.1');
+ re8.exec('__hgzo=144631658.0.10.1231363638');
+ re8.exec('__hgzm=144631658.1231363638.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str15);
+ re34.exec(str16);
+ }
+ }
+ var re36 = /uers|fep|fryrpgrq/;
+ var re37 = /\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g;
+ var re38 = /^(\w+|\*)$/;
+ var str21 = 'FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58; ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669358527244818&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str22 = 'FrffvbaQQS2=s15q53p9n372sn76npr13o271n4s3p5r29p235746p908p58; __hgzm=144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.4127520630321984500.1231367822.1231367822.1231367822.1; __hgzo=144631658.0.10.1231367822; __hgzp=144631658; ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669358527244818&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str23 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231367803797&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367803797&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Szrffntvat.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1192552091.1231367807&tn_fvq=1231367807&tn_uvq=1155446857&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str24 = 'ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669358527244818&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str25 = 'ZFPhygher=VC=66.249.85.130&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669358527244818&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str26 = 'hy.ynat-fryrpgbe';
+ var re39 = /\\/g;
+ var re40 = / /g;
+ var re41 = /\/\xc4\/t/;
+ var re42 = /\/\xd6\/t/;
+ var re43 = /\/\xdc\/t/;
+ var re44 = /\/\xdf\/t/;
+ var re45 = /\/\xe4\/t/;
+ var re46 = /\/\xf6\/t/;
+ var re47 = /\/\xfc\/t/;
+ var re48 = /\W/g;
+ var re49 = /uers|fep|fglyr/;
+ function runBlock4() {
+ for (var i = 0; i < 16; i++) {
+ ''.replace(/\*/g, '');
+ /\bnpgvir\b/.exec('npgvir');
+ /sversbk/i.exec(str0);
+ re36.exec('glcr');
+ /zfvr/i.exec(str0);
+ /bcren/i.exec(str0);
+ }
+ for (var i = 0; i < 15; i++) {
+ str21.split(re32);
+ str22.split(re32);
+ 'uggc://ohyyrgvaf.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ str23.replace(re33, '');
+ 'yv'.replace(re37, '');
+ 'yv'.replace(re18, '');
+ re8.exec('144631658.0.10.1231367822');
+ re8.exec('144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.4127520630321984500.1231367822.1231367822.1231367822.1');
+ re8.exec(str24);
+ re8.exec(str25);
+ re8.exec('__hgzn=144631658.4127520630321984500.1231367822.1231367822.1231367822.1');
+ re8.exec('__hgzo=144631658.0.10.1231367822');
+ re8.exec('__hgzm=144631658.1231367822.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str21);
+ re34.exec(str22);
+ /\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)["']?(.*?)["']?)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g.exec(str26);
+ re13.exec('uggc://ohyyrgvaf.zlfcnpr.pbz/vaqrk.psz');
+ re38.exec('yv');
+ }
+ for (var i = 0; i < 14; i++) {
+ ''.replace(re18, '');
+ '9.0 e115'.replace(/(\s+e|\s+o[0-9]+)/, '');
+ 'Funer guvf tnqtrg'.replace(/</g, '');
+ 'Funer guvf tnqtrg'.replace(/>/g, '');
+ 'Funer guvf tnqtrg'.replace(re39, '');
+ 'uggc://cebsvyrrqvg.zlfcnpr.pbz/vaqrk.psz'.replace(re12, '');
+ 'grnfre'.replace(re40, '');
+ 'grnfre'.replace(re41, '');
+ 'grnfre'.replace(re42, '');
+ 'grnfre'.replace(re43, '');
+ 'grnfre'.replace(re44, '');
+ 'grnfre'.replace(re45, '');
+ 'grnfre'.replace(re46, '');
+ 'grnfre'.replace(re47, '');
+ 'grnfre'.replace(re48, '');
+ re16.exec('znetva-gbc');
+ re16.exec('cbfvgvba');
+ re19.exec('gno1');
+ re9.exec('qz');
+ re9.exec('qg');
+ re9.exec('zbqobk');
+ re9.exec('zbqobkva');
+ re9.exec('zbqgvgyr');
+ re13.exec('uggc://cebsvyrrqvg.zlfcnpr.pbz/vaqrk.psz');
+ re26.exec('/vt/znvytnqtrg');
+ re49.exec('glcr');
+ }
+ }
+ var re50 = /(?:^|\s+)fryrpgrq(?:\s+|$)/;
+ var re51 = /\&/g;
+ var re52 = /\+/g;
+ var re53 = /\?/g;
+ var re54 = /\t/g;
+ var re55 = /(\$\{nqiHey\})|(\$nqiHey\b)/g;
+ var re56 = /(\$\{cngu\})|(\$cngu\b)/g;
+ function runBlock5() {
+ for (var i = 0; i < 13; i++) {
+ 'purpx'.replace(re14, '');
+ 'purpx'.replace(re15, '');
+ 'pvgl'.replace(re14, '');
+ 'pvgl'.replace(re15, '');
+ 'qrpe fyvqrgrkg'.replace(re14, '');
+ 'qrpe fyvqrgrkg'.replace(re15, '');
+ 'svefg fryrpgrq'.replace(re14, '');
+ 'svefg fryrpgrq'.replace(re15, '');
+ 'uqy_rag'.replace(re14, '');
+ 'uqy_rag'.replace(re15, '');
+ 'vape fyvqrgrkg'.replace(re14, '');
+ 'vape fyvqrgrkg'.replace(re15, '');
+ 'vachggrkg QBZPbageby_cynprubyqre'.replace(re5, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq'.replace(re15, '');
+ 'cb_guz'.replace(re14, '');
+ 'cb_guz'.replace(re15, '');
+ 'fhozvg'.replace(re14, '');
+ 'fhozvg'.replace(re15, '');
+ re50.exec('');
+ /NccyrJroXvg\/([^\s]*)/.exec(str0);
+ /XUGZY/.exec(str0);
+ }
+ for (var i = 0; i < 12; i++) {
+ '${cebg}://${ubfg}${cngu}/${dz}'.replace(/(\$\{cebg\})|(\$cebg\b)/g, '');
+ '1'.replace(re40, '');
+ '1'.replace(re10, '');
+ '1'.replace(re51, '');
+ '1'.replace(re52, '');
+ '1'.replace(re53, '');
+ '1'.replace(re39, '');
+ '1'.replace(re54, '');
+ '9.0 e115'.replace(/^(.*)\..*$/, '');
+ '9.0 e115'.replace(/^.*e(.*)$/, '');
+ '<!-- ${nqiHey} -->'.replace(re55, '');
+ '<fpevcg glcr="grkg/wninfpevcg" fep="${nqiHey}"></fpevcg>'.replace(re55, '');
+ str1.replace(/^.*\s+(\S+\s+\S+$)/, '');
+ 'tzk%2Subzrcntr%2Sfgneg%2Sqr%2S'.replace(re30, '');
+ 'tzk'.replace(re30, '');
+ 'uggc://${ubfg}${cngu}/${dz}'.replace(/(\$\{ubfg\})|(\$ubfg\b)/g, '');
+ 'uggc://nqpyvrag.hvzfrei.arg${cngu}/${dz}'.replace(re56, '');
+ 'uggc://nqpyvrag.hvzfrei.arg/wf.at/${dz}'.replace(/(\$\{dz\})|(\$dz\b)/g, '');
+ 'frpgvba'.replace(re29, '');
+ 'frpgvba'.replace(re30, '');
+ 'fvgr'.replace(re29, '');
+ 'fvgr'.replace(re30, '');
+ 'fcrpvny'.replace(re29, '');
+ 'fcrpvny'.replace(re30, '');
+ re36.exec('anzr');
+ /e/.exec('9.0 e115');
+ }
+ }
+ var re57 = /##yv4##/gi;
+ var re58 = /##yv16##/gi;
+ var re59 = /##yv19##/gi;
+ var str27 = '<hy pynff="nqi">##yv4##Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.##yv16##Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str28 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.##yv16##Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str29 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.##yv19##Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str30 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.<yv vq="YvOYG19" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg19.cat)">Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.##OE## ##OE## ##N##Yrnea zber##/N##</hy>';
+ var str31 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.<yv vq="YvOYG19" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg19.cat)">Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.<oe> <oe> ##N##Yrnea zber##/N##</hy>';
+ var str32 = '<hy pynff="nqi"><yv vq="YvOYG4" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg4.cat)">Cbjreshy Zvpebfbsg grpuabybtl urycf svtug fcnz naq vzcebir frphevgl.<yv vq="YvOYG19" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg19.cat)">Trg zber qbar gunaxf gb terngre rnfr naq fcrrq.<yv vq="YvOYG16" fglyr="onpxtebhaq-vzntr:hey(uggc://vzt.jykef.pbz/~Yvir.FvgrPbagrag.VQ/~14.2.1230/~/~/~/oyg16.cat)">Ybgf bs fgbentr &#40;5 TO&#41; - zber pbby fghss ba gur jnl.<oe> <oe> <n uers="uggc://znvy.yvir.pbz/znvy/nobhg.nfck" gnetrg="_oynax">Yrnea zber##/N##</hy>';
+ var str33 = 'Bar Jvaqbjf Yvir VQ trgf lbh vagb <o>Ubgznvy</o>, <o>Zrffratre</o>, <o>Kobk YVIR</o> \u2014 naq bgure cynprf lbh frr #~#argjbexybtb#~#';
+ var re60 = /(?:^|\s+)bss(?:\s+|$)/;
+ var re61 = /^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/;
+ var re62 = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
+ var str34 = '${1}://${2}${3}${4}${5}';
+ var str35 = ' O=6gnyg0g4znrrn&o=3&f=gc; Q=_lyu=K3bQZGSxnT4lZzD3OS9GNmV3ZGLkAQxRpTyxNmRlZmRmAmNkAQLRqTImqNZjOUEgpTjQnJ5xMKtgoN--; SCF=qy';
+ function runBlock6() {
+ for (var i = 0; i < 11; i++) {
+ str27.replace(/##yv0##/gi, '');
+ str27.replace(re57, '');
+ str28.replace(re58, '');
+ str29.replace(re59, '');
+ str30.replace(/##\/o##/gi, '');
+ str30.replace(/##\/v##/gi, '');
+ str30.replace(/##\/h##/gi, '');
+ str30.replace(/##o##/gi, '');
+ str30.replace(/##oe##/gi, '');
+ str30.replace(/##v##/gi, '');
+ str30.replace(/##h##/gi, '');
+ str31.replace(/##n##/gi, '');
+ str32.replace(/##\/n##/gi, '');
+ str33.replace(/#~#argjbexybtb#~#/g, '');
+ / Zbovyr\//.exec(str0);
+ /##yv1##/gi.exec(str27);
+ /##yv10##/gi.exec(str28);
+ /##yv11##/gi.exec(str28);
+ /##yv12##/gi.exec(str28);
+ /##yv13##/gi.exec(str28);
+ /##yv14##/gi.exec(str28);
+ /##yv15##/gi.exec(str28);
+ re58.exec(str28);
+ /##yv17##/gi.exec(str29);
+ /##yv18##/gi.exec(str29);
+ re59.exec(str29);
+ /##yv2##/gi.exec(str27);
+ /##yv20##/gi.exec(str30);
+ /##yv21##/gi.exec(str30);
+ /##yv22##/gi.exec(str30);
+ /##yv23##/gi.exec(str30);
+ /##yv3##/gi.exec(str27);
+ re57.exec(str27);
+ /##yv5##/gi.exec(str28);
+ /##yv6##/gi.exec(str28);
+ /##yv7##/gi.exec(str28);
+ /##yv8##/gi.exec(str28);
+ /##yv9##/gi.exec(str28);
+ re8.exec('473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29');
+ re8.exec('SbeprqRkcvengvba=633669325184628362');
+ re8.exec('FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29');
+ /AbxvnA[^\/]*/.exec(str0);
+ }
+ for (var i = 0; i < 10; i++) {
+ ' bss'.replace(/(?:^|\s+)bss(?:\s+|$)/g, '');
+ str34.replace(/(\$\{0\})|(\$0\b)/g, '');
+ str34.replace(/(\$\{1\})|(\$1\b)/g, '');
+ str34.replace(/(\$\{pbzcyrgr\})|(\$pbzcyrgr\b)/g, '');
+ str34.replace(/(\$\{sentzrag\})|(\$sentzrag\b)/g, '');
+ str34.replace(/(\$\{ubfgcbeg\})|(\$ubfgcbeg\b)/g, '');
+ str34.replace(re56, '');
+ str34.replace(/(\$\{cebgbpby\})|(\$cebgbpby\b)/g, '');
+ str34.replace(/(\$\{dhrel\})|(\$dhrel\b)/g, '');
+ 'nqfvmr'.replace(re29, '');
+ 'nqfvmr'.replace(re30, '');
+ 'uggc://${2}${3}${4}${5}'.replace(/(\$\{2\})|(\$2\b)/g, '');
+ 'uggc://wf.hv-cbegny.qr${3}${4}${5}'.replace(/(\$\{3\})|(\$3\b)/g, '');
+ 'arjf'.replace(re40, '');
+ 'arjf'.replace(re41, '');
+ 'arjf'.replace(re42, '');
+ 'arjf'.replace(re43, '');
+ 'arjf'.replace(re44, '');
+ 'arjf'.replace(re45, '');
+ 'arjf'.replace(re46, '');
+ 'arjf'.replace(re47, '');
+ 'arjf'.replace(re48, '');
+ / PC=i=(\d+)&oe=(.)/.exec(str35);
+ re60.exec(' ');
+ re60.exec(' bss');
+ re60.exec('');
+ re19.exec(' ');
+ re19.exec('svefg ba');
+ re19.exec('ynfg vtaber');
+ re19.exec('ba');
+ re9.exec('scnq so ');
+ re9.exec('zrqvgobk');
+ re9.exec('hsgy');
+ re9.exec('lhv-h');
+ /Fnsnev|Xbadhrebe|XUGZY/gi.exec(str0);
+ re61.exec('uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf');
+ re62.exec('#Ybtva_rznvy');
+ }
+ }
+ var re63 = /\{0\}/g;
+ var str36 = 'FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n; ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_tfwsbrg-aowb_80=4413268q3660';
+ var str37 = 'FrffvbaQQS2=4ss747o77904333q374or84qrr1s9r0nprp8r5q81534o94n; AFP_zp_tfwsbrg-aowb_80=4413268q3660; __hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.2294274870215848400.1231364074.1231364074.1231364074.1; __hgzo=144631658.0.10.1231364074; __hgzp=144631658; ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str38 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231364057761&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364057761&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Ssevraqf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1667363813.1231364061&tn_fvq=1231364061&tn_uvq=1917563877&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str39 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669321699093060&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str40 = 'ZFPhygher=VC=74.125.75.20&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669321699093060&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ function runBlock7() {
+ for (var i = 0; i < 9; i++) {
+ '0'.replace(re40, '');
+ '0'.replace(re10, '');
+ '0'.replace(re51, '');
+ '0'.replace(re52, '');
+ '0'.replace(re53, '');
+ '0'.replace(re39, '');
+ '0'.replace(re54, '');
+ 'Lrf'.replace(re40, '');
+ 'Lrf'.replace(re10, '');
+ 'Lrf'.replace(re51, '');
+ 'Lrf'.replace(re52, '');
+ 'Lrf'.replace(re53, '');
+ 'Lrf'.replace(re39, '');
+ 'Lrf'.replace(re54, '');
+ }
+ for (var i = 0; i < 8; i++) {
+ 'Pybfr {0}'.replace(re63, '');
+ 'Bcra {0}'.replace(re63, '');
+ str36.split(re32);
+ str37.split(re32);
+ 'puvyq p1 svefg gnournqref'.replace(re14, '');
+ 'puvyq p1 svefg gnournqref'.replace(re15, '');
+ 'uqy_fcb'.replace(re14, '');
+ 'uqy_fcb'.replace(re15, '');
+ 'uvag'.replace(re14, '');
+ 'uvag'.replace(re15, '');
+ str38.replace(re33, '');
+ 'yvfg'.replace(re14, '');
+ 'yvfg'.replace(re15, '');
+ 'at_bhgre'.replace(re30, '');
+ 'cnerag puebzr5 qbhoyr2 NU'.replace(re14, '');
+ 'cnerag puebzr5 qbhoyr2 NU'.replace(re15, '');
+ 'cnerag puebzr5 dhnq5 ps NU osyvax zbarl'.replace(re14, '');
+ 'cnerag puebzr5 dhnq5 ps NU osyvax zbarl'.replace(re15, '');
+ 'cnerag puebzr6 fvatyr1'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1'.replace(re15, '');
+ 'cb_qrs'.replace(re14, '');
+ 'cb_qrs'.replace(re15, '');
+ 'gnopbagrag'.replace(re14, '');
+ 'gnopbagrag'.replace(re15, '');
+ 'iv_svefg_gvzr'.replace(re30, '');
+ /(^|.)(ronl|qri-ehf3.wbg)(|fgberf|zbgbef|yvirnhpgvbaf|jvxv|rkcerff|punggre).(pbz(|.nh|.pa|.ux|.zl|.ft|.oe|.zk)|pb(.hx|.xe|.am)|pn|qr|se|vg|ay|or|ng|pu|vr|va|rf|cy|cu|fr)$/i.exec('cntrf.ronl.pbz');
+ re8.exec('144631658.0.10.1231364074');
+ re8.exec('144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.2294274870215848400.1231364074.1231364074.1231364074.1');
+ re8.exec('4413241q3660');
+ re8.exec('SbeprqRkcvengvba=633669357391353591');
+ re8.exec(str39);
+ re8.exec(str40);
+ re8.exec('AFP_zp_kkk-gdzogv_80=4413241q3660');
+ re8.exec('FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7');
+ re8.exec('__hgzn=144631658.2294274870215848400.1231364074.1231364074.1231364074.1');
+ re8.exec('__hgzo=144631658.0.10.1231364074');
+ re8.exec('__hgzm=144631658.1231364074.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7');
+ re34.exec(str36);
+ re34.exec(str37);
+ }
+ }
+ var re64 = /\b[a-z]/g;
+ var re65 = /^uggc:\/\//;
+ var re66 = /(?:^|\s+)qvfnoyrq(?:\s+|$)/;
+ var str41 = 'uggc://cebsvyr.zlfcnpr.pbz/Zbqhyrf/Nccyvpngvbaf/Cntrf/Pnainf.nfck';
+ function runBlock8() {
+ for (var i = 0; i < 7; i++) {
+ str1.match(/\d+/g);
+ 'nsgre'.replace(re64, '');
+ 'orsber'.replace(re64, '');
+ 'obggbz'.replace(re64, '');
+ 'ohvygva_jrngure.kzy'.replace(re65, '');
+ 'ohggba'.replace(re37, '');
+ 'ohggba'.replace(re18, '');
+ 'qngrgvzr.kzy'.replace(re65, '');
+ 'uggc://eff.paa.pbz/eff/paa_gbcfgbevrf.eff'.replace(re65, '');
+ 'vachg'.replace(re37, '');
+ 'vachg'.replace(re18, '');
+ 'vafvqr'.replace(re64, '');
+ 'cbvagre'.replace(re27, '');
+ 'cbfvgvba'.replace(/[A-Z]/g, '');
+ 'gbc'.replace(re27, '');
+ 'gbc'.replace(re64, '');
+ 'hy'.replace(re37, '');
+ 'hy'.replace(re18, '');
+ str26.replace(re37, '');
+ str26.replace(re18, '');
+ 'lbhghor_vtbbtyr/i2/lbhghor.kzy'.replace(re65, '');
+ 'm-vaqrk'.replace(re27, '');
+ /#([\w-]+)/.exec(str26);
+ re16.exec('urvtug');
+ re16.exec('znetvaGbc');
+ re16.exec('jvqgu');
+ re19.exec('gno0 svefg ba');
+ re19.exec('gno0 ba');
+ re19.exec('gno4 ynfg');
+ re19.exec('gno4');
+ re19.exec('gno5');
+ re19.exec('gno6');
+ re19.exec('gno7');
+ re19.exec('gno8');
+ /NqborNVE\/([^\s]*)/.exec(str0);
+ /NccyrJroXvg\/([^ ]*)/.exec(str0);
+ /XUGZY/gi.exec(str0);
+ /^(?:obql|ugzy)$/i.exec('YV');
+ re38.exec('ohggba');
+ re38.exec('vachg');
+ re38.exec('hy');
+ re38.exec(str26);
+ /^(\w+|\*)/.exec(str26);
+ /znp|jva|yvahk/i.exec('Jva32');
+ /eton?\([\d\s,]+\)/.exec('fgngvp');
+ }
+ for (var i = 0; i < 6; i++) {
+ ''.replace(/\r/g, '');
+ '/'.replace(re40, '');
+ '/'.replace(re10, '');
+ '/'.replace(re51, '');
+ '/'.replace(re52, '');
+ '/'.replace(re53, '');
+ '/'.replace(re39, '');
+ '/'.replace(re54, '');
+ 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/{0}?[NDO]&{1}&{2}&[NDR]'.replace(re63, '');
+ str41.replace(re12, '');
+ 'uggc://jjj.snprobbx.pbz/fepu.cuc'.replace(re23, '');
+ 'freivpr'.replace(re40, '');
+ 'freivpr'.replace(re41, '');
+ 'freivpr'.replace(re42, '');
+ 'freivpr'.replace(re43, '');
+ 'freivpr'.replace(re44, '');
+ 'freivpr'.replace(re45, '');
+ 'freivpr'.replace(re46, '');
+ 'freivpr'.replace(re47, '');
+ 'freivpr'.replace(re48, '');
+ /((ZFVR\s+([6-9]|\d\d)\.))/.exec(str0);
+ re66.exec('');
+ re50.exec('fryrpgrq');
+ re8.exec('8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn');
+ re8.exec('SbeprqRkcvengvba=633669340386893867');
+ re8.exec('VC=74.125.75.17');
+ re8.exec('FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn');
+ /Xbadhrebe|Fnsnev|XUGZY/.exec(str0);
+ re13.exec(str41);
+ re49.exec('unfsbphf');
+ }
+ }
+ var re67 = /zrah_byq/g;
+ var str42 = 'FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669325184628362&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str43 = 'FrffvbaQQS2=473qq1rs0n2r70q9qo1pq48n021s9468ron90nps048p4p29; __hgzm=144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.3931862196947939300.1231364380.1231364380.1231364380.1; __hgzo=144631658.0.10.1231364380; __hgzp=144631658; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669325184628362&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str44 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_vzntrf_wf&qg=1231364373088&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231364373088&punaary=svz_zlfcnpr_hfre-ivrj-pbzzragf%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Spbzzrag.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1158737789.1231364375&tn_fvq=1231364375&tn_uvq=415520832&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str45 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669325184628362&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str46 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669325184628362&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var re68 = /^([#.]?)((?:[\w\u0128-\uffff*_-]|\\.)*)/;
+ var re69 = /\{1\}/g;
+ var re70 = /\s+/;
+ var re71 = /(\$\{4\})|(\$4\b)/g;
+ var re72 = /(\$\{5\})|(\$5\b)/g;
+ var re73 = /\{2\}/g;
+ var re74 = /[^+>] [^+>]/;
+ var re75 = /\bucpyv\s*=\s*([^;]*)/i;
+ var re76 = /\bucuvqr\s*=\s*([^;]*)/i;
+ var re77 = /\bucfie\s*=\s*([^;]*)/i;
+ var re78 = /\bhfucjrn\s*=\s*([^;]*)/i;
+ var re79 = /\bmvc\s*=\s*([^;]*)/i;
+ var re80 = /^((?:[\w\u0128-\uffff*_-]|\\.)+)(#)((?:[\w\u0128-\uffff*_-]|\\.)+)/;
+ var re81 = /^([>+~])\s*(\w*)/i;
+ var re82 = /^>\s*((?:[\w\u0128-\uffff*_-]|\\.)+)/;
+ var re83 = /^[\s[]?shapgvba/;
+ var re84 = /v\/g.tvs#(.*)/i;
+ var str47 = '#Zbq-Vasb-Vasb-WninFpevcgUvag';
+ var str48 = ',n.svryqOgaPnapry';
+ var str49 = 'FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669357391353591&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_kkk-gdzogv_80=4413241q3660';
+ var str50 = 'FrffvbaQQS2=p98s8o9q42nr21or1r61pqorn1n002nsss569635984s6qp7; AFP_zp_kkk-gdzogv_80=4413241q3660; AFP_zp_kkk-aowb_80=4413235p3660; __hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1; __hgzo=144631658.0.10.1231367708; __hgzp=144631658; ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669357391353591&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str51 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231367691141&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367691141&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Sjjj.zlfcnpr.pbz%2S&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=320757904.1231367694&tn_fvq=1231367694&tn_uvq=1758792003&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str52 = 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&aqu=1&g=7%2S0%2S2009%2014%3N38%3N42%203%20480&af=zfacbegny&cntrAnzr=HF%20UCZFSGJ&t=uggc%3N%2S%2Sjjj.zfa.pbz%2S&f=1024k768&p=24&x=L&oj=994&ou=634&uc=A&{2}&[NDR]';
+ var str53 = 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq qbhoyr2 ps';
+ var str54 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669357391353591&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str55 = 'ZFPhygher=VC=74.125.75.3&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669357391353591&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str56 = 'ne;ng;nh;or;oe;pn;pu;py;pa;qr;qx;rf;sv;se;to;ux;vq;vr;va;vg;wc;xe;zk;zl;ay;ab;am;cu;cy;cg;eh;fr;ft;gu;ge;gj;mn;';
+ var str57 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886&GHVQ=1';
+ var str58 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886';
+ var str59 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886; mvc=m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1';
+ var str60 = 'ZP1=I=3&THVQ=6nnpr9q661804s33nnop45nosqp17q85; zu=ZFSG; PHYGHER=RA-HF; SyvtugTebhcVq=97; SyvtugVq=OnfrCntr; ucfie=Z:5|S:5|G:5|R:5|Q:oyh|J:S; ucpyv=J.U|Y.|F.|E.|H.Y|P.|U.; hfucjrn=jp:HFPN0746; ZHVQ=Q783SN9O14054831N4869R51P0SO8886; mvc=m:94043|yn:37.4154|yb:-122.0585|p:HF';
+ var str61 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/29/4RQP4969777N048NPS4RRR3PO2S7S.wct';
+ var str62 = 'uggc://gx2.fgp.f-zfa.pbz/oe/uc/11/ra-hf/pff/v/g.tvs#uggc://gx2.fgo.f-zfa.pbz/v/OQ/63NP9O94NS5OQP1249Q9S1ROP7NS3.wct';
+ var str63 = 'zbmvyyn/5.0 (jvaqbjf; h; jvaqbjf ag 5.1; ra-hf) nccyrjroxvg/528.9 (xugzy, yvxr trpxb) puebzr/2.0.157.0 fnsnev/528.9';
+ function runBlock9() {
+ for (var i = 0; i < 5; i++) {
+ str42.split(re32);
+ str43.split(re32);
+ 'svz_zlfcnpr_hfre-ivrj-pbzzragf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
+ str44.replace(re33, '');
+ 'zrah_arj zrah_arj_gbttyr zrah_gbttyr'.replace(re67, '');
+ 'zrah_byq zrah_byq_gbttyr zrah_gbttyr'.replace(re67, '');
+ re8.exec('102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98');
+ re8.exec('144631658.0.10.1231364380');
+ re8.exec('144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.3931862196947939300.1231364380.1231364380.1231364380.1');
+ re8.exec('441326q33660');
+ re8.exec('SbeprqRkcvengvba=633669341278771470');
+ re8.exec(str45);
+ re8.exec(str46);
+ re8.exec('AFP_zp_dfctwzssrwh-aowb_80=441326q33660');
+ re8.exec('FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98');
+ re8.exec('__hgzn=144631658.3931862196947939300.1231364380.1231364380.1231364380.1');
+ re8.exec('__hgzo=144631658.0.10.1231364380');
+ re8.exec('__hgzm=144631658.1231364380.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ }
+ for (var i = 0; i < 4; i++) {
+ ' yvfg1'.replace(re14, '');
+ ' yvfg1'.replace(re15, '');
+ ' yvfg2'.replace(re14, '');
+ ' yvfg2'.replace(re15, '');
+ ' frneputebhc1'.replace(re14, '');
+ ' frneputebhc1'.replace(re15, '');
+ str47.replace(re68, '');
+ str47.replace(re18, '');
+ ''.replace(/&/g, '');
+ ''.replace(re35, '');
+ '(..-{0})(\|(\d+)|)'.replace(re63, '');
+ str48.replace(re18, '');
+ '//vzt.jro.qr/vij/FC/${cngu}/${anzr}/${inyhr}?gf=${abj}'.replace(re56, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/${anzr}/${inyhr}?gf=${abj}'.replace(/(\$\{anzr\})|(\$anzr\b)/g, '');
+ '<fcna pynff="urnq"><o>Jvaqbjf Yvir Ubgznvy</o></fcna><fcna pynff="zft">{1}</fcna>'.replace(re69, '');
+ '<fcna pynff="urnq"><o>{0}</o></fcna><fcna pynff="zft">{1}</fcna>'.replace(re63, '');
+ '<fcna pynff="fvtahc"><n uers=uggc://jjj.ubgznvy.pbz><o>{1}</o></n></fcna>'.replace(re69, '');
+ '<fcna pynff="fvtahc"><n uers={0}><o>{1}</o></n></fcna>'.replace(re63, '');
+ 'Vzntrf'.replace(re15, '');
+ 'ZFA'.replace(re15, '');
+ 'Zncf'.replace(re15, '');
+ 'Zbq-Vasb-Vasb-WninFpevcgUvag'.replace(re39, '');
+ 'Arjf'.replace(re15, '');
+ str49.split(re32);
+ str50.split(re32);
+ 'Ivqrb'.replace(re15, '');
+ 'Jro'.replace(re15, '');
+ 'n'.replace(re39, '');
+ 'nwnkFgneg'.split(re70);
+ 'nwnkFgbc'.split(re70);
+ 'ovaq'.replace(re14, '');
+ 'ovaq'.replace(re15, '');
+ 'oevatf lbh zber. Zber fcnpr (5TO), zber frphevgl, fgvyy serr.'.replace(re63, '');
+ 'puvyq p1 svefg qrpx'.replace(re14, '');
+ 'puvyq p1 svefg qrpx'.replace(re15, '');
+ 'puvyq p1 svefg qbhoyr2'.replace(re14, '');
+ 'puvyq p1 svefg qbhoyr2'.replace(re15, '');
+ 'puvyq p2 ynfg'.replace(re14, '');
+ 'puvyq p2 ynfg'.replace(re15, '');
+ 'puvyq p2'.replace(re14, '');
+ 'puvyq p2'.replace(re15, '');
+ 'puvyq p3'.replace(re14, '');
+ 'puvyq p3'.replace(re15, '');
+ 'puvyq p4 ynfg'.replace(re14, '');
+ 'puvyq p4 ynfg'.replace(re15, '');
+ 'pbclevtug'.replace(re14, '');
+ 'pbclevtug'.replace(re15, '');
+ 'qZFAZR_1'.replace(re14, '');
+ 'qZFAZR_1'.replace(re15, '');
+ 'qbhoyr2 ps'.replace(re14, '');
+ 'qbhoyr2 ps'.replace(re15, '');
+ 'qbhoyr2'.replace(re14, '');
+ 'qbhoyr2'.replace(re15, '');
+ 'uqy_arj'.replace(re14, '');
+ 'uqy_arj'.replace(re15, '');
+ 'uc_fubccvatobk'.replace(re30, '');
+ 'ugzy%2Rvq'.replace(re29, '');
+ 'ugzy%2Rvq'.replace(re30, '');
+ str51.replace(re33, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/cebgbglcr.wf${5}'.replace(re72, '');
+ str52.replace(re73, '');
+ 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55332979829981?[NDO]&{1}&{2}&[NDR]'.replace(re69, '');
+ 'vztZFSG'.replace(re14, '');
+ 'vztZFSG'.replace(re15, '');
+ 'zfasbbg1 ps'.replace(re14, '');
+ 'zfasbbg1 ps'.replace(re15, '');
+ str53.replace(re14, '');
+ str53.replace(re15, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re14, '');
+ 'cnerag puebzr6 fvatyr1 gno fryrpgrq ovaq'.replace(re15, '');
+ 'cevznel'.replace(re14, '');
+ 'cevznel'.replace(re15, '');
+ 'erpgnatyr'.replace(re30, '');
+ 'frpbaqnel'.replace(re14, '');
+ 'frpbaqnel'.replace(re15, '');
+ 'haybnq'.split(re70);
+ '{0}{1}1'.replace(re63, '');
+ '|{1}1'.replace(re69, '');
+ /(..-HF)(\|(\d+)|)/i.exec('xb-xe,ra-va,gu-gu');
+ re4.exec('/ZlFcnprNccf/NccPnainf,45000012');
+ re8.exec('144631658.0.10.1231367708');
+ re8.exec('144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.2770915348920628700.1231367708.1231367708.1231367708.1');
+ re8.exec('4413235p3660');
+ re8.exec('441327q73660');
+ re8.exec('9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473');
+ re8.exec('SbeprqRkcvengvba=633669350559478880');
+ re8.exec(str54);
+ re8.exec(str55);
+ re8.exec('AFP_zp_dfctwzs-aowb_80=441327q73660');
+ re8.exec('AFP_zp_kkk-aowb_80=4413235p3660');
+ re8.exec('FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473');
+ re8.exec('__hgzn=144631658.2770915348920628700.1231367708.1231367708.1231367708.1');
+ re8.exec('__hgzo=144631658.0.10.1231367708');
+ re8.exec('__hgzm=144631658.1231367708.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str49);
+ re34.exec(str50);
+ /ZFVR\s+5[.]01/.exec(str0);
+ /HF(?=;)/i.exec(str56);
+ re74.exec(str47);
+ re28.exec('svefg npgvir svefgNpgvir');
+ re28.exec('ynfg');
+ /\bp:(..)/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF');
+ re75.exec(str57);
+ re75.exec(str58);
+ re76.exec(str57);
+ re76.exec(str58);
+ re77.exec(str57);
+ re77.exec(str58);
+ /\bhfucce\s*=\s*([^;]*)/i.exec(str59);
+ re78.exec(str57);
+ re78.exec(str58);
+ /\bjci\s*=\s*([^;]*)/i.exec(str59);
+ re79.exec(str58);
+ re79.exec(str60);
+ re79.exec(str59);
+ /\|p:([a-z]{2})/i.exec('m:94043|yn:37.4154|yb:-122.0585|p:HF|ue:1');
+ re80.exec(str47);
+ re61.exec('cebgbglcr.wf');
+ re68.exec(str47);
+ re81.exec(str47);
+ re82.exec(str47);
+ /^Fubpxjnir Synfu (\d)/.exec(str1);
+ /^Fubpxjnir Synfu (\d+)/.exec(str1);
+ re83.exec('[bowrpg tybony]');
+ re62.exec(str47);
+ re84.exec(str61);
+ re84.exec(str62);
+ /jroxvg/.exec(str63);
+ }
+ }
+ var re85 = /eaq_zbqobkva/;
+ var str64 = '1231365729213';
+ var str65 = '74.125.75.3-1057165600.29978900';
+ var str66 = '74.125.75.3-1057165600.29978900.1231365730214';
+ var str67 = 'Frnepu%20Zvpebfbsg.pbz';
+ var str68 = 'FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn; ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669340386893867&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str69 = 'FrffvbaQQS2=8sqq78r9n442851q565599o401385sp3s04r92rnn7o19ssn; __hgzm=144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1877536177953918500.1231365779.1231365779.1231365779.1; __hgzo=144631658.0.10.1231365779; __hgzp=144631658; ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669340386893867&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str70 = 'I=3%26THVQ=757q3ss871q44o7o805n8113n5p72q52';
+ var str71 = 'I=3&THVQ=757q3ss871q44o7o805n8113n5p72q52';
+ var str72 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231365765292&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231365765292&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Sohyyrgvaf.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1579793869.1231365768&tn_fvq=1231365768&tn_uvq=2056210897&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str73 = 'frnepu.zvpebfbsg.pbz';
+ var str74 = 'frnepu.zvpebfbsg.pbz/';
+ var str75 = 'ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669340386893867&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str76 = 'ZFPhygher=VC=74.125.75.17&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669340386893867&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ function runBlock10() {
+ for (var i = 0; i < 3; i++) {
+ '%3Szxg=ra-HF'.replace(re39, '');
+ '-8'.replace(re40, '');
+ '-8'.replace(re10, '');
+ '-8'.replace(re51, '');
+ '-8'.replace(re52, '');
+ '-8'.replace(re53, '');
+ '-8'.replace(re39, '');
+ '-8'.replace(re54, '');
+ '1.5'.replace(re40, '');
+ '1.5'.replace(re10, '');
+ '1.5'.replace(re51, '');
+ '1.5'.replace(re52, '');
+ '1.5'.replace(re53, '');
+ '1.5'.replace(re39, '');
+ '1.5'.replace(re54, '');
+ '1024k768'.replace(re40, '');
+ '1024k768'.replace(re10, '');
+ '1024k768'.replace(re51, '');
+ '1024k768'.replace(re52, '');
+ '1024k768'.replace(re53, '');
+ '1024k768'.replace(re39, '');
+ '1024k768'.replace(re54, '');
+ str64.replace(re40, '');
+ str64.replace(re10, '');
+ str64.replace(re51, '');
+ str64.replace(re52, '');
+ str64.replace(re53, '');
+ str64.replace(re39, '');
+ str64.replace(re54, '');
+ '14'.replace(re40, '');
+ '14'.replace(re10, '');
+ '14'.replace(re51, '');
+ '14'.replace(re52, '');
+ '14'.replace(re53, '');
+ '14'.replace(re39, '');
+ '14'.replace(re54, '');
+ '24'.replace(re40, '');
+ '24'.replace(re10, '');
+ '24'.replace(re51, '');
+ '24'.replace(re52, '');
+ '24'.replace(re53, '');
+ '24'.replace(re39, '');
+ '24'.replace(re54, '');
+ str65.replace(re40, '');
+ str65.replace(re10, '');
+ str65.replace(re51, '');
+ str65.replace(re52, '');
+ str65.replace(re53, '');
+ str65.replace(re39, '');
+ str65.replace(re54, '');
+ str66.replace(re40, '');
+ str66.replace(re10, '');
+ str66.replace(re51, '');
+ str66.replace(re52, '');
+ str66.replace(re53, '');
+ str66.replace(re39, '');
+ str66.replace(re54, '');
+ '9.0'.replace(re40, '');
+ '9.0'.replace(re10, '');
+ '9.0'.replace(re51, '');
+ '9.0'.replace(re52, '');
+ '9.0'.replace(re53, '');
+ '9.0'.replace(re39, '');
+ '9.0'.replace(re54, '');
+ '994k634'.replace(re40, '');
+ '994k634'.replace(re10, '');
+ '994k634'.replace(re51, '');
+ '994k634'.replace(re52, '');
+ '994k634'.replace(re53, '');
+ '994k634'.replace(re39, '');
+ '994k634'.replace(re54, '');
+ '?zxg=ra-HF'.replace(re40, '');
+ '?zxg=ra-HF'.replace(re10, '');
+ '?zxg=ra-HF'.replace(re51, '');
+ '?zxg=ra-HF'.replace(re52, '');
+ '?zxg=ra-HF'.replace(re53, '');
+ '?zxg=ra-HF'.replace(re54, '');
+ 'PAA.pbz'.replace(re25, '');
+ 'PAA.pbz'.replace(re12, '');
+ 'PAA.pbz'.replace(re39, '');
+ 'Qngr & Gvzr'.replace(re25, '');
+ 'Qngr & Gvzr'.replace(re12, '');
+ 'Qngr & Gvzr'.replace(re39, '');
+ 'Frnepu Zvpebfbsg.pbz'.replace(re40, '');
+ 'Frnepu Zvpebfbsg.pbz'.replace(re54, '');
+ str67.replace(re10, '');
+ str67.replace(re51, '');
+ str67.replace(re52, '');
+ str67.replace(re53, '');
+ str67.replace(re39, '');
+ str68.split(re32);
+ str69.split(re32);
+ str70.replace(re52, '');
+ str70.replace(re53, '');
+ str70.replace(re39, '');
+ str71.replace(re40, '');
+ str71.replace(re10, '');
+ str71.replace(re51, '');
+ str71.replace(re54, '');
+ 'Jrngure'.replace(re25, '');
+ 'Jrngure'.replace(re12, '');
+ 'Jrngure'.replace(re39, '');
+ 'LbhGhor'.replace(re25, '');
+ 'LbhGhor'.replace(re12, '');
+ 'LbhGhor'.replace(re39, '');
+ str72.replace(re33, '');
+ 'erzbgr_vsenzr_1'.replace(/^erzbgr_vsenzr_/, '');
+ str73.replace(re40, '');
+ str73.replace(re10, '');
+ str73.replace(re51, '');
+ str73.replace(re52, '');
+ str73.replace(re53, '');
+ str73.replace(re39, '');
+ str73.replace(re54, '');
+ str74.replace(re40, '');
+ str74.replace(re10, '');
+ str74.replace(re51, '');
+ str74.replace(re52, '');
+ str74.replace(re53, '');
+ str74.replace(re39, '');
+ str74.replace(re54, '');
+ 'lhv-h'.replace(/\-/g, '');
+ re9.exec('p');
+ re9.exec('qz p');
+ re9.exec('zbqynory');
+ re9.exec('lhv-h svefg');
+ re8.exec('144631658.0.10.1231365779');
+ re8.exec('144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.1877536177953918500.1231365779.1231365779.1231365779.1');
+ re8.exec(str75);
+ re8.exec(str76);
+ re8.exec('__hgzn=144631658.1877536177953918500.1231365779.1231365779.1231365779.1');
+ re8.exec('__hgzo=144631658.0.10.1231365779');
+ re8.exec('__hgzm=144631658.1231365779.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str68);
+ re34.exec(str69);
+ /^$/.exec('');
+ re31.exec('qr');
+ /^znk\d+$/.exec('');
+ /^zva\d+$/.exec('');
+ /^erfgber$/.exec('');
+ re85.exec('zbqobkva zbqobk_abcnqqvat ');
+ re85.exec('zbqgvgyr');
+ re85.exec('eaq_zbqobkva ');
+ re85.exec('eaq_zbqgvgyr ');
+ /frpgvba\d+_pbagragf/.exec('obggbz_ani');
+ }
+ }
+ var re86 = /;\s*/;
+ var re87 = /(\$\{inyhr\})|(\$inyhr\b)/g;
+ var re88 = /(\$\{abj\})|(\$abj\b)/g;
+ var re89 = /\s+$/;
+ var re90 = /^\s+/;
+ var re91 = /(\\\"|\x00-|\x1f|\x7f-|\x9f|\u00ad|\u0600-|\u0604|\u070f|\u17b4|\u17b5|\u200c-|\u200f|\u2028-|\u202f|\u2060-|\u206f|\ufeff|\ufff0-|\uffff)/g;
+ var re92 = /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/;
+ var re93 = /^([:.#]*)((?:[\w\u0128-\uffff*_-]|\\.)+)/;
+ var re94 = /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/;
+ var str77 = '#fubhgobk .pybfr';
+ var str78 = 'FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669341278771470&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzssrwh-aowb_80=441326q33660';
+ var str79 = 'FrffvbaQQS2=102n9o0o9pq60132qn0337rr867p75953502q2s27s2s5r98; AFP_zp_dfctwzssrwh-aowb_80=441326q33660; __hgzm=144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1670816052019209000.1231365869.1231365869.1231365869.1; __hgzo=144631658.0.10.1231365869; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669341278771470&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str80 = 'FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669350559478880&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=; AFP_zp_dfctwzs-aowb_80=441327q73660';
+ var str81 = 'FrffvbaQQS2=9995p6rp12rrnr893334ro7nq70o7p64p69rqn844prs1473; AFP_zp_dfctwzs-aowb_80=441327q73660; __hgzm=144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar); __hgzn=144631658.1796080716621419500.1231367054.1231367054.1231367054.1; __hgzo=144631658.0.10.1231367054; __hgzp=144631658; ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669350559478880&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str82 = '[glcr=fhozvg]';
+ var str83 = 'n.svryqOga,n.svryqOgaPnapry';
+ var str84 = 'n.svryqOgaPnapry';
+ var str85 = 'oyvpxchaxg';
+ var str86 = 'qvi.bow-nppbeqvba qg';
+ var str87 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_nccf_wf&qg=1231367052227&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231367052227&punaary=svz_zlfcnpr_nccf-pnainf%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyr.zlfcnpr.pbz%2SZbqhyrf%2SNccyvpngvbaf%2SCntrf%2SPnainf.nfck&nq_glcr=grkg&rvq=6083027&rn=0&sez=1&tn_ivq=716357910.1231367056&tn_fvq=1231367056&tn_uvq=1387206491&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str88 = 'uggc://tbbtyrnqf.t.qbhoyrpyvpx.arg/cntrnq/nqf?pyvrag=pn-svz_zlfcnpr_zlfcnpr-ubzrcntr_wf&qg=1231365851658&uy=ra&nqfnsr=uvtu&br=hgs8&ahz_nqf=4&bhgchg=wf&nqgrfg=bss&pbeeryngbe=1231365851658&punaary=svz_zlfcnpr_ubzrcntr_abgybttrqva%2Psvz_zlfcnpr_aba_HTP%2Psvz_zlfcnpr_havgrq-fgngrf&hey=uggc%3N%2S%2Scebsvyrrqvg.zlfcnpr.pbz%2Svaqrk.psz&nq_glcr=grkg&rvq=6083027&rn=0&sez=0&tn_ivq=1979828129.1231365855&tn_fvq=1231365855&tn_uvq=2085229649&synfu=9.0.115&h_u=768&h_j=1024&h_nu=738&h_nj=1024&h_pq=24&h_gm=-480&h_uvf=2&h_wnin=gehr&h_acyht=7&h_azvzr=22';
+ var str89 = 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55023338617756?[NDO]&aqu=1&g=7%2S0%2S2009%2014%3N12%3N47%203%20480&af=zfacbegny&cntrAnzr=HF%20UCZFSGJ&t=uggc%3N%2S%2Sjjj.zfa.pbz%2S&f=0k0&p=43835816&x=A&oj=994&ou=634&uc=A&{2}&[NDR]';
+ var str90 = 'zrgn[anzr=nwnkHey]';
+ var str91 = 'anpuevpugra';
+ var str92 = 'b oS={\'oT\':1.1};x $8n(B){z(B!=o9)};x $S(B){O(!$8n(B))z A;O(B.4L)z\'T\';b S=7t B;O(S==\'2P\'&&B.p4){23(B.7f){12 1:z\'T\';12 3:z/\S/.2g(B.8M)?\'ox\':\'oh\'}}O(S==\'2P\'||S==\'x\'){23(B.nE){12 2V:z\'1O\';12 7I:z\'5a\';12 18:z\'4B\'}O(7t B.I==\'4F\'){O(B.3u)z\'pG\';O(B.8e)z\'1p\'}}z S};x $2p(){b 4E={};Z(b v=0;v<1p.I;v++){Z(b X 1o 1p[v]){b nc=1p[v][X];b 6E=4E[X];O(6E&&$S(nc)==\'2P\'&&$S(6E)==\'2P\')4E[X]=$2p(6E,nc);17 4E[X]=nc}}z 4E};b $E=7p.E=x(){b 1d=1p;O(!1d[1])1d=[p,1d[0]];Z(b X 1o 1d[1])1d[0][X]=1d[1][X];z 1d[0]};b $4D=7p.pJ=x(){Z(b v=0,y=1p.I;v<y;v++){1p[v].E=x(1J){Z(b 1I 1o 1J){O(!p.1Y[1I])p.1Y[1I]=1J[1I];O(!p[1I])p[1I]=$4D.6C(1I)}}}};$4D.6C=x(1I){z x(L){z p.1Y[1I].3H(L,2V.1Y.nV.1F(1p,1))}};$4D(7F,2V,6J,nb);b 3l=x(B){B=B||{};B.E=$E;z B};b pK=Y 3l(H);b pZ=Y 3l(C);C.6f=C.35(\'6f\')[0];x $2O(B){z!!(B||B===0)};x $5S(B,n8){z $8n(B)?B:n8};x $7K(3c,1m){z 1q.na(1q.7K()*(1m-3c+1)+3c)};x $3N(){z Y 97().os()};x $4M(1U){pv(1U);pa(1U);z 1S};H.43=!!(C.5Z);O(H.nB)H.31=H[H.7q?\'py\':\'nL\']=1r;17 O(C.9N&&!C.om&&!oy.oZ)H.pF=H.4Z=H[H.43?\'pt\':\'65\']=1r;17 O(C.po!=1S)H.7J=1r;O(7t 5B==\'o9\'){b 5B=x(){};O(H.4Z)C.nd("pW");5B.1Y=(H.4Z)?H["[[oN.1Y]]"]:{}}5B.1Y.4L=1r;O(H.nL)5s{C.oX("pp",A,1r)}4K(r){};b 18=x(1X){b 63=x(){z(1p[0]!==1S&&p.1w&&$S(p.1w)==\'x\')?p.1w.3H(p,1p):p};$E(63,p);63.1Y=1X;63.nE=18;z 63};18.1z=x(){};18.1Y={E:x(1X){b 7x=Y p(1S);Z(b X 1o 1X){b nC=7x[X];7x[X]=18.nY(nC,1X[X])}z Y 18(7x)},3d:x(){Z(b v=0,y=1p.I;v<y;v++)$E(p.1Y,1p[v])}};18.nY=x(2b,2n){O(2b&&2b!=2n){b S=$S(2n);O(S!=$S(2b))z 2n;23(S){12\'x\':b 7R=x(){p.1e=1p.8e.1e;z 2n.3H(p,1p)};7R.1e=2b;z 7R;12\'2P\':z $2p(2b,2n)}}z 2n};b 8o=Y 18({oQ:x(J){p.4w=p.4w||[];p.4w.1x(J);z p},7g:x(){O(p.4w&&p.4w.I)p.4w.9J().2x(10,p)},oP:x(){p.4w=[]}});b 2d=Y 18({1V:x(S,J){O(J!=18.1z){p.$19=p.$19||{};p.$19[S]=p.$19[S]||[];p.$19[S].5j(J)}z p},1v:x(S,1d,2x){O(p.$19&&p.$19[S]){p.$19[S].1b(x(J){J.3n({\'L\':p,\'2x\':2x,\'1p\':1d})()},p)}z p},3M:x(S,J){O(p.$19&&p.$19[S])p.$19[S].2U(J);z p}});b 4v=Y 18({2H:x(){p.P=$2p.3H(1S,[p.P].E(1p));O(!p.1V)z p;Z(b 3O 1o p.P){O($S(p.P[3O]==\'x\')&&3O.2g(/^5P[N-M]/))p.1V(3O,p.P[3O])}z p}});2V.E({7y:x(J,L){Z(b v=0,w=p.I;v<w;v++)J.1F(L,p[v],v,p)},3s:x(J,L){b 54=[];Z(b v=0,w=p.I;v<w;v++){O(J.1F(L,p[v],v,p))54.1x(p[v])}z 54},2X:x(J,L){b 54=[];Z(b v=0,w=p.I;v<w;v++)54[v]=J.1F(L,p[v],v,p);z 54},4i:x(J,L){Z(b v=0,w=p.I;v<w;v++){O(!J.1F(L,p[v],v,p))z A}z 1r},ob:x(J,L){Z(b v=0,w=p.I;v<w;v++){O(J.1F(L,p[v],v,p))z 1r}z A},3F:x(3u,15){b 3A=p.I;Z(b v=(15<0)?1q.1m(0,3A+15):15||0;v<3A;v++){O(p[v]===3u)z v}z-1},8z:x(1u,I){1u=1u||0;O(1u<0)1u=p.I+1u;I=I||(p.I-1u);b 89=[];Z(b v=0;v<I;v++)89[v]=p[1u++];z 89},2U:x(3u){b v=0;b 3A=p.I;6L(v<3A){O(p[v]===3u){p.6l(v,1);3A--}17{v++}}z p},1y:x(3u,15){z p.3F(3u,15)!=-1},oz:x(1C){b B={},I=1q.3c(p.I,1C.I);Z(b v=0;v<I;v++)B[1C[v]]=p[v];z B},E:x(1O){Z(b v=0,w=1O.I;v<w;v++)p.1x(1O[v]);z p},2p:x(1O){Z(b v=0,y=1O.I;v<y;v++)p.5j(1O[v]);z p},5j:x(3u){O(!p.1y(3u))p.1x(3u);z p},oc:x(){z p[$7K(0,p.I-1)]||A},7L:x(){z p[p.I-1]||A}});2V.1Y.1b=2V.1Y.7y;2V.1Y.2g=2V.1Y.1y;x $N(1O){z 2V.8z(1O)};x $1b(3J,J,L){O(3J&&7t 3J.I==\'4F\'&&$S(3J)!=\'2P\')2V.7y(3J,J,L);17 Z(b 1j 1o 3J)J.1F(L||3J,3J[1j],1j)};6J.E({2g:x(6b,2F){z(($S(6b)==\'2R\')?Y 7I(6b,2F):6b).2g(p)},3p:x(){z 5K(p,10)},o4:x(){z 69(p)},7A:x(){z p.3y(/-\D/t,x(2G){z 2G.7G(1).nW()})},9b:x(){z p.3y(/\w[N-M]/t,x(2G){z(2G.7G(0)+\'-\'+2G.7G(1).5O())})},8V:x(){z p.3y(/\b[n-m]/t,x(2G){z 2G.nW()})},5L:x(){z p.3y(/^\s+|\s+$/t,\'\')},7j:x(){z p.3y(/\s{2,}/t,\' \').5L()},5V:x(1O){b 1i=p.2G(/\d{1,3}/t);z(1i)?1i.5V(1O):A},5U:x(1O){b 3P=p.2G(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);z(3P)?3P.nV(1).5U(1O):A},1y:x(2R,f){z(f)?(f+p+f).3F(f+2R+f)>-1:p.3F(2R)>-1},nX:x(){z p.3y(/([.*+?^${}()|[\]\/\\])/t,\'\\$1\')}});2V.E({5V:x(1O){O(p.I<3)z A;O(p.I==4&&p[3]==0&&!1O)z\'p5\';b 3P=[];Z(b v=0;v<3;v++){b 52=(p[v]-0).4h(16);3P.1x((52.I==1)?\'0\'+52:52)}z 1O?3P:\'#\'+3P.2u(\'\')},5U:x(1O){O(p.I!=3)z A;b 1i=[];Z(b v=0;v<3;v++){1i.1x(5K((p[v].I==1)?p[v]+p[v]:p[v],16))}z 1O?1i:\'1i(\'+1i.2u(\',\')+\')\'}});7F.E({3n:x(P){b J=p;P=$2p({\'L\':J,\'V\':A,\'1p\':1S,\'2x\':A,\'4s\':A,\'6W\':A},P);O($2O(P.1p)&&$S(P.1p)!=\'1O\')P.1p=[P.1p];z x(V){b 1d;O(P.V){V=V||H.V;1d=[(P.V===1r)?V:Y P.V(V)];O(P.1p)1d.E(P.1p)}17 1d=P.1p||1p;b 3C=x(){z J.3H($5S(P';
+ var str93 = 'hagreunyghat';
+ var str94 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669341278771470&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str95 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&Pbhagel=IIZ%3Q&SbeprqRkcvengvba=633669350559478880&gvzrMbar=-8&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R%3Q';
+ var str96 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669341278771470&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str97 = 'ZFPhygher=VC=74.125.75.1&VCPhygher=ra-HF&CersreerqPhygher=ra-HF&CersreerqPhygherCraqvat=&Pbhagel=IIZ=&SbeprqRkcvengvba=633669350559478880&gvzrMbar=0&HFEYBP=DKWyLHAiMTH9AwHjWxAcqUx9GJ91oaEunJ4tIzyyqlMQo3IhqUW5D29xMG1IHlMQo3IhqUW5GzSgMG1Iozy0MJDtH3EuqTImWxEgLHAiMTH9BQN3WxkuqTy0qJEyCGZ3YwDkBGVzGT9hM2y0qJEyCF0kZwVhZQH3APMDo3A0LJkQo2EyCGx0ZQDmWyWyM2yiox5uoJH9D0R=';
+ var str98 = 'shapgvba (){Cuk.Nccyvpngvba.Frghc.Pber();Cuk.Nccyvpngvba.Frghc.Nwnk();Cuk.Nccyvpngvba.Frghc.Synfu();Cuk.Nccyvpngvba.Frghc.Zbqhyrf()}';
+ function runBlock11() {
+ for (var i = 0; i < 2; i++) {
+ ' .pybfr'.replace(re18, '');
+ ' n.svryqOgaPnapry'.replace(re18, '');
+ ' qg'.replace(re18, '');
+ str77.replace(re68, '');
+ str77.replace(re18, '');
+ ''.replace(re39, '');
+ ''.replace(/^/, '');
+ ''.split(re86);
+ '*'.replace(re39, '');
+ '*'.replace(re68, '');
+ '*'.replace(re18, '');
+ '.pybfr'.replace(re68, '');
+ '.pybfr'.replace(re18, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/fperra/${inyhr}?gf=${abj}'.replace(re87, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/fperra/1024?gf=${abj}'.replace(re88, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/jvafvmr/${inyhr}?gf=${abj}'.replace(re87, '');
+ '//vzt.jro.qr/vij/FC/tzk_uc/jvafvmr/992/608?gf=${abj}'.replace(re88, '');
+ '300k120'.replace(re30, '');
+ '300k250'.replace(re30, '');
+ '310k120'.replace(re30, '');
+ '310k170'.replace(re30, '');
+ '310k250'.replace(re30, '');
+ '9.0 e115'.replace(/^.*\.(.*)\s.*$/, '');
+ 'Nppbeqvba'.replace(re2, '');
+ 'Nxghryy\x0a'.replace(re89, '');
+ 'Nxghryy\x0a'.replace(re90, '');
+ 'Nccyvpngvba'.replace(re2, '');
+ 'Oyvpxchaxg\x0a'.replace(re89, '');
+ 'Oyvpxchaxg\x0a'.replace(re90, '');
+ 'Svanamra\x0a'.replace(re89, '');
+ 'Svanamra\x0a'.replace(re90, '');
+ 'Tnzrf\x0a'.replace(re89, '');
+ 'Tnzrf\x0a'.replace(re90, '');
+ 'Ubebfxbc\x0a'.replace(re89, '');
+ 'Ubebfxbc\x0a'.replace(re90, '');
+ 'Xvab\x0a'.replace(re89, '');
+ 'Xvab\x0a'.replace(re90, '');
+ 'Zbqhyrf'.replace(re2, '');
+ 'Zhfvx\x0a'.replace(re89, '');
+ 'Zhfvx\x0a'.replace(re90, '');
+ 'Anpuevpugra\x0a'.replace(re89, '');
+ 'Anpuevpugra\x0a'.replace(re90, '');
+ 'Cuk'.replace(re2, '');
+ 'ErdhrfgSvavfu'.split(re70);
+ 'ErdhrfgSvavfu.NWNK.Cuk'.split(re70);
+ 'Ebhgr\x0a'.replace(re89, '');
+ 'Ebhgr\x0a'.replace(re90, '');
+ str78.split(re32);
+ str79.split(re32);
+ str80.split(re32);
+ str81.split(re32);
+ 'Fcbeg\x0a'.replace(re89, '');
+ 'Fcbeg\x0a'.replace(re90, '');
+ 'GI-Fcbg\x0a'.replace(re89, '');
+ 'GI-Fcbg\x0a'.replace(re90, '');
+ 'Gbhe\x0a'.replace(re89, '');
+ 'Gbhe\x0a'.replace(re90, '');
+ 'Hagreunyghat\x0a'.replace(re89, '');
+ 'Hagreunyghat\x0a'.replace(re90, '');
+ 'Ivqrb\x0a'.replace(re89, '');
+ 'Ivqrb\x0a'.replace(re90, '');
+ 'Jrggre\x0a'.replace(re89, '');
+ 'Jrggre\x0a'.replace(re90, '');
+ str82.replace(re68, '');
+ str82.replace(re18, '');
+ str83.replace(re68, '');
+ str83.replace(re18, '');
+ str84.replace(re68, '');
+ str84.replace(re18, '');
+ 'nqiFreivprObk'.replace(re30, '');
+ 'nqiFubccvatObk'.replace(re30, '');
+ 'nwnk'.replace(re39, '');
+ 'nxghryy'.replace(re40, '');
+ 'nxghryy'.replace(re41, '');
+ 'nxghryy'.replace(re42, '');
+ 'nxghryy'.replace(re43, '');
+ 'nxghryy'.replace(re44, '');
+ 'nxghryy'.replace(re45, '');
+ 'nxghryy'.replace(re46, '');
+ 'nxghryy'.replace(re47, '');
+ 'nxghryy'.replace(re48, '');
+ str85.replace(re40, '');
+ str85.replace(re41, '');
+ str85.replace(re42, '');
+ str85.replace(re43, '');
+ str85.replace(re44, '');
+ str85.replace(re45, '');
+ str85.replace(re46, '');
+ str85.replace(re47, '');
+ str85.replace(re48, '');
+ 'pngrtbel'.replace(re29, '');
+ 'pngrtbel'.replace(re30, '');
+ 'pybfr'.replace(re39, '');
+ 'qvi'.replace(re39, '');
+ str86.replace(re68, '');
+ str86.replace(re18, '');
+ 'qg'.replace(re39, '');
+ 'qg'.replace(re68, '');
+ 'qg'.replace(re18, '');
+ 'rzorq'.replace(re39, '');
+ 'rzorq'.replace(re68, '');
+ 'rzorq'.replace(re18, '');
+ 'svryqOga'.replace(re39, '');
+ 'svryqOgaPnapry'.replace(re39, '');
+ 'svz_zlfcnpr_nccf-pnainf,svz_zlfcnpr_havgrq-fgngrf'.split(re20);
+ 'svanamra'.replace(re40, '');
+ 'svanamra'.replace(re41, '');
+ 'svanamra'.replace(re42, '');
+ 'svanamra'.replace(re43, '');
+ 'svanamra'.replace(re44, '');
+ 'svanamra'.replace(re45, '');
+ 'svanamra'.replace(re46, '');
+ 'svanamra'.replace(re47, '');
+ 'svanamra'.replace(re48, '');
+ 'sbphf'.split(re70);
+ 'sbphf.gno sbphfva.gno'.split(re70);
+ 'sbphfva'.split(re70);
+ 'sbez'.replace(re39, '');
+ 'sbez.nwnk'.replace(re68, '');
+ 'sbez.nwnk'.replace(re18, '');
+ 'tnzrf'.replace(re40, '');
+ 'tnzrf'.replace(re41, '');
+ 'tnzrf'.replace(re42, '');
+ 'tnzrf'.replace(re43, '');
+ 'tnzrf'.replace(re44, '');
+ 'tnzrf'.replace(re45, '');
+ 'tnzrf'.replace(re46, '');
+ 'tnzrf'.replace(re47, '');
+ 'tnzrf'.replace(re48, '');
+ 'ubzrcntr'.replace(re30, '');
+ 'ubebfxbc'.replace(re40, '');
+ 'ubebfxbc'.replace(re41, '');
+ 'ubebfxbc'.replace(re42, '');
+ 'ubebfxbc'.replace(re43, '');
+ 'ubebfxbc'.replace(re44, '');
+ 'ubebfxbc'.replace(re45, '');
+ 'ubebfxbc'.replace(re46, '');
+ 'ubebfxbc'.replace(re47, '');
+ 'ubebfxbc'.replace(re48, '');
+ 'uc_cebzbobk_ugzy%2Puc_cebzbobk_vzt'.replace(re30, '');
+ 'uc_erpgnatyr'.replace(re30, '');
+ str87.replace(re33, '');
+ str88.replace(re33, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf${5}'.replace(re72, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/qlaYvo.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/qlaYvo.wf${5}'.replace(re72, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/rssrpgYvo.wf${4}${5}'.replace(re71, '');
+ 'uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/rssrpgYvo.wf${5}'.replace(re72, '');
+ str89.replace(re73, '');
+ 'uggc://zfacbegny.112.2b7.arg/o/ff/zfacbegnyubzr/1/U.7-cqi-2/f55023338617756?[NDO]&{1}&{2}&[NDR]'.replace(re69, '');
+ str6.replace(re23, '');
+ 'xvab'.replace(re40, '');
+ 'xvab'.replace(re41, '');
+ 'xvab'.replace(re42, '');
+ 'xvab'.replace(re43, '');
+ 'xvab'.replace(re44, '');
+ 'xvab'.replace(re45, '');
+ 'xvab'.replace(re46, '');
+ 'xvab'.replace(re47, '');
+ 'xvab'.replace(re48, '');
+ 'ybnq'.split(re70);
+ 'zrqvnzbqgno lhv-anifrg lhv-anifrg-gbc'.replace(re18, '');
+ 'zrgn'.replace(re39, '');
+ str90.replace(re68, '');
+ str90.replace(re18, '');
+ 'zbhfrzbir'.split(re70);
+ 'zbhfrzbir.gno'.split(re70);
+ str63.replace(/^.*jroxvg\/(\d+(\.\d+)?).*$/, '');
+ 'zhfvx'.replace(re40, '');
+ 'zhfvx'.replace(re41, '');
+ 'zhfvx'.replace(re42, '');
+ 'zhfvx'.replace(re43, '');
+ 'zhfvx'.replace(re44, '');
+ 'zhfvx'.replace(re45, '');
+ 'zhfvx'.replace(re46, '');
+ 'zhfvx'.replace(re47, '');
+ 'zhfvx'.replace(re48, '');
+ 'zlfcnpr_nccf_pnainf'.replace(re52, '');
+ str91.replace(re40, '');
+ str91.replace(re41, '');
+ str91.replace(re42, '');
+ str91.replace(re43, '');
+ str91.replace(re44, '');
+ str91.replace(re45, '');
+ str91.replace(re46, '');
+ str91.replace(re47, '');
+ str91.replace(re48, '');
+ 'anzr'.replace(re39, '');
+ str92.replace(/\b\w+\b/g, '');
+ 'bow-nppbeqvba'.replace(re39, '');
+ 'bowrpg'.replace(re39, '');
+ 'bowrpg'.replace(re68, '');
+ 'bowrpg'.replace(re18, '');
+ 'cnenzf%2Rfglyrf'.replace(re29, '');
+ 'cnenzf%2Rfglyrf'.replace(re30, '');
+ 'cbchc'.replace(re30, '');
+ 'ebhgr'.replace(re40, '');
+ 'ebhgr'.replace(re41, '');
+ 'ebhgr'.replace(re42, '');
+ 'ebhgr'.replace(re43, '');
+ 'ebhgr'.replace(re44, '');
+ 'ebhgr'.replace(re45, '');
+ 'ebhgr'.replace(re46, '');
+ 'ebhgr'.replace(re47, '');
+ 'ebhgr'.replace(re48, '');
+ 'freivprobk_uc'.replace(re30, '');
+ 'fubccvatobk_uc'.replace(re30, '');
+ 'fubhgobk'.replace(re39, '');
+ 'fcbeg'.replace(re40, '');
+ 'fcbeg'.replace(re41, '');
+ 'fcbeg'.replace(re42, '');
+ 'fcbeg'.replace(re43, '');
+ 'fcbeg'.replace(re44, '');
+ 'fcbeg'.replace(re45, '');
+ 'fcbeg'.replace(re46, '');
+ 'fcbeg'.replace(re47, '');
+ 'fcbeg'.replace(re48, '');
+ 'gbhe'.replace(re40, '');
+ 'gbhe'.replace(re41, '');
+ 'gbhe'.replace(re42, '');
+ 'gbhe'.replace(re43, '');
+ 'gbhe'.replace(re44, '');
+ 'gbhe'.replace(re45, '');
+ 'gbhe'.replace(re46, '');
+ 'gbhe'.replace(re47, '');
+ 'gbhe'.replace(re48, '');
+ 'gi-fcbg'.replace(re40, '');
+ 'gi-fcbg'.replace(re41, '');
+ 'gi-fcbg'.replace(re42, '');
+ 'gi-fcbg'.replace(re43, '');
+ 'gi-fcbg'.replace(re44, '');
+ 'gi-fcbg'.replace(re45, '');
+ 'gi-fcbg'.replace(re46, '');
+ 'gi-fcbg'.replace(re47, '');
+ 'gi-fcbg'.replace(re48, '');
+ 'glcr'.replace(re39, '');
+ 'haqrsvarq'.replace(/\//g, '');
+ str93.replace(re40, '');
+ str93.replace(re41, '');
+ str93.replace(re42, '');
+ str93.replace(re43, '');
+ str93.replace(re44, '');
+ str93.replace(re45, '');
+ str93.replace(re46, '');
+ str93.replace(re47, '');
+ str93.replace(re48, '');
+ 'ivqrb'.replace(re40, '');
+ 'ivqrb'.replace(re41, '');
+ 'ivqrb'.replace(re42, '');
+ 'ivqrb'.replace(re43, '');
+ 'ivqrb'.replace(re44, '');
+ 'ivqrb'.replace(re45, '');
+ 'ivqrb'.replace(re46, '');
+ 'ivqrb'.replace(re47, '');
+ 'ivqrb'.replace(re48, '');
+ 'ivfvgf=1'.split(re86);
+ 'jrggre'.replace(re40, '');
+ 'jrggre'.replace(re41, '');
+ 'jrggre'.replace(re42, '');
+ 'jrggre'.replace(re43, '');
+ 'jrggre'.replace(re44, '');
+ 'jrggre'.replace(re45, '');
+ 'jrggre'.replace(re46, '');
+ 'jrggre'.replace(re47, '');
+ 'jrggre'.replace(re48, '');
+ /#[a-z0-9]+$/i.exec('uggc://jjj.fpuhryreim.arg/Qrsnhyg');
+ re66.exec('fryrpgrq');
+ /(?:^|\s+)lhv-ani(?:\s+|$)/.exec('sff lhv-ani');
+ /(?:^|\s+)lhv-anifrg(?:\s+|$)/.exec('zrqvnzbqgno lhv-anifrg');
+ /(?:^|\s+)lhv-anifrg-gbc(?:\s+|$)/.exec('zrqvnzbqgno lhv-anifrg');
+ re91.exec('GnoThvq');
+ re91.exec('thvq');
+ /(pbzcngvoyr|jroxvg)/.exec(str63);
+ /.+(?:ei|vg|en|vr)[\/: ]([\d.]+)/.exec(str63);
+ re8.exec('144631658.0.10.1231365869');
+ re8.exec('144631658.0.10.1231367054');
+ re8.exec('144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('144631658.1670816052019209000.1231365869.1231365869.1231365869.1');
+ re8.exec('144631658.1796080716621419500.1231367054.1231367054.1231367054.1');
+ re8.exec(str94);
+ re8.exec(str95);
+ re8.exec(str96);
+ re8.exec(str97);
+ re8.exec('__hgzn=144631658.1670816052019209000.1231365869.1231365869.1231365869.1');
+ re8.exec('__hgzn=144631658.1796080716621419500.1231367054.1231367054.1231367054.1');
+ re8.exec('__hgzo=144631658.0.10.1231365869');
+ re8.exec('__hgzo=144631658.0.10.1231367054');
+ re8.exec('__hgzm=144631658.1231365869.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re8.exec('__hgzm=144631658.1231367054.1.1.hgzpfe=(qverpg)|hgzppa=(qverpg)|hgzpzq=(abar)');
+ re34.exec(str78);
+ re34.exec(str79);
+ re34.exec(str81);
+ re74.exec(str77);
+ re74.exec('*');
+ re74.exec(str82);
+ re74.exec(str83);
+ re74.exec(str86);
+ re74.exec('rzorq');
+ re74.exec('sbez.nwnk');
+ re74.exec(str90);
+ re74.exec('bowrpg');
+ /\/onfr.wf(\?.+)?$/.exec('/uggc://wf.hv-cbegny.qr/tzk/ubzr/wf/20080602/onfr.wf');
+ re28.exec('uvag ynfgUvag ynfg');
+ re75.exec('');
+ re76.exec('');
+ re77.exec('');
+ re78.exec('');
+ re80.exec(str77);
+ re80.exec('*');
+ re80.exec('.pybfr');
+ re80.exec(str82);
+ re80.exec(str83);
+ re80.exec(str84);
+ re80.exec(str86);
+ re80.exec('qg');
+ re80.exec('rzorq');
+ re80.exec('sbez.nwnk');
+ re80.exec(str90);
+ re80.exec('bowrpg');
+ re61.exec('qlaYvo.wf');
+ re61.exec('rssrpgYvo.wf');
+ re61.exec('uggc://jjj.tzk.arg/qr/?fgnghf=uvajrvf');
+ re92.exec(' .pybfr');
+ re92.exec(' n.svryqOgaPnapry');
+ re92.exec(' qg');
+ re92.exec(str48);
+ re92.exec('.nwnk');
+ re92.exec('.svryqOga,n.svryqOgaPnapry');
+ re92.exec('.svryqOgaPnapry');
+ re92.exec('.bow-nppbeqvba qg');
+ re68.exec(str77);
+ re68.exec('*');
+ re68.exec('.pybfr');
+ re68.exec(str82);
+ re68.exec(str83);
+ re68.exec(str84);
+ re68.exec(str86);
+ re68.exec('qg');
+ re68.exec('rzorq');
+ re68.exec('sbez.nwnk');
+ re68.exec(str90);
+ re68.exec('bowrpg');
+ re93.exec(' .pybfr');
+ re93.exec(' n.svryqOgaPnapry');
+ re93.exec(' qg');
+ re93.exec(str48);
+ re93.exec('.nwnk');
+ re93.exec('.svryqOga,n.svryqOgaPnapry');
+ re93.exec('.svryqOgaPnapry');
+ re93.exec('.bow-nppbeqvba qg');
+ re81.exec(str77);
+ re81.exec('*');
+ re81.exec(str48);
+ re81.exec('.pybfr');
+ re81.exec(str82);
+ re81.exec(str83);
+ re81.exec(str84);
+ re81.exec(str86);
+ re81.exec('qg');
+ re81.exec('rzorq');
+ re81.exec('sbez.nwnk');
+ re81.exec(str90);
+ re81.exec('bowrpg');
+ re94.exec(' .pybfr');
+ re94.exec(' n.svryqOgaPnapry');
+ re94.exec(' qg');
+ re94.exec(str48);
+ re94.exec('.nwnk');
+ re94.exec('.svryqOga,n.svryqOgaPnapry');
+ re94.exec('.svryqOgaPnapry');
+ re94.exec('.bow-nppbeqvba qg');
+ re94.exec('[anzr=nwnkHey]');
+ re94.exec(str82);
+ re31.exec('rf');
+ re31.exec('wn');
+ re82.exec(str77);
+ re82.exec('*');
+ re82.exec(str48);
+ re82.exec('.pybfr');
+ re82.exec(str82);
+ re82.exec(str83);
+ re82.exec(str84);
+ re82.exec(str86);
+ re82.exec('qg');
+ re82.exec('rzorq');
+ re82.exec('sbez.nwnk');
+ re82.exec(str90);
+ re82.exec('bowrpg');
+ re83.exec(str98);
+ re83.exec('shapgvba sbphf() { [angvir pbqr] }');
+ re62.exec('#Ybtva');
+ re62.exec('#Ybtva_cnffjbeq');
+ re62.exec(str77);
+ re62.exec('#fubhgobkWf');
+ re62.exec('#fubhgobkWfReebe');
+ re62.exec('#fubhgobkWfFhpprff');
+ re62.exec('*');
+ re62.exec(str82);
+ re62.exec(str83);
+ re62.exec(str86);
+ re62.exec('rzorq');
+ re62.exec('sbez.nwnk');
+ re62.exec(str90);
+ re62.exec('bowrpg');
+ re49.exec('pbagrag');
+ re24.exec(str6);
+ /xbadhrebe/.exec(str63);
+ /znp/.exec('jva32');
+ /zbmvyyn/.exec(str63);
+ /zfvr/.exec(str63);
+ /ag\s5\.1/.exec(str63);
+ /bcren/.exec(str63);
+ /fnsnev/.exec(str63);
+ /jva/.exec('jva32');
+ /jvaqbjf/.exec(str63);
+ }
+ }
+ for (var i = 0; i < 5; i++) {
+ runBlock0();
+ runBlock1();
+ runBlock2();
+ runBlock3();
+ runBlock4();
+ runBlock5();
+ runBlock6();
+ runBlock7();
+ runBlock8();
+ runBlock9();
+ runBlock10();
+ runBlock11();
+ }
+}
+
+for (var i = 0; i < 3; ++i)
+ runRegExpBenchmark();
diff --git a/SunSpider/tests/v8-v6/v8-richards.js b/SunSpider/tests/v8-v6/v8-richards.js
new file mode 100644
index 0000000..b1a50ea
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-richards.js
@@ -0,0 +1,537 @@
+// Copyright 2006-2008 the V8 project authors. 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 is a JavaScript implementation of the Richards
+// benchmark from:
+//
+// http://www.cl.cam.ac.uk/~mr10/Bench.html
+//
+// The benchmark was originally implemented in BCPL by
+// Martin Richards.
+
+
+/**
+ * The Richards benchmark simulates the task dispatcher of an
+ * operating system.
+ **/
+function runRichards() {
+ var scheduler = new Scheduler();
+ scheduler.addIdleTask(ID_IDLE, 0, null, COUNT);
+
+ var queue = new Packet(null, ID_WORKER, KIND_WORK);
+ queue = new Packet(queue, ID_WORKER, KIND_WORK);
+ scheduler.addWorkerTask(ID_WORKER, 1000, queue);
+
+ queue = new Packet(null, ID_DEVICE_A, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_A, KIND_DEVICE);
+ scheduler.addHandlerTask(ID_HANDLER_A, 2000, queue);
+
+ queue = new Packet(null, ID_DEVICE_B, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE);
+ queue = new Packet(queue, ID_DEVICE_B, KIND_DEVICE);
+ scheduler.addHandlerTask(ID_HANDLER_B, 3000, queue);
+
+ scheduler.addDeviceTask(ID_DEVICE_A, 4000, null);
+
+ scheduler.addDeviceTask(ID_DEVICE_B, 5000, null);
+
+ scheduler.schedule();
+
+ if (scheduler.queueCount != EXPECTED_QUEUE_COUNT ||
+ scheduler.holdCount != EXPECTED_HOLD_COUNT) {
+ var msg =
+ "Error during execution: queueCount = " + scheduler.queueCount +
+ ", holdCount = " + scheduler.holdCount + ".";
+ throw new Error(msg);
+ }
+}
+
+var COUNT = 1000;
+
+/**
+ * These two constants specify how many times a packet is queued and
+ * how many times a task is put on hold in a correct run of richards.
+ * They don't have any meaning a such but are characteristic of a
+ * correct run so if the actual queue or hold count is different from
+ * the expected there must be a bug in the implementation.
+ **/
+var EXPECTED_QUEUE_COUNT = 2322;
+var EXPECTED_HOLD_COUNT = 928;
+
+
+/**
+ * A scheduler can be used to schedule a set of tasks based on their relative
+ * priorities. Scheduling is done by maintaining a list of task control blocks
+ * which holds tasks and the data queue they are processing.
+ * @constructor
+ */
+function Scheduler() {
+ this.queueCount = 0;
+ this.holdCount = 0;
+ this.blocks = new Array(NUMBER_OF_IDS);
+ this.list = null;
+ this.currentTcb = null;
+ this.currentId = null;
+}
+
+var ID_IDLE = 0;
+var ID_WORKER = 1;
+var ID_HANDLER_A = 2;
+var ID_HANDLER_B = 3;
+var ID_DEVICE_A = 4;
+var ID_DEVICE_B = 5;
+var NUMBER_OF_IDS = 6;
+
+var KIND_DEVICE = 0;
+var KIND_WORK = 1;
+
+/**
+ * Add an idle task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ * @param {int} count the number of times to schedule the task
+ */
+Scheduler.prototype.addIdleTask = function (id, priority, queue, count) {
+ this.addRunningTask(id, priority, queue, new IdleTask(this, 1, count));
+};
+
+/**
+ * Add a work task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ */
+Scheduler.prototype.addWorkerTask = function (id, priority, queue) {
+ this.addTask(id, priority, queue, new WorkerTask(this, ID_HANDLER_A, 0));
+};
+
+/**
+ * Add a handler task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ */
+Scheduler.prototype.addHandlerTask = function (id, priority, queue) {
+ this.addTask(id, priority, queue, new HandlerTask(this));
+};
+
+/**
+ * Add a handler task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ */
+Scheduler.prototype.addDeviceTask = function (id, priority, queue) {
+ this.addTask(id, priority, queue, new DeviceTask(this))
+};
+
+/**
+ * Add the specified task and mark it as running.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ * @param {Task} task the task to add
+ */
+Scheduler.prototype.addRunningTask = function (id, priority, queue, task) {
+ this.addTask(id, priority, queue, task);
+ this.currentTcb.setRunning();
+};
+
+/**
+ * Add the specified task to this scheduler.
+ * @param {int} id the identity of the task
+ * @param {int} priority the task's priority
+ * @param {Packet} queue the queue of work to be processed by the task
+ * @param {Task} task the task to add
+ */
+Scheduler.prototype.addTask = function (id, priority, queue, task) {
+ this.currentTcb = new TaskControlBlock(this.list, id, priority, queue, task);
+ this.list = this.currentTcb;
+ this.blocks[id] = this.currentTcb;
+};
+
+/**
+ * Execute the tasks managed by this scheduler.
+ */
+Scheduler.prototype.schedule = function () {
+ this.currentTcb = this.list;
+ while (this.currentTcb != null) {
+ if (this.currentTcb.isHeldOrSuspended()) {
+ this.currentTcb = this.currentTcb.link;
+ } else {
+ this.currentId = this.currentTcb.id;
+ this.currentTcb = this.currentTcb.run();
+ }
+ }
+};
+
+/**
+ * Release a task that is currently blocked and return the next block to run.
+ * @param {int} id the id of the task to suspend
+ */
+Scheduler.prototype.release = function (id) {
+ var tcb = this.blocks[id];
+ if (tcb == null) return tcb;
+ tcb.markAsNotHeld();
+ if (tcb.priority > this.currentTcb.priority) {
+ return tcb;
+ } else {
+ return this.currentTcb;
+ }
+};
+
+/**
+ * Block the currently executing task and return the next task control block
+ * to run. The blocked task will not be made runnable until it is explicitly
+ * released, even if new work is added to it.
+ */
+Scheduler.prototype.holdCurrent = function () {
+ this.holdCount++;
+ this.currentTcb.markAsHeld();
+ return this.currentTcb.link;
+};
+
+/**
+ * Suspend the currently executing task and return the next task control block
+ * to run. If new work is added to the suspended task it will be made runnable.
+ */
+Scheduler.prototype.suspendCurrent = function () {
+ this.currentTcb.markAsSuspended();
+ return this.currentTcb;
+};
+
+/**
+ * Add the specified packet to the end of the worklist used by the task
+ * associated with the packet and make the task runnable if it is currently
+ * suspended.
+ * @param {Packet} packet the packet to add
+ */
+Scheduler.prototype.queue = function (packet) {
+ var t = this.blocks[packet.id];
+ if (t == null) return t;
+ this.queueCount++;
+ packet.link = null;
+ packet.id = this.currentId;
+ return t.checkPriorityAdd(this.currentTcb, packet);
+};
+
+/**
+ * A task control block manages a task and the queue of work packages associated
+ * with it.
+ * @param {TaskControlBlock} link the preceding block in the linked block list
+ * @param {int} id the id of this block
+ * @param {int} priority the priority of this block
+ * @param {Packet} queue the queue of packages to be processed by the task
+ * @param {Task} task the task
+ * @constructor
+ */
+function TaskControlBlock(link, id, priority, queue, task) {
+ this.link = link;
+ this.id = id;
+ this.priority = priority;
+ this.queue = queue;
+ this.task = task;
+ if (queue == null) {
+ this.state = STATE_SUSPENDED;
+ } else {
+ this.state = STATE_SUSPENDED_RUNNABLE;
+ }
+}
+
+/**
+ * The task is running and is currently scheduled.
+ */
+var STATE_RUNNING = 0;
+
+/**
+ * The task has packets left to process.
+ */
+var STATE_RUNNABLE = 1;
+
+/**
+ * The task is not currently running. The task is not blocked as such and may
+* be started by the scheduler.
+ */
+var STATE_SUSPENDED = 2;
+
+/**
+ * The task is blocked and cannot be run until it is explicitly released.
+ */
+var STATE_HELD = 4;
+
+var STATE_SUSPENDED_RUNNABLE = STATE_SUSPENDED | STATE_RUNNABLE;
+var STATE_NOT_HELD = ~STATE_HELD;
+
+TaskControlBlock.prototype.setRunning = function () {
+ this.state = STATE_RUNNING;
+};
+
+TaskControlBlock.prototype.markAsNotHeld = function () {
+ this.state = this.state & STATE_NOT_HELD;
+};
+
+TaskControlBlock.prototype.markAsHeld = function () {
+ this.state = this.state | STATE_HELD;
+};
+
+TaskControlBlock.prototype.isHeldOrSuspended = function () {
+ return (this.state & STATE_HELD) != 0 || (this.state == STATE_SUSPENDED);
+};
+
+TaskControlBlock.prototype.markAsSuspended = function () {
+ this.state = this.state | STATE_SUSPENDED;
+};
+
+TaskControlBlock.prototype.markAsRunnable = function () {
+ this.state = this.state | STATE_RUNNABLE;
+};
+
+/**
+ * Runs this task, if it is ready to be run, and returns the next task to run.
+ */
+TaskControlBlock.prototype.run = function () {
+ var packet;
+ if (this.state == STATE_SUSPENDED_RUNNABLE) {
+ packet = this.queue;
+ this.queue = packet.link;
+ if (this.queue == null) {
+ this.state = STATE_RUNNING;
+ } else {
+ this.state = STATE_RUNNABLE;
+ }
+ } else {
+ packet = null;
+ }
+ return this.task.run(packet);
+};
+
+/**
+ * Adds a packet to the worklist of this block's task, marks this as runnable if
+ * necessary, and returns the next runnable object to run (the one
+ * with the highest priority).
+ */
+TaskControlBlock.prototype.checkPriorityAdd = function (task, packet) {
+ if (this.queue == null) {
+ this.queue = packet;
+ this.markAsRunnable();
+ if (this.priority > task.priority) return this;
+ } else {
+ this.queue = packet.addTo(this.queue);
+ }
+ return task;
+};
+
+TaskControlBlock.prototype.toString = function () {
+ return "tcb { " + this.task + "@" + this.state + " }";
+};
+
+/**
+ * An idle task doesn't do any work itself but cycles control between the two
+ * device tasks.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @param {int} v1 a seed value that controls how the device tasks are scheduled
+ * @param {int} count the number of times this task should be scheduled
+ * @constructor
+ */
+function IdleTask(scheduler, v1, count) {
+ this.scheduler = scheduler;
+ this.v1 = v1;
+ this.count = count;
+}
+
+IdleTask.prototype.run = function (packet) {
+ this.count--;
+ if (this.count == 0) return this.scheduler.holdCurrent();
+ if ((this.v1 & 1) == 0) {
+ this.v1 = this.v1 >> 1;
+ return this.scheduler.release(ID_DEVICE_A);
+ } else {
+ this.v1 = (this.v1 >> 1) ^ 0xD008;
+ return this.scheduler.release(ID_DEVICE_B);
+ }
+};
+
+IdleTask.prototype.toString = function () {
+ return "IdleTask"
+};
+
+/**
+ * A task that suspends itself after each time it has been run to simulate
+ * waiting for data from an external device.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @constructor
+ */
+function DeviceTask(scheduler) {
+ this.scheduler = scheduler;
+ this.v1 = null;
+}
+
+DeviceTask.prototype.run = function (packet) {
+ if (packet == null) {
+ if (this.v1 == null) return this.scheduler.suspendCurrent();
+ var v = this.v1;
+ this.v1 = null;
+ return this.scheduler.queue(v);
+ } else {
+ this.v1 = packet;
+ return this.scheduler.holdCurrent();
+ }
+};
+
+DeviceTask.prototype.toString = function () {
+ return "DeviceTask";
+};
+
+/**
+ * A task that manipulates work packets.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @param {int} v1 a seed used to specify how work packets are manipulated
+ * @param {int} v2 another seed used to specify how work packets are manipulated
+ * @constructor
+ */
+function WorkerTask(scheduler, v1, v2) {
+ this.scheduler = scheduler;
+ this.v1 = v1;
+ this.v2 = v2;
+}
+
+WorkerTask.prototype.run = function (packet) {
+ if (packet == null) {
+ return this.scheduler.suspendCurrent();
+ } else {
+ if (this.v1 == ID_HANDLER_A) {
+ this.v1 = ID_HANDLER_B;
+ } else {
+ this.v1 = ID_HANDLER_A;
+ }
+ packet.id = this.v1;
+ packet.a1 = 0;
+ for (var i = 0; i < DATA_SIZE; i++) {
+ this.v2++;
+ if (this.v2 > 26) this.v2 = 1;
+ packet.a2[i] = this.v2;
+ }
+ return this.scheduler.queue(packet);
+ }
+};
+
+WorkerTask.prototype.toString = function () {
+ return "WorkerTask";
+};
+
+/**
+ * A task that manipulates work packets and then suspends itself.
+ * @param {Scheduler} scheduler the scheduler that manages this task
+ * @constructor
+ */
+function HandlerTask(scheduler) {
+ this.scheduler = scheduler;
+ this.v1 = null;
+ this.v2 = null;
+}
+
+HandlerTask.prototype.run = function (packet) {
+ if (packet != null) {
+ if (packet.kind == KIND_WORK) {
+ this.v1 = packet.addTo(this.v1);
+ } else {
+ this.v2 = packet.addTo(this.v2);
+ }
+ }
+ if (this.v1 != null) {
+ var count = this.v1.a1;
+ var v;
+ if (count < DATA_SIZE) {
+ if (this.v2 != null) {
+ v = this.v2;
+ this.v2 = this.v2.link;
+ v.a1 = this.v1.a2[count];
+ this.v1.a1 = count + 1;
+ return this.scheduler.queue(v);
+ }
+ } else {
+ v = this.v1;
+ this.v1 = this.v1.link;
+ return this.scheduler.queue(v);
+ }
+ }
+ return this.scheduler.suspendCurrent();
+};
+
+HandlerTask.prototype.toString = function () {
+ return "HandlerTask";
+};
+
+/* --- *
+ * P a c k e t
+ * --- */
+
+var DATA_SIZE = 4;
+
+/**
+ * A simple package of data that is manipulated by the tasks. The exact layout
+ * of the payload data carried by a packet is not importaint, and neither is the
+ * nature of the work performed on packets by the tasks.
+ *
+ * Besides carrying data, packets form linked lists and are hence used both as
+ * data and worklists.
+ * @param {Packet} link the tail of the linked list of packets
+ * @param {int} id an ID for this packet
+ * @param {int} kind the type of this packet
+ * @constructor
+ */
+function Packet(link, id, kind) {
+ this.link = link;
+ this.id = id;
+ this.kind = kind;
+ this.a1 = 0;
+ this.a2 = new Array(DATA_SIZE);
+}
+
+/**
+ * Add this packet to the end of a worklist, and return the worklist.
+ * @param {Packet} queue the worklist to add this packet to
+ */
+Packet.prototype.addTo = function (queue) {
+ this.link = null;
+ if (queue == null) return this;
+ var peek, next = queue;
+ while ((peek = next.link) != null)
+ next = peek;
+ next.link = this;
+ return queue;
+};
+
+Packet.prototype.toString = function () {
+ return "Packet";
+};
+
+for (var i = 0; i < 350; ++i)
+ runRichards();
diff --git a/SunSpider/tests/v8-v6/v8-splay.js b/SunSpider/tests/v8-v6/v8-splay.js
new file mode 100644
index 0000000..e257353
--- /dev/null
+++ b/SunSpider/tests/v8-v6/v8-splay.js
@@ -0,0 +1,393 @@
+// Copyright 2009 the V8 project authors. 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 benchmark is based on a JavaScript log processing module used
+// by the V8 profiler to generate execution time profiles for runs of
+// JavaScript applications, and it effectively measures how fast the
+// JavaScript engine is at allocating nodes and reclaiming the memory
+// used for old nodes. Because of the way splay trees work, the engine
+// also has to deal with a lot of changes to the large tree object
+// graph.
+
+// Configuration.
+var kSplayTreeSize = 8000;
+var kSplayTreeModifications = 80;
+var kSplayTreePayloadDepth = 5;
+
+var splayTree = null;
+
+
+function GeneratePayloadTree(depth, tag) {
+ if (depth == 0) {
+ return {
+ array : [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
+ string : 'String for key ' + tag + ' in leaf node'
+ };
+ } else {
+ return {
+ left: GeneratePayloadTree(depth - 1, tag),
+ right: GeneratePayloadTree(depth - 1, tag)
+ };
+ }
+}
+
+
+function GenerateKey() {
+ // The benchmark framework guarantees that Math.random is
+ // deterministic; see base.js.
+ return Math.random();
+}
+
+
+function InsertNewNode() {
+ // Insert new node with a unique key.
+ var key;
+ do {
+ key = GenerateKey();
+ } while (splayTree.find(key) != null);
+ var payload = GeneratePayloadTree(kSplayTreePayloadDepth, String(key));
+ splayTree.insert(key, payload);
+ return key;
+}
+
+
+
+function SplaySetup() {
+ splayTree = new SplayTree();
+ for (var i = 0; i < kSplayTreeSize; i++) InsertNewNode();
+}
+
+
+function SplayTearDown() {
+ // Allow the garbage collector to reclaim the memory
+ // used by the splay tree no matter how we exit the
+ // tear down function.
+ var keys = splayTree.exportKeys();
+ splayTree = null;
+
+ // Verify that the splay tree has the right size.
+ var length = keys.length;
+ if (length != kSplayTreeSize) {
+ throw new Error("Splay tree has wrong size");
+ }
+
+ // Verify that the splay tree has sorted, unique keys.
+ for (var i = 0; i < length - 1; i++) {
+ if (keys[i] >= keys[i + 1]) {
+ throw new Error("Splay tree not sorted");
+ }
+ }
+}
+
+
+function SplayRun() {
+ // Replace a few nodes in the splay tree.
+ for (var i = 0; i < kSplayTreeModifications; i++) {
+ var key = InsertNewNode();
+ var greatest = splayTree.findGreatestLessThan(key);
+ if (greatest == null) splayTree.remove(key);
+ else splayTree.remove(greatest.key);
+ }
+}
+
+
+/**
+ * Constructs a Splay tree. A splay tree is a self-balancing binary
+ * search tree with the additional property that recently accessed
+ * elements are quick to access again. It performs basic operations
+ * such as insertion, look-up and removal in O(log(n)) amortized time.
+ *
+ * @constructor
+ */
+function SplayTree() {
+};
+
+
+/**
+ * Pointer to the root node of the tree.
+ *
+ * @type {SplayTree.Node}
+ * @private
+ */
+SplayTree.prototype.root_ = null;
+
+
+/**
+ * @return {boolean} Whether the tree is empty.
+ */
+SplayTree.prototype.isEmpty = function() {
+ return !this.root_;
+};
+
+
+/**
+ * Inserts a node into the tree with the specified key and value if
+ * the tree does not already contain a node with the specified key. If
+ * the value is inserted, it becomes the root of the tree.
+ *
+ * @param {number} key Key to insert into the tree.
+ * @param {*} value Value to insert into the tree.
+ */
+SplayTree.prototype.insert = function(key, value) {
+ if (this.isEmpty()) {
+ this.root_ = new SplayTree.Node(key, value);
+ return;
+ }
+ // Splay on the key to move the last node on the search path for
+ // the key to the root of the tree.
+ this.splay_(key);
+ if (this.root_.key == key) {
+ return;
+ }
+ var node = new SplayTree.Node(key, value);
+ if (key > this.root_.key) {
+ node.left = this.root_;
+ node.right = this.root_.right;
+ this.root_.right = null;
+ } else {
+ node.right = this.root_;
+ node.left = this.root_.left;
+ this.root_.left = null;
+ }
+ this.root_ = node;
+};
+
+
+/**
+ * Removes a node with the specified key from the tree if the tree
+ * contains a node with this key. The removed node is returned. If the
+ * key is not found, an exception is thrown.
+ *
+ * @param {number} key Key to find and remove from the tree.
+ * @return {SplayTree.Node} The removed node.
+ */
+SplayTree.prototype.remove = function(key) {
+ if (this.isEmpty()) {
+ throw Error('Key not found: ' + key);
+ }
+ this.splay_(key);
+ if (this.root_.key != key) {
+ throw Error('Key not found: ' + key);
+ }
+ var removed = this.root_;
+ if (!this.root_.left) {
+ this.root_ = this.root_.right;
+ } else {
+ var right = this.root_.right;
+ this.root_ = this.root_.left;
+ // Splay to make sure that the new root has an empty right child.
+ this.splay_(key);
+ // Insert the original right child as the right child of the new
+ // root.
+ this.root_.right = right;
+ }
+ return removed;
+};
+
+
+/**
+ * Returns the node having the specified key or null if the tree doesn't contain
+ * a node with the specified key.
+ *
+ * @param {number} key Key to find in the tree.
+ * @return {SplayTree.Node} Node having the specified key.
+ */
+SplayTree.prototype.find = function(key) {
+ if (this.isEmpty()) {
+ return null;
+ }
+ this.splay_(key);
+ return this.root_.key == key ? this.root_ : null;
+};
+
+
+/**
+ * @return {SplayTree.Node} Node having the maximum key value.
+ */
+SplayTree.prototype.findMax = function(opt_startNode) {
+ if (this.isEmpty()) {
+ return null;
+ }
+ var current = opt_startNode || this.root_;
+ while (current.right) {
+ current = current.right;
+ }
+ return current;
+};
+
+
+/**
+ * @return {SplayTree.Node} Node having the maximum key value that
+ * is less than the specified key value.
+ */
+SplayTree.prototype.findGreatestLessThan = function(key) {
+ if (this.isEmpty()) {
+ return null;
+ }
+ // Splay on the key to move the node with the given key or the last
+ // node on the search path to the top of the tree.
+ this.splay_(key);
+ // Now the result is either the root node or the greatest node in
+ // the left subtree.
+ if (this.root_.key < key) {
+ return this.root_;
+ } else if (this.root_.left) {
+ return this.findMax(this.root_.left);
+ } else {
+ return null;
+ }
+};
+
+
+/**
+ * @return {Array<*>} An array containing all the keys of tree's nodes.
+ */
+SplayTree.prototype.exportKeys = function() {
+ var result = [];
+ if (!this.isEmpty()) {
+ this.root_.traverse_(function(node) { result.push(node.key); });
+ }
+ return result;
+};
+
+
+/**
+ * Perform the splay operation for the given key. Moves the node with
+ * the given key to the top of the tree. If no node has the given
+ * key, the last node on the search path is moved to the top of the
+ * tree. This is the simplified top-down splaying algorithm from:
+ * "Self-adjusting Binary Search Trees" by Sleator and Tarjan
+ *
+ * @param {number} key Key to splay the tree on.
+ * @private
+ */
+SplayTree.prototype.splay_ = function(key) {
+ if (this.isEmpty()) {
+ return;
+ }
+ // Create a dummy node. The use of the dummy node is a bit
+ // counter-intuitive: The right child of the dummy node will hold
+ // the L tree of the algorithm. The left child of the dummy node
+ // will hold the R tree of the algorithm. Using a dummy node, left
+ // and right will always be nodes and we avoid special cases.
+ var dummy, left, right;
+ dummy = left = right = new SplayTree.Node(null, null);
+ var current = this.root_;
+ while (true) {
+ if (key < current.key) {
+ if (!current.left) {
+ break;
+ }
+ if (key < current.left.key) {
+ // Rotate right.
+ var tmp = current.left;
+ current.left = tmp.right;
+ tmp.right = current;
+ current = tmp;
+ if (!current.left) {
+ break;
+ }
+ }
+ // Link right.
+ right.left = current;
+ right = current;
+ current = current.left;
+ } else if (key > current.key) {
+ if (!current.right) {
+ break;
+ }
+ if (key > current.right.key) {
+ // Rotate left.
+ var tmp = current.right;
+ current.right = tmp.left;
+ tmp.left = current;
+ current = tmp;
+ if (!current.right) {
+ break;
+ }
+ }
+ // Link left.
+ left.right = current;
+ left = current;
+ current = current.right;
+ } else {
+ break;
+ }
+ }
+ // Assemble.
+ left.right = current.left;
+ right.left = current.right;
+ current.left = dummy.right;
+ current.right = dummy.left;
+ this.root_ = current;
+};
+
+
+/**
+ * Constructs a Splay tree node.
+ *
+ * @param {number} key Key.
+ * @param {*} value Value.
+ */
+SplayTree.Node = function(key, value) {
+ this.key = key;
+ this.value = value;
+};
+
+
+/**
+ * @type {SplayTree.Node}
+ */
+SplayTree.Node.prototype.left = null;
+
+
+/**
+ * @type {SplayTree.Node}
+ */
+SplayTree.Node.prototype.right = null;
+
+
+/**
+ * Performs an ordered traversal of the subtree starting at
+ * this SplayTree.Node.
+ *
+ * @param {function(SplayTree.Node)} f Visitor function.
+ * @private
+ */
+SplayTree.Node.prototype.traverse_ = function(f) {
+ var current = this;
+ while (current) {
+ var left = current.left;
+ if (left) left.traverse_(f);
+ f(current);
+ current = current.right;
+ }
+};
+
+SplaySetup();
+SplayRun();
+SplayTearDown();
diff --git a/WebCore/Android.derived.mk b/WebCore/Android.derived.mk
index 8fb10b6..de36334 100644
--- a/WebCore/Android.derived.mk
+++ b/WebCore/Android.derived.mk
@@ -67,6 +67,7 @@ $(GEN): $(LOCAL_PATH)/html/DocTypeStrings.gperf
$(intermediates)/html/HTMLDocument.o : $(GEN)
+<<<<<<< HEAD
# HTML entity table
GEN := $(intermediates)/html/HTMLEntityTable.cpp
@@ -82,6 +83,8 @@ $(GEN): $(LOCAL_PATH)/html/HTMLEntityNames.json
LOCAL_GENERATED_SOURCES += $(GEN)
+=======
+>>>>>>> webkit.org at r66666
# color names
GEN := $(intermediates)/platform/ColorData.cpp
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index b468d18..622318a 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -254,8 +254,18 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
editing/markup.cpp \
editing/visible_units.cpp \
\
+<<<<<<< HEAD
history/BackForwardController.cpp \
history/BackForwardListImpl.cpp \
+=======
+ fileapi/Blob.cpp \
+ fileapi/BlobURL.cpp \
+ fileapi/File.cpp \
+ fileapi/FileList.cpp \
+ fileapi/ThreadableBlobRegistry.cpp \
+ \
+ history/BackForwardList.cpp \
+>>>>>>> webkit.org at r66666
history/CachedFrame.cpp \
history/CachedPage.cpp \
history/HistoryItem.cpp \
@@ -264,12 +274,16 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
history/android/HistoryItemAndroid.cpp \
\
html/AsyncImageResizer.cpp \
+<<<<<<< HEAD
html/Blob.cpp \
html/BlobBuilder.cpp \
html/BlobURL.cpp \
+=======
+>>>>>>> webkit.org at r66666
html/CollectionCache.cpp \
- html/CSSPreloadScanner.cpp \
+ html/parser/CSSPreloadScanner.cpp \
html/DOMFormData.cpp \
+<<<<<<< HEAD
html/DateComponents.cpp \
html/File.cpp \
html/FileList.cpp \
@@ -283,29 +297,30 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
html/HTMLPreloadScanner.cpp \
html/HTMLScriptRunner.cpp \
html/HTMLTreeBuilder.cpp \
+=======
+ html/FormDataList.cpp \
+>>>>>>> webkit.org at r66666
html/HTMLAllCollection.cpp \
html/HTMLCollection.cpp \
- html/HTMLConstructionSite.cpp \
html/HTMLDataListElement.cpp \
html/HTMLDocument.cpp \
html/HTMLDocumentParser.cpp \
html/HTMLElementsAllInOne.cpp \
- html/HTMLElementStack.cpp \
- html/HTMLFormattingElementList.cpp \
html/HTMLFormCollection.cpp \
html/HTMLImageLoader.cpp \
html/HTMLNameCollection.cpp \
html/HTMLOptionsCollection.cpp \
html/HTMLParserErrorCodes.cpp \
- html/HTMLParserScheduler.cpp \
html/HTMLTableRowsCollection.cpp \
html/HTMLViewSourceDocument.cpp \
- html/HTMLViewSourceParser.cpp \
html/ImageData.cpp \
html/ImageResizerThread.cpp \
+<<<<<<< HEAD
html/LabelsNodeList.cpp \
html/StepRange.cpp \
html/ThreadableBlobRegistry.cpp \
+=======
+>>>>>>> webkit.org at r66666
html/TimeRanges.cpp \
html/ValidityState.cpp \
\
@@ -318,6 +333,18 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
html/canvas/CanvasStyle.cpp \
html/canvas/Float32Array.cpp \
\
+ html/parser/HTMLConstructionSite.cpp \
+ html/parser/HTMLDocumentParser.cpp \
+ html/parser/HTMLElementStack.cpp \
+ html/parser/HTMLEntityParser.cpp \
+ html/parser/HTMLFormattingElementList.cpp \
+ html/parser/HTMLParserScheduler.cpp \
+ html/parser/HTMLPreloadScanner.cpp \
+ html/parser/HTMLScriptRunner.cpp \
+ html/parser/HTMLTokenizer.cpp \
+ html/parser/HTMLTreeBuilder.cpp \
+ html/parser/HTMLViewSourceParser.cpp \
+ \
loader/Cache.cpp \
loader/CachedCSSStyleSheet.cpp \
loader/CachedFont.cpp \
@@ -682,7 +709,8 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
rendering/RenderHTMLCanvas.cpp \
rendering/RenderIFrame.cpp \
rendering/RenderImage.cpp \
- rendering/RenderImageGeneratedContent.cpp \
+ rendering/RenderImageResource.cpp \
+ rendering/RenderImageResourceStyleImage.cpp \
rendering/RenderInline.cpp \
rendering/RenderLayer.cpp \
rendering/RenderLayerBacking.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 6dbf082..1d9159f 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -12,9 +12,11 @@ SET(WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/dom"
"${WEBCORE_DIR}/dom/default"
"${WEBCORE_DIR}/editing"
+ "${WEBCORE_DIR}/fileapi"
"${WEBCORE_DIR}/history"
"${WEBCORE_DIR}/html"
"${WEBCORE_DIR}/html/canvas"
+ "${WEBCORE_DIR}/html/parser"
"${WEBCORE_DIR}/inspector"
"${WEBCORE_DIR}/loader"
"${WEBCORE_DIR}/loader/appcache"
@@ -77,6 +79,7 @@ SET(WebCore_IDL_INCLUDES
bindings/js
css
dom
+ fileapi
html
html/canvas
inspector
@@ -189,16 +192,17 @@ SET(WebCore_IDL_FILES
dom/WebKitTransitionEvent.idl
dom/WheelEvent.idl
- html/Blob.idl
- html/BlobBuilder.idl
+ fileapi/Blob.idl
+ fileapi/BlobBuilder.idl
+ fileapi/FileError.idl
+ fileapi/File.idl
+ fileapi/FileList.idl
+ fileapi/FileReader.idl
+ fileapi/FileWriter.idl
+
html/DataGridColumn.idl
html/DataGridColumnList.idl
html/DOMFormData.idl
- html/FileError.idl
- html/File.idl
- html/FileList.idl
- html/FileReader.idl
- html/FileWriter.idl
html/HTMLAllCollection.idl
html/HTMLAnchorElement.idl
html/HTMLAppletElement.idl
@@ -335,17 +339,6 @@ SET(WebCore_IDL_FILES
storage/Database.idl
storage/DatabaseCallback.idl
storage/DatabaseSync.idl
- storage/DirectoryEntry.idl
- storage/DirectoryReader.idl
- storage/DOMFileSystem.idl
- storage/EntriesCallback.idl
- storage/Entry.idl
- storage/EntryArray.idl
- storage/EntryCallback.idl
- storage/ErrorCallback.idl
- storage/FileEntry.idl
- storage/FileSystemCallback.idl
- storage/Flags.idl
storage/IDBAny.idl
storage/IDBCursor.idl
storage/IDBDatabaseError.idl
@@ -361,8 +354,6 @@ SET(WebCore_IDL_FILES
storage/IDBRequest.idl
storage/IDBSuccessEvent.idl
storage/IDBTransaction.idl
- storage/Metadata.idl
- storage/MetadataCallback.idl
storage/SQLError.idl
storage/SQLException.idl
storage/SQLResultSet.idl
@@ -542,16 +533,10 @@ IF (ENABLE_SVG)
ENDIF()
SET(WebCore_SOURCES
- ${DERIVED_SOURCES_DIR}/HTMLElementFactory.cpp
${DERIVED_SOURCES_DIR}/HTMLEntityTable.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
${DERIVED_SOURCES_DIR}/InspectorBackendDispatcher.cpp
+ ${DERIVED_SOURCES_DIR}/JSWebSocket.cpp
accessibility/AXObjectCache.cpp
accessibility/AccessibilityARIAGrid.cpp
@@ -679,6 +664,7 @@ SET(WebCore_SOURCES
bindings/js/JSTreeWalkerCustom.cpp
bindings/js/JSWebKitCSSMatrixCustom.cpp
bindings/js/JSWebKitPointCustom.cpp
+ bindings/js/JSWebSocketCustom.cpp
bindings/js/JSWorkerContextBase.cpp
bindings/js/JSWorkerContextCustom.cpp
bindings/js/JSWorkerContextErrorHandler.cpp
@@ -934,6 +920,13 @@ SET(WebCore_SOURCES
editing/markup.cpp
editing/visible_units.cpp
+ fileapi/Blob.cpp
+ fileapi/BlobBuilder.cpp
+ fileapi/BlobURL.cpp
+ fileapi/File.cpp
+ fileapi/FileList.cpp
+ fileapi/ThreadableBlobRegistry.cpp
+
history/BackForwardController.cpp
history/BackForwardListImpl.cpp
history/CachedFrame.cpp
@@ -942,25 +935,13 @@ SET(WebCore_SOURCES
history/PageCache.cpp
html/AsyncImageResizer.cpp
- html/Blob.cpp
- html/BlobBuilder.cpp
- html/BlobURL.cpp
html/CollectionCache.cpp
- html/CSSPreloadScanner.cpp
html/DOMDataGridDataSource.cpp
html/DOMFormData.cpp
html/DataGridColumn.cpp
html/DataGridColumnList.cpp
html/DateComponents.cpp
- html/File.cpp
- html/FileList.cpp
html/FormDataList.cpp
- html/HTMLEntityParser.cpp
- html/HTMLTokenizer.cpp
- html/HTMLDocumentParser.cpp
- html/HTMLPreloadScanner.cpp
- html/HTMLScriptRunner.cpp
- html/HTMLTreeBuilder.cpp
html/HTMLAllCollection.cpp
html/HTMLAnchorElement.cpp
html/HTMLAppletElement.cpp
@@ -973,7 +954,6 @@ SET(WebCore_SOURCES
html/HTMLButtonElement.cpp
html/HTMLCanvasElement.cpp
html/HTMLCollection.cpp
- html/HTMLConstructionSite.cpp
html/HTMLDListElement.cpp
html/HTMLDataGridCellElement.cpp
html/HTMLDataGridColElement.cpp
@@ -984,11 +964,8 @@ SET(WebCore_SOURCES
html/HTMLDivElement.cpp
html/HTMLDocument.cpp
html/HTMLElement.cpp
- html/HTMLElementStack.cpp
- html/HTMLEntitySearch.cpp
html/HTMLEmbedElement.cpp
html/HTMLFieldSetElement.cpp
- html/HTMLFormattingElementList.cpp
html/HTMLFontElement.cpp
html/HTMLFormCollection.cpp
html/HTMLFormControlElement.cpp
@@ -1026,7 +1003,6 @@ SET(WebCore_SOURCES
html/HTMLParagraphElement.cpp
html/HTMLParamElement.cpp
html/HTMLParserErrorCodes.cpp
- html/HTMLParserScheduler.cpp
html/HTMLPlugInElement.cpp
html/HTMLPlugInImageElement.cpp
html/HTMLPreElement.cpp
@@ -1047,12 +1023,10 @@ SET(WebCore_SOURCES
html/HTMLTitleElement.cpp
html/HTMLUListElement.cpp
html/HTMLViewSourceDocument.cpp
- html/HTMLViewSourceParser.cpp
html/ImageData.cpp
html/ImageResizerThread.cpp
html/LabelsNodeList.cpp
html/StepRange.cpp
- html/ThreadableBlobRegistry.cpp
html/ValidityState.cpp
html/canvas/CanvasGradient.cpp
html/canvas/CanvasPattern.cpp
@@ -1060,6 +1034,19 @@ SET(WebCore_SOURCES
html/canvas/CanvasRenderingContext.cpp
html/canvas/CanvasRenderingContext2D.cpp
html/canvas/CanvasStyle.cpp
+ html/parser/CSSPreloadScanner.cpp
+ html/parser/HTMLConstructionSite.cpp
+ html/parser/HTMLDocumentParser.cpp
+ html/parser/HTMLElementStack.cpp
+ html/parser/HTMLEntityParser.cpp
+ html/parser/HTMLEntitySearch.cpp
+ html/parser/HTMLParserScheduler.cpp
+ html/parser/HTMLFormattingElementList.cpp
+ html/parser/HTMLPreloadScanner.cpp
+ html/parser/HTMLScriptRunner.cpp
+ html/parser/HTMLTokenizer.cpp
+ html/parser/HTMLTreeBuilder.cpp
+ html/parser/HTMLViewSourceParser.cpp
inspector/ConsoleMessage.cpp
inspector/InjectedScript.cpp
@@ -1146,21 +1133,6 @@ 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/RenderMathMLFenced.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
@@ -1211,7 +1183,6 @@ SET(WebCore_SOURCES
page/animation/KeyframeAnimation.cpp
platform/Arena.cpp
- platform/BlobItem.cpp
platform/ContentType.cpp
platform/ContextMenu.cpp
platform/CrossThreadCopier.cpp
@@ -1311,8 +1282,8 @@ SET(WebCore_SOURCES
platform/network/BlobRegistryImpl.cpp
platform/network/BlobResourceHandle.cpp
platform/network/Credential.cpp
- platform/network/FormData.cpp
platform/network/FormDataBuilder.cpp
+ platform/network/FormData.cpp
platform/network/HTTPHeaderMap.cpp
platform/network/HTTPParsers.cpp
platform/network/NetworkStateNotifier.cpp
@@ -1321,6 +1292,7 @@ SET(WebCore_SOURCES
platform/network/ResourceHandle.cpp
platform/network/ResourceRequestBase.cpp
platform/network/ResourceResponseBase.cpp
+ platform/network/SocketStreamHandleBase.cpp
platform/text/Base64.cpp
platform/text/BidiContext.cpp
@@ -1381,7 +1353,8 @@ SET(WebCore_SOURCES
rendering/RenderHTMLCanvas.cpp
rendering/RenderIFrame.cpp
rendering/RenderImage.cpp
- rendering/RenderImageGeneratedContent.cpp
+ rendering/RenderImageResource.cpp
+ rendering/RenderImageResourceStyleImage.cpp
rendering/RenderIndicator.cpp
rendering/RenderInline.cpp
rendering/RenderLayer.cpp
@@ -1456,14 +1429,6 @@ SET(WebCore_SOURCES
storage/DatabaseTask.cpp
storage/DatabaseThread.cpp
storage/DatabaseTracker.cpp
- storage/DirectoryEntry.cpp
- storage/DirectoryReader.cpp
- storage/DOMFilePath.cpp
- storage/DOMFileSystem.cpp
- storage/Entry.cpp
- storage/EntryArray.cpp
- storage/FileEntry.cpp
- storage/FileSystemCallbacks.cpp
storage/IDBAny.cpp
storage/IDBDatabase.cpp
storage/IDBDatabaseBackendImpl.cpp
@@ -1509,6 +1474,7 @@ SET(WebCore_SOURCES
websockets/WebSocketChannel.cpp
websockets/WebSocketHandshake.cpp
websockets/WebSocketHandshakeRequest.cpp
+ websockets/WebSocketHandshakeResponse.cpp
websockets/WorkerThreadableWebSocketChannel.cpp
workers/AbstractWorker.cpp
@@ -1555,6 +1521,14 @@ SET(WebCore_SOURCES
xml/XSLTUnicodeSort.cpp
)
+IF (ENABLE_BLOB)
+ LIST(APPEND WebCore_SOURCES
+ fileapi/FileReader.cpp
+ fileapi/FileThread.cpp
+ fileapi/FileStreamProxy.cpp
+ platform/FileStream.cpp
+ )
+ENDIF ()
IF (ENABLE_DATABASE)
LIST(APPEND WebCore_SOURCES
@@ -1567,12 +1541,57 @@ IF (ENABLE_DATABASE)
)
ENDIF ()
+IF (ENABLE_MATHML)
+ LIST(APPEND WebCore_SOURCES
+ mathml/MathMLElement.cpp
+ mathml/MathMLInlineContainerElement.cpp
+ mathml/MathMLMathElement.cpp
+ mathml/MathMLTextElement.cpp
+ mathml/RenderMathMLBlock.cpp
+ mathml/RenderMathMLFenced.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
+ )
+ENDIF ()
+
+if (ENABLE_FILE_SYSTEM)
+ LIST(APPEND WebCore_SOURCES
+ fileapi/DirectoryEntry.cpp
+ fileapi/DirectoryReader.cpp
+ fileapi/DOMFilePath.cpp
+ fileapi/DOMFileSystem.cpp
+ fileapi/Entry.cpp
+ fileapi/EntryArray.cpp
+ fileapi/FileEntry.cpp
+ fileapi/FileSystemCallbacks.cpp
+ fileapi/LocalFileSystem.cpp
+ platform/AsyncFileSystem.cpp
+ )
+ LIST(APPEND WebCore_IDL_FILES
+ fileapi/DirectoryEntry.idl
+ fileapi/DirectoryReader.idl
+ fileapi/DOMFileSystem.idl
+ fileapi/EntriesCallback.idl
+ fileapi/Entry.idl
+ fileapi/EntryArray.idl
+ fileapi/EntryCallback.idl
+ fileapi/ErrorCallback.idl
+ fileapi/FileEntry.idl
+ fileapi/FileSystemCallback.idl
+ fileapi/Flags.idl
+ fileapi/Metadata.idl
+ fileapi/MetadataCallback.idl
+ )
+ENDIF ()
+
IF (ENABLE_SVG)
LIST(APPEND WebCore_SOURCES
- ${DERIVED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp
- ${DERIVED_SOURCES_DIR}/SVGElementFactory.cpp
- ${DERIVED_SOURCES_DIR}/SVGNames.cpp
- ${DERIVED_SOURCES_DIR}/XLinkNames.cpp
bindings/js/JSSVGElementInstanceCustom.cpp
bindings/js/JSSVGLengthCustom.cpp
bindings/js/JSSVGMatrixCustom.cpp
@@ -1813,8 +1832,6 @@ ENDIF()
IF (ENABLE_WML)
LIST(APPEND WebCore_SOURCES
- ${DERIVED_SOURCES_DIR}/WMLElementFactory.cpp
- ${DERIVED_SOURCES_DIR}/WMLNames.cpp
wml/WMLAElement.cpp
wml/WMLAccessElement.cpp
wml/WMLAnchorElement.cpp
@@ -1872,7 +1889,7 @@ GENERATE_INSPECTOR_FROM_IDL(inspector/Inspector.idl)
LIST(APPEND WebCore_SOURCES ${JS_IDL_FILES} ${Inspector_IDL_FILES})
-GENERATE_JSON(${WEBCORE_DIR}/html/HTMLEntityNames.json ${DERIVED_SOURCES_DIR}/HTMLEntityTable.cpp ${WEBCORE_DIR}/../WebKitTools/Scripts/create-html-entity-table)
+GENERATE_ENTITIES(${WEBCORE_DIR}/html/parser/HTMLEntityNames.in ${DERIVED_SOURCES_DIR}/HTMLEntityTable.cpp ${WEBCORE_DIR}/html/parser/create-html-entity-table)
GENERATE_GPERF(${WEBCORE_DIR}/platform/ColorData.gperf ${DERIVED_SOURCES_DIR}/ColorData.cpp findColor "")
@@ -1906,13 +1923,43 @@ ADD_SOURCE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSParser.cpp tokenizer.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_FACTORY(WML ${WEBCORE_DIR}/wml/WMLTagNames.in ${WEBCORE_DIR}/wml/WMLAttributeNames.in "${WML_FEATURES}")
-GENERATE_DOM_NAMES_ONLY(XLink ${WEBCORE_DIR}/svg/xlinkattrs.in)
-GENERATE_DOM_NAMES_ONLY(XMLNS ${WEBCORE_DIR}/xml/xmlnsattrs.in)
-GENERATE_DOM_NAMES_ONLY(XML ${WEBCORE_DIR}/xml/xmlattrs.in)
+
+GENERATE_DOM_NAMES(HTML ${WEBCORE_DIR}/html/HTMLAttributeNames.in ${WEBCORE_DIR}/html/HTMLTagNames.in "${HTML_FEATURES}")
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/HTMLNames.cpp ${DERIVED_SOURCES_DIR}/HTMLElementFactory.cpp ${DERIVED_SOURCES_DIR}/JSHTMLElementWrapperFactory.cpp)
+
+
+GENERATE_DOM_NAMES(MathML ${WEBCORE_DIR}/mathml/mathattrs.in ${WEBCORE_DIR}/mathml/mathtags.in "${MATHML_FEATURES}")
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/MathMLNames.cpp)
+IF (ENABLE_MATHML)
+ LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/MathMLElementFactory.cpp)
+ENDIF ()
+
+
+GENERATE_DOM_NAMES(SVG ${WEBCORE_DIR}/svg/svgattrs.in ${WEBCORE_DIR}/svg/svgtags.in "${SVG_FEATURES}")
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/SVGNames.cpp)
+IF (ENABLE_SVG)
+ LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/SVGElementFactory.cpp ${DERIVED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp)
+ENDIF ()
+
+
+GENERATE_DOM_NAMES(WML ${WEBCORE_DIR}/wml/WMLAttributeNames.in ${WEBCORE_DIR}/wml/WMLTagNames.in "${WML_FEATURES}")
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/WMLNames.cpp)
+IF (ENABLE_WML)
+ LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/WMLElementFactory.cpp)
+ENDIF ()
+
+
+GENERATE_DOM_NAMES(XLink ${WEBCORE_DIR}/svg/xlinkattrs.in)
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/XLinkNames.cpp)
+
+
+GENERATE_DOM_NAMES(XMLNS ${WEBCORE_DIR}/xml/xmlnsattrs.in)
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/XMLNSNames.cpp)
+
+
+GENERATE_DOM_NAMES(XML ${WEBCORE_DIR}/xml/xmlattrs.in)
+LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_DIR}/XMLNames.cpp)
+
SET(WebCore_LIBRARIES
${JavaScriptCore_LIBRARY_NAME}
diff --git a/WebCore/CMakeListsEfl.txt b/WebCore/CMakeListsEfl.txt
index b58982d..1741baa 100644
--- a/WebCore/CMakeListsEfl.txt
+++ b/WebCore/CMakeListsEfl.txt
@@ -95,6 +95,7 @@ IF (WTF_USE_SOUP)
platform/network/soup/ResourceHandleSoup.cpp
platform/network/soup/ResourceRequestSoup.cpp
platform/network/soup/ResourceResponseSoup.cpp
+ platform/network/soup/SocketStreamHandleSoup.cpp
)
ENDIF ()
@@ -108,6 +109,7 @@ IF (WTF_USE_CURL)
platform/network/curl/FormDataStreamCurl.cpp
platform/network/curl/ResourceHandleCurl.cpp
platform/network/curl/ResourceHandleManager.cpp
+ platform/network/curl/SocketStreamHandleCurl.cpp
)
ENDIF ()
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 90f722c..32a3cef 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,7462 @@
+2010-09-02 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Fix indentation.
+ https://bugs.webkit.org/show_bug.cgi?id=44678
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+
+2010-09-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66655.
+ http://trac.webkit.org/changeset/66655
+ https://bugs.webkit.org/show_bug.cgi?id=45104
+
+ broke some editing tests (Requested by kling on #webkit).
+
+ * page/DOMSelection.cpp:
+ (WebCore::DOMSelection::collapse):
+ (WebCore::DOMSelection::selectAllChildren):
+
+2010-09-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66649.
+ http://trac.webkit.org/changeset/66649
+ https://bugs.webkit.org/show_bug.cgi?id=45103
+
+ It broke ~2000 tests on Qt bot (Requested by Ossy on #webkit).
+
+ * dom/Document.cpp:
+ (WebCore::Document::open):
+ * dom/DocumentParser.cpp:
+ (WebCore::DocumentParser::DocumentParser):
+ (WebCore::DocumentParser::detach):
+ * dom/DocumentParser.h:
+ (WebCore::DocumentParser::isDetached):
+ (WebCore::DocumentParser::stopParsing):
+ * dom/RawDataDocumentParser.h:
+ (WebCore::RawDataDocumentParser::finish):
+ * dom/XMLDocumentParser.cpp:
+ (WebCore::XMLDocumentParser::append):
+ (WebCore::XMLDocumentParser::exitText):
+ * dom/XMLDocumentParserLibxml2.cpp:
+ (WebCore::XMLDocumentParser::doWrite):
+ (WebCore::XMLDocumentParser::startElementNs):
+ (WebCore::XMLDocumentParser::endElementNs):
+ (WebCore::XMLDocumentParser::characters):
+ (WebCore::XMLDocumentParser::error):
+ (WebCore::XMLDocumentParser::processingInstruction):
+ (WebCore::XMLDocumentParser::cdataBlock):
+ (WebCore::XMLDocumentParser::comment):
+ (WebCore::XMLDocumentParser::internalSubset):
+ (WebCore::XMLDocumentParser::initializeParserContext):
+ (WebCore::XMLDocumentParser::doEnd):
+ * dom/XMLDocumentParserQt.cpp:
+ (WebCore::XMLDocumentParser::initializeParserContext):
+ (WebCore::XMLDocumentParser::doEnd):
+ (WebCore::XMLDocumentParser::parse):
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
+ (WebCore::HTMLDocumentParser::pumpTokenizer):
+ (WebCore::HTMLDocumentParser::insert):
+ (WebCore::HTMLDocumentParser::append):
+ (WebCore::HTMLDocumentParser::end):
+ (WebCore::HTMLDocumentParser::attemptToEnd):
+ (WebCore::HTMLDocumentParser::endIfDelayed):
+ (WebCore::HTMLDocumentParser::notifyFinished):
+ * html/parser/HTMLDocumentParser.h:
+ * html/parser/HTMLScriptRunner.cpp:
+ (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
+ (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
+ (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
+ (WebCore::HTMLScriptRunner::runScript):
+ * html/parser/HTMLScriptRunner.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageDocumentParser::finish):
+
+2010-09-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Share more code between HTMLObjectElement and HTMLEmbedElement
+ https://bugs.webkit.org/show_bug.cgi?id=45054
+
+ This pushes more of HTMLObjectElement code down into
+ HTMLPlugInImageElement so that it can be shared with
+ HTMLEmbedElement.
+
+ The most notable changes are:
+ - HTMLEmbedElement now "delays" updating the widget until
+ all of its children are parsed (this matches HTMLObjectElement).
+ However, since HTMLEmbedElement can't have children, this is actually
+ no delay.
+ - useFallbackContent is now virtual, allowing HTMLEmbedElement and
+ HTMLObjectElement to share the same code paths, and the <embed>
+ case to just always return false for useFallbackContent().
+
+ This is the final (fourth) part of this change.
+
+ No functional change, thus no tests.
+
+ * html/HTMLEmbedElement.cpp:
+ * html/HTMLEmbedElement.h:
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::rendererIsNeeded):
+ * html/HTMLObjectElement.h:
+ * html/HTMLPlugInImageElement.cpp:
+ (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+ (WebCore::HTMLPlugInImageElement::recalcStyle):
+ (WebCore::HTMLPlugInImageElement::attach):
+ (WebCore::HTMLPlugInImageElement::detach):
+ (WebCore::HTMLPlugInImageElement::finishParsingChildren):
+ * html/HTMLPlugInImageElement.h:
+
+2010-09-02 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Move takeAllChildrenFrom to ContainerNode
+ https://bugs.webkit.org/show_bug.cgi?id=45066
+
+ We're going to reuse this method for XMLDocumentLoader, so it's better
+ to put it in a more general location.
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::takeAllChildrenFrom):
+ * dom/ContainerNode.h:
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
+
+2010-09-01 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ DOM Selection: collapse() and selectAllChildren() should throw WRONG_DOCUMENT_ERR if node belongs to other document
+ https://bugs.webkit.org/show_bug.cgi?id=44595
+
+ Spec links:
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-selection-collapse
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-selection-selectallchildren
+
+ Test: fast/dom/Selection/wrong-document-err.html
+
+ * page/DOMSelection.cpp:
+ (WebCore::DOMSelection::collapse):
+ (WebCore::DOMSelection::selectAllChildren):
+
+2010-09-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Share more code between HTMLObjectElement and HTMLEmbedElement
+ https://bugs.webkit.org/show_bug.cgi?id=45054
+
+ This pushes more of HTMLObjectElement code down into
+ HTMLPlugInImageElement so that it can be shared with HTMLEmbedElement.
+
+ This patch was originally written in one piece and reviewed by Dimitri.
+ I'm landing it as four separate changes for easier readability and less
+ chance of regression.
+
+ No functional change, thus no tests.
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::HTMLEmbedElement):
+ (WebCore::HTMLEmbedElement::create):
+ * html/HTMLEmbedElement.h:
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::HTMLObjectElement):
+ * html/HTMLObjectElement.h:
+ * html/HTMLPlugInImageElement.cpp:
+ (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+ (WebCore::HTMLPlugInImageElement::detach):
+ (WebCore::HTMLPlugInImageElement::finishParsingChildren):
+ * html/HTMLPlugInImageElement.h:
+ * html/HTMLTagNames.in:
+
+2010-09-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Share more code between HTMLObjectElement and HTMLEmbedElement
+ https://bugs.webkit.org/show_bug.cgi?id=45054
+
+ This pushes more of HTMLObjectElement code down into
+ HTMLPlugInImageElement so that it can be shared with HTMLEmbedElement.
+
+ I also moved a little code from HTMLPluginElement to HTMLPlugInImageElement
+ since HTMLAppletElement does not need to share this same widget update logic.
+ This is a small correction from the previous change.
+
+ This patch was originally written in one piece and reviewed by Dimitri.
+ I'm landing it as three separate changes for easier readability and less
+ chance of regression.
+
+ No functional change, thus no tests.
+
+ * html/HTMLEmbedElement.cpp:
+ * html/HTMLEmbedElement.h:
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::attach):
+ (WebCore::HTMLObjectElement::finishParsingChildren):
+ (WebCore::HTMLObjectElement::detach):
+ (WebCore::HTMLObjectElement::recalcStyle):
+ (WebCore::HTMLObjectElement::childrenChanged):
+ (WebCore::HTMLObjectElement::renderFallbackContent):
+ * html/HTMLObjectElement.h:
+ (WebCore::HTMLObjectElement::useFallbackContent):
+ * html/HTMLPlugInElement.cpp:
+ * html/HTMLPlugInElement.h:
+ * html/HTMLPlugInImageElement.cpp:
+ (WebCore::HTMLPlugInImageElement::createRenderer):
+ (WebCore::HTMLPlugInImageElement::updateWidget):
+ (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
+ * html/HTMLPlugInImageElement.h:
+ (WebCore::HTMLPlugInImageElement::canLazyAttach):
+ (WebCore::HTMLPlugInImageElement::useFallbackContent):
+
+2010-09-02 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit should not accept PDFs as video.
+ https://bugs.webkit.org/show_bug.cgi?id=45013
+
+ The code in MediaPlayerPrivate::createQTMovie has been re-arranged.
+ First, the component disabling is done only once. In 64-bit QTKit will
+ store the list of disabled components and disable them once QTKitServer
+ starts, so there is no need to disable them repeatedly. However,
+ because of a bug in 64-bit QTKit, additional requests of the exact same
+ component description will be ignored if QTKitServer is not yet running.
+ To work around this, we must provide the exact component flags for each
+ eat/PDF and grip/PDF component we wish to disable.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::disableComponentsOnce): Added.
+ (WebCore::MediaPlayerPrivate::createQTMovie): Moved the component
+ disabling code into disableComponentsOnce.
+
+2010-09-02 Philippe Normand <pnormand@igalia.com>
+
+ Unreviewed, GTK build fix.
+
+ * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+ (WebCore::GStreamerGWorld::enterFullscreen):
+
+2010-09-02 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Share more code between HTMLObjectElement and HTMLEmbedElement
+ https://bugs.webkit.org/show_bug.cgi?id=45054
+
+ This pushes more of HTMLObjectElement code down into
+ HTMLPlugInImageElement so that it can be shared with HTMLEmbedElement.
+
+ I also moved a little code from HTMLPluginElement to HTMLPlugInImageElement
+ since HTMLAppletElement does not need to share this same widget update logic.
+ This is a small correction from the previous change.
+
+ This patch was originally written in one piece and reviewed by Dimitri.
+ I'm landing it as two separate changes for easier readability and less
+ chance of regression.
+
+ No functional change, thus no tests.
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::HTMLEmbedElement):
+ (WebCore::HTMLEmbedElement::mapToEntry):
+ (WebCore::HTMLEmbedElement::parseMappedAttribute):
+ (WebCore::HTMLEmbedElement::rendererIsNeeded):
+ (WebCore::HTMLEmbedElement::attach):
+ (WebCore::HTMLEmbedElement::updateWidget):
+ (WebCore::HTMLEmbedElement::insertedIntoDocument):
+ (WebCore::HTMLEmbedElement::removedFromDocument):
+ (WebCore::HTMLEmbedElement::attributeChanged):
+ * html/HTMLEmbedElement.h:
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::HTMLObjectElement):
+ (WebCore::HTMLObjectElement::parseMappedAttribute):
+ (WebCore::HTMLObjectElement::rendererIsNeeded):
+ (WebCore::HTMLObjectElement::attach):
+ (WebCore::HTMLObjectElement::updateWidget):
+ (WebCore::HTMLObjectElement::finishParsingChildren):
+ (WebCore::HTMLObjectElement::detach):
+ (WebCore::HTMLObjectElement::insertedIntoDocument):
+ (WebCore::HTMLObjectElement::removedFromDocument):
+ (WebCore::HTMLObjectElement::recalcStyle):
+ (WebCore::HTMLObjectElement::childrenChanged):
+ (WebCore::HTMLObjectElement::renderFallbackContent):
+ * html/HTMLObjectElement.h:
+ * html/HTMLPlugInElement.cpp:
+ * html/HTMLPlugInElement.h:
+ * html/HTMLPlugInImageElement.cpp:
+ (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+ (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
+ * html/HTMLPlugInImageElement.h:
+ (WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
+ (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::requestObject):
+ (WebCore::SubframeLoader::loadPlugin):
+ * loader/SubframeLoader.h:
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::updateWidgetForObjectElement):
+ (WebCore::updateWidgetForEmbedElement):
+
+2010-09-02 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Support <script defer> as specified by HTML5
+ https://bugs.webkit.org/show_bug.cgi?id=40934
+
+ Tests: fast/dom/HTMLScriptElement/defer-double-defer-write.html
+ fast/dom/HTMLScriptElement/defer-double-write.html
+ fast/dom/HTMLScriptElement/defer-inline-script.html
+ fast/dom/HTMLScriptElement/defer-onbeforeload.html
+ fast/dom/HTMLScriptElement/defer-script-invalid-url.html
+ fast/dom/HTMLScriptElement/defer-write.html
+ fast/dom/HTMLScriptElement/two-defer-writes.html
+ http/tests/misc/script-defer-after-slow-stylesheet.html
+ http/tests/misc/script-defer.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::open): Allow implicit open for writes() while executing deferred scripts.
+ * dom/DocumentParser.cpp:
+ (WebCore::DocumentParser::DocumentParser):
+ (WebCore::DocumentParser::startParsing):
+ (WebCore::DocumentParser::prepareToStopParsing): If called when stopped or detached, it shouldn't reset to stopping.
+ (WebCore::DocumentParser::stopParsing):
+ (WebCore::DocumentParser::detach):
+ * dom/DocumentParser.h:
+ (WebCore::DocumentParser::isParsing):
+ (WebCore::DocumentParser::isActive):
+ (WebCore::DocumentParser::isStopping):
+ (WebCore::DocumentParser::isDetached):
+ * dom/RawDataDocumentParser.h:
+ (WebCore::RawDataDocumentParser::finish):
+ * dom/XMLDocumentParser.cpp:
+ (WebCore::XMLDocumentParser::append):
+ (WebCore::XMLDocumentParser::exitText):
+ * dom/XMLDocumentParserLibxml2.cpp:
+ (WebCore::XMLDocumentParser::doWrite):
+ (WebCore::XMLDocumentParser::startElementNs):
+ (WebCore::XMLDocumentParser::endElementNs):
+ (WebCore::XMLDocumentParser::characters):
+ (WebCore::XMLDocumentParser::error):
+ (WebCore::XMLDocumentParser::processingInstruction):
+ (WebCore::XMLDocumentParser::cdataBlock):
+ (WebCore::XMLDocumentParser::comment):
+ (WebCore::XMLDocumentParser::internalSubset):
+ (WebCore::XMLDocumentParser::initializeParserContext):
+ (WebCore::XMLDocumentParser::doEnd):
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::prepareToStopParsing):
+ (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
+ (WebCore::HTMLDocumentParser::pumpTokenizer):
+ (WebCore::HTMLDocumentParser::insert):
+ (WebCore::HTMLDocumentParser::append):
+ (WebCore::HTMLDocumentParser::end):
+ (WebCore::HTMLDocumentParser::attemptToEnd):
+ (WebCore::HTMLDocumentParser::endIfDelayed):
+ (WebCore::HTMLDocumentParser::notifyFinished):
+ * html/parser/HTMLDocumentParser.h:
+ * html/parser/HTMLScriptRunner.cpp:
+ (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
+ (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
+ (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
+ (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
+ (WebCore::HTMLScriptRunner::requestDeferredScript):
+ (WebCore::HTMLScriptRunner::runScript):
+ * html/parser/HTMLScriptRunner.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageDocumentParser::finish):
+
+2010-09-02 Ilya Sherman <isherman@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Decompose computing an element's inherited language, expose this
+ capability to clients (in particular, for Chromium).
+ https://bugs.webkit.org/show_bug.cgi?id=44803
+
+ No new tests -- just refactoring + exposing code.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
+ * dom/Element.cpp:
+ (WebCore::Element::computeInheritedLang):
+ * dom/Element.h:
+
+2010-08-31 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GStreamer] can't play m4v videos
+ https://bugs.webkit.org/show_bug.cgi?id=44951
+
+ Fixed registration of the m4v media type in the hashtable used by
+ the player to report if it supports a given media type.
+
+ Test: media/media-can-play-mpeg4-video.html
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::mimeTypeCache):
+
+2010-09-01 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] warning: unused variable "queryResult"
+ https://bugs.webkit.org/show_bug.cgi?id=44998
+
+ Fix the misbehavior introduced in r66573. The gst_element_query()
+ call needs to be done whatever the GStreamer version used.
+
+ * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+ (WebCore::GStreamerGWorld::enterFullscreen):
+
+2010-09-01 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add support for autocorrection UI on Mac OS X.
+ https://bugs.webkit.org/show_bug.cgi?id=44958
+ <rdar://problem/7326847>
+
+ Several new member methods are added to EditorClient for communication
+ between WebCore and WebKit. A new handler, executeCancelOperation(), is
+ added to EditorCommand.cpp so that WebCore can intercept the ESC key event
+ to dismiss autocorrection UI. A new DocumentMarker value, RejectedCorrection,
+ is added to keep track of the corrections that user has rejected, so that it
+ will not be suggested again later. The autocorrection is driven by a timer.
+ Every time the editor inserts a new letter, the timer is reset. If the timer
+ fires, it means neither has user entered any new letter for current word, nor
+ has he entered whitespace or punctuation to complete the word. In this case,
+ we query for autocorrection.
+
+ * WebCore.exp.in: Updated
+
+ * dom/DocumentMarker.h: Added RejectedCorrection to indicate word on which user
+ has rejected autocorrection.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::Editor): Initialize autocorrection timer.
+ (WebCore::Editor::~Editor): Make sure autocorrection UI is dismissed before
+ destroying Editor object.
+ (WebCore::Editor::markMisspellingsAfterTypingToPosition): Adopted new signature
+ of markAllMisspellingsAndBadGrammarInRanges().
+ (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Consolidated all
+ boolean arguments into one bitfield. This improves readability and allows us to
+ pass in a bit to indicate whether we want to show autocorrection UI. Also added
+ code to show autocorrection UI if it is necessary.
+ (WebCore::Editor::markMisspellingsAndBadGrammar): Adopted new signature of
+ markAllMisspellingsAndBadGrammarInRanges().
+ (WebCore::Editor::correctionPanelTimerFired): Check to see if we should show
+ autocorrection UI when user pauses during typing.
+ (WebCore::Editor::handleRejectedCorrection): Update user dictionary when an autocorrection is rejected.
+ (WebCore::Editor::startCorrectionPanelTimer): Start autocorrection timer.
+ (WebCore::Editor::handleCancelOperation): Dismiss autocorrection UI when ESC key is pressed.
+
+ * editing/Editor.h: Added autocorrection related member methods and variables.
+
+ * editing/EditorCommand.cpp:
+ (WebCore::executeCancelOperation): Handle ESC key event. Dismiss autocorrection UI.
+ (WebCore::createCommandMap): Updated for executeCancelOperation().
+
+ * editing/TypingCommand.cpp:
+ (WebCore::TypingCommand::markMisspellingsAfterTyping): Reset autocorrection timer after insertion.
+
+ * loader/EmptyClients.h:
+ (WebCore::EmptyEditorClient::showCorrectionPanel): Dummy implementation.
+ (WebCore::EmptyEditorClient::dismissCorrectionPanel): Ditto
+
+ * page/EditorClient.h: Added methods for communication between WebCore and WebKit regarding autocorrection.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::respondToChangedSelection): Remove Replacement marker where we used to only remove Spelling
+ mark, because whenever we need to remove spelling underline we also should remove autocorrection underline.
+
+ * platform/graphics/GraphicsContext.h: Added enum TextCheckingLineStyle to specify the underline
+ for different type of text checking result. Replaced drawLineForMisspellingOrBadGrammar() with
+ drawLineForTextChecking(), which allows autocorrection to have different indication from misspelling
+ and grammatical error.
+
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Replaced drawLineForMisspellingOrBadGrammar() with drawLineForTextChecking().
+
+ * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/mac/GraphicsContextMac.mm:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/win/GraphicsContextCGWin.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * platform/graphics/wx/GraphicsContextWx.cpp:
+ (WebCore::GraphicsContext::drawLineForTextChecking): Ditto
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::textCheckingLineStyleForMarkerType): Return line style for a given document marker type.
+ (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Replaced drawLineForMisspellingOrBadGrammar() with drawLineForTextChecking().
+ (WebCore::InlineTextBox::paintDocumentMarkers): Handle new marker value, RejectedCorrection.
+
+2010-09-01 Kinuko Yasuda <kinuko@google.com>
+
+ Reviewed by Adam Barth.
+
+ [V8] Support readonly Date attribute
+ https://bugs.webkit.org/show_bug.cgi?id=43943
+
+ Adds Date to non_wrapper_types in CodeGeneratorV8.pm.
+
+ New tests will be added for Metadata when we add FileSystem implementation.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * fileapi/Metadata.h:
+ * fileapi/Metadata.idl:
+
+2010-09-01 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Chris Marrin.
+
+ animations/suspend-resume-animation.html does not pass when accelerated compositing is off
+ https://bugs.webkit.org/show_bug.cgi?id=45057
+
+ Fix incorrect logic when resuming the animation (KeyframeAnimation::startAnimation
+ and RenderLayerBacking::startAnimation return true when running an accelerated
+ animation).
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::updateStateMachine):
+
+2010-09-01 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Question mark QuickTime icon when navigating to this MP3 file
+ https://bugs.webkit.org/show_bug.cgi?id=44846
+
+ Do not disable 'tmet' movie tracks, they carry meta data.
+
+ No DRT test because I am not sure it is possible to have one of these tracks in
+ non-streaming movie. I will add a test later if I figure out how to create a movie.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
+
+2010-09-01 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove rendering types from SubframeLoader and split RenderEmbeddedObject::updateWidget in preparation for moving to DOM
+ https://bugs.webkit.org/show_bug.cgi?id=45007
+
+ This is just moving around code (and attempting to make it more sane).
+ I also tried to use more specific types where possible.
+ The SubframeLoader no longer uses any rendering types in its API.
+
+ I split RenderEmbeddedObject::updateWidget into a bunch of functions.
+ It was obvious before, but now super-obvious after the split that these
+ new functions do not belong in RenderEmbeddedObject. Instead they
+ need to be moved to their respective DOM classes. I've added FIXMEs
+ next to each of the functions which should be moved, but I've not moved
+ any of the logic out of RenderEmbeddedObject.cpp yet in an effort to
+ keep this patch as simple as possible.
+
+ No functional change, thus no tests.
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::updateWidget):
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::attach):
+ (WebCore::HTMLFrameElementBase::width):
+ (WebCore::HTMLFrameElementBase::height):
+ * html/HTMLFrameOwnerElement.cpp:
+ (WebCore::HTMLFrameOwnerElement::renderPart):
+ * html/HTMLFrameOwnerElement.h:
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
+ (WebCore::HTMLObjectElement::createRenderer):
+ (WebCore::HTMLObjectElement::updateWidget):
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::renderEmbeddedObject):
+ * html/HTMLPlugInElement.h:
+ * loader/PluginDocument.cpp:
+ (WebCore::PluginDocumentParser::appendBytes):
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::requestObject):
+ (WebCore::SubframeLoader::document):
+ (WebCore::SubframeLoader::loadPlugin):
+ * loader/SubframeLoader.h:
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::isNetscapePlugin):
+ (WebCore::hasFallbackContent):
+ (WebCore::parametersFromObject):
+ (WebCore::updateWidgetForObjectElement):
+ (WebCore::parametersFromEmbed):
+ (WebCore::updateWidgetForEmbedElement):
+ (WebCore::updateWidgetForMediaElement):
+ (WebCore::RenderEmbeddedObject::updateWidget):
+ * rendering/RenderEmbeddedObject.h:
+ (WebCore::RenderEmbeddedObject::setHasFallbackContent):
+ * rendering/RenderLayerCompositor.h:
+
+2010-09-01 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Add more FileError and FileException code for FileWriter and FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=45048
+
+ Adding SYNTAX_ERR for FileWriter.
+ http://dev.w3.org/2009/dap/file-system/file-writer.html
+
+ Adding INVALID_STATE_ERR, INVALID_MODIFICATION_ERR and QUOTA_EXCEEDED_ERR for FileSystem.
+ http://dev.w3.org/2009/dap/file-system/file-dir-sys.html
+
+ Adding NO_MODIFICATION_ALLOWED_ERR (to FileException) for both.
+
+ * fileapi/FileError.idl:
+ * fileapi/FileException.idl:
+
+2010-09-01 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Brady Eidson.
+
+ popstate event is not fired until document opts in by calling pushstate.
+ https://bugs.webkit.org/show_bug.cgi?id=41372
+
+ Fire popstate even when we don't have a state object when a page is
+ loaded (for both regular loads and those from the page cache). Also
+ fire popstate when doing in-document navigation via fragment changes.
+ This is consistent with both Gecko and recent the HTML5 spec change:
+ http://html5.org/tools/web-apps-tracker?from=5376&to=5377
+
+ Tests: fast/loader/stateobjects/popstate-fires-on-history-traversal.html
+ fast/loader/stateobjects/popstate-fires-with-page-cache.html
+
+ * bindings/js/SerializedScriptValue.cpp:
+ * bindings/js/SerializedScriptValue.h:
+ (WebCore::SerializedScriptValue::create):
+ * bindings/v8/SerializedScriptValue.cpp:
+ * bindings/v8/SerializedScriptValue.h:
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose):
+ * dom/Document.h:
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrameBase::restore):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadInSameDocument):
+ (WebCore::FrameLoader::transitionToCommitted):
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::pushState):
+ (WebCore::HistoryController::replaceState):
+
+2010-09-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ REGRESSION(r66431): WebCore::Editor::selectionStartCSSPropertyValue crashes if no background color is specified
+ https://bugs.webkit.org/show_bug.cgi?id=45068
+
+ The crash was caused by the assumption that every node has an ancestor with some background color,
+ which was obviously false. Fixed this by adding a null for ancestor.
+
+ Test: editing/execCommand/backcolor-crash.html
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::selectionStartCSSPropertyValue):
+
+2010-08-31 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit should not accept PDFs as video.
+ https://bugs.webkit.org/show_bug.cgi?id=45013
+
+ QuickTime will accept a PDF as the source for a movie, and happily
+ convert that PDF into a .mov. WebKit should disable the eat and grip
+ PDF components which allow this.
+
+ Test: http/tests/media/pdf-served-as-pdf.html
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie): Add PDF eat and grip
+ components to the components which are disabled before opening a
+ QTMovie.
+
+2010-09-01 Rob Buis <rwlbuis@gmail.com>
+
+ Reviewed by Darin Adler.
+
+ Support for Percentage Values in border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=38354
+
+ Support percentage values on the border-radius family
+ of CSS properties.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::getBorderRadiusCornerValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseBorderRadius):
+ * css/CSSPrimitiveValue.cpp:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::ensurePropertyMap):
+ * platform/Length.h:
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
+ * rendering/style/BorderData.h:
+ (WebCore::BorderData::BorderData):
+ (WebCore::BorderData::hasBorderRadius):
+ (WebCore::BorderData::topLeft):
+ (WebCore::BorderData::topRight):
+ (WebCore::BorderData::bottomLeft):
+ (WebCore::BorderData::bottomRight):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::getBorderRadiiForRect):
+ (WebCore::RenderStyle::getInnerBorderRadiiForRectWithBorderWidths):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::borderTopLeftRadius):
+ (WebCore::InheritedFlags::borderTopRightRadius):
+ (WebCore::InheritedFlags::borderBottomLeftRadius):
+ (WebCore::InheritedFlags::borderBottomRightRadius):
+ (WebCore::InheritedFlags::setBorderTopLeftRadius):
+ (WebCore::InheritedFlags::setBorderTopRightRadius):
+ (WebCore::InheritedFlags::setBorderBottomLeftRadius):
+ (WebCore::InheritedFlags::setBorderBottomRightRadius):
+ (WebCore::InheritedFlags::setBorderRadius):
+ (WebCore::InheritedFlags::initialBorderRadius):
+
+2010-09-01 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: webInspector.inspectedWindow.evaluate() should not fail if not passed callback.
+ https://bugs.webkit.org/show_bug.cgi?id=45037
+
+ * inspector/front-end/ExtensionAPI.js:
+ (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.evaluate):
+
+2010-09-01 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Dan Bernstein and Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44963, overhanging floats aren't positioned properly when they occur
+ in multi-column layout. Don't let floats overhang in multi-column blocks, since they are part of the column layout.
+
+ fast/multicol/float-pagination-failure now succeeds, so will rename and move it.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::addOverhangingFloats):
+
+2010-08-31 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Simon Fraser.
+
+ Add helpers to FloatRect to compute bounding box from points
+ https://bugs.webkit.org/show_bug.cgi?id=45015
+
+ Added fitToPoints, including a few overloaded variants for the
+ cases of two, three and four points. I opted not to add a
+ generalized version taking const FloatRect* or Vector<FloatRect>
+ at the present time because for my own purposes they are
+ unnecessary, and the specific versions can be more tightly coded.
+ Also added left() and top() for symmetry with right() and bottom().
+ These changes have been tested with new code to be added later.
+
+ * platform/graphics/FloatRect.cpp:
+ (WebCore::FloatRect::intersect):
+ (WebCore::FloatRect::unite):
+ (WebCore::FloatRect::fitToPoints):
+ * platform/graphics/FloatRect.h:
+ (WebCore::FloatRect::left):
+ (WebCore::FloatRect::top):
+ (WebCore::FloatRect::setLocationAndSizeFromEdges):
+
+2010-09-01 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [v8] Use Vector and DEFINE_STATIC_LOCAL instead of plain static array.
+ https://bugs.webkit.org/show_bug.cgi?id=45040
+
+ By code guidelines all the statics should be wrapped into appropriate macro.
+
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::int32ToWebCoreString):
+
+2010-09-01 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [Gtk] very slow page scrolling on big -webkit-box-shadow areas
+ https://bugs.webkit.org/show_bug.cgi?id=39582
+
+ Add a new drawTiledShadow method to render a big shadow doing
+ tiling of parts of a smaller shadow. We create the minimum shadow
+ required to get the tiles we will use to render the real shadow
+ and we use drawPattern with those tiles to create the shadow.
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::drawPathShadow):
+ (WebCore::drawBorderlessRectShadow):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::applyPlatformShadow):
+ (WebCore::GraphicsContext::createShadowMask):
+ (WebCore::getPhase):
+ (WebCore::GraphicsContext::drawTiledShadow):
+ (WebCore::GraphicsContext::fillRoundedRect):
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::BitmapImage::draw):
+
+2010-09-01 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector, Extension API: Panel.onSelectionChanged event is never fired
+ Added command line API to the lexical context of code evaluated by webInspector.inspectedWindow.evaluate()
+ Fixed webInspector.inspectedWindow.evaluate() to return object rather than its stringified representation
+ https://bugs.webkit.org/show_bug.cgi?id=44957
+
+ Test: inspector/extensions-eval.html
+
+ * inspector/front-end/ExtensionAPI.js:
+ (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.evaluate):
+ * inspector/front-end/ExtensionServer.js:
+ (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
+
+2010-08-27 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GStreamer] ImageGStreamer doesn't need to hold a Cairo surface
+ https://bugs.webkit.org/show_bug.cgi?id=44757
+
+ Pass the cairo surface to the BitmapImage constructor which will
+ handle its life-cycle.
+
+ * platform/graphics/gstreamer/ImageGStreamer.h:
+ * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
+ (ImageGStreamer::ImageGStreamer):
+ (ImageGStreamer::~ImageGStreamer):
+
+2010-08-30 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Dirk Schulze.
+
+ RenderImage::imageChanged invalidates wrong area
+ https://bugs.webkit.org/show_bug.cgi?id=43779
+
+ Remove RenderImage inheritance from RenderSVGImage, it now inherits from RenderSVGModelObject.
+
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::RenderSVGImage):
+ (WebCore::RenderSVGImage::~RenderSVGImage):
+ (WebCore::RenderSVGImage::layout):
+ (WebCore::RenderSVGImage::paint):
+ (WebCore::RenderSVGImage::imageChanged):
+ * rendering/RenderSVGImage.h:
+ (WebCore::RenderSVGImage::imageResource):
+ * rendering/RenderSVGModelObject.h:
+ * svg/SVGImageElement.cpp:
+
+2010-09-01 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Add culling to RenderSVGContainer
+ https://bugs.webkit.org/show_bug.cgi?id=44896
+
+ Cache object/strokeBoundingBox and repaintRectInLocalCoordinates() in RenderSVGContainer & RenderSVGRoot, just like it's done in RenderPath.
+ Propagate boundary changes up the render tree, in layout phase, in order to notify parents that they should update their cached boundaries.
+
+ This is a huge speed benefit when interacting with an already layouted document, as there's no need anymore to traverse all children
+ of any container or <svg> element, just to retrieve the repaint rect.
+
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::layout): Propagate boundary changes to parent, if neeeded.
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::setNeedsBoundariesUpdate): Ditto.
+ * rendering/RenderObject.h:
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::removeChildNode): Ditto.
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::layout): Ditto.
+ (WebCore::RenderPath::paint): Use new helper function to intersect the paintInfo.rect with the repaintRectInLocalCoordinates().
+ * rendering/RenderPath.h: Remove styleWillChange(), it's in RenderSVGModelObject now.
+ (WebCore::RenderPath::setNeedsBoundariesUpdate): Mark as virtual, just like in RenderObject.
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::RenderSVGContainer): Initialize m_needsBoundariesUpdate to true.
+ (WebCore::RenderSVGContainer::layout): Only update cached boundaries, if needed, once by traversing the child tree.
+ (WebCore::RenderSVGContainer::paint): Use new helper function to intersect the paintInfo.rect with the repaintRectInLocalCoordinates().
+ (WebCore::RenderSVGContainer::updateCachedBoundaries): Ask children for their boundaries, and cache them.
+ * rendering/RenderSVGContainer.h:
+ (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate): Set m_needsBoundariesUpdate when called.
+ (WebCore::RenderSVGContainer::objectBoundingBox): Inlined, just returns a member variable now.
+ (WebCore::RenderSVGContainer::strokeBoundingBox): Ditto.
+ (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): Ditto.
+ (WebCore::RenderSVGContainer::calculateLocalTransform): Changed to return a boolean, wheter the transform was modified.
+ * rendering/RenderSVGGradientStop.h:
+ (WebCore::RenderSVGGradientStop::strokeBoundingBox): Add missing default implementation, return just FloatRect().
+ * rendering/RenderSVGHiddenContainer.cpp: Remove repaintRectInLocalCoordinates() override, it's now needed for painting markers.
+ * rendering/RenderSVGHiddenContainer.h:
+ (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint): Inlined, returning IntRect().
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::layout): Propagate boundary changes to parent, if neeeded.
+ * rendering/RenderSVGRoot.cpp: Cache boundaries here as well, just like in RenderSVGContainer.
+ (WebCore::RenderSVGRoot::RenderSVGRoot):
+ (WebCore::RenderSVGRoot::layout):
+ (WebCore::RenderSVGRoot::updateCachedBoundaries):
+ * rendering/RenderSVGRoot.h:
+ (WebCore::RenderSVGRoot::setNeedsBoundariesUpdate):
+ (WebCore::RenderSVGRoot::setNeedsTransformUpdate):
+ (WebCore::RenderSVGRoot::objectBoundingBox):
+ (WebCore::RenderSVGRoot::strokeBoundingBox):
+ (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::layout): Propagate boundary changes to parent, if neeeded.
+ * rendering/RenderSVGTransformableContainer.cpp:
+ (WebCore::RenderSVGTransformableContainer::calculateLocalTransform): Return true, if the localTransform changed.
+ * rendering/RenderSVGTransformableContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::calcViewport): Propagate boundary changes to parent, if neeeded.
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBoxes): Helper function calculating object/strokeBoundingBox and repaintRectInLocalCoordinates in one shot.
+ (WebCore::SVGRenderSupport::paintInfoIntersectsRepaintRect): Moved from RenderPath to share the culling functionality.
+ * rendering/SVGRenderSupport.h:
+
+2010-09-01 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] QWebPage::allowGeolocationRequest should be async API
+ https://bugs.webkit.org/show_bug.cgi?id=41364
+
+ Adding GeolocationPermissionClientQt.cpp/h to build script
+
+ * WebCore.pro:
+
+2010-09-01 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ DOM Selection: collapseToStart() and collapseToEnd() should throw INVALID_STATE_ERR if there's no selection
+ https://bugs.webkit.org/show_bug.cgi?id=44598
+
+ Spec links:
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-selection-collapsetostart
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-selection-collapsetoend
+
+ Test: fast/dom/Selection/collapseToX-empty-selection.html
+
+ * page/DOMSelection.cpp:
+ (WebCore::DOMSelection::collapseToEnd):
+ (WebCore::DOMSelection::collapseToStart):
+ * page/DOMSelection.h:
+ * page/DOMSelection.idl:
+
+2010-09-01 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed; another build fix.
+
+ * WebCore.pri:
+
+2010-09-01 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed; qt build fix.
+
+ * CMakeLists.txt:
+
+2010-08-31 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Move FileSystem related files from WebCore/html to WebCore/fileapi.
+ https://bugs.webkit.org/show_bug.cgi?id=44925
+
+ No new tests; there should be no functional changes.
+
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * fileapi/DOMFilePath.cpp: Renamed from WebCore/storage/DOMFilePath.cpp.
+ * fileapi/DOMFilePath.h: Renamed from WebCore/storage/DOMFilePath.h.
+ * fileapi/DOMFileSystem.cpp: Renamed from WebCore/storage/DOMFileSystem.cpp.
+ * fileapi/DOMFileSystem.h: Renamed from WebCore/storage/DOMFileSystem.h.
+ * fileapi/DOMFileSystem.idl: Renamed from WebCore/storage/DOMFileSystem.idl.
+ * fileapi/DirectoryEntry.cpp: Renamed from WebCore/storage/DirectoryEntry.cpp.
+ * fileapi/DirectoryEntry.h: Renamed from WebCore/storage/DirectoryEntry.h.
+ * fileapi/DirectoryEntry.idl: Renamed from WebCore/storage/DirectoryEntry.idl.
+ * fileapi/DirectoryReader.cpp: Renamed from WebCore/storage/DirectoryReader.cpp.
+ * fileapi/DirectoryReader.h: Renamed from WebCore/storage/DirectoryReader.h.
+ * fileapi/DirectoryReader.idl: Renamed from WebCore/storage/DirectoryReader.idl.
+ * fileapi/EntriesCallback.h: Renamed from WebCore/storage/EntriesCallback.h.
+ * fileapi/EntriesCallback.idl: Renamed from WebCore/storage/EntriesCallback.idl.
+ * fileapi/Entry.cpp: Renamed from WebCore/storage/Entry.cpp.
+ * fileapi/Entry.h: Renamed from WebCore/storage/Entry.h.
+ * fileapi/Entry.idl: Renamed from WebCore/storage/Entry.idl.
+ * fileapi/EntryArray.cpp: Renamed from WebCore/storage/EntryArray.cpp.
+ * fileapi/EntryArray.h: Renamed from WebCore/storage/EntryArray.h.
+ * fileapi/EntryArray.idl: Renamed from WebCore/storage/EntryArray.idl.
+ * fileapi/EntryCallback.h: Renamed from WebCore/storage/EntryCallback.h.
+ * fileapi/EntryCallback.idl: Renamed from WebCore/storage/EntryCallback.idl.
+ * fileapi/ErrorCallback.h: Renamed from WebCore/storage/ErrorCallback.h.
+ * fileapi/ErrorCallback.idl: Renamed from WebCore/storage/ErrorCallback.idl.
+ * fileapi/FileEntry.cpp: Renamed from WebCore/storage/FileEntry.cpp.
+ * fileapi/FileEntry.h: Renamed from WebCore/storage/FileEntry.h.
+ * fileapi/FileEntry.idl: Renamed from WebCore/storage/FileEntry.idl.
+ * fileapi/FileSystemCallback.h: Renamed from WebCore/storage/FileSystemCallback.h.
+ * fileapi/FileSystemCallback.idl: Renamed from WebCore/storage/FileSystemCallback.idl.
+ * fileapi/FileSystemCallbacks.cpp: Renamed from WebCore/storage/FileSystemCallbacks.cpp.
+ * fileapi/FileSystemCallbacks.h: Renamed from WebCore/storage/FileSystemCallbacks.h.
+ * fileapi/Flags.h: Renamed from WebCore/storage/Flags.h.
+ * fileapi/Flags.idl: Renamed from WebCore/storage/Flags.idl.
+ * fileapi/LocalFileSystem.cpp: Renamed from WebCore/storage/LocalFileSystem.cpp.
+ * fileapi/LocalFileSystem.h: Renamed from WebCore/storage/LocalFileSystem.h.
+ * fileapi/Metadata.h: Renamed from WebCore/storage/Metadata.h.
+ * fileapi/Metadata.idl: Renamed from WebCore/storage/Metadata.idl.
+ * fileapi/MetadataCallback.h: Renamed from WebCore/storage/MetadataCallback.h.
+ * fileapi/MetadataCallback.idl: Renamed from WebCore/storage/MetadataCallback.idl.
+
+2010-08-31 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Prepare RenderSVGContainer culling patch
+ https://bugs.webkit.org/show_bug.cgi?id=44955
+
+ Add styleWillChange methods for all SVG renderers, that call setNeedsBoundariesUpdate().
+ It's currently a no-op, but will be used once the containers cache their boundaries, which
+ happens in a follow-up patch.
+
+ * rendering/RenderSVGBlock.cpp:
+ (WebCore::RenderSVGBlock::styleWillChange): Call setNeedsBoundariesUpdate().
+ * rendering/RenderSVGBlock.h:
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::styleWillChange): Ditto.
+ * rendering/RenderSVGImage.h:
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::styleWillChange): Ditto.
+ * rendering/RenderSVGInline.h:
+ * rendering/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::styleWillChange): Ditto.
+ * rendering/RenderSVGModelObject.h:
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::styleWillChange): Ditto.
+ * rendering/RenderSVGRoot.h:
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBox): Skip hidden containers, not necessary to traverse them.
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::diff): svg-shadow changes need to cause relayouts, not only repaints, once container bounds are cached.
+
+2010-08-31 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44915
+ Need to handle CSSValueAuto in CSSPrimitiveValue::operator ETextAlign()
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map TAAUTO to -webkit-auto. "auto" is
+ not a valid text-align value. We use TAAUTO internally for the nameless value that acts
+ as left if direction:ltr and right for direction:rtl.
+
+2010-08-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Martin Robinson.
+
+ [EFL] Add PlatformVideoWindowEfl.cpp for WebKit EFL
+ https://bugs.webkit.org/show_bug.cgi?id=44508
+
+ Add PlatformVideoWindowEfl.cpp in order to use gstreamer by
+ WebKit EFL.
+
+ * platform/graphics/gstreamer/PlatformVideoWindow.h:
+ (WebCore::PlatformVideoWindow::window):
+ (WebCore::PlatformVideoWindow::videoWindowId):
+ * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Added.
+ (PlatformVideoWindow::PlatformVideoWindow):
+ (PlatformVideoWindow::~PlatformVideoWindow):
+ * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Include <gtk/gtk.h> directly.
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * WebCore.exp.in:
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setActive):
+ * page/Frame.cpp:
+ (WebCore::Frame::Frame):
+ * page/Frame.h:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::enterCompositingMode):
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::needsLayout):
+ (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
+ * page/FrameView.h:
+ * page/Page.cpp:
+ (WebCore::Page::scheduleForcedStyleRecalcForAllPages):
+ * page/Page.h:
+ * page/Settings.cpp:
+ (WebCore::setNeedsRecalcStyleInAllFrames):
+ (WebCore::setLoadsImagesAutomaticallyInAllFrames):
+ (WebCore::Settings::setStandardFontFamily):
+ (WebCore::Settings::setFixedFontFamily):
+ (WebCore::Settings::setSerifFontFamily):
+ (WebCore::Settings::setSansSerifFontFamily):
+ (WebCore::Settings::setCursiveFontFamily):
+ (WebCore::Settings::setFantasyFontFamily):
+ (WebCore::Settings::setMinimumFontSize):
+ (WebCore::Settings::setMinimumLogicalFontSize):
+ (WebCore::Settings::setDefaultFontSize):
+ (WebCore::Settings::setDefaultFixedFontSize):
+ (WebCore::Settings::setLoadsImagesAutomatically):
+ (WebCore::Settings::setTextAreasAreResizable):
+ (WebCore::Settings::setAuthorAndUserStylesEnabled):
+ (WebCore::Settings::setFontRenderingMode):
+ (WebCore::Settings::setZoomMode):
+ (WebCore::Settings::setAcceleratedCompositingEnabled):
+ (WebCore::Settings::setShowDebugBorders):
+ (WebCore::Settings::setShowRepaintCounter):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::platformColorsDidChange):
+
+2010-08-31 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Unfork Chromium's FontPlatformDataChromiumMac.mm.
+
+ Modified FontPlatformDataCocoa to provide hooks needed by Chromium.
+ Moved Chromium's mechanics for OOP font loading to CrossProcessFontLoading.mm.
+ Added ::create() function to MemoryActivatedFont to match new guidelines for
+ RefCounted<> classes.
+
+ Not possible to test due to sandbox interaction.
+
+ * WebCore.gypi: Update files for chromium build.
+ * platform/graphics/chromium/CrossProcessFontLoading.h: Added.
+ (WebCore::MemoryActivatedFont::cgFont):
+ (WebCore::MemoryActivatedFont::atsFontRef):
+ * platform/graphics/chromium/CrossProcessFontLoading.mm: Added.
+ (WebCore::MemoryActivatedFont::create):
+ (WebCore::MemoryActivatedFont::MemoryActivatedFont):
+ (WebCore::MemoryActivatedFont::~MemoryActivatedFont):
+ (WebCore::FontPlatformData::loadFont):
+ * platform/graphics/chromium/FontPlatformDataChromiumMac.mm: Removed.
+ * platform/graphics/cocoa/FontPlatformData.h:
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+ (WebCore::FontPlatformData::loadFont):
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::operator=):
+ (WebCore::FontPlatformData::setFont):
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Adam Barth.
+
+ [GTK] warning: unused variable "queryResult"
+ https://bugs.webkit.org/show_bug.cgi?id=44998
+
+ No new tests as functionality has not changed.
+
+ * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+ (WebCore::GStreamerGWorld::enterFullscreen): Move queryResult within the gstreamer
+ version guards, where it is used.
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Refinement to previous checkin for pagination of block-level replaced elements. Don't bother to
+ paginate floating block-level replaced elements for now.
+
+ Added fast/multicol/float-pagination-failure.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintChildren):
+
+2010-08-31 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Add LocalFileSystem.requestFileSystem interface to DOMWindow
+ https://bugs.webkit.org/show_bug.cgi?id=44734
+
+ No new tests; tests will be added later.
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::fileSystemEnabled):
+ (WebCore::RuntimeEnabledFeatures::setFileSystemEnabled):
+ (WebCore::RuntimeEnabledFeatures::requestFileSystemEnabled):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::requestFileSystem):
+ * page/DOMWindow.h:
+ (WebCore::DOMWindow::):
+ * page/DOMWindow.idl:
+ * page/Settings.cpp:
+ (WebCore::Settings::setFileSystemRootPath):
+ * page/Settings.h:
+ (WebCore::Settings::fileSystemRootPath):
+
+2010-08-31 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Adam Barth.
+
+ [BREWMP] Add PLATFORM(BREWMP) guard to PluginViewNone
+ https://bugs.webkit.org/show_bug.cgi?id=44768
+
+ Build fix. Add PLATFORM(BREWMP) guard to add dummy PluginView::privateBrowsingStateChanged
+ and PluginView::setJavaScriptPaused.
+
+ * plugins/PluginViewNone.cpp:
+
+2010-08-31 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Adam Barth.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40947
+ <rdar://problem/8124723> REGRESSION (r57544): XMLHttpRequest POSTed multipart/form-data
+ wrongfully gets a charset appended
+
+ Test: http/tests/xmlhttprequest/post-with-boundary.html
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::replaceCharsetInMediaType): Changed to only set charset if it was already present,
+ and never append.
+ (WebCore::XMLHttpRequest::send): Updated for replaceCharsetInMediaType renaming.
+
+2010-08-31 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Implement Readable/Writable versions of ChromiumDataObjectNew
+ https://bugs.webkit.org/show_bug.cgi?id=44917
+
+ This is the second of several patches to update Chromium to support
+ arbitrary data types in event.dataTransfer.
+ ReadableDataObject simply calls through to several Chromium IPCs to
+ retrieve the appropriate data.
+ WritableDataObject ostensibly buffers arbitrary data internally until
+ a call is made to flush the data to the platform-specific abstraction;
+ unfortunately, a special exception is currently made for pasteboard
+ handling due to how it is handled in WebCore.
+
+ No new tests.
+
+ * WebCore.gypi:
+ * platform/chromium/ChromiumDataObjectNew.h: Removed.
+ * platform/chromium/ClipboardChromium.cpp:
+ * platform/chromium/ClipboardMimeTypes.cpp: Added.
+ * platform/chromium/ClipboardMimeTypes.h: Added.
+ * platform/chromium/ReadableDataObject.cpp: Added.
+ (WebCore::clipboardBuffer):
+ (WebCore::ReadableDataObject::create):
+ (WebCore::ReadableDataObject::ReadableDataObject):
+ (WebCore::ReadableDataObject::hasData):
+ (WebCore::ReadableDataObject::types):
+ (WebCore::ReadableDataObject::getData):
+ (WebCore::ReadableDataObject::getURL):
+ (WebCore::ReadableDataObject::getHTML):
+ (WebCore::ReadableDataObject::hasFilenames):
+ (WebCore::ReadableDataObject::filenames):
+ (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
+ * platform/chromium/ReadableDataObject.h: Added.
+ * platform/chromium/WritableDataObject.cpp: Added.
+ (WebCore::WritableDataObject::create):
+ (WebCore::WritableDataObject::WritableDataObject):
+ (WebCore::WritableDataObject::clearData):
+ (WebCore::WritableDataObject::clearAllExceptFiles):
+ (WebCore::WritableDataObject::clearAll):
+ (WebCore::WritableDataObject::setData):
+ (WebCore::WritableDataObject::setURL):
+ (WebCore::WritableDataObject::setHTML):
+ (WebCore::WritableDataObject::dataMap):
+ (WebCore::WritableDataObject::urlTitle):
+ (WebCore::WritableDataObject::htmlBaseURL):
+ (WebCore::WritableDataObject::fileExtension):
+ (WebCore::WritableDataObject::fileContentFilename):
+ (WebCore::WritableDataObject::fileContent):
+ (WebCore::WritableDataObject::setFileExtension):
+ (WebCore::WritableDataObject::setFileContentFilename):
+ (WebCore::WritableDataObject::setFileContent):
+ * platform/chromium/WritableDataObject.h: Added.
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Null-deref when decoding web archive with no data key in LegacyWebArchive::createResource
+ https://bugs.webkit.org/show_bug.cgi?id=45000
+
+ Test: webarchive/loading/missing-data.html
+
+ * loader/archive/cf/LegacyWebArchive.cpp:
+ (WebCore::LegacyWebArchive::createResource): Use wrapCFData instead of CFDataGetBytePtr/GetLength,
+ which is both more efficient, and can handle null. Also fixed incorrect use of ParsedURLString,
+ since the string is coming from a file and so there are no guarantees about its format.
+
+2010-08-31 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Chris Marrin.
+
+ Add length and related operations to FloatPoint and FloatSize
+ https://bugs.webkit.org/show_bug.cgi?id=44994
+
+ Added length and squared length operations to both FloatPoint and
+ FloatSize, and added set(x, y), dot and normalize operations to
+ FloatPoint. These changes have been tested with new code to be
+ added later.
+
+ * platform/graphics/FloatPoint.cpp:
+ (WebCore::FloatPoint::normalize):
+ (WebCore::FloatPoint::length):
+ * platform/graphics/FloatPoint.h:
+ (WebCore::FloatPoint::set):
+ (WebCore::FloatPoint::dot):
+ (WebCore::FloatPoint::lengthSquared):
+ (WebCore::operator*):
+ * platform/graphics/FloatSize.cpp:
+ (WebCore::FloatSize::diagonalLength):
+ * platform/graphics/FloatSize.h:
+ (WebCore::FloatSize::diagonalLengthSquared):
+
+2010-08-31 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ gl-teximage.html and tex-image-and-sub-image-2d-with-image.html failed on Chromium Mac bots (10.5)
+ https://bugs.webkit.org/show_bug.cgi?id=44993
+
+ * platform/graphics/cg/GraphicsContext3DCG.cpp:
+ (WebCore::GraphicsContext3D::getImageData): Take into consideration the source image pixel row alignment.
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [CMake] Unify GENERATE_DOM_NAMES code
+ https://bugs.webkit.org/show_bug.cgi?id=44842
+
+ * CMakeLists.txt: Added property svn:eol-style.
+
+2010-08-31 Beth Dakin <bdakin@apple.com>
+
+ Rubber-stamped by Dan Bernstein..
+
+ Variable name change. m_shouldFirePostLayoutTimer is now
+ m_hasPendingPostLayoutTasks
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ (WebCore::FrameView::~FrameView):
+ (WebCore::FrameView::reset):
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::performPostLayoutTasks):
+ * page/FrameView.h:
+
+2010-08-31 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=44828 FrameView
+ should make more calls to postLayoutTasks() using the timer
+ -and corresponding-
+ <rdar://problem/8064938>
+
+ This change only allows synchronous calls to postLayoutTasks() if
+ we are not already in a synchronous call to postLayoutTasks().
+ Furthermore, it de-couples the notion of "the post layout timer
+ should fire" from m_postLayoutTasksTimer.isActive(), instead using
+ a boolean to track the need to use the timer.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ (WebCore::FrameView::~FrameView):
+ (WebCore::FrameView::reset):
+ (WebCore::FrameView::layout):
+ (WebCore::FrameView::unscheduleRelayout):
+ (WebCore::FrameView::performPostLayoutTasks):
+ * page/FrameView.h:
+
+2010-08-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix 32-bit WebKit2 build.
+
+ * WebCore.exp.in:
+
+2010-08-31 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Regression in r63528: Custom http headers for loads of type
+ FrameLoadTypeReloadFromOrigin are not being correctly
+ propagated to subresource loads.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44987
+
+ No tests, since DRT doesn't seem to have a way to trigger a
+ FrameLoadTypeReloadFromOrigin load.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::addExtraFieldsToRequest):
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add ability to count text matches without marking
+ https://bugs.webkit.org/show_bug.cgi?id=43996
+
+ Safari needs to be able to count text matches without triggering lots of repainting.
+ Rename markAllMatchesForText() to countMatchesForText() and add a markMatches parameter.
+
+ * WebCore.exp.in:
+ * page/Frame.cpp:
+ (WebCore::Frame::countMatchesForText):
+ * page/Frame.h:
+ * page/Page.cpp:
+ (WebCore::Page::markAllMatchesForText):
+
+2010-08-31 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler.
+
+ canPlayType("application/octet-stream") must return ""
+ https://bugs.webkit.org/show_bug.cgi?id=44985
+
+ * platform/graphics/MediaPlayer.cpp:
+ (WebCore::MediaPlayer::supportsType): Always return IsNotSupported for application/octet-stream
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] ScrollbarThemeGtk should respond to theme changes
+ https://bugs.webkit.org/show_bug.cgi?id=44782
+
+ Scrollbar is currently written with the assumption that scrollbars never change
+ thickness. In GTK+ changing the current theme can alter scrollbar thickness. This
+ change manually resizes interior frame scrollbar widgets when the GTK+ theme changes.
+ Since we are now tracking style changes, we may also cache theme properties to avoid
+ having to call moz_gtk_get_scrollbar_metrics repeatedly during rendering.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::gtkScrollbar): Added accessor for the Mozilla theming code's
+ scrollbar widget. We access it here, because RenderThemGtk takes care of initializing
+ the Mozilla code.
+ * platform/gtk/RenderThemeGtk.h: Added accessor declaration.
+ * platform/gtk/ScrollbarThemeGtk.cpp:
+ (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Update the style property cache during construction.
+ (WebCore::ScrollbarThemeGtk::registerScrollbar): Track all interior frame scrollbars.
+ (WebCore::ScrollbarThemeGtk::unregisterScrollbar): Ditto.
+ (WebCore::ScrollbarThemeGtk::updateThemeProperties): Added this method which updates the style cache.
+ (WebCore::gtkStyleSetCallback): Added this signal handler for when the style changes.
+ (WebCore::ScrollbarThemeGtk::backButtonRect): Use the style cache instead of calling moz_gtk_get_scrollbar_metrics.
+ (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
+ (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
+ (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
+ (WebCore::ScrollbarThemeGtk::thumbRect): Ditto.
+ (WebCore::ScrollbarThemeGtk::paint): Ditto.
+ (WebCore::ScrollbarThemeGtk::scrollbarThickness): Ditto.
+ (WebCore::ScrollbarThemeGtk::buttonSize): Ditto.
+ (WebCore::ScrollbarThemeGtk::minimumThumbLength): Ditto.
+ * platform/gtk/ScrollbarThemeGtk.h: Added new method declarations.
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Web archives are created with a size of 0 due to PassRefPtr mistake
+ https://bugs.webkit.org/show_bug.cgi?id=44984
+ rdar://problem/8042283
+
+ * loader/archive/ArchiveResource.cpp:
+ (WebCore::ArchiveResource::ArchiveResource): Merge the three constructors into one.
+ (WebCore::ArchiveResource::create): Merge the two create functions into one, and
+ fix the logic so there is no use of a PassRefPtr after it has been passed.
+ * loader/archive/ArchiveResource.h: Use default arguments instead of overloading
+ to cut down from three create functions to two. Remove two of the constructors.
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Expose WorkerContext.createBlobURL and WorkerContext.revokeBlobURL.
+ https://bugs.webkit.org/show_bug.cgi?id=44972
+
+ Test: fast/files/workers/worker-apply-blob-url-to-xhr.html
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::canRequest):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::createBlobURL):
+ (WebCore::WorkerContext::revokeBlobURL):
+ * workers/WorkerContext.h:
+ * workers/WorkerContext.idl:
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * editing/TextIterator.cpp:
+ (WebCore::TextIterator::handleTextBox):
+ Added a cast so we can mix int and unsigned in a single ?: expression.
+ This warns with clang, but strangely not with gcc.
+
+ * html/parser/HTMLTreeBuilder.cpp: Removed unused functions.
+ The clang compiler notices and complains about these. If we need them
+ later we should use Subversion to bring them back.
+
+2010-08-31 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Simon Fraser.
+
+ Add cross product and arithmetic operations to FloatPoint3D
+ https://bugs.webkit.org/show_bug.cgi?id=44970
+
+ Added set, move, and scale operations similar to FloatPoint's,
+ addition and subtraction operators, length, lengthSquared and
+ cross product. These changes have been tested with new code to be
+ added later.
+
+ * platform/graphics/FloatPoint3D.cpp:
+ (WebCore::FloatPoint3D::normalize):
+ (WebCore::FloatPoint3D::length):
+ * platform/graphics/FloatPoint3D.h:
+ (WebCore::FloatPoint3D::set):
+ (WebCore::FloatPoint3D::move):
+ (WebCore::FloatPoint3D::scale):
+ (WebCore::FloatPoint3D::dot):
+ (WebCore::FloatPoint3D::cross):
+ (WebCore::FloatPoint3D::lengthSquared):
+ (WebCore::operator +=):
+ (WebCore::operator -=):
+ (WebCore::operator+):
+ (WebCore::operator-):
+ (WebCore::operator*):
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Isolate all GTK+ typedefs into one file
+ https://bugs.webkit.org/show_bug.cgi?id=44900
+
+ * platform/graphics/gtk/CairoUtilities.h: Remove GTK+ typedefs.
+ * platform/gtk/ClipboardGtk.h: Ditto.
+ * platform/gtk/DataObjectGtk.h: Ditto.
+ * platform/gtk/GOwnPtrGtk.h: Ditto.
+ * platform/gtk/GRefPtrGtk.h: Ditto.
+ * platform/gtk/PasteboardHelper.h: Ditto.
+ * platform/gtk/PopupMenuGtk.h: Ditto.
+ * platform/gtk/RenderThemeGtk.h: Ditto.
+ * platform/gtk/ScrollbarGtk.h: Ditto.
+ * platform/gtk/gtk2drawing.c: Remove unused Assertions.h.
+
+2010-08-31 Tony Chang <tony@chromium.org>
+
+ Unreviewed, fix chromium compile.
+
+ * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
+
+2010-08-31 Chris Rogers <crogers@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ audio engine: add FFTConvolver class
+ https://bugs.webkit.org/show_bug.cgi?id=34907
+
+ No new tests since audio API is not yet implemented.
+
+ * platform/audio: Added.
+ * platform/audio/FFTConvolver.cpp: Added.
+ (WebCore::FFTConvolver::FFTConvolver):
+ (WebCore::FFTConvolver::process):
+ (WebCore::FFTConvolver::reset):
+ * platform/audio/FFTConvolver.h: Added.
+ (WebCore::FFTConvolver::fftSize):
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher and David Levin.
+
+ Fix ThreadableBlobRegistry methods not to rely on WorkerContext.
+ https://bugs.webkit.org/show_bug.cgi?id=44971
+
+ We could hit an ASSERT when we're performing some blob related cleanup
+ in ScriptExecutionContext destructor when WorkerContext dies. The fix
+ is to use isMainThread and callOnMainThread.
+
+ * fileapi/ThreadableBlobRegistry.cpp:
+ (WebCore::BlobRegistryContext::BlobRegistryContext):
+ (WebCore::registerBlobURLTask):
+ (WebCore::ThreadableBlobRegistry::registerBlobURL):
+ (WebCore::registerBlobURLFromTask):
+ (WebCore::unregisterBlobURLTask):
+ (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Fix 'make dist' in preparation of the 1.3.3 release
+ https://bugs.webkit.org/show_bug.cgi?id=44978
+
+ * GNUmakefile.am: Add missing and moved headers to the sources list.
+
+2010-08-31 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] crashes while dragging any contents
+ https://bugs.webkit.org/show_bug.cgi?id=44940
+
+ Fix crashes caused by returning newly assigned value instead of adoptRef
+ value.
+
+ * page/efl/EventHandlerEfl.cpp:
+ (WebCore::EventHandler::createDraggingClipboard):
+ * platform/efl/ClipboardEfl.cpp:
+ (WebCore::Editor::newGeneralClipboard):
+ * platform/efl/ClipboardEfl.h:
+ (WebCore::ClipboardEfl::create):
+
+2010-08-31 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: The parser of Inspector protocol messages should be covered by a test.
+
+ The inspector protocol is based on messages in JSON format.
+ Each message should be a JSON object with a number of properties.
+ InspectorBackendDispatcher is parsing these messages and should be
+ able to detect wrong formatted messages.
+ It has these functionality but no tests for it.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44947
+
+
+ * inspector/CodeGeneratorInspector.pm:
+
+2010-08-31 Anton Muhin <antonm@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [v8] More correct and faster error handling when converting v8 objects to various WebCore strings
+ https://bugs.webkit.org/show_bug.cgi?id=44678
+
+ Split v8 object conversion into two phase: 1st, which can throw an exception, and
+ 2nd, which must always succeed. That allows to report correctly the case when exception
+ happens.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::int32ToWebCoreString):
+ (WebCore::v8NonStringValueToWebCoreString):
+ * bindings/v8/V8Binding.h:
+ (WebCore::V8ParameterBase::operator String):
+ (WebCore::V8ParameterBase::operator AtomicString):
+ (WebCore::V8ParameterBase::V8ParameterBase):
+ (WebCore::V8ParameterBase::prepareBase):
+ (WebCore::V8ParameterBase::object):
+ (WebCore::V8ParameterBase::setString):
+ (WebCore::V8ParameterBase::toString):
+ (WebCore::):
+ (WebCore::::prepare):
+ * bindings/v8/custom/V8BindingMacros.h:
+ * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
+ (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
+ * bindings/v8/cstom/V8DeviceOrientationEventCustom.cpp:
+ (WebCore::V8DeviceMotionEvent::initDeviceOrientationEventCallback):
+
+2010-08-30 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Joseph Pecoraro.
+
+ WebInspector: it'd be better to introduce inspector API related tests.
+
+ As far as we have some kind of API for Inspector
+ it'd be better to have API related tests. This is the test
+ for API wrappers. These wrappers are tracking the types of arguments
+ of API functions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44875
+
+ Test: inspector/protocol-error.html
+
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/front-end/inspector.js:
+ (WebInspector_syncDispatch):
+ (WebInspector.reportProtocolError):
+
+2010-08-31 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66484.
+ http://trac.webkit.org/changeset/66484
+ https://bugs.webkit.org/show_bug.cgi?id=44966
+
+ Broke EFL build (Requested by acidx on #webkit).
+
+ * CMakeLists.txt:
+
+2010-08-31 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ deduplicate code from Node::checkReplaceChild and Node::checkAddChild
+ https://bugs.webkit.org/show_bug.cgi?id=44962
+
+ Remove duplicate code in preparation for fixing https://bugs.webkit.org/show_bug.cgi?id=19524
+ No new tests since there is no change in functionality.
+
+ * dom/Node.cpp:
+ (WebCore::isChildTypeAllowed):
+ (WebCore::Node::canReplaceChild):
+ (WebCore::checkAcceptChild):
+ (WebCore::transferOwnerDocument):
+ (WebCore::Node::checkReplaceChild):
+ (WebCore::Node::checkAddChild):
+
+2010-08-30 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ [Chromium] bindTexture(TEXTURE_CUBE_MAP) shouldn't generate errors with valid cubemap texture
+ https://bugs.webkit.org/show_bug.cgi?id=44922
+
+ * html/canvas/WebGLRenderingContext.cpp: Remove TEXTURE_WRAP_R code.
+ (WebCore::WebGLRenderingContext::bindTexture):
+ * html/canvas/WebGLTexture.cpp: Remove the code for tracking TEXTURE_WRAP_R.
+ (WebCore::WebGLTexture::WebGLTexture):
+ * html/canvas/WebGLTexture.h: Ditto.
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Rubber-stamped by David Levin.
+
+ Rename addTwoCStrings to concatenateTwoCStrings.
+
+ * fileapi/BlobBuilder.cpp:
+ (WebCore::concatenateTwoCStrings):
+ (WebCore::BlobBuilder::append):
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Improve BlobBuilder to combine adjacent strings.
+ https://bugs.webkit.org/show_bug.cgi?id=44884
+
+ * fileapi/BlobBuilder.cpp:
+ (WebCore::addTwoCStrings):
+ (WebCore::BlobBuilder::append):
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make DOM classes start with a reference count of 1, like all other RefCounted
+ https://bugs.webkit.org/show_bug.cgi?id=28068
+
+ * dom/Document.cpp:
+ (WebCore::Document::accessSVGExtensions): Use adoptPtr instead of set.
+
+ * dom/Document.h: Removed initialRefCount in Node constructor. It's always 1 now.
+
+ * dom/Node.h: Removed CreateWithZeroRefCountFlag, CreateStyledElementZeroRefCount,
+ CreateSVGElementZeroRefCount, and initialRefCount.
+
+ * platform/TreeShared.h: Removed initialRefCount argument. It's always 1 now.
+
+ * rendering/RenderSVGShadowTreeRootContainer.cpp:
+ (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement): Use create
+ instead of new.
+
+ * rendering/SVGResources.h: Inherit from Noncopyable.
+
+ * rendering/SVGResourcesCache.cpp:
+ (WebCore::SVGResourcesCache::~SVGResourcesCache): Removed unneeded special
+ case code.
+
+ * rendering/SVGShadowTreeElements.cpp:
+ (WebCore::SVGShadowTreeContainerElement::create): Added.
+ (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): Made argument
+ type more specific.
+ (WebCore::SVGShadowTreeRootElement::create): Added.
+ * rendering/SVGShadowTreeElements.h: Added create functions, and made the
+ argument type more specific.
+
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::SVGDocumentExtensions): Use adoptPtr.
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged): Use adoptPtr instead of set.
+
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::SVGElement): Use CreateSVGElement instead of
+ CreateSVGElementZeroRefCount.
+ (WebCore::SVGElement::create): Use adoptRef.
+
+ * wml/WMLElement.cpp:
+ (WebCore::WMLElement::WMLElement): Use CreateStyledElement instead of
+ CreateStyledElementZeroRefCount.
+ (WebCore::WMLElement::create): Use adoptRef.
+
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::create):
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::create):
+ * svg/SVGAnimateColorElement.cpp:
+ (WebCore::SVGAnimateColorElement::create):
+ * svg/SVGAnimateElement.cpp:
+ (WebCore::SVGAnimateElement::create):
+ * svg/SVGAnimateMotionElement.cpp:
+ (WebCore::SVGAnimateMotionElement::create):
+ * svg/SVGAnimateTransformElement.cpp:
+ (WebCore::SVGAnimateTransformElement::create):
+ * svg/SVGCircleElement.cpp:
+ (WebCore::SVGCircleElement::create):
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::create):
+ * svg/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::create):
+ * svg/SVGDefsElement.cpp:
+ (WebCore::SVGDefsElement::create):
+ * svg/SVGDescElement.cpp:
+ (WebCore::SVGDescElement::create):
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::create):
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::create):
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::create):
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::create):
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::create):
+ * svg/SVGFEConvolveMatrixElement.cpp:
+ (WebCore::SVGFEConvolveMatrixElement::create):
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::create):
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::create):
+ * svg/SVGFEDistantLightElement.cpp:
+ (WebCore::SVGFEDistantLightElement::create):
+ * svg/SVGFEFloodElement.cpp:
+ (WebCore::SVGFEFloodElement::create):
+ * svg/SVGFEFuncAElement.cpp:
+ (WebCore::SVGFEFuncAElement::create):
+ * svg/SVGFEFuncBElement.cpp:
+ (WebCore::SVGFEFuncBElement::create):
+ * svg/SVGFEFuncGElement.cpp:
+ (WebCore::SVGFEFuncGElement::create):
+ * svg/SVGFEFuncRElement.cpp:
+ (WebCore::SVGFEFuncRElement::create):
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::create):
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::create):
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::create):
+ * svg/SVGFEMergeNodeElement.cpp:
+ (WebCore::SVGFEMergeNodeElement::create):
+ * svg/SVGFEMorphologyElement.cpp:
+ (WebCore::SVGFEMorphologyElement::create):
+ * svg/SVGFEOffsetElement.cpp:
+ (WebCore::SVGFEOffsetElement::create):
+ * svg/SVGFEPointLightElement.cpp:
+ (WebCore::SVGFEPointLightElement::create):
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::create):
+ * svg/SVGFESpotLightElement.cpp:
+ (WebCore::SVGFESpotLightElement::create):
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::create):
+ * svg/SVGFETurbulenceElement.cpp:
+ (WebCore::SVGFETurbulenceElement::create):
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::create):
+ * svg/SVGFontElement.cpp:
+ (WebCore::SVGFontElement::create):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::create):
+ * svg/SVGFontFaceFormatElement.cpp:
+ (WebCore::SVGFontFaceFormatElement::create):
+ * svg/SVGFontFaceNameElement.cpp:
+ (WebCore::SVGFontFaceNameElement::create):
+ * svg/SVGFontFaceSrcElement.cpp:
+ (WebCore::SVGFontFaceSrcElement::create):
+ * svg/SVGFontFaceUriElement.cpp:
+ (WebCore::SVGFontFaceUriElement::create):
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::create):
+ * svg/SVGGElement.cpp:
+ (WebCore::SVGGElement::create):
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::SVGGlyphElement::create):
+ * svg/SVGHKernElement.cpp:
+ (WebCore::SVGHKernElement::create):
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::create):
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::create):
+ * svg/SVGLinearGradientElement.cpp:
+ (WebCore::SVGLinearGradientElement::create):
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::create):
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::create):
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::create):
+ * svg/SVGMetadataElement.cpp:
+ (WebCore::SVGMetadataElement::create):
+ * svg/SVGMissingGlyphElement.cpp:
+ (WebCore::SVGMissingGlyphElement::create):
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::create):
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::create):
+ * svg/SVGPolygonElement.cpp:
+ (WebCore::SVGPolygonElement::create):
+ * svg/SVGPolylineElement.cpp:
+ (WebCore::SVGPolylineElement::create):
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::create):
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::create):
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::create):
+ (WebCore::SVGSVGElement::currentView):
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::create):
+ * svg/SVGSetElement.cpp:
+ (WebCore::SVGSetElement::create):
+ * svg/SVGStopElement.cpp:
+ (WebCore::SVGStopElement::create):
+ * svg/SVGStyleElement.cpp:
+ (WebCore::SVGStyleElement::create):
+ * svg/SVGSwitchElement.cpp:
+ (WebCore::SVGSwitchElement::create):
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::create):
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::create):
+ * svg/SVGTSpanElement.cpp:
+ (WebCore::SVGTSpanElement::create):
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::create):
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::create):
+ * svg/SVGTitleElement.cpp:
+ (WebCore::SVGTitleElement::create):
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::create):
+ (WebCore::SVGUseElement::expandUseElementsInShadowTree):
+ * svg/SVGVKernElement.cpp:
+ (WebCore::SVGVKernElement::create):
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::create):
+ * wml/WMLAElement.cpp:
+ (WebCore::WMLAElement::create):
+ * wml/WMLAccessElement.cpp:
+ (WebCore::WMLAccessElement::create):
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::create):
+ * wml/WMLBRElement.cpp:
+ (WebCore::WMLBRElement::create):
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::create):
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::create):
+ * wml/WMLDocument.h:
+ (WebCore::WMLDocument::create):
+ * wml/WMLFieldSetElement.cpp:
+ (WebCore::WMLFieldSetElement::create):
+ * wml/WMLFormControlElement.cpp:
+ (WebCore::WMLFormControlElement::create):
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::create):
+ * wml/WMLImageElement.cpp:
+ (WebCore::WMLImageElement::create):
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::create):
+ * wml/WMLInsertedLegendElement.cpp:
+ (WebCore::WMLInsertedLegendElement::create):
+ * wml/WMLIntrinsicEvent.cpp:
+ (WebCore::WMLIntrinsicEvent::create):
+ * wml/WMLMetaElement.cpp:
+ (WebCore::WMLMetaElement::create):
+ * wml/WMLNoopElement.cpp:
+ (WebCore::WMLNoopElement::create):
+ * wml/WMLOnEventElement.cpp:
+ (WebCore::WMLOnEventElement::create):
+ * wml/WMLOptGroupElement.cpp:
+ (WebCore::WMLOptGroupElement::create):
+ * wml/WMLOptionElement.cpp:
+ (WebCore::WMLOptionElement::create):
+ * wml/WMLPElement.cpp:
+ (WebCore::WMLPElement::create):
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::create):
+ * wml/WMLPrevElement.cpp:
+ (WebCore::WMLPrevElement::create):
+ * wml/WMLRefreshElement.cpp:
+ (WebCore::WMLRefreshElement::create):
+ * wml/WMLSelectElement.cpp:
+ (WebCore::WMLSelectElement::create):
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::create):
+ * wml/WMLTableElement.cpp:
+ (WebCore::WMLTableElement::create):
+ * wml/WMLTaskElement.cpp:
+ (WebCore::WMLTaskElement::create):
+ * wml/WMLTemplateElement.cpp:
+ (WebCore::WMLTemplateElement::create):
+ * wml/WMLTimerElement.cpp:
+ (WebCore::WMLTimerElement::create):
+ Use adoptRef.
+
+2010-08-31 Justin Schuh <jschuh@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Local frame loads should check against origin (not referrer)
+ https://bugs.webkit.org/show_bug.cgi?id=44888
+
+ Test: fast/frames/iframe-no-src-local-origin-allow.html
+
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::loadSubframe):
+
+2010-08-25 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (cg)
+ https://bugs.webkit.org/show_bug.cgi?id=44566
+
+ * platform/graphics/cg/GraphicsContext3DCG.cpp:
+ (WebCore::GraphicsContext3D::getImageData): Fix the premultiplyAlpha issue for cg.
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Adam Roben.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44956, paginate block-level replaced elements.
+ <rdar://problem/8000991> Images with display:block get split between columns or pages
+
+ Added fast/multicol/paginate-block-replaced.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintChildren):
+
+2010-08-31 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36515
+ CSS style definitions are ignored if they just follow a "@charset" which appears in lines
+ other than the first line in stylesheet.
+
+ Test: fast/css/misplaced-charset.html
+
+ * css/CSSGrammar.y: Ignore a misplaced charset rule without consuming extra characters and
+ thus breaking subsequent rules.
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Antonio Gomes.
+
+ [CMake] Add IF (ENABLE_MATHML) around MathML sources
+ https://bugs.webkit.org/show_bug.cgi?id=44927
+
+ * CMakeLists.txt:
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [CMake] Unify GENERATE_DOM_NAMES code
+ https://bugs.webkit.org/show_bug.cgi?id=44842
+
+ * CMakeLists.txt: Added property svn:eol-style.
+
+2010-08-31 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Add an interface for platform copy/paste drag/drop data objects
+ https://bugs.webkit.org/show_bug.cgi?id=44914
+
+ Currently, Chromium only supports a few hardcoded data types in
+ event.dataTransfer. This is the first of several patches to add support
+ for arbitrary data types.
+
+ No new tests.
+
+ * WebCore.gypi:
+ * platform/chromium/ChromiumDataObjectNew.h: Added.
+ * platform/chromium/ClipboardChromium.cpp:
+
+2010-08-30 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: add audits support to extension API
+ Exposed (late) adding of categories from AuditPanel.
+ Removed indexOfObjectInListSortedByFunction in favor of
+ insertionIndexForObjectInListSortedByFunction (the former had
+ weird interface always returning negative numbers and was only used in
+ the latter).
+ https://bugs.webkit.org/show_bug.cgi?id=44518
+
+ Tests: inspector/extensions-audits-api.html
+ inspector/extensions-audits.html
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/AuditFormatters.js: Added.
+ (WebInspector.applyFormatters):
+ (WebInspector.AuditFormatters.text):
+ (WebInspector.AuditFormatters.snippet):
+ (WebInspector.AuditFormatters.concat):
+ (WebInspector.AuditFormatters.url):
+ * inspector/front-end/AuditLauncherView.js:
+ (WebInspector.AuditLauncherView):
+ (WebInspector.AuditLauncherView.prototype.addCategory.compareCategories):
+ (WebInspector.AuditLauncherView.prototype.addCategory):
+ (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
+ (WebInspector.AuditLauncherView.prototype._selectAllClicked):
+ (WebInspector.AuditLauncherView.prototype._categoryClicked):
+ (WebInspector.AuditLauncherView.prototype._createCategoryElement):
+ (WebInspector.AuditLauncherView.prototype._createLauncherUI):
+ * inspector/front-end/AuditResultView.js:
+ (WebInspector.AuditCategoryResultPane.prototype._appendResult):
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel):
+ (WebInspector.AuditsPanel.prototype.addCategory):
+ (WebInspector.AuditsPanel.prototype.getCategory):
+ (WebInspector.AuditsPanel.prototype._executeAudit):
+ (WebInspector.AuditCategory.prototype.run):
+ * inspector/front-end/ExtensionAPI.js:
+ (WebInspector.injectedExtensionAPI):
+ (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype.addListener):
+ (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype._fire):
+ (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype._dispatch):
+ (WebInspector.injectedExtensionAPI.EventSink):
+ (WebInspector.injectedExtensionAPI.InspectorExtensionAPI):
+ (WebInspector.injectedExtensionAPI.Panels.prototype.create):
+ (WebInspector.injectedExtensionAPI.Audits):
+ (WebInspector.injectedExtensionAPI.Audits.prototype.addCategory):
+ (WebInspector.injectedExtensionAPI.AuditCategory.customDispatch):
+ (WebInspector.injectedExtensionAPI.AuditCategory):
+ (WebInspector.injectedExtensionAPI.AuditCategoryImpl):
+ (WebInspector.injectedExtensionAPI.AuditResult):
+ (WebInspector.injectedExtensionAPI.AuditResult.prototype.get Severity):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.addResult):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.createResult):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype.done):
+ (WebInspector.injectedExtensionAPI.AuditResultImpl.prototype._nodeFactory):
+ (WebInspector.injectedExtensionAPI.AuditResultNode):
+ (WebInspector.injectedExtensionAPI.AuditResultNode.prototype.addChild):
+ * inspector/front-end/ExtensionAuditCategory.js: Added.
+ (WebInspector.ExtensionAuditCategory):
+ (WebInspector.ExtensionAuditCategory.prototype.get id):
+ (WebInspector.ExtensionAuditCategory.prototype.get displayName):
+ (WebInspector.ExtensionAuditCategory.prototype.get ruleCount):
+ (WebInspector.ExtensionAuditCategory.prototype.run):
+ (WebInspector.ExtensionAuditCategoryResults):
+ (WebInspector.ExtensionAuditCategoryResults.prototype.get complete):
+ (WebInspector.ExtensionAuditCategoryResults.prototype.cancel):
+ (WebInspector.ExtensionAuditCategoryResults.prototype.addResult):
+ (WebInspector.ExtensionAuditCategoryResults.prototype._addNode):
+ (WebInspector.ExtensionAuditCategoryResults.prototype._addResult):
+ * inspector/front-end/ExtensionCommon.js: Added.
+ (WebInspector.commonExtensionSymbols):
+ * inspector/front-end/ExtensionServer.js:
+ (WebInspector.ExtensionServer):
+ (WebInspector.ExtensionServer.prototype.startAuditRun):
+ (WebInspector.ExtensionServer.prototype.stopAuditRun):
+ (WebInspector.ExtensionServer.prototype._postNotification):
+ (WebInspector.ExtensionServer.prototype._onAddAuditCategory):
+ (WebInspector.ExtensionServer.prototype._onAddAuditResult):
+ (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun):
+ (WebInspector.ExtensionServer.prototype._addExtensions):
+ (WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
+ (WebInspector.ExtensionStatus):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/utilities.js:
+ ():
+
+2010-08-31 Justin Schuh <jschuh@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Remove unused canReferToParentFrameEncoding() function from FrameLoader.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=44895
+
+ No new tests; no behavior changed.
+
+ * loader/FrameLoader.cpp:
+
+2010-08-31 Jeremy Orlow <jorlow@chromium.org>
+
+ Build fix.
+
+ * storage/IDBObjectStoreBackendImpl.cpp:
+ (WebCore::IDBObjectStoreBackendImpl::openCursor):
+
+2010-08-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Implement the rest of IDBCursors + make them persistent
+ https://bugs.webkit.org/show_bug.cgi?id=44546
+
+ Because the old (memory only) backend didn't support ranges, IDBCursors
+ were never really finished. This completes them on top of SQLite like
+ the rest of IndexedDB.
+
+ Test: storage/indexeddb/objectstore-cursor.html
+
+ * storage/IDBCursor.cpp:
+ (WebCore::IDBCursor::value):
+ * storage/IDBCursorBackendImpl.cpp:
+ (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
+ (WebCore::IDBCursorBackendImpl::key):
+ (WebCore::IDBCursorBackendImpl::value):
+ (WebCore::IDBCursorBackendImpl::update):
+ (WebCore::IDBCursorBackendImpl::continueFunction):
+ (WebCore::IDBCursorBackendImpl::remove):
+ (WebCore::IDBCursorBackendImpl::loadCurrentRow):
+ * storage/IDBCursorBackendImpl.h:
+ (WebCore::IDBCursorBackendImpl::create):
+ * storage/IDBCursorBackendInterface.h:
+ * storage/IDBKey.cpp:
+ (WebCore::IDBKey::isEqual):
+ * storage/IDBKey.h:
+ * storage/IDBKeyRange.cpp:
+ (WebCore::IDBKeyRange::leftBound):
+ (WebCore::IDBKeyRange::rightBound):
+ (WebCore::IDBKeyRange::bound):
+ * storage/IDBObjectStoreBackendImpl.cpp:
+ (WebCore::cursorWhereFragment):
+ (WebCore::IDBObjectStoreBackendImpl::openCursor):
+
+2010-08-27 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Notifications should support a click event
+ https://bugs.webkit.org/show_bug.cgi?id=44800
+
+ Test: fast/notifications/notifications-click-event.html
+
+ * notifications/Notification.h:
+ * notifications/Notification.idl:
+
+2010-08-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [V8] Custom binding for "dataset"
+ https://bugs.webkit.org/show_bug.cgi?id=44930
+
+ * WebCore.gyp/WebCore.gyp: Remove the exclusion of DOMStringMap.idl.
+ * WebCore.gypi: Add V8DOMStringMapCustom.cpp.
+ * bindings/v8/custom/V8DOMStringMapCustom.cpp: Added.
+ (WebCore::V8DOMStringMap::namedPropertyQuery):
+ (WebCore::V8DOMStringMap::namedPropertyGetter):
+ (WebCore::V8DOMStringMap::namedPropertyEnumerator):
+ (WebCore::V8DOMStringMap::namedPropertyDeleter):
+ (WebCore::V8DOMStringMap::namedPropertySetter):
+ * dom/Element.idl: Remove V8 exclusion.
+ * page/DOMWindow.idl: ditto.
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Fix chromium build break.
+
+ * page/DOMWindow.h:
+
+2010-08-31 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Stale document crashes at multiple URLs (with new parser)
+ https://bugs.webkit.org/show_bug.cgi?id=44885
+
+ We're not supposed to load resources in detached documents. According
+ to several locations I examined, it's the job of the caller of
+ DocLoader to check this invariant. Like most code dealing with
+ detached documents, this check isn't overly consistent. At some point,
+ we'll need to rationalize all the different patterns here. However, at
+ this point, this patch appears correct because it matches what we do
+ for <link rel="stylesheet">.
+
+ Test: fast/dom/HTMLLinkElement/prefetch-detached.html
+
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::process):
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::requestLinkPrefetch):
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Expose window.createBlobURL and window.revokeBlobURL.
+ https://bugs.webkit.org/show_bug.cgi?id=44908
+
+ Tests: fast/files/apply-blob-url-to-img.html
+ fast/files/apply-blob-url-to-xhr.html
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::createBlobURL):
+ (WebCore::DOMWindow::revokeBlobURL):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::createRequest):
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Support FileReaderSync in workers.
+ https://bugs.webkit.org/show_bug.cgi?id=44657
+
+ Also add FileException interface and make Blob/File/FileError useable in
+ workers.
+
+ Tests: fast/files/workers/worker-read-blob-async.html
+ fast/files/workers/worker-read-blob-sync.html
+ fast/files/workers/worker-read-file-async.html
+ fast/files/workers/worker-read-file-sync.html
+
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * fileapi/Blob.idl: Added NoStaticTables attribute.
+ * fileapi/File.idl: Added NoStaticTables attribute.
+ * fileapi/FileError.idl: Added NoStaticTables attribute.
+ * fileapi/FileException.h: Added.
+ * fileapi/FileException.idl: Added.
+ * fileapi/FileReaderSync.cpp: Added.
+ * fileapi/FileReaderSync.h: Added.
+ * fileapi/FileReaderSync.idl: Added.
+ * workers/WorkerContext.idl: Expose FileReaderSync and BlodBuilder in workers.
+
+2010-08-30 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Buffered ranges drawing support
+ https://bugs.webkit.org/show_bug.cgi?id=44869
+
+ Refactored the media slider track painting code to support
+ multiple buffered ranges painting. This change introduces no
+ functional regression.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::paintMediaSliderTrack):
+
+2010-08-30 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
+ https://bugs.webkit.org/show_bug.cgi?id=44315
+
+ Remove check in RedirectScheduler::scheduleHistoryNavigation that would
+ dispatch some navigations synchronously.
+
+ Test: fast/history/history-traversal-is-asynchronous.html
+
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+
+2010-08-30 Jian Li <jianli@chromium.org>
+
+ Try to fix break again.
+
+ * fileapi/ThreadableBlobRegistry.cpp:
+ (WebCore::ThreadableBlobRegistry::registerBlobURL):
+ (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
+
+2010-08-30 Jian Li <jianli@chromium.org>
+
+ Fix another build break. Also fix directory upload test break.
+
+ * fileapi/File.cpp:
+ (WebCore::File::File):
+ * fileapi/ThreadableBlobRegistry.cpp:
+
+2010-08-30 Jian Li <jianli@chromium.org>
+
+ Fix build break.
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::send):
+
+2010-08-30 Jian Li <jianli@chromium.org>
+
+ Fix qt/gtk build break.
+
+ * platform/network/BlobRegistryImpl.cpp:
+
+2010-08-30 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Switch the Blob implementation to using the blob data registration model
+ https://bugs.webkit.org/show_bug.cgi?id=44389
+
+ Tests: fast/files/read-blob-async.html
+ fast/files/read-file-async.html
+
+ With this switch, File/Blob/BlobBuilder are changed to register the blob
+ data. FileReader is changed to route through loading the blob resource.
+ FormData is also updated to take BlobData. The WebKit mac implementation
+ is updated to resolve the blob references in the BlobData.
+
+ * CMakeLists.txt: Update the project file to remove BlobItem.*.
+ * GNUmakefile.am: Update the project file to remove BlobItem.*.
+ * WebCore.gypi: Update the project file to remove BlobItem.*.
+ * WebCore.pro: Update the project file to remove BlobItem.*.
+ * WebCore.vcproj/WebCore.vcproj: Update the project file to remove BlobItem.*.
+ * WebCore.xcodeproj/project.pbxproj: Update the project file to remove BlobItem.*.
+ * fileapi/Blob.cpp: Switch to using BlobData.
+ (WebCore::Blob::Blob):
+ (WebCore::Blob::slice):
+ * fileapi/Blob.h: Switch to using BlobData.
+ (WebCore::Blob::create):
+ (WebCore::Blob::size):
+ (WebCore::Blob::isFile):
+ * fileapi/BlobBuilder.cpp: Switch to using BlobData.
+ (WebCore::BlobBuilder::BlobBuilder):
+ (WebCore::BlobBuilder::append):
+ (WebCore::BlobBuilder::getBlob):
+ * fileapi/BlobBuilder.h: Switch to using BlobData.
+ * fileapi/BlobURL.cpp: Add a new helper method used in FormData.
+ (WebCore::BlobURL::getIdentifier):
+ * fileapi/BlobURL.h:
+ * fileapi/File.cpp: Switch to using BlobData.
+ (WebCore::createBlobDataForFile):
+ (WebCore::File::File):
+ (WebCore::File::size):
+ (WebCore::File::captureSnapshot):
+ * fileapi/File.h: Switch to using BlobData.
+ (WebCore::File::create):
+ (WebCore::File::path):
+ (WebCore::File::name):
+ (WebCore::File::webkitRelativePath):
+ * fileapi/FileReader.cpp: Change the reading to route through blob resource loading.
+ (WebCore::FileReader::FileReader):
+ (WebCore::FileReader::readAsBinaryString):
+ (WebCore::FileReader::readAsText):
+ (WebCore::FileReader::readAsDataURL):
+ (WebCore::delayedStart):
+ (WebCore::FileReader::readInternal):
+ (WebCore::FileReader::terminate):
+ (WebCore::FileReader::start):
+ (WebCore::FileReader::didReceiveResponse):
+ (WebCore::FileReader::didReceiveData):
+ (WebCore::FileReader::didFinishLoading):
+ (WebCore::FileReader::didFail):
+ (WebCore::FileReader::failed):
+ (WebCore::FileReader::httpStatusCodeToExceptionCode):
+ (WebCore::FileReader::result):
+ (WebCore::FileReader::convertToDataURL):
+ * fileapi/FileReader.h:
+ * html/FormDataList.cpp: Account to BlobData change.
+ (WebCore::FormDataList::appendString):
+ (WebCore::FormDataList::appendBlob):
+ * html/FormDataList.h: Account to BlobData change.
+ (WebCore::FormDataList::appendBlob):
+ (WebCore::FormDataList::Item::Item):
+ (WebCore::FormDataList::Item::data):
+ (WebCore::FormDataList::Item::blob):
+ (WebCore::FormDataList::items):
+ * loader/FormSubmission.cpp: Account to BlobData change.
+ (WebCore::FormSubmission::create):
+ * platform/BlobItem.cpp: Removed.
+ * platform/BlobItem.h: Removed.
+ * platform/network/BlobRegistryImpl.cpp: Add the implementations for resource loading.
+ (WebCore::BlobRegistryImpl::createResourceHandle):
+ (WebCore::BlobRegistryImpl::loadResourceSynchronously):
+ * platform/network/BlobResourceHandle.cpp: Fix a bug that the ref is not added.
+ (WebCore::BlobResourceHandle::BlobResourceHandle):
+ * platform/network/FormData.cpp: Account to BlobData change.
+ (WebCore::FormData::create):
+ (WebCore::FormData::createMultiPart):
+ (WebCore::FormData::deepCopy):
+ (WebCore::FormData::appendFile):
+ (WebCore::FormData::appendKeyValuePairItems):
+ * platform/network/FormData.h: Account to BlobData change.
+ * platform/network/mac/FormDataStreamMac.mm: Resolve blob references in the form data.
+ (WebCore::closeCurrentStream):
+ (WebCore::advanceCurrentStream):
+ (WebCore::formCreate):
+ (WebCore::formRead):
+ (WebCore::setHTTPBody):
+ * xml/XMLHttpRequest.cpp: Account to BlobData change.
+ (WebCore::XMLHttpRequest::send):
+
+2010-08-30 Eric Seidel <eric@webkit.org>
+
+ Unreviewed, rolling out r66418.
+ http://trac.webkit.org/changeset/66418
+ https://bugs.webkit.org/show_bug.cgi?id=44896
+
+ Adam tried to roll this out with:
+ https://bugs.webkit.org/show_bug.cgi?id=44924
+ but we hit a commit-queue edgecase and it failed, trying again.
+
+ Causing test failures on multiple bots
+
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::layout):
+ * rendering/RenderObject.cpp:
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::setNeedsBoundariesUpdate):
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::removeChildNode):
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::layout):
+ (WebCore::RenderPath::paint):
+ (WebCore::RenderPath::styleWillChange):
+ * rendering/RenderPath.h:
+ (WebCore::RenderPath::setNeedsBoundariesUpdate):
+ * rendering/RenderSVGBlock.cpp:
+ * rendering/RenderSVGBlock.h:
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::RenderSVGContainer):
+ (WebCore::RenderSVGContainer::layout):
+ (WebCore::RenderSVGContainer::paint):
+ (WebCore::RenderSVGContainer::objectBoundingBox):
+ (WebCore::RenderSVGContainer::strokeBoundingBox):
+ (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGContainer.h:
+ (WebCore::RenderSVGContainer::calculateLocalTransform):
+ * rendering/RenderSVGGradientStop.h:
+ * rendering/RenderSVGHiddenContainer.cpp:
+ (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint):
+ (WebCore::RenderSVGHiddenContainer::objectBoundingBox):
+ (WebCore::RenderSVGHiddenContainer::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGHiddenContainer.h:
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::layout):
+ * rendering/RenderSVGImage.h:
+ * rendering/RenderSVGInline.cpp:
+ * rendering/RenderSVGInline.h:
+ * rendering/RenderSVGModelObject.cpp:
+ * rendering/RenderSVGModelObject.h:
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::RenderSVGRoot):
+ (WebCore::RenderSVGRoot::layout):
+ (WebCore::RenderSVGRoot::objectBoundingBox):
+ (WebCore::RenderSVGRoot::strokeBoundingBox):
+ (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGRoot.h:
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::layout):
+ * rendering/RenderSVGTransformableContainer.cpp:
+ (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
+ * rendering/RenderSVGTransformableContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::calcViewport):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBox):
+ * rendering/SVGRenderSupport.h:
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::diff):
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement CDATASection state for the HTMLTokenizer
+ https://bugs.webkit.org/show_bug.cgi?id=44923
+
+ In the spec, this state refers back to the HTMLTreeBuilder from the
+ HTMLTokenizer. Rather that introduce that (backwards) dependencies, we
+ have the tree builder set a bit on the tokenizer.
+
+ * html/parser/HTMLTokenizer.cpp:
+ (WebCore::HTMLTokenizer::reset):
+ (WebCore::HTMLTokenizer::nextToken):
+ * html/parser/HTMLTokenizer.h:
+ (WebCore::HTMLTokenizer::shouldAllowCDATA):
+ (WebCore::HTMLTokenizer::setShouldAllowCDATA):
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::constructTreeFromToken):
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Enable HTML5lib's test_innerHTML01.dat
+ https://bugs.webkit.org/show_bug.cgi?id=44919
+
+ These tests provoked two branches that we hadn't implemented yet.
+
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTag):
+ (WebCore::HTMLTreeBuilder::processEndTag):
+
+2010-08-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Stop using a QuickDraw function that was only used for debugging purposes.
+
+ * platform/graphics/mac/SimpleFontDataMac.mm:
+ (WebCore::pathFromFont):
+
+2010-08-30 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ queryCommandValue("BackColor") returns rgb(0,0,0) for elements with transparent background
+ https://bugs.webkit.org/show_bug.cgi?id=21680
+
+ The bug was caused by WebKit's using the computed style to obtain the background color,
+ which is rgba(0,0,0,0) for nodes with transparent background color. While this is correct
+ in the accordance to CSS2 because background-color is not inherited by default,
+ it is not desirable for editing purposes where the background color in effect is expected.
+
+ Modified valueStyle in EditorCommand.cpp to call Editor::selectionStartCSSPropertyValue,
+ instead of Frame::selectionStartStylePropertyValue, which traverses common ancestors of
+ the selected range or caret to retrieve the effective background color of the selected region
+ instead of the background color at the start of the selection.
+ This takes effect when the original background color is transparent or the selection is range
+ (to avoid picking up the background color only present at the start of paragraph).
+
+ Removed selectionStartStylePropertyValue and migrated it to Editor::selectionStartCSSPropertyValue.
+
+ Test: editing/execCommand/query-command-value-background-color.html
+
+ * editing/Editor.cpp:
+ (WebCore::hasTransparentBackgroundColor): Checks whether the specified style's background color is transparent or not.
+ (WebCore::Editor::selectionStartCSSPropertyValue): Migrated the contents of selectionStartStylePropertyValue and
+ added the special case for background color.
+ * editing/Editor.h: Added the prototype for selectionStartCSSPropertyValue.
+ * editing/EditorCommand.cpp:
+ (WebCore::valueStyle): Calls Editor::selectionStartCSSPropertyValue.
+ * page/Frame.cpp: Removed selectionStartStylePropertyValue.
+ * page/Frame.h: Ditto.
+
+2010-08-30 Lei Zhang <thestig@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Defer printing until the FrameLoader finishes loading.
+ https://bugs.webkit.org/show_bug.cgi?id=43658
+
+ * manual-tests/print-before-load.html: Added.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::finishedLoading):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::DOMWindow):
+ (WebCore::DOMWindow::print):
+ * page/DOMWindow.h:
+ (WebCore::DOMWindow::printDeferred):
+
+2010-08-30 Chris Rogers <crogers@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ audio engine: add ReverbConvolver class
+ https://bugs.webkit.org/show_bug.cgi?id=34912
+
+ No new tests since audio API is not yet implemented.
+
+ * platform/audio: Added.
+ * platform/audio/ReverbAccumulationBuffer.cpp: Added.
+ (WebCore::ReverbAccumulationBuffer::ReverbAccumulationBuffer):
+ (WebCore::ReverbAccumulationBuffer::readAndClear):
+ (WebCore::ReverbAccumulationBuffer::updateReadIndex):
+ (WebCore::ReverbAccumulationBuffer::accumulate):
+ (WebCore::ReverbAccumulationBuffer::reset):
+ * platform/audio/ReverbAccumulationBuffer.h: Added.
+ (WebCore::ReverbAccumulationBuffer::readIndex):
+ (WebCore::ReverbAccumulationBuffer::readTimeFrame):
+ * platform/audio/ReverbConvolver.cpp: Added.
+ (WebCore::backgroundThreadEntry):
+ (WebCore::ReverbConvolver::ReverbConvolver):
+ (WebCore::ReverbConvolver::~ReverbConvolver):
+ (WebCore::ReverbConvolver::backgroundThreadEntry):
+ (WebCore::ReverbConvolver::process):
+ (WebCore::ReverbConvolver::reset):
+ * platform/audio/ReverbConvolver.h: Added.
+ (WebCore::ReverbConvolver::impulseResponseLength):
+ (WebCore::ReverbConvolver::inputBuffer):
+ (WebCore::ReverbConvolver::useBackgroundThreads):
+ * platform/audio/ReverbConvolverStage.cpp: Added.
+ (WebCore::ReverbConvolverStage::ReverbConvolverStage):
+ (WebCore::ReverbConvolverStage::processInBackground):
+ (WebCore::ReverbConvolverStage::process):
+ (WebCore::ReverbConvolverStage::reset):
+ * platform/audio/ReverbConvolverStage.h: Added.
+ (WebCore::ReverbConvolverStage::inputReadIndex):
+ * platform/audio/ReverbInputBuffer.cpp: Added.
+ (WebCore::ReverbInputBuffer::ReverbInputBuffer):
+ (WebCore::ReverbInputBuffer::write):
+ (WebCore::ReverbInputBuffer::directReadFrom):
+ (WebCore::ReverbInputBuffer::reset):
+ * platform/audio/ReverbInputBuffer.h: Added.
+ (WebCore::ReverbInputBuffer::writeIndex):
+
+2010-08-30 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Add culling to RenderSVGContainer
+ https://bugs.webkit.org/show_bug.cgi?id=44896
+
+ Cache object/strokeBoundingBox and repaintRectInLocalCoordinates() in RenderSVGContainer & RenderSVGRoot, just like it's done in RenderPath.
+ Propagate boundary changes up the render tree, in layout phase, in order to notify parents that they should update their cached boundaries.
+
+ This is a huge speed benefit when interacting with an already layouted document, as there's no need anymore to traverse all children
+ of any container or <svg> element, just to retrieve the repaint rect.
+
+ * rendering/RenderForeignObject.cpp:
+ (WebCore::RenderForeignObject::layout):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::setNeedsBoundariesUpdate):
+ * rendering/RenderObject.h:
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::removeChildNode):
+ * rendering/RenderPath.cpp:
+ (WebCore::RenderPath::layout):
+ (WebCore::RenderPath::paint):
+ * rendering/RenderPath.h:
+ (WebCore::RenderPath::path):
+ (WebCore::RenderPath::setNeedsBoundariesUpdate):
+ * rendering/RenderSVGBlock.cpp:
+ (WebCore::RenderSVGBlock::styleWillChange):
+ * rendering/RenderSVGBlock.h:
+ * rendering/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::RenderSVGContainer):
+ (WebCore::RenderSVGContainer::layout):
+ (WebCore::RenderSVGContainer::paint):
+ (WebCore::RenderSVGContainer::updateCachedBoundaries):
+ * rendering/RenderSVGContainer.h:
+ (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
+ (WebCore::RenderSVGContainer::objectBoundingBox):
+ (WebCore::RenderSVGContainer::strokeBoundingBox):
+ (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
+ (WebCore::RenderSVGContainer::calculateLocalTransform):
+ * rendering/RenderSVGGradientStop.h:
+ (WebCore::RenderSVGGradientStop::strokeBoundingBox):
+ * rendering/RenderSVGHiddenContainer.cpp:
+ * rendering/RenderSVGHiddenContainer.h:
+ (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::layout):
+ (WebCore::RenderSVGImage::styleWillChange):
+ * rendering/RenderSVGImage.h:
+ * rendering/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::styleWillChange):
+ * rendering/RenderSVGInline.h:
+ * rendering/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::styleWillChange):
+ * rendering/RenderSVGModelObject.h:
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::RenderSVGRoot):
+ (WebCore::RenderSVGRoot::layout):
+ (WebCore::RenderSVGRoot::styleWillChange):
+ (WebCore::RenderSVGRoot::updateCachedBoundaries):
+ * rendering/RenderSVGRoot.h:
+ (WebCore::RenderSVGRoot::setNeedsBoundariesUpdate):
+ (WebCore::RenderSVGRoot::setNeedsTransformUpdate):
+ (WebCore::RenderSVGRoot::objectBoundingBox):
+ (WebCore::RenderSVGRoot::strokeBoundingBox):
+ (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::layout):
+ * rendering/RenderSVGTransformableContainer.cpp:
+ (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
+ * rendering/RenderSVGTransformableContainer.h:
+ * rendering/RenderSVGViewportContainer.cpp:
+ (WebCore::RenderSVGViewportContainer::calcViewport):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
+ (WebCore::SVGRenderSupport::paintInfoIntersectsRepaintRect):
+ * rendering/SVGRenderSupport.h:
+ * rendering/style/SVGRenderStyle.cpp:
+ (WebCore::SVGRenderStyle::diff):
+
+2010-08-30 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Unreviewed. Build fix when ENABLE_WEB_SOCKETS=ON.
+
+ EFL port does not yet support automated tests.
+
+ * CMakeLists.txt: Add missing files.
+ * CMakeListsEfl.txt: Ditto.
+
+2010-08-30 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Chris Marrin.
+
+ Expose Vector3 and associated operations
+ https://bugs.webkit.org/show_bug.cgi?id=44666
+
+ Rolling out earlier patch exposing Vector3 class in
+ TransformationMatrix.h. A different approach will be taken under
+ another bug.
+
+ * platform/graphics/transforms/TransformationMatrix.cpp:
+ (WebCore::v3Length):
+ (WebCore::v3Scale):
+ (WebCore::v3Dot):
+ (WebCore::v3Combine):
+ (WebCore::v3Cross):
+ (WebCore::decompose):
+ * platform/graphics/transforms/TransformationMatrix.ha:
+
+2010-08-30 Jer Noble <jer.noble@apple.com>
+
+ Build fix; Unreviewed.
+
+ Added a export symbol to the WebCore.exp.in list.
+
+ * WebCore.exp.in:
+
+2010-08-30 Chris Rogers <crogers@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Add audio cone effect files. The cone effect operates as defined in the OpenAL specification.
+ https://bugs.webkit.org/show_bug.cgi?id=44712
+
+ No new tests since audio API not implemented yet.
+
+ * platform/audio: Added.
+ * platform/audio/Cone.cpp: Added.
+ (WebCore::ConeEffect::ConeEffect):
+ (WebCore::ConeEffect::gain):
+ * platform/audio/Cone.h: Added.
+ (WebCore::ConeEffect::setInnerAngle):
+ (WebCore::ConeEffect::innerAngle):
+ (WebCore::ConeEffect::setOuterAngle):
+ (WebCore::ConeEffect::outerAngle):
+ (WebCore::ConeEffect::setOuterGain):
+ (WebCore::ConeEffect::outerGain):
+
+2010-08-30 Chris Rogers <crogers@google.com>
+
+ Reviewed by Chris Marrin.
+
+ audio engine: add Reverb class
+ https://bugs.webkit.org/show_bug.cgi?id=36466
+
+ No new tests since audio API is not yet implemented.
+
+ * platform/audio: Added.
+ * platform/audio/Reverb.cpp: Added.
+ (WebCore::calculateNormalizationScale):
+ (WebCore::Reverb::Reverb):
+ (WebCore::Reverb::initialize):
+ (WebCore::Reverb::process):
+ (WebCore::Reverb::reset):
+ * platform/audio/Reverb.h: Added.
+ (WebCore::Reverb::):
+ (WebCore::Reverb::impulseResponseLength):
+
+2010-08-30 Chris Rogers <crogers@google.com>
+
+ Unreviewed
+
+ Add WebCore/platform/audio directory
+ in preparation for landing: https://bugs.webkit.org/show_bug.cgi?id=36466
+
+ * platform/audio: Added.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ text/plain non-video files cause <video> to hang (while reading them?)
+ https://bugs.webkit.org/show_bug.cgi?id=44212
+
+ Disable all the QuickTime components which ingest .txt files.
+
+ New tests:
+ * http/tests/media/video-served-as-text.html: Added.
+ * http/tests/media/text-served-as-text.html: Added.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie): Disable all four text
+ 'eat' components.
+ * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieDisableComponent.
+ * platform/mac/WebCoreSystemInterface.mm: Add wkQTMovieDisableComponent.
+
+2010-08-30 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ allow ports with windowed plugins to support windowless plugin tests
+
+ https://bugs.webkit.org/show_bug.cgi?id=40730
+
+ Ports that implement plugins windowed by default need to have a way of
+ supporting plugin tests that assume the plugin is windowless. Add this
+ feature to the tests and support it in the webkit test plugin. Also
+ add mouse and keyboard event logging to the webkit-test plugin on Unix.
+
+ Unskip the following tests on Qt:
+
+ plugins/mouse-events.html
+ plugins/keyboard-events.html
+ plugins/mouse-events-fixedpos.html
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::setFocus):
+ (WebCore::setXKeyEventSpecificFields):
+
+2010-08-30 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add DOMFileSystem implementation to support Entry manipulation operations
+ https://bugs.webkit.org/show_bug.cgi?id=44732
+
+ No new tests; tests will be added later.
+
+ * storage/DOMFileSystem.cpp:
+ (WebCore::DOMFileSystem::root):
+ (WebCore::checkValidityForForCopyOrMove): Added.
+ (WebCore::DOMFileSystem::getMetadata): Added.
+ (WebCore::DOMFileSystem::move): Added.
+ (WebCore::DOMFileSystem::copy): Added.
+ (WebCore::DOMFileSystem::remove): Added.
+ (WebCore::DOMFileSystem::getParent): Added.
+ (WebCore::DOMFileSystem::getFile): Added.
+ (WebCore::DOMFileSystem::getDirectory): Added.
+ (WebCore::DOMFileSystem::readDirectory): Added.
+ * storage/DirectoryEntry.cpp:
+ (WebCore::DirectoryEntry::getFile): Added implementation.
+ (WebCore::DirectoryEntry::getDirectory): Added implementation.
+ * storage/DirectoryReader.cpp:
+ (WebCore::DirectoryReader::DirectoryReader): Added implementation.
+ (WebCore::DirectoryReader::readEntries): Added implementation.
+ * storage/DirectoryReader.h:
+ * storage/Entry.cpp:
+ (WebCore::Entry::getMetadata): Added implementation.
+ (WebCore::Entry::moveTo): Added implementation.
+ (WebCore::Entry::copyTo): Added implementation.
+ (WebCore::Entry::remove): Added implementation.
+ (WebCore::Entry::getParent): Added implementation.
+ * storage/Entry.h:
+ * storage/FileEntry.h:
+
+ Added a helper template to schedule callbacks.
+ * storage/DOMFileSystem.h:
+ (WebCore::DOMFileSystem::DispatchCallbackTask): Added to schedule callbacks.
+ (WebCore::DOMFileSystem::scheduleCallback): Added to schedule callbacks.
+
+ Changed to fire callbacks asynchronously.
+ * storage/LocalFileSystem.cpp:
+ (WebCore::LocalFileSystem::requestFileSystem):
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Fixed compilation error, now that we have included the
+ GtkVersioning.h we have to remove some version dependent code from
+ EventSender.
+
+ * platform/gtk/GtkVersioning.c:
+ (gdk_window_get_root_coords):
+ * platform/gtk/GtkVersioning.h:
+
+2010-08-30 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=44804 Crashes in
+ RenderMathMLRoot::layout() and RenderMathMLRoot::paint()
+ -and corresponding-
+ <rdar://problem/8342055>
+
+ All of the calls to firstChild() and lastChild() in
+ RenderMathMLRoot::layout() and RenderMathMLRoot::paint() need to be
+ null checked.
+
+ * mathml/RenderMathMLRoot.cpp:
+ (WebCore::RenderMathMLRoot::paint):
+ (WebCore::RenderMathMLRoot::layout):
+
+2010-08-30 Beth Dakin <bdakin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=44801 Crash in
+ RenderMathMLSubSup::layout()
+ -and corresponding-
+ <rdar://problem/8325203>
+
+ Null-check m_scripts. It is null-checked everywhere else in the
+ class and can legitimately be null.
+
+ * mathml/RenderMathMLSubSup.cpp:
+ (WebCore::RenderMathMLSubSup::layout):
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [Gtk] gdk_display_get_core_pointer and gdk_device_get_core_pointer
+ are deprecated
+ https://bugs.webkit.org/show_bug.cgi?id=44787
+
+ We have replaced GtkVersioning.cpp with GtkVersioning.c and
+ created a function (getDefaultGDKPointerDevice) to get the pointer
+ of the window with the new APIs. We added that function to DRT and
+ copyandpaste unit test.
+
+ * GNUmakefile.am:
+ * platform/gtk/GtkVersioning.c: Added.
+ (gtk_adjustment_set_value):
+ (gtk_adjustment_configure):
+ (getDefaultGDKPointerDevice):
+ * platform/gtk/GtkVersioning.cpp: Removed.
+ * platform/gtk/GtkVersioning.h:
+
+2010-08-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make SVG constructors private to make sure callers all use create
+ https://bugs.webkit.org/show_bug.cgi?id=44872
+
+ Made as many members private and protected as possible, and got rid of many
+ unneeded empty constructor and destructor definitions, in some cases changing
+ a class to be non-polymorphic. Made some functions inline. Used the word document
+ instead of the abbreviation doc. Removed unneeded explicit base class
+ initialization in cases where it is no different from the default behavior.
+
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::SVGAElement):
+ (WebCore::SVGAElement::childShouldCreateRenderer):
+ * svg/SVGAElement.h:
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
+ * svg/SVGAltGlyphElement.h:
+ * svg/SVGAngle.cpp:
+ * svg/SVGAngle.h:
+ * svg/SVGAnimateColorElement.cpp:
+ (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
+ * svg/SVGAnimateColorElement.h:
+ * svg/SVGAnimateElement.cpp:
+ (WebCore::SVGAnimateElement::SVGAnimateElement):
+ * svg/SVGAnimateElement.h:
+ * svg/SVGAnimateMotionElement.cpp:
+ (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
+ * svg/SVGAnimateMotionElement.h:
+ * svg/SVGAnimateTransformElement.cpp:
+ (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
+ * svg/SVGAnimateTransformElement.h:
+ * svg/SVGAnimatedPathData.cpp:
+ * svg/SVGAnimatedPathData.h:
+ * svg/SVGAnimatedPoints.cpp:
+ * svg/SVGAnimatedPoints.h:
+ * svg/SVGAnimationElement.cpp:
+ (WebCore::SVGAnimationElement::SVGAnimationElement):
+ * svg/SVGAnimationElement.h:
+ * svg/SVGCircleElement.cpp:
+ (WebCore::SVGCircleElement::SVGCircleElement):
+ * svg/SVGCircleElement.h:
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::SVGClipPathElement):
+ * svg/SVGClipPathElement.h:
+ * svg/SVGColor.cpp:
+ * svg/SVGColor.h:
+ * svg/SVGComponentTransferFunctionElement.cpp:
+ (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
+ * svg/SVGComponentTransferFunctionElement.h:
+ * svg/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::SVGCursorElement):
+ * svg/SVGCursorElement.h:
+ * svg/SVGDefsElement.cpp:
+ (WebCore::SVGDefsElement::SVGDefsElement):
+ * svg/SVGDefsElement.h:
+ * svg/SVGDescElement.cpp:
+ (WebCore::SVGDescElement::SVGDescElement):
+ * svg/SVGDescElement.h:
+ * svg/SVGDocument.cpp:
+ * svg/SVGDocument.h:
+ * svg/SVGDocumentExtensions.cpp:
+ (WebCore::SVGDocumentExtensions::SVGDocumentExtensions):
+ (WebCore::SVGDocumentExtensions::reportWarning):
+ (WebCore::SVGDocumentExtensions::reportError):
+ * svg/SVGDocumentExtensions.h:
+ * svg/SVGElement.h:
+ * svg/SVGElementInstanceList.h:
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::SVGEllipseElement):
+ * svg/SVGEllipseElement.h:
+ * svg/SVGExternalResourcesRequired.cpp:
+ * svg/SVGExternalResourcesRequired.h:
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::SVGFEBlendElement):
+ * svg/SVGFEBlendElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
+ * svg/SVGFEColorMatrixElement.h:
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
+ * svg/SVGFEComponentTransferElement.h:
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::SVGFECompositeElement):
+ * svg/SVGFECompositeElement.h:
+ * svg/SVGFEConvolveMatrixElement.cpp:
+ (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
+ * svg/SVGFEConvolveMatrixElement.h:
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
+ * svg/SVGFEDiffuseLightingElement.h:
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
+ * svg/SVGFEDisplacementMapElement.h:
+ * svg/SVGFEDistantLightElement.cpp:
+ (WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFEFloodElement.cpp:
+ (WebCore::SVGFEFloodElement::SVGFEFloodElement):
+ * svg/SVGFEFloodElement.h:
+ * svg/SVGFEFuncAElement.cpp:
+ (WebCore::SVGFEFuncAElement::SVGFEFuncAElement):
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.cpp:
+ (WebCore::SVGFEFuncBElement::SVGFEFuncBElement):
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.cpp:
+ (WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.cpp:
+ (WebCore::SVGFEFuncRElement::SVGFEFuncRElement):
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
+ * svg/SVGFEGaussianBlurElement.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::SVGFEImageElement):
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFELightElement.cpp:
+ (WebCore::SVGFELightElement::SVGFELightElement):
+ * svg/SVGFELightElement.h:
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::SVGFEMergeElement):
+ * svg/SVGFEMergeElement.h:
+ * svg/SVGFEMergeNodeElement.cpp:
+ (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
+ * svg/SVGFEMergeNodeElement.h:
+ * svg/SVGFEMorphologyElement.cpp:
+ (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
+ * svg/SVGFEMorphologyElement.h:
+ * svg/SVGFEOffsetElement.cpp:
+ (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
+ * svg/SVGFEOffsetElement.h:
+ * svg/SVGFEPointLightElement.cpp:
+ (WebCore::SVGFEPointLightElement::SVGFEPointLightElement):
+ (WebCore::SVGFEPointLightElement::lightSource):
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
+ * svg/SVGFESpecularLightingElement.h:
+ * svg/SVGFESpotLightElement.cpp:
+ (WebCore::SVGFESpotLightElement::SVGFESpotLightElement):
+ * svg/SVGFESpotLightElement.h:
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::SVGFETileElement):
+ * svg/SVGFETileElement.h:
+ * svg/SVGFETurbulenceElement.cpp:
+ (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
+ * svg/SVGFETurbulenceElement.h:
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::SVGFilterElement):
+ * svg/SVGFilterElement.h:
+ * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+ (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
+ * svg/SVGFilterPrimitiveStandardAttributes.h:
+ * svg/SVGFitToViewBox.cpp:
+ * svg/SVGFitToViewBox.h:
+ * svg/SVGFontData.cpp:
+ * svg/SVGFontData.h:
+ * svg/SVGFontElement.cpp:
+ (WebCore::SVGFontElement::SVGFontElement):
+ * svg/SVGFontElement.h:
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::SVGFontFaceElement):
+ * svg/SVGFontFaceElement.h:
+ * svg/SVGFontFaceFormatElement.cpp:
+ (WebCore::SVGFontFaceFormatElement::SVGFontFaceFormatElement):
+ * svg/SVGFontFaceFormatElement.h:
+ * svg/SVGFontFaceNameElement.cpp:
+ (WebCore::SVGFontFaceNameElement::SVGFontFaceNameElement):
+ * svg/SVGFontFaceNameElement.h:
+ * svg/SVGFontFaceSrcElement.cpp:
+ (WebCore::SVGFontFaceSrcElement::SVGFontFaceSrcElement):
+ * svg/SVGFontFaceSrcElement.h:
+ * svg/SVGFontFaceUriElement.cpp:
+ (WebCore::SVGFontFaceUriElement::SVGFontFaceUriElement):
+ * svg/SVGFontFaceUriElement.h:
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGElement.cpp:
+ (WebCore::SVGGElement::SVGGElement):
+ * svg/SVGGElement.h:
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::SVGGlyphElement::SVGGlyphElement):
+ * svg/SVGGlyphElement.h:
+ * svg/SVGGradientElement.cpp:
+ (WebCore::SVGGradientElement::SVGGradientElement):
+ * svg/SVGGradientElement.h:
+ * svg/SVGHKernElement.cpp:
+ (WebCore::SVGHKernElement::SVGHKernElement):
+ * svg/SVGHKernElement.h:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::SVGImageElement):
+ * svg/SVGImageElement.h:
+ * svg/SVGImageLoader.cpp:
+ * svg/SVGImageLoader.h:
+ * svg/SVGLangSpace.cpp:
+ * svg/SVGLangSpace.h:
+ * svg/SVGLengthList.cpp:
+ * svg/SVGLengthList.h:
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::SVGLineElement):
+ * svg/SVGLineElement.h:
+ * svg/SVGLinearGradientElement.cpp:
+ (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
+ * svg/SVGLinearGradientElement.h:
+ * svg/SVGLocatable.cpp:
+ * svg/SVGLocatable.h:
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::SVGMPathElement):
+ * svg/SVGMPathElement.h:
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::SVGMarkerElement):
+ * svg/SVGMarkerElement.h:
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::SVGMaskElement):
+ * svg/SVGMaskElement.h:
+ * svg/SVGMetadataElement.cpp:
+ (WebCore::SVGMetadataElement::SVGMetadataElement):
+ * svg/SVGMetadataElement.h:
+ * svg/SVGMissingGlyphElement.cpp:
+ (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
+ * svg/SVGMissingGlyphElement.h:
+ * svg/SVGNumberList.cpp:
+ * svg/SVGNumberList.h:
+ * svg/SVGPaint.cpp:
+ * svg/SVGPaint.h:
+ * svg/SVGParserUtilities.cpp:
+ (WebCore::genericParseNumber):
+ (WebCore::parseNumber):
+ * svg/SVGPathBlender.cpp:
+ * svg/SVGPathBlender.h:
+ * svg/SVGPathBuilder.h:
+ * svg/SVGPathByteStreamBuilder.h:
+ * svg/SVGPathByteStreamSource.cpp:
+ * svg/SVGPathByteStreamSource.h:
+ * svg/SVGPathConsumer.h:
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::SVGPathElement):
+ * svg/SVGPathElement.h:
+ * svg/SVGPathParser.cpp:
+ * svg/SVGPathParser.h:
+ * svg/SVGPathSeg.cpp:
+ * svg/SVGPathSeg.h:
+ * svg/SVGPathSegArc.h:
+ * svg/SVGPathSegClosePath.cpp:
+ * svg/SVGPathSegClosePath.h:
+ * svg/SVGPathSegCurvetoCubic.h:
+ * svg/SVGPathSegCurvetoCubicSmooth.h:
+ * svg/SVGPathSegCurvetoQuadratic.h:
+ * svg/SVGPathSegCurvetoQuadraticSmooth.h:
+ * svg/SVGPathSegLineto.h:
+ * svg/SVGPathSegLinetoHorizontal.h:
+ * svg/SVGPathSegLinetoVertical.h:
+ * svg/SVGPathSegList.cpp:
+ * svg/SVGPathSegList.h:
+ * svg/SVGPathSegListBuilder.h:
+ * svg/SVGPathSegListSource.cpp:
+ * svg/SVGPathSegListSource.h:
+ * svg/SVGPathSegMoveto.h:
+ * svg/SVGPathSource.h:
+ * svg/SVGPathStringBuilder.cpp:
+ * svg/SVGPathStringBuilder.h:
+ * svg/SVGPathStringSource.cpp:
+ * svg/SVGPathStringSource.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::SVGPatternElement):
+ * svg/SVGPatternElement.h:
+ * svg/SVGPointList.cpp:
+ * svg/SVGPointList.h:
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::SVGPolyElement):
+ * svg/SVGPolyElement.h:
+ * svg/SVGPolygonElement.cpp:
+ (WebCore::SVGPolygonElement::SVGPolygonElement):
+ * svg/SVGPolygonElement.h:
+ * svg/SVGPolylineElement.cpp:
+ (WebCore::SVGPolylineElement::SVGPolylineElement):
+ * svg/SVGPolylineElement.h:
+ * svg/SVGPreserveAspectRatio.cpp:
+ * svg/SVGPreserveAspectRatio.h:
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
+ * svg/SVGRadialGradientElement.h:
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::SVGRectElement):
+ * svg/SVGRectElement.h:
+ * svg/SVGSVGElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::SVGScriptElement):
+ * svg/SVGScriptElement.h:
+ * svg/SVGSetElement.cpp:
+ (WebCore::SVGSetElement::SVGSetElement):
+ * svg/SVGSetElement.h:
+ * svg/SVGStopElement.cpp:
+ (WebCore::SVGStopElement::SVGStopElement):
+ * svg/SVGStopElement.h:
+ * svg/SVGStringList.cpp:
+ * svg/SVGStringList.h:
+ * svg/SVGStylable.cpp:
+ * svg/SVGStylable.h:
+ * svg/SVGStyleElement.cpp:
+ (WebCore::SVGStyleElement::SVGStyleElement):
+ * svg/SVGStyleElement.h:
+ * svg/SVGStyledElement.cpp:
+ (WebCore::SVGStyledElement::SVGStyledElement):
+ * svg/SVGStyledElement.h:
+ * svg/SVGStyledLocatableElement.cpp:
+ (WebCore::SVGStyledLocatableElement::SVGStyledLocatableElement):
+ * svg/SVGStyledLocatableElement.h:
+ * svg/SVGStyledTransformableElement.cpp:
+ (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
+ * svg/SVGStyledTransformableElement.h:
+ * svg/SVGSwitchElement.cpp:
+ (WebCore::SVGSwitchElement::SVGSwitchElement):
+ (WebCore::SVGSwitchElement::childShouldCreateRenderer):
+ * svg/SVGSwitchElement.h:
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::SVGSymbolElement):
+ * svg/SVGSymbolElement.h:
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::SVGTRefElement):
+ * svg/SVGTRefElement.h:
+ * svg/SVGTSpanElement.cpp:
+ (WebCore::SVGTSpanElement::SVGTSpanElement):
+ * svg/SVGTests.cpp:
+ * svg/SVGTests.h:
+ * svg/SVGTextContentElement.cpp:
+ (WebCore::SVGTextContentElement::SVGTextContentElement):
+ * svg/SVGTextContentElement.h:
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::SVGTextElement):
+ * svg/SVGTextElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::SVGTextPathElement):
+ * svg/SVGTextPathElement.h:
+ * svg/SVGTextPositioningElement.cpp:
+ (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
+ * svg/SVGTextPositioningElement.h:
+ * svg/SVGTitleElement.cpp:
+ (WebCore::SVGTitleElement::SVGTitleElement):
+ * svg/SVGTransform.cpp:
+ * svg/SVGTransform.h:
+ * svg/SVGTransformable.cpp:
+ * svg/SVGTransformable.h:
+ * svg/SVGURIReference.cpp:
+ * svg/SVGURIReference.h:
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::SVGUseElement):
+ (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
+ * svg/SVGUseElement.h:
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::SVGViewElement):
+ * svg/SVGViewElement.h:
+ * svg/SVGViewSpec.cpp:
+ (WebCore::SVGViewSpec::SVGViewSpec):
+ * svg/SVGViewSpec.h:
+ * svg/SVGZoomAndPan.cpp:
+ * svg/SVGZoomAndPan.h:
+ * svg/SVGZoomEvent.cpp:
+ * svg/SVGZoomEvent.h:
+
+2010-08-30 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Disable automatic looping
+ https://bugs.webkit.org/show_bug.cgi?id=44844
+
+ Test: media/video-does-not-loop.html
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie): Disable QuickTime automatic looping.
+
+ * platform/graphics/win/QTMovie.cpp:
+ (QTMoviePrivate::createMovieController): Ditto.
+
+2010-08-30 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ ApplyStyleCommand::applyInlineStyle needs cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=44458
+
+ Cleanup:
+ 1. Isolated code to find the highest ancestor with embedding style, and deployed it in
+ ApplyStyleCommand::applyInlineStyle.
+ 2. Combined the code to remove embedding style up to enclosing block and the code to
+ remove unicode-bidi and direction properties between start and end nodes.
+ 3. Simplified the conditionals to apply embedding styles.
+
+ No new tests are added since this is a cleanup.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::highestEmbeddingAncestor): Added.
+ (WebCore::ApplyStyleCommand::applyInlineStyle): See above.
+
+2010-08-30 Martin Robinson <mrobinson@igalia.com>
+
+ Build fix. Add the new fileapi directory to the IDL vpath.
+
+ * GNUmakefile.am:
+
+2010-08-30 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] WebKit DOM bindings build should not depend on output GNUMakefile
+ https://bugs.webkit.org/show_bug.cgi?id=44805
+
+ Move WebKit DOM bindings build rules to bindings/gobject/GNUmakefile.am to
+ prevent full WebKit API rebuilds when the automake files change.
+
+ No new tests as this is just a build change.
+
+ * bindings/gobject/GNUmakefile.am: Added.
+
+2010-08-30 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: event listener properties are rendered as [object Object].
+ https://bugs.webkit.org/show_bug.cgi?id=44779
+
+ * inspector/front-end/EventListenersSidebarPane.js:
+
+2010-08-30 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Unreviewed build fix with Blob Support
+
+ [EFL] Build break with Blob support
+ https://bugs.webkit.org/show_bug.cgi?id=44858
+
+ No new features added, so no new tests.
+
+ * CMakeLists.txt:
+
+2010-08-30 Andras Becsi <abecsi@webkit.org>
+
+ Unreviewed trivial fix.
+
+ [Qt] Let qmake know about HTML parser headers.
+
+ No new tests needed.
+
+ * WebCore.pro:
+
+2010-08-30 Andras Becsi <abecsi@webkit.org>
+
+ Unreviewed build fix.
+
+ [Qt] Fix fileapi header paths to fix warnings after r66365.
+
+ No new tests needed.
+
+ * WebCore.pro:
+
+2010-08-30 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Kent Tamura.
+
+ REGRESSION(r66355): Fix warnings in html/DateComponents.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=44855
+
+ * html/DateComponents.cpp:
+ (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): Suggested parentheses added around && within ||
+
+2010-08-30 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r66324): Fix warnings in editing/ApplyStyleCommand.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=44843
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Suggested parentheses added around && within ||
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::close):
+ * inspector/InspectorFrontendClient.h:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ * inspector/front-end/inspector.js:
+ (WebInspector.inspectedPageDestroyed):
+
+2010-08-30 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Split webcore_svg off webcore_remaining. webcore_svg contains all svg
+ sources files.
+ https://bugs.webkit.org/show_bug.cgi?id=44840
+
+ * WebCore.gyp/WebCore.gyp:
+
+2010-08-13 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Kent Tamura.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43960
+ [Chromium] styled scroll bar on the window is painted badly.
+
+ WebKit assumes outermost scrollbar always painted.
+ So force their style to have the background color if it isn't
+ given by the stylesheet.
+
+ Test: scrollbars/custom-scrollbar-with-incomplete-style.html
+
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::hasBackground): Extracted body to RenderStyle for sharing.
+ * rendering/RenderScrollbar.cpp:
+ (WebCore::RenderScrollbar::getScrollbarPseudoStyle): Added the workaround as mentioned above.
+ * rendering/RenderScrollbar.h:
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::hasBackground): Extracted from RenderObject.
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ WebCore::RenderBlock::addChild* NULL ptrs
+ https://bugs.webkit.org/show_bug.cgi?id=43722
+
+ Also includes some cleanup of comments and ASSERTs.
+
+ Test: fast/ruby/before-doesnt-crash.html
+
+ * rendering/RenderRuby.cpp:
+ (WebCore::RenderRubyAsInline::addChild):
+
+2010-08-30 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Kent Tamura
+
+ Move most dependencies to webcore_prerequisites
+ https://bugs.webkit.org/show_bug.cgi?id=44814
+
+ * WebCore.gyp/WebCore.gyp:
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Move AsyncImageResizer back to html to fix Chromium build.
+
+ * WebCore.gypi:
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Fix silly typo that breaks the build.
+
+ * WebCore.pro:
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix the Qt build.
+
+ * WebCore.pri:
+
+2010-08-30 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix Chromium build.
+
+ * WebCore.gyp/WebCore.gyp:
+
+2010-08-29 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Maciej Stachowiak.
+
+ Move File and Blob related files from WebCore/html to WebCore/fileapi.
+
+ * Android.mk:
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.xcodeproj/project.pbxproj:
+ * fileapi: Added.
+ * fileapi/AsyncFileWriter.h: Copied from WebCore/html/AsyncFileWriter.h.
+ * fileapi/Blob.cpp: Copied from WebCore/html/Blob.cpp.
+ * fileapi/Blob.h: Copied from WebCore/html/Blob.h.
+ * fileapi/Blob.idl: Copied from WebCore/html/Blob.idl.
+ * fileapi/BlobBuilder.cpp: Copied from WebCore/html/BlobBuilder.cpp.
+ * fileapi/BlobBuilder.h: Copied from WebCore/html/BlobBuilder.h.
+ * fileapi/BlobBuilder.idl: Copied from WebCore/html/BlobBuilder.idl.
+ * fileapi/BlobURL.cpp: Copied from WebCore/html/BlobURL.cpp.
+ * fileapi/BlobURL.h: Copied from WebCore/html/BlobURL.h.
+ * fileapi/File.cpp: Copied from WebCore/html/File.cpp.
+ * fileapi/File.h: Copied from WebCore/html/File.h.
+ * fileapi/File.idl: Copied from WebCore/html/File.idl.
+ * fileapi/FileError.h: Copied from WebCore/html/FileError.h.
+ * fileapi/FileError.idl: Copied from WebCore/html/FileError.idl.
+ * fileapi/FileList.cpp: Copied from WebCore/html/FileList.cpp.
+ * fileapi/FileList.h: Copied from WebCore/html/FileList.h.
+ * fileapi/FileList.idl: Copied from WebCore/html/FileList.idl.
+ * fileapi/FileReader.cpp: Copied from WebCore/html/FileReader.cpp.
+ * fileapi/FileReader.h: Copied from WebCore/html/FileReader.h.
+ * fileapi/FileReader.idl: Copied from WebCore/html/FileReader.idl.
+ * fileapi/FileStreamProxy.cpp: Copied from WebCore/html/FileStreamProxy.cpp.
+ * fileapi/FileStreamProxy.h: Copied from WebCore/html/FileStreamProxy.h.
+ * fileapi/FileThread.cpp: Copied from WebCore/html/FileThread.cpp.
+ * fileapi/FileThread.h: Copied from WebCore/html/FileThread.h.
+ * fileapi/FileThreadTask.h: Copied from WebCore/html/FileThreadTask.h.
+ * fileapi/FileWriter.cpp: Copied from WebCore/html/FileWriter.cpp.
+ * fileapi/FileWriter.h: Copied from WebCore/html/FileWriter.h.
+ * fileapi/FileWriter.idl: Copied from WebCore/html/FileWriter.idl.
+ * fileapi/FileWriterClient.h: Copied from WebCore/html/FileWriterClient.h.
+ * fileapi/ThreadableBlobRegistry.cpp: Copied from WebCore/html/ThreadableBlobRegistry.cpp.
+ * fileapi/ThreadableBlobRegistry.h: Copied from WebCore/html/ThreadableBlobRegistry.h.
+ * html/AsyncFileWriter.h: Removed.
+ * html/Blob.cpp: Removed.
+ * html/Blob.h: Removed.
+ * html/Blob.idl: Removed.
+ * html/BlobBuilder.cpp: Removed.
+ * html/BlobBuilder.h: Removed.
+ * html/BlobBuilder.idl: Removed.
+ * html/BlobURL.cpp: Removed.
+ * html/BlobURL.h: Removed.
+ * html/File.cpp: Removed.
+ * html/File.h: Removed.
+ * html/File.idl: Removed.
+ * html/FileError.h: Removed.
+ * html/FileError.idl: Removed.
+ * html/FileList.cpp: Removed.
+ * html/FileList.h: Removed.
+ * html/FileList.idl: Removed.
+ * html/FileReader.cpp: Removed.
+ * html/FileReader.h: Removed.
+ * html/FileReader.idl: Removed.
+ * html/FileStreamProxy.cpp: Removed.
+ * html/FileStreamProxy.h: Removed.
+ * html/FileThread.cpp: Removed.
+ * html/FileThread.h: Removed.
+ * html/FileThreadTask.h: Removed.
+ * html/FileWriter.cpp: Removed.
+ * html/FileWriter.h: Removed.
+ * html/FileWriter.idl: Removed.
+ * html/FileWriterClient.h: Removed.
+ * html/ThreadableBlobRegistry.cpp: Removed.
+ * html/ThreadableBlobRegistry.h: Removed.
+
+2010-08-29 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Move more common settings to webcore_prerequisites
+ https://bugs.webkit.org/show_bug.cgi?id=44812
+
+ * WebCore.gyp/WebCore.gyp:
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Create SVG and WML elements with create functions instead of direct invocations of new
+ https://bugs.webkit.org/show_bug.cgi?id=44851
+
+ Added the create functions, made some existing constructors protected and private,
+ made some other member functions protected and and private, added some missing virtual
+ keywords for clarity to functions that already were overriding virtual functions,
+ fixed some inconsistent indentation, and removed some unneeded empty destructors.
+
+ In the future, it will be good to have the constructors all be private so we don't
+ use them by accident. Then we'll change the reference count rule globally and add
+ all the necessary calls to adoptRef.
+
+ The SVG changes are compiled and tested. The WML changes are speculative and untested.
+
+ * dom/make_names.pl: Removed supportfor the createWithNew keyword.
+ * svg/svgtags.in: Removed all the createWithNew keywords.
+ * wml/WMLTagNames.in: Ditto.
+
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::create): Added.
+ * svg/SVGAElement.h:
+ * svg/SVGAltGlyphElement.cpp:
+ (WebCore::SVGAltGlyphElement::create): Added.
+ * svg/SVGAltGlyphElement.h:
+ * svg/SVGAnimateColorElement.cpp:
+ (WebCore::SVGAnimateColorElement::create): Added.
+ * svg/SVGAnimateColorElement.h:
+ * svg/SVGAnimateElement.cpp:
+ (WebCore::SVGAnimateElement::create): Added.
+ * svg/SVGAnimateElement.h:
+ * svg/SVGAnimateMotionElement.cpp:
+ (WebCore::SVGAnimateMotionElement::create): Added.
+ * svg/SVGAnimateMotionElement.h:
+ * svg/SVGAnimateTransformElement.cpp:
+ (WebCore::SVGAnimateTransformElement::create): Added.
+ * svg/SVGAnimateTransformElement.h:
+ * svg/SVGCircleElement.cpp:
+ (WebCore::SVGCircleElement::create): Added.
+ * svg/SVGCircleElement.h:
+ * svg/SVGClipPathElement.cpp:
+ (WebCore::SVGClipPathElement::create): Added.
+ * svg/SVGClipPathElement.h:
+ * svg/SVGCursorElement.cpp:
+ (WebCore::SVGCursorElement::create): Added.
+ * svg/SVGCursorElement.h:
+ * svg/SVGDefsElement.cpp:
+ (WebCore::SVGDefsElement::create): Added.
+ * svg/SVGDefsElement.h:
+ * svg/SVGDescElement.cpp:
+ (WebCore::SVGDescElement::create): Added.
+ * svg/SVGDescElement.h:
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::create): Added.
+ * svg/SVGEllipseElement.h:
+ * svg/SVGFEBlendElement.cpp:
+ (WebCore::SVGFEBlendElement::create): Added.
+ * svg/SVGFEBlendElement.h:
+ * svg/SVGFEColorMatrixElement.cpp:
+ (WebCore::SVGFEColorMatrixElement::create): Added.
+ * svg/SVGFEColorMatrixElement.h:
+ * svg/SVGFEComponentTransferElement.cpp:
+ (WebCore::SVGFEComponentTransferElement::create): Added.
+ * svg/SVGFEComponentTransferElement.h:
+ * svg/SVGFECompositeElement.cpp:
+ (WebCore::SVGFECompositeElement::create): Added.
+ * svg/SVGFECompositeElement.h:
+ * svg/SVGFEConvolveMatrixElement.cpp:
+ (WebCore::SVGFEConvolveMatrixElement::create): Added.
+ * svg/SVGFEConvolveMatrixElement.h:
+ * svg/SVGFEDiffuseLightingElement.cpp:
+ (WebCore::SVGFEDiffuseLightingElement::create): Added.
+ * svg/SVGFEDiffuseLightingElement.h:
+ * svg/SVGFEDisplacementMapElement.cpp:
+ (WebCore::SVGFEDisplacementMapElement::create): Added.
+ * svg/SVGFEDisplacementMapElement.h:
+ * svg/SVGFEDistantLightElement.cpp:
+ (WebCore::SVGFEDistantLightElement::create): Added.
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFEFloodElement.cpp:
+ (WebCore::SVGFEFloodElement::create): Added.
+ * svg/SVGFEFloodElement.h:
+ * svg/SVGFEFuncAElement.cpp:
+ (WebCore::SVGFEFuncAElement::create): Added.
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.cpp:
+ (WebCore::SVGFEFuncBElement::create): Added.
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.cpp:
+ (WebCore::SVGFEFuncGElement::create): Added.
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.cpp:
+ (WebCore::SVGFEFuncRElement::create): Added.
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEGaussianBlurElement.cpp:
+ (WebCore::SVGFEGaussianBlurElement::create): Added.
+ * svg/SVGFEGaussianBlurElement.h:
+ * svg/SVGFEImageElement.cpp:
+ (WebCore::SVGFEImageElement::create): Added.
+ * svg/SVGFEImageElement.h:
+ * svg/SVGFEMergeElement.cpp:
+ (WebCore::SVGFEMergeElement::create): Added.
+ * svg/SVGFEMergeElement.h:
+ * svg/SVGFEMergeNodeElement.cpp:
+ (WebCore::SVGFEMergeNodeElement::create): Added.
+ * svg/SVGFEMergeNodeElement.h:
+ * svg/SVGFEMorphologyElement.cpp:
+ (WebCore::SVGFEMorphologyElement::create): Added.
+ * svg/SVGFEMorphologyElement.h:
+ * svg/SVGFEOffsetElement.cpp:
+ (WebCore::SVGFEOffsetElement::create): Added.
+ * svg/SVGFEOffsetElement.h:
+ * svg/SVGFEPointLightElement.cpp:
+ (WebCore::SVGFEPointLightElement::create): Added.
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpecularLightingElement.cpp:
+ (WebCore::SVGFESpecularLightingElement::create): Added.
+ * svg/SVGFESpecularLightingElement.h:
+ * svg/SVGFESpotLightElement.cpp:
+ (WebCore::SVGFESpotLightElement::create): Added.
+ * svg/SVGFESpotLightElement.h:
+ * svg/SVGFETileElement.cpp:
+ (WebCore::SVGFETileElement::create): Added.
+ * svg/SVGFETileElement.h:
+ * svg/SVGFETurbulenceElement.cpp:
+ (WebCore::SVGFETurbulenceElement::create): Added.
+ * svg/SVGFETurbulenceElement.h:
+ * svg/SVGFilterElement.cpp:
+ (WebCore::SVGFilterElement::create): Added.
+ * svg/SVGFilterElement.h:
+ * svg/SVGFontElement.cpp:
+ (WebCore::SVGFontElement::create): Added.
+ * svg/SVGFontElement.h:
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::create): Added.
+ * svg/SVGFontFaceElement.h:
+ * svg/SVGFontFaceFormatElement.cpp:
+ (WebCore::SVGFontFaceFormatElement::create): Added.
+ * svg/SVGFontFaceFormatElement.h:
+ * svg/SVGFontFaceNameElement.cpp:
+ (WebCore::SVGFontFaceNameElement::create): Added.
+ * svg/SVGFontFaceNameElement.h:
+ * svg/SVGFontFaceSrcElement.cpp:
+ (WebCore::SVGFontFaceSrcElement::create): Added.
+ * svg/SVGFontFaceSrcElement.h:
+ * svg/SVGFontFaceUriElement.cpp:
+ (WebCore::SVGFontFaceUriElement::create): Added.
+ * svg/SVGFontFaceUriElement.h:
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::create): Added.
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGElement.cpp:
+ (WebCore::SVGGElement::create): Added.
+ * svg/SVGGElement.h:
+ * svg/SVGGlyphElement.cpp:
+ (WebCore::SVGGlyphElement::create): Added.
+ * svg/SVGGlyphElement.h:
+ * svg/SVGHKernElement.cpp:
+ (WebCore::SVGHKernElement::create): Added.
+ * svg/SVGHKernElement.h:
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::create): Added.
+ * svg/SVGImageElement.h:
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::create): Added.
+ * svg/SVGLineElement.h:
+ * svg/SVGLinearGradientElement.cpp:
+ (WebCore::SVGLinearGradientElement::create): Added.
+ * svg/SVGLinearGradientElement.h:
+ * svg/SVGMPathElement.cpp:
+ (WebCore::SVGMPathElement::create): Added.
+ * svg/SVGMPathElement.h:
+ * svg/SVGMarkerElement.cpp:
+ (WebCore::SVGMarkerElement::create): Added.
+ * svg/SVGMarkerElement.h:
+ * svg/SVGMaskElement.cpp:
+ (WebCore::SVGMaskElement::create): Added.
+ * svg/SVGMaskElement.h:
+ * svg/SVGMetadataElement.cpp:
+ (SVGMetadataElement::create): Added.
+ * svg/SVGMetadataElement.h:
+ * svg/SVGMissingGlyphElement.cpp:
+ (WebCore::SVGMissingGlyphElement::create): Added.
+ * svg/SVGMissingGlyphElement.h:
+ * svg/SVGPathElement.cpp:
+ (WebCore::SVGPathElement::create): Added.
+ * svg/SVGPathElement.h:
+ * svg/SVGPatternElement.cpp:
+ (WebCore::SVGPatternElement::create): Added.
+ * svg/SVGPatternElement.h:
+ * svg/SVGPolygonElement.cpp:
+ (WebCore::SVGPolygonElement::create): Added.
+ * svg/SVGPolygonElement.h:
+ * svg/SVGPolylineElement.cpp:
+ (WebCore::SVGPolylineElement::create): Added.
+ * svg/SVGPolylineElement.h:
+ * svg/SVGRadialGradientElement.cpp:
+ (WebCore::SVGRadialGradientElement::create): Added.
+ * svg/SVGRadialGradientElement.h:
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::create): Added.
+ * svg/SVGRectElement.h:
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::create): Added.
+ * svg/SVGSVGElement.h:
+ * svg/SVGScriptElement.cpp:
+ (WebCore::SVGScriptElement::create): Added.
+ * svg/SVGScriptElement.h:
+ * svg/SVGSetElement.cpp:
+ (WebCore::SVGSetElement::create): Added.
+ * svg/SVGSetElement.h:
+ * svg/SVGStopElement.cpp:
+ (WebCore::SVGStopElement::create): Added.
+ * svg/SVGStopElement.h:
+ (WebCore::SVGStyleElement::create): Added.
+ * svg/SVGStyleElement.h:
+ * svg/SVGSwitchElement.cpp:
+ (WebCore::SVGSwitchElement::create): Added.
+ * svg/SVGSwitchElement.h:
+ * svg/SVGSymbolElement.cpp:
+ (WebCore::SVGSymbolElement::create): Added.
+ * svg/SVGSymbolElement.h:
+ * svg/SVGTRefElement.cpp:
+ (WebCore::SVGTRefElement::create): Added.
+ * svg/SVGTRefElement.h:
+ * svg/SVGTSpanElement.cpp:
+ (WebCore::SVGTSpanElement::create): Added.
+ * svg/SVGTSpanElement.h:
+ * svg/SVGTextContentElement.h:
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::create): Added.
+ * svg/SVGTextElement.h:
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::create): Added.
+ * svg/SVGTextPathElement.h:
+ * svg/SVGTextPositioningElement.h:
+ * svg/SVGTitleElement.cpp:
+ (WebCore::SVGTitleElement::create): Added.
+ * svg/SVGTitleElement.h:
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::create): Added.
+ * svg/SVGUseElement.h:
+ * svg/SVGVKernElement.cpp:
+ (WebCore::SVGVKernElement::create): Added.
+ * svg/SVGVKernElement.h:
+ * svg/SVGViewElement.cpp:
+ (WebCore::SVGViewElement::create): Added.
+ * svg/SVGViewElement.h:
+ * wml/WMLAElement.cpp:
+ (WebCore::WMLAElement::create): Added.
+ * wml/WMLAElement.h:
+ * wml/WMLAccessElement.cpp:
+ (WebCore::WMLAccessElement::create): Added.
+ * wml/WMLAccessElement.h:
+ * wml/WMLAnchorElement.cpp:
+ (WebCore::WMLAnchorElement::create): Added.
+ * wml/WMLAnchorElement.h:
+ * wml/WMLBRElement.cpp:
+ (WebCore::WMLBRElement::create): Added.
+ * wml/WMLBRElement.h:
+ * wml/WMLCardElement.cpp:
+ (WebCore::WMLCardElement::create): Added.
+ * wml/WMLCardElement.h:
+ * wml/WMLDoElement.cpp:
+ (WebCore::WMLDoElement::create): Added.
+ * wml/WMLDoElement.h:
+ * wml/WMLFieldSetElement.cpp:
+ (WebCore::WMLFieldSetElement::create): Added.
+ * wml/WMLFieldSetElement.h:
+ * wml/WMLFormControlElement.cpp:
+ (WebCore::WMLFormControlElement::create): Added.
+ * wml/WMLGoElement.cpp:
+ (WebCore::WMLGoElement::create): Added.
+ * wml/WMLGoElement.h:
+ * wml/WMLImageElement.cpp:
+ (WebCore::WMLImageElement::create): Added.
+ * wml/WMLImageElement.h:
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::create): Added.
+ * wml/WMLInputElement.h:
+ * wml/WMLInsertedLegendElement.cpp:
+ (WebCore::WMLInsertedLegendElement::create): Added.
+ * wml/WMLInsertedLegendElement.h:
+ * wml/WMLIntrinsicEvent.cpp:
+ (WebCore::WMLIntrinsicEvent::create): Added.
+ * wml/WMLMetaElement.cpp:
+ (WebCore::WMLMetaElement::create): Added.
+ * wml/WMLMetaElement.h:
+ * wml/WMLNoopElement.cpp:
+ (WebCore::WMLNoopElement::create): Added.
+ * wml/WMLNoopElement.h:
+ * wml/WMLOnEventElement.cpp:
+ (WebCore::WMLOnEventElement::create): Added.
+ * wml/WMLOnEventElement.h:
+ * wml/WMLOptGroupElement.cpp:
+ (WebCore::WMLOptGroupElement::create): Added.
+ * wml/WMLOptGroupElement.h:
+ * wml/WMLOptionElement.cpp:
+ (WebCore::WMLOptionElement::create): Added.
+ * wml/WMLOptionElement.h:
+ * wml/WMLPElement.cpp:
+ (WebCore::WMLPElement::create): Added.
+ * wml/WMLPElement.h:
+ * wml/WMLPostfieldElement.cpp:
+ (WebCore::WMLPostfieldElement::create): Added.
+ * wml/WMLPostfieldElement.h:
+ * wml/WMLPrevElement.cpp:
+ (WebCore::WMLPrevElement::create): Added.
+ * wml/WMLPrevElement.h:
+ * wml/WMLRefreshElement.cpp:
+ (WebCore::WMLRefreshElement::create): Added.
+ * wml/WMLRefreshElement.h:
+ * wml/WMLSelectElement.cpp:
+ (WebCore::WMLSelectElement::create): Added.
+ * wml/WMLSelectElement.h:
+ * wml/WMLSetvarElement.cpp:
+ (WebCore::WMLSetvarElement::create): Added.
+ * wml/WMLSetvarElement.h:
+ * wml/WMLTableElement.cpp:
+ (WebCore::WMLTableElement::create): Added.
+ * wml/WMLTableElement.h:
+ * wml/WMLTaskElement.cpp:
+ (WebCore::WMLTaskElement::create): Added.
+ * wml/WMLTaskElement.h:
+ * wml/WMLTemplateElement.cpp:
+ (WebCore::WMLTemplateElement::create): Added.
+ * wml/WMLTemplateElement.h:
+ * wml/WMLTimerElement.cpp:
+ (WebCore::WMLTimerElement::create): Added.
+ * wml/WMLTimerElement.h:
+
+2010-08-29 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Rename webcore to 'webcore_remaining'.
+ https://bugs.webkit.org/show_bug.cgi?id=44796
+
+ Create a meta-target webcore that inherits from every webcore_XXX targets. (Currently 1)
+ Move direct_dependent_settings and export_dependent_settings from webcore_remaining to webcore
+
+ Obviously, there will be other webcore_XXX targets. Keeping the change as small as possible.
+
+ * WebCore.gyp/WebCore.gyp:
+
+2010-08-29 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ First step in unforking Chrome's FontPlatformDataMac.mm.
+ Move files from platform/graphics/mac to platform/graphics/cocoa
+
+ https://bugs.webkit.org/show_bug.cgi?id=41398
+
+ Just moving files around so no new tests.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/chromium/FontPlatformDataChromiumMac.mm:
+ * platform/graphics/cocoa/FontPlatformData.h: Copied from WebCore/platform/graphics/mac/FontPlatformData.h.
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Copied from WebCore/platform/graphics/mac/FontPlatformDataMac.mm.
+ * platform/graphics/mac/FontPlatformData.h: Removed.
+ * platform/graphics/mac/FontPlatformDataMac.mm: Removed.
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Introduce isValidValue(const String&) of HTMLInputElement and HTMLTextAreaElement
+ https://bugs.webkit.org/show_bug.cgi?id=43537
+
+ isValidValue() is useful for browser implementations to propose
+ form field values without breaking form validity.
+ No new tests because these functions are not exposed to JavaScript.
+
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLTextFormControlElement::):
+ Remove virtual valueMissing(), patternMismatch(), and tooLong().
+ * html/HTMLInputElement.cpp:
+ (WebCore::isValidColorString): Moved from ValidityState.
+ (WebCore::isValidEmailAddress): ditto.
+ (WebCore::HTMLInputElement::isValidValue): Added.
+ (WebCore::HTMLInputElement::typeMismatch): Add a String parameter.
+ (WebCore::HTMLInputElement::valueMissing): Add a String parameter.
+ (WebCore::HTMLInputElement::patternMismatch): Add a String parameter.
+ (WebCore::HTMLInputElement::tooLong): Add String and NeedsToCheckDirtyFlag parameters.
+ (WebCore::HTMLInputElement::rangeUnderflow): Add a String parameter.
+ (WebCore::HTMLInputElement::rangeOverflow): Add a String parameter.
+ (WebCore::HTMLInputElement::stepMismatch): Add a String parameter.
+ * html/HTMLInputElement.h:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::tooLong): Add String and NeedsToCheckDirtyFlag parameters.
+ (WebCore::HTMLTextAreaElement::isValidValue): Added.
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::valueMissing):
+ * html/ValidityState.cpp:
+ (WebCore::ValidityState::valueMissing): Calls valueMissing() of HTMLInputElement or HTMLTextAreaElement.
+ (WebCore::ValidityState::typeMismatch): Passes value() to HTMLInputElement::typeMismatch().
+ (WebCore::ValidityState::patternMismatch): Calls patternMismatch() of HTMLInputElement.
+ (WebCore::ValidityState::tooLong): Calls valueMissing() of HTMLInputElement or HTMLTextAreaElement.
+ (WebCore::ValidityState::rangeUnderflow): Passes value() to HTMLInputElement::rangeUnderflow().
+ (WebCore::ValidityState::rangeOverflow): Passes value() to HTMLInputElement::rangeUnderflow().
+ (WebCore::ValidityState::stepMismatch): Passes value() to HTMLInputElement::stepMismatch().
+ * html/ValidityState.h:
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change lower and higher limits of date/datetime/datetime-local/month/week types
+ https://bugs.webkit.org/show_bug.cgi?id=39737
+
+ According to the latest draft of HTML5, ISO-8601 dates in HTML5
+ should support A.D.0001 in Gregorian calendar though Gregorian
+ calendar started in 1582. So, we change the lower limits of
+ date&time types to 0001-01-01T00:00.
+
+ We also introduce the common higher limit, 275760-09-13T00:00. It
+ is the higher limit of Date type of ECMAScript.
+
+ * html/DateComponents.cpp:
+ (WebCore::DateComponents::parseYear):
+ Rejects years less than A.D.1 and years greater than 275760.
+ (WebCore::withinHTMLDateLimits):
+ Helper functions to check lower and higher limits.
+ (WebCore::DateComponents::addDay):
+ - Remove an overflow check. 'year' can't be so large number because
+ parseYear() rejects such numbers.
+ - Add withinHTMLDateLimits() calls.
+ (WebCore::DateComponents::addMinute):
+ - Add an assertion for the base date.
+ - Add withinHTMLDateLimits() calls.
+ (WebCore::DateComponents::parseMonth):
+ Add withinHTMLDateLimits() call.
+ (WebCore::DateComponents::parseDate): ditto.
+ (WebCore::DateComponents::parseWeek): ditto.
+ (WebCore::DateComponents::parseDateTimeLocal): ditto.
+ (WebCore::DateComponents::parseDateTime): ditto.
+ (WebCore::DateComponents::setMillisecondsSinceEpochForDate): ditto.
+ (WebCore::DateComponents::setMillisecondsSinceEpochForDateTime): ditto.
+ (WebCore::DateComponents::setMillisecondsSinceEpochForMonth): ditto.
+ (WebCore::DateComponents::setMonthsSinceEpoch):
+ Add year range check and withinHTMLDateLimits() call.
+ (WebCore::DateComponents::setMillisecondsSinceEpochForWeek):
+ Add year range check and week range check.
+ * html/DateComponents.h:
+ Update minimum/maximum constant values.
+ (WebCore::DateComponents::minimumDate):
+ (WebCore::DateComponents::minimumDateTime):
+ (WebCore::DateComponents::minimumMonth):
+ (WebCore::DateComponents::minimumWeek):
+ (WebCore::DateComponents::maximumDate):
+ (WebCore::DateComponents::maximumDateTime):
+ (WebCore::DateComponents::maximumMonth):
+ (WebCore::DateComponents::maximumWeek):
+
+2010-08-29 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Kent Tamura.
+
+ [BREWMP] Port SharedBuffer::createWithContentsOfFile
+ https://bugs.webkit.org/show_bug.cgi?id=34412
+
+ Implement SharedBuffer::createWithContentsOfFile with IFile.
+
+ * platform/brew/SharedBufferBrew.cpp: Added.
+ (WebCore::SharedBuffer::createWithContentsOfFile):
+
+2010-08-29 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ Crash when dragging text in Google Docs
+ https://bugs.webkit.org/show_bug.cgi?id=20471
+ <rdar://problem/7783629>
+
+ This fixes the crash but also fixes the generated markup when
+ performing a replacement at the border with an inline, to avoid the
+ new content being merged into the inline.
+ The crash is happening when doApply detects the need of merging
+ the start and the end of the new paragraph and the destination position
+ is moved inside an inline.
+
+ I've added new test cases to an existing layout test.
+
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::doApply): When the situation described above is detected,
+ we insert a placeholder to avoid merging into the inline.
+
+2010-08-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Implement HTML5's fakepath
+ https://bugs.webkit.org/show_bug.cgi?id=29000
+
+ The HTML 5 spec says to prepend C:\fakepath\ to the value of an
+ <input type="file"> control, so that's what we do now.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::value):
+
+2010-08-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66329.
+ http://trac.webkit.org/changeset/66329
+ https://bugs.webkit.org/show_bug.cgi?id=44845
+
+ broke chromium mac (Requested by jamesr on #webkit).
+
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/mac/FontPlatformData.h: Renamed from WebCore/platform/graphics/cocoa/FontPlatformData.h.
+ (WebCore::toCTFontRef):
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::FontPlatformData::isHashTableDeletedValue):
+ (WebCore::FontPlatformData::size):
+ (WebCore::FontPlatformData::syntheticBold):
+ (WebCore::FontPlatformData::syntheticOblique):
+ (WebCore::FontPlatformData::hash):
+ (WebCore::FontPlatformData::operator==):
+ (WebCore::FontPlatformData::font):
+ (WebCore::FontPlatformData::isColorBitmapFont):
+ (WebCore::FontPlatformData::cgFont):
+ (WebCore::FontPlatformData::hashTableDeletedFontValue):
+ * platform/graphics/mac/FontPlatformDataMac.mm: Renamed from WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm.
+ (WebCore::FontPlatformData::FontPlatformData):
+ (WebCore::~FontPlatformData):
+ (WebCore::FontPlatformData::operator=):
+ (WebCore::FontPlatformData::setFont):
+ (WebCore::FontPlatformData::roundsGlyphAdvances):
+ (WebCore::FontPlatformData::allowsLigatures):
+ (WebCore::FontPlatformData::ctFont):
+ (WebCore::FontPlatformData::description):
+
+2010-08-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Fix RenderStyle::addCursor to use a StyleImage, not a CachedImage
+ https://bugs.webkit.org/show_bug.cgi?id=44719
+
+ Modernize the CSS cursor code to use a StyleImage, rather
+ than a CachedImage in the CursorData, and handle the loading
+ of pending images for the cursor property.
+
+ Covered by manual tests in WebCore/manual-tests
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ (WebCore::CSSStyleSelector::loadPendingImages):
+ * html/canvas/WebGLRenderingContext.cpp:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::selectCursor):
+ * rendering/style/CursorData.h:
+ (WebCore::CursorData::CursorData):
+ (WebCore::CursorData::image):
+ (WebCore::CursorData::setImage):
+ * rendering/style/CursorList.h:
+ (WebCore::CursorList::operator[]):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::addCursor):
+ * rendering/style/RenderStyle.h:
+
+2010-08-29 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ When properties are missing from animation keyframes, interpolate between those keyframes that specify them
+ https://bugs.webkit.org/show_bug.cgi?id=40794
+
+ When a property does not appear in all keyframes of a keyframe animation, we currently use the
+ value of that property from the unanimated style. That forces the author to use additional
+ keyframes for properties that need to "skip a keyframe", which is laborious.
+
+ With this change, properties are interpolated between the keyframes in which they appear.
+ This is equivalent to splitting each property out into its own set of keyframes.
+
+ Tests: animations/missing-keyframe-properties-repeating.html
+ animations/missing-keyframe-properties-timing-function.html
+ animations/missing-keyframe-properties.html
+
+ * css/CSSStyleSelector.h:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::styleForKeyframe): Pass a KeyframeValue in so that we can
+ collect which properties are represented per keyframe.
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation): Keyframes are inserted into a
+ KeyframeList by object now, rather than by key and style.
+
+ * page/animation/AnimationBase.cpp:
+ (WebCore::AnimationBase::progress): Use AnimationDirectionAlternate for readability.
+
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): Renamed from getKeyframeAnimationInterval.
+ Use fractionalTime etc to match AnimationBase::progress(), and do lookups per-property.
+ Simplify the code that finds the relevant keyframe to do less work.
+ (WebCore::KeyframeAnimation::animate): Call fetchIntervalEndpointsForProperty() for each property, rather than just once for the
+ entire keyframe.
+ (WebCore::KeyframeAnimation::getAnimatedStyle): Ditto.
+ (WebCore::KeyframeAnimation::hasAnimationForProperty): FIXME comment.
+
+ * page/animation/KeyframeAnimation.h: Rename getKeyframeAnimationInterval() to fetchIntervalEndpointsForProperty().
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation): For hardware animations, only insert values
+ for keyframes which contain the property.
+
+ (WebCore::KeyframeList::KeyframeList): insert() takes a KeyframeValue now.
+ * rendering/style/KeyframeList.cpp:
+ (WebCore::KeyframeList::operator==):
+ (WebCore::KeyframeList::insert): Fix insert/replace logic, and ensure we maintain the
+ m_properties hash.
+
+ * rendering/style/KeyframeList.h:
+ (WebCore::KeyframeValue::KeyframeValue): Make members private, with accessors.
+ Add a m_properties HashSet for the properties animated in this keyframe.
+
+
+2010-08-29 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r66324): Fix warnings in editing/ApplyStyleCommand.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=44843
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Suggested parentheses added around && within ||
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ Try to fix Mac build.
+
+ * WebCore.xcodeproj/project.pbxproj: Mark CounterContent.h Private instead of Project.
+
+2010-08-29 Pawel Hajdan <phajdan.jr@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Fix libxml workarounds to work with recent versions of libxml.
+ I was testing locally with libxml2-2.7.6.
+ https://bugs.webkit.org/show_bug.cgi?id=30508
+
+ Based on patch by Philippe Normand <pnormand@igalia.com>.
+
+ This also fixes a Chromium bug:
+ http://code.google.com/p/chromium/issues/detail?id=29333
+
+ * dom/XMLDocumentParserLibxml2.cpp:
+ (WebCore::switchToUTF16):
+ (WebCore::XMLParserContext::createStringParser):
+ (WebCore::XMLDocumentParser::doWrite):
+ (WebCore::startDocumentHandler):
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ Try to fix Windows build.
+
+ * rendering/style/ContentData.h: Added include of CounterContent.h.
+
+ * css/CSSStyleSelector.cpp: Removed include of CounterContent.h.
+ * rendering/style/ContentData.cpp: Ditto.
+ * rendering/style/RenderStyle.cpp: Ditto.
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Deploy OwnPtr, PassOwnPtr, and adoptPtr in some CSS-related files
+ https://bugs.webkit.org/show_bug.cgi?id=44834
+
+ * css/CSSFunctionValue.cpp:
+ (WebCore::CSSFunctionValue::CSSFunctionValue): Updated since
+ CSSParserFunction::args is an OwnPtr.
+ (WebCore::CSSFunctionValue::parserValue): Ditto.
+
+ * css/CSSGrammar.y: Added leakPtr calls for putting MediaQueryExp*
+ into the media query expression list, which is a vector of raw pointers
+ that are deleted explicitly.
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::setCSSStyleSheet): Updated to use document instead of doc.
+ (WebCore::CSSImportRule::insertedIntoParent): Ditto.
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc): Ditto.
+
+ * css/CSSNamespace.h: Took the "m_" off the names of the data members of
+ this structure. Used OwnPtr for the parent data member. Rewrote the
+ namespaceForPrefix function so it's iterative instead of recursive.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::CSSParser): Update since m_mediaQuery, m_floatingMediaQuery,
+ m_floatingMediaQueryExp, and m_floatingMediaQueryExpList are now all OwnPtr and
+ thus don't need to be initialized.
+ (WebCore::CSSParser::~CSSParser): Update to not delete the above OwnPtr.
+ (WebCore::CSSParser::parseMediaQuery): Replaced the code that sets m_mediaQuery
+ to 0 with an assertion. Also use release when passing the media query to
+ appendMediaQuery.
+ (WebCore::CSSParser::document): Updated to use document instead of doc and to
+ use early return instead of a nested if.
+ (WebCore::CSSParser::parseContent): Added a get() call needed since
+ CSSParserFunction::args is an OwnPtr.
+ (WebCore::CSSParser::parseAnimationTimingFunction): Ditto.
+ (WebCore::CSSParser::parseDashboardRegions): Ditto.
+ (WebCore::CSSParser::parseShape): Ditto.
+ (WebCore::isValidFormatFunction): Ditto.
+ (WebCore::CSSParser::parseFontFaceSrc): Ditto.
+ (WebCore::CSSParser::parseColorParameters): Ditto.
+ (WebCore::CSSParser::parseHSLParameters): Ditto.
+ (WebCore::parseGradientColorStop): Ditto.
+ (WebCore::CSSParser::parseGradient): Ditto.
+ (WebCore::CSSParser::parseCanvas): Ditto.
+ (WebCore::CSSParser::parseTransform): Ditto.
+ (WebCore::CSSParser::createFloatingMediaQueryExp): Updated to use adoptPtr and
+ remove the explicit deletion.
+ (WebCore::CSSParser::sinkFloatingMediaQueryExp): Updated to use release.
+ (WebCore::CSSParser::createFloatingMediaQueryExpList): Ditto.
+ (WebCore::CSSParser::sinkFloatingMediaQueryExpList): Ditto.
+ (WebCore::CSSParser::createFloatingMediaQuery): Ditto.
+ (WebCore::CSSParser::sinkFloatingMediaQuery): Ditto.
+ (WebCore::CSSParser::checkForVariables): Use get for CSSParserFunction::args.
+
+ * css/CSSParser.h: Made return values for sinkFloatingMediaQueryExp,
+ sinkFloatingMediaQueryExpList, and sinkFloatingMediaQuery be PassOwnPtr.
+ Made createFloatingMediaQuery take a PassOwnPtr. Made m_mediaQuery,
+ m_floatingMediaQuery, m_floatingMediaQueryExp, and m_floatingMediaQueryExpList
+ be OwnPtr.
+
+ * css/CSSParserValues.h: Made args be an OwnPtr.
+
+ * css/CSSStyleSelector.cpp: Made CSSRuleSet m_universalRules and m_pageRules
+ be OwnPtr.
+ (WebCore::CSSStyleSelector::CSSStyleSelector): Use document instead of doc.
+ Got rid of the init function, only called here, because it did nothing that
+ wasn't already done. Eliminated unneeded code to set m_userStyle to 0, since
+ it's now an OwnPtr and will be 0 automatically. Use adoptPtr when initializing
+ m_medium, m_authorStyle, and m_useStyle.
+ (WebCore::CSSStyleSelector::~CSSStyleSelector): Got rid of unneeded delete of
+ m_medium, m_authorStyle, and m_userStyle, and unneded clear of m_keyframesRuleMap.
+ (WebCore::CSSStyleSelector::styleForElement): Use get with m_userStyle and
+ m_authorStyle.
+ (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto.
+ (WebCore::CSSStyleSelector::styleForPage): Ditto.
+ (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Ditto.
+ (WebCore::CSSRuleSet::CSSRuleSet): Got rid of unneeded initialization of
+ m_universalRules and m_pageRules.
+ (WebCore::CSSRuleSet::~CSSRuleSet): Got rid of unneeed deletion of same.
+ (WebCore::CSSRuleSet::addRule): Use adoptPtr to initialize m_universalRules.
+ (WebCore::CSSRuleSet::addPageRule): Use adoptPtr to initialize m_pageRules.
+ (WebCore::CSSStyleSelector::applyProperty): Use adopPtr to create counter
+ context object.
+
+ * css/CSSStyleSelector.h: Made m_authorStyle, m_userStyle, and m_medium use
+ OwnPtr. Got rid of init function.
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::CSSStyleSheet): Updatd for name change from m_doc
+ and doc to m_document and document. Eliminated unneeded initialization of
+ m_namespaces now that it is an OwnPtr.
+ (WebCore::CSSStyleSheet::~CSSStyleSheet): Got rid of unneeded deletion of same.
+ (WebCore::CSSStyleSheet::cssRules): Updated doc to document.
+ (WebCore::CSSStyleSheet::addNamespace): Added adopPtr when setting m_namespaces.
+ (WebCore::CSSStyleSheet::determineNamespace): Updated for changes to the
+ CSSNamespace class, using uri data member instead of function.
+ (WebCore::CSSStyleSheet::styleSheetChanged): Use document instead of doc.
+
+ * css/CSSStyleSheet.h: Renamed doc and m_doc to document and m_document.
+ Made m_namespaces an OwnPtr.
+
+ * css/CSSValueList.cpp:
+ (WebCore::CSSValueList::CSSValueList): Clean up logic a bit.
+ (WebCore::CSSValueList::createParserValueList): Clean up logic a bit and
+ return a PassOwnPtr.
+
+ * css/CSSValueList.h: Changed createParserValueList to return a PassOwnPtr.
+
+ * css/CSSVariablesDeclaration.cpp:
+ (WebCore::CSSVariablesDeclaration::setNeedsStyleRecalc): Updated to use
+ document instead of doc.
+
+ * css/MediaList.cpp:
+ (WebCore::MediaList::deleteMedium): Use OwnPtr instead of a boolean to
+ make sure the newly-created query here is deleted.
+ (WebCore::MediaList::appendMediaQuery): Updated to take PassOwnPtr.
+
+ * css/MediaList.h: Changed appendMediaQuery to take a PassOwnPtr.
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::getStyleSheet): Use document instead of doc.
+ (WebCore::InspectorDOMAgent::getRuleRanges): Ditto.
+ (WebCore::InspectorDOMAgent::buildObjectForStyleSheet): Ditto.
+
+ * rendering/style/ContentData.cpp:
+ (WebCore::ContentData::clear): Update since data members are OwnPtr.
+ Also, fixed iterative deletion algorithm to be much simpler.
+ (WebCore::ContentData::dataEquivalent): Added FIXMEs and tweaked formatting.
+ (WebCore::ContentData::deleteContent): Tweaked formatting.
+
+ * rendering/style/ContentData.h: Changed m_next to an OwnPtr.
+ Added assertions to getters to check that we get the correct type.
+ Use leakRef instead of releaseRef. Changed setCounter and setNext functions
+ to take PassOwnPtr arguments.
+
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::prepareToSetContent): Refactored common part of the
+ into a shared function so the three setContent functions don't have to repeat
+ the logic. Used an OwnPtr to avoid confusing logic and leakPtr.
+ (WebCore::RenderStyle::setContent): Changed argument to PassOwnPtr.
+
+ * rendering/style/RenderStyle.h: Changed setContent argument to a PassOwnPtr.
+ Added declaration of prepareToSetContent helper function.
+
+2010-08-29 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ [WINCE] Port ScrollbarThemeWin to WinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44818
+
+ Add a #ifdef around usage of unsupported DFCS_FLAT.
+
+ * platform/win/ScrollbarThemeWin.cpp:
+ (WebCore::ScrollbarThemeWin::paintButton):
+
+2010-08-29 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ [WINCE] Port SystemInfo to WinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44817
+
+ * platform/win/SystemInfo.cpp:
+ (WebCore::isRunningOnVistaOrLater):
+
+2010-08-28 Jeremy Moskovich <jeremy@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ First step in unforking Chrome's FontPlatformDataMac.mm.
+ Move files from platform/graphics/mac to platform/graphics/cocoa
+
+ https://bugs.webkit.org/show_bug.cgi?id=41398
+
+ Just moving files around so no new tests.
+
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/cocoa: Added.
+ * platform/graphics/cocoa/FontPlatformData.h: Copied from WebCore/platform/graphics/mac/FontPlatformData.h.
+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Copied from WebCore/platform/graphics/mac/FontPlatformDataMac.mm.
+ * platform/graphics/mac/FontPlatformData.h: Removed.
+ * platform/graphics/mac/FontPlatformDataMac.mm: Removed.
+
+2010-08-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Some IDL attributes don't reflect URL content attributes properly
+ https://bugs.webkit.org/show_bug.cgi?id=43650
+
+ * dom/Document.cpp:
+ (WebCore::Document::processBaseElement): Added. Implements the rules for base elements
+ from the HTML5 specification. Handles multiple base elements in the same document.
+
+ * dom/Document.h: Removed setBaseElementURL and setBaseElementTarget, replacing them
+ with processBaseElement.
+
+ * html/HTMLBaseElement.cpp:
+ (WebCore::HTMLBaseElement::parseMappedAttribute): Call the new processBaseElement
+ function.
+ (WebCore::HTMLBaseElement::insertedIntoDocument): Ditto.
+ (WebCore::HTMLBaseElement::removedFromDocument): Ditto.
+ (WebCore::HTMLBaseElement::isURLAttribute): Added.
+ (WebCore::HTMLBaseElement::target): Moved here from the .h file and changed to not
+ realy on an m_target local variable.
+
+ * html/HTMLBaseElement.h: Added an override of the isURLAttribute function. Removed
+ unneeded process function. Removed declaration of nonexistent setHref and setTarget
+ functions. Removed unneeded m_hrefAttrValue, m_href, and m_target. Moved
+ implementation of target function into the .cpp file.
+
+ * html/HTMLBaseElement.idl: Marked the href attribute as URL.
+
+ * html/HTMLBlockquoteElement.cpp:
+ (WebCore::HTMLBlockquoteElement::isURLAttribute): Added.
+ * html/HTMLBlockquoteElement.h: Added isURLAttribute.
+ * html/HTMLBlockquoteElement.idl: Marked the cite attribute as URL.
+
+ * html/HTMLEmbedElement.idl: Marked the src attribute as URL.
+
+ * html/HTMLFormElement.cpp: Added a comment about the action function, which should
+ be removed.
+
+ * html/HTMLFormElement.idl: Marked the action attribute as URL.
+
+ * html/HTMLHtmlElement.cpp:
+ (WebCore::HTMLHtmlElement::isURLAttribute): Added.
+ (WebCore::HTMLHtmlElement::insertedIntoDocument): Tweaked a bit.
+ * html/HTMLHtmlElement.h: Added isURLAttribute.
+ * html/HTMLHtmlElement.idl: Marked the manifest attribute as URL.
+
+ * html/HTMLIFrameElement.idl: Marked the src attribute a URL.
+
+ * html/HTMLModElement.cpp:
+ (WebCore::HTMLModElement::isURLAttribute): Added.
+ * html/HTMLModElement.h: Added isURLAttribute.
+ * html/HTMLModElement.idl: Marked the cite attribute as URL.
+
+ * html/HTMLQuoteElement.cpp:
+ (WebCore::HTMLQuoteElement::isURLAttribute): Added.
+ * html/HTMLQuoteElement.h: Added isURLAttribute.
+ * html/HTMLQuoteElement.idl: Marked the cite attribute as URL.
+
+ * html/HTMLViewSourceDocument.cpp:
+ (WebCore::HTMLViewSourceDocument::processTagToken): Changed code to create a base
+ element instead of calling setBaseElementURL directly.
+ (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use AtomicString instead of String.
+ (WebCore::HTMLViewSourceDocument::addLine): Ditto.
+ (WebCore::HTMLViewSourceDocument::addText): Ditto.
+ (WebCore::HTMLViewSourceDocument::addBase): Added. Creates a base element and inserts it.
+ (WebCore::HTMLViewSourceDocument::addLink): Use AtomicString instead of String.
+
+ * html/HTMLViewSourceDocument.h: Updated function declarations as above.
+
+ * bindings/scripts/test/CPP/WebDOMTestCallback.h:
+ * bindings/scripts/test/CPP/WebDOMTestInterface.h:
+ * bindings/scripts/test/CPP/WebDOMTestObj.h:
+ * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
+ * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+ Updated results, which changed due to the fixes for at
+ least these bugs, and perhaps a few more:
+ https://bugs.webkit.org/show_bug.cgi?id=42115
+ https://bugs.webkit.org/show_bug.cgi?id=44597
+ https://bugs.webkit.org/show_bug.cgi?id=44738
+
+ * bindings/scripts/test/TestObj.idl:
+ * html/HTMLAnchorElement.idl:
+ * html/HTMLAreaElement.idl:
+ * html/HTMLEmbedElement.idl:
+ * html/HTMLFormElement.cpp:
+ * html/HTMLFormElement.idl:
+ * html/HTMLFrameElement.idl:
+ * html/HTMLIFrameElement.idl:
+ * html/HTMLImageElement.idl:
+ * html/HTMLInputElement.idl:
+ * html/HTMLLinkElement.idl:
+ * html/HTMLMediaElement.idl:
+ * html/HTMLObjectElement.idl:
+ * html/HTMLScriptElement.idl:
+ * html/HTMLSourceElement.idl:
+ * html/HTMLVideoElement.idl:
+ Tweaked formatting.
+
+2010-08-28 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ The logic to escape entities in appendEscapedContent and appendAttributeValue should be merged
+ https://bugs.webkit.org/show_bug.cgi?id=44831
+
+ Added appendCharactersReplacingEntities to escape &, <, >, ", and nbsp based on the mask.
+ Removed escapeContentText because it was only used in appendText, which now directly calls
+ appendCharactersReplacingEntities. Replaced appendEscapedContent, ucharRange, and appendUCharRange
+ by appendNodeValue.
+
+ No new tests are added since this is a cleanup.
+
+ * editing/markup.cpp:
+ (WebCore::):
+ (WebCore::appendCharactersReplacingEntities): Added.
+ (WebCore::MarkupAccumulator::appendAttributeValue): Calls appendCharactersReplacingEntities.
+ (WebCore::MarkupAccumulator::appendNodeValue): Added.
+ (WebCore::MarkupAccumulator::appendText): Calls appendNodeValue and appendCharactersReplacingEntities.
+ (WebCore::urlToMarkup): Calls escapeEntities.
+
+2010-08-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ cannot remove text-decoration when style is added by u or s
+ https://bugs.webkit.org/show_bug.cgi?id=44560
+
+ The bug was caused by WebKit not pushing down implicitly added styles to descendent nodes.
+ Fixed the bug by pushing down all elements that implicitly add style.
+
+ extractInlineStyleToPushDown now calls removeImplicitlyStyledElement, which was modified to extract
+ the style implicitly added by the element to extractStyle.
+
+ This revealed a bug in applyInlineStyleToPushDown where applyInlineStyleIfNeeded could add
+ an implicitly styled element inside an element with a conflicting style, thereby overriding the style of the element.
+ Fixed this by extending the logic to honor the existing inline style declaration used in
+ the case of rewriting inline style declaration to all cases including the one calling addInlineStyleIfNeeded.
+
+ Also fixed a bug in removeInlineStyle where pushDownInlineStyleAroundNode was called on a text node
+ outside of selection if start was at the end of the text node.
+
+ Test: editing/style/push-down-implicit-styles.html
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Added extractedStyle, which receives
+ the style implicitly added by the element being removed.
+ (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown): Calls removeImplicitlyStyledElement
+ to remove the implicitly styled element and extract the inline style added by the element.
+ (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Fixed a bug that addInlineStyleIfNeeded
+ could override the inline style declaration style of the node.
+ (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Uses extractInlineStyleToPushDown
+ (WebCore::ApplyStyleCommand::removeInlineStyle): See above.
+ * editing/ApplyStyleCommand.h: Prototype changes.
+
+2010-08-27 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Barth.
+
+ <http://webkit.org/b/44802> REGRESSION (r65351): WebCore build fails due to attempting to directly access WebKitTools/Scripts
+
+ Move create-html-entity-table in to WebCore so that the build is again self-contained.
+ The script is also updated to take input as a CSV file rather than JSON as the former
+ can be parsed without requiring a third-party Python module be installed.
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.pri:
+ * WebCore.xcodeproj/project.pbxproj: Stop copying the input file in to the WebCore framework wrapper.
+ * html/parser/HTMLEntityNames.in: Added.
+ * html/parser/HTMLEntityNames.json: Removed.
+ * html/parser/create-html-entity-table: Renamed from WebKitTools/Scripts/create-html-entity-table.
+
+2010-08-28 Daniel Bates <dbates@rim.com>
+
+ Attempt to fix Chromium Mac Release bot after changeset 66305 <http://trac.webkit.org/changeset/66305>.
+
+ * accessibility/chromium/AXObjectCacheChromium.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification): Added case statements for missing enum values.
+ These case statements simply fall through to a "break" statement.
+
+2010-08-26 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Add explicit destructor for C++ DOM bindings to avoid memory leaks when using SWIG.
+ https://bugs.webkit.org/attachment.cgi?bugid=44738
+
+ * bindings/scripts/CodeGeneratorCPP.pm:
+
+2010-08-28 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add WebM MIME types to type registry
+ https://bugs.webkit.org/show_bug.cgi?id=44826
+
+ * platform/MIMETypeRegistry.cpp:
+ (WebCore::TypeExtensionPair::): Add "video/webm" and "audio/webm" types.
+
+2010-08-28 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Crash reloading fast/events/tabindex-focus-blur-all.html test
+ https://bugs.webkit.org/show_bug.cgi?id=44743
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::asyncEventTimerFired): If m_isWaitingToDecrementLoadEventDelayCount
+ is true, call setShouldDelayLoadEvent(false) and set the timer to fire the pending events
+ on the next idle.
+ (WebCore::HTMLMediaElement::setShouldDelayLoadEvent): Don't clear the delay from within a
+ media engine callback because document 'load' event handlers that cause the page to become
+ inactive will delete the media engine.
+ * html/HTMLMediaElement.h: Add m_isWaitingToDecrementLoadEventDelayCount.
+
+2010-08-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ When properties are missing from animation keyframes, interpolate between those keyframes that specify them
+ https://bugs.webkit.org/show_bug.cgi?id=40794
+
+ Some preliminary cleanup; for vectors, prefer indexed access rather than using iterators.
+
+ No behavior changes.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
+ * page/animation/KeyframeAnimation.cpp:
+ (WebCore::KeyframeAnimation::getKeyframeAnimationInterval):
+ (WebCore::KeyframeAnimation::validateTransformFunctionList):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+ * rendering/style/KeyframeList.h:
+ (WebCore::KeyframeList::at):
+ (WebCore::KeyframeList::keyframes):
+
+2010-08-28 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Speculative fix for <rdar://problem/7275077> Crash in InlineBox::root() under RenderTextControl::textWithHardLineBreaks()
+ https://bugs.webkit.org/show_bug.cgi?id=44816
+
+ No test because I could not reproduce the crash.
+
+ In a common variant of the crash, InlineBox::root() is called with this == 12. This suggests that
+ a RenderInline* was cast into a RenderBox*, so RenderBox::inlineBoxWrapper() interpreted the
+ m_lineHeight and m_verticalPosition members of a RenderInline as a pointer to an InlineBox.
+
+ The cast into RenderBox* in textWithHardLineBreaks() was introduced in r40881 with no exaplanation.
+
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::textWithHardLineBreaks): Fetch the first line directly from the inner
+ text block instead of relying on the first child being a text node.
+
+2010-08-28 Moritz Lipp <mlq@pwmt.org>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Improper webkit_dom_document_evaluate implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=42115
+
+ The generated webkit_dom_document_evaluate() function does not meet the
+ evaluate interface described in the W3 Documentation
+ http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathEvaluator-evaluate
+ "If this is specified as nullor the implementation does not reuse the
+ specified result,...". The current implementation did not accept the
+ result parameter to be NULL.
+
+ * bindings/scripts/CodeGeneratorGObject.pm:
+
+2010-08-28 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ HTMLTreeBuilder needs to call HTMLFormElement::setDemoted
+ https://bugs.webkit.org/show_bug.cgi?id=44781
+
+ This patch teaches the HTMLTreeBuilder about demoted form elements.
+ Demoting a form element magically stops the form element from
+ rendering. Demoted form elements are a concept from the
+ LegacyHTMLTreeBuilder, but they are somewhat of a hack because
+ rendering should be DOM-based. We'll likely look for a better solution
+ in a future patch.
+
+ * html/parser/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::insertHTMLFormElement):
+ * html/parser/HTMLConstructionSite.h:
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::processStartTagForInTable):
+
+2010-08-28 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Add AX notification for childrenChanged
+ https://bugs.webkit.org/show_bug.cgi?id=44472
+
+ Test by running platform/chromium/accessibility/children-changed-notification.html within chromium's DRT
+
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXObjectCache::):
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::childrenChanged):
+ * accessibility/chromium/AXObjectCacheChromium.cpp:
+ (WebCore::AXObjectCache::postPlatformNotification):
+ * page/chromium/ChromeClientChromium.h:
+
+2010-08-28 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Implement the DOM FileWriter class
+ https://bugs.webkit.org/show_bug.cgi?id=44362
+
+ No new tests until the delegate class has an implementation; bug logged.
+
+ Build file additions.
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ The AsyncFileWriter is an abstract interface to which FileWriter delegates all the hard work.
+ * html/AsyncFileWriter.h: Added.
+
+ The FileWriterClient is the interface for communications back from the AsyncFileWriter [success/failure, progress events].
+ * html/FileWriterClient.h: Added.
+ (WebCore::FileWriterClient::~FileWriterClient):
+
+ Added all delegation, state tracking, and progress event processing.
+ * html/FileWriter.cpp:
+ (WebCore::FileWriter::FileWriter):
+ (WebCore::FileWriter::initialize):
+ (WebCore::FileWriter::~FileWriter):
+ ActiveDomObject stuff
+ (WebCore::FileWriter::hasPendingActivity):
+ (WebCore::FileWriter::stop):
+ (WebCore::FileWriter::write):
+ FileWriter public interface
+ (WebCore::FileWriter::seek):
+ (WebCore::FileWriter::truncate):
+ (WebCore::FileWriter::abort):
+ FileWriterClient interface
+ (WebCore::FileWriter::didWrite):
+ (WebCore::FileWriter::didTruncate):
+ (WebCore::FileWriter::didFail):
+ Progress events
+ (WebCore::FileWriter::fireEvent):
+ * html/FileWriter.h:
+
+2010-08-28 Marc-Antoine Ruel <maruel@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Preparatory patch to split libwebcore in multiple libraries.
+
+ Start with a webcore_prerequisites pseudo-target what will be the common
+ target for all the other ones.
+
+ * WebCore.gyp/WebCore.gyp:
+
+2010-08-28 Pratik Solanki <psolanki@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add an ENABLE define for purgeable memory support
+ https://bugs.webkit.org/show_bug.cgi?id=44777
+
+ * platform/PurgeableBuffer.h:
+ * platform/mac/PurgeableBufferMac.cpp:
+
+2010-08-28 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Fix error message when theme loading fails
+ https://bugs.webkit.org/show_bug.cgi?id=44775
+
+ Parameters for logging were in the wrong order.
+
+ No new functionality so no new tests.
+
+ * platform/efl/ScrollbarEfl.cpp:
+ (ScrollbarEfl::setParent): exchange argument order in log function
+ call
+
+2010-08-27 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ REGRESSION: some tests no longer painting
+ https://bugs.webkit.org/show_bug.cgi?id=44773
+
+ Fix regression from the RenderImageResource introduction, fast/canvas/canvas-as-image.html
+ and fast/canvas/canvas-as-image-incremental-repaint.html pixel tests did not work anymore.
+
+ * rendering/RenderImageResource.h:
+ (WebCore::RenderImageResource::hasImage): Make hasImage virtual.
+ * rendering/RenderImageResourceStyleImage.h:
+ (WebCore::RenderImageResourceStyleImage::hasImage): Always return true, just like RenderImageGeneratedContent did.
+
+2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Cache plugin info to a persistent database
+
+ https://bugs.webkit.org/show_bug.cgi?id=43179
+
+ Implement a cache of NPAPI plugin metadata. Write the metadata to aa
+ file that gets rewritten if any plugin is added / removed. Compilation
+ of the feature is controlled by #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+
+ Currently only enabled for Qt UNIX flavors.
+
+ * WebCore.pro: Enable NETSCAPE_PLUGIN_METADATA_CACHE for UNIX builds
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::openFile): Added.
+ (WebCore::readFromFile): Added.
+ * plugins/PluginDatabase.cpp:
+ (WebCore::persistentPluginMetadataCachePath): Static accessor for the path
+ (WebCore::PluginDatabase::PluginDatabase): Add instance variable.
+ (WebCore::PluginDatabase::refresh):
+ (WebCore::PluginDatabase::pluginForMIMEType): Ensure returned plugin is loaded.
+ (WebCore::PluginDatabase::MIMETypeForExtension): Ensure returned plugin is loaded.
+ (WebCore::PluginDatabase::clear):
+ (WebCore::fillBufferWithContentsOfFile): Static helper function.
+ (WebCore::readUTF8String): Static helper function.
+ (WebCore::readTime): Static helper function.
+ (WebCore::PluginDatabase::loadPersistentMetadataCache):
+ (WebCore::writeUTF8String): Static helper function.
+ (WebCore::writeTime): Static helper function.
+ (WebCore::PluginDatabase::updatePersistentMetadataCache): Added.
+ (WebCore::PluginDatabase::isPersistentMetadataCacheEnabled): Added.
+ (WebCore::PluginDatabase::setPersistentMetadataCacheEnabled):Added.
+ (WebCore::PluginDatabase::persistentMetadataCachePath): Added.
+ (WebCore::PluginDatabase::setPersistentMetadataCachePath): Added.
+ * plugins/PluginDatabase.h:
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::PluginPackage): Add instance variable.
+ (WebCore::PluginPackage::createPackageFromCache): Added.
+ (WebCore::PluginPackage::ensurePluginLoaded): Added.
+ * plugins/PluginPackage.h:
+ (WebCore::PluginPackage::fullMIMEDescription): Added.
+ * plugins/qt/PluginPackageQt.cpp:
+ (WebCore::PluginPackage::fetchInfo): Split mime parsing.
+ (WebCore::PluginPackage::setMIMEDescription): Added. Mime parsing.
+
+2010-08-27 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Implement symbolic CSS3 list-style-types
+ https://bugs.webkit.org/show_bug.cgi?id=36734
+
+ Implements all of the symbolic CSS3 list-style-types as per
+ section 4.5 of the CSS3 Lists module <http://www.w3.org/TR/css3-lists/#symbolic>.
+
+ Test: fast/lists/w3-css3-list-styles-symbolic.html
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added list style types Asterisks and Footnotes.
+ * css/CSSValueKeywords.in: Ditto.
+ * inspector/front-end/SourceCSSTokenizer.re2js: Ditto.
+ * rendering/RenderListMarker.cpp:
+ (WebCore::toAlphabeticOrNumeric): Changed type of parameter sequenceSize from int to unsigned.
+ (WebCore::toSymbolic): Added.
+ (WebCore::toAlphabetic): Changed type of parameter alphabetSize from int to unsigned.
+ (WebCore::toNumeric): Changed type of parameter numeralsSize from int to unsigned.
+ (WebCore::effectiveListMarkerType): Added.
+ (WebCore::listMarkerSuffix): Added list style types Asterisks and Footnotes.
+ (WebCore::listMarkerText): Ditto.
+ (WebCore::RenderListMarker::paint): Ditto.
+ (WebCore::RenderListMarker::calcPrefWidths): Ditto.
+ (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
+ * rendering/style/RenderStyleConstants.h: Ditto.
+ (WebCore::):
+
+2010-08-27 Vincent Scheib <scheib@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ CanvasRenderingContext2D::willDraw changed to didDraw
+
+ Solves issue with canvas to canvas draw calls, and simplifies
+ mixed software and GPU acceleration of GraphicsContext implementations
+ which must track dirty rects for backing stores.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44741
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::didDraw):
+ * html/HTMLCanvasElement.h:
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::fill):
+ (WebCore::CanvasRenderingContext2D::stroke):
+ (WebCore::CanvasRenderingContext2D::clearRect):
+ (WebCore::CanvasRenderingContext2D::fillRect):
+ (WebCore::CanvasRenderingContext2D::strokeRect):
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ (WebCore::CanvasRenderingContext2D::drawImageFromRect):
+ (WebCore::CanvasRenderingContext2D::didDraw):
+ (WebCore::CanvasRenderingContext2D::putImageData):
+ (WebCore::CanvasRenderingContext2D::drawTextInternal):
+ * html/canvas/CanvasRenderingContext2D.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::markContextChanged):
+
+2010-08-27 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Add new WebClipboard method for setting generic data in copy/cut handlers.
+ https://bugs.webkit.org/show_bug.cgi?id=42121
+
+ No new tests.
+
+ * platform/chromium/ChromiumBridge.h:
+
+2010-08-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ Remove unnecessary AlphaBlend in PasteboardWin.
+ https://bugs.webkit.org/show_bug.cgi?id=44720
+
+ Replacing AlphaBlend with BitBlt is safe because testing showed that alpha
+ never survives copy-and-paste on Windows in any browser, and StretchBlt
+ was a overkill since the source and destination size are always equal.
+
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::writeImage):
+
+2010-08-26 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia)
+ https://bugs.webkit.org/show_bug.cgi?id=38282
+
+ * platform/graphics/skia/GraphicsContext3DSkia.cpp: Dealing with the case of texImage2D with HTMLCanvasElement input.
+ (WebCore::GraphicsContext3D::getImageData):
+
+2010-08-26 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Working around compile issue in LayerRendererChromium.cpp
+ when DEBUG_GL_CALLS=1
+ https://bugs.webkit.org/show_bug.cgi?id=44739
+
+ No new functionality, no new tests.
+
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::drawLayerIntoStencilBuffer):
+
+2010-08-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ [WINCE] Port SoftLinking to WinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44693
+
+ WinCE provides GetProcAddressW and GetProcAddressA for softlinking.
+ Unfortunately WinNT provides only GetProcAddress (without A or W).
+
+ Add a platform dependent macro for GetProcAddress.
+
+ * platform/win/SoftLinking.h:
+
+2010-08-27 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] ScrollbarThemeGtk should account for the trough_under_steppers property
+ https://bugs.webkit.org/show_bug.cgi?id=44742
+
+ No new tests until this code is activated, at which point pixel tests will
+ test the scrollbar rendering.
+
+ * platform/gtk/ScrollbarThemeGtk.cpp:
+ (WebCore::ScrollbarThemeGtk::paintTrackBackground): Only inflate the track background
+ if the style specifies trough_under_steppers.
+ (WebCore::ScrollbarThemeGtk::paint): If the theme specifies trough_under_steppers,
+ a dirty stepper also triggers a repaint of the trough region.
+
+2010-08-27 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Extra Events triggered by <input> on focus
+ https://bugs.webkit.org/show_bug.cgi?id=44731
+
+ Tests: fast/events/input-focus-no-duplicate-events.html
+ fast/events/input-tab-focus-no-duplicate-events.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::focus): do not continue and update the appearance of the element if it was not focused.
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setFocusedNode): respect the return value of Document::setFocusedNode.
+
+2010-08-26 Joseph Pecoraro <joepeck@webkit.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: attribute nodes don't get rendered in the console
+ https://bugs.webkit.org/show_bug.cgi?id=44736
+
+ Extended Test: inspector/console-format.html
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForNode): add "name" and "value" properties for Attribute nodes.
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMNode): add "name" and "value" properties for Attribute nodes.
+ * inspector/front-end/ElementsTreeOutline.js: display html for Attribute nodes.
+
+2010-08-27 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Finshing moving the HTML parser into WebCore/html/parser.
+
+ * Android.derived.mk:
+ * Android.mk:
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * GNUmakefile.am:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/CSSPreloadScanner.cpp: Removed.
+ * html/CSSPreloadScanner.h: Removed.
+ * html/HTMLConstructionSite.cpp: Removed.
+ * html/HTMLConstructionSite.h: Removed.
+ * html/HTMLDocumentParser.cpp: Removed.
+ * html/HTMLDocumentParser.h: Removed.
+ * html/HTMLEntityNames.json: Removed.
+ * html/HTMLEntityParser.cpp: Removed.
+ * html/HTMLEntityParser.h: Removed.
+ * html/HTMLEntitySearch.cpp: Removed.
+ * html/HTMLEntitySearch.h: Removed.
+ * html/HTMLEntityTable.h: Removed.
+ * html/HTMLFormattingElementList.cpp: Removed.
+ * html/HTMLFormattingElementList.h: Removed.
+ * html/HTMLParserScheduler.cpp: Removed.
+ * html/HTMLParserScheduler.h: Removed.
+ * html/HTMLPreloadScanner.cpp: Removed.
+ * html/HTMLPreloadScanner.h: Removed.
+ * html/HTMLScriptRunner.cpp: Removed.
+ * html/HTMLScriptRunner.h: Removed.
+ * html/HTMLScriptRunnerHost.h: Removed.
+ * html/HTMLTokenizer.cpp: Removed.
+ * html/HTMLTokenizer.h: Removed.
+ * html/HTMLViewSourceParser.cpp: Removed.
+ * html/HTMLViewSourceParser.h: Removed.
+ * html/parser/CSSPreloadScanner.cpp: Copied from WebCore/html/CSSPreloadScanner.cpp.
+ * html/parser/CSSPreloadScanner.h: Copied from WebCore/html/CSSPreloadScanner.h.
+ * html/parser/HTMLConstructionSite.cpp: Copied from WebCore/html/HTMLConstructionSite.cpp.
+ * html/parser/HTMLConstructionSite.h: Copied from WebCore/html/HTMLConstructionSite.h.
+ * html/parser/HTMLDocumentParser.cpp: Copied from WebCore/html/HTMLDocumentParser.cpp.
+ * html/parser/HTMLDocumentParser.h: Copied from WebCore/html/HTMLDocumentParser.h.
+ * html/parser/HTMLEntityNames.json: Copied from WebCore/html/HTMLEntityNames.json.
+ * html/parser/HTMLEntityParser.cpp: Copied from WebCore/html/HTMLEntityParser.cpp.
+ * html/parser/HTMLEntityParser.h: Copied from WebCore/html/HTMLEntityParser.h.
+ * html/parser/HTMLEntitySearch.cpp: Copied from WebCore/html/HTMLEntitySearch.cpp.
+ * html/parser/HTMLEntitySearch.h: Copied from WebCore/html/HTMLEntitySearch.h.
+ * html/parser/HTMLEntityTable.h: Copied from WebCore/html/HTMLEntityTable.h.
+ * html/parser/HTMLFormattingElementList.cpp: Copied from WebCore/html/HTMLFormattingElementList.cpp.
+ * html/parser/HTMLFormattingElementList.h: Copied from WebCore/html/HTMLFormattingElementList.h.
+ * html/parser/HTMLParserScheduler.cpp: Copied from WebCore/html/HTMLParserScheduler.cpp.
+ * html/parser/HTMLParserScheduler.h: Copied from WebCore/html/HTMLParserScheduler.h.
+ * html/parser/HTMLPreloadScanner.cpp: Copied from WebCore/html/HTMLPreloadScanner.cpp.
+ * html/parser/HTMLPreloadScanner.h: Copied from WebCore/html/HTMLPreloadScanner.h.
+ * html/parser/HTMLScriptRunner.cpp: Copied from WebCore/html/HTMLScriptRunner.cpp.
+ * html/parser/HTMLScriptRunner.h: Copied from WebCore/html/HTMLScriptRunner.h.
+ * html/parser/HTMLScriptRunnerHost.h: Copied from WebCore/html/HTMLScriptRunnerHost.h.
+ * html/parser/HTMLTokenizer.cpp: Copied from WebCore/html/HTMLTokenizer.cpp.
+ * html/parser/HTMLTokenizer.h: Copied from WebCore/html/HTMLTokenizer.h.
+ * html/parser/HTMLViewSourceParser.cpp: Copied from WebCore/html/HTMLViewSourceParser.cpp.
+ * html/parser/HTMLViewSourceParser.h: Copied from WebCore/html/HTMLViewSourceParser.h.
+
+2010-08-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Tony Chang.
+
+ Insertion point does not show when dragging text into an editable area
+ https://bugs.webkit.org/show_bug.cgi?id=44295
+
+ r65681 caused the caret to use the last-computed caret rect when
+ painting, rather than forcing a style update. Because of this,
+ we now need to eagerly update the caret rect when changing
+ the drag selection.
+
+ Not testable in DRT because the drag selection is always cleared
+ before EventSender returns, so the drag caret can never show in
+ the pixel results.
+
+ Tested by running editing/selection/drag-in-iframe.html manually.
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::setSelection):
+
+2010-08-27 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix the Windows build.
+
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+
+2010-08-27 Adam Barth <abarth@webkit.org>
+
+ Attempt to fix the Qt build.
+
+ * WebCore.pro:
+
+2010-08-27 Adam Barth <abarth@webkit.org>
+
+ Rubber-stamped by Eric Seidel.
+
+ Move HTMLTreeBuilder and HTMLElementStack to WebCore/html/parser.
+
+ * Android.mk:
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/HTMLElementStack.cpp: Removed.
+ * html/HTMLElementStack.h: Removed.
+ * html/HTMLTreeBuilder.cpp: Removed.
+ * html/HTMLTreeBuilder.h: Removed.
+ * html/parser/HTMLElementStack.cpp: Copied from WebCore/html/HTMLElementStack.cpp.
+ * html/parser/HTMLElementStack.h: Copied from WebCore/html/HTMLElementStack.h.
+ * html/parser/HTMLTreeBuilder.cpp: Copied from WebCore/html/HTMLTreeBuilder.cpp.
+ * html/parser/HTMLTreeBuilder.h: Copied from WebCore/html/HTMLTreeBuilder.h.
+
+2010-08-27 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Create WebCore/html/parser
+ https://bugs.webkit.org/show_bug.cgi?id=44792
+
+ This patch begins the process of moving the HTML parser code to the
+ WebCore/html/parser directory. This patch moves a single header file.
+ More files will follow in future patches.
+
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcproj/WebCoreCommon.vsprops:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/parser/HTMLToken.h: Renamed from WebCore/html/HTMLToken.h.
+
+2010-08-27 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42862
+ WebGL in CSS Canvas crashes
+
+ This fixes the crash, which was a simple null pointer deref. But this
+ revealed that -webkit-canvas no longer works for WebGL. I believe this
+ is due to the recent ImageBuffer optimizations done by Dave Hyatt
+ (https://bugs.webkit.org/show_bug.cgi?id=43507). This changed ImageBuffer
+ from always keeping a copy of the pixels to doing a copy to get them
+ when needed. Since We need to get pixels out of the WebGL drawing buffer
+ to use them as a CSS background, I had to change when I return those
+ pixels to the ImageBuffer.
+
+ Tests: fast/canvas/webgl/css-webkit-canvas-repaint.html
+ fast/canvas/webgl/css-webkit-canvas.html
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::copiedImage): Add logic to get image from WebGL so it works with new ImageBuffer logic (see above)
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::create): Fixed null pointer deref
+
+2010-08-27 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Move Shader class from platform/graphics/chromium to platform/graphics/gpu
+ https://bugs.webkit.org/show_bug.cgi?id=44793
+
+ The Shader class and its subclasses are not chromium-specific. This moves
+ them to a common location so they can be re-used on all platforms. Also
+ moves the Shader subclasses into their own .h/.cpp files.
+
+ Refactor, no new tests.
+
+ * WebCore.gypi:
+ * platform/graphics/chromium/GLES2Canvas.cpp:
+ * platform/graphics/chromium/Shader.cpp: Removed.
+ * platform/graphics/chromium/Shader.h: Removed.
+ * platform/graphics/gpu/Shader.cpp: Added.
+ (WebCore::Shader::affineTo3x3):
+ (WebCore::Shader::loadShader):
+ (WebCore::Shader::loadProgram):
+ (WebCore::Shader::Shader):
+ (WebCore::Shader::~Shader):
+ * platform/graphics/gpu/Shader.h: Added.
+ * platform/graphics/gpu/SolidFillShader.cpp: Added.
+ (WebCore::SolidFillShader::SolidFillShader):
+ (WebCore::SolidFillShader::create):
+ (WebCore::SolidFillShader::use):
+ * platform/graphics/gpu/SolidFillShader.h: Added.
+ * platform/graphics/gpu/TexShader.cpp: Added.
+ (WebCore::TexShader::TexShader):
+ (WebCore::TexShader::create):
+ (WebCore::TexShader::use):
+ * platform/graphics/gpu/TexShader.h: Added.
+
+2010-08-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add AsyncFileSystem interface for platform-dependent FileSystem API implementation
+ https://bugs.webkit.org/show_bug.cgi?id=44433
+
+ No new tests; tests will be added later.
+
+ * CMakeLists.txt:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/AsyncFileSystem.cpp: Added.
+ * platform/AsyncFileSystem.h: Added.
+ * platform/AsyncFileSystemCallbacks.h: Added.
+ * storage/DOMFileSystem.cpp:
+ (WebCore::DOMFileSystem::DOMFileSystem):
+ (WebCore::DOMFileSystem::~DOMFileSystem):
+ (WebCore::DOMFileSystem::stop):
+ (WebCore::DOMFileSystem::hasPendingActivity):
+ (WebCore::DOMFileSystem::contextDestroyed):
+ * storage/DOMFileSystem.h:
+ (WebCore::DOMFileSystem::create):
+ * storage/FileSystemCallbacks.cpp:
+ (WebCore::FileSystemCallbacksBase::didFail):
+ (WebCore::FileSystemCallbacks::FileSystemCallbacks):
+ (WebCore::FileSystemCallbacks::didOpenFileSystem):
+ * storage/FileSystemCallbacks.h:
+ * storage/LocalFileSystem.cpp: Added.
+ * storage/LocalFileSystem.h: Added.
+
+ * storage/Flags.h: Nits fix.
+
+2010-07-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+ https://bugs.webkit.org/show_bug.cgi?id=43099
+
+ Mozilla has proposed a new set of JavaScript APIs which allow any element in
+ a document to go full-screen. The current revision of their proposal can be
+ found here:
+ <https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI&oldid=243429>
+
+ The proposed specification includes the following:
+
+ Document:
+ - Three new methods on Document:
+ + void requestFullScreen()
+ + void requestFullScreenWithKeys()
+ + void cancelFullScreen()
+ - Three new attributes of Document:
+ + readonly attribute boolean fullScreen
+ + readonly attribute boolean fullScreenWithKeys
+ + (optional) readonly attribute Element currentFullScreenElement
+
+ Element:
+ - Two new methods on Element:
+ + void requestFullScreen()
+ + void requestFullScreenWithKeys()
+
+ Events:
+ - One new event:
+ + fullScreenChange
+
+ CSS Pseudo-classes:
+ - Three new Pseudo-classes:
+ + :full-screen
+ + :full-screen-doc
+ + :full-screen-root-with-target
+
+ For WebKit's initial implementation, all the above new APIs will be prefixed with
+ "webkit" or "-webkit" where appropriate.
+
+ New tests:
+ LayoutTests/fullscreen/full-screen-api.html
+ LayoutTests/fullscreen/full-screen-css.html
+ LayoutTests/fullscreen/full-screen-request.html
+
+ Project file changes:
+ * Configurations/FeatureDefines.xcconfig: Added an ENABLE_FULLSCREEN_API entry.
+ * DerivedSources.make: Added rules for fullscreen.css and WebCore.FullScreen.exp.
+ * WebCore.FullScreen.exp: Added export symbols for Document and Element functions.
+ * WebCore.xcodeproj/project.pbxproj: New source files added to the project.
+
+ IDL changes:
+ * dom/Document.idl: Added the new full-screen API to the Document's javascript interface.
+ * dom/Element.idl: Added the new full-screen API to the Element's javascript interface.
+
+ Source changes:
+ * bindings/objc/PublicDOMInterfaces.h: Exposed Document and Element fullscreen functions in the DOM classes.
+ * css/CSSSelector.cpp: Added new FullScreen pseudo-classes.
+ * css/CSSSelector.h: Added new full-screen pseudo classes to the PseudoType enum.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::loadFullDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle and the defaultQuirksStyle sheets.
+ (WebCore::loadSimpleDefaultStyle): Pull the fullscreen.css sheet into the defaultStyle sheet.
+ (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Check for the new FullScreen pseudo classes.
+ * dom/Document.cpp:
+ (WebCore::Document::createEvent): Support creating a "WebKitFullScreenChange" event.
+ (WebCore::Document::addListenerTypeIfNeeded): Support listening for a "webKitFullScreenChangeEvent"
+ (WebCore::Document::webkitRequestFullScreenForElement): Passes request to the chrome client to enter full screen mode.
+ (WebCore::Document::webkitCancelFullScreen): Passes request to the chrome client to exit full screen mode.
+ (WebCore::Document::webkitWillEnterFullScreenForElement): Sets the FullScreen pseudo-classes on the full-screen element and its document.
+ (WebCore::Document::webkitDidEnterFullScreenForElement): Currently a no-op.
+ (WebCore::Document::webkitWillExitFullScreenForElement): Currently a no-op.
+ (WebCore::Document::webkitDidExitFullScreenForElement): Clears the FullScreen pseudo-classes on the full-screen element and its document.
+ * dom/Document.h: Added const accessors for new full-screen instance variables.
+ (WebCore::Document::):
+ (WebCore::Document::webkitIsFullScreen): Accessor for m_isFullScreen.
+ (WebCore::Document::webkitIsFullScreenWithKeysEnabled): Accessor for m_isFullScren and m_areKeysEnabled.
+ (WebCore::Document::webkitCurrentFullScreenElement): Accessor for m_fullScreenElement.
+ * dom/Element.cpp:
+ (WebCore::Element::webkitRequestFullScreen): Calls Document::webkitRequestFullScreenForElement.
+ * dom/Element.h:
+ * dom/EventNames.h: Add a webkitfullscreenchange event name.
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::parseMappedAttribute): Parse the new "onwebkitfullscreenchange" attribute and register a listener.
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::supportsFullscreenForElement): Pass through to the current UI delegate.
+ (WebCore::ChromeClient::enterFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate.
+ (WebCore::ChromeClient::exitFullscreenForElement): Create a WebKitFullScreenListener and pass through to the current UI delegate.
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ * page/Settings.h: Add a new setting to control runtime support for full screen mode (defaults to off)
+ * rendering/MediaControlElements.cpp:
+ (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): The full screen button now toggles full screen mode (previously, it only entered).
+ * rendering/style/RenderStyleConstants.h: Added new style constants.
+
+2010-08-27 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Move Texture class from p/g/chromium to p/g/gpu
+ https://bugs.webkit.org/show_bug.cgi?id=44783
+
+ This class and its support were developed in platform/graphics/chromium but are not chromium-specific
+ in any way. This patch moves them to a common location so they can be shared by all platforms.
+
+ Pure refactor, so no new tests.
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * platform/graphics/chromium/GLES2Canvas.cpp:
+ (WebCore::GLES2Canvas::drawTexturedRect):
+ (WebCore::GLES2Canvas::drawTexturedRectTile):
+ (WebCore::GLES2Canvas::createTexture):
+ (WebCore::GLES2Canvas::getTexture):
+ * platform/graphics/chromium/GLES2Canvas.h:
+ * platform/graphics/chromium/GLES2Texture.cpp: Removed.
+ * platform/graphics/chromium/GLES2Texture.h: Removed.
+ * platform/graphics/gpu/Texture.cpp: Added.
+ (WebCore::Texture::Texture):
+ (WebCore::Texture::~Texture):
+ (WebCore::convertFormat):
+ (WebCore::Texture::create):
+ (WebCore::copySubRect):
+ (WebCore::Texture::load):
+ (WebCore::Texture::bindTile):
+ * platform/graphics/gpu/Texture.h: Added.
+ (WebCore::Texture::):
+ (WebCore::Texture::format):
+ (WebCore::Texture::tiles):
+ * platform/graphics/gpu/TilingData.cpp: Renamed from WebCore/platform/graphics/chromium/TilingData.cpp.
+ (WebCore::computeNumTiles):
+ (WebCore::TilingData::TilingData):
+ (WebCore::TilingData::tileXIndexFromSrcCoord):
+ (WebCore::TilingData::tileYIndexFromSrcCoord):
+ (WebCore::TilingData::tileBounds):
+ (WebCore::TilingData::tileBoundsWithBorder):
+ (WebCore::TilingData::tileBoundsNormalized):
+ (WebCore::TilingData::tilePositionX):
+ (WebCore::TilingData::tilePositionY):
+ (WebCore::TilingData::tileSizeX):
+ (WebCore::TilingData::tileSizeY):
+ (WebCore::TilingData::overlappedTileIndices):
+ (WebCore::TilingData::intersectDrawQuad):
+ * platform/graphics/gpu/TilingData.h: Renamed from WebCore/platform/graphics/chromium/TilingData.h.
+ (WebCore::TilingData::maxTextureSize):
+ (WebCore::TilingData::totalSizeX):
+ (WebCore::TilingData::totalSizeY):
+ (WebCore::TilingData::numTiles):
+ (WebCore::TilingData::numTilesX):
+ (WebCore::TilingData::numTilesY):
+ (WebCore::TilingData::tileIndex):
+ (WebCore::TilingData::tileXIndex):
+ (WebCore::TilingData::tileYIndex):
+ (WebCore::TilingData::TilingData):
+ (WebCore::TilingData::assertTile):
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::drawBitmapGLES2):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
+ * platform/graphics/skia/PlatformContextSkia.h:
+
+2010-08-27 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44788, implement HTML5-compliant doctype switching.
+
+ Rename the various modes to match the HTML5 specification:
+ ParseMode -> CompatibilityMode
+ CompatMode -> QuirksMode
+ AlmostStrictMode -> LimitedQuirksMode
+ StrictMode -> NoQuirksMode
+
+ Remove the htmlHacks() accessor from RenderStyle and make rendering code just go to the document
+ instead. This makes switching modes avoid forcing all RenderStyles to detect as changed.
+
+ Clean up user stylesheets to minimize style recalculation when the mode is switched.
+
+ Fix bugs with the propagation of correct modes in the HTML5 parser. Make sure the
+ dummy document created for fragment parsing properly inherits the real document's CompatibilityMode.
+ Make sure the tree builder properly changes the insertion mode to "BeforeHTML" after handling
+ a doctype token.
+
+ determineParseMode -> setCompatibilityModeFromDoctype, and it now implements the HTML5 algorithm
+ precisely.
+
+ * WebCore.exp.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::styleForDocument):
+ (WebCore::CSSStyleSelector::applyProperty):
+ (WebCore::CSSStyleSelector::fontSizeForKeyword):
+ * dom/ClassNodeList.cpp:
+ (WebCore::ClassNodeList::ClassNodeList):
+ * dom/DecodedDataDocumentParser.cpp:
+ (WebCore::DecodedDataDocumentParser::appendBytes):
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::setCompatibilityMode):
+ (WebCore::Document::setDocType):
+ (WebCore::Document::unscheduleStyleRecalc):
+ (WebCore::Document::recalcStyle):
+ (WebCore::Document::updateStyleIfNeeded):
+ (WebCore::Document::createStyleSelector):
+ (WebCore::Document::implicitOpen):
+ (WebCore::Document::pageUserSheet):
+ (WebCore::Document::clearPageUserSheet):
+ (WebCore::Document::updatePageUserSheet):
+ (WebCore::Document::pageGroupUserSheets):
+ (WebCore::Document::clearPageGroupUserSheets):
+ (WebCore::Document::updatePageGroupUserSheets):
+ (WebCore::Document::findAnchor):
+ * dom/Document.h:
+ (WebCore::Document::):
+ (WebCore::Document::setCompatibilityModeFromDoctype):
+ (WebCore::Document::lockCompatibilityMode):
+ (WebCore::Document::compatibilityMode):
+ (WebCore::Document::inQuirksMode):
+ (WebCore::Document::inLimitedQuirksMode):
+ (WebCore::Document::inNoQuirksMode):
+ * dom/Element.cpp:
+ (WebCore::Element::clientWidth):
+ (WebCore::Element::clientHeight):
+ (WebCore::Element::webkitMatchesSelector):
+ * dom/NamedNodeMap.cpp:
+ (WebCore::NamedNodeMap::setClass):
+ * dom/Node.cpp:
+ (WebCore::Node::querySelector):
+ (WebCore::Node::querySelectorAll):
+ * dom/OptionElement.cpp:
+ (WebCore::OptionElement::collectOptionLabelOrText):
+ * dom/SelectorNodeList.cpp:
+ (WebCore::createSelectorNodeList):
+ * dom/StyleElement.cpp:
+ (WebCore::StyleElement::createSheet):
+ * dom/StyledElement.cpp:
+ (WebCore::StyledElement::createInlineStyleDecl):
+ (WebCore::StyledElement::parseMappedAttribute):
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR):
+ * html/HTMLBodyElement.cpp:
+ (WebCore::HTMLBodyElement::createLinkDecl):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+ * html/HTMLConstructionSite.cpp:
+ (WebCore::HTMLConstructionSite::insertDoctype):
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::HTMLDocument):
+ (WebCore::HTMLDocument::compatMode):
+ (WebCore::HTMLDocument::setCompatibilityModeFromDoctype):
+ * html/HTMLDocument.h:
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setCSSStyleSheet):
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
+ (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
+ (WebCore::HTMLTreeBuilder::processDoctypeToken):
+ (WebCore::HTMLTreeBuilder::processStartTagForInBody):
+ (WebCore::HTMLTreeBuilder::defaultForInitial):
+ * html/HTMLViewSourceDocument.cpp:
+ (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
+ * loader/DocumentWriter.cpp:
+ (WebCore::DocumentWriter::replaceDocument):
+ (WebCore::DocumentWriter::reportDataReceived):
+ * loader/DocumentWriter.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageDocument::ImageDocument):
+ * loader/MediaDocument.cpp:
+ (WebCore::MediaDocument::MediaDocument):
+ * loader/PluginDocument.cpp:
+ (WebCore::PluginDocument::PluginDocument):
+ * loader/SinkDocument.cpp:
+ (WebCore::SinkDocument::SinkDocument):
+ * loader/TextDocument.cpp:
+ (WebCore::TextDocument::TextDocument):
+ * page/Page.cpp:
+ (WebCore::Page::userStyleSheetLocationChanged):
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setEnforceCSSMIMETypeInNoQuirksMode):
+ * page/Settings.h:
+ (WebCore::Settings::enforceCSSMIMETypeInNoQuirksMode):
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcPrefWidths):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::paintBoxDecorations):
+ (WebCore::InlineFlowBox::paintMask):
+ (WebCore::InlineFlowBox::paintTextDecorations):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::isSelfCollapsingBlock):
+ (WebCore::RenderBlock::collapseMargins):
+ (WebCore::RenderBlock::handleBottomOfBlock):
+ (WebCore::RenderBlock::calcInlinePrefWidths):
+ (WebCore::RenderBlock::calcBlockPrefWidths):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::createInlineBoxForRenderer):
+ (WebCore::RenderBlock::findNextLineBreak):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcPercentageHeight):
+ (WebCore::RenderBox::calcAbsoluteHorizontal):
+ (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::stretchesToViewHeight):
+ * rendering/RenderListItem.cpp:
+ (WebCore::getParentOfFirstLineBox):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::calcRowHeight):
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::verticallyAlignBoxes):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::diff):
+ * rendering/style/RenderStyle.h:
+ (WebCore::):
+ (WebCore::InheritedFlags::setBitDefaults):
+
+2010-08-27 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
+
+ These methods should be using a version of dtoa that can generate results accurate
+ to the requested precision, whereas our version of dtoa is only currently able to
+ support producing results sufficiently accurate to distinguish the value from any
+ other IEEE-754 double precision number.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::serializeForNumberType):
+ doubleToStringInJavaScriptFormat renamed to numberToString.
+
+2010-08-27 Michael Nordman <michaeln@google.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44133
+ IDL bindings for XmlHttpRequest.responseBlob support, doesn't do anything yet.
+ Adds two new attributes, asBlob and responseBlob.
+ Runtime disabled by default, also behind a new ENABLE_XHR_RESPONSE_BLOB compile time guard.
+
+ No new tests, just adding some stubs.
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setResponseBlobEnabled):
+ (WebCore::RuntimeEnabledFeatures::responseBlobEnabled):
+ (WebCore::RuntimeEnabledFeatures::asBlobEnabled):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::responseText): Changed to allow an exceptional return path.
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): Changed to allow an exceptional return path.
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::responseText): Changed to raise an exception when accessed with asBlob set to true.
+ (WebCore::XMLHttpRequest::responseXML): Changed to raise an exception when accessed with asBlob set to true.
+ (WebCore::XMLHttpRequest::responseBlob): Added stub method, returns 0 for now.
+ (WebCore::XMLHttpRequest::setAsBlob): Sets the asBlob attribute, raises exception if called at an inappropriate time.
+ (WebCore::XMLHttpRequest::open): Resets asBlob to false, the default value.
+ (WebCore::XMLHttpRequest::abort): Clears m_responseBlob.
+ (WebCore::XMLHttpRequest::clearResponse): Clears m_responseBlob.
+ (WebCore::XMLHttpRequest::didFinishLoading): Added a FIXME to populate m_responseBlob.
+ * xml/XMLHttpRequest.h:
+ (WebCore::XMLHttpRequest::asBlob):
+ * xml/XMLHttpRequest.idl:
+
+2010-08-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Tony Chang.
+
+ Crash in CSSStyleSelector.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=44780
+
+ Need to null-check the images when replacing pending images, because a later
+ rule may have replaced an image with 'none'.
+
+ Test: fast/css/pending-images-crash.html
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::loadPendingImages):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::paintContents): Fix unrelated log message.
+
+2010-08-27 Andrey Kosyakov <caseq@chromium.org>
+
+ Unreviewed. Revert r66218 & r66220 due to GTK test failures.
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/AuditLauncherView.js:
+ (WebInspector.AuditLauncherView.categorySortFunction):
+ (WebInspector.AuditLauncherView):
+ (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
+ (WebInspector.AuditLauncherView.prototype._selectAllClicked):
+ (WebInspector.AuditLauncherView.prototype._categoryClicked):
+ (WebInspector.AuditLauncherView.prototype._createCategoryElement):
+ (WebInspector.AuditLauncherView.prototype._createLauncherUI):
+ * inspector/front-end/AuditResultView.js:
+ (WebInspector.AuditCategoryResultPane.prototype._appendResult):
+ * inspector/front-end/AuditsPanel.js:
+ (WebInspector.AuditsPanel):
+ (WebInspector.AuditsPanel.prototype._executeAudit):
+ (WebInspector.AuditCategory.prototype.runRules):
+ * inspector/front-end/ExtensionAPI.js:
+ (injectedExtensionAPI):
+ (injectedExtensionAPI.EventSinkImpl.prototype.addListener):
+ (injectedExtensionAPI.EventSinkImpl.prototype._fire):
+ (injectedExtensionAPI.EventSink):
+ (injectedExtensionAPI.InspectorExtensionAPI):
+ (injectedExtensionAPI.Panels.prototype.create):
+ * inspector/front-end/ExtensionServer.js:
+ (WebInspector.ExtensionServer):
+ (WebInspector.ExtensionServer.prototype._postNotification):
+ (WebInspector.ExtensionServer.prototype._addExtensions):
+ (WebInspector.ExtensionStatus):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/utilities.js:
+ ():
+
+2010-08-27 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Crash in HistoryController::recursiveGoToItem when navigating in a frame
+ while another frame has a custom window name
+ https://bugs.webkit.org/show_bug.cgi?id=44183
+
+ Fix up HistoryController::recursiveGoToItem to better check whether the
+ current document frames, the curent history item frames, and the
+ destination history frames match up.
+
+ Test: fast/history/history-subframe-with-name.html
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::childItemWithDocumentSequenceNumber): Add linear
+ lookup of child by document sequence number
+ (WebCore::HistoryItem::hasSameDocuments): Remove assumption that the
+ other item has the children in the same order (it doesn't seem to be
+ true)
+ (WebCore::HistoryItem::hasSameFrames): Add recursive comparison of child
+ frames.
+ * history/HistoryItem.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadItem): Compare full set of documents in
+ history items, not just the topmost ones. Otherwise when going between
+ framesets where only one of the subframes changed we wouldn't trigger a
+ load.
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::recursiveGoToItem): Also check that the
+ two history items have the same frames
+ (WebCore::HistoryController::currentFramesMatchItem): Refactor
+ childFramesMatchItem to also check the top-most frame, to make
+ recursiveGoToItem easier to read.
+ * loader/HistoryController.h:
+
+2010-08-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ [WINCE] Buildfix for graphics code after r65449
+ https://bugs.webkit.org/show_bug.cgi?id=44510
+
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ * platform/graphics/wince/ImageBufferWince.cpp:
+ (WebCore::ImageBuffer::drawsUsingCopy):
+ (WebCore::ImageBuffer::copyImage):
+ (WebCore::ImageBuffer::clip):
+ (WebCore::ImageBuffer::draw):
+ (WebCore::ImageBuffer::drawPattern):
+
+2010-08-27 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Search the Windows registry for the location of the Java plugin DLL.
+ https://bugs.webkit.org/show_bug.cgi?id=38911
+
+ This change, in addition to the ones 34539 and 38911, is needed to
+ make Java applet work in QtWebKit on the Windows platform.
+
+ * plugins/win/PluginDatabaseWin.cpp:
+ (WebCore::addJavaPluginDirectory):
+ (WebCore::PluginDatabase::defaultPluginDirectories):
+
+2010-08-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: color-code property values in object notation.
+ https://bugs.webkit.org/show_bug.cgi?id=44766
+
+ * inspector/front-end/ObjectPropertiesSection.js:
+ (WebInspector.ObjectPropertyTreeElement.prototype.update):
+
+2010-08-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ [WINCE] Buildfix for FontPlatformData after r65021
+ https://bugs.webkit.org/show_bug.cgi?id=44467
+
+ * platform/graphics/wince/FontPlatformData.h:
+
+2010-08-27 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ RenderImage::imageChanged invalidates wrong area
+ https://bugs.webkit.org/show_bug.cgi?id=43779
+
+ At the moment RenderSVGImage inherits from RenderImage, which makes non-SVG compatible
+ assumptions about repainting, and thus has to be fixed to inherit from RenderSVGModelObject.
+
+ This patch moves the CachedImage from RenderImage into a separate class.
+ The new class contains the common behavior of RenderImage and RenderSVGImage.
+ An additional patch will remove the inheritance of RenderImage at RenderSVGImage.
+
+ * Android.mk:
+ * CMakeLists.txt:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::createRenderer):
+ (WebCore::HTMLEmbedElement::attach):
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::createRenderer):
+ (WebCore::HTMLImageElement::attach):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::createRenderer):
+ (WebCore::HTMLInputElement::attach):
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::createRenderer):
+ * html/HTMLVideoElement.cpp:
+ (WebCore::HTMLVideoElement::attach):
+ (WebCore::HTMLVideoElement::parseMappedAttribute):
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageLoader::setImage):
+ (WebCore::ImageLoader::updateFromElement):
+ (WebCore::ImageLoader::renderImageResource):
+ (WebCore::ImageLoader::updateRenderer):
+ * loader/ImageLoader.h:
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::RenderImage):
+ (WebCore::RenderImage::~RenderImage):
+ (WebCore::RenderImage::setImageResource):
+ (WebCore::RenderImage::imageChanged):
+ (WebCore::RenderImage::notifyFinished):
+ (WebCore::RenderImage::paintReplaced):
+ (WebCore::RenderImage::paintIntoRect):
+ (WebCore::RenderImage::minimumReplacedHeight):
+ (WebCore::RenderImage::calcReplacedWidth):
+ (WebCore::RenderImage::calcReplacedHeight):
+ (WebCore::RenderImage::calcAspectRatioWidth):
+ (WebCore::RenderImage::calcAspectRatioHeight):
+ * rendering/RenderImage.h:
+ (WebCore::RenderImage::imageResource):
+ (WebCore::RenderImage::cachedImage):
+ (WebCore::RenderImage::intrinsicSizeChanged):
+ (WebCore::toRenderImage):
+ * rendering/RenderImageGeneratedContent.cpp: Removed.
+ * rendering/RenderImageGeneratedContent.h: Removed.
+ * rendering/RenderImageResource.cpp: Added.
+ (WebCore::RenderImageResource::RenderImageResource):
+ (WebCore::RenderImageResource::~RenderImageResource):
+ (WebCore::RenderImageResource::initialize):
+ (WebCore::RenderImageResource::shutdown):
+ (WebCore::RenderImageResource::setCachedImage):
+ (WebCore::RenderImageResource::resetAnimation):
+ (WebCore::RenderImageResource::setImageContainerSize):
+ (WebCore::RenderImageResource::nullImage):
+ * rendering/RenderImageResource.h: Added.
+ (WebCore::RenderImageResource::create):
+ (WebCore::RenderImageResource::cachedImage):
+ (WebCore::RenderImageResource::hasImage):
+ (WebCore::RenderImageResource::image):
+ (WebCore::RenderImageResource::errorOccurred):
+ (WebCore::RenderImageResource::usesImageContainerSize):
+ (WebCore::RenderImageResource::imageHasRelativeWidth):
+ (WebCore::RenderImageResource::imageHasRelativeHeight):
+ (WebCore::RenderImageResource::imageSize):
+ (WebCore::RenderImageResource::imagePtr):
+ * rendering/RenderImageResourceStyleImage.cpp: Added.
+ (WebCore::RenderImageResourceStyleImage::RenderImageResourceStyleImage):
+ (WebCore::RenderImageResourceStyleImage::~RenderImageResourceStyleImage):
+ (WebCore::RenderImageResourceStyleImage::initialize):
+ (WebCore::RenderImageResourceStyleImage::shutdown):
+ * rendering/RenderImageResourceStyleImage.h: Added.
+ (WebCore::RenderImageResourceStyleImage::create):
+ (WebCore::RenderImageResourceStyleImage::image):
+ (WebCore::RenderImageResourceStyleImage::errorOccurred):
+ (WebCore::RenderImageResourceStyleImage::setImageContainerSize):
+ (WebCore::RenderImageResourceStyleImage::usesImageContainerSize):
+ (WebCore::RenderImageResourceStyleImage::imageHasRelativeWidth):
+ (WebCore::RenderImageResourceStyleImage::imageHasRelativeHeight):
+ (WebCore::RenderImageResourceStyleImage::imageSize):
+ (WebCore::RenderImageResourceStyleImage::imagePtr):
+ * rendering/RenderMedia.cpp:
+ (WebCore::RenderMedia::RenderMedia):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::createObject):
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent):
+ * rendering/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::RenderSVGImage):
+ (WebCore::RenderSVGImage::layout):
+ (WebCore::RenderSVGImage::paint):
+ * rendering/RenderVideo.cpp:
+ (WebCore::RenderVideo::calculateIntrinsicSize):
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::attach):
+ * wml/WMLImageElement.cpp:
+ (WebCore::WMLImageElement::createRenderer):
+
+2010-08-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Elements panel breaks after calling "Edit as HTML" on <body>
+ https://bugs.webkit.org/show_bug.cgi?id=44765
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setOuterHTML):
+
+2010-08-25 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Add setVersion to IndexedDB
+ https://bugs.webkit.org/show_bug.cgi?id=44630
+
+ * storage/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::setVersion):
+ * storage/IDBDatabase.h:
+ * storage/IDBDatabase.idl:
+ * storage/IDBDatabaseBackendImpl.cpp:
+ (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
+ (WebCore::IDBDatabaseBackendImpl::setVersion):
+ * storage/IDBDatabaseBackendImpl.h:
+ * storage/IDBDatabaseBackendInterface.h:
+
+2010-08-26 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: use context menu items with checkbox for setting and removing DOM breakpoints
+ https://bugs.webkit.org/show_bug.cgi?id=44687
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/BreakpointsSidebarPane.js:
+ (WebInspector.DOMBreakpointItem):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMBreakpointManager.prototype.findBreakpoint):
+ (WebInspector.DOMBreakpoint.labelForType):
+ (WebInspector.DOMBreakpoint.contextMenuLabelForType):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
+ * inspector/front-end/inspector.js:
+ (WebInspector.pausedScript):
+
+2010-08-27 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Calls to IndexedDB methods from V8Proxy::didLeaveScriptContext() are missing enable guards
+ https://bugs.webkit.org/show_bug.cgi?id=44760
+
+ No new tests, build fix only.
+
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::didLeaveScriptContext):
+
+2010-08-27 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ getPointAtLength returns incorrect values for paths closed with the closepath command
+ https://bugs.webkit.org/show_bug.cgi?id=44197
+
+ The closepath segment was traversed by the wrong direction. Swap starting point and
+ end point for closeSubpath.
+
+ Test: svg/dom/path-pointAtLength.html
+
+ * platform/graphics/PathTraversalState.cpp:
+ (WebCore::PathTraversalState::closeSubpath):
+
+2010-08-27 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ SVG Filter with wrong results on repaint for non-CG platforms
+ https://bugs.webkit.org/show_bug.cgi?id=44706
+
+ The result of SVG Filter is transformed to linearRGB on every repaint.
+ Transform the result just once, right after creating it.
+
+ Test: svg/repaint/filter-repaint.svg
+
+ * rendering/RenderSVGResourceFilter.cpp:
+ (WebCore::RenderSVGResourceFilter::postApplyResource):
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::close):
+ * inspector/InspectorFrontendClient.h:
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::disconnectFromBackend): don't try to notify InspectorController
+ that frontend closes if InspectorController triggered the action.
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ (.WebInspector.InspectorFrontendHostStub.prototype.disconnectFromBackend):
+ * inspector/front-end/inspector.js:
+ (WebInspector.disconnectFromBackend):
+
+2010-08-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66188.
+ http://trac.webkit.org/changeset/66188
+ https://bugs.webkit.org/show_bug.cgi?id=44756
+
+ "Graphic libraries handle segement length differently. Fixing
+ one platform might break another one. Rolling out this patch
+ and think about another solution to get getPointAtLength"
+ (Requested by krit on #webkit).
+
+ * platform/graphics/PathTraversalState.cpp:
+ (WebCore::PathTraversalState::closeSubpath):
+
+2010-08-27 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ r66141 caused fast/forms/select-style.html to fail on mac:
+ https://bugs.webkit.org/show_bug.cgi?id=44737
+
+ Handle the fact that a CSSImageValue may have a value of CSSValueNone,
+ in which case we should not return a pending image.
+
+ * css/CSSImageValue.cpp:
+ (WebCore::CSSImageValue::cachedOrPendingImage):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::cachedOrPendingFromValue):
+
+2010-08-27 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Dan Bernstein.
+
+ drawGDIGlyphs checks if the offset is empty incorrectly causing
+ problems with the shadow
+ https://bugs.webkit.org/show_bug.cgi?id=44619
+
+ Removed the offset empty condition, now we just check if we have
+ offset or blur.
+
+ * platform/graphics/win/FontCGWin.cpp:
+ (WebCore::drawGDIGlyphs):
+
+2010-08-27 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ getPointAtLength returns incorrect values for paths closed with the closepath command
+ https://bugs.webkit.org/show_bug.cgi?id=44197
+
+ The closepath segment was traversed by the wrong direction. Swap starting point and
+ end point for closeSubpath.
+
+ Test: svg/dom/path-pointAtLength.html
+
+ * platform/graphics/PathTraversalState.cpp:
+ (WebCore::PathTraversalState::closeSubpath):
+
+2010-08-27 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ SVGLocatable.getScreenCTM ignores scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=44083
+
+ getScreenCTM needs to include the FrameViews scrollOffset in the e/f parameters of the AffineTransform.
+ Adding three new tests, which cover scrolling & getScreenCTM in large svgs with scrollbars, and with (nested) divs in overflow="scroll" mode.
+
+ Tests: svg/custom/getscreenctm-in-scrollable-div-area-nested.xhtml
+ svg/custom/getscreenctm-in-scrollable-div-area.xhtml
+ svg/custom/getscreenctm-in-scrollable-svg-area.xhtml
+
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
+
+2010-08-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ implicitlyStyledElementShouldBeRemovedWhenApplyingStyle, removeHTMLFontStyle, and removeHTMLBidiEmbeddingStyle should be merged
+ https://bugs.webkit.org/show_bug.cgi?id=44622
+
+ Merged shouldRemoveTextDecorationTag, implicitlyStyledElementShouldBeRemovedWhenApplyingStyle, removeHTMLFontStyle,
+ and removeHTMLBidiEmbeddingStyle into removeImplicitlyStyledElement. New function uses CSSPropertyElementMapping to
+ support all different cases dealt separately in each function.
+
+ No new tests are added since this is a cleanup.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Calls removeImplicitlyStyledElement.
+ (WebCore::):
+ (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Added.
+ * editing/ApplyStyleCommand.h:
+
+2010-08-26 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Based on a patch by Mihnea Ovidenie <mihnea@adobe.com>.
+
+ Percentage top value on position:relative descendant not resolved
+ correctly if containing block height is not specified explicitly.
+ https://bugs.webkit.org/show_bug.cgi?id=26396
+
+ If the containing block height is auto and the element is positioned
+ relatively, and if the element's top/bottom is percent, then resolve the
+ top/bottom as auto.
+
+ Test: fast/css/percent-top-relative-container-height-unspecified.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::relativePositionOffsetY):
+
+2010-08-26 James Robinson <jamesr@chromium.org>
+
+ Another chromium mac build fix. What a dumb version of GCC.
+
+ * platform/graphics/chromium/GLES2Texture.cpp:
+ (WebCore::GLES2Texture::create):
+
+2010-08-26 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, build fix for Chromium-mac.
+
+ * platform/graphics/chromium/Shader.cpp:
+ (WebCore::loadShader):
+
+2010-08-26 James Robinson <jamesr@chromium.org>
+
+ Fix chromium mac build. Unreviewed.
+
+ * platform/graphics/chromium/GLES2Canvas.cpp:
+ (WebCore::GLES2Canvas::GLES2Canvas):
+ * platform/graphics/chromium/GLES2Texture.cpp:
+ (WebCore::GLES2Texture::load):
+
+2010-08-26 Mark Rowe <mrowe@apple.com>
+
+ Darin pointed out that the braces are unnecessary in an Objective-C interface
+ declaration when there are no data members.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Begone, evil braces!
+
+2010-08-26 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber Stamped by Oliver Hunt.
+
+ Partially revert r65959. The toString changes regressed the v8 tests,
+ but keep the toFixed/toExponential/toPrecision changes.
+
+ * html/HTMLTreeBuilder.cpp:
+ (WebCore::serializeForNumberType):
+
+2010-08-26 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix two build issues that are revealed when building with clang.
+
+ * platform/mac/PopupMenuMac.h: Forward-declare as an Objective-C class when compiling for Objective-C.
+ * platform/network/BlobResourceHandle.h: Forward-declare as a struct to match the real declaration.
+
+2010-08-26 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/8339008> WebCore's MediaPlayerPrivateQTKit.mm fails to build with clang.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::mainThreadSetNeedsDisplay): Remove some ambiguity in the return type of -delegate.
+ Since the message was being sent to a receiver of type id the compiler cannot accurately
+ determine the return type. Typically this would be resolved by using a more specific type
+ for the receiver. However, due to lazy loading shenanigans that we play with QTKit we're
+ unable to directly cast to the relevant type (QTMovieView*). Instead we fake up an interface
+ with the correct type of the method we care about (-delegate) and cast to that type instead.
+
+2010-08-26 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ If an <embed> is part of an <object> element's fallback content, WebKit
+ should only render the <embed> if the <object> fails to load.
+ https://bugs.webkit.org/show_bug.cgi?id=44567
+ <rdar://problem/7699852>
+
+ Tests: fast/replaced/invalid-object-with-fallback.html
+ fast/replaced/object-with-embed-url-param.html
+
+ * html/HTMLEmbedElement.cpp:
+ (WebCore::HTMLEmbedElement::rendererIsNeeded): An <embed> now needs a
+ renderer if its parent is an <object> but the <object> is using fallback
+ content.
+ * html/HTMLObjectElement.h:
+ (WebCore::HTMLObjectElement::useFallbackContent): Add a public getter
+ for m_useFallbackContent for use in HTMLEmbedElement::rendererIsNeeded.
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::updateWidget): Change the logic that
+ determines the plug-in parameters to pass to the loader. Do not override
+ parameters from <object> with those from a child <embed>.
+
+2010-08-26 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+ https://bugs.webkit.org/show_bug.cgi?id=43761
+
+ USE(GLES2_RENDERING) will not be useful since we'll be coding to GraphicsContext3D
+ instead of OpenGL and can use ENABLE(ACCELERATED_2D_CANVAS) for canvas 2d specific
+ changes. This deletes the macro and deletes the ChromeClient API to query
+ GLES2Contexts since we'll never need one of these outside of the compositor, which
+ is created in platform-specific code.
+
+ * loader/EmptyClients.h:
+ * page/ChromeClient.h:
+ * platform/graphics/chromium/GLES2Canvas.cpp:
+ * platform/graphics/chromium/GLES2Canvas.h:
+ * platform/graphics/chromium/GLES2Texture.cpp:
+ * platform/graphics/chromium/GLES2Texture.h:
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::savePlatformState):
+ (WebCore::GraphicsContext::restorePlatformState):
+ (WebCore::GraphicsContext::clearRect):
+ (WebCore::GraphicsContext::concatCTM):
+ (WebCore::GraphicsContext::fillRect):
+ (WebCore::GraphicsContext::scale):
+ (WebCore::GraphicsContext::setAlpha):
+ (WebCore::GraphicsContext::setCompositeOperation):
+ (WebCore::GraphicsContext::setPlatformFillColor):
+ (WebCore::GraphicsContext::rotate):
+ (WebCore::GraphicsContext::translate):
+ (WebCore::GraphicsContext::setGraphicsContext3D):
+ (WebCore::GraphicsContext::syncSoftwareCanvas):
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::drawBitmapGLES2):
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImageSingleFrameSkia::draw):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (WebCore::PlatformContextSkia::PlatformContextSkia):
+ (WebCore::PlatformContextSkia::~PlatformContextSkia):
+ * platform/graphics/skia/PlatformContextSkia.h:
+
+2010-08-26 Martin Robinson <mrobinson@igalia.com>
+
+ Build fix for GTK+, after a bad merge.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::paintMozillaGtkWidget):
+
+2010-08-23 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] ScrollbarThemeGtk is incomplete
+ https://bugs.webkit.org/show_bug.cgi?id=44471
+
+ Add theme drawing code for GTK+ scrollbars. Turn RenderThemeGtk::paintMozillaWidget
+ into a public method so that ScrollbarThemeGtk can access Mozilla theme API properly.
+
+ Tests for this issue will be activated in the form of pixel tests, but
+ only after fully-fake scrollbars are activated.
+
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::paintMozillaGtkWidget): Added this public method which takes
+ the proper widget state, widget type, graphics context and rectangle and renders a
+ widget using the Mozilla theming API.
+ (WebCore::RenderThemeGtk::paintRenderObject): Added this method which first calculates
+ the widget state before passing the information on to paintMozillaGtkWidget.
+ (WebCore::RenderThemeGtk::paintCheckbox): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintRadio): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintButton): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintMenuList): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintTextField): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintSliderTrack): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintSliderThumb): Switch to use paintRenderObject.
+ (WebCore::RenderThemeGtk::paintProgressBar): Switch to use paintRenderObject.
+ * platform/gtk/RenderThemeGtk.h: Added new method declarations.
+ * platform/gtk/ScrollbarThemeGtk.cpp: Added code which can render GTK+ scrollbars.
+ (WebCore::ScrollbarThemeGtk::hasThumb): Added.
+ (WebCore::ScrollbarThemeGtk::backButtonRect): Added.
+ (WebCore::ScrollbarThemeGtk::forwardButtonRect): Added.
+ (WebCore::ScrollbarThemeGtk::trackRect): Added.
+ (WebCore::ScrollbarThemeGtk::paintTrackBackground): Added.
+ (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Added.
+ (WebCore::ScrollbarThemeGtk::paintThumb): Added.
+ (WebCore::ScrollbarThemeGtk::thumbRect): Added.
+ (WebCore::ScrollbarThemeGtk::paint): Added.
+ (WebCore::ScrollbarThemeGtk::paintButton): Added.
+ (WebCore::ScrollbarThemeGtk::paintScrollCorner): Added.
+ (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb): Added.
+ (WebCore::ScrollbarThemeGtk::scrollbarThickness): Always get the metrics from the
+ theme drawing API so that it stays up to date with theme changes.
+ (WebCore::ScrollbarThemeGtk::buttonSize): Added.
+ (WebCore::ScrollbarThemeGtk::minimumThumbLength): Added.
+ * platform/gtk/ScrollbarThemeGtk.h:
+ (WebCore::ScrollbarThemeGtk::hasButtons): Added.
+ (WebCore::ScrollbarThemeGtk::initialAutoscrollTimerDelay): Added.
+ (WebCore::ScrollbarThemeGtk::autoscrollTimerDelay): Added.
+
+2010-08-26 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44726
+ <rdar://problem/7935518> WebFrameProxies aren't destroyed until a page is destroyed
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::closeAndRemoveChild):
+ (WebCore::FrameLoader::detachFromParent):
+ Added a few FIXME comments. The logic we have to track frames is extremely convoluted.
+
+2010-08-26 Ryosuke Niwa <rniwa@webkit.org>
+
+ Unreviewed; build fix.
+
+ Speculative chromium mac fix by including "Color.h".
+
+ * platform/graphics/chromium/Shader.cpp:
+
+2010-08-26 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ CSS downloads all background images related to element, instead of just final rule
+ https://bugs.webkit.org/show_bug.cgi?id=24223
+
+ We used to kick off image loads at the point where the style selector
+ applies a CSS rule to an element, even if that rule was overridden
+ by a rule in a later block of rules. This caused loads of images that
+ weren't actually used.
+
+ Fix this by delaying image loads until the style has been fully
+ resolved. This is achieved by inserting a StylePendingImage into
+ the RenderStyle for duration of the style resolution, and keeping
+ an entry in a hash for the relevant CSS property.
+
+ At the end of style resolution, we iterate through the hash, and
+ replace the StylePendingImage with StyleCachedImages, which
+ causes the loads to happen only for images that are in the final style.
+
+ Tests: http/tests/css/border-image-loading.html
+ http/tests/css/mask-image-loading.html
+ http/tests/css/reflection-mask-image-loading.html
+
+ * GNUmakefile.am: Add StylePendingImage.h
+ * WebCore.gypi: Ditto
+ * WebCore.vcproj/WebCore.vcproj: Ditto
+
+ * css/CSSImageValue.h: Change m_image to a RefPtr<StyleImage>,
+ since it may be a StylePendingImage or StyleCachedImage.
+ * css/CSSImageValue.cpp:
+ (WebCore::CSSImageValue::~CSSImageValue): Only call removeClient if it's a cachedImage.
+ (WebCore::CSSImageValue::cachedOrPendingImage): If we have an image (pending or cached),
+ return it. Otherwise make a pending image and return it.
+ (WebCore::CSSImageValue::cachedImage): Only return the image if it's a cached image.
+ (WebCore::CSSImageValue::cachedImageURL):
+ (WebCore::CSSImageValue::clearCachedImage):
+
+ * css/CSSStyleSelector.h:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::initForStyleResolve): Clear m_pendingImageProperties.
+ (WebCore::CSSStyleSelector::styleForElement): Load pending images.
+ (WebCore::CSSStyleSelector::styleForKeyframe): Ditto.
+ (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto.
+ (WebCore::CSSStyleSelector::styleForPage): Ditto.
+ (WebCore::CSSStyleSelector::applyProperty): Pull property into a local variable
+ so we can use it in macros.
+ (WebCore::CSSStyleSelector::mapFillAttachment): Pass the property down (needed to avoid
+ additional macro complexity).
+ (WebCore::CSSStyleSelector::mapFillClip): Ditto
+ (WebCore::CSSStyleSelector::mapFillComposite): Ditto
+ (WebCore::CSSStyleSelector::mapFillOrigin): Ditto
+ (WebCore::CSSStyleSelector::styleImage): Call cachedOrPendingFromValue()
+ (WebCore::CSSStyleSelector::cachedOrPendingFromValue): Get the cachedOrPendingImage()
+ from the CSSValue, and if it's a pending image, record the property.
+ (WebCore::CSSStyleSelector::mapFillImage): Pass the property down (needed to avoid
+ additional macro complexity).
+ (WebCore::CSSStyleSelector::mapFillRepeatX): Ditto
+ (WebCore::CSSStyleSelector::mapFillRepeatY): Ditto
+ (WebCore::CSSStyleSelector::mapFillSize): Ditto
+ (WebCore::CSSStyleSelector::mapFillXPosition): Ditto
+ (WebCore::CSSStyleSelector::mapFillYPosition): Ditto
+ (WebCore::CSSStyleSelector::mapNinePieceImage): Ditto
+ (WebCore::CSSStyleSelector::loadPendingImages): Iterate through the m_pendingImageProperties
+ hash, and replace the pending images with cached images.
+
+ * rendering/style/StyleCachedImage.h: Make cssValue() const.
+ * rendering/style/StyleCachedImage.cpp:
+ (WebCore::StyleCachedImage::cssValue):
+
+ * rendering/style/StyleGeneratedImage.h: Make cssValue() const.
+ * rendering/style/StyleGeneratedImage.cpp:
+ (WebCore::StyleGeneratedImage::cssValue):
+
+ * rendering/style/StyleImage.h:
+ (WebCore::StyleImage::operator==): Make const.
+ (WebCore::StyleImage::isPendingImage):
+ * rendering/style/StylePendingImage.h: Added.
+
+2010-08-26 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add PassOwnArrayPtr
+ https://bugs.webkit.org/show_bug.cgi?id=44627
+
+ Add new forwarding headers.
+
+ * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Added.
+ * ForwardingHeaders/wtf/PassOwnArrayPtr.h: Added.
+
+2010-08-26 Stanislav Brabec <sbrabec@suse.cz>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] [PATCH] plugin loading invalid symlink evaluation deadlock
+ https://bugs.webkit.org/show_bug.cgi?id=44683
+
+ Fix symlink resolution in PluginPackageGtk.
+
+ * plugins/gtk/PluginPackageGtk.cpp:
+ (WebCore::PluginPackage::load): g_file_resolve_relative_path must be called with a
+ a directory, not a file.
+
+2010-08-26 Andy Estes <aestes@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ A URL in a <param> should be parsed the same as if it were specified as
+ the data attribute of an <object>.
+ https://bugs.webkit.org/show_bug.cgi?id=44671
+
+ Test: fast/replaced/object-param-url-control-char.html
+
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::updateWidget): Call deprecatedParseURL()
+ on <param> values of names that we treat as URLs ("src", "movie", "code"
+ and "url").
+
+2010-08-26 Stephen White <senorblanco@chromium.org>
+
+ Unreviewed; build fix.
+
+ Fix for Chromium/Mac.
+
+ * platform/graphics/chromium/Shader.cpp:
+
+2010-08-26 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ crash when rendering scrollbar gradient
+ https://bugs.webkit.org/show_bug.cgi?id=44549
+
+ Test: scrollbars/scrollbar-gradient-crash.html
+
+ * css/CSSImageGeneratorValue.cpp:
+ (WebCore::CSSImageGeneratorValue::getImage): Keep this alive.
+
+2010-08-26 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [CHROMIUM] Give <canvas> 2D shaders their own class hierarchy.
+ https://bugs.webkit.org/show_bug.cgi?id=44682
+
+ Covered by fast/canvas layout tests.
+
+ * WebCore.gypi:
+ Add Shader.cpp, Shader.h to chromium build.
+ * platform/graphics/chromium/GLES2Canvas.cpp:
+ (WebCore::GLES2Canvas::GLES2Canvas):
+ (WebCore::GLES2Canvas::~GLES2Canvas):
+ (WebCore::GLES2Canvas::fillRect):
+ (WebCore::GLES2Canvas::drawTexturedRect):
+ (WebCore::GLES2Canvas::drawTexturedRectTile):
+ Rip out all shader initialization and compilation code.
+ Instantiate specialized shaders instead.
+ * platform/graphics/chromium/GLES2Canvas.h:
+ * platform/graphics/chromium/Shader.cpp: Added.
+ (WebCore::affineTo3x3):
+ (WebCore::Shader::Shader):
+ (WebCore::Shader::~Shader):
+ Implement Shader base class.
+ (WebCore::loadShader):
+ (WebCore::loadProgram):
+ Utility functions refactored from GLES2Canvas.
+ (WebCore::SolidFillShader::SolidFillShader):
+ (WebCore::TexShader::TexShader):
+ (WebCore::SolidFillShader::create):
+ (WebCore::SolidFillShader::use):
+ (WebCore::TexShader::create):
+ (WebCore::TexShader::use):
+ * platform/graphics/chromium/Shader.h: Added.
+
+2010-08-26 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ User scripts injected at start are not run for plugin and media documents
+ <https://bugs.webkit.org/show_bug.cgi?id=44711>
+ <rdar://problem/8359288>
+
+ http://trac.webkit.org/changeset/61271 made scripts injected at start run on ImageDocuments,
+ but didn't implement this behavior for MediaDocuments and PluginDocuments.
+
+ * loader/MediaDocument.cpp:
+ (WebCore::MediaDocumentParser::createDocumentStructure): Make sure we fire dispatchDocumentElementAvailable.
+ * loader/PluginDocument.cpp:
+ (WebCore::PluginDocumentParser::createDocumentStructure): Ditto.
+
+2010-08-26 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Misc. cleanup split off from bug 32356.
+ https://bugs.webkit.org/show_bug.cgi?id=44696
+
+ * WebCore.gyp/WebCore.gyp:
+ * dom/Element.cpp:
+ (WebCore::localZoomForRenderer):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::wheelEvent):
+ * platform/ScrollView.h:
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::scroll):
+ * platform/Scrollbar.h:
+ (WebCore::Scrollbar::isScrollbar):
+ * platform/ScrollbarClient.h:
+ (WebCore::ScrollbarClient::~ScrollbarClient):
+ * platform/qt/ScrollbarQt.cpp:
+ (WebCore::Scrollbar::contextMenu):
+ * rendering/RenderBox.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scroll):
+ * rendering/RenderLayer.h:
+ * rendering/RenderListBox.h:
+ * rendering/RenderTextControlSingleLine.h:
+
+2010-08-26 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39647, font face loads do a synchronous recalcStyle(Force)
+ on the whole document. Change these calls to do async recalcStyles instead.
+
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::fontLoaded):
+ (WebCore::CSSFontSelector::fontCacheInvalidated):
+ * dom/Document.cpp:
+ (WebCore::Document::scheduleForcedStyleRecalc):
+ (WebCore::Document::styleSelectorChanged):
+ * dom/Document.h:
+
+2010-08-26 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ Fix double free (we were passing const memory to a GOwnPtr) by
+ getting rid of unneeded temp variable.
+
+ * platform/gtk/FileSystemGtk.cpp:
+ (WebCore::directoryName):
+
+2010-08-26 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Store heap snapshots in InspectorProfilerAgent.
+
+ Change the way heap snapshots are transported to Inspector
+ to be aligned with CPU profiles. As a result, the Heap snapshots
+ view of Profiles panel was upstreamed into WebCore.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44531
+
+ * English.lproj/localizedStrings.js:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/ScriptHeapSnapshot.h: Added.
+ (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot):
+ (WebCore::ScriptHeapSnapshot::title):
+ (WebCore::ScriptHeapSnapshot::uid):
+ (WebCore::ScriptHeapSnapshot::buildInspectorObjectForHead):
+ (WebCore::ScriptHeapSnapshot::ScriptHeapSnapshot):
+ * bindings/js/ScriptProfiler.h:
+ (WebCore::ScriptProfiler::takeHeapSnapshot):
+ * bindings/v8/ScriptHeapSnapshot.cpp: Added.
+ (WebCore::ScriptHeapSnapshot::title):
+ (WebCore::ScriptHeapSnapshot::uid):
+ (WebCore::buildInspectorObjectFor):
+ (WebCore::ScriptHeapSnapshot::buildInspectorObjectForHead):
+ * bindings/v8/ScriptHeapSnapshot.h: Added.
+ (WebCore::ScriptHeapSnapshot::create):
+ (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot):
+ (WebCore::ScriptHeapSnapshot::ScriptHeapSnapshot):
+ * bindings/v8/ScriptProfile.cpp:
+ (WebCore::buildInspectorObjectFor):
+ * bindings/v8/ScriptProfiler.cpp:
+ (WebCore::ScriptProfiler::takeHeapSnapshot):
+ * bindings/v8/ScriptProfiler.h:
+ * inspector/Inspector.idl:
+ * inspector/InspectorBackend.cpp:
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorProfilerAgent.cpp:
+ (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
+ (WebCore::InspectorProfilerAgent::createSnapshotHeader):
+ (WebCore::InspectorProfilerAgent::getProfileHeaders):
+ (WebCore::InspectorProfilerAgent::getProfile):
+ (WebCore::InspectorProfilerAgent::removeProfile):
+ (WebCore::InspectorProfilerAgent::resetState):
+ (WebCore::InspectorProfilerAgent::takeHeapSnapshot):
+ * inspector/InspectorProfilerAgent.h:
+ * inspector/front-end/HeapSnapshotView.js: Added.
+ (WebInspector.HeapSnapshotView.profileCallback):
+ (WebInspector.HeapSnapshotView.resetCompleted):
+ (WebInspector.HeapSnapshotView):
+ (WebInspector.HeapSnapshotView.prototype.get statusBarItems):
+ (WebInspector.HeapSnapshotView.prototype.get profile):
+ (WebInspector.HeapSnapshotView.prototype.set profile):
+ (WebInspector.HeapSnapshotView.prototype.show):
+ (WebInspector.HeapSnapshotView.prototype.hide):
+ (WebInspector.HeapSnapshotView.prototype.resize):
+ (WebInspector.HeapSnapshotView.prototype.refresh):
+ (WebInspector.HeapSnapshotView.prototype.refreshShowAsPercents):
+ (WebInspector.HeapSnapshotView.prototype._deleteSearchMatchedFlags):
+ (WebInspector.HeapSnapshotView.prototype.searchCanceled):
+ (WebInspector.HeapSnapshotView.prototype.performSearch):
+ (WebInspector.HeapSnapshotView.prototype.jumpToFirstSearchResult.WebInspector.CPUProfileView.prototype.jumpToFirstSearchResult.jumpToLastSearchResult.WebInspector.CPUProfileView.prototype.jumpToLastSearchResult.jumpToNextSearchResult.WebInspector.CPUProfileView.prototype.jumpToNextSearchResult.jumpToPreviousSearchResult.WebInspector.CPUProfileView.prototype.jumpToPreviousSearchResult.showingFirstSearchResult.WebInspector.CPUProfileView.prototype.showingFirstSearchResult.showingLastSearchResult.WebInspector.CPUProfileView.prototype.showingLastSearchResult._jumpToSearchResult.WebInspector.CPUProfileView.prototype._jumpToSearchResult.refreshVisibleData):
+ (WebInspector.HeapSnapshotView.prototype._changeBase.resetCompleted):
+ (WebInspector.HeapSnapshotView.prototype._changeBase):
+ (WebInspector.HeapSnapshotView.prototype._createSnapshotDataGridList):
+ (WebInspector.HeapSnapshotView.prototype._getProfiles):
+ (WebInspector.HeapSnapshotView.prototype._loadProfile.loadedCallback):
+ (WebInspector.HeapSnapshotView.prototype._loadProfile):
+ (WebInspector.HeapSnapshotView.prototype._mouseDownInDataGrid):
+ (WebInspector.HeapSnapshotView.prototype.get _isShowingAsPercent):
+ (WebInspector.HeapSnapshotView.prototype._percentClicked):
+ (WebInspector.HeapSnapshotView.prototype._prepareProfile.mergeRetainers):
+ (WebInspector.HeapSnapshotView.prototype._prepareProfile):
+ (WebInspector.HeapSnapshotView.prototype._resetDataGridList.profileLoaded):
+ (WebInspector.HeapSnapshotView.prototype._resetDataGridList):
+ (WebInspector.HeapSnapshotView.prototype._sortData):
+ (WebInspector.HeapSnapshotView.prototype._updateBaseOptions):
+ (WebInspector.HeapSnapshotView.prototype._updatePercentButton):
+ (WebInspector.HeapSnapshotView.prototype._updateSummaryGraph):
+ (WebInspector.HeapSnapshotView.SearchHelper.operations.LESS):
+ (WebInspector.HeapSnapshotView.SearchHelper.operations.LESS_OR_EQUAL):
+ (WebInspector.HeapSnapshotView.SearchHelper.operations.EQUAL):
+ (WebInspector.HeapSnapshotView.SearchHelper.operations.GREATER_OR_EQUAL):
+ (WebInspector.HeapSnapshotView.SearchHelper.operations.GREATER):
+ (WebInspector.HeapSnapshotView.SearchHelper.parseOperationAndNumber):
+ (WebInspector.HeapSummaryCalculator):
+ (WebInspector.HeapSummaryCalculator.prototype.computeSummaryValues):
+ (WebInspector.HeapSummaryCalculator.prototype.formatValue):
+ (WebInspector.HeapSummaryCalculator.prototype.get showAsPercent):
+ (WebInspector.HeapSummaryCalculator.prototype.set showAsPercent):
+ (WebInspector.HeapSummaryCountCalculator):
+ (WebInspector.HeapSummaryCountCalculator.prototype._highFromLow):
+ (WebInspector.HeapSummaryCountCalculator.prototype._valueToString):
+ (WebInspector.HeapSummarySizeCalculator):
+ (WebInspector.HeapSummarySizeCalculator.prototype._highFromLow):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get _hasRetainers):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get _parent):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype._populate):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.produceDiff):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.sort):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.signForDelta):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.showDeltaAsPercent):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalCount):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalSize):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get countPercent):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get sizePercent):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get countDeltaPercent):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get sizeDeltaPercent):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get data):
+ (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.createCell):
+ (WebInspector.HeapSnapshotDataGridNode):
+ (WebInspector.HeapSnapshotDataGridList):
+ (WebInspector.HeapSnapshotDataGridList.prototype.appendChild):
+ (WebInspector.HeapSnapshotDataGridList.prototype.insertChild):
+ (WebInspector.HeapSnapshotDataGridList.prototype.removeChildren):
+ (WebInspector.HeapSnapshotDataGridList.prototype.populateChildren):
+ (WebInspector.HeapSnapshotDataGridList.propertyComparator.comparator):
+ (WebInspector.HeapSnapshotDataGridList.propertyComparator):
+ (WebInspector.HeapSnapshotDataGridRetainerNode):
+ (WebInspector.HeapSnapshotDataGridRetainerNode.prototype.get sizePercent):
+ (WebInspector.HeapSnapshotDataGridRetainerNode.prototype.get sizeDeltaPercent):
+ (WebInspector.HeapSnapshotDataGridRetainerNode.prototype._calculateRetainers):
+ (WebInspector.HeapSnapshotProfileType):
+ (WebInspector.HeapSnapshotProfileType.prototype.get buttonTooltip):
+ (WebInspector.HeapSnapshotProfileType.prototype.get buttonStyle):
+ (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
+ (WebInspector.HeapSnapshotProfileType.prototype.get welcomeMessage):
+ (WebInspector.HeapSnapshotProfileType.prototype.createSidebarTreeElementForProfile):
+ (WebInspector.HeapSnapshotProfileType.prototype.createView):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileView):
+ (WebInspector.CPUProfileType.prototype.createSidebarTreeElementForProfile):
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.addProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.removeProfileHeader):
+ (WebInspector.ProfilesPanel.prototype.getProfiles):
+ (WebInspector.ProfilesPanel.prototype.updateProfile):
+ (WebInspector.ProfileSidebarTreeElement):
+ (WebInspector.ProfileSidebarTreeElement.prototype.get mainTitle):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.css:
+ (.heap-snapshot-sidebar-tree-item .icon):
+ (.heap-snapshot-sidebar-tree-item.small .icon):
+ (.heap-snapshot-view):
+ (.heap-snapshot-view.visible):
+ (.heap-snapshot-view .data-grid):
+ (.heap-snapshot-view .data-grid th.count-column):
+ (.heap-snapshot-view .data-grid td.count-column):
+ (.heap-snapshot-view .data-grid th.size-column):
+ (.heap-snapshot-view .data-grid td.size-column):
+ (.heap-snapshot-view .data-grid th.countDelta-column):
+ (.heap-snapshot-view .data-grid td.countDelta-column):
+ (.heap-snapshot-view .data-grid th.sizeDelta-column):
+ (.heap-snapshot-view .data-grid td.sizeDelta-column):
+ (#heap-snapshot-summary-container):
+ (.heap-snapshot-summary):
+ (.heap-snapshot-summary canvas.summary-graph):
+ (.heap-snapshot-summary-label):
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector._createPanels):
+
+2010-08-25 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/8302217> recalcStyles called immediately on each change when updating document-level stylesheets
+ https://bugs.webkit.org/show_bug.cgi?id=36303
+
+ Parameterize updateStyleSelector to optionally defer the forced style recalc following the rebuilding of the
+ sheets used by the CSSStyleSelector. Rename the method to styleSelectorChanged(). Add the capability to do
+ a forced style recalc to the style recalc timer.
+
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::styleSheetChanged):
+ * css/CSSVariablesDeclaration.cpp:
+ (WebCore::CSSVariablesDeclaration::setNeedsStyleRecalc):
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::scheduleStyleRecalc):
+ (WebCore::Document::updateStyleIfNeeded):
+ (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+ (WebCore::Document::clearPageUserSheet):
+ (WebCore::Document::clearPageGroupUserSheets):
+ (WebCore::Document::processHttpEquiv):
+ (WebCore::Document::setSelectedStylesheetSet):
+ (WebCore::Document::removePendingSheet):
+ (WebCore::Document::styleSelectorChanged):
+ (WebCore::Document::setInPageCache):
+ * dom/Document.h:
+ (WebCore::):
+ * dom/ProcessingInstruction.cpp:
+ (WebCore::ProcessingInstruction::removedFromDocument):
+ * dom/StyleElement.cpp:
+ (WebCore::StyleElement::removedFromDocument):
+ * dom/XMLDocumentParser.cpp:
+ (WebCore::XMLDocumentParser::end):
+ * dom/XMLDocumentParserLibxml2.cpp:
+ (WebCore::XMLDocumentParser::doEnd):
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::determineParseMode):
+ * html/HTMLLinkElement.cpp:
+ (WebCore::HTMLLinkElement::setDisabledState):
+ (WebCore::HTMLLinkElement::process):
+ (WebCore::HTMLLinkElement::removedFromDocument):
+ * page/Frame.cpp:
+ (WebCore::Frame::setPrinting):
+ (WebCore::Frame::reapplyStyles):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+ * page/Page.cpp:
+ (WebCore::Page::setViewMode):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::rebuildFontFace):
+ (WebCore::SVGFontFaceElement::removeFromMappedElementSheet):
+
+2010-08-24 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Implementing clipping for composited layers. Two
+ types of clipping are added: Scissoring for layers that don't
+ contain any rotations and stencil-buffer based clipping for
+ all other layers.
+ https://bugs.webkit.org/show_bug.cgi?id=44573
+
+ Tests: Compositor layout tests that test clipping such as
+ compositing/geometry/{clip.html, clipping-foreground.html} now
+ work properly.
+
+ * platform/graphics/chromium/LayerChromium.cpp:
+ (WebCore::LayerChromium::SharedValues::SharedValues):
+ (WebCore::LayerChromium::getDrawRect):
+ (WebCore::LayerChromium::drawAsMask):
+ * platform/graphics/chromium/LayerChromium.h:
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::drawLayers):
+ (WebCore::LayerRendererChromium::drawLayerIntoStencilBuffer):
+ (WebCore::LayerRendererChromium::drawLayersRecursive):
+ (WebCore::LayerRendererChromium::scissorToRect):
+ (WebCore::LayerRendererChromium::initializeSharedObjects):
+ * platform/graphics/chromium/LayerRendererChromium.h:
+
+2010-08-25 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Expose Vector3 and associated operations
+ https://bugs.webkit.org/show_bug.cgi?id=44666
+
+ No new tests; ran several 3D CSS demos and did full layout test
+ run. New code paths have also been tested by new calling code
+ which will be checked in soon.
+
+ * platform/graphics/transforms/TransformationMatrix.cpp:
+ (WebCore::decompose):
+ * platform/graphics/transforms/TransformationMatrix.h:
+ (WebCore::Vector3::Vector3):
+ (WebCore::Vector3::x):
+ (WebCore::Vector3::y):
+ (WebCore::Vector3::z):
+ (WebCore::Vector3::setX):
+ (WebCore::Vector3::setY):
+ (WebCore::Vector3::setZ):
+ (WebCore::Vector3::set):
+ (WebCore::Vector3::operator =):
+ (WebCore::Vector3::operator +):
+ (WebCore::Vector3::operator -):
+ (WebCore::Vector3::operator[]):
+ (WebCore::Vector3::length):
+ (WebCore::Vector3::lengthSquared):
+ (WebCore::Vector3::scaleTo):
+ (WebCore::Vector3::normalize):
+ (WebCore::Vector3::dot):
+ (WebCore::Vector3::combine):
+ (WebCore::Vector3::cross):
+
+2010-08-26 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: fix CPU profile header entries doubling on Inspector re-opening.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44685
+
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype.show):
+
+2010-08-26 Eric Carlson <eric.carlson@apple.com>
+
+ Reviewed by Darin Adler and Maciej Stachowiak.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44013
+ HTMLMediaElement should delay document load event
+
+ Test: media/video-delay-load-event.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document): Initialize incrementLoadEventDelayCount.
+ (WebCore::Document::decrementLoadEventDelayCount): New, decrement incrementLoadEventDelayCount
+ and call loader->checkCompleted() when it reaches zero.
+ * dom/Document.h:
+ (WebCore::Document::incrementLoadEventDelayCount): New.
+ (WebCore::Document::isDelayingLoadEvent): New.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::~HTMLMediaElement): Stop delaying the load event if necessary.
+ (WebCore::HTMLMediaElement::willMoveToNewOwnerDocument): Ditto.
+ (WebCore::HTMLMediaElement::didMoveToNewOwnerDocument): Delay the load event if we don't the
+ meta data for the movie yet.
+ (WebCore::HTMLMediaElement::prepareForLoad): Delay the load event.
+ (WebCore::HTMLMediaElement::selectMediaResource): Don't delay the load event when there are
+ no more sources to consider. Don't change m_delayingTheLoadEvent directly, call
+ setShouldDelayLoadEvent() instead.
+ (WebCore::HTMLMediaElement::waitForSourceChange): Stop delaying the load event.
+ (WebCore::HTMLMediaElement::noneSupported): Ditto.
+ (WebCore::HTMLMediaElement::mediaEngineError): Ditto.
+ (WebCore::HTMLMediaElement::setReadyState): Ditto.
+ (WebCore::HTMLMediaElement::userCancelledLoad): Ditto.
+ (WebCore::HTMLMediaElement::setShouldDelayLoadEvent): New, increment/decrement the document's
+ load event delay count.
+ * html/HTMLMediaElement.h:
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::checkCompleted): See if the document wants to delay completion for
+ elements that don't go through a FrameLoader.
+ (WebCore::FrameLoader::checkCallImplicitClose): Ditto
+ * page/Frame.cpp:
+
+2010-08-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Fix the same issue as https://bugs.webkit.org/show_bug.cgi?id=41585
+ but this time for the -webkit-font-smoothing property.
+
+ Updated fast/css/text-rendering-priority.html to cover all properties that
+ affect the font.
+
+ * css/CSSPropertyNames.in: Moved text-rendering to the “high priority” section at the top.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::styleForElement): Assert that the font is not dirtied by
+ applying any of the “low priority” properties, but still handle the case that the assertion
+ is false.
+ (WebCore::CSSStyleSelector::applyDeclarations): Updated compile-time assertion.
+
+2010-08-26 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
+ https://bugs.webkit.org/show_bug.cgi?id=44624
+
+ Clean up GNUmakefile.am.
+
+ * GNUmakefile.am: Remove some WebKit includes from webcore_cppflags. These
+ includes are added to the build line by the top-level GNUmakefile.am, since
+ WebCore isn't build as an intermediate library.
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::close):
+ * inspector/InspectorFrontendClient.h:
+ * inspector/InspectorFrontendHost.cpp:
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ * inspector/front-end/inspector.js:
+ (WebInspector.inspectedPageDestroyed):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedPageDestroyed):
+ (WebCore::InspectorController::close):
+ * inspector/InspectorFrontendClient.h:
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::disconnectFromBackend): don't try to notify InspectorController
+ that frontend closes if InspectorController triggered the action.
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ (.WebInspector.InspectorFrontendHostStub.prototype.disconnectFromBackend):
+ * inspector/front-end/inspector.js:
+ (WebInspector.disconnectFromBackend):
+
+2010-08-26 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: It would be better to have an explicit type check for the all
+ arguments of InspectorBackend functions on front-end side.
+ https://bugs.webkit.org/show_bug.cgi?id=44684
+
+ * inspector/CodeGeneratorInspector.pm:
+
+2010-08-26 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ WebInspector: It would be better to rename setBool, pushBool and asBool accessors
+ to setBoolean, pushBoolean and asBoolean for better matching with the results of
+ JS typeof operator.
+ https://bugs.webkit.org/show_bug.cgi?id=44680
+
+ * bindings/js/ScriptProfile.cpp:
+ (WebCore::buildInspectorObjectFor):
+ * bindings/v8/ScriptProfile.cpp:
+ (WebCore::buildInspectorObjectFor):
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::buildObjectForCookie):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+ (WebCore::InspectorDOMAgent::populateObjectWithStyleProperties):
+ (WebCore::InspectorDOMAgent::buildObjectForStyleSheet):
+ (WebCore::InspectorDOMAgent::buildObjectForRule):
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::bind):
+ * inspector/InspectorResource.cpp:
+ (WebCore::InspectorResource::updateScriptObject):
+ * inspector/InspectorValues.cpp:
+ (WebCore::InspectorValue::asBoolean):
+ (WebCore::InspectorBasicValue::asBoolean):
+ (WebCore::InspectorBasicValue::asNumber):
+ (WebCore::InspectorBasicValue::writeJSON):
+ (WebCore::InspectorObject::getBoolean):
+ * inspector/InspectorValues.h:
+ (WebCore::InspectorValue::):
+ (WebCore::InspectorBasicValue::InspectorBasicValue):
+ (WebCore::InspectorObject::setBoolean):
+ (WebCore::InspectorArray::pushBoolean):
+ * inspector/ScriptBreakpoint.cpp:
+ (WebCore::ScriptBreakpoint::sourceBreakpointsFromInspectorObject):
+ (WebCore::ScriptBreakpoint::inspectorObjectFromSourceBreakpoints):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createTimerInstallData):
+ (WebCore::TimelineRecordFactory::createResourceSendRequestData):
+ (WebCore::TimelineRecordFactory::createResourceFinishData):
+
+2010-08-26 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Set the clipRect correctly in windowed and windowless mode.
+ In Windowed mode, the values are in page coordinates. In Windowless
+ mode the values are in drawable coordinates. Setting these values is
+ purely academic since they are not used by Flash. However, there is a
+ possibility that plugins might infer a 'null' clipRect to mean 'invisible'.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44594
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded):
+
+2010-08-26 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: enable debugger after resources are pushed to front-end
+ https://bugs.webkit.org/show_bug.cgi?id=44673
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::connectFrontend):
+ (WebCore::InspectorController::populateScriptObjects):
+
+2010-08-26 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ text-shadow is not respected in RenderSVGText::repaintRectInLocalCoordinates()
+ https://bugs.webkit.org/show_bug.cgi?id=44616
+
+ Centralize code to calculate the shadow extents in ShadowData.
+ Respect textShadow() when calculating the repaint rect of RenderSVGText.
+
+ Tests: svg/css/composite-shadow-text.svg
+ transitions/svg-text-shadow-transition.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::adjustRectForOutlineAndShadow):
+ * rendering/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates):
+ (WebCore::RenderSVGRoot::computeRectForRepaint):
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::repaintRectInLocalCoordinates):
+ * rendering/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::computeRectForRepaint):
+ (WebCore::SVGRenderSupport::prepareToRenderSVGContent):
+ (WebCore::SVGRenderSupport::finishRenderSVGContent):
+ (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
+ * rendering/style/SVGRenderStyle.cpp:
+ * rendering/style/SVGRenderStyle.h:
+ * rendering/style/ShadowData.cpp:
+ (WebCore::calculateShadowExtent):
+ (WebCore::ShadowData::adjustRectForShadow):
+ * rendering/style/ShadowData.h:
+
+2010-08-25 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Rework event definition in the DOM bindings
+ https://bugs.webkit.org/show_bug.cgi?id=44597
+
+ Define DOM events in the base classes that implement EventTarget,
+ since theoretically you can dispatch any event to any of those
+ classes whether it makes sense semantically or not.
+
+ All the existing events in WebKit are not listed anywhere in the
+ IDL files, so we need to have the list in the generator script.
+
+ * bindings/scripts/CodeGeneratorGObject.pm:
+
+2010-08-25 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: as far as we have 'seq' property in the each inspector message
+ it would be better to remove explicit callId argument from Inspector.idl functions
+ declarations.
+ https://bugs.webkit.org/show_bug.cgi?id=44617
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * inspector/CodeGeneratorInspector.pm:
+ * inspector/Inspector.idl:
+ * inspector/front-end/AuditRules.js:
+ (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
+ (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.receivedImages):
+ * inspector/front-end/BreakpointManager.js:
+ (WebInspector.BreakpointManager.prototype._setBreakpointOnBackend):
+ * inspector/front-end/CSSStyleModel.js:
+ (WebInspector.CSSStyleModel.prototype.getStylesAsync):
+ (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
+ (WebInspector.CSSStyleModel.prototype.setRuleSelector):
+ (WebInspector.CSSStyleModel.prototype.addRule):
+ (WebInspector.CSSStyleModel.prototype.toggleStyleEnabled):
+ (WebInspector.CSSStyleModel.prototype.setCSSText):
+ (WebInspector.CSSStyleModel.prototype.applyStyleText):
+ * inspector/front-end/DOMAgent.js:
+ (WebInspector.DOMAgent.prototype.getChildNodesAsync):
+ (WebInspector.DOMAgent.prototype.setAttributeAsync):
+ (WebInspector.DOMAgent.prototype.removeAttributeAsync):
+ (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
+ (WebInspector.ApplicationCache.getApplicationCachesAsync):
+ (WebInspector.Cookies.getCookiesAsync):
+ (WebInspector.EventListeners.getEventListenersForNodeAsync):
+ * inspector/front-end/DOMStorage.js:
+ (WebInspector.DOMStorage.prototype.getEntries):
+ (WebInspector.DOMStorage.prototype.setItem):
+ (WebInspector.DOMStorage.prototype.removeItem):
+ * inspector/front-end/Database.js:
+ (WebInspector.Database.prototype.getTableNames):
+ (WebInspector.Database.prototype.executeSql):
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.setDocument):
+ * inspector/front-end/ElementsTreeOutline.js:
+ (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
+ ():
+ * inspector/front-end/InjectedScriptAccess.js:
+ (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName):
+ (InjectedScriptAccess._installHandler):
+ * inspector/front-end/MetricsSidebarPane.js:
+ (WebInspector.MetricsSidebarPane.prototype.update):
+ (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
+ * inspector/front-end/ProfileView.js:
+ (WebInspector.CPUProfileView):
+ * inspector/front-end/ProfilesPanel.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.getResourceContent):
+ * inspector/front-end/ScriptView.js:
+ (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.editScriptSource):
+ * inspector/front-end/inspector.js:
+ (WebInspector.doLoadedDone):
+
+2010-08-26 Kwang Yul Seo <skyul@company100.net>
+
+ Reviewed by Kent Tamura.
+
+ Add ENABLE(INDEXED_DATABASE) guard
+ https://bugs.webkit.org/show_bug.cgi?id=44659
+
+ Build fix for ports with index database disabled.
+
+ * storage/IDBKeyPathBackendImpl.cpp:
+
+2010-08-26 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Replace QLibrary("libgdk-x11-2.0.so.0") with QLibrary("libgdk-x11-2.0", 0)
+ https://bugs.webkit.org/show_bug.cgi?id=44618
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::getPluginDisplay):
+
+2010-08-26 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Sam Weinig.
+
+ Deploy adoptPtr to WebCore/loader
+ https://bugs.webkit.org/show_bug.cgi?id=44591
+
+ This patch covers the easy cases. There are a handful of tougher cases
+ that I'm leaving to a future patch. I filed one bug about a possible
+ memory leak and I emailed webkit-dev about some infrastructure we'll
+ need to tackle some of the harder cases.
+
+ * loader/CrossOriginAccessControl.cpp:
+ (WebCore::createAllowedCrossOriginResponseHeadersSet):
+ (WebCore::isOnAccessControlResponseHeaderWhitelist):
+ * loader/DocLoader.cpp:
+ (WebCore::DocLoader::requestPreload):
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::DocumentLoader):
+ (WebCore::DocumentLoader::addAllArchiveResources):
+ (WebCore::DocumentLoader::addArchiveResource):
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
+ (WebCore::DocumentThreadableLoader::didReceiveResponse):
+ * loader/PingLoader.cpp:
+ (WebCore::PingLoader::loadImage):
+ * loader/ProgressTracker.cpp:
+ (WebCore::ProgressTracker::incrementProgress):
+ * loader/RedirectScheduler.cpp:
+ (WebCore::RedirectScheduler::scheduleRedirect):
+ (WebCore::RedirectScheduler::scheduleLocationChange):
+ (WebCore::RedirectScheduler::scheduleFormSubmission):
+ (WebCore::RedirectScheduler::scheduleRefresh):
+ (WebCore::RedirectScheduler::scheduleHistoryNavigation):
+ * loader/WorkerThreadableLoader.cpp:
+ (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::readySQLiteStatement):
+ * loader/icon/IconLoader.cpp:
+ (WebCore::IconLoader::create):
+
+2010-08-26 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Dan Bernstein.
+
+ shadowSize parameter is used to pass shadow offset in the
+ GraphicsContext::setShadow and getShadow functions
+ https://bugs.webkit.org/show_bug.cgi?id=44603
+
+ Change the shadowSize parameter ot the functions getShadow and
+ setShadow in GraphicsContext to shadowOffset which is the current
+ use of that parameter in the code.
+
+ * platform/graphics/GraphicsContext.cpp:
+ (WebCore::GraphicsContext::setShadow):
+ (WebCore::GraphicsContext::clearShadow):
+ (WebCore::GraphicsContext::getShadow):
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/GraphicsContextPrivate.h:
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/cairo/GraphicsContextCairo.cpp:
+ (WebCore::GraphicsContext::calculateShadowBufferDimensions):
+ (WebCore::drawPathShadow):
+ (WebCore::drawBorderlessRectShadow):
+ (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/cairo/ImageCairo.cpp:
+ (WebCore::BitmapImage::draw):
+ * platform/graphics/chromium/FontChromiumWin.cpp:
+ (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
+ (WebCore::Font::drawComplexText):
+ * platform/graphics/gtk/FontGtk.cpp:
+ (WebCore::Font::drawComplexText):
+ * platform/graphics/mac/FontMac.mm:
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/qt/ImageQt.cpp:
+ (WebCore::BitmapImage::draw):
+ * platform/graphics/qt/StillImageQt.cpp:
+ (WebCore::StillImage::draw):
+ * platform/graphics/qt/GraphicsContextQt:
+ (WebCore::GraphicsContext::setPlatformShadow):
+ * platform/graphics/skia/SkiaFontWin.cpp:
+ (WebCore::windowsCanHandleDrawTextShadow):
+ * platform/graphics/win/FontCGWin.cpp:
+ (WebCore::drawGDIGlyphs):
+ (WebCore::Font::drawGlyphs):
+ * platform/graphics/wince/GraphicsContextWince.cpp:
+ (WebCore::GraphicsContext::fillRoundedRect):
+ (WebCore::GraphicsContext::drawText):
+
2010-08-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r66074.
diff --git a/WebCore/Configurations/FeatureDefines.xcconfig b/WebCore/Configurations/FeatureDefines.xcconfig
index f2b4c09..8f8c213 100644
--- a/WebCore/Configurations/FeatureDefines.xcconfig
+++ b/WebCore/Configurations/FeatureDefines.xcconfig
@@ -71,6 +71,7 @@ ENABLE_FILTERS_macosx = ENABLE_FILTERS;
ENABLE_FILE_WRITER = ;
ENABLE_FILE_SYSTEM = ;
+ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API;
ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
@@ -120,4 +121,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_WRITER) $(ENABLE_FILE_SYSTEM) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_WRITER) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebCore/Configurations/Version.xcconfig b/WebCore/Configurations/Version.xcconfig
index 09ebfc4..69bde0f 100644
--- a/WebCore/Configurations/Version.xcconfig
+++ b/WebCore/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 6;
+MINOR_VERSION = 7;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index bbab64b..81f4070 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -107,8 +107,10 @@
#include "JSFile.cpp"
#include "JSFileEntry.cpp"
#include "JSFileError.cpp"
+#include "JSFileException.cpp"
#include "JSFileList.cpp"
#include "JSFileReader.cpp"
+#include "JSFileReaderSync.cpp"
#include "JSFileSystemCallback.cpp"
#include "JSFileWriter.cpp"
#include "JSFlags.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index b9f6589..6fd1cde 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -33,6 +33,7 @@ VPATH = \
$(WebCore)/bindings/objc \
$(WebCore)/css \
$(WebCore)/dom \
+ $(WebCore)/fileapi \
$(WebCore)/html \
$(WebCore)/html/canvas \
$(WebCore)/inspector \
@@ -151,9 +152,11 @@ DOM_CLASSES = \
EventTarget \
File \
FileEntry \
+ FileException \
FileError \
FileList \
FileReader \
+ FileReaderSync \
FileWriter \
FileSystemCallback \
Flags \
@@ -604,8 +607,8 @@ DocTypeStrings.cpp : html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl
# HTML entity names
-HTMLEntityTable.cpp : html/HTMLEntityNames.json $(WebCore)/../WebKitTools/Scripts/create-html-entity-table
- python $(WebCore)/../WebKitTools/Scripts/create-html-entity-table -o HTMLEntityTable.cpp $(WebCore)/html/HTMLEntityNames.json
+HTMLEntityTable.cpp : html/parser/HTMLEntityNames.in $(WebCore)/html/parser/create-html-entity-table
+ python $(WebCore)/html/parser/create-html-entity-table -o HTMLEntityTable.cpp $(WebCore)/html/parser/HTMLEntityNames.in
# --------
@@ -676,6 +679,10 @@ ifeq ($(OS),MACOS)
endif
endif
+ifeq ($(findstring ENABLE_FULLSCREEN_API,$(FEATURE_DEFINES)), ENABLE_FULLSCREEN_API)
+ USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/fullscreen.css
+endif
+
UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS)
perl $< $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS)
@@ -809,7 +816,7 @@ generator_script = perl $(addprefix -I $(WebCore)/, $(sort $(dir $(1)))) $(WebCo
# JS bindings generator
-IDL_INCLUDES = dom html css page notifications xml svg
+IDL_INCLUDES = dom fileapi html css page notifications xml svg
IDL_COMMON_ARGS = $(IDL_INCLUDES:%=--include %) --write-dependencies --outputDir .
JS_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorJS.pm
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index 38d2557..c26c15f 100644
--- a/WebCore/English.lproj/localizedStrings.js
+++ b/WebCore/English.lproj/localizedStrings.js
Binary files differ
diff --git a/WebCore/ForwardingHeaders/wtf/OwnArrayPtrCommon.h b/WebCore/ForwardingHeaders/wtf/OwnArrayPtrCommon.h
new file mode 100644
index 0000000..e886c8a
--- /dev/null
+++ b/WebCore/ForwardingHeaders/wtf/OwnArrayPtrCommon.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_OwnArrayPtrCommon_h
+#define WebCore_FWD_OwnArrayPtrCommon_h
+#include <JavaScriptCore/OwnArrayPtrCommon.h>
+#endif
diff --git a/WebCore/ForwardingHeaders/wtf/PassOwnArrayPtr.h b/WebCore/ForwardingHeaders/wtf/PassOwnArrayPtr.h
new file mode 100644
index 0000000..8202cae
--- /dev/null
+++ b/WebCore/ForwardingHeaders/wtf/PassOwnArrayPtr.h
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_PassOwnArrayPtr_h
+#define WebCore_FWD_PassOwnArrayPtr_h
+#include <JavaScriptCore/PassOwnArrayPtr.h>
+#endif
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index dac604b..76f8be2 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -5,9 +5,6 @@ WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in
webcore_cppflags += \
- -I$(srcdir)/WebKit/gtk \
- -I$(srcdir)/WebKit/gtk/WebCoreSupport \
- -I$(srcdir)/WebKit/gtk/webkit \
-I$(srcdir)/WebCore \
-I$(srcdir)/WebCore/accessibility \
-I$(srcdir)/WebCore/bindings/generic \
@@ -21,9 +18,11 @@ webcore_cppflags += \
-I$(srcdir)/WebCore/dom \
-I$(srcdir)/WebCore/dom/default \
-I$(srcdir)/WebCore/editing \
+ -I$(srcdir)/WebCore/fileapi \
-I$(srcdir)/WebCore/history \
-I$(srcdir)/WebCore/html \
-I$(srcdir)/WebCore/html/canvas \
+ -I$(srcdir)/WebCore/html/parser \
-I$(srcdir)/WebCore/inspector \
-I$(srcdir)/WebCore/loader \
-I$(srcdir)/WebCore/loader/appcache \
@@ -239,8 +238,6 @@ webcore_built_sources += \
DerivedSources/WebCore/JSFileList.h \
DerivedSources/WebCore/JSFileReader.cpp \
DerivedSources/WebCore/JSFileReader.h \
- DerivedSources/WebCore/JSFileWriter.cpp \
- DerivedSources/WebCore/JSFileWriter.h \
DerivedSources/WebCore/JSFloat32Array.cpp \
DerivedSources/WebCore/JSFloat32Array.h \
DerivedSources/WebCore/JSGeolocation.cpp \
@@ -776,6 +773,7 @@ webcore_sources += \
WebCore/bindings/js/ScriptFunctionCall.h \
WebCore/bindings/js/ScriptGCEvent.cpp \
WebCore/bindings/js/ScriptGCEvent.h \
+ WebCore/bindings/js/ScriptHeapSnapshot.h \
WebCore/bindings/js/ScriptInstance.h \
WebCore/bindings/js/ScriptObject.cpp \
WebCore/bindings/js/ScriptObject.h \
@@ -1297,6 +1295,29 @@ webcore_sources += \
WebCore/editing/visible_units.cpp \
WebCore/editing/visible_units.h \
WebCore/editing/gtk/SelectionControllerGtk.cpp \
+ WebCore/fileapi/Blob.cpp \
+ WebCore/fileapi/Blob.h \
+ WebCore/fileapi/BlobBuilder.cpp \
+ WebCore/fileapi/BlobBuilder.h \
+ WebCore/fileapi/BlobURL.cpp \
+ WebCore/fileapi/BlobURL.h \
+ WebCore/fileapi/File.cpp \
+ WebCore/fileapi/File.h \
+ WebCore/fileapi/FileError.h \
+ WebCore/fileapi/FileException.h \
+ WebCore/fileapi/FileList.cpp \
+ WebCore/fileapi/FileList.h \
+ WebCore/fileapi/FileReader.cpp \
+ WebCore/fileapi/FileReader.h \
+ WebCore/fileapi/FileReaderSync.cpp \
+ WebCore/fileapi/FileReaderSync.h \
+ WebCore/fileapi/FileStreamProxy.cpp \
+ WebCore/fileapi/FileStreamProxy.h \
+ WebCore/fileapi/FileThread.cpp \
+ WebCore/fileapi/FileThread.h \
+ WebCore/fileapi/FileThreadTask.h \
+ WebCore/fileapi/ThreadableBlobRegistry.cpp \
+ WebCore/fileapi/ThreadableBlobRegistry.h \
WebCore/history/BackForwardController.cpp \
WebCore/history/BackForwardController.h \
WebCore/history/BackForwardControllerClient.h \
@@ -1314,30 +1335,13 @@ webcore_sources += \
WebCore/history/PageCache.h \
WebCore/html/AsyncImageResizer.cpp \
WebCore/html/AsyncImageResizer.h \
- WebCore/html/Blob.cpp \
- WebCore/html/Blob.h \
- WebCore/html/BlobBuilder.cpp \
- WebCore/html/BlobBuilder.h \
- WebCore/html/BlobURL.cpp \
- WebCore/html/BlobURL.h \
- WebCore/html/canvas/CanvasContextAttributes.h \
- WebCore/html/canvas/CanvasGradient.cpp \
- WebCore/html/canvas/CanvasGradient.h \
- WebCore/html/canvas/CanvasPattern.cpp \
- WebCore/html/canvas/CanvasPattern.h \
- WebCore/html/canvas/CanvasPixelArray.cpp \
- WebCore/html/canvas/CanvasPixelArray.h \
- WebCore/html/canvas/CanvasRenderingContext.cpp \
- WebCore/html/canvas/CanvasRenderingContext.h \
- WebCore/html/canvas/CanvasRenderingContext2D.cpp \
- WebCore/html/canvas/CanvasRenderingContext2D.h \
- WebCore/html/canvas/CanvasStyle.cpp \
- WebCore/html/canvas/CanvasStyle.h \
WebCore/html/CollectionCache.cpp \
WebCore/html/CollectionCache.h \
WebCore/html/CollectionType.h \
- WebCore/html/CSSPreloadScanner.cpp \
- WebCore/html/CSSPreloadScanner.h \
+ WebCore/html/DOMDataGridDataSource.cpp \
+ WebCore/html/DOMDataGridDataSource.h \
+ WebCore/html/DOMFormData.cpp \
+ WebCore/html/DOMFormData.h \
WebCore/html/DataGridColumn.cpp \
WebCore/html/DataGridColumn.h \
WebCore/html/DataGridColumnList.cpp \
@@ -1345,40 +1349,8 @@ webcore_sources += \
WebCore/html/DataGridDataSource.h \
WebCore/html/DateComponents.cpp \
WebCore/html/DateComponents.h \
- WebCore/html/DOMDataGridDataSource.cpp \
- WebCore/html/DOMDataGridDataSource.h \
- WebCore/html/DOMFormData.cpp \
- WebCore/html/DOMFormData.h \
- WebCore/html/File.cpp \
- WebCore/html/File.h \
- WebCore/html/FileError.h \
- WebCore/html/FileList.cpp \
- WebCore/html/FileList.h \
- WebCore/html/FileReader.cpp \
- WebCore/html/FileReader.h \
- WebCore/html/FileWriter.cpp \
- WebCore/html/FileWriter.h \
- WebCore/html/FileStreamProxy.cpp \
- WebCore/html/FileStreamProxy.h \
- WebCore/html/FileThread.cpp \
- WebCore/html/FileThread.h \
- WebCore/html/FileThreadTask.h \
WebCore/html/FormDataList.cpp \
WebCore/html/FormDataList.h \
- WebCore/html/HTMLEntityParser.cpp \
- WebCore/html/HTMLEntityParser.h \
- WebCore/html/HTMLTokenizer.cpp \
- WebCore/html/HTMLTokenizer.h \
- WebCore/html/HTMLToken.h \
- WebCore/html/HTMLDocumentParser.cpp \
- WebCore/html/HTMLDocumentParser.h \
- WebCore/html/HTMLPreloadScanner.cpp \
- WebCore/html/HTMLPreloadScanner.h \
- WebCore/html/HTMLScriptRunner.cpp \
- WebCore/html/HTMLScriptRunner.h \
- WebCore/html/HTMLScriptRunnerHost.h \
- WebCore/html/HTMLTreeBuilder.cpp \
- WebCore/html/HTMLTreeBuilder.h \
WebCore/html/HTMLAllCollection.cpp \
WebCore/html/HTMLAllCollection.h \
WebCore/html/HTMLAnchorElement.cpp \
@@ -1403,40 +1375,32 @@ webcore_sources += \
WebCore/html/HTMLCanvasElement.h \
WebCore/html/HTMLCollection.cpp \
WebCore/html/HTMLCollection.h \
- WebCore/html/HTMLDataGridElement.cpp \
- WebCore/html/HTMLDataGridElement.h \
+ WebCore/html/HTMLDListElement.cpp \
+ WebCore/html/HTMLDListElement.h \
WebCore/html/HTMLDataGridCellElement.cpp \
WebCore/html/HTMLDataGridCellElement.h \
WebCore/html/HTMLDataGridColElement.cpp \
WebCore/html/HTMLDataGridColElement.h \
+ WebCore/html/HTMLDataGridElement.cpp \
+ WebCore/html/HTMLDataGridElement.h \
WebCore/html/HTMLDataGridRowElement.cpp \
WebCore/html/HTMLDataGridRowElement.h \
WebCore/html/HTMLDataListElement.cpp \
WebCore/html/HTMLDataListElement.h \
- WebCore/html/HTMLDListElement.cpp \
- WebCore/html/HTMLDListElement.h \
WebCore/html/HTMLDirectoryElement.cpp \
WebCore/html/HTMLDirectoryElement.h \
WebCore/html/HTMLDivElement.cpp \
WebCore/html/HTMLDivElement.h \
WebCore/html/HTMLDocument.cpp \
WebCore/html/HTMLDocument.h \
- WebCore/html/HTMLConstructionSite.cpp \
- WebCore/html/HTMLConstructionSite.h \
WebCore/html/HTMLElement.cpp \
WebCore/html/HTMLElement.h \
- WebCore/html/HTMLElementStack.cpp \
- WebCore/html/HTMLElementStack.h \
- WebCore/html/HTMLEntitySearch.cpp \
- WebCore/html/HTMLEntitySearch.h \
WebCore/html/HTMLEmbedElement.cpp \
WebCore/html/HTMLEmbedElement.h \
WebCore/html/HTMLFieldSetElement.cpp \
WebCore/html/HTMLFieldSetElement.h \
WebCore/html/HTMLFontElement.cpp \
WebCore/html/HTMLFontElement.h \
- WebCore/html/HTMLFormattingElementList.cpp \
- WebCore/html/HTMLFormattingElementList.h \
WebCore/html/HTMLFormCollection.cpp \
WebCore/html/HTMLFormCollection.h \
WebCore/html/HTMLFormControlElement.cpp \
@@ -1511,8 +1475,6 @@ webcore_sources += \
WebCore/html/HTMLParserErrorCodes.cpp \
WebCore/html/HTMLParserErrorCodes.h \
WebCore/html/HTMLParserQuirks.h \
- WebCore/html/HTMLParserScheduler.cpp \
- WebCore/html/HTMLParserScheduler.h \
WebCore/html/HTMLPlugInElement.cpp \
WebCore/html/HTMLPlugInElement.h \
WebCore/html/HTMLPlugInImageElement.cpp \
@@ -1553,8 +1515,6 @@ webcore_sources += \
WebCore/html/HTMLUListElement.h \
WebCore/html/HTMLViewSourceDocument.cpp \
WebCore/html/HTMLViewSourceDocument.h \
- WebCore/html/HTMLViewSourceParser.cpp \
- WebCore/html/HTMLViewSourceParser.h \
WebCore/html/ImageData.cpp \
WebCore/html/ImageData.h \
WebCore/html/ImageResizerThread.cpp \
@@ -1565,8 +1525,48 @@ webcore_sources += \
WebCore/html/StepRange.cpp \
WebCore/html/StepRange.h \
WebCore/html/TextMetrics.h \
- WebCore/html/ThreadableBlobRegistry.cpp \
- WebCore/html/ThreadableBlobRegistry.h \
+ WebCore/html/canvas/CanvasContextAttributes.h \
+ WebCore/html/canvas/CanvasGradient.cpp \
+ WebCore/html/canvas/CanvasGradient.h \
+ WebCore/html/canvas/CanvasPattern.cpp \
+ WebCore/html/canvas/CanvasPattern.h \
+ WebCore/html/canvas/CanvasPixelArray.cpp \
+ WebCore/html/canvas/CanvasPixelArray.h \
+ WebCore/html/canvas/CanvasRenderingContext.cpp \
+ WebCore/html/canvas/CanvasRenderingContext.h \
+ WebCore/html/canvas/CanvasRenderingContext2D.cpp \
+ WebCore/html/canvas/CanvasRenderingContext2D.h \
+ WebCore/html/canvas/CanvasStyle.cpp \
+ WebCore/html/canvas/CanvasStyle.h \
+ WebCore/html/parser/CSSPreloadScanner.cpp \
+ WebCore/html/parser/CSSPreloadScanner.h \
+ WebCore/html/parser/HTMLConstructionSite.cpp \
+ WebCore/html/parser/HTMLConstructionSite.h \
+ WebCore/html/parser/HTMLDocumentParser.cpp \
+ WebCore/html/parser/HTMLDocumentParser.h \
+ WebCore/html/parser/HTMLElementStack.cpp \
+ WebCore/html/parser/HTMLElementStack.h \
+ WebCore/html/parser/HTMLEntityParser.cpp \
+ WebCore/html/parser/HTMLEntityParser.h \
+ WebCore/html/parser/HTMLEntitySearch.cpp \
+ WebCore/html/parser/HTMLEntitySearch.h \
+ WebCore/html/parser/HTMLEntityTable.h \
+ WebCore/html/parser/HTMLFormattingElementList.cpp \
+ WebCore/html/parser/HTMLFormattingElementList.h \
+ WebCore/html/parser/HTMLParserScheduler.cpp \
+ WebCore/html/parser/HTMLParserScheduler.h \
+ WebCore/html/parser/HTMLPreloadScanner.cpp \
+ WebCore/html/parser/HTMLPreloadScanner.h \
+ WebCore/html/parser/HTMLScriptRunner.cpp \
+ WebCore/html/parser/HTMLScriptRunner.h \
+ WebCore/html/parser/HTMLScriptRunnerHost.h \
+ WebCore/html/parser/HTMLToken.h \
+ WebCore/html/parser/HTMLTokenizer.cpp \
+ WebCore/html/parser/HTMLTokenizer.h \
+ WebCore/html/parser/HTMLTreeBuilder.cpp \
+ WebCore/html/parser/HTMLTreeBuilder.h \
+ WebCore/html/parser/HTMLViewSourceParser.cpp \
+ WebCore/html/parser/HTMLViewSourceParser.h \
WebCore/html/ValidityState.cpp \
WebCore/html/ValidityState.h \
WebCore/html/VoidCallback.h \
@@ -1882,8 +1882,6 @@ webcore_sources += \
WebCore/platform/Arena.h \
WebCore/platform/AsyncFileStream.h \
WebCore/platform/AutodrainedPool.h \
- WebCore/platform/BlobItem.cpp \
- WebCore/platform/BlobItem.h \
WebCore/platform/ContentType.cpp \
WebCore/platform/ContentType.h \
WebCore/platform/ContextMenu.cpp \
@@ -2131,7 +2129,6 @@ webcore_sources += \
WebCore/platform/network/ResourceRequestBase.h \
WebCore/platform/network/ResourceResponseBase.cpp \
WebCore/platform/network/ResourceResponseBase.h \
- WebCore/platform/text/AtomicStringImpl.h \
WebCore/platform/text/Base64.cpp \
WebCore/platform/text/Base64.h \
WebCore/platform/text/BidiContext.cpp \
@@ -2152,8 +2149,6 @@ webcore_sources += \
WebCore/platform/text/StringBuffer.h \
WebCore/platform/text/StringBuilder.cpp \
WebCore/platform/text/StringBuilder.h \
- WebCore/platform/text/StringHash.h \
- WebCore/platform/text/StringImpl.h \
WebCore/platform/text/SuffixTree.h \
WebCore/platform/text/TextBoundaries.h \
WebCore/platform/text/TextBoundaries.cpp \
@@ -2271,8 +2266,10 @@ webcore_sources += \
WebCore/rendering/RenderIFrame.h \
WebCore/rendering/RenderImage.cpp \
WebCore/rendering/RenderImage.h \
- WebCore/rendering/RenderImageGeneratedContent.cpp \
- WebCore/rendering/RenderImageGeneratedContent.h \
+ WebCore/rendering/RenderImageResource.cpp \
+ WebCore/rendering/RenderImageResource.h \
+ WebCore/rendering/RenderImageResourceStyleImage.cpp \
+ WebCore/rendering/RenderImageResourceStyleImage.h \
WebCore/rendering/RenderIndicator.cpp \
WebCore/rendering/RenderIndicator.h \
WebCore/rendering/RenderInline.cpp \
@@ -2413,6 +2410,7 @@ webcore_sources += \
WebCore/rendering/style/StyleMarqueeData.h \
WebCore/rendering/style/StyleMultiColData.cpp \
WebCore/rendering/style/StyleMultiColData.h \
+ WebCore/rendering/style/StylePendingImage.h \
WebCore/rendering/style/StyleRareInheritedData.cpp \
WebCore/rendering/style/StyleRareInheritedData.h \
WebCore/rendering/style/StyleRareNonInheritedData.cpp \
@@ -2496,7 +2494,7 @@ webcoregtk_sources += \
WebCore/platform/gtk/gtkdrawing.h \
WebCore/platform/gtk/GtkPluginWidget.cpp \
WebCore/platform/gtk/GtkPluginWidget.h \
- WebCore/platform/gtk/GtkVersioning.cpp \
+ WebCore/platform/gtk/GtkVersioning.c \
WebCore/platform/gtk/GtkVersioning.h \
WebCore/platform/gtk/KeyEventGtk.cpp \
WebCore/platform/gtk/KURLGtk.cpp \
@@ -2791,7 +2789,6 @@ webcore_sources += \
WebCore/storage/DatabaseTracker.cpp \
WebCore/storage/DatabaseTracker.h \
WebCore/storage/DatabaseTrackerClient.h \
- WebCore/storage/IDBKey.h \
WebCore/storage/OriginQuotaManager.cpp \
WebCore/storage/OriginQuotaManager.h \
WebCore/storage/OriginUsageRecord.cpp \
@@ -2891,47 +2888,50 @@ webcore_sources += \
WebCore/storage/IDBAny.cpp \
WebCore/storage/IDBAny.h \
WebCore/storage/IDBCallbacks.h \
- WebCore/storage/IDBDatabase.cpp \
- WebCore/storage/IDBCursor.h \
- WebCore/storage/IDBCursor.cpp \
WebCore/storage/IDBCursorBackendImpl.cpp \
WebCore/storage/IDBCursorBackendImpl.h \
WebCore/storage/IDBCursorBackendInterface.h \
- WebCore/storage/IDBDatabase.h \
+ WebCore/storage/IDBCursor.cpp \
+ WebCore/storage/IDBCursor.h \
WebCore/storage/IDBDatabaseBackendImpl.cpp \
WebCore/storage/IDBDatabaseBackendImpl.h \
WebCore/storage/IDBDatabaseBackendInterface.h \
+ WebCore/storage/IDBDatabase.cpp \
WebCore/storage/IDBDatabaseError.h \
WebCore/storage/IDBDatabaseException.h \
+ WebCore/storage/IDBDatabase.h \
WebCore/storage/IDBErrorEvent.cpp \
WebCore/storage/IDBErrorEvent.h \
WebCore/storage/IDBEvent.cpp \
WebCore/storage/IDBEvent.h \
- WebCore/storage/IDBFactory.cpp \
- WebCore/storage/IDBFactory.h \
- WebCore/storage/IDBFactoryBackendInterface.cpp \
- WebCore/storage/IDBFactoryBackendInterface.h \
WebCore/storage/IDBFactoryBackendImpl.cpp \
WebCore/storage/IDBFactoryBackendImpl.h
- WebCore/storage/IDBIndex.cpp \
- WebCore/storage/IDBIndex.h \
- WebCore/storage/IDBIndexBackendInterface.h \
+ WebCore/storage/IDBFactoryBackendInterface.cpp \
+ WebCore/storage/IDBFactoryBackendInterface.h \
+ WebCore/storage/IDBFactory.cpp \
+ WebCore/storage/IDBFactory.h \
WebCore/storage/IDBIndexBackendImpl.cpp \
WebCore/storage/IDBIndexBackendImpl.h \
+ WebCore/storage/IDBIndexBackendInterface.h \
+ WebCore/storage/IDBIndexBackendInterface.h \
+ WebCore/storage/IDBIndex.cpp \
+ WebCore/storage/IDBIndex.h \
+ WebCore/storage/IDBKey.h \
WebCore/storage/IDBKeyRange.cpp \
WebCore/storage/IDBKeyRange.h \
- WebCore/storage/IDBObjectStore.cpp \
- WebCore/storage/IDBObjectStore.h \
WebCore/storage/IDBObjectStoreBackendImpl.cpp \
WebCore/storage/IDBObjectStoreBackendImpl.h \
WebCore/storage/IDBObjectStoreBackendInterface.h \
+ WebCore/storage/IDBObjectStoreBackendInterface.h \
+ WebCore/storage/IDBObjectStore.cpp \
+ WebCore/storage/IDBObjectStore.h \
WebCore/storage/IDBRequest.cpp \
WebCore/storage/IDBRequest.h \
WebCore/storage/IDBSuccessEvent.cpp \
WebCore/storage/IDBSuccessEvent.h \
+ WebCore/storage/IDBTransactionBackendInterface.h \
WebCore/storage/IDBTransaction.cpp \
- WebCore/storage/IDBTransaction.h \
- WebCore/storage/IDBTransactionBackendInterface.h
+ WebCore/storage/IDBTransaction.h
endif # END ENABLE_INDEXED_DATABASE
# ----
@@ -3026,29 +3026,31 @@ webcore_built_sources += \
DerivedSources/WebCore/JSMetadataCallback.h
webcore_sources += \
- WebCore/storage/DirectoryEntry.cpp \
- WebCore/storage/DirectoryEntry.h \
- WebCore/storage/DirectoryReader.cpp \
- WebCore/storage/DirectoryReader.h \
- WebCore/storage/DOMFilePath.cpp \
- WebCore/storage/DOMFilePath.h \
- WebCore/storage/DOMFileSystem.cpp \
- WebCore/storage/DOMFileSystem.h \
- WebCore/storage/EntriesCallback.h \
- WebCore/storage/Entry.cpp \
- WebCore/storage/Entry.h \
- WebCore/storage/EntryArray.cpp \
- WebCore/storage/EntryArray.h \
- WebCore/storage/EntryCallback.h \
- WebCore/storage/ErrorCallback.h \
- WebCore/storage/FileEntry.cpp \
- WebCore/storage/FileEntry.h \
- WebCore/storage/FileSystemCallback.h \
- WebCore/storage/FileSystemCallbacks.cpp \
- WebCore/storage/FileSystemCallbacks.h \
- WebCore/storage/Flags.h \
- WebCore/storage/Metadata.h \
- WebCore/storage/MetadataCallback.h
+ WebCore/fileapi/DirectoryEntry.cpp \
+ WebCore/fileapi/DirectoryEntry.h \
+ WebCore/fileapi/DirectoryReader.cpp \
+ WebCore/fileapi/DirectoryReader.h \
+ WebCore/fileapi/DOMFilePath.cpp \
+ WebCore/fileapi/DOMFilePath.h \
+ WebCore/fileapi/DOMFileSystem.cpp \
+ WebCore/fileapi/DOMFileSystem.h \
+ WebCore/fileapi/EntriesCallback.h \
+ WebCore/fileapi/Entry.cpp \
+ WebCore/fileapi/Entry.h \
+ WebCore/fileapi/EntryArray.cpp \
+ WebCore/fileapi/EntryArray.h \
+ WebCore/fileapi/EntryCallback.h \
+ WebCore/fileapi/ErrorCallback.h \
+ WebCore/fileapi/FileEntry.cpp \
+ WebCore/fileapi/FileEntry.h \
+ WebCore/fileapi/FileSystemCallback.h \
+ WebCore/fileapi/FileSystemCallbacks.cpp \
+ WebCore/fileapi/FileSystemCallbacks.h \
+ WebCore/fileapi/Flags.h \
+ WebCore/fileapi/LocalFileSystem.cpp \
+ WebCore/fileapi/LocalFileSystem.h \
+ WebCore/fileapi/Metadata.h \
+ WebCore/fileapi/MetadataCallback.h
endif # END ENABLE_FILE_SYSTEM
@@ -4441,6 +4443,17 @@ endif # END ENABLE_BLOB
if ENABLE_FILE_WRITER
FEATURE_DEFINES += ENABLE_FILE_WRITER=1
webcore_cppflags += -DENABLE_FILE_WRITER=1
+
+webcore_built_sources += \
+ DerivedSources/WebCore/JSFileWriter.cpp \
+ DerivedSources/WebCore/JSFileWriter.h
+
+webcore_sources += \
+ WebCore/fileapi/AsyncFileWriter.h \
+ WebCore/fileapi/FileWriterClient.h \
+ WebCore/fileapi/FileWriter.cpp \
+ WebCore/fileapi/FileWriter.h
+
endif # END ENABLE_FILE_WRITER
DerivedSources/WebCore/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/makeprop.pl
@@ -4461,8 +4474,8 @@ DerivedSources/WebCore/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf
$(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES_WEBCORE) $(WebCore)/html/DocTypeStrings.gperf
# HTML entity names
-DerivedSources/WebCore/HTMLEntityTable.cpp : $(WebCore)/html/HTMLEntityNames.json $(WebCore)/../WebKitTools/Scripts/create-html-entity-table
- $(PYTHON) $(WebCore)/../WebKitTools/Scripts/create-html-entity-table -o $(GENSOURCES_WEBCORE)/HTMLEntityTable.cpp $(WebCore)/html/HTMLEntityNames.json
+DerivedSources/WebCore/HTMLEntityTable.cpp : $(WebCore)/html/parser/HTMLEntityNames.in $(WebCore)/html/parser/create-html-entity-table
+ $(PYTHON) $(WebCore)/html/parser/create-html-entity-table -o $(GENSOURCES_WEBCORE)/HTMLEntityTable.cpp $(WebCore)/html/parser/HTMLEntityNames.in
# color names
DerivedSources/WebCore/ColorData.cpp: $(WebCore)/platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
@@ -4536,18 +4549,19 @@ IDL_PATH := \
$(WebCore)/bindings/js \
$(WebCore)/css \
$(WebCore)/dom \
+ $(WebCore)/fileapi \
$(WebCore)/html \
$(WebCore)/html/canvas \
$(WebCore)/inspector \
$(WebCore)/loader/appcache \
$(WebCore)/notifications \
$(WebCore)/page \
+ $(WebCore)/plugins \
$(WebCore)/storage \
$(WebCore)/svg \
- $(WebCore)/xml \
- $(WebCore)/plugins \
$(WebCore)/websockets \
- $(WebCore)/workers
+ $(WebCore)/workers \
+ $(WebCore)/xml
vpath %.idl = $(IDL_PATH)
@@ -4560,6 +4574,7 @@ DerivedSources/WebCore/JS%.cpp: %.idl $(SCRIPTS_BINDINGS) $(WebCore)/bindings/sc
EXTRA_DIST += \
$(shell ls $(srcdir)/WebCore/css/*.idl) \
$(shell ls $(srcdir)/WebCore/dom/*.idl) \
+ $(shell ls $(srcdir)/WebCore/fileapi/*.idl) \
$(shell ls $(srcdir)/WebCore/html/canvas/*.idl) \
$(shell ls $(srcdir)/WebCore/html/*.idl) \
$(shell ls $(srcdir)/WebCore/inspector/*.idl) \
@@ -4603,8 +4618,9 @@ EXTRA_DIST += \
WebCore/dom/make_names.pl \
WebCore/html/DocTypeStrings.gperf \
WebCore/html/HTMLAttributeNames.in \
- WebCore/html/HTMLEntityNames.gperf \
WebCore/html/HTMLTagNames.in \
+ WebCore/html/parser/create-html-entity-table \
+ WebCore/html/parser/HTMLEntityNames.in \
WebCore/icu/LICENSE \
WebCore/inspector/CodeGeneratorInspector.pm \
WebCore/LICENSE-APPLE \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index e1b7c22..e8b4fe7 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -578,11 +578,10 @@ __ZN7WebCore5Cache13getStatisticsEv
__ZN7WebCore5Cache13setCapacitiesEjjj
__ZN7WebCore5Frame10createViewERKNS_7IntSizeERKNS_5ColorEbS3_bNS_13ScrollbarModeEbS7_b
__ZN7WebCore5Frame10findStringERKN3WTF6StringEbbbb
-__ZN7WebCore5Frame13reapplyStylesEv
__ZN7WebCore5Frame14frameForWidgetEPKNS_6WidgetE
__ZN7WebCore5Frame15revealSelectionERKNS_15ScrollAlignmentEb
+__ZN7WebCore5Frame19countMatchesForTextERKN3WTF6StringEbjb
__ZN7WebCore5Frame20setSelectionFromNoneEv
-__ZN7WebCore5Frame21markAllMatchesForTextERKN3WTF6StringEbj
__ZN7WebCore5Frame23visiblePositionForPointERKNS_8IntPointE
__ZN7WebCore5Frame24computeAndSetTypingStyleEPNS_19CSSStyleDeclarationENS_10EditActionE
__ZN7WebCore5Frame25matchLabelsAgainstElementEP7NSArrayPNS_7ElementE
@@ -621,6 +620,7 @@ __ZN7WebCore6Editor21applyStyleToSelectionEPNS_19CSSStyleDeclarationENS_10EditAc
__ZN7WebCore6Editor21isSelectionMisspelledEv
__ZN7WebCore6Editor23setBaseWritingDirectionENS_16WritingDirectionE
__ZN7WebCore6Editor24advanceToNextMisspellingEb
+__ZN7WebCore6Editor24handleRejectedCorrectionEv
__ZN7WebCore6Editor24isSelectionUngrammaticalEv
__ZN7WebCore6Editor26decreaseSelectionListLevelEv
__ZN7WebCore6Editor26increaseSelectionListLevelEv
@@ -676,6 +676,8 @@ __ZN7WebCore8Document24setShouldCreateRenderersEb
__ZN7WebCore8Document26pageSizeAndMarginsInPixelsEiRNS_7IntSizeERiS3_S3_S3_
__ZN7WebCore8Document27removeMediaCanStartListenerEPNS_21MediaCanStartListenerE
__ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv
+__ZN7WebCore8Document25scheduleForcedStyleRecalcEv
+__ZN7WebCore8Document20styleSelectorChangedENS_23StyleSelectorUpdateFlagE
__ZN7WebCore8Document4headEv
__ZN7WebCore8FormData6createEPKvm
__ZN7WebCore8FormDataD1Ev
@@ -733,7 +735,7 @@ __ZN7WebCore8Settings31setShrinksStandaloneImagesToFitEb
__ZN7WebCore8Settings32setAcceleratedCompositingEnabledEb
__ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb
__ZN7WebCore8Settings33setDownloadableBinaryFontsEnabledEb
-__ZN7WebCore8Settings33setEnforceCSSMIMETypeInStrictModeEb
+__ZN7WebCore8Settings35setEnforceCSSMIMETypeInNoQuirksModeEb
__ZN7WebCore8Settings34setLocalFileContentSniffingEnabledEb
__ZN7WebCore8Settings35setAllowUniversalAccessFromFileURLsEb
__ZN7WebCore8Settings35setExperimentalNotificationsEnabledEb
@@ -769,8 +771,8 @@ __ZN7WebCore9FrameView18updateControlTintsEv
__ZN7WebCore9FrameView20enterCompositingModeEv
__ZN7WebCore9FrameView21flushDeferredRepaintsEv
__ZN7WebCore9FrameView22setBaseBackgroundColorENS_5ColorE
-__ZN7WebCore9FrameView23layoutIfNeededRecursiveEv
__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
+__ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
__ZN7WebCore9FrameView24forceLayoutForPaginationERKNS_9FloatSizeEfNS_5Frame19AdjustViewSizeOrNotE
__ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
__ZN7WebCore9FrameView29syncCompositingStateRecursiveEv
@@ -849,6 +851,7 @@ __ZNK7WebCore10RenderText9firstRunYEv
__ZNK7WebCore10ScrollView12documentViewEv
__ZNK7WebCore10ScrollView14scrollbarModesERNS_13ScrollbarModeES2_
__ZNK7WebCore10ScrollView16contentsToWindowERKNS_7IntRectE
+__ZNK7WebCore10ScrollView16contentsToWindowERKNS_8IntPointE
__ZNK7WebCore10ScrollView18visibleContentRectEb
__ZNK7WebCore11CachedImage5imageEv
__ZNK7WebCore11FrameLoader10isCompleteEv
@@ -1109,6 +1112,7 @@ _wkNoteOpenPanelFiles
_wkPopupMenu
_wkQTIncludeOnlyModernMediaFileTypes
_wkQTMovieDataRate
+_wkQTMovieDisableComponent
_wkQTMovieGetType
_wkQTMovieHasClosedCaptions
_wkQTMovieMaxTimeLoaded
@@ -1287,7 +1291,6 @@ __ZN3JSC8Bindings8InstanceD2Ev
__ZN7WebCore13IdentifierRep7isValidEPS0_
__ZN7WebCore16ScriptController16createRootObjectEPv
__ZNK3JSC8Bindings13RuntimeObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
-__ZNK7WebCore10ScrollView16contentsToWindowERKNS_8IntPointE
__ZTVN3JSC13RuntimeMethodE
#endif
@@ -1475,6 +1478,13 @@ __ZN7WebCore9HTMLNames8audioTagE
__ZN7WebCore9HTMLNames8videoTagE
#endif
+#if ENABLE(FULLSCREEN_API)
+__ZN7WebCore8Document33webkitDidExitFullScreenForElementEPNS_7ElementE
+__ZN7WebCore8Document34webkitDidEnterFullScreenForElementEPNS_7ElementE
+__ZN7WebCore8Document34webkitWillExitFullScreenForElementEPNS_7ElementE
+__ZN7WebCore8Document35webkitWillEnterFullScreenForElementEPNS_7ElementE
+#endif
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
__ZN7WebCore23ApplicationCacheStorage14quotaForOriginEPKNS_14SecurityOriginERx
__ZN7WebCore23ApplicationCacheStorage14setMaximumSizeEx
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index c625f5f..595034e 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -119,9 +119,11 @@
'../dom',
'../dom/default',
'../editing',
+ '../fileapi',
'../history',
'../html',
'../html/canvas',
+ '../html/parser',
'../inspector',
'../loader',
'../loader/appcache',
@@ -138,6 +140,7 @@
'../platform/graphics',
'../platform/graphics/chromium',
'../platform/graphics/filters',
+ '../platform/graphics/gpu',
'../platform/graphics/opentype',
'../platform/graphics/skia',
'../platform/graphics/transforms',
@@ -203,11 +206,10 @@
# FIXME: I don't know why these are excluded, either.
# Someone (me?) should figure it out and add appropriate comments.
'../css/CSSUnknownRule.idl',
-
- '../dom/DOMStringMap.idl',
],
'conditions': [
+ # TODO(maruel): Move it in its own project or generate it anyway?
['enable_svg!=0', {
'bindings_idl_files': [
'<@(webcore_svg_bindings_idl_files)',
@@ -215,22 +217,23 @@
}],
['OS=="mac"', {
'webcore_include_dirs+': [
- # platform/graphics/cg and mac needs to come before
+ # platform/graphics/cg and cocoa need to come before
# platform/graphics/chromium so that the Mac build picks up the
# version of ImageBufferData.h in the cg directory and
- # FontPlatformData.h in the mac directory. The + prepends this
+ # FontPlatformData.h in the cocoa directory. The + prepends this
# directory to the list.
# FIXME: This shouldn't need to be prepended.
- # FIXME: Eliminate dependency on platform/graphics/mac and
- # related directories.
- # platform/graphics/cg may need to stick around, though.
- '../platform/graphics/mac',
+ '../platform/graphics/cocoa',
'../platform/graphics/cg',
],
'webcore_include_dirs': [
# FIXME: Eliminate dependency on platform/mac and related
# directories.
+ # FIXME: Eliminate dependency on platform/graphics/mac and
+ # related directories.
+ # platform/graphics/cg may need to stick around, though.
'../loader/archive/cf',
+ '../platform/graphics/mac',
'../platform/mac',
'../platform/text/mac',
],
@@ -324,15 +327,28 @@
'../html/DocTypeStrings.gperf',
'../platform/ColorData.gperf',
- # json rule
- '../html/HTMLEntityNames.json',
-
# idl rules
'<@(bindings_idl_files)',
],
'actions': [
# Actions to build derived sources.
{
+ 'action_name': 'HTMLEntityTable',
+ 'inputs': [
+ '../html/parser/HTMLEntityNames.in',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp'
+ ],
+ 'action': [
+ 'python',
+ '../html/parser/create-html-entity-table',
+ '-o',
+ '<@(_outputs)',
+ '<@(_inputs)'
+ ],
+ },
+ {
'action_name': 'CSSPropertyNames',
'inputs': [
'../css/makeprop.pl',
@@ -350,6 +366,7 @@
'<@(_inputs)'
],
'conditions': [
+ # TODO(maruel): Move it in its own project or generate it anyway?
['enable_svg!=0', {
'inputs': [
'../css/SVGCSSPropertyNames.in',
@@ -375,6 +392,7 @@
'<@(_inputs)'
],
'conditions': [
+ # TODO(maruel): Move it in its own project or generate it anyway?
['enable_svg!=0', {
'inputs': [
'../css/SVGCSSValueKeywords.in',
@@ -623,26 +641,6 @@
],
'process_outputs_as_sources': 0,
},
- {
- 'rule_name': 'json',
- 'extension': 'json',
- #
- # json outputs are generated by WebKitTools/Scripts/create-html-entity-table
- #
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
- ],
- 'inputs': [
- '../../WebKitTools/Scripts/create-html-entity-table',
- ],
- 'action': [
- 'python',
- '../../WebKitTools/Scripts/create-html-entity-table',
- '-o',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
- '<(RULE_INPUT_PATH)',
- ],
- },
# Rule to build generated JavaScript (V8) bindings from .idl source.
{
'rule_name': 'binding',
@@ -665,6 +663,7 @@
'generator_include_dirs': [
'--include', '../css',
'--include', '../dom',
+ '--include', '../fileapi',
'--include', '../html',
'--include', '../notifications',
'--include', '../page',
@@ -749,7 +748,7 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
- # Generated from HTMLEntityNames.json
+ # Generated from HTMLEntityNames.in
'<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
# Additional .cpp files from the webcore_bindings_sources rules.
@@ -773,6 +772,7 @@
}],
],
}],
+ # TODO(maruel): Move it in its own project or generate it anyway?
['enable_svg!=0', {
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
@@ -809,9 +809,10 @@
],
},
{
- 'target_name': 'webcore',
- 'type': '<(library)',
- 'msvs_guid': '1C16337B-ACF3-4D03-AA90-851C5B5EADA6',
+ # We'll soon split libwebcore in multiple smaller libraries.
+ # webcore_prerequisites will be the 'base' target of every sub-target.
+ 'target_name': 'webcore_prerequisites',
+ 'type': 'none',
'dependencies': [
'webcore_bindings',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
@@ -827,15 +828,178 @@
'<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
'<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_common',
],
- 'defines': [
- 'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
+ 'export_dependent_settings': [
+ 'webcore_bindings',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/skia/skia.gyp:skia',
+ '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
+ '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
+ '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
+ '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
+ '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
+ '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
+ '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
+ '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_common',
],
- 'include_dirs': [
- '<(INTERMEDIATE_DIR)',
- '<@(webcore_include_dirs)',
- '<(chromium_src_dir)/gpu',
- '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
+ # This is needed for mac because of webkit_system_interface. It'd be nice
+ # if this hard dependency could be split off the rest.
+ 'hard_dependency': 1,
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
+ ],
+ 'include_dirs': [
+ '<(INTERMEDIATE_DIR)',
+ '<@(webcore_include_dirs)',
+ '<(chromium_src_dir)/gpu',
+ '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
+ ],
+ 'mac_framework_dirs': [
+ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
+ ],
+ 'msvs_disabled_warnings': [
+ 4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
+ ],
+ 'scons_line_length' : 1,
+ 'xcode_settings': {
+ # Some Mac-specific parts of WebKit won't compile without having this
+ # prefix header injected.
+ # FIXME: make this a first-class setting.
+ 'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
+ },
+ },
+ 'conditions': [
+ ['javascript_engine=="v8"', {
+ 'dependencies': [
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ 'export_dependent_settings': [
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ 'conditions': [
+ ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
+ 'defines': [
+ 'USING_V8_SHARED',
+ ],
+ }],
+ ],
+ }],
+ ['use_accelerated_compositing==1', {
+ 'dependencies': [
+ '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
+ ],
+ 'export_dependent_settings': [
+ '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
+ ],
+ }],
+ ['OS=="linux" or OS=="freebsd"', {
+ 'dependencies': [
+ '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
+ '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+ ],
+ 'export_dependent_settings': [
+ '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
+ '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+ ],
+ 'cflags': [
+ # WebCore does not work with strict aliasing enabled.
+ # https://bugs.webkit.org/show_bug.cgi?id=25864
+ '-fno-strict-aliasing',
+ ],
+ }],
+ ['OS=="linux"', {
+ 'defines': [
+ # Mozilla on Linux effectively uses uname -sm, but when running
+ # 32-bit x86 code on an x86_64 processor, it uses
+ # "Linux i686 (x86_64)". Matching that would require making a
+ # run-time determination.
+ 'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'dependencies': [
+ 'webkit_system_interface',
+ ],
+ 'export_dependent_settings': [
+ 'webkit_system_interface',
+ ],
+ 'defines': [
+ # Match Safari and Mozilla on Mac x86.
+ 'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
+
+ # Chromium's version of WebCore includes the following Objective-C
+ # classes. The system-provided WebCore framework may also provide
+ # these classes. Because of the nature of Objective-C binding
+ # (dynamically at runtime), it's possible for the Chromium-provided
+ # versions to interfere with the system-provided versions. This may
+ # happen when a system framework attempts to use WebCore.framework,
+ # such as when converting an HTML-flavored string to an
+ # NSAttributedString. The solution is to force Objective-C class
+ # names that would conflict to use alternate names.
+
+ # FIXME: This list will hopefully shrink but may also grow.
+ # Periodically run:
+ # nm libwebcore.a | grep -E '[atsATS] ([+-]\[|\.objc_class_name)'
+ # and make sure that everything listed there has the alternate
+ # ChromiumWebCoreObjC name, and that nothing extraneous is listed
+ # here. If all Objective-C can be eliminated from Chromium's WebCore
+ # library, these defines should be removed entirely.
+ 'ScrollbarPrefsObserver=ChromiumWebCoreObjCScrollbarPrefsObserver',
+ 'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
+ 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
+ ],
+ 'include_dirs': [
+ '../../WebKitLibraries',
+ ],
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ '<(chromium_src_dir)/build/win/system.gyp:cygwin'
+ ],
+ 'export_dependent_settings': [
+ '<(chromium_src_dir)/build/win/system.gyp:cygwin'
+ ],
+ 'defines': [
+ # Match Safari and Mozilla on Windows.
+ 'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
+ '__PRETTY_FUNCTION__=__FUNCTION__',
+ ],
+ # This is needed because Event.h in this directory is blocked
+ # by a system header on windows.
+ 'include_dirs++': ['../dom'],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'webcore_svg',
+ 'type': '<(library)',
+ 'dependencies': [
+ 'webcore_prerequisites',
+ ],
+ 'sources': [
+ '<@(webcore_files)',
+ ],
+ 'sources/': [
+ ['exclude', '.*'],
+ ['include', 'svg/'],
+ ['include', 'css/svg/'],
+ ['include', 'rendering/style/SVG'],
+ ['include', 'rendering/RenderSVG'],
+ ['include', 'rendering/SVG'],
+ ['exclude', 'svg/SVGAllInOne\\.cpp$'],
+ ],
+ },
+ {
+ 'target_name': 'webcore_remaining',
+ 'type': '<(library)',
+ 'dependencies': [
+ 'webcore_prerequisites',
],
+ # This is needed for mac because of webkit_system_interface. It'd be nice
+ # if this hard dependency could be split off the rest.
+ 'hard_dependency': 1,
'sources': [
'<@(webcore_files)',
@@ -872,6 +1036,13 @@
['exclude', 'storage/OriginUsageRecord.cpp'],
['exclude', 'storage/OriginUsageRecord.h'],
['exclude', 'storage/SQLTransactionClient.cpp'],
+
+ # Exclude SVG.
+ ['exclude', 'svg/'],
+ ['exclude', 'css/svg/'],
+ ['exclude', 'rendering/style/SVG'],
+ ['exclude', 'rendering/RenderSVG'],
+ ['exclude', 'rendering/SVG'],
],
'sources!': [
# A few things can't be excluded by patterns. List them individually.
@@ -928,21 +1099,6 @@
'../dom/default/PlatformMessagePortChannel.h',
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<@(webcore_include_dirs)',
- ],
- 'mac_framework_dirs': [
- '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
- ],
- },
- 'export_dependent_settings': [
- 'webcore_bindings',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
- '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
- '<(chromium_src_dir)/skia/skia.gyp:skia',
- '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
- ],
'link_settings': {
'mac_bundle_resources': [
'../Resources/aliasCursor.png',
@@ -976,60 +1132,8 @@
'../Resources/zoomOutCursor.png',
],
},
- 'hard_dependency': 1,
- 'mac_framework_dirs': [
- '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
- ],
- 'msvs_disabled_warnings': [
- 4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
- ],
- 'scons_line_length' : 1,
- 'xcode_settings': {
- # Some Mac-specific parts of WebKit won't compile without having this
- # prefix header injected.
- # FIXME: make this a first-class setting.
- 'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
- },
'conditions': [
- ['javascript_engine=="v8"', {
- 'dependencies': [
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
- ],
- 'export_dependent_settings': [
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
- ],
- 'conditions': [
- ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
- 'defines': [
- 'USING_V8_SHARED',
- ],
- }],
- ],
- }],
- ['enable_svg!=0', {
- 'sources/': [
- ['exclude', 'svg/[^/]+\\.cpp$'],
- ['include', 'svg/SVGAllInOne\\.cpp$'],
- ],
- }, { # svg disabled
- 'sources/': [
- ['exclude', 'svg/'],
- ['exclude', 'css/svg/'],
- ['exclude', 'rendering/style/SVG'],
- ['exclude', 'rendering/RenderSVG'],
- ['exclude', 'rendering/SVG'],
- ],
- }],
- ['use_accelerated_compositing==1', {
- 'dependencies': [
- '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
- ],
- }],
['OS=="linux" or OS=="freebsd"', {
- 'dependencies': [
- '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
- '<(chromium_src_dir)/build/linux/system.gyp:gtk',
- ],
'sources': [
'../platform/graphics/chromium/VDMXParser.cpp',
'../platform/graphics/chromium/HarfbuzzSkia.cpp',
@@ -1043,50 +1147,15 @@
['include', 'platform/graphics/chromium/GlyphPageTreeNodeLinux\\.cpp$'],
['include', 'platform/graphics/chromium/SimpleFontDataLinux\\.cpp$'],
],
- 'cflags': [
- # WebCore does not work with strict aliasing enabled.
- # https://bugs.webkit.org/show_bug.cgi?id=25864
- '-fno-strict-aliasing',
- ],
- }],
- ['OS=="linux"', {
- 'defines': [
- # Mozilla on Linux effectively uses uname -sm, but when running
- # 32-bit x86 code on an x86_64 processor, it uses
- # "Linux i686 (x86_64)". Matching that would require making a
- # run-time determination.
- 'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
- ],
}],
['OS=="mac"', {
+ # Necessary for Mac .mm stuff.
+ 'include_dirs': [
+ '../../WebKitLibraries',
+ ],
'dependencies': [
'webkit_system_interface',
],
- 'defines': [
- # Match Safari and Mozilla on Mac x86.
- 'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
-
- # Chromium's version of WebCore includes the following Objective-C
- # classes. The system-provided WebCore framework may also provide
- # these classes. Because of the nature of Objective-C binding
- # (dynamically at runtime), it's possible for the Chromium-provided
- # versions to interfere with the system-provided versions. This may
- # happen when a system framework attempts to use WebCore.framework,
- # such as when converting an HTML-flavored string to an
- # NSAttributedString. The solution is to force Objective-C class
- # names that would conflict to use alternate names.
-
- # FIXME: This list will hopefully shrink but may also grow.
- # Periodically run:
- # nm libwebcore.a | grep -E '[atsATS] ([+-]\[|\.objc_class_name)'
- # and make sure that everything listed there has the alternate
- # ChromiumWebCoreObjC name, and that nothing extraneous is listed
- # here. If all Objective-C can be eliminated from Chromium's WebCore
- # library, these defines should be removed entirely.
- 'ScrollbarPrefsObserver=ChromiumWebCoreObjCScrollbarPrefsObserver',
- 'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
- 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
- ],
'actions': [
{
# Allow framework-style #include of
@@ -1101,9 +1170,6 @@
'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
},
],
- 'include_dirs': [
- '../../WebKitLibraries',
- ],
'sources/': [
# Additional files from the WebCore Mac build that are presently
# used in the WebCore Chromium Mac build too.
@@ -1208,34 +1274,14 @@
# Again, Skia is not used on Mac.
'../platform/chromium/DragImageChromiumSkia.cpp',
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../../WebKitLibraries',
- '../../WebKit/mac/WebCoreSupport',
- ],
- },
}],
['OS=="win"', {
- 'dependencies': [
- '<(chromium_src_dir)/build/win/system.gyp:cygwin'
- ],
'sources/': [
['exclude', 'Posix\\.cpp$'],
['include', '/opentype/'],
- ['include', '/TransparencyWin\\.cpp$'],
['include', '/SkiaFontWin\\.cpp$'],
+ ['include', '/TransparencyWin\\.cpp$'],
],
- 'defines': [
- # Match Safari and Mozilla on Windows.
- 'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
- '__PRETTY_FUNCTION__=__FUNCTION__',
- ],
- # This is needed because Event.h in this directory is blocked
- # by a system header on windows.
- 'include_dirs++': ['../dom'],
- 'direct_dependent_settings': {
- 'include_dirs+++': ['../dom'],
- },
}],
['OS!="linux" and OS!="freebsd"', {
'sources/': [['exclude', '(Gtk|Linux)\\.cpp$']]
@@ -1249,13 +1295,62 @@
['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
],
}],
- ['OS!="win" and remove_webcore_debug_symbols==1', {
- 'configurations': {
- 'Debug': {
- 'cflags!': ['-g'],
- }
+ ],
+ },
+ {
+ 'target_name': 'webcore',
+ 'type': 'none',
+ 'dependencies': [
+ 'webcore_remaining',
+ # Exported.
+ 'webcore_bindings',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/skia/skia.gyp:skia',
+ '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
+ ],
+ 'export_dependent_settings': [
+ 'webcore_bindings',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/skia/skia.gyp:skia',
+ '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<@(webcore_include_dirs)',
+ ],
+ 'mac_framework_dirs': [
+ '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
+ ],
+ },
+ 'conditions': [
+ ['javascript_engine=="v8"', {
+ 'dependencies': [
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ 'export_dependent_settings': [
+ '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../../WebKitLibraries',
+ '../../WebKit/mac/WebCoreSupport',
+ ],
},
}],
+ ['OS=="win"', {
+ 'direct_dependent_settings': {
+ 'include_dirs+++': ['../dom'],
+ },
+ }],
+ ['enable_svg!=0', {
+ 'dependencies': [
+ 'webcore_svg',
+ ],
+ }],
],
},
], # targets
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 0f15977..89f4202 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -85,40 +85,31 @@
'dom/WebKitAnimationEvent.idl',
'dom/WebKitTransitionEvent.idl',
'dom/WheelEvent.idl',
- 'html/Blob.idl',
- 'html/BlobBuilder.idl',
- 'html/canvas/WebGLActiveInfo.idl',
- 'html/canvas/ArrayBufferView.idl',
- 'html/canvas/ArrayBuffer.idl',
- 'html/canvas/WebGLBuffer.idl',
- 'html/canvas/Int8Array.idl',
- 'html/canvas/WebGLContextAttributes.idl',
- 'html/canvas/Float32Array.idl',
- 'html/canvas/WebGLFramebuffer.idl',
- 'html/canvas/CanvasGradient.idl',
- 'html/canvas/Int32Array.idl',
- 'html/canvas/CanvasPattern.idl',
- 'html/canvas/CanvasPixelArray.idl',
- 'html/canvas/WebGLProgram.idl',
- 'html/canvas/WebGLRenderbuffer.idl',
- 'html/canvas/CanvasRenderingContext.idl',
- 'html/canvas/CanvasRenderingContext2D.idl',
- 'html/canvas/WebGLRenderingContext.idl',
- 'html/canvas/WebGLShader.idl',
- 'html/canvas/Int16Array.idl',
- 'html/canvas/WebGLUniformLocation.idl',
- 'html/canvas/Uint8Array.idl',
- 'html/canvas/Uint32Array.idl',
- 'html/canvas/Uint16Array.idl',
- 'html/canvas/WebGLTexture.idl',
+ 'fileapi/Blob.idl',
+ 'fileapi/BlobBuilder.idl',
+ 'fileapi/DirectoryEntry.idl',
+ 'fileapi/DirectoryReader.idl',
+ 'fileapi/DOMFileSystem.idl',
+ 'fileapi/EntriesCallback.idl',
+ 'fileapi/Entry.idl',
+ 'fileapi/EntryArray.idl',
+ 'fileapi/EntryCallback.idl',
+ 'fileapi/ErrorCallback.idl',
+ 'fileapi/File.idl',
+ 'fileapi/FileEntry.idl',
+ 'fileapi/FileError.idl',
+ 'fileapi/FileException.idl',
+ 'fileapi/FileList.idl',
+ 'fileapi/FileReader.idl',
+ 'fileapi/FileReaderSync.idl',
+ 'fileapi/FileSystemCallback.idl',
+ 'fileapi/FileWriter.idl',
+ 'fileapi/Flags.idl',
+ 'fileapi/Metadata.idl',
+ 'fileapi/MetadataCallback.idl',
+ 'html/DOMFormData.idl',
'html/DataGridColumn.idl',
'html/DataGridColumnList.idl',
- 'html/DOMFormData.idl',
- 'html/File.idl',
- 'html/FileError.idl',
- 'html/FileList.idl',
- 'html/FileReader.idl',
- 'html/FileWriter.idl',
'html/HTMLAllCollection.idl',
'html/HTMLAnchorElement.idl',
'html/HTMLAppletElement.idl',
@@ -197,6 +188,30 @@
'html/TimeRanges.idl',
'html/ValidityState.idl',
'html/VoidCallback.idl',
+ 'html/canvas/ArrayBuffer.idl',
+ 'html/canvas/ArrayBufferView.idl',
+ 'html/canvas/CanvasGradient.idl',
+ 'html/canvas/CanvasPattern.idl',
+ 'html/canvas/CanvasPixelArray.idl',
+ 'html/canvas/CanvasRenderingContext.idl',
+ 'html/canvas/CanvasRenderingContext2D.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/WebGLActiveInfo.idl',
+ 'html/canvas/WebGLBuffer.idl',
+ 'html/canvas/WebGLContextAttributes.idl',
+ 'html/canvas/WebGLFramebuffer.idl',
+ 'html/canvas/WebGLProgram.idl',
+ 'html/canvas/WebGLRenderbuffer.idl',
+ 'html/canvas/WebGLRenderingContext.idl',
+ 'html/canvas/WebGLShader.idl',
+ 'html/canvas/WebGLTexture.idl',
+ 'html/canvas/WebGLUniformLocation.idl',
'inspector/InjectedScriptHost.idl',
'inspector/InspectorFrontendHost.idl',
'inspector/JavaScriptCallFrame.idl',
@@ -232,17 +247,6 @@
'storage/Database.idl',
'storage/DatabaseCallback.idl',
'storage/DatabaseSync.idl',
- 'storage/DirectoryEntry.idl',
- 'storage/DirectoryReader.idl',
- 'storage/DOMFileSystem.idl',
- 'storage/EntriesCallback.idl',
- 'storage/Entry.idl',
- 'storage/EntryArray.idl',
- 'storage/EntryCallback.idl',
- 'storage/ErrorCallback.idl',
- 'storage/FileEntry.idl',
- 'storage/FileSystemCallback.idl',
- 'storage/Flags.idl',
'storage/IDBAny.idl',
'storage/IDBCursor.idl',
'storage/IDBDatabaseError.idl',
@@ -258,8 +262,6 @@
'storage/IDBRequest.idl',
'storage/IDBSuccessEvent.idl',
'storage/IDBTransaction.idl',
- 'storage/Metadata.idl',
- 'storage/MetadataCallback.idl',
'storage/SQLError.idl',
'storage/SQLException.idl',
'storage/SQLResultSet.idl',
@@ -752,6 +754,7 @@
'bindings/v8/custom/V8DeviceOrientationEventCustom.cpp',
'bindings/v8/custom/V8DocumentLocationCustom.cpp',
'bindings/v8/custom/V8DOMFormDataCustom.cpp',
+ 'bindings/v8/custom/V8DOMStringMapCustom.cpp',
'bindings/v8/custom/V8DOMWindowCustom.cpp',
'bindings/v8/custom/V8DocumentCustom.cpp',
'bindings/v8/custom/V8ElementCustom.cpp',
@@ -854,6 +857,8 @@
'bindings/v8/ScriptFunctionCall.h',
'bindings/v8/ScriptGCEvent.cpp',
'bindings/v8/ScriptGCEvent.h',
+ 'bindings/v8/ScriptHeapSnapshot.cpp',
+ 'bindings/v8/ScriptHeapSnapshot.h',
'bindings/v8/ScriptInstance.cpp',
'bindings/v8/ScriptInstance.h',
'bindings/v8/ScriptObject.cpp',
@@ -1417,6 +1422,57 @@
'editing/markup.h',
'editing/visible_units.cpp',
'editing/visible_units.h',
+ 'fileapi/AsyncFileWriter.h',
+ 'fileapi/Blob.cpp',
+ 'fileapi/Blob.h',
+ 'fileapi/BlobBuilder.cpp',
+ 'fileapi/BlobBuilder.h',
+ 'fileapi/BlobURL.cpp',
+ 'fileapi/BlobURL.h',
+ 'fileapi/DirectoryEntry.cpp',
+ 'fileapi/DirectoryEntry.h',
+ 'fileapi/DirectoryReader.cpp',
+ 'fileapi/DirectoryReader.h',
+ 'fileapi/DOMFilePath.cpp',
+ 'fileapi/DOMFilePath.h',
+ 'fileapi/DOMFileSystem.cpp',
+ 'fileapi/DOMFileSystem.h',
+ 'fileapi/EntriesCallback.h',
+ 'fileapi/Entry.cpp',
+ 'fileapi/Entry.h',
+ 'fileapi/EntryArray.cpp',
+ 'fileapi/EntryArray.h',
+ 'fileapi/EntryCallback.h',
+ 'fileapi/ErrorCallback.h',
+ 'fileapi/File.cpp',
+ 'fileapi/File.h',
+ 'fileapi/FileEntry.cpp',
+ 'fileapi/FileEntry.h',
+ 'fileapi/FileError.h',
+ 'fileapi/FileException.h',
+ 'fileapi/FileList.cpp',
+ 'fileapi/FileList.h',
+ 'fileapi/FileReader.cpp',
+ 'fileapi/FileReader.h',
+ 'fileapi/FileReaderSync.cpp',
+ 'fileapi/FileReaderSync.h',
+ 'fileapi/FileStreamProxy.cpp',
+ 'fileapi/FileStreamProxy.h',
+ 'fileapi/FileSystemCallback.h',
+ 'fileapi/FileSystemCallbacks.cpp',
+ 'fileapi/FileSystemCallbacks.h',
+ 'fileapi/FileThread.cpp',
+ 'fileapi/FileThread.h',
+ 'fileapi/FileThreadTask.h',
+ 'fileapi/FileWriter.cpp',
+ 'fileapi/FileWriter.h',
+ 'fileapi/FileWriterClient.h',
+ 'fileapi/Flags.h',
+ 'fileapi/LocalFileSystem.h',
+ 'fileapi/Metadata.h',
+ 'fileapi/MetadataCallback.h',
+ 'fileapi/ThreadableBlobRegistry.cpp',
+ 'fileapi/ThreadableBlobRegistry.h',
'history/mac/HistoryItemMac.mm',
'history/BackForwardController.cpp',
'history/BackForwardController.h',
@@ -1436,112 +1492,21 @@
'history/PageCache.h',
'html/AsyncImageResizer.cpp',
'html/AsyncImageResizer.h',
- 'html/Blob.cpp',
- 'html/Blob.h',
- 'html/BlobBuilder.cpp',
- 'html/BlobBuilder.h',
- 'html/BlobURL.cpp',
- 'html/BlobURL.h',
- 'html/canvas/ArrayBufferView.cpp',
- 'html/canvas/ArrayBufferView.h',
- 'html/canvas/ArrayBuffer.cpp',
- 'html/canvas/ArrayBuffer.h',
- 'html/canvas/WebGLBuffer.cpp',
- 'html/canvas/WebGLBuffer.h',
- 'html/canvas/Int8Array.cpp',
- 'html/canvas/Int8Array.h',
- 'html/canvas/WebGLContextAttributes.cpp',
- 'html/canvas/WebGLContextAttributes.h',
- 'html/canvas/Float32Array.cpp',
- 'html/canvas/Float32Array.h',
- 'html/canvas/WebGLFramebuffer.cpp',
- 'html/canvas/WebGLFramebuffer.h',
- 'html/canvas/WebGLGetInfo.cpp',
- 'html/canvas/WebGLGetInfo.h',
- 'html/canvas/CanvasContextAttributes.cpp',
- 'html/canvas/CanvasContextAttributes.h',
- 'html/canvas/CanvasGradient.cpp',
- 'html/canvas/CanvasGradient.h',
- 'html/canvas/Int32Array.cpp',
- 'html/canvas/Int32Array.h',
- 'html/canvas/IntegralTypedArrayBase.h',
- 'html/canvas/WebGLObject.cpp',
- 'html/canvas/WebGLObject.h',
- 'html/canvas/CanvasPattern.cpp',
- 'html/canvas/CanvasPattern.h',
- 'html/canvas/CanvasPixelArray.cpp',
- 'html/canvas/CanvasPixelArray.h',
- 'html/canvas/WebGLProgram.cpp',
- 'html/canvas/WebGLProgram.h',
- 'html/canvas/WebGLRenderbuffer.cpp',
- 'html/canvas/WebGLRenderbuffer.h',
- 'html/canvas/CanvasRenderingContext.cpp',
- 'html/canvas/CanvasRenderingContext.h',
- 'html/canvas/CanvasRenderingContext2D.cpp',
- 'html/canvas/CanvasRenderingContext2D.h',
- 'html/canvas/WebGLRenderingContext.cpp',
- 'html/canvas/WebGLRenderingContext.h',
- 'html/canvas/WebGLShader.cpp',
- 'html/canvas/WebGLShader.h',
- 'html/canvas/Int16Array.cpp',
- 'html/canvas/Int16Array.h',
- 'html/canvas/CanvasStyle.cpp',
- 'html/canvas/CanvasStyle.h',
- 'html/canvas/WebGLTexture.cpp',
- 'html/canvas/WebGLTexture.h',
- 'html/canvas/TypedArrayBase.h',
- 'html/canvas/WebGLUniformLocation.cpp',
- 'html/canvas/WebGLUniformLocation.h',
- 'html/canvas/Uint8Array.cpp',
- 'html/canvas/Uint8Array.h',
- 'html/canvas/Uint32Array.cpp',
- 'html/canvas/Uint32Array.h',
- 'html/canvas/Uint16Array.cpp',
- 'html/canvas/Uint16Array.h',
- 'html/canvas/CheckedInt.h',
'html/CollectionCache.cpp',
'html/CollectionCache.h',
'html/CollectionType.h',
- 'html/CSSPreloadScanner.cpp',
- 'html/CSSPreloadScanner.h',
- 'html/DataGridColumn.cpp',
- 'html/DataGridColumn.h',
'html/DOMDataGridDataSource.cpp',
'html/DOMDataGridDataSource.h',
'html/DOMFormData.cpp',
'html/DOMFormData.h',
+ 'html/DataGridColumn.cpp',
+ 'html/DataGridColumn.h',
'html/DataGridColumnList.cpp',
'html/DataGridColumnList.h',
'html/DateComponents.cpp',
'html/DateComponents.h',
- 'html/File.cpp',
- 'html/File.h',
- 'html/FileError.h',
- 'html/FileList.cpp',
- 'html/FileList.h',
- 'html/FileReader.cpp',
- 'html/FileReader.h',
- 'html/FileWriter.cpp',
- 'html/FileWriter.h',
- 'html/FileStreamProxy.cpp',
- 'html/FileStreamProxy.h',
- 'html/FileThread.cpp',
- 'html/FileThread.h',
- 'html/FileThreadTask.h',
'html/FormDataList.cpp',
'html/FormDataList.h',
- 'html/HTMLEntityParser.cpp',
- 'html/HTMLEntityParser.h',
- 'html/HTMLTokenizer.cpp',
- 'html/HTMLTokenizer.h',
- 'html/HTMLDocumentParser.cpp',
- 'html/HTMLDocumentParser.h',
- 'html/HTMLPreloadScanner.cpp',
- 'html/HTMLPreloadScanner.h',
- 'html/HTMLScriptRunner.cpp',
- 'html/HTMLScriptRunner.h',
- 'html/HTMLTreeBuilder.cpp',
- 'html/HTMLTreeBuilder.h',
'html/HTMLAllCollection.cpp',
'html/HTMLAllCollection.h',
'html/HTMLAnchorElement.cpp',
@@ -1568,8 +1533,6 @@
'html/HTMLCanvasElement.h',
'html/HTMLCollection.cpp',
'html/HTMLCollection.h',
- 'html/HTMLConstructionSite.cpp',
- 'html/HTMLConstructionSite.h',
'html/HTMLDListElement.cpp',
'html/HTMLDListElement.h',
'html/HTMLDataGridCellElement.cpp',
@@ -1590,18 +1553,12 @@
'html/HTMLDocument.h',
'html/HTMLElement.cpp',
'html/HTMLElement.h',
- 'html/HTMLElementStack.cpp',
- 'html/HTMLElementStack.h',
- 'html/HTMLEntitySearch.cpp',
- 'html/HTMLEntitySearch.h',
'html/HTMLEmbedElement.cpp',
'html/HTMLEmbedElement.h',
'html/HTMLFieldSetElement.cpp',
'html/HTMLFieldSetElement.h',
'html/HTMLFontElement.cpp',
'html/HTMLFontElement.h',
- 'html/HTMLFormattingElementList.cpp',
- 'html/HTMLFormattingElementList.h',
'html/HTMLFormCollection.cpp',
'html/HTMLFormCollection.h',
'html/HTMLFormControlElement.cpp',
@@ -1677,8 +1634,6 @@
'html/HTMLParamElement.h',
'html/HTMLParserErrorCodes.cpp',
'html/HTMLParserErrorCodes.h',
- 'html/HTMLParserScheduler.cpp',
- 'html/HTMLParserScheduler.h',
'html/HTMLPlugInElement.cpp',
'html/HTMLPlugInElement.h',
'html/HTMLPlugInImageElement.cpp',
@@ -1723,8 +1678,6 @@
'html/HTMLVideoElement.h',
'html/HTMLViewSourceDocument.cpp',
'html/HTMLViewSourceDocument.h',
- 'html/HTMLViewSourceParser.cpp',
- 'html/HTMLViewSourceParser.h',
'html/ImageData.cpp',
'html/ImageData.h',
'html/ImageResizerThread.cpp',
@@ -1735,13 +1688,96 @@
'html/StepRange.cpp',
'html/StepRange.h',
'html/TextMetrics.h',
- 'html/ThreadableBlobRegistry.cpp',
- 'html/ThreadableBlobRegistry.h',
'html/TimeRanges.cpp',
'html/TimeRanges.h',
'html/ValidityState.cpp',
'html/ValidityState.h',
'html/VoidCallback.h',
+ 'html/canvas/ArrayBuffer.cpp',
+ 'html/canvas/ArrayBuffer.h',
+ 'html/canvas/ArrayBufferView.cpp',
+ 'html/canvas/ArrayBufferView.h',
+ 'html/canvas/CanvasContextAttributes.cpp',
+ 'html/canvas/CanvasContextAttributes.h',
+ 'html/canvas/CanvasGradient.cpp',
+ 'html/canvas/CanvasGradient.h',
+ 'html/canvas/CanvasPattern.cpp',
+ 'html/canvas/CanvasPattern.h',
+ 'html/canvas/CanvasPixelArray.cpp',
+ 'html/canvas/CanvasPixelArray.h',
+ 'html/canvas/CanvasRenderingContext.cpp',
+ 'html/canvas/CanvasRenderingContext.h',
+ 'html/canvas/CanvasRenderingContext2D.cpp',
+ 'html/canvas/CanvasRenderingContext2D.h',
+ 'html/canvas/CanvasStyle.cpp',
+ 'html/canvas/CanvasStyle.h',
+ 'html/canvas/CheckedInt.h',
+ 'html/canvas/Float32Array.cpp',
+ 'html/canvas/Float32Array.h',
+ 'html/canvas/Int16Array.cpp',
+ 'html/canvas/Int16Array.h',
+ 'html/canvas/Int32Array.cpp',
+ 'html/canvas/Int32Array.h',
+ 'html/canvas/Int8Array.cpp',
+ 'html/canvas/Int8Array.h',
+ 'html/canvas/IntegralTypedArrayBase.h',
+ 'html/canvas/TypedArrayBase.h',
+ 'html/canvas/Uint16Array.cpp',
+ 'html/canvas/Uint16Array.h',
+ 'html/canvas/Uint32Array.cpp',
+ 'html/canvas/Uint32Array.h',
+ 'html/canvas/Uint8Array.cpp',
+ 'html/canvas/Uint8Array.h',
+ 'html/canvas/WebGLBuffer.cpp',
+ 'html/canvas/WebGLBuffer.h',
+ 'html/canvas/WebGLContextAttributes.cpp',
+ 'html/canvas/WebGLContextAttributes.h',
+ 'html/canvas/WebGLFramebuffer.cpp',
+ 'html/canvas/WebGLFramebuffer.h',
+ 'html/canvas/WebGLGetInfo.cpp',
+ 'html/canvas/WebGLGetInfo.h',
+ 'html/canvas/WebGLObject.cpp',
+ 'html/canvas/WebGLObject.h',
+ 'html/canvas/WebGLProgram.cpp',
+ 'html/canvas/WebGLProgram.h',
+ 'html/canvas/WebGLRenderbuffer.cpp',
+ 'html/canvas/WebGLRenderbuffer.h',
+ 'html/canvas/WebGLRenderingContext.cpp',
+ 'html/canvas/WebGLRenderingContext.h',
+ 'html/canvas/WebGLShader.cpp',
+ 'html/canvas/WebGLShader.h',
+ 'html/canvas/WebGLTexture.cpp',
+ 'html/canvas/WebGLTexture.h',
+ 'html/canvas/WebGLUniformLocation.cpp',
+ 'html/canvas/WebGLUniformLocation.h',
+ 'html/parser/CSSPreloadScanner.cpp',
+ 'html/parser/CSSPreloadScanner.h',
+ 'html/parser/HTMLConstructionSite.cpp',
+ 'html/parser/HTMLConstructionSite.h',
+ 'html/parser/HTMLDocumentParser.cpp',
+ 'html/parser/HTMLDocumentParser.h',
+ 'html/parser/HTMLElementStack.cpp',
+ 'html/parser/HTMLElementStack.h',
+ 'html/parser/HTMLEntityParser.cpp',
+ 'html/parser/HTMLEntityParser.h',
+ 'html/parser/HTMLEntitySearch.cpp',
+ 'html/parser/HTMLEntitySearch.h',
+ 'html/parser/HTMLFormattingElementList.cpp',
+ 'html/parser/HTMLFormattingElementList.h',
+ 'html/parser/HTMLParserScheduler.cpp',
+ 'html/parser/HTMLParserScheduler.h',
+ 'html/parser/HTMLPreloadScanner.cpp',
+ 'html/parser/HTMLPreloadScanner.h',
+ 'html/parser/HTMLScriptRunner.cpp',
+ 'html/parser/HTMLScriptRunner.h',
+ 'html/parser/HTMLScriptRunnerHost.h',
+ 'html/parser/HTMLToken.h',
+ 'html/parser/HTMLTokenizer.cpp',
+ 'html/parser/HTMLTokenizer.h',
+ 'html/parser/HTMLTreeBuilder.cpp',
+ 'html/parser/HTMLTreeBuilder.h',
+ 'html/parser/HTMLViewSourceParser.cpp',
+ 'html/parser/HTMLViewSourceParser.h',
'inspector/InspectorClient.h',
'inspector/ConsoleMessage.cpp',
'inspector/ConsoleMessage.h',
@@ -2139,6 +2175,8 @@
'platform/chromium/ClipboardChromiumLinux.cpp',
'platform/chromium/ClipboardChromiumMac.cpp',
'platform/chromium/ClipboardChromiumWin.cpp',
+ 'platform/chromium/ClipboardMimeTypes.cpp',
+ 'platform/chromium/ClipboardMimeTypes.h',
'platform/chromium/ClipboardUtilitiesChromium.cpp',
'platform/chromium/ClipboardUtilitiesChromium.h',
'platform/chromium/ContextMenuChromium.cpp',
@@ -2176,6 +2214,8 @@
'platform/chromium/PopupMenuChromium.cpp',
'platform/chromium/PopupMenuChromium.h',
'platform/chromium/PopupMenuPrivate.h',
+ 'platform/chromium/ReadableDataObject.cpp',
+ 'platform/chromium/ReadableDataObject.h',
'platform/chromium/SSLKeyGeneratorChromium.cpp',
'platform/chromium/ScrollbarThemeChromium.cpp',
'platform/chromium/ScrollbarThemeChromium.h',
@@ -2196,6 +2236,8 @@
'platform/chromium/WidgetChromium.cpp',
'platform/chromium/WindowsVersion.cpp',
'platform/chromium/WindowsVersion.h',
+ 'platform/chromium/WritableDataObject.cpp',
+ 'platform/chromium/WritableDataObject.h',
'platform/graphics/cairo/CairoPath.h',
'platform/graphics/cairo/FontCairo.cpp',
'platform/graphics/cairo/GradientCairo.cpp',
@@ -2234,6 +2276,8 @@
'platform/graphics/chromium/CanvasLayerChromium.h',
'platform/graphics/chromium/ContentLayerChromium.cpp',
'platform/graphics/chromium/ContentLayerChromium.h',
+ 'platform/graphics/chromium/CrossProcessFontLoading.h',
+ 'platform/graphics/chromium/CrossProcessFontLoading.mm',
'platform/graphics/chromium/FontCacheChromiumWin.cpp',
'platform/graphics/chromium/FontCacheLinux.cpp',
'platform/graphics/chromium/FontChromiumWin.cpp',
@@ -2241,7 +2285,6 @@
'platform/graphics/chromium/FontCustomPlatformData.h',
'platform/graphics/chromium/FontLinux.cpp',
'platform/graphics/chromium/FontPlatformData.h',
- 'platform/graphics/chromium/FontPlatformDataChromiumMac.mm',
'platform/graphics/chromium/FontPlatformDataChromiumWin.cpp',
'platform/graphics/chromium/FontPlatformDataChromiumWin.h',
'platform/graphics/chromium/FontPlatformDataLinux.cpp',
@@ -2250,8 +2293,6 @@
'platform/graphics/chromium/FontUtilsChromiumWin.h',
'platform/graphics/chromium/GLES2Canvas.cpp',
'platform/graphics/chromium/GLES2Canvas.h',
- 'platform/graphics/chromium/GLES2Texture.cpp',
- 'platform/graphics/chromium/GLES2Texture.h',
'platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp',
'platform/graphics/chromium/GlyphPageTreeNodeLinux.cpp',
'platform/graphics/chromium/GraphicsLayerChromium.cpp',
@@ -2271,8 +2312,6 @@
'platform/graphics/chromium/PlatformIcon.h',
'platform/graphics/chromium/SimpleFontDataChromiumWin.cpp',
'platform/graphics/chromium/SimpleFontDataLinux.cpp',
- 'platform/graphics/chromium/TilingData.h',
- 'platform/graphics/chromium/TilingData.cpp',
'platform/graphics/chromium/TransparencyWin.cpp',
'platform/graphics/chromium/TransparencyWin.h',
'platform/graphics/chromium/UniscribeHelper.cpp',
@@ -2281,6 +2320,8 @@
'platform/graphics/chromium/UniscribeHelperTextRun.h',
'platform/graphics/chromium/VideoLayerChromium.cpp',
'platform/graphics/chromium/VideoLayerChromium.h',
+ 'platform/graphics/cocoa/FontPlatformData.h',
+ 'platform/graphics/cocoa/FontPlatformDataCocoa.mm',
'platform/graphics/filters/FEBlend.cpp',
'platform/graphics/filters/FEBlend.h',
'platform/graphics/filters/FEColorMatrix.cpp',
@@ -2300,6 +2341,16 @@
'platform/graphics/filters/SourceAlpha.h',
'platform/graphics/filters/SourceGraphic.cpp',
'platform/graphics/filters/SourceGraphic.h',
+ 'platform/graphics/gpu/Shader.cpp',
+ 'platform/graphics/gpu/Shader.h',
+ 'platform/graphics/gpu/SolidFillShader.cpp',
+ 'platform/graphics/gpu/SolidFillShader.h',
+ 'platform/graphics/gpu/TexShader.cpp',
+ 'platform/graphics/gpu/TexShader.h',
+ 'platform/graphics/gpu/Texture.cpp',
+ 'platform/graphics/gpu/Texture.h',
+ 'platform/graphics/gpu/TilingData.h',
+ 'platform/graphics/gpu/TilingData.cpp',
'platform/graphics/gtk/ColorGtk.cpp',
'platform/graphics/gtk/FontCacheGtk.cpp',
'platform/graphics/gtk/FontCustomPlatformData.cpp',
@@ -2335,7 +2386,6 @@
'platform/graphics/mac/FontCustomPlatformData.cpp',
'platform/graphics/mac/FontCustomPlatformData.h',
'platform/graphics/mac/FontMac.mm',
- 'platform/graphics/mac/FontPlatformData.h',
'platform/graphics/mac/GlyphPageTreeNodeMac.cpp',
'platform/graphics/mac/GraphicsContextMac.mm',
'platform/graphics/mac/GraphicsLayerCA.h',
@@ -3038,9 +3088,10 @@
'platform/Arena.cpp',
'platform/Arena.h',
'platform/AsyncFileStream.h',
+ 'platform/AsyncFileSystem.cpp',
+ 'platform/AsyncFileSystem.h',
+ 'platform/AsyncFileSystemCallbacks.h',
'platform/AutodrainedPool.h',
- 'platform/BlobItem.cpp',
- 'platform/BlobItem.h',
'platform/ContentType.cpp',
'platform/ContentType.h',
'platform/ContextMenu.cpp',
@@ -3236,6 +3287,7 @@
'rendering/style/StyleMarqueeData.h',
'rendering/style/StyleMultiColData.cpp',
'rendering/style/StyleMultiColData.h',
+ 'rendering/style/StylePendingImage.h',
'rendering/style/StyleRareInheritedData.cpp',
'rendering/style/StyleRareInheritedData.h',
'rendering/style/StyleRareNonInheritedData.cpp',
@@ -3317,8 +3369,10 @@
'rendering/RenderIFrame.h',
'rendering/RenderImage.cpp',
'rendering/RenderImage.h',
- 'rendering/RenderImageGeneratedContent.cpp',
- 'rendering/RenderImageGeneratedContent.h',
+ 'rendering/RenderImageResource.cpp',
+ 'rendering/RenderImageResource.h',
+ 'rendering/RenderImageResourceStyleImage.cpp',
+ 'rendering/RenderImageResourceStyleImage.h',
'rendering/RenderIndicator.cpp',
'rendering/RenderIndicator.h',
'rendering/RenderInline.cpp',
@@ -3550,27 +3604,6 @@
'storage/DatabaseTracker.cpp',
'storage/DatabaseTracker.h',
'storage/DatabaseTrackerClient.h',
- 'storage/DirectoryEntry.cpp',
- 'storage/DirectoryEntry.h',
- 'storage/DirectoryReader.cpp',
- 'storage/DirectoryReader.h',
- 'storage/DOMFilePath.cpp',
- 'storage/DOMFilePath.h',
- 'storage/DOMFileSystem.cpp',
- 'storage/DOMFileSystem.h',
- 'storage/EntriesCallback.h',
- 'storage/Entry.cpp',
- 'storage/Entry.h',
- 'storage/EntryArray.cpp',
- 'storage/EntryArray.h',
- 'storage/EntryCallback.h',
- 'storage/ErrorCallback.h',
- 'storage/FileEntry.cpp',
- 'storage/FileEntry.h',
- 'storage/FileSystemCallback.h',
- 'storage/FileSystemCallbacks.cpp',
- 'storage/FileSystemCallbacks.h',
- 'storage/Flags.h',
'storage/IDBAbortEvent.cpp',
'storage/IDBAbortEvent.h',
'storage/IDBAny.cpp',
@@ -3635,8 +3668,6 @@
'storage/LocalStorageTask.h',
'storage/LocalStorageThread.cpp',
'storage/LocalStorageThread.h',
- 'storage/Metadata.h',
- 'storage/MetadataCallback.h',
'storage/OriginQuotaManager.cpp',
'storage/OriginQuotaManager.h',
'storage/OriginUsageRecord.cpp',
@@ -4144,6 +4175,7 @@
'inspector/front-end/AbstractTimelinePanel.js',
'inspector/front-end/ApplicationCacheItemsView.js',
'inspector/front-end/AuditCategories.js',
+ 'inspector/front-end/AuditFormatters.js',
'inspector/front-end/AuditLauncherView.js',
'inspector/front-end/AuditResultView.js',
'inspector/front-end/AuditRules.js',
@@ -4175,11 +4207,14 @@
'inspector/front-end/ElementsTreeOutline.js',
'inspector/front-end/EventListenersSidebarPane.js',
'inspector/front-end/ExtensionAPI.js',
+ 'inspector/front-end/ExtensionAuditCategory.js',
+ 'inspector/front-end/ExtensionCommon.js',
'inspector/front-end/ExtensionPanel.js',
'inspector/front-end/ExtensionRegistryStub.js',
'inspector/front-end/ExtensionServer.js',
'inspector/front-end/FontView.js',
'inspector/front-end/HAREntry.js',
+ 'inspector/front-end/HeapSnapshotView.js',
'inspector/front-end/HelpScreen.js',
'inspector/front-end/ImageView.js',
'inspector/front-end/InspectorFrontendHostStub.js',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 477e1ba..a4c69b1 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -29,7 +29,7 @@ XML_NAMES = $$PWD/xml/xmlattrs.in
XMLNS_NAMES = $$PWD/xml/xmlnsattrs.in
-HTML_ENTITIES = $$PWD/html/HTMLEntityNames.json
+HTML_ENTITIES = $$PWD/html/parser/HTMLEntityNames.in
COLORDATA_GPERF = $$PWD/platform/ColorData.gperf
@@ -147,8 +147,26 @@ IDL_BINDINGS += \
dom/WebKitAnimationEvent.idl \
dom/WebKitTransitionEvent.idl \
dom/WheelEvent.idl \
- html/Blob.idl \
- html/BlobBuilder.idl \
+ fileapi/Blob.idl \
+ fileapi/BlobBuilder.idl \
+ fileapi/DirectoryEntry.idl \
+ fileapi/DirectoryReader.idl \
+ fileapi/DOMFileSystem.idl \
+ fileapi/EntriesCallback.idl \
+ fileapi/Entry.idl \
+ fileapi/EntryArray.idl \
+ fileapi/EntryCallback.idl \
+ fileapi/ErrorCallback.idl \
+ fileapi/File.idl \
+ fileapi/FileList.idl \
+ fileapi/FileReader.idl \
+ fileapi/FileWriter.idl \
+ fileapi/FileEntry.idl \
+ fileapi/FileError.idl \
+ fileapi/FileSystemCallback.idl \
+ fileapi/Flags.idl \
+ fileapi/Metadata.idl \
+ fileapi/MetadataCallback.idl \
html/canvas/ArrayBufferView.idl \
html/canvas/ArrayBuffer.idl \
html/canvas/Int8Array.idl \
@@ -175,11 +193,6 @@ IDL_BINDINGS += \
html/DataGridColumn.idl \
html/DataGridColumnList.idl \
html/DOMFormData.idl \
- html/File.idl \
- html/FileError.idl \
- html/FileList.idl \
- html/FileReader.idl \
- html/FileWriter.idl \
html/HTMLAllCollection.idl \
html/HTMLAudioElement.idl \
html/HTMLAnchorElement.idl \
@@ -292,17 +305,6 @@ IDL_BINDINGS += \
storage/Database.idl \
storage/DatabaseCallback.idl \
storage/DatabaseSync.idl \
- storage/DirectoryEntry.idl \
- storage/DirectoryReader.idl \
- storage/DOMFileSystem.idl \
- storage/EntriesCallback.idl \
- storage/Entry.idl \
- storage/EntryArray.idl \
- storage/EntryCallback.idl \
- storage/ErrorCallback.idl \
- storage/FileEntry.idl \
- storage/FileSystemCallback.idl \
- storage/Flags.idl \
storage/IDBAny.idl \
storage/IDBCursor.idl \
storage/IDBDatabaseError.idl \
@@ -318,8 +320,6 @@ IDL_BINDINGS += \
storage/IDBRequest.idl \
storage/IDBSuccessEvent.idl \
storage/IDBTransaction.idl \
- storage/Metadata.idl \
- storage/MetadataCallback.idl \
storage/Storage.idl \
storage/StorageEvent.idl \
storage/SQLError.idl \
@@ -546,7 +546,7 @@ addExtraCompiler(cssvalues)
idl.output = $${WC_GENERATED_SOURCES_DIR}/JS${QMAKE_FILE_BASE}.cpp
idl.input = IDL_BINDINGS
idl.wkScript = $$PWD/bindings/scripts/generate-bindings.pl
-idl.commands = perl -I$$PWD/bindings/scripts $$idl.wkScript --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator JS --include $$PWD/dom --include $$PWD/html --include $$PWD/xml --include $$PWD/svg --outputDir $$WC_GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
+idl.commands = perl -I$$PWD/bindings/scripts $$idl.wkScript --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator JS --include $$PWD/dom --include $$PWD/fileapi --include $$PWD/html --include $$PWD/xml --include $$PWD/svg --outputDir $$WC_GENERATED_SOURCES_DIR --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
idl.depends = $$PWD/bindings/scripts/CodeGenerator.pm \
$$PWD/bindings/scripts/CodeGeneratorJS.pm \
$$PWD/bindings/scripts/IDLParser.pm \
@@ -614,10 +614,10 @@ addExtraCompiler(xmlnames)
# GENERATOR 8-A:
entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityTable.cpp
entities.input = HTML_ENTITIES
-entities.wkScript = $$PWD/../WebKitTools/Scripts/create-html-entity-table
+entities.wkScript = $$PWD/html/parser/create-html-entity-table
entities.commands = python $$entities.wkScript -o $${WC_GENERATED_SOURCES_DIR}/HTMLEntityTable.cpp $$HTML_ENTITIES
entities.clean = ${QMAKE_FILE_OUT}
-entities.depends = $$PWD/../WebKitTools/Scripts/create-html-entity-table
+entities.depends = $$PWD/html/parser/create-html-entity-table
addExtraCompiler(entities)
# GENERATOR 8-B:
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index d1ff8b2..3f23cdd 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -191,9 +191,11 @@ WEBCORE_INCLUDEPATH = \
$$PWD/dom \
$$PWD/dom/default \
$$PWD/editing \
+ $$PWD/fileapi \
$$PWD/history \
$$PWD/html \
$$PWD/html/canvas \
+ $$PWD/html/parser \
$$PWD/inspector \
$$PWD/loader \
$$PWD/loader/appcache \
@@ -618,6 +620,17 @@ SOURCES += \
editing/VisibleSelection.cpp \
editing/visible_units.cpp \
editing/WrapContentsInDummySpanCommand.cpp \
+ fileapi/Blob.cpp \
+ fileapi/BlobBuilder.cpp \
+ fileapi/BlobURL.cpp \
+ fileapi/File.cpp \
+ fileapi/FileList.cpp \
+ fileapi/FileReader.cpp \
+ fileapi/FileReaderSync.cpp \
+ fileapi/FileStreamProxy.cpp \
+ fileapi/FileThread.cpp \
+ fileapi/FileWriter.cpp \
+ fileapi/ThreadableBlobRegistry.cpp \
history/BackForwardController.cpp \
history/BackForwardListImpl.cpp \
history/CachedFrame.cpp \
@@ -626,74 +639,48 @@ SOURCES += \
history/qt/HistoryItemQt.cpp \
history/PageCache.cpp \
html/AsyncImageResizer.cpp \
- html/Blob.cpp \
- html/BlobBuilder.cpp \
- html/BlobURL.cpp \
- html/canvas/CanvasGradient.cpp \
- html/canvas/CanvasPattern.cpp \
- html/canvas/CanvasPixelArray.cpp \
- html/canvas/CanvasRenderingContext.cpp \
- html/canvas/CanvasRenderingContext2D.cpp \
- html/canvas/CanvasStyle.cpp \
html/CollectionCache.cpp \
- html/CSSPreloadScanner.cpp \
+ html/DOMDataGridDataSource.cpp \
+ html/DOMFormData.cpp \
html/DataGridColumn.cpp \
html/DataGridColumnList.cpp \
html/DateComponents.cpp \
- html/DOMDataGridDataSource.cpp \
- html/DOMFormData.cpp \
- html/File.cpp \
- html/FileList.cpp \
- html/FileReader.cpp \
- html/FileStreamProxy.cpp \
- html/FileThread.cpp \
- html/FileWriter.cpp \
html/FormDataList.cpp \
- html/HTMLEntityParser.cpp \
- html/HTMLTokenizer.cpp \
- html/HTMLDocumentParser.cpp \
- html/HTMLPreloadScanner.cpp \
- html/HTMLScriptRunner.cpp \
- html/HTMLTreeBuilder.cpp \
html/HTMLAllCollection.cpp \
html/HTMLAnchorElement.cpp \
html/HTMLAppletElement.cpp \
html/HTMLAreaElement.cpp \
+ html/HTMLBRElement.cpp \
html/HTMLBaseElement.cpp \
html/HTMLBaseFontElement.cpp \
html/HTMLBlockquoteElement.cpp \
html/HTMLBodyElement.cpp \
- html/HTMLBRElement.cpp \
html/HTMLButtonElement.cpp \
html/HTMLCanvasElement.cpp \
html/HTMLCollection.cpp \
- html/HTMLConstructionSite.cpp \
- html/HTMLDataGridElement.cpp \
+ html/HTMLDListElement.cpp \
html/HTMLDataGridCellElement.cpp \
html/HTMLDataGridColElement.cpp \
+ html/HTMLDataGridElement.cpp \
html/HTMLDataGridRowElement.cpp \
html/HTMLDataListElement.cpp \
html/HTMLDirectoryElement.cpp \
html/HTMLDivElement.cpp \
- html/HTMLDListElement.cpp \
html/HTMLDocument.cpp \
html/HTMLElement.cpp \
- html/HTMLElementStack.cpp \
- html/HTMLEntitySearch.cpp \
html/HTMLEmbedElement.cpp \
html/HTMLFieldSetElement.cpp \
html/HTMLFontElement.cpp \
- html/HTMLFormattingElementList.cpp \
html/HTMLFormCollection.cpp \
+ html/HTMLFormControlElement.cpp \
html/HTMLFormElement.cpp \
- html/HTMLFrameElementBase.cpp \
html/HTMLFrameElement.cpp \
+ html/HTMLFrameElementBase.cpp \
html/HTMLFrameOwnerElement.cpp \
html/HTMLFrameSetElement.cpp \
- html/HTMLFormControlElement.cpp \
+ html/HTMLHRElement.cpp \
html/HTMLHeadElement.cpp \
html/HTMLHeadingElement.cpp \
- html/HTMLHRElement.cpp \
html/HTMLHtmlElement.cpp \
html/HTMLIFrameElement.cpp \
html/HTMLImageElement.cpp \
@@ -701,9 +688,9 @@ SOURCES += \
html/HTMLInputElement.cpp \
html/HTMLIsIndexElement.cpp \
html/HTMLKeygenElement.cpp \
+ html/HTMLLIElement.cpp \
html/HTMLLabelElement.cpp \
html/HTMLLegendElement.cpp \
- html/HTMLLIElement.cpp \
html/HTMLLinkElement.cpp \
html/HTMLMapElement.cpp \
html/HTMLMarqueeElement.cpp \
@@ -712,15 +699,14 @@ SOURCES += \
html/HTMLMeterElement.cpp \
html/HTMLModElement.cpp \
html/HTMLNameCollection.cpp \
- html/HTMLObjectElement.cpp \
html/HTMLOListElement.cpp \
+ html/HTMLObjectElement.cpp \
html/HTMLOptGroupElement.cpp \
html/HTMLOptionElement.cpp \
html/HTMLOptionsCollection.cpp \
html/HTMLParagraphElement.cpp \
html/HTMLParamElement.cpp \
html/HTMLParserErrorCodes.cpp \
- html/HTMLParserScheduler.cpp \
html/HTMLPlugInElement.cpp \
html/HTMLPlugInImageElement.cpp \
html/HTMLPreElement.cpp \
@@ -741,13 +727,30 @@ SOURCES += \
html/HTMLTitleElement.cpp \
html/HTMLUListElement.cpp \
html/HTMLViewSourceDocument.cpp \
- html/HTMLViewSourceParser.cpp \
html/ImageData.cpp \
html/ImageResizerThread.cpp \
html/LabelsNodeList.cpp \
- html/ThreadableBlobRegistry.cpp \
html/StepRange.cpp \
html/ValidityState.cpp \
+ html/canvas/CanvasGradient.cpp \
+ html/canvas/CanvasPattern.cpp \
+ html/canvas/CanvasPixelArray.cpp \
+ html/canvas/CanvasRenderingContext.cpp \
+ html/canvas/CanvasRenderingContext2D.cpp \
+ html/canvas/CanvasStyle.cpp \
+ html/parser/CSSPreloadScanner.cpp \
+ html/parser/HTMLConstructionSite.cpp \
+ html/parser/HTMLDocumentParser.cpp \
+ html/parser/HTMLElementStack.cpp \
+ html/parser/HTMLEntityParser.cpp \
+ html/parser/HTMLEntitySearch.cpp \
+ html/parser/HTMLFormattingElementList.cpp \
+ html/parser/HTMLParserScheduler.cpp \
+ html/parser/HTMLPreloadScanner.cpp \
+ html/parser/HTMLScriptRunner.cpp \
+ html/parser/HTMLTokenizer.cpp \
+ html/parser/HTMLTreeBuilder.cpp \
+ html/parser/HTMLViewSourceParser.cpp \
inspector/ConsoleMessage.cpp \
inspector/InjectedScript.cpp \
inspector/InjectedScriptHost.cpp \
@@ -874,7 +877,6 @@ SOURCES += \
platform/animation/Animation.cpp \
platform/animation/AnimationList.cpp \
platform/Arena.cpp \
- platform/BlobItem.cpp \
platform/text/Base64.cpp \
platform/text/BidiContext.cpp \
platform/text/Hyphenation.cpp \
@@ -1013,7 +1015,8 @@ SOURCES += \
rendering/RenderHTMLCanvas.cpp \
rendering/RenderIFrame.cpp \
rendering/RenderImage.cpp \
- rendering/RenderImageGeneratedContent.cpp \
+ rendering/RenderImageResource.cpp \
+ rendering/RenderImageResourceStyleImage.cpp \
rendering/RenderIndicator.cpp \
rendering/RenderInline.cpp \
rendering/RenderLayer.cpp \
@@ -1156,6 +1159,7 @@ HEADERS += \
bindings/js/ScriptEventListener.h \
bindings/js/ScriptFunctionCall.h \
bindings/js/ScriptGCEvent.h \
+ bindings/js/ScriptHeapSnapshot.h \
bindings/js/ScriptObject.h \
bindings/js/ScriptProfile.h \
bindings/js/ScriptProfileNode.h \
@@ -1395,6 +1399,21 @@ HEADERS += \
editing/VisibleSelection.h \
editing/visible_units.h \
editing/WrapContentsInDummySpanCommand.h \
+ fileapi/AsyncFileWriter.h \
+ fileapi/Blob.h \
+ fileapi/BlobBuilder.h \
+ fileapi/BlobURL.h \
+ fileapi/File.h \
+ fileapi/FileError.h \
+ fileapi/FileException.h \
+ fileapi/FileList.h \
+ fileapi/FileReader.h \
+ fileapi/FileReaderSync.h \
+ fileapi/FileStreamProxy.h \
+ fileapi/FileThread.h \
+ fileapi/FileThreadTask.h \
+ fileapi/FileWriter.h \
+ fileapi/FileWriterClient.h \
history/BackForwardController.h \
history/BackForwardControllerClient.h \
history/BackForwardListImpl.h \
@@ -1404,9 +1423,6 @@ HEADERS += \
history/HistoryItem.h \
history/PageCache.h \
html/AsyncImageResizer.h \
- html/Blob.h \
- html/BlobBuilder.h \
- html/BlobURL.h \
html/canvas/CanvasGradient.h \
html/canvas/CanvasPattern.h \
html/canvas/CanvasPixelArray.h \
@@ -1419,14 +1435,6 @@ HEADERS += \
html/DateComponents.h \
html/DOMDataGridDataSource.h \
html/DOMFormData.h \
- html/File.h \
- html/FileError.h \
- html/FileList.h \
- html/FileReader.h \
- html/FileStreamProxy.h \
- html/FileThread.h \
- html/FileThreadTask.h \
- html/FileWriter.h \
html/FormDataList.h \
html/HTMLAllCollection.h \
html/HTMLAnchorElement.h \
@@ -1513,13 +1521,28 @@ HEADERS += \
html/HTMLUListElement.h \
html/HTMLVideoElement.h \
html/HTMLViewSourceDocument.h \
- html/HTMLViewSourceParser.h \
html/ImageData.h \
html/ImageResizerThread.h \
html/LabelsNodeList.h \
html/StepRange.h \
html/TimeRanges.h \
html/ValidityState.h \
+ html/parser/CSSPreloadScanner.h \
+ html/parser/HTMLConstructionSite.h \
+ html/parser/HTMLDocumentParser.h \
+ html/parser/HTMLElementStack.h \
+ html/parser/HTMLEntityParser.h \
+ html/parser/HTMLEntitySearch.h \
+ html/parser/HTMLEntityTable.h \
+ html/parser/HTMLFormattingElementList.h \
+ html/parser/HTMLParserScheduler.h \
+ html/parser/HTMLPreloadScanner.h \
+ html/parser/HTMLScriptRunner.h \
+ html/parser/HTMLScriptRunnerHost.h \
+ html/parser/HTMLToken.h \
+ html/parser/HTMLTokenizer.h \
+ html/parser/HTMLTreeBuilder.h \
+ html/parser/HTMLViewSourceParser.h \
inspector/ConsoleMessage.h \
inspector/InjectedScript.h \
inspector/InjectedScriptHost.h \
@@ -1658,7 +1681,6 @@ HEADERS += \
platform/animation/AnimationList.h \
platform/Arena.h \
platform/AsyncFileStream.h \
- platform/BlobItem.h \
platform/ContentType.h \
platform/ContextMenu.h \
platform/CrossThreadCopier.h \
@@ -1840,7 +1862,8 @@ HEADERS += \
rendering/RenderFrameSet.h \
rendering/RenderHTMLCanvas.h \
rendering/RenderIFrame.h \
- rendering/RenderImageGeneratedContent.h \
+ rendering/RenderImageResource.h \
+ rendering/RenderImageResourceStyleImage.h \
rendering/RenderImage.h \
rendering/RenderIndicator.h \
rendering/RenderInline.h \
@@ -2196,6 +2219,7 @@ HEADERS += \
$$PWD/../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \
$$PWD/../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
$$PWD/../WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h \
+ $$PWD/../WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h \
$$PWD/../WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h \
$$PWD/../WebKit/qt/WebCoreSupport/PageClientQt.h \
$$PWD/../WebKit/qt/WebCoreSupport/QtPlatformPlugin.h \
@@ -2288,6 +2312,7 @@ SOURCES += \
../WebKit/qt/WebCoreSupport/EditCommandQt.cpp \
../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
../WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
+ ../WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp \
../WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \
../WebKit/qt/WebCoreSupport/PageClientQt.cpp \
@@ -2387,6 +2412,7 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
HEADERS += \
plugins/qt/PluginContainerQt.h
DEFINES += XP_UNIX
+ DEFINES += ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE=1
}
}
@@ -2581,31 +2607,37 @@ contains(DEFINES, ENABLE_DOM_STORAGE=1) {
contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
HEADERS += \
- storage/DirectoryEntry.h \
- storage/DirectoryReader.h \
- storage/DOMFilePath.h \
- storage/DOMFileSystem.h \
- storage/EntriesCallback.h \
- storage/Entry.h \
- storage/EntryArray.h \
- storage/EntryCallback.h \
- storage/ErrorCallback.h \
- storage/FileEntry.h \
- storage/FileSystemCallback.h \
- storage/FileSystemCallbacks.h \
- storage/Flags.h \
- storage/Metadata.h \
- storage/MetadataCallback.h
+ fileapi/DirectoryEntry.h \
+ fileapi/DirectoryReader.h \
+ fileapi/DOMFilePath.h \
+ fileapi/DOMFileSystem.h \
+ fileapi/EntriesCallback.h \
+ fileapi/Entry.h \
+ fileapi/EntryArray.h \
+ fileapi/EntryCallback.h \
+ fileapi/ErrorCallback.h \
+ fileapi/FileEntry.h \
+ fileapi/FileSystemCallback.h \
+ fileapi/FileSystemCallbacks.h \
+ fileapi/FileWriterCallback.h \
+ fileapi/Flags.h \
+ fileapi/LocalFileSystem.h \
+ fileapi/Metadata.h \
+ fileapi/MetadataCallback.h \
+ platform/AsyncFileSystem.h \
+ platform/AsyncFileSystemCallbacks.h
SOURCES += \
- storage/DirectoryEntry.cpp \
- storage/DirectoryReader.cpp \
- storage/DOMFilePath.cpp \
- storage/DOMFileSystem.cpp \
- storage/Entry.cpp \
- storage/EntryArray.cpp \
- storage/FileEntry.cpp \
- storage/FileSystemCallbacks.cpp
+ fileapi/DirectoryEntry.cpp \
+ fileapi/DirectoryReader.cpp \
+ fileapi/DOMFilePath.cpp \
+ fileapi/DOMFileSystem.cpp \
+ fileapi/Entry.cpp \
+ fileapi/EntryArray.cpp \
+ fileapi/FileEntry.cpp \
+ fileapi/FileSystemCallbacks.cpp \
+ fileapi/LocalFileSystem.cpp \
+ platform/AsyncFileSystem.cpp
}
contains(DEFINES, ENABLE_ICONDATABASE=1) {
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index a049866..ceb4fe8 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -4877,6 +4877,14 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileException.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileList.cpp"
>
<FileConfiguration
@@ -4989,6 +4997,14 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileReaderSync.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileReaderSync.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileSystemCallback.cpp"
>
<FileConfiguration
@@ -24001,15 +24017,19 @@
>
</File>
<File
- RelativePath="..\platform\AutodrainedPool.h"
+ RelativePath="..\platform\AsyncFileSystem.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\platform\AsyncFileSystem.h"
>
</File>
<File
- RelativePath="..\platform\BlobItem.cpp"
+ RelativePath="..\platform\AsyncFileSystemCallbacks.h"
>
</File>
<File
- RelativePath="..\platform\BlobItem.h"
+ RelativePath="..\platform\AutodrainedPool.h"
>
</File>
<File
@@ -29997,11 +30017,19 @@
>
</File>
<File
- RelativePath="..\rendering\RenderImageGeneratedContent.cpp"
+ RelativePath="..\rendering\RenderImageResource.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\RenderImageResource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\RenderImageResourceStyleImage.cpp"
>
</File>
<File
- RelativePath="..\rendering\RenderImageGeneratedContent.h"
+ RelativePath="..\rendering\RenderImageResourceStyleImage.h"
>
</File>
<File
@@ -33002,6 +33030,10 @@
>
</File>
<File
+ RelativePath="..\rendering\style\StylePendingImage.h"
+ >
+ </File>
+ <File
RelativePath="..\rendering\style\StyleRareInheritedData.cpp"
>
</File>
@@ -37073,211 +37105,331 @@
Name="html"
>
<File
- RelativePath="..\html\AsyncImageResizer.cpp"
+ RelativePath="..\fileapi\AsyncFileWriter.h"
>
</File>
<File
- RelativePath="..\html\AsyncImageResizer.h"
+ RelativePath="..\fileapi\Blob.cpp"
>
</File>
<File
- RelativePath="..\html\Blob.cpp"
+ RelativePath="..\fileapi\Blob.h"
>
</File>
<File
- RelativePath="..\html\Blob.h"
+ RelativePath="..\fileapi\BlobBuilder.cpp"
>
</File>
<File
- RelativePath="..\html\BlobBuilder.cpp"
+ RelativePath="..\fileapi\BlobBuilder.h"
>
</File>
<File
- RelativePath="..\html\BlobBuilder.h"
+ RelativePath="..\fileapi\BlobURL.cpp"
>
</File>
<File
- RelativePath="..\html\BlobURL.cpp"
+ RelativePath="..\fileapi\BlobURL.h"
>
</File>
<File
- RelativePath="..\html\BlobURL.h"
+ RelativePath="..\fileapi\DirectoryEntry.cpp"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasGradient.cpp"
+ RelativePath="..\fileapi\DirectoryEntry.h"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasGradient.h"
+ RelativePath="..\fileapi\DirectoryReader.cpp"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasPattern.cpp"
+ RelativePath="..\fileapi\DirectoryReader.h"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasPattern.h"
+ RelativePath="..\fileapi\DOMFilePath.cpp"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasPixelArray.cpp"
+ RelativePath="..\fileapi\DOMFilePath.h"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasPixelArray.h"
+ RelativePath="..\fileapi\DOMFileSystem.cpp"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasRenderingContext.cpp"
+ RelativePath="..\fileapi\DOMFileSystem.h"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasRenderingContext.h"
+ RelativePath="..\fileapi\EntriesCallback.h"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasRenderingContext2D.cpp"
+ RelativePath="..\fileapi\Entry.cpp"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasRenderingContext2D.h"
+ RelativePath="..\fileapi\Entry.h"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasStyle.cpp"
+ RelativePath="..\fileapi\EntryArray.cpp"
>
</File>
<File
- RelativePath="..\html\canvas\CanvasStyle.h"
+ RelativePath="..\fileapi\EntryArray.h"
>
</File>
<File
- RelativePath="..\html\CollectionCache.cpp"
+ RelativePath="..\fileapi\EntryCallback.h"
>
- <FileConfiguration
- Name="Release_PGO|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="true"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\html\CollectionCache.h"
+ RelativePath="..\fileapi\ErrorCallback.h"
>
</File>
<File
- RelativePath="..\html\CollectionType.h"
+ RelativePath="..\fileapi\File.cpp"
>
</File>
<File
- RelativePath="..\html\CSSPreloadScanner.cpp"
+ RelativePath="..\fileapi\File.h"
>
</File>
<File
- RelativePath="..\html\CSSPreloadScanner.h"
+ RelativePath="..\fileapi\FileEntry.cpp"
>
</File>
<File
- RelativePath="..\html\DataGridColumn.cpp"
+ RelativePath="..\fileapi\FileEntry.h"
>
</File>
<File
- RelativePath="..\html\DataGridColumn.h"
+ RelativePath="..\fileapi\FileError.h"
>
</File>
<File
- RelativePath="..\html\DataGridColumnList.cpp"
+ RelativePath="..\fileapi\FileException.h"
>
</File>
<File
- RelativePath="..\html\DataGridColumnList.h"
+ RelativePath="..\fileapi\FileList.cpp"
>
</File>
<File
- RelativePath="..\html\DataGridDataSource.h"
+ RelativePath="..\fileapi\FileList.h"
>
</File>
<File
- RelativePath="..\html\DateComponents.cpp"
+ RelativePath="..\fileapi\FileReader.cpp"
>
</File>
<File
- RelativePath="..\html\DateComponents.h"
+ RelativePath="..\fileapi\FileReader.h"
>
</File>
<File
- RelativePath="..\html\DOMDataGridDataSource.cpp"
+ RelativePath="..\fileapi\FileReaderSync.cpp"
>
</File>
<File
- RelativePath="..\html\DOMDataGridDataSource.h"
+ RelativePath="..\fileapi\FileReaderSync.h"
>
</File>
<File
- RelativePath="..\html\DOMFormData.cpp"
+ RelativePath="..\fileapi\FileStreamProxy.cpp"
>
</File>
<File
- RelativePath="..\html\DOMFormData.h"
+ RelativePath="..\fileapi\FileStreamProxy.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileSystemCallback.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileSystemCallbacks.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileSystemCallbacks.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileThread.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileThread.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileThreadTask.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileWriter.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileWriter.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\FileWriterClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\Flags.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\LocalFileSystem.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\LocalFileSystem.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\Metadata.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\MetadataCallback.h"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\ThreadableBlobRegistry.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\fileapi\ThreadableBlobRegistry.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\AsyncImageResizer.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\AsyncImageResizer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasGradient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasGradient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasPattern.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasPattern.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasPixelArray.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasPixelArray.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasRenderingContext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasRenderingContext.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\canvas\CanvasRenderingContext2D.cpp"
>
</File>
<File
- RelativePath="..\html\File.cpp"
+ RelativePath="..\html\canvas\CanvasRenderingContext2D.h"
>
</File>
<File
- RelativePath="..\html\File.h"
+ RelativePath="..\html\canvas\CanvasStyle.cpp"
>
</File>
<File
- RelativePath="..\html\FileError.h"
+ RelativePath="..\html\canvas\CanvasStyle.h"
>
</File>
<File
- RelativePath="..\html\FileList.cpp"
+ RelativePath="..\html\CollectionCache.cpp"
>
+ <FileConfiguration
+ Name="Release_PGO|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ />
+ </FileConfiguration>
</File>
<File
- RelativePath="..\html\FileList.h"
+ RelativePath="..\html\CollectionCache.h"
>
</File>
<File
- RelativePath="..\html\FileReader.cpp"
+ RelativePath="..\html\CollectionType.h"
>
</File>
<File
- RelativePath="..\html\FileReader.h"
+ RelativePath="..\html\DataGridColumn.cpp"
>
</File>
<File
- RelativePath="..\html\FileStreamProxy.cpp"
+ RelativePath="..\html\DataGridColumn.h"
>
</File>
<File
- RelativePath="..\html\FileStreamProxy.h"
+ RelativePath="..\html\DataGridColumnList.cpp"
>
</File>
<File
- RelativePath="..\html\FileThread.cpp"
+ RelativePath="..\html\DataGridColumnList.h"
>
</File>
<File
- RelativePath="..\html\FileThread.h"
+ RelativePath="..\html\DataGridDataSource.h"
>
</File>
<File
- RelativePath="..\html\FileThreadTask.h"
+ RelativePath="..\html\DateComponents.cpp"
>
</File>
<File
- RelativePath="..\html\FileWriter.cpp"
+ RelativePath="..\html\DateComponents.h"
>
</File>
<File
- RelativePath="..\html\FileWriter.h"
+ RelativePath="..\html\DOMDataGridDataSource.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\DOMDataGridDataSource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\DOMFormData.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\DOMFormData.h"
>
</File>
<File
@@ -37921,14 +38073,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLConstructionSite.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLConstructionSite.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLDataGridCellElement.cpp"
>
<FileConfiguration
@@ -38385,14 +38529,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLDocumentParser.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLDocumentParser.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLElement.cpp"
>
<FileConfiguration
@@ -38453,14 +38589,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLElementStack.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLElementStack.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLEmbedElement.cpp"
>
<FileConfiguration
@@ -38517,22 +38645,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLEntityParser.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLEntityParser.h"
- >
- </File>
- <File
- RelativePath="..\html\HTMLEntitySearch.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLEntitySearch.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLFieldSetElement.cpp"
>
<FileConfiguration
@@ -38645,14 +38757,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLFormattingElementList.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLFormattingElementList.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLFormCollection.cpp"
>
</File>
@@ -40553,14 +40657,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLParserScheduler.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLParserScheduler.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLPlugInElement.cpp"
>
<FileConfiguration
@@ -40729,14 +40825,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLPreloadScanner.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLPreloadScanner.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLProgressElement.cpp"
>
<FileConfiguration
@@ -40905,14 +40993,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLScriptRunner.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLScriptRunner.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLSelectElement.cpp"
>
<FileConfiguration
@@ -41593,22 +41673,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLTokenizer.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLTokenizer.h"
- >
- </File>
- <File
- RelativePath="..\html\HTMLTreeBuilder.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLTreeBuilder.h"
- >
- </File>
- <File
RelativePath="..\html\HTMLUListElement.cpp"
>
<FileConfiguration
@@ -41729,14 +41793,6 @@
>
</File>
<File
- RelativePath="..\html\HTMLViewSourceParser.cpp"
- >
- </File>
- <File
- RelativePath="..\html\HTMLViewSourceParser.h"
- >
- </File>
- <File
RelativePath="..\html\ImageData.cpp"
>
</File>
@@ -41764,6 +41820,122 @@
RelativePath="..\html\MediaError.h"
>
</File>
+ <Filter
+ Name="parser"
+ >
+ <File
+ RelativePath="..\html\parser\CSSPreloadScanner.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\CSSPreloadScanner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLConstructionSite.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLConstructionSite.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLDocumentParser.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLDocumentParser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLEntityParser.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLEntityParser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLElementStack.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLElementStack.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLEntitySearch.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLEntitySearch.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLFormattingElementList.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLFormattingElementList.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLParserScheduler.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLParserScheduler.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLPreloadScanner.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLPreloadScanner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLScriptRunner.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLScriptRunner.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLScriptRunnerHost.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLToken.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLTokenizer.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLTokenizer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLTreeBuilder.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLTreeBuilder.h"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLViewSourceParser.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\parser\HTMLViewSourceParser.h"
+ >
+ </File>
+ </Filter>
<File
RelativePath="..\html\StepRange.cpp"
>
@@ -41773,14 +41945,6 @@
>
</File>
<File
- RelativePath="..\html\ThreadableBlobRegistry.cpp"
- >
- </File>
- <File
- RelativePath="..\html\ThreadableBlobRegistry.h"
- >
- </File>
- <File
RelativePath="..\html\TimeRanges.cpp"
>
</File>
@@ -49256,6 +49420,10 @@
>
</File>
<File
+ RelativePath="..\bindings\js\ScriptHeapSnapshot.h"
+ >
+ </File>
+ <File
RelativePath="..\bindings\js\ScriptInstance.h"
>
</File>
@@ -51189,90 +51357,6 @@
>
</File>
<File
- RelativePath="..\storage\DirectoryEntry.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\DirectoryEntry.h"
- >
- </File>
- <File
- RelativePath="..\storage\DirectoryReader.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\DirectoryReader.h"
- >
- </File>
- <File
- RelativePath="..\storage\DOMFilePath.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\DOMFilePath.h"
- >
- </File>
- <File
- RelativePath="..\storage\DOMFileSystem.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\DOMFileSystem.h"
- >
- </File>
- <File
- RelativePath="..\storage\EntriesCallback.h"
- >
- </File>
- <File
- RelativePath="..\storage\Entry.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\Entry.h"
- >
- </File>
- <File
- RelativePath="..\storage\EntryArray.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\EntryArray.h"
- >
- </File>
- <File
- RelativePath="..\storage\EntryCallback.h"
- >
- </File>
- <File
- RelativePath="..\storage\ErrorCallback.h"
- >
- </File>
- <File
- RelativePath="..\storage\FileEntry.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\FileEntry.h"
- >
- </File>
- <File
- RelativePath="..\storage\FileSystemCallback.h"
- >
- </File>
- <File
- RelativePath="..\storage\FileSystemCallbacks.cpp"
- >
- </File>
- <File
- RelativePath="..\storage\FileSystemCallbacks.h"
- >
- </File>
- <File
- RelativePath="..\storage\Flags.h"
- >
- </File>
- <File
RelativePath="..\storage\IDBAny.cpp"
>
</File>
@@ -51469,14 +51553,6 @@
>
</File>
<File
- RelativePath="..\storage\Metadata.h"
- >
- </File>
- <File
- RelativePath="..\storage\MetadataCallback.h"
- >
- </File>
- <File
RelativePath="..\storage\OriginQuotaManager.cpp"
>
</File>
@@ -52008,6 +52084,10 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\AuditFormatters.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\AuditLauncherView.js"
>
</File>
@@ -52128,6 +52208,14 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\ExtensionAuditCategory.js"
+ >
+ </File>
+ <File
+ RelativePath="..\inspector\front-end\ExtensionCommon.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\ExtensionPanel.js"
>
</File>
@@ -52188,6 +52276,10 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\HeapSnapshotView.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\MetricsSidebarPane.js"
>
</File>
diff --git a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
index 579a610..c98e13b 100644
--- a/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
+++ b/WebCore/WebCore.vcproj/WebCoreCommon.vsprops
@@ -7,7 +7,7 @@
>
<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)..\mathml&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;;&quot;$(WebKitLibrariesDir)\include\zlib&quot;"
+ 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)..\fileapi&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)..\html\parser&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)..\mathml&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;;&quot;$(WebKitLibrariesDir)\include\zlib&quot;"
PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index d7633e3..c8b88ec 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -120,6 +120,8 @@
085B05C311FAE16C004D65F6 /* SVGResourcesCycleSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 085B05C111FAE16C004D65F6 /* SVGResourcesCycleSolver.h */; };
085B92BA0EFDE73D00E6123C /* FormDataBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 085B92B80EFDE73D00E6123C /* FormDataBuilder.cpp */; };
085B92BB0EFDE73D00E6123C /* FormDataBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 085B92B90EFDE73D00E6123C /* FormDataBuilder.h */; settings = {ATTRIBUTES = (); }; };
+ 08641D4712142F7D008DE9F6 /* RenderImageResourceStyleImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08641D4512142F7D008DE9F6 /* RenderImageResourceStyleImage.cpp */; };
+ 08641D4812142F7D008DE9F6 /* RenderImageResourceStyleImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 08641D4612142F7D008DE9F6 /* RenderImageResourceStyleImage.h */; settings = {ATTRIBUTES = (Private, ); }; };
0865CCE60EDDF51B00DF9EC3 /* WMLNoopElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0865CCE40EDDF51B00DF9EC3 /* WMLNoopElement.cpp */; };
0865CCE70EDDF51B00DF9EC3 /* WMLNoopElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 0865CCE50EDDF51B00DF9EC3 /* WMLNoopElement.h */; };
086A400611F6D6B7002CEC53 /* RenderSVGResourceContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 086A400511F6D6B7002CEC53 /* RenderSVGResourceContainer.cpp */; };
@@ -203,6 +205,8 @@
08E6A2E90EEE035200AC1206 /* WMLPostfieldElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6A2E70EEE035200AC1206 /* WMLPostfieldElement.h */; };
08E6E0F10EFF42BA00029FBF /* WMLFieldSetElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */; };
08E6E0F20EFF42BA00029FBF /* WMLFieldSetElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */; };
+ 08F2F0091213E61700DCEC48 /* RenderImageResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08F2F0071213E61700DCEC48 /* RenderImageResource.cpp */; };
+ 08F2F00A1213E61700DCEC48 /* RenderImageResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F2F0081213E61700DCEC48 /* RenderImageResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.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 */; };
@@ -674,7 +678,6 @@
2E2D99EC10E2BD3900496337 /* DOMBlobInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */; };
2E3BBF071162DA1100B9409A /* UUID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E3BBF051162DA1100B9409A /* UUID.cpp */; };
2E3BBF081162DA1100B9409A /* UUID.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E3BBF061162DA1100B9409A /* UUID.h */; };
- 2E3BC0BD117D3A4F00B9409A /* FileError.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E3BC0BB117D3A4F00B9409A /* FileError.h */; };
2E3BC0CA117D3E0800B9409A /* JSFileError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */; };
2E3BC0CB117D3E0800B9409A /* JSFileError.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E3BC0C9117D3E0800B9409A /* JSFileError.h */; };
2E3BC108117D479800B9409A /* DOMFileError.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E3BC106117D479800B9409A /* DOMFileError.h */; };
@@ -699,11 +702,7 @@
2E4346590F546A9900B0F1BA /* CrossThreadCopier.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */; };
2E94F43B119207DA00B7F75D /* JSFileReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E94F439119207DA00B7F75D /* JSFileReader.cpp */; };
2E94F43C119207DA00B7F75D /* JSFileReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E94F43A119207DA00B7F75D /* JSFileReader.h */; };
- 2E94F4501192096400B7F75D /* FileReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E94F3CB118B908E00B7F75D /* FileReader.cpp */; };
- 2E94F4511192096A00B7F75D /* FileReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E94F3CC118B908E00B7F75D /* FileReader.h */; };
2EA768040FE7126400AB9C8A /* WorkerScriptLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */; };
- 2EAFAF0E10E2AF2D007ED3D6 /* Blob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */; };
- 2EAFAF0F10E2AF2D007ED3D6 /* Blob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */; };
2EB4BCD2121F03E300EC4885 /* BlobResourceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */; };
2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */; };
2ECF7ADC10162B3800427DE7 /* JSErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */; };
@@ -718,10 +717,9 @@
2EDEF1F6121B0EFC00726DB2 /* BlobRegistryImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EDEF1F0121B0EFC00726DB2 /* BlobRegistryImpl.cpp */; };
2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDEF1F1121B0EFC00726DB2 /* BlobRegistryImpl.h */; };
2EDEF1F8121B0EFC00726DB2 /* BlobStorageData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDEF1F2121B0EFC00726DB2 /* BlobStorageData.h */; };
- 2EED575512109ED0007656BB /* BlobURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EED575012109ED0007656BB /* BlobURL.cpp */; };
- 2EED575612109ED0007656BB /* BlobURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EED575112109ED0007656BB /* BlobURL.h */; };
- 2EED57FD1214A9C2007656BB /* ThreadableBlobRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EED57FB1214A9C2007656BB /* ThreadableBlobRegistry.cpp */; };
- 2EED57FE1214A9C2007656BB /* ThreadableBlobRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EED57FC1214A9C2007656BB /* ThreadableBlobRegistry.h */; };
+ 2EDF369C122C94B4002F7D4E /* FileReaderSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EDF369A122C94B4002F7D4E /* FileReaderSync.cpp */; };
+ 2EDF369D122C94B4002F7D4E /* FileReaderSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDF369B122C94B4002F7D4E /* FileReaderSync.h */; };
+ 2EDF369F122C94C8002F7D4E /* FileException.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EDF369E122C94C8002F7D4E /* FileException.h */; };
2EF1BFEA121C9F4200C27627 /* FileStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EF1BFE8121C9F4200C27627 /* FileStream.cpp */; };
2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFE9121C9F4200C27627 /* FileStream.h */; settings = {ATTRIBUTES = (Private, ); }; };
2EF1BFF7121CB0BD00C27627 /* AsyncFileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EF1BFF6121CB0BD00C27627 /* AsyncFileStream.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -898,14 +896,15 @@
448AD27C0A48137A0023D179 /* JSHTMLOptionsCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 448AD27A0A4813790023D179 /* JSHTMLOptionsCollectionCustom.cpp */; };
449B19F50FA72ECE0015CA4A /* HTMLParserQuirks.h in Headers */ = {isa = PBXBuildFile; fileRef = 449B19F30FA72ECE0015CA4A /* HTMLParserQuirks.h */; settings = {ATTRIBUTES = (Private, ); }; };
4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
+ 4617E7B1121E078F005EC8A8 /* AsyncFileWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4617E7B0121E078F005EC8A8 /* AsyncFileWriter.h */; };
464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */; };
464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */; };
- 46A26905121B6B4300C41F3A /* FileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A26902121B6B4300C41F3A /* FileWriter.cpp */; };
- 46A26906121B6B4300C41F3A /* FileWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A26903121B6B4300C41F3A /* FileWriter.h */; };
46BD16E30B279473001F0839 /* noneCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46BD16E20B279473001F0839 /* noneCursor.png */; };
46D4F2490AF97E810035385A /* cellCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2460AF97E810035385A /* cellCursor.png */; };
46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2470AF97E810035385A /* contextMenuCursor.png */; };
46D4F24B0AF97E810035385A /* verticalTextCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2480AF97E810035385A /* verticalTextCursor.png */; };
+ 46DA844D1224A0710060D006 /* JSFileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46DA844B1224A0710060D006 /* JSFileWriter.cpp */; };
+ 46DA844E1224A0710060D006 /* JSFileWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 46DA844C1224A0710060D006 /* JSFileWriter.h */; };
46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DA0B0D60170028EE36 /* aliasCursor.png */; };
46F9D5DE0B0D60170028EE36 /* noDropCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DB0B0D60170028EE36 /* noDropCursor.png */; };
46F9D5DF0B0D60170028EE36 /* progressCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46F9D5DC0B0D60170028EE36 /* progressCursor.png */; };
@@ -2382,68 +2381,68 @@
85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; };
85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; };
86243D0111BC31F700CC006A /* JSArrayBufferViewHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */; };
- 8947A82912222C4700D95F2D /* JSMetadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8947A82512222C4700D95F2D /* JSMetadata.cpp */; };
- 8947A82A12222C4700D95F2D /* JSMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 8947A82612222C4700D95F2D /* JSMetadata.h */; };
- 8947A82B12222C4700D95F2D /* JSMetadataCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8947A82712222C4700D95F2D /* JSMetadataCallback.cpp */; };
- 8947A82C12222C4700D95F2D /* JSMetadataCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 8947A82812222C4700D95F2D /* JSMetadataCallback.h */; };
- 8947A83C122234F400D95F2D /* Metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D73120001440082740C /* Metadata.h */; };
- 8947A83D122234F900D95F2D /* MetadataCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D75120001440082740C /* MetadataCallback.h */; };
- 8952535211641B3400CABF00 /* FileThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8952535011641B3400CABF00 /* FileThread.cpp */; };
- 8952535311641B3400CABF00 /* FileThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 8952535111641B3400CABF00 /* FileThread.h */; };
- 895253DC116C4EF500CABF00 /* FileStreamProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 895253DA116C4EF500CABF00 /* FileStreamProxy.cpp */; };
- 895253DD116C4EF500CABF00 /* FileStreamProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 895253DB116C4EF500CABF00 /* FileStreamProxy.h */; };
- 895253DF116C4F0600CABF00 /* FileThreadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 895253DE116C4F0600CABF00 /* FileThreadTask.h */; };
- 89686C9F122244A00076EAA4 /* DOMFilePath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89686C9D122244A00076EAA4 /* DOMFilePath.cpp */; };
- 89686CA0122244A00076EAA4 /* DOMFilePath.h in Headers */ = {isa = PBXBuildFile; fileRef = 89686C9E122244A00076EAA4 /* DOMFilePath.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, ); }; };
- 899ABC261215E4A300F9F219 /* DirectoryEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC201215E4A300F9F219 /* DirectoryEntry.cpp */; };
- 899ABC271215E4A300F9F219 /* DirectoryEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC211215E4A300F9F219 /* DirectoryEntry.h */; };
- 899ABC291215E4A300F9F219 /* DirectoryReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC231215E4A300F9F219 /* DirectoryReader.cpp */; };
- 899ABC2A1215E4A300F9F219 /* DirectoryReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC241215E4A300F9F219 /* DirectoryReader.h */; };
- 899ABC341215E4BE00F9F219 /* EntriesCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC2C1215E4BE00F9F219 /* EntriesCallback.h */; };
- 899ABC361215E4BE00F9F219 /* EntryArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC2E1215E4BE00F9F219 /* EntryArray.cpp */; };
- 899ABC371215E4BE00F9F219 /* EntryArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC2F1215E4BE00F9F219 /* EntryArray.h */; };
- 899ABC391215E4BE00F9F219 /* FileEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC311215E4BE00F9F219 /* FileEntry.cpp */; };
- 899ABC3A1215E4BE00F9F219 /* FileEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC321215E4BE00F9F219 /* FileEntry.h */; };
- 899ABC5D1215EB2A00F9F219 /* JSDirectoryEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC551215EB2A00F9F219 /* JSDirectoryEntry.cpp */; };
- 899ABC5E1215EB2A00F9F219 /* JSDirectoryEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC561215EB2A00F9F219 /* JSDirectoryEntry.h */; };
- 899ABC5F1215EB2A00F9F219 /* JSEntriesCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC571215EB2A00F9F219 /* JSEntriesCallback.cpp */; };
- 899ABC601215EB2A00F9F219 /* JSEntriesCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC581215EB2A00F9F219 /* JSEntriesCallback.h */; };
- 899ABC611215EB2A00F9F219 /* JSEntryArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC591215EB2A00F9F219 /* JSEntryArray.cpp */; };
- 899ABC621215EB2A00F9F219 /* JSEntryArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC5A1215EB2A00F9F219 /* JSEntryArray.h */; };
- 899ABC631215EB2A00F9F219 /* JSFileEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC5B1215EB2A00F9F219 /* JSFileEntry.cpp */; };
- 899ABC641215EB2A00F9F219 /* JSFileEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC5C1215EB2A00F9F219 /* JSFileEntry.h */; };
- 899ABC6D1215ECEF00F9F219 /* JSDirectoryReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 899ABC6B1215ECEF00F9F219 /* JSDirectoryReader.cpp */; };
- 899ABC6E1215ECEF00F9F219 /* JSDirectoryReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 899ABC6C1215ECEF00F9F219 /* JSDirectoryReader.h */; };
- 899ABC791215F03100F9F219 /* JSDOMFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D8D1200035F0082740C /* JSDOMFileSystem.cpp */; };
- 899ABC7A1215F03100F9F219 /* JSDOMFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D8E1200035F0082740C /* JSDOMFileSystem.h */; };
- 899ABC7B1215F03300F9F219 /* JSEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D4911FF6C900082740C /* JSEntry.cpp */; };
- 899ABC7C1215F03300F9F219 /* JSEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D4A11FF6C900082740C /* JSEntry.h */; };
- 899ABC7D1215F03600F9F219 /* JSEntryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D4B11FF6C900082740C /* JSEntryCallback.cpp */; };
- 899ABC7E1215F03700F9F219 /* JSEntryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D4C11FF6C900082740C /* JSEntryCallback.h */; };
- 899ABC7F1215F03800F9F219 /* JSErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D4D11FF6C900082740C /* JSErrorCallback.cpp */; };
- 899ABC801215F03800F9F219 /* JSErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D4E11FF6C900082740C /* JSErrorCallback.h */; };
- 899ABC811215F03B00F9F219 /* JSFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D92120003760082740C /* JSFlags.h */; };
- 899ABC821215F03B00F9F219 /* JSFlags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D91120003760082740C /* JSFlags.cpp */; };
- 899ABC831215F03C00F9F219 /* JSFileSystemCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D5611FF6CA40082740C /* JSFileSystemCallback.h */; };
- 899ABC841215F03D00F9F219 /* JSFileSystemCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D5511FF6CA40082740C /* JSFileSystemCallback.cpp */; };
- 899ABC861215F0D800F9F219 /* DOMFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D1911FF58A50082740C /* DOMFileSystem.cpp */; };
- 899ABC871215F0DF00F9F219 /* DOMFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D1A11FF58A50082740C /* DOMFileSystem.h */; };
- 899ABC961215F9DA00F9F219 /* ErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D2011FF58A50082740C /* ErrorCallback.h */; };
- 899ABC971215F9DF00F9F219 /* EntryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D1E11FF58A50082740C /* EntryCallback.h */; };
- 899ABCAA1215FA5500F9F219 /* FileSystemCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D2111FF58A50082740C /* FileSystemCallback.h */; };
- 899ABCAB1215FA5A00F9F219 /* Flags.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D60120001220082740C /* Flags.h */; };
- 899ABCB91215FAB500F9F219 /* Entry.h in Headers */ = {isa = PBXBuildFile; fileRef = 897A2D1D11FF58A50082740C /* Entry.h */; };
- 899ABCBA1215FAB800F9F219 /* Entry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 897A2D1C11FF58A50082740C /* Entry.cpp */; };
+ 89878552122CA064003AABDA /* DirectoryEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878539122CA064003AABDA /* DirectoryEntry.cpp */; };
+ 89878553122CA064003AABDA /* DirectoryEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987853A122CA064003AABDA /* DirectoryEntry.h */; };
+ 89878554122CA064003AABDA /* DirectoryReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987853B122CA064003AABDA /* DirectoryReader.cpp */; };
+ 89878555122CA064003AABDA /* DirectoryReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987853C122CA064003AABDA /* DirectoryReader.h */; };
+ 89878556122CA064003AABDA /* DOMFilePath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987853D122CA064003AABDA /* DOMFilePath.cpp */; };
+ 89878557122CA064003AABDA /* DOMFilePath.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987853E122CA064003AABDA /* DOMFilePath.h */; };
+ 89878558122CA064003AABDA /* DOMFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987853F122CA064003AABDA /* DOMFileSystem.cpp */; };
+ 89878559122CA064003AABDA /* DOMFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878540122CA064003AABDA /* DOMFileSystem.h */; };
+ 8987855A122CA064003AABDA /* EntriesCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878541122CA064003AABDA /* EntriesCallback.h */; };
+ 8987855B122CA064003AABDA /* Entry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878542122CA064003AABDA /* Entry.cpp */; };
+ 8987855C122CA064003AABDA /* Entry.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878543122CA064003AABDA /* Entry.h */; };
+ 8987855D122CA064003AABDA /* EntryArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878544122CA064003AABDA /* EntryArray.cpp */; };
+ 8987855E122CA064003AABDA /* EntryArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878545122CA064003AABDA /* EntryArray.h */; };
+ 8987855F122CA064003AABDA /* EntryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878546122CA064003AABDA /* EntryCallback.h */; };
+ 89878560122CA064003AABDA /* ErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878547122CA064003AABDA /* ErrorCallback.h */; };
+ 89878561122CA064003AABDA /* FileEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878548122CA064003AABDA /* FileEntry.cpp */; };
+ 89878562122CA064003AABDA /* FileEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878549122CA064003AABDA /* FileEntry.h */; };
+ 89878563122CA064003AABDA /* FileSystemCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987854A122CA064003AABDA /* FileSystemCallback.h */; };
+ 89878564122CA064003AABDA /* FileSystemCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987854B122CA064003AABDA /* FileSystemCallbacks.cpp */; };
+ 89878565122CA064003AABDA /* FileSystemCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987854C122CA064003AABDA /* FileSystemCallbacks.h */; };
+ 89878566122CA064003AABDA /* Flags.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987854D122CA064003AABDA /* Flags.h */; };
+ 89878567122CA064003AABDA /* LocalFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987854E122CA064003AABDA /* LocalFileSystem.cpp */; };
+ 89878568122CA064003AABDA /* LocalFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987854F122CA064003AABDA /* LocalFileSystem.h */; };
+ 89878569122CA064003AABDA /* Metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878550122CA064003AABDA /* Metadata.h */; };
+ 8987856A122CA064003AABDA /* MetadataCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878551122CA064003AABDA /* MetadataCallback.h */; };
+ 8987858A122CA26A003AABDA /* JSDirectoryEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878586122CA26A003AABDA /* JSDirectoryEntry.cpp */; };
+ 8987858B122CA26A003AABDA /* JSDirectoryEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878587122CA26A003AABDA /* JSDirectoryEntry.h */; };
+ 8987858C122CA26A003AABDA /* JSDirectoryReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878588122CA26A003AABDA /* JSDirectoryReader.cpp */; };
+ 8987858D122CA26A003AABDA /* JSDirectoryReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878589122CA26A003AABDA /* JSDirectoryReader.h */; };
+ 898785A4122CA2A7003AABDA /* JSDOMFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987858E122CA2A7003AABDA /* JSDOMFileSystem.cpp */; };
+ 898785A5122CA2A7003AABDA /* JSDOMFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987858F122CA2A7003AABDA /* JSDOMFileSystem.h */; };
+ 898785A6122CA2A7003AABDA /* JSEntriesCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878590122CA2A7003AABDA /* JSEntriesCallback.cpp */; };
+ 898785A7122CA2A7003AABDA /* JSEntriesCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878591122CA2A7003AABDA /* JSEntriesCallback.h */; };
+ 898785A8122CA2A7003AABDA /* JSEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878592122CA2A7003AABDA /* JSEntry.cpp */; };
+ 898785A9122CA2A7003AABDA /* JSEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878593122CA2A7003AABDA /* JSEntry.h */; };
+ 898785AA122CA2A7003AABDA /* JSEntryArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878594122CA2A7003AABDA /* JSEntryArray.cpp */; };
+ 898785AB122CA2A7003AABDA /* JSEntryArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878595122CA2A7003AABDA /* JSEntryArray.h */; };
+ 898785AC122CA2A7003AABDA /* JSEntryCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878596122CA2A7003AABDA /* JSEntryCallback.cpp */; };
+ 898785AD122CA2A7003AABDA /* JSEntryCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878597122CA2A7003AABDA /* JSEntryCallback.h */; };
+ 898785AE122CA2A7003AABDA /* JSErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89878598122CA2A7003AABDA /* JSErrorCallback.cpp */; };
+ 898785AF122CA2A7003AABDA /* JSErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 89878599122CA2A7003AABDA /* JSErrorCallback.h */; };
+ 898785B0122CA2A7003AABDA /* JSFileEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987859A122CA2A7003AABDA /* JSFileEntry.cpp */; };
+ 898785B1122CA2A7003AABDA /* JSFileEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987859B122CA2A7003AABDA /* JSFileEntry.h */; };
+ 898785B2122CA2A7003AABDA /* JSFileSystemCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987859C122CA2A7003AABDA /* JSFileSystemCallback.cpp */; };
+ 898785B3122CA2A7003AABDA /* JSFileSystemCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987859D122CA2A7003AABDA /* JSFileSystemCallback.h */; };
+ 898785B4122CA2A7003AABDA /* JSFlags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8987859E122CA2A7003AABDA /* JSFlags.cpp */; };
+ 898785B5122CA2A7003AABDA /* JSFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 8987859F122CA2A7003AABDA /* JSFlags.h */; };
+ 898785B6122CA2A7003AABDA /* JSMetadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 898785A0122CA2A7003AABDA /* JSMetadata.cpp */; };
+ 898785B7122CA2A7003AABDA /* JSMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 898785A1122CA2A7003AABDA /* JSMetadata.h */; };
+ 898785B8122CA2A7003AABDA /* JSMetadataCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 898785A2122CA2A7003AABDA /* JSMetadataCallback.cpp */; };
+ 898785B9122CA2A7003AABDA /* JSMetadataCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 898785A3122CA2A7003AABDA /* JSMetadataCallback.h */; };
+ 898785F0122E1E87003AABDA /* JSFileException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 898785EE122E1E87003AABDA /* JSFileException.cpp */; };
+ 898785F1122E1E87003AABDA /* JSFileException.h in Headers */ = {isa = PBXBuildFile; fileRef = 898785EF122E1E87003AABDA /* JSFileException.h */; };
+ 898785F4122E1EAC003AABDA /* JSFileReaderSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 898785F2122E1EAC003AABDA /* JSFileReaderSync.cpp */; };
+ 898785F5122E1EAC003AABDA /* JSFileReaderSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 898785F3122E1EAC003AABDA /* JSFileReaderSync.h */; };
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 */; };
- 89C0DD7A121F0C69009E17CA /* FileSystemCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89C0DD78121F0C69009E17CA /* FileSystemCallbacks.cpp */; };
- 89C0DD7B121F0C69009E17CA /* FileSystemCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 89C0DD79121F0C69009E17CA /* FileSystemCallbacks.h */; };
89CD029311C85B870070B791 /* JSBlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89CD029111C85B870070B791 /* JSBlobBuilder.cpp */; };
89CD029411C85B870070B791 /* JSBlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 89CD029211C85B870070B791 /* JSBlobBuilder.h */; };
+ 89D08D9F12228451001241DF /* AsyncFileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89D08D9C12228451001241DF /* AsyncFileSystem.cpp */; };
+ 89D08DA012228451001241DF /* AsyncFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 89D08D9D12228451001241DF /* AsyncFileSystem.h */; };
+ 89D08DA112228451001241DF /* AsyncFileSystemCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 89D08D9E12228451001241DF /* AsyncFileSystemCallbacks.h */; };
8A12E35D11FA33280025836A /* DocumentLoadTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A12E35C11FA33280025836A /* DocumentLoadTiming.h */; settings = {ATTRIBUTES = (Private, ); }; };
8A413AE01207BBA50082016E /* AsyncScriptRunner.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A413ADE1207BBA50082016E /* AsyncScriptRunner.h */; settings = {ATTRIBUTES = (Private, ); }; };
8A413AE11207BBA50082016E /* AsyncScriptRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A413ADF1207BBA50082016E /* AsyncScriptRunner.cpp */; };
@@ -2732,12 +2731,58 @@
973889A1116EA9DC00ADF313 /* DocumentWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9738899F116EA9DC00ADF313 /* DocumentWriter.h */; settings = {ATTRIBUTES = (Private, ); }; };
973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 973E325410883B7C005BC493 /* ResourceLoadNotifier.cpp */; };
973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 973E325510883B7C005BC493 /* ResourceLoadNotifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 976E2BA711CAE4DE006C56A0 /* CSSPreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976E2BA511CAE4DE006C56A0 /* CSSPreloadScanner.cpp */; };
- 976E2BA811CAE4DE006C56A0 /* CSSPreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 976E2BA611CAE4DE006C56A0 /* CSSPreloadScanner.h */; };
- 976E896011C0CA3A00EA9CA9 /* HTMLEntityParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976E895E11C0CA3A00EA9CA9 /* HTMLEntityParser.cpp */; };
- 976E896111C0CA3A00EA9CA9 /* HTMLEntityParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 976E895F11C0CA3A00EA9CA9 /* HTMLEntityParser.h */; };
- 978B6FC912128821001595EF /* HTMLViewSourceParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978B6FC712128821001595EF /* HTMLViewSourceParser.cpp */; };
- 978B6FCA12128821001595EF /* HTMLViewSourceParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 978B6FC812128821001595EF /* HTMLViewSourceParser.h */; };
+ 976D6C77122B8A3D001FD1F7 /* AsyncFileWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C58122B8A3D001FD1F7 /* AsyncFileWriter.h */; };
+ 976D6C78122B8A3D001FD1F7 /* Blob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C59122B8A3D001FD1F7 /* Blob.cpp */; };
+ 976D6C79122B8A3D001FD1F7 /* Blob.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C5A122B8A3D001FD1F7 /* Blob.h */; };
+ 976D6C7B122B8A3D001FD1F7 /* BlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C5C122B8A3D001FD1F7 /* BlobBuilder.cpp */; };
+ 976D6C7C122B8A3D001FD1F7 /* BlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C5D122B8A3D001FD1F7 /* BlobBuilder.h */; };
+ 976D6C7E122B8A3D001FD1F7 /* BlobURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C5F122B8A3D001FD1F7 /* BlobURL.cpp */; };
+ 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C60122B8A3D001FD1F7 /* BlobURL.h */; };
+ 976D6C80122B8A3D001FD1F7 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C61122B8A3D001FD1F7 /* File.cpp */; };
+ 976D6C81122B8A3D001FD1F7 /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C62122B8A3D001FD1F7 /* File.h */; };
+ 976D6C83122B8A3D001FD1F7 /* FileError.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C64122B8A3D001FD1F7 /* FileError.h */; };
+ 976D6C85122B8A3D001FD1F7 /* FileList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C66122B8A3D001FD1F7 /* FileList.cpp */; };
+ 976D6C86122B8A3D001FD1F7 /* FileList.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C67122B8A3D001FD1F7 /* FileList.h */; };
+ 976D6C88122B8A3D001FD1F7 /* FileReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C69122B8A3D001FD1F7 /* FileReader.cpp */; };
+ 976D6C89122B8A3D001FD1F7 /* FileReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C6A122B8A3D001FD1F7 /* FileReader.h */; };
+ 976D6C8B122B8A3D001FD1F7 /* FileStreamProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C6C122B8A3D001FD1F7 /* FileStreamProxy.cpp */; };
+ 976D6C8C122B8A3D001FD1F7 /* FileStreamProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C6D122B8A3D001FD1F7 /* FileStreamProxy.h */; };
+ 976D6C8D122B8A3D001FD1F7 /* FileThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C6E122B8A3D001FD1F7 /* FileThread.cpp */; };
+ 976D6C8E122B8A3D001FD1F7 /* FileThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C6F122B8A3D001FD1F7 /* FileThread.h */; };
+ 976D6C8F122B8A3D001FD1F7 /* FileThreadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C70122B8A3D001FD1F7 /* FileThreadTask.h */; };
+ 976D6C90122B8A3D001FD1F7 /* FileWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C71122B8A3D001FD1F7 /* FileWriter.cpp */; };
+ 976D6C91122B8A3D001FD1F7 /* FileWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C72122B8A3D001FD1F7 /* FileWriter.h */; };
+ 976D6C93122B8A3D001FD1F7 /* FileWriterClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C74122B8A3D001FD1F7 /* FileWriterClient.h */; };
+ 976D6C94122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976D6C75122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp */; };
+ 976D6C95122B8A3D001FD1F7 /* ThreadableBlobRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C76122B8A3D001FD1F7 /* ThreadableBlobRegistry.h */; };
+ 977B37231228721700B81FF8 /* HTMLElementStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B371F1228721700B81FF8 /* HTMLElementStack.cpp */; };
+ 977B37241228721700B81FF8 /* HTMLElementStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B37201228721700B81FF8 /* HTMLElementStack.h */; };
+ 977B37251228721700B81FF8 /* HTMLTreeBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B37211228721700B81FF8 /* HTMLTreeBuilder.cpp */; };
+ 977B37261228721700B81FF8 /* HTMLTreeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B37221228721700B81FF8 /* HTMLTreeBuilder.h */; };
+ 977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3849122883E900B81FF8 /* CSSPreloadScanner.cpp */; };
+ 977B3863122883E900B81FF8 /* CSSPreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B384A122883E900B81FF8 /* CSSPreloadScanner.h */; };
+ 977B3864122883E900B81FF8 /* HTMLConstructionSite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B384B122883E900B81FF8 /* HTMLConstructionSite.cpp */; };
+ 977B3865122883E900B81FF8 /* HTMLConstructionSite.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B384C122883E900B81FF8 /* HTMLConstructionSite.h */; };
+ 977B3866122883E900B81FF8 /* HTMLDocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B384D122883E900B81FF8 /* HTMLDocumentParser.cpp */; };
+ 977B3867122883E900B81FF8 /* HTMLDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B384E122883E900B81FF8 /* HTMLDocumentParser.h */; };
+ 977B3869122883E900B81FF8 /* HTMLEntityParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3850122883E900B81FF8 /* HTMLEntityParser.cpp */; };
+ 977B386A122883E900B81FF8 /* HTMLEntityParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B3851122883E900B81FF8 /* HTMLEntityParser.h */; };
+ 977B386B122883E900B81FF8 /* HTMLEntitySearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3852122883E900B81FF8 /* HTMLEntitySearch.cpp */; };
+ 977B386C122883E900B81FF8 /* HTMLEntitySearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B3853122883E900B81FF8 /* HTMLEntitySearch.h */; };
+ 977B386D122883E900B81FF8 /* HTMLEntityTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B3854122883E900B81FF8 /* HTMLEntityTable.h */; };
+ 977B386E122883E900B81FF8 /* HTMLFormattingElementList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3855122883E900B81FF8 /* HTMLFormattingElementList.cpp */; };
+ 977B386F122883E900B81FF8 /* HTMLFormattingElementList.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B3856122883E900B81FF8 /* HTMLFormattingElementList.h */; };
+ 977B3870122883E900B81FF8 /* HTMLParserScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3857122883E900B81FF8 /* HTMLParserScheduler.cpp */; };
+ 977B3871122883E900B81FF8 /* HTMLParserScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B3858122883E900B81FF8 /* HTMLParserScheduler.h */; };
+ 977B3872122883E900B81FF8 /* HTMLPreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3859122883E900B81FF8 /* HTMLPreloadScanner.cpp */; };
+ 977B3873122883E900B81FF8 /* HTMLPreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B385A122883E900B81FF8 /* HTMLPreloadScanner.h */; };
+ 977B3874122883E900B81FF8 /* HTMLScriptRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B385B122883E900B81FF8 /* HTMLScriptRunner.cpp */; };
+ 977B3875122883E900B81FF8 /* HTMLScriptRunner.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B385C122883E900B81FF8 /* HTMLScriptRunner.h */; };
+ 977B3876122883E900B81FF8 /* HTMLScriptRunnerHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B385D122883E900B81FF8 /* HTMLScriptRunnerHost.h */; };
+ 977B3877122883E900B81FF8 /* HTMLTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B385E122883E900B81FF8 /* HTMLTokenizer.cpp */; };
+ 977B3878122883E900B81FF8 /* HTMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B385F122883E900B81FF8 /* HTMLTokenizer.h */; };
+ 977B3879122883E900B81FF8 /* HTMLViewSourceParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977B3860122883E900B81FF8 /* HTMLViewSourceParser.cpp */; };
+ 977B387A122883E900B81FF8 /* HTMLViewSourceParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 977B3861122883E900B81FF8 /* HTMLViewSourceParser.h */; };
979F43D31075E44A0000F83B /* RedirectScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 979F43D11075E44A0000F83B /* RedirectScheduler.cpp */; };
979F43D41075E44A0000F83B /* RedirectScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 979F43D21075E44A0000F83B /* RedirectScheduler.h */; settings = {ATTRIBUTES = (Private, ); }; };
97C078501165D5BE003A32EF /* SuffixTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C0784F1165D5BE003A32EF /* SuffixTree.h */; };
@@ -2745,16 +2790,10 @@
97DCE20210807C750057D394 /* HistoryController.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DCE20010807C750057D394 /* HistoryController.h */; settings = {ATTRIBUTES = (Private, ); }; };
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */; };
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; };
- 97E7936511C6030900E649BC /* HTMLPreloadScanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97E7936311C6030900E649BC /* HTMLPreloadScanner.cpp */; };
- 97E7936611C6030900E649BC /* HTMLPreloadScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E7936411C6030900E649BC /* HTMLPreloadScanner.h */; };
- 97E8B35611A23CE200169409 /* HTMLTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97E8B35411A23CE200169409 /* HTMLTokenizer.cpp */; };
- 97E8B35711A23CE200169409 /* HTMLTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E8B35511A23CE200169409 /* HTMLTokenizer.h */; };
- 97E8B3C311A2890800169409 /* HTMLToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E8B3C211A2890800169409 /* HTMLToken.h */; };
- 97EF561011E40783007E026F /* HTMLConstructionSite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */; };
- 97EF561111E40783007E026F /* HTMLConstructionSite.h in Headers */ = {isa = PBXBuildFile; fileRef = 97EF560F11E40783007E026F /* HTMLConstructionSite.h */; };
97EF7DFE107E55B700D7C49C /* ScriptControllerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */; };
9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */; };
9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */; };
+ 9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */; };
9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */; };
9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3123,8 +3162,6 @@
A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A833C80A0A2CF25600D57664 /* XMLNames.cpp */; };
A833C80D0A2CF25600D57664 /* XMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A833C80B0A2CF25600D57664 /* XMLNames.h */; };
A833C8520A2CF52800D57664 /* SVGElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581E609D1508D000E61D7 /* SVGElementFactory.cpp */; };
- A83B3AF011ADEFF500458809 /* HTMLScriptRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A83B3AEE11ADEFF500458809 /* HTMLScriptRunner.cpp */; };
- A83B3AF111ADEFF500458809 /* HTMLScriptRunner.h in Headers */ = {isa = PBXBuildFile; fileRef = A83B3AEF11ADEFF500458809 /* HTMLScriptRunner.h */; };
A83B78FC0CCAFF15000B0825 /* JSSVGFontFaceUriElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A83B78F20CCAFF15000B0825 /* JSSVGFontFaceUriElement.h */; };
A83B78FD0CCAFF15000B0825 /* JSSVGFontFaceUriElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A83B78F30CCAFF15000B0825 /* JSSVGFontFaceUriElement.cpp */; };
A83B78FE0CCAFF15000B0825 /* JSSVGFontFaceSrcElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A83B78F40CCAFF15000B0825 /* JSSVGFontFaceSrcElement.h */; };
@@ -3164,8 +3201,6 @@
A86629D209DA2B48009633A5 /* JSMouseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CC09DA2B47009633A5 /* JSMouseEvent.cpp */; };
A86629D309DA2B48009633A5 /* JSKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CD09DA2B47009633A5 /* JSKeyboardEvent.h */; };
A86629D409DA2B48009633A5 /* JSKeyboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */; };
- A871038A11A2947000DBD50E /* HTMLDocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A871038811A2947000DBD50E /* HTMLDocumentParser.cpp */; };
- A871038B11A2947000DBD50E /* HTMLDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A871038911A2947000DBD50E /* HTMLDocumentParser.h */; };
A871D4560A127CBC00B12A68 /* HTMLPlugInElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A871D44C0A127CBC00B12A68 /* HTMLPlugInElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
A871D4570A127CBC00B12A68 /* HTMLPlugInElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A871D44D0A127CBC00B12A68 /* HTMLPlugInElement.cpp */; };
A871D4580A127CBC00B12A68 /* HTMLParamElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A871D44E0A127CBC00B12A68 /* HTMLParamElement.h */; };
@@ -3224,9 +3259,6 @@
A871DFE30A15376B00B12A68 /* RenderReplaced.h in Headers */ = {isa = PBXBuildFile; fileRef = A871DFDF0A15376B00B12A68 /* RenderReplaced.h */; settings = {ATTRIBUTES = (Private, ); }; };
A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = A871DFE00A15376B00B12A68 /* RenderWidget.h */; settings = {ATTRIBUTES = (Private, ); }; };
A871DFE50A15376B00B12A68 /* RenderWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A871DFE10A15376B00B12A68 /* RenderWidget.cpp */; };
- A879C62511A9D1F70059237A /* HTMLTreeBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A879C62311A9D1F70059237A /* HTMLTreeBuilder.cpp */; };
- A879C62611A9D1F70059237A /* HTMLTreeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = A879C62411A9D1F70059237A /* HTMLTreeBuilder.h */; };
- A87F163511AE841300CBB2E5 /* HTMLScriptRunnerHost.h in Headers */ = {isa = PBXBuildFile; fileRef = A87F163411AE841300CBB2E5 /* HTMLScriptRunnerHost.h */; };
A883DF270F3D045D00F19BF6 /* VisibleSelection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A883DF250F3D045D00F19BF6 /* VisibleSelection.cpp */; };
A883DF280F3D045D00F19BF6 /* VisibleSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = A883DF260F3D045D00F19BF6 /* VisibleSelection.h */; settings = {ATTRIBUTES = (Private, ); }; };
A88AD52F09524B92001DD196 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */; };
@@ -3237,14 +3269,8 @@
A89943290B42338800D7C802 /* BitmapImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A89943270B42338700D7C802 /* BitmapImage.cpp */; };
A89CCC520F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A89CCC500F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.cpp */; };
A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = A89CCC510F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h */; };
- A8A563B411DB3D10003AC2F0 /* HTMLElementStack.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A563B211DB3D10003AC2F0 /* HTMLElementStack.h */; };
- A8A563B511DB3D10003AC2F0 /* HTMLElementStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A563B311DB3D10003AC2F0 /* HTMLElementStack.cpp */; };
- A8A564A511DC0E59003AC2F0 /* HTMLFormattingElementList.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A564A311DC0E59003AC2F0 /* HTMLFormattingElementList.h */; };
- A8A564A611DC0E59003AC2F0 /* HTMLFormattingElementList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A564A411DC0E59003AC2F0 /* HTMLFormattingElementList.cpp */; };
A8A909AC0CBCD6B50029B807 /* RenderSVGTransformableContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A909AA0CBCD6B50029B807 /* RenderSVGTransformableContainer.h */; };
A8A909AD0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A909AB0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp */; };
- A8BC044E1214EB2A00B5F122 /* HTMLEntitySearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 970C4FDF1211266200C3D393 /* HTMLEntitySearch.cpp */; };
- A8BC044F1214EB2B00B5F122 /* HTMLEntitySearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 970C4FE01211266200C3D393 /* HTMLEntitySearch.h */; };
A8BC04921214F69600B5F122 /* HTMLEntityTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8BC04911214F69600B5F122 /* HTMLEntityTable.cpp */; };
A8BCFD05120A046100B5F122 /* SVGPathSeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8BCFD04120A046100B5F122 /* SVGPathSeg.cpp */; };
A8C2280E11D4A59700D5A7D3 /* DocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C2280D11D4A59700D5A7D3 /* DocumentParser.cpp */; };
@@ -3480,8 +3506,6 @@
A8E545BD0CA9D1C20097D09B /* DOMSVGAnimatedAngleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E544BF0CA9D1C20097D09B /* DOMSVGAnimatedAngleInternal.h */; };
A8E545BF0CA9D1C20097D09B /* DOMSVGTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E544C10CA9D1C20097D09B /* DOMSVGTextElement.h */; };
A8E545C10CA9D1C20097D09B /* DOMSVGDescElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E544C30CA9D1C20097D09B /* DOMSVGDescElementInternal.h */; };
- A8E6A78111D1661B00311F4A /* HTMLParserScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = A8E6A77F11D1661B00311F4A /* HTMLParserScheduler.h */; };
- A8E6A78211D1661B00311F4A /* HTMLParserScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8E6A78011D1661B00311F4A /* HTMLParserScheduler.cpp */; };
A8EA73C30A1900E300A8EF5F /* RenderFieldset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8EA73AF0A1900E300A8EF5F /* RenderFieldset.cpp */; };
A8EA73C40A1900E300A8EF5F /* RenderFieldset.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA73B00A1900E300A8EF5F /* RenderFieldset.h */; };
A8EA79F10A1916DF00A8EF5F /* HTMLOListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8EA79E50A1916DF00A8EF5F /* HTMLOListElement.h */; };
@@ -4112,8 +4136,6 @@
B2AFFC7E0D00A5C10030074D /* FontCustomPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */; };
B2AFFC7F0D00A5C10030074D /* SimpleFontDataMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC770D00A5C10030074D /* SimpleFontDataMac.mm */; };
B2AFFC800D00A5C10030074D /* FontMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC780D00A5C10030074D /* FontMac.mm */; };
- B2AFFC810D00A5C10030074D /* FontPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AFFC790D00A5C10030074D /* FontPlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
- B2AFFC820D00A5C10030074D /* FontPlatformDataMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC7A0D00A5C10030074D /* FontPlatformDataMac.mm */; };
B2AFFC830D00A5C10030074D /* GlyphPageTreeNodeMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC7B0D00A5C10030074D /* GlyphPageTreeNodeMac.cpp */; };
B2AFFC930D00A5DF0030074D /* ShapeArabic.c in Sources */ = {isa = PBXBuildFile; fileRef = B2AFFC880D00A5DF0030074D /* ShapeArabic.c */; };
B2AFFC940D00A5DF0030074D /* ShapeArabic.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AFFC890D00A5DF0030074D /* ShapeArabic.h */; };
@@ -4434,6 +4456,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 */; };
+ B5320D6B122A24E9002D1440 /* FontPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = B5320D69122A24E9002D1440 /* FontPlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ B5320D6C122A24E9002D1440 /* FontPlatformDataCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */; };
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 */; };
@@ -4663,7 +4687,7 @@
BC5EB8C40E82031B00B25965 /* ShadowData.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB8C20E82031B00B25965 /* ShadowData.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC5EB9500E82056B00B25965 /* CounterDirectives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5EB94E0E82056B00B25965 /* CounterDirectives.cpp */; };
BC5EB9510E82056B00B25965 /* CounterDirectives.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB94F0E82056B00B25965 /* CounterDirectives.h */; settings = {ATTRIBUTES = (Private, ); }; };
- BC5EB9790E82069200B25965 /* CounterContent.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB9780E82069200B25965 /* CounterContent.h */; };
+ BC5EB9790E82069200B25965 /* CounterContent.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB9780E82069200B25965 /* CounterContent.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC5EB9800E82072500B25965 /* ContentData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5EB97E0E82072500B25965 /* ContentData.cpp */; };
BC5EB9810E82072500B25965 /* ContentData.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB97F0E82072500B25965 /* ContentData.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC5EBA100E823E4700B25965 /* KeyframeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5EBA0E0E823E4700B25965 /* KeyframeList.cpp */; };
@@ -4853,8 +4877,6 @@
BCB16C2D0979C3BD00467741 /* loader.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C140979C3BD00467741 /* loader.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCB16C2E0979C3BD00467741 /* Request.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB16C150979C3BD00467741 /* Request.cpp */; };
BCB16C2F0979C3BD00467741 /* Request.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB16C160979C3BD00467741 /* Request.h */; };
- BCB4F8900DB28DD60039139B /* RenderImageGeneratedContent.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB4F88F0DB28DD60039139B /* RenderImageGeneratedContent.h */; };
- BCB4F8930DB28E530039139B /* RenderImageGeneratedContent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB4F8920DB28E530039139B /* RenderImageGeneratedContent.cpp */; };
BCB773610C17853D00132BA4 /* JSNodeFilterCondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */; };
BCB773620C17853D00132BA4 /* JSNodeFilterCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */; };
BCB773630C17853D00132BA4 /* JSNodeFilterCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */; };
@@ -4908,10 +4930,6 @@
BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C2BD0C17B69E005C90A2 /* JSNamedNodeMap.h */; };
BCD9C2C20C17B69E005C90A2 /* JSNodeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2BE0C17B69E005C90A2 /* JSNodeList.cpp */; };
BCD9C2C30C17B69E005C90A2 /* JSNodeList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */; };
- BCDBB8AC0E088CA500C60FF6 /* FileList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDBB8AA0E088CA500C60FF6 /* FileList.h */; };
- BCDBB8AD0E088CA500C60FF6 /* FileList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDBB8AB0E088CA500C60FF6 /* FileList.cpp */; };
- BCDBB8CD0E08958400C60FF6 /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDBB8CB0E08958400C60FF6 /* File.h */; };
- BCDBB8CE0E08958400C60FF6 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDBB8CC0E08958400C60FF6 /* File.cpp */; };
BCDF317B11F8D683003C5BF8 /* UserTypingGestureIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDF317911F8D683003C5BF8 /* UserTypingGestureIndicator.cpp */; };
BCDF317C11F8D683003C5BF8 /* UserTypingGestureIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDF317A11F8D683003C5BF8 /* UserTypingGestureIndicator.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCDFD48E0E305290009D10AD /* XMLHttpRequestUpload.h in Headers */ = {isa = PBXBuildFile; fileRef = BCDFD48C0E305290009D10AD /* XMLHttpRequestUpload.h */; };
@@ -5910,6 +5928,8 @@
085B05C111FAE16C004D65F6 /* SVGResourcesCycleSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGResourcesCycleSolver.h; sourceTree = "<group>"; };
085B92B80EFDE73D00E6123C /* FormDataBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormDataBuilder.cpp; sourceTree = "<group>"; };
085B92B90EFDE73D00E6123C /* FormDataBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormDataBuilder.h; sourceTree = "<group>"; };
+ 08641D4512142F7D008DE9F6 /* RenderImageResourceStyleImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderImageResourceStyleImage.cpp; sourceTree = "<group>"; };
+ 08641D4612142F7D008DE9F6 /* RenderImageResourceStyleImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderImageResourceStyleImage.h; sourceTree = "<group>"; };
0865CCE40EDDF51B00DF9EC3 /* WMLNoopElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLNoopElement.cpp; sourceTree = "<group>"; };
0865CCE50EDDF51B00DF9EC3 /* WMLNoopElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLNoopElement.h; sourceTree = "<group>"; };
086A400511F6D6B7002CEC53 /* RenderSVGResourceContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceContainer.cpp; sourceTree = "<group>"; };
@@ -5980,6 +6000,8 @@
08E6A2E70EEE035200AC1206 /* WMLPostfieldElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLPostfieldElement.h; sourceTree = "<group>"; };
08E6E0EF0EFF42BA00029FBF /* WMLFieldSetElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLFieldSetElement.cpp; sourceTree = "<group>"; };
08E6E0F00EFF42BA00029FBF /* WMLFieldSetElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLFieldSetElement.h; sourceTree = "<group>"; };
+ 08F2F0071213E61700DCEC48 /* RenderImageResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderImageResource.cpp; sourceTree = "<group>"; };
+ 08F2F0081213E61700DCEC48 /* RenderImageResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderImageResource.h; sourceTree = "<group>"; };
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>"; };
@@ -6495,8 +6517,6 @@
2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMBlobInternal.h; sourceTree = "<group>"; };
2E3BBF051162DA1100B9409A /* UUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UUID.cpp; sourceTree = "<group>"; };
2E3BBF061162DA1100B9409A /* UUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UUID.h; sourceTree = "<group>"; };
- 2E3BC0BB117D3A4F00B9409A /* FileError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileError.h; sourceTree = "<group>"; };
- 2E3BC0BC117D3A4F00B9409A /* FileError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileError.idl; sourceTree = "<group>"; };
2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileError.cpp; sourceTree = "<group>"; };
2E3BC0C9117D3E0800B9409A /* JSFileError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileError.h; sourceTree = "<group>"; };
2E3BC106117D479800B9409A /* DOMFileError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFileError.h; sourceTree = "<group>"; };
@@ -6522,15 +6542,9 @@
2E4346430F546A8200B0F1BA /* WorkerThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerThread.h; path = workers/WorkerThread.h; sourceTree = "<group>"; };
2E4346560F546A9900B0F1BA /* CrossThreadCopier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CrossThreadCopier.cpp; sourceTree = "<group>"; };
2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadCopier.h; sourceTree = "<group>"; };
- 2E94F3CB118B908E00B7F75D /* FileReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileReader.cpp; sourceTree = "<group>"; };
- 2E94F3CC118B908E00B7F75D /* FileReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileReader.h; sourceTree = "<group>"; };
- 2E94F427119205B300B7F75D /* FileReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileReader.idl; sourceTree = "<group>"; };
2E94F439119207DA00B7F75D /* JSFileReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileReader.cpp; sourceTree = "<group>"; };
2E94F43A119207DA00B7F75D /* JSFileReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileReader.h; sourceTree = "<group>"; };
2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerScriptLoaderClient.h; path = workers/WorkerScriptLoaderClient.h; sourceTree = "<group>"; };
- 2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Blob.cpp; sourceTree = "<group>"; };
- 2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Blob.h; sourceTree = "<group>"; };
- 2EAFAF0D10E2AF2D007ED3D6 /* Blob.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Blob.idl; sourceTree = "<group>"; };
2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobResourceHandle.cpp; sourceTree = "<group>"; };
2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobResourceHandle.h; sourceTree = "<group>"; };
2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorEvent.cpp; sourceTree = "<group>"; };
@@ -6546,10 +6560,9 @@
2EDEF1F0121B0EFC00726DB2 /* BlobRegistryImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobRegistryImpl.cpp; sourceTree = "<group>"; };
2EDEF1F1121B0EFC00726DB2 /* BlobRegistryImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobRegistryImpl.h; sourceTree = "<group>"; };
2EDEF1F2121B0EFC00726DB2 /* BlobStorageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobStorageData.h; sourceTree = "<group>"; };
- 2EED575012109ED0007656BB /* BlobURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobURL.cpp; sourceTree = "<group>"; };
- 2EED575112109ED0007656BB /* BlobURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobURL.h; sourceTree = "<group>"; };
- 2EED57FB1214A9C2007656BB /* ThreadableBlobRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadableBlobRegistry.cpp; sourceTree = "<group>"; };
- 2EED57FC1214A9C2007656BB /* ThreadableBlobRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadableBlobRegistry.h; sourceTree = "<group>"; };
+ 2EDF369A122C94B4002F7D4E /* FileReaderSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileReaderSync.cpp; path = fileapi/FileReaderSync.cpp; sourceTree = "<group>"; };
+ 2EDF369B122C94B4002F7D4E /* FileReaderSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileReaderSync.h; path = fileapi/FileReaderSync.h; sourceTree = "<group>"; };
+ 2EDF369E122C94C8002F7D4E /* FileException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileException.h; path = fileapi/FileException.h; sourceTree = "<group>"; };
2EF1BFE8121C9F4200C27627 /* FileStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileStream.cpp; sourceTree = "<group>"; };
2EF1BFE9121C9F4200C27627 /* FileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStream.h; sourceTree = "<group>"; };
2EF1BFF6121CB0BD00C27627 /* AsyncFileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileStream.h; sourceTree = "<group>"; };
@@ -6742,15 +6755,15 @@
449098B10F8F82520076A327 /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; };
449B19F30FA72ECE0015CA4A /* HTMLParserQuirks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLParserQuirks.h; sourceTree = "<group>"; };
4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; };
+ 4617E7B0121E078F005EC8A8 /* AsyncFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileWriter.h; sourceTree = "<group>"; };
464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = crossHairCursor.png; sourceTree = "<group>"; };
464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notAllowedCursor.png; sourceTree = "<group>"; };
- 46A26902121B6B4300C41F3A /* FileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileWriter.cpp; sourceTree = "<group>"; };
- 46A26903121B6B4300C41F3A /* FileWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileWriter.h; sourceTree = "<group>"; };
- 46A26904121B6B4300C41F3A /* FileWriter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileWriter.idl; sourceTree = "<group>"; };
46BD16E20B279473001F0839 /* noneCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noneCursor.png; sourceTree = "<group>"; };
46D4F2460AF97E810035385A /* cellCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cellCursor.png; sourceTree = "<group>"; };
46D4F2470AF97E810035385A /* contextMenuCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = contextMenuCursor.png; sourceTree = "<group>"; };
46D4F2480AF97E810035385A /* verticalTextCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = verticalTextCursor.png; sourceTree = "<group>"; };
+ 46DA844B1224A0710060D006 /* JSFileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileWriter.cpp; sourceTree = "<group>"; };
+ 46DA844C1224A0710060D006 /* JSFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileWriter.h; sourceTree = "<group>"; };
46F9D5DA0B0D60170028EE36 /* aliasCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = aliasCursor.png; sourceTree = "<group>"; };
46F9D5DB0B0D60170028EE36 /* noDropCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noDropCursor.png; sourceTree = "<group>"; };
46F9D5DC0B0D60170028EE36 /* progressCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = progressCursor.png; sourceTree = "<group>"; };
@@ -8246,82 +8259,68 @@
85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEvent.h; sourceTree = "<group>"; };
85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = "<group>"; };
86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferViewHelper.h; sourceTree = "<group>"; };
- 8947A82512222C4700D95F2D /* JSMetadata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMetadata.cpp; sourceTree = "<group>"; };
- 8947A82612222C4700D95F2D /* JSMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMetadata.h; sourceTree = "<group>"; };
- 8947A82712222C4700D95F2D /* JSMetadataCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMetadataCallback.cpp; sourceTree = "<group>"; };
- 8947A82812222C4700D95F2D /* JSMetadataCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMetadataCallback.h; sourceTree = "<group>"; };
- 8952535011641B3400CABF00 /* FileThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileThread.cpp; sourceTree = "<group>"; };
- 8952535111641B3400CABF00 /* FileThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileThread.h; sourceTree = "<group>"; };
- 895253DA116C4EF500CABF00 /* FileStreamProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileStreamProxy.cpp; sourceTree = "<group>"; };
- 895253DB116C4EF500CABF00 /* FileStreamProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileStreamProxy.h; sourceTree = "<group>"; };
- 895253DE116C4F0600CABF00 /* FileThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileThreadTask.h; sourceTree = "<group>"; };
- 89686C9D122244A00076EAA4 /* DOMFilePath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMFilePath.cpp; sourceTree = "<group>"; };
- 89686C9E122244A00076EAA4 /* DOMFilePath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFilePath.h; sourceTree = "<group>"; };
- 897A2D1911FF58A50082740C /* DOMFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMFileSystem.cpp; sourceTree = "<group>"; };
- 897A2D1A11FF58A50082740C /* DOMFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFileSystem.h; sourceTree = "<group>"; };
- 897A2D1B11FF58A50082740C /* DOMFileSystem.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMFileSystem.idl; sourceTree = "<group>"; };
- 897A2D1C11FF58A50082740C /* Entry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Entry.cpp; sourceTree = "<group>"; };
- 897A2D1D11FF58A50082740C /* Entry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Entry.h; sourceTree = "<group>"; };
- 897A2D1E11FF58A50082740C /* EntryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntryCallback.h; sourceTree = "<group>"; };
- 897A2D1F11FF58A50082740C /* EntryCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EntryCallback.idl; sourceTree = "<group>"; };
- 897A2D2011FF58A50082740C /* ErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ErrorCallback.h; sourceTree = "<group>"; };
- 897A2D2111FF58A50082740C /* FileSystemCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileSystemCallback.h; sourceTree = "<group>"; };
- 897A2D3B11FF63860082740C /* Entry.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Entry.idl; sourceTree = "<group>"; };
- 897A2D4911FF6C900082740C /* JSEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntry.cpp; sourceTree = "<group>"; };
- 897A2D4A11FF6C900082740C /* JSEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntry.h; sourceTree = "<group>"; };
- 897A2D4B11FF6C900082740C /* JSEntryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntryCallback.cpp; sourceTree = "<group>"; };
- 897A2D4C11FF6C900082740C /* JSEntryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntryCallback.h; sourceTree = "<group>"; };
- 897A2D4D11FF6C900082740C /* JSErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorCallback.cpp; sourceTree = "<group>"; };
- 897A2D4E11FF6C900082740C /* JSErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSErrorCallback.h; sourceTree = "<group>"; };
- 897A2D5511FF6CA40082740C /* JSFileSystemCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileSystemCallback.cpp; sourceTree = "<group>"; };
- 897A2D5611FF6CA40082740C /* JSFileSystemCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileSystemCallback.h; sourceTree = "<group>"; };
- 897A2D5D120000FF0082740C /* ErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ErrorCallback.idl; sourceTree = "<group>"; };
- 897A2D5F120001220082740C /* FileSystemCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileSystemCallback.idl; sourceTree = "<group>"; };
- 897A2D60120001220082740C /* Flags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flags.h; sourceTree = "<group>"; };
- 897A2D61120001220082740C /* Flags.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Flags.idl; sourceTree = "<group>"; };
- 897A2D73120001440082740C /* Metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Metadata.h; sourceTree = "<group>"; };
- 897A2D74120001440082740C /* Metadata.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Metadata.idl; sourceTree = "<group>"; };
- 897A2D75120001440082740C /* MetadataCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MetadataCallback.h; sourceTree = "<group>"; };
- 897A2D76120001440082740C /* MetadataCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MetadataCallback.idl; sourceTree = "<group>"; };
- 897A2D8D1200035F0082740C /* JSDOMFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFileSystem.cpp; sourceTree = "<group>"; };
- 897A2D8E1200035F0082740C /* JSDOMFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMFileSystem.h; sourceTree = "<group>"; };
- 897A2D91120003760082740C /* JSFlags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFlags.cpp; sourceTree = "<group>"; };
- 897A2D92120003760082740C /* JSFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFlags.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>"; };
- 899ABC201215E4A300F9F219 /* DirectoryEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryEntry.cpp; sourceTree = "<group>"; };
- 899ABC211215E4A300F9F219 /* DirectoryEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryEntry.h; sourceTree = "<group>"; };
- 899ABC221215E4A300F9F219 /* DirectoryEntry.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DirectoryEntry.idl; sourceTree = "<group>"; };
- 899ABC231215E4A300F9F219 /* DirectoryReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DirectoryReader.cpp; sourceTree = "<group>"; };
- 899ABC241215E4A300F9F219 /* DirectoryReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectoryReader.h; sourceTree = "<group>"; };
- 899ABC251215E4A300F9F219 /* DirectoryReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DirectoryReader.idl; sourceTree = "<group>"; };
- 899ABC2C1215E4BE00F9F219 /* EntriesCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntriesCallback.h; sourceTree = "<group>"; };
- 899ABC2D1215E4BE00F9F219 /* EntriesCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EntriesCallback.idl; sourceTree = "<group>"; };
- 899ABC2E1215E4BE00F9F219 /* EntryArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EntryArray.cpp; sourceTree = "<group>"; };
- 899ABC2F1215E4BE00F9F219 /* EntryArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EntryArray.h; sourceTree = "<group>"; };
- 899ABC301215E4BE00F9F219 /* EntryArray.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EntryArray.idl; sourceTree = "<group>"; };
- 899ABC311215E4BE00F9F219 /* FileEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileEntry.cpp; sourceTree = "<group>"; };
- 899ABC321215E4BE00F9F219 /* FileEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileEntry.h; sourceTree = "<group>"; };
- 899ABC331215E4BE00F9F219 /* FileEntry.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileEntry.idl; sourceTree = "<group>"; };
- 899ABC551215EB2A00F9F219 /* JSDirectoryEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryEntry.cpp; sourceTree = "<group>"; };
- 899ABC561215EB2A00F9F219 /* JSDirectoryEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDirectoryEntry.h; sourceTree = "<group>"; };
- 899ABC571215EB2A00F9F219 /* JSEntriesCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntriesCallback.cpp; sourceTree = "<group>"; };
- 899ABC581215EB2A00F9F219 /* JSEntriesCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntriesCallback.h; sourceTree = "<group>"; };
- 899ABC591215EB2A00F9F219 /* JSEntryArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntryArray.cpp; sourceTree = "<group>"; };
- 899ABC5A1215EB2A00F9F219 /* JSEntryArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntryArray.h; sourceTree = "<group>"; };
- 899ABC5B1215EB2A00F9F219 /* JSFileEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileEntry.cpp; sourceTree = "<group>"; };
- 899ABC5C1215EB2A00F9F219 /* JSFileEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileEntry.h; sourceTree = "<group>"; };
- 899ABC6B1215ECEF00F9F219 /* JSDirectoryReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryReader.cpp; sourceTree = "<group>"; };
- 899ABC6C1215ECEF00F9F219 /* JSDirectoryReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDirectoryReader.h; sourceTree = "<group>"; };
+ 89878539122CA064003AABDA /* DirectoryEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryEntry.cpp; path = fileapi/DirectoryEntry.cpp; sourceTree = "<group>"; };
+ 8987853A122CA064003AABDA /* DirectoryEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryEntry.h; path = fileapi/DirectoryEntry.h; sourceTree = "<group>"; };
+ 8987853B122CA064003AABDA /* DirectoryReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DirectoryReader.cpp; path = fileapi/DirectoryReader.cpp; sourceTree = "<group>"; };
+ 8987853C122CA064003AABDA /* DirectoryReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryReader.h; path = fileapi/DirectoryReader.h; sourceTree = "<group>"; };
+ 8987853D122CA064003AABDA /* DOMFilePath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DOMFilePath.cpp; path = fileapi/DOMFilePath.cpp; sourceTree = "<group>"; };
+ 8987853E122CA064003AABDA /* DOMFilePath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMFilePath.h; path = fileapi/DOMFilePath.h; sourceTree = "<group>"; };
+ 8987853F122CA064003AABDA /* DOMFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DOMFileSystem.cpp; path = fileapi/DOMFileSystem.cpp; sourceTree = "<group>"; };
+ 89878540122CA064003AABDA /* DOMFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMFileSystem.h; path = fileapi/DOMFileSystem.h; sourceTree = "<group>"; };
+ 89878541122CA064003AABDA /* EntriesCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EntriesCallback.h; path = fileapi/EntriesCallback.h; sourceTree = "<group>"; };
+ 89878542122CA064003AABDA /* Entry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Entry.cpp; path = fileapi/Entry.cpp; sourceTree = "<group>"; };
+ 89878543122CA064003AABDA /* Entry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Entry.h; path = fileapi/Entry.h; sourceTree = "<group>"; };
+ 89878544122CA064003AABDA /* EntryArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EntryArray.cpp; path = fileapi/EntryArray.cpp; sourceTree = "<group>"; };
+ 89878545122CA064003AABDA /* EntryArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EntryArray.h; path = fileapi/EntryArray.h; sourceTree = "<group>"; };
+ 89878546122CA064003AABDA /* EntryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EntryCallback.h; path = fileapi/EntryCallback.h; sourceTree = "<group>"; };
+ 89878547122CA064003AABDA /* ErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ErrorCallback.h; path = fileapi/ErrorCallback.h; sourceTree = "<group>"; };
+ 89878548122CA064003AABDA /* FileEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileEntry.cpp; path = fileapi/FileEntry.cpp; sourceTree = "<group>"; };
+ 89878549122CA064003AABDA /* FileEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileEntry.h; path = fileapi/FileEntry.h; sourceTree = "<group>"; };
+ 8987854A122CA064003AABDA /* FileSystemCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemCallback.h; path = fileapi/FileSystemCallback.h; sourceTree = "<group>"; };
+ 8987854B122CA064003AABDA /* FileSystemCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileSystemCallbacks.cpp; path = fileapi/FileSystemCallbacks.cpp; sourceTree = "<group>"; };
+ 8987854C122CA064003AABDA /* FileSystemCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemCallbacks.h; path = fileapi/FileSystemCallbacks.h; sourceTree = "<group>"; };
+ 8987854D122CA064003AABDA /* Flags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Flags.h; path = fileapi/Flags.h; sourceTree = "<group>"; };
+ 8987854E122CA064003AABDA /* LocalFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LocalFileSystem.cpp; path = fileapi/LocalFileSystem.cpp; sourceTree = "<group>"; };
+ 8987854F122CA064003AABDA /* LocalFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalFileSystem.h; path = fileapi/LocalFileSystem.h; sourceTree = "<group>"; };
+ 89878550122CA064003AABDA /* Metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Metadata.h; path = fileapi/Metadata.h; sourceTree = "<group>"; };
+ 89878551122CA064003AABDA /* MetadataCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MetadataCallback.h; path = fileapi/MetadataCallback.h; sourceTree = "<group>"; };
+ 89878586122CA26A003AABDA /* JSDirectoryEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryEntry.cpp; sourceTree = "<group>"; };
+ 89878587122CA26A003AABDA /* JSDirectoryEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDirectoryEntry.h; sourceTree = "<group>"; };
+ 89878588122CA26A003AABDA /* JSDirectoryReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDirectoryReader.cpp; sourceTree = "<group>"; };
+ 89878589122CA26A003AABDA /* JSDirectoryReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDirectoryReader.h; sourceTree = "<group>"; };
+ 8987858E122CA2A7003AABDA /* JSDOMFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFileSystem.cpp; sourceTree = "<group>"; };
+ 8987858F122CA2A7003AABDA /* JSDOMFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMFileSystem.h; sourceTree = "<group>"; };
+ 89878590122CA2A7003AABDA /* JSEntriesCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntriesCallback.cpp; sourceTree = "<group>"; };
+ 89878591122CA2A7003AABDA /* JSEntriesCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntriesCallback.h; sourceTree = "<group>"; };
+ 89878592122CA2A7003AABDA /* JSEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntry.cpp; sourceTree = "<group>"; };
+ 89878593122CA2A7003AABDA /* JSEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntry.h; sourceTree = "<group>"; };
+ 89878594122CA2A7003AABDA /* JSEntryArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntryArray.cpp; sourceTree = "<group>"; };
+ 89878595122CA2A7003AABDA /* JSEntryArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntryArray.h; sourceTree = "<group>"; };
+ 89878596122CA2A7003AABDA /* JSEntryCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEntryCallback.cpp; sourceTree = "<group>"; };
+ 89878597122CA2A7003AABDA /* JSEntryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEntryCallback.h; sourceTree = "<group>"; };
+ 89878598122CA2A7003AABDA /* JSErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorCallback.cpp; sourceTree = "<group>"; };
+ 89878599122CA2A7003AABDA /* JSErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSErrorCallback.h; sourceTree = "<group>"; };
+ 8987859A122CA2A7003AABDA /* JSFileEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileEntry.cpp; sourceTree = "<group>"; };
+ 8987859B122CA2A7003AABDA /* JSFileEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileEntry.h; sourceTree = "<group>"; };
+ 8987859C122CA2A7003AABDA /* JSFileSystemCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileSystemCallback.cpp; sourceTree = "<group>"; };
+ 8987859D122CA2A7003AABDA /* JSFileSystemCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileSystemCallback.h; sourceTree = "<group>"; };
+ 8987859E122CA2A7003AABDA /* JSFlags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFlags.cpp; sourceTree = "<group>"; };
+ 8987859F122CA2A7003AABDA /* JSFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFlags.h; sourceTree = "<group>"; };
+ 898785A0122CA2A7003AABDA /* JSMetadata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMetadata.cpp; sourceTree = "<group>"; };
+ 898785A1122CA2A7003AABDA /* JSMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMetadata.h; sourceTree = "<group>"; };
+ 898785A2122CA2A7003AABDA /* JSMetadataCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMetadataCallback.cpp; sourceTree = "<group>"; };
+ 898785A3122CA2A7003AABDA /* JSMetadataCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMetadataCallback.h; sourceTree = "<group>"; };
+ 898785EE122E1E87003AABDA /* JSFileException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileException.cpp; sourceTree = "<group>"; };
+ 898785EF122E1E87003AABDA /* JSFileException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileException.h; sourceTree = "<group>"; };
+ 898785F2122E1EAC003AABDA /* JSFileReaderSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileReaderSync.cpp; sourceTree = "<group>"; };
+ 898785F3122E1EAC003AABDA /* JSFileReaderSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileReaderSync.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>"; };
- 89C0DD78121F0C69009E17CA /* FileSystemCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemCallbacks.cpp; sourceTree = "<group>"; };
- 89C0DD79121F0C69009E17CA /* FileSystemCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileSystemCallbacks.h; sourceTree = "<group>"; };
- 89CD027911C859A80070B791 /* BlobBuilder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BlobBuilder.idl; sourceTree = "<group>"; };
89CD029111C85B870070B791 /* JSBlobBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlobBuilder.cpp; sourceTree = "<group>"; };
89CD029211C85B870070B791 /* JSBlobBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBlobBuilder.h; sourceTree = "<group>"; };
+ 89D08D9C12228451001241DF /* AsyncFileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncFileSystem.cpp; sourceTree = "<group>"; };
+ 89D08D9D12228451001241DF /* AsyncFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileSystem.h; sourceTree = "<group>"; };
+ 89D08D9E12228451001241DF /* AsyncFileSystemCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncFileSystemCallbacks.h; sourceTree = "<group>"; };
8A12E35C11FA33280025836A /* DocumentLoadTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentLoadTiming.h; sourceTree = "<group>"; };
8A413ADE1207BBA50082016E /* AsyncScriptRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncScriptRunner.h; sourceTree = "<group>"; };
8A413ADF1207BBA50082016E /* AsyncScriptRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncScriptRunner.cpp; sourceTree = "<group>"; };
@@ -8591,38 +8590,76 @@
97059974107D975200A50A7C /* PolicyCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyCallback.h; sourceTree = "<group>"; };
97059975107D975200A50A7C /* PolicyChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolicyChecker.cpp; sourceTree = "<group>"; };
97059976107D975200A50A7C /* PolicyChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyChecker.h; sourceTree = "<group>"; };
- 970C4FDF1211266200C3D393 /* HTMLEntitySearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntitySearch.cpp; sourceTree = "<group>"; };
- 970C4FE01211266200C3D393 /* HTMLEntitySearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLEntitySearch.h; sourceTree = "<group>"; };
- 970C4FE11211266200C3D393 /* HTMLEntityTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntityTable.cpp; sourceTree = "<group>"; };
- 970C4FE21211266200C3D393 /* HTMLEntityTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLEntityTable.h; sourceTree = "<group>"; };
9719AEFF11D09F2C00D45831 /* HTMLInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLInputStream.h; sourceTree = "<group>"; };
9738899E116EA9DC00ADF313 /* DocumentWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentWriter.cpp; sourceTree = "<group>"; };
9738899F116EA9DC00ADF313 /* DocumentWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentWriter.h; sourceTree = "<group>"; };
973E325410883B7C005BC493 /* ResourceLoadNotifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadNotifier.cpp; sourceTree = "<group>"; };
973E325510883B7C005BC493 /* ResourceLoadNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoadNotifier.h; sourceTree = "<group>"; };
- 976E2BA511CAE4DE006C56A0 /* CSSPreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPreloadScanner.cpp; sourceTree = "<group>"; };
- 976E2BA611CAE4DE006C56A0 /* CSSPreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSPreloadScanner.h; sourceTree = "<group>"; };
- 976E895E11C0CA3A00EA9CA9 /* HTMLEntityParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntityParser.cpp; sourceTree = "<group>"; };
- 976E895F11C0CA3A00EA9CA9 /* HTMLEntityParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLEntityParser.h; sourceTree = "<group>"; };
- 978B6FC712128821001595EF /* HTMLViewSourceParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLViewSourceParser.cpp; sourceTree = "<group>"; };
- 978B6FC812128821001595EF /* HTMLViewSourceParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLViewSourceParser.h; sourceTree = "<group>"; };
+ 976D6C58122B8A3D001FD1F7 /* AsyncFileWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AsyncFileWriter.h; path = fileapi/AsyncFileWriter.h; sourceTree = "<group>"; };
+ 976D6C59122B8A3D001FD1F7 /* Blob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Blob.cpp; path = fileapi/Blob.cpp; sourceTree = "<group>"; };
+ 976D6C5A122B8A3D001FD1F7 /* Blob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Blob.h; path = fileapi/Blob.h; sourceTree = "<group>"; };
+ 976D6C5C122B8A3D001FD1F7 /* BlobBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlobBuilder.cpp; path = fileapi/BlobBuilder.cpp; sourceTree = "<group>"; };
+ 976D6C5D122B8A3D001FD1F7 /* BlobBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlobBuilder.h; path = fileapi/BlobBuilder.h; sourceTree = "<group>"; };
+ 976D6C5F122B8A3D001FD1F7 /* BlobURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlobURL.cpp; path = fileapi/BlobURL.cpp; sourceTree = "<group>"; };
+ 976D6C60122B8A3D001FD1F7 /* BlobURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlobURL.h; path = fileapi/BlobURL.h; sourceTree = "<group>"; };
+ 976D6C61122B8A3D001FD1F7 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = File.cpp; path = fileapi/File.cpp; sourceTree = "<group>"; };
+ 976D6C62122B8A3D001FD1F7 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = File.h; path = fileapi/File.h; sourceTree = "<group>"; };
+ 976D6C64122B8A3D001FD1F7 /* FileError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileError.h; path = fileapi/FileError.h; sourceTree = "<group>"; };
+ 976D6C66122B8A3D001FD1F7 /* FileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileList.cpp; path = fileapi/FileList.cpp; sourceTree = "<group>"; };
+ 976D6C67122B8A3D001FD1F7 /* FileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileList.h; path = fileapi/FileList.h; sourceTree = "<group>"; };
+ 976D6C69122B8A3D001FD1F7 /* FileReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileReader.cpp; path = fileapi/FileReader.cpp; sourceTree = "<group>"; };
+ 976D6C6A122B8A3D001FD1F7 /* FileReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileReader.h; path = fileapi/FileReader.h; sourceTree = "<group>"; };
+ 976D6C6C122B8A3D001FD1F7 /* FileStreamProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileStreamProxy.cpp; path = fileapi/FileStreamProxy.cpp; sourceTree = "<group>"; };
+ 976D6C6D122B8A3D001FD1F7 /* FileStreamProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileStreamProxy.h; path = fileapi/FileStreamProxy.h; sourceTree = "<group>"; };
+ 976D6C6E122B8A3D001FD1F7 /* FileThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileThread.cpp; path = fileapi/FileThread.cpp; sourceTree = "<group>"; };
+ 976D6C6F122B8A3D001FD1F7 /* FileThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileThread.h; path = fileapi/FileThread.h; sourceTree = "<group>"; };
+ 976D6C70122B8A3D001FD1F7 /* FileThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileThreadTask.h; path = fileapi/FileThreadTask.h; sourceTree = "<group>"; };
+ 976D6C71122B8A3D001FD1F7 /* FileWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileWriter.cpp; path = fileapi/FileWriter.cpp; sourceTree = "<group>"; };
+ 976D6C72122B8A3D001FD1F7 /* FileWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriter.h; path = fileapi/FileWriter.h; sourceTree = "<group>"; };
+ 976D6C74122B8A3D001FD1F7 /* FileWriterClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterClient.h; path = fileapi/FileWriterClient.h; sourceTree = "<group>"; };
+ 976D6C75122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadableBlobRegistry.cpp; path = fileapi/ThreadableBlobRegistry.cpp; sourceTree = "<group>"; };
+ 976D6C76122B8A3D001FD1F7 /* ThreadableBlobRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadableBlobRegistry.h; path = fileapi/ThreadableBlobRegistry.h; sourceTree = "<group>"; };
+ 977B371F1228721700B81FF8 /* HTMLElementStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLElementStack.cpp; path = parser/HTMLElementStack.cpp; sourceTree = "<group>"; };
+ 977B37201228721700B81FF8 /* HTMLElementStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLElementStack.h; path = parser/HTMLElementStack.h; sourceTree = "<group>"; };
+ 977B37211228721700B81FF8 /* HTMLTreeBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLTreeBuilder.cpp; path = parser/HTMLTreeBuilder.cpp; sourceTree = "<group>"; };
+ 977B37221228721700B81FF8 /* HTMLTreeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLTreeBuilder.h; path = parser/HTMLTreeBuilder.h; sourceTree = "<group>"; };
+ 977B3849122883E900B81FF8 /* CSSPreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSPreloadScanner.cpp; path = parser/CSSPreloadScanner.cpp; sourceTree = "<group>"; };
+ 977B384A122883E900B81FF8 /* CSSPreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSPreloadScanner.h; path = parser/CSSPreloadScanner.h; sourceTree = "<group>"; };
+ 977B384B122883E900B81FF8 /* HTMLConstructionSite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLConstructionSite.cpp; path = parser/HTMLConstructionSite.cpp; sourceTree = "<group>"; };
+ 977B384C122883E900B81FF8 /* HTMLConstructionSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLConstructionSite.h; path = parser/HTMLConstructionSite.h; sourceTree = "<group>"; };
+ 977B384D122883E900B81FF8 /* HTMLDocumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLDocumentParser.cpp; path = parser/HTMLDocumentParser.cpp; sourceTree = "<group>"; };
+ 977B384E122883E900B81FF8 /* HTMLDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLDocumentParser.h; path = parser/HTMLDocumentParser.h; sourceTree = "<group>"; };
+ 977B384F122883E900B81FF8 /* HTMLEntityNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = HTMLEntityNames.in; path = parser/HTMLEntityNames.in; sourceTree = "<group>"; };
+ 977B3850122883E900B81FF8 /* HTMLEntityParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLEntityParser.cpp; path = parser/HTMLEntityParser.cpp; sourceTree = "<group>"; };
+ 977B3851122883E900B81FF8 /* HTMLEntityParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLEntityParser.h; path = parser/HTMLEntityParser.h; sourceTree = "<group>"; };
+ 977B3852122883E900B81FF8 /* HTMLEntitySearch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLEntitySearch.cpp; path = parser/HTMLEntitySearch.cpp; sourceTree = "<group>"; };
+ 977B3853122883E900B81FF8 /* HTMLEntitySearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLEntitySearch.h; path = parser/HTMLEntitySearch.h; sourceTree = "<group>"; };
+ 977B3854122883E900B81FF8 /* HTMLEntityTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLEntityTable.h; path = parser/HTMLEntityTable.h; sourceTree = "<group>"; };
+ 977B3855122883E900B81FF8 /* HTMLFormattingElementList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLFormattingElementList.cpp; path = parser/HTMLFormattingElementList.cpp; sourceTree = "<group>"; };
+ 977B3856122883E900B81FF8 /* HTMLFormattingElementList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLFormattingElementList.h; path = parser/HTMLFormattingElementList.h; sourceTree = "<group>"; };
+ 977B3857122883E900B81FF8 /* HTMLParserScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLParserScheduler.cpp; path = parser/HTMLParserScheduler.cpp; sourceTree = "<group>"; };
+ 977B3858122883E900B81FF8 /* HTMLParserScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserScheduler.h; path = parser/HTMLParserScheduler.h; sourceTree = "<group>"; };
+ 977B3859122883E900B81FF8 /* HTMLPreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLPreloadScanner.cpp; path = parser/HTMLPreloadScanner.cpp; sourceTree = "<group>"; };
+ 977B385A122883E900B81FF8 /* HTMLPreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLPreloadScanner.h; path = parser/HTMLPreloadScanner.h; sourceTree = "<group>"; };
+ 977B385B122883E900B81FF8 /* HTMLScriptRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLScriptRunner.cpp; path = parser/HTMLScriptRunner.cpp; sourceTree = "<group>"; };
+ 977B385C122883E900B81FF8 /* HTMLScriptRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLScriptRunner.h; path = parser/HTMLScriptRunner.h; sourceTree = "<group>"; };
+ 977B385D122883E900B81FF8 /* HTMLScriptRunnerHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLScriptRunnerHost.h; path = parser/HTMLScriptRunnerHost.h; sourceTree = "<group>"; };
+ 977B385E122883E900B81FF8 /* HTMLTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLTokenizer.cpp; path = parser/HTMLTokenizer.cpp; sourceTree = "<group>"; };
+ 977B385F122883E900B81FF8 /* HTMLTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLTokenizer.h; path = parser/HTMLTokenizer.h; sourceTree = "<group>"; };
+ 977B3860122883E900B81FF8 /* HTMLViewSourceParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLViewSourceParser.cpp; path = parser/HTMLViewSourceParser.cpp; sourceTree = "<group>"; };
+ 977B3861122883E900B81FF8 /* HTMLViewSourceParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLViewSourceParser.h; path = parser/HTMLViewSourceParser.h; sourceTree = "<group>"; };
979F43D11075E44A0000F83B /* RedirectScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RedirectScheduler.cpp; sourceTree = "<group>"; };
979F43D21075E44A0000F83B /* RedirectScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RedirectScheduler.h; sourceTree = "<group>"; };
97C0784F1165D5BE003A32EF /* SuffixTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuffixTree.h; sourceTree = "<group>"; };
+ 97C1F552122855CB00EDE616 /* HTMLToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLToken.h; path = parser/HTMLToken.h; sourceTree = "<group>"; };
97DCE1FF10807C750057D394 /* HistoryController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryController.cpp; sourceTree = "<group>"; };
97DCE20010807C750057D394 /* HistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryController.h; sourceTree = "<group>"; };
97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSSAuditor.cpp; sourceTree = "<group>"; };
97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = "<group>"; };
- 97E7936311C6030900E649BC /* HTMLPreloadScanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPreloadScanner.cpp; sourceTree = "<group>"; };
- 97E7936411C6030900E649BC /* HTMLPreloadScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPreloadScanner.h; sourceTree = "<group>"; };
- 97E8B35411A23CE200169409 /* HTMLTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTokenizer.cpp; sourceTree = "<group>"; };
- 97E8B35511A23CE200169409 /* HTMLTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTokenizer.h; sourceTree = "<group>"; };
- 97E8B3C211A2890800169409 /* HTMLToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLToken.h; sourceTree = "<group>"; };
- 97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLConstructionSite.cpp; sourceTree = "<group>"; };
- 97EF560F11E40783007E026F /* HTMLConstructionSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLConstructionSite.h; sourceTree = "<group>"; };
97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptControllerBase.cpp; sourceTree = "<group>"; };
9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorProfilerAgent.cpp; sourceTree = "<group>"; };
9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorProfilerAgent.h; sourceTree = "<group>"; };
+ 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptHeapSnapshot.h; sourceTree = "<group>"; };
9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptDebugServer.cpp; sourceTree = "<group>"; };
9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugServer.h; sourceTree = "<group>"; };
9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = "<group>"; };
@@ -8862,8 +8899,6 @@
A833C7F60A2CF1D800D57664 /* xmlattrs.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = xmlattrs.in; sourceTree = "<group>"; };
A833C80A0A2CF25600D57664 /* XMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNames.cpp; sourceTree = "<group>"; };
A833C80B0A2CF25600D57664 /* XMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLNames.h; sourceTree = "<group>"; };
- A83B3AEE11ADEFF500458809 /* HTMLScriptRunner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLScriptRunner.cpp; sourceTree = "<group>"; };
- A83B3AEF11ADEFF500458809 /* HTMLScriptRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLScriptRunner.h; sourceTree = "<group>"; };
A83B78F20CCAFF15000B0825 /* JSSVGFontFaceUriElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFontFaceUriElement.h; sourceTree = "<group>"; };
A83B78F30CCAFF15000B0825 /* JSSVGFontFaceUriElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFontFaceUriElement.cpp; sourceTree = "<group>"; };
A83B78F40CCAFF15000B0825 /* JSSVGFontFaceSrcElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFontFaceSrcElement.h; sourceTree = "<group>"; };
@@ -8904,8 +8939,6 @@
A86629CC09DA2B47009633A5 /* JSMouseEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSMouseEvent.cpp; sourceTree = "<group>"; };
A86629CD09DA2B47009633A5 /* JSKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSKeyboardEvent.h; sourceTree = "<group>"; };
A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSKeyboardEvent.cpp; sourceTree = "<group>"; };
- A871038811A2947000DBD50E /* HTMLDocumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDocumentParser.cpp; sourceTree = "<group>"; };
- A871038911A2947000DBD50E /* HTMLDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLDocumentParser.h; sourceTree = "<group>"; };
A871D44C0A127CBC00B12A68 /* HTMLPlugInElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLPlugInElement.h; sourceTree = "<group>"; };
A871D44D0A127CBC00B12A68 /* HTMLPlugInElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPlugInElement.cpp; sourceTree = "<group>"; };
A871D44E0A127CBC00B12A68 /* HTMLParamElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLParamElement.h; sourceTree = "<group>"; };
@@ -8964,9 +8997,6 @@
A871DFDF0A15376B00B12A68 /* RenderReplaced.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderReplaced.h; sourceTree = "<group>"; };
A871DFE00A15376B00B12A68 /* RenderWidget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderWidget.h; sourceTree = "<group>"; };
A871DFE10A15376B00B12A68 /* RenderWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderWidget.cpp; sourceTree = "<group>"; };
- A879C62311A9D1F70059237A /* HTMLTreeBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTreeBuilder.cpp; sourceTree = "<group>"; };
- A879C62411A9D1F70059237A /* HTMLTreeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTreeBuilder.h; sourceTree = "<group>"; };
- A87F163411AE841300CBB2E5 /* HTMLScriptRunnerHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLScriptRunnerHost.h; sourceTree = "<group>"; };
A883DF250F3D045D00F19BF6 /* VisibleSelection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisibleSelection.cpp; sourceTree = "<group>"; };
A883DF260F3D045D00F19BF6 /* VisibleSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisibleSelection.h; sourceTree = "<group>"; };
A88DD4860B4629A300C02990 /* PathTraversalState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathTraversalState.h; sourceTree = "<group>"; };
@@ -8976,10 +9006,6 @@
A89943270B42338700D7C802 /* BitmapImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BitmapImage.cpp; sourceTree = "<group>"; };
A89CCC500F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReplaceNodeWithSpanCommand.cpp; sourceTree = "<group>"; };
A89CCC510F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplaceNodeWithSpanCommand.h; sourceTree = "<group>"; };
- A8A563B211DB3D10003AC2F0 /* HTMLElementStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementStack.h; sourceTree = "<group>"; };
- A8A563B311DB3D10003AC2F0 /* HTMLElementStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementStack.cpp; sourceTree = "<group>"; };
- A8A564A311DC0E59003AC2F0 /* HTMLFormattingElementList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLFormattingElementList.h; sourceTree = "<group>"; };
- A8A564A411DC0E59003AC2F0 /* HTMLFormattingElementList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFormattingElementList.cpp; sourceTree = "<group>"; };
A8A909AA0CBCD6B50029B807 /* RenderSVGTransformableContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGTransformableContainer.h; sourceTree = "<group>"; };
A8A909AB0CBCD6B50029B807 /* RenderSVGTransformableContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGTransformableContainer.cpp; sourceTree = "<group>"; };
A8BC04911214F69600B5F122 /* HTMLEntityTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLEntityTable.cpp; sourceTree = "<group>"; };
@@ -9210,8 +9236,6 @@
A8E544BF0CA9D1C20097D09B /* DOMSVGAnimatedAngleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGAnimatedAngleInternal.h; sourceTree = "<group>"; };
A8E544C10CA9D1C20097D09B /* DOMSVGTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGTextElement.h; sourceTree = "<group>"; };
A8E544C30CA9D1C20097D09B /* DOMSVGDescElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGDescElementInternal.h; sourceTree = "<group>"; };
- A8E6A77F11D1661B00311F4A /* HTMLParserScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLParserScheduler.h; sourceTree = "<group>"; };
- A8E6A78011D1661B00311F4A /* HTMLParserScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLParserScheduler.cpp; sourceTree = "<group>"; };
A8EA73AF0A1900E300A8EF5F /* RenderFieldset.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFieldset.cpp; sourceTree = "<group>"; };
A8EA73B00A1900E300A8EF5F /* RenderFieldset.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderFieldset.h; sourceTree = "<group>"; };
A8EA79E50A1916DF00A8EF5F /* HTMLOListElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLOListElement.h; sourceTree = "<group>"; };
@@ -9873,8 +9897,6 @@
B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontCustomPlatformData.h; sourceTree = "<group>"; };
B2AFFC770D00A5C10030074D /* SimpleFontDataMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleFontDataMac.mm; sourceTree = "<group>"; };
B2AFFC780D00A5C10030074D /* FontMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontMac.mm; sourceTree = "<group>"; };
- B2AFFC790D00A5C10030074D /* FontPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontPlatformData.h; sourceTree = "<group>"; };
- B2AFFC7A0D00A5C10030074D /* FontPlatformDataMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontPlatformDataMac.mm; sourceTree = "<group>"; };
B2AFFC7B0D00A5C10030074D /* GlyphPageTreeNodeMac.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GlyphPageTreeNodeMac.cpp; sourceTree = "<group>"; };
B2AFFC850D00A5DF0030074D /* character-sets.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "character-sets.txt"; sourceTree = "<group>"; };
B2AFFC860D00A5DF0030074D /* mac-encodings.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "mac-encodings.txt"; sourceTree = "<group>"; };
@@ -10199,6 +10221,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>"; };
+ B5320D69122A24E9002D1440 /* FontPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontPlatformData.h; sourceTree = "<group>"; };
+ B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FontPlatformDataCocoa.mm; 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>"; };
@@ -10292,8 +10316,6 @@
BC1402880E83680800319717 /* ScrollbarThemeComposite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollbarThemeComposite.cpp; sourceTree = "<group>"; };
BC1402890E83680800319717 /* ScrollbarThemeComposite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarThemeComposite.h; sourceTree = "<group>"; };
BC17F9650B64EBB8004A65CB /* JSHTMLSelectElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLSelectElementCustom.cpp; sourceTree = "<group>"; };
- BC1881D90E08C4ED00048C13 /* File.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = File.idl; sourceTree = "<group>"; };
- BC1881DC0E08C54300048C13 /* FileList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileList.idl; sourceTree = "<group>"; };
BC1A3797097C715F0019F3D8 /* DOM.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOM.h; sourceTree = "<group>"; };
BC1A3798097C715F0019F3D8 /* DOM.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOM.mm; sourceTree = "<group>"; };
BC1A3799097C715F0019F3D8 /* DOMCore.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMCore.h; sourceTree = "<group>"; };
@@ -10653,8 +10675,6 @@
BCB16C140979C3BD00467741 /* loader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = loader.h; sourceTree = "<group>"; };
BCB16C150979C3BD00467741 /* Request.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Request.cpp; sourceTree = "<group>"; };
BCB16C160979C3BD00467741 /* Request.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Request.h; sourceTree = "<group>"; };
- BCB4F88F0DB28DD60039139B /* RenderImageGeneratedContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderImageGeneratedContent.h; sourceTree = "<group>"; };
- BCB4F8920DB28E530039139B /* RenderImageGeneratedContent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderImageGeneratedContent.cpp; sourceTree = "<group>"; };
BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCondition.cpp; sourceTree = "<group>"; };
BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilterCondition.h; sourceTree = "<group>"; };
BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = "<group>"; };
@@ -10710,10 +10730,6 @@
BCD9C2BD0C17B69E005C90A2 /* JSNamedNodeMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNamedNodeMap.h; sourceTree = "<group>"; };
BCD9C2BE0C17B69E005C90A2 /* JSNodeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeList.cpp; sourceTree = "<group>"; };
BCD9C2BF0C17B69E005C90A2 /* JSNodeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeList.h; sourceTree = "<group>"; };
- BCDBB8AA0E088CA500C60FF6 /* FileList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileList.h; sourceTree = "<group>"; };
- BCDBB8AB0E088CA500C60FF6 /* FileList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileList.cpp; sourceTree = "<group>"; };
- BCDBB8CB0E08958400C60FF6 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = "<group>"; };
- BCDBB8CC0E08958400C60FF6 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = "<group>"; };
BCDF317911F8D683003C5BF8 /* UserTypingGestureIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserTypingGestureIndicator.cpp; sourceTree = "<group>"; };
BCDF317A11F8D683003C5BF8 /* UserTypingGestureIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserTypingGestureIndicator.h; sourceTree = "<group>"; };
BCDFD48C0E305290009D10AD /* XMLHttpRequestUpload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestUpload.h; sourceTree = "<group>"; };
@@ -10934,6 +10950,7 @@
C5EBDD81105EDDEC0056816F /* StorageEventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageEventDispatcher.h; sourceTree = "<group>"; };
C6D74AD309AA282E000B0A52 /* ModifySelectionListLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModifySelectionListLevel.h; sourceTree = "<group>"; };
C6D74AE309AA290A000B0A52 /* ModifySelectionListLevel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModifySelectionListLevel.cpp; sourceTree = "<group>"; };
+ CD4E0AFA11F7BC27009D3811 /* fullscreen.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreen.css; sourceTree = "<group>"; };
CE02F0C311E83ADD00C6684A /* ScriptControllerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptControllerBase.h; sourceTree = "<group>"; };
CE057FA31220731100A476D5 /* DocumentMarkerController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentMarkerController.cpp; sourceTree = "<group>"; };
CE057FA41220731100A476D5 /* DocumentMarkerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarkerController.h; sourceTree = "<group>"; };
@@ -11305,6 +11322,7 @@
F523D18402DE42E8018635CA /* css */,
F523D32402DE4478018635CA /* dom */,
93309D86099E64910056E581 /* editing */,
+ 976D6C57122B8A18001FD1F7 /* fileapi */,
51741D080B07257000ED442C /* history */,
93EEC1EC09C2877700C515D1 /* html */,
1C81B94D0E9732D900266E07 /* inspector */,
@@ -11399,6 +11417,7 @@
A83B79100CCB001B000B0825 /* Core */,
A83B790E0CCAFF97000B0825 /* CSS */,
A83B79120CCB003F000B0825 /* Events */,
+ 89878576122CA1DA003AABDA /* FileAPI */,
A83B79080CCAFF2B000B0825 /* HTML */,
1C5FAECA0DCFD8C900D58F78 /* Inspector */,
33503C9C10179A9A003B47E1 /* Notifications */,
@@ -11592,38 +11611,6 @@
1AD51A130CB59CD300953D11 /* DatabaseTracker.cpp */,
1AD51A120CB59CD300953D11 /* DatabaseTracker.h */,
51FAFE330CECBF2D00BB3F24 /* DatabaseTrackerClient.h */,
- 899ABC201215E4A300F9F219 /* DirectoryEntry.cpp */,
- 899ABC211215E4A300F9F219 /* DirectoryEntry.h */,
- 899ABC221215E4A300F9F219 /* DirectoryEntry.idl */,
- 899ABC231215E4A300F9F219 /* DirectoryReader.cpp */,
- 899ABC241215E4A300F9F219 /* DirectoryReader.h */,
- 899ABC251215E4A300F9F219 /* DirectoryReader.idl */,
- 89686C9D122244A00076EAA4 /* DOMFilePath.cpp */,
- 89686C9E122244A00076EAA4 /* DOMFilePath.h */,
- 897A2D1911FF58A50082740C /* DOMFileSystem.cpp */,
- 897A2D1A11FF58A50082740C /* DOMFileSystem.h */,
- 897A2D1B11FF58A50082740C /* DOMFileSystem.idl */,
- 899ABC2C1215E4BE00F9F219 /* EntriesCallback.h */,
- 899ABC2D1215E4BE00F9F219 /* EntriesCallback.idl */,
- 897A2D1C11FF58A50082740C /* Entry.cpp */,
- 897A2D1D11FF58A50082740C /* Entry.h */,
- 897A2D3B11FF63860082740C /* Entry.idl */,
- 899ABC2E1215E4BE00F9F219 /* EntryArray.cpp */,
- 899ABC2F1215E4BE00F9F219 /* EntryArray.h */,
- 899ABC301215E4BE00F9F219 /* EntryArray.idl */,
- 897A2D1E11FF58A50082740C /* EntryCallback.h */,
- 897A2D1F11FF58A50082740C /* EntryCallback.idl */,
- 897A2D2011FF58A50082740C /* ErrorCallback.h */,
- 897A2D5D120000FF0082740C /* ErrorCallback.idl */,
- 899ABC311215E4BE00F9F219 /* FileEntry.cpp */,
- 899ABC321215E4BE00F9F219 /* FileEntry.h */,
- 899ABC331215E4BE00F9F219 /* FileEntry.idl */,
- 897A2D2111FF58A50082740C /* FileSystemCallback.h */,
- 897A2D5F120001220082740C /* FileSystemCallback.idl */,
- 89C0DD78121F0C69009E17CA /* FileSystemCallbacks.cpp */,
- 89C0DD79121F0C69009E17CA /* FileSystemCallbacks.h */,
- 897A2D60120001220082740C /* Flags.h */,
- 897A2D61120001220082740C /* Flags.idl */,
C585A69811D4FB3D004C3E4B /* IDBAny.cpp */,
C585A69911D4FB3D004C3E4B /* IDBAny.h */,
C585A69A11D4FB3D004C3E4B /* IDBAny.idl */,
@@ -11690,10 +11677,6 @@
511F23140DC160DA004F0032 /* LocalStorageTask.h */,
511F23150DC160DA004F0032 /* LocalStorageThread.cpp */,
511F23160DC160DA004F0032 /* LocalStorageThread.h */,
- 897A2D73120001440082740C /* Metadata.h */,
- 897A2D74120001440082740C /* Metadata.idl */,
- 897A2D75120001440082740C /* MetadataCallback.h */,
- 897A2D76120001440082740C /* MetadataCallback.idl */,
51A926780D53F0570063ECC2 /* OriginQuotaManager.cpp */,
51A926790D53F0570063ECC2 /* OriginQuotaManager.h */,
51A9267A0D53F0570063ECC2 /* OriginUsageRecord.cpp */,
@@ -12028,6 +12011,7 @@
49EECDC710503C2300099FAB /* ArrayBufferView.cpp */,
49EECDC810503C2300099FAB /* ArrayBufferView.h */,
49EECDC910503C2300099FAB /* ArrayBufferView.idl */,
+ 4617E7B0121E078F005EC8A8 /* AsyncFileWriter.h */,
6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */,
6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */,
49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
@@ -13855,6 +13839,57 @@
name = XPath;
sourceTree = "<group>";
};
+ 89878576122CA1DA003AABDA /* FileAPI */ = {
+ isa = PBXGroup;
+ children = (
+ 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */,
+ 2E2D99CC10E2BBDA00496337 /* JSBlob.h */,
+ 89CD029111C85B870070B791 /* JSBlobBuilder.cpp */,
+ 89CD029211C85B870070B791 /* JSBlobBuilder.h */,
+ 89878586122CA26A003AABDA /* JSDirectoryEntry.cpp */,
+ 89878587122CA26A003AABDA /* JSDirectoryEntry.h */,
+ 89878588122CA26A003AABDA /* JSDirectoryReader.cpp */,
+ 89878589122CA26A003AABDA /* JSDirectoryReader.h */,
+ 8987858E122CA2A7003AABDA /* JSDOMFileSystem.cpp */,
+ 8987858F122CA2A7003AABDA /* JSDOMFileSystem.h */,
+ 89878590122CA2A7003AABDA /* JSEntriesCallback.cpp */,
+ 89878591122CA2A7003AABDA /* JSEntriesCallback.h */,
+ 89878592122CA2A7003AABDA /* JSEntry.cpp */,
+ 89878593122CA2A7003AABDA /* JSEntry.h */,
+ 89878594122CA2A7003AABDA /* JSEntryArray.cpp */,
+ 89878595122CA2A7003AABDA /* JSEntryArray.h */,
+ 89878596122CA2A7003AABDA /* JSEntryCallback.cpp */,
+ 89878597122CA2A7003AABDA /* JSEntryCallback.h */,
+ 89878598122CA2A7003AABDA /* JSErrorCallback.cpp */,
+ 89878599122CA2A7003AABDA /* JSErrorCallback.h */,
+ BC00F0100E0A189500FD04E3 /* JSFile.cpp */,
+ BC00F0110E0A189500FD04E3 /* JSFile.h */,
+ 8987859A122CA2A7003AABDA /* JSFileEntry.cpp */,
+ 8987859B122CA2A7003AABDA /* JSFileEntry.h */,
+ 2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */,
+ 2E3BC0C9117D3E0800B9409A /* JSFileError.h */,
+ 898785EE122E1E87003AABDA /* JSFileException.cpp */,
+ 898785EF122E1E87003AABDA /* JSFileException.h */,
+ BC00F0120E0A189500FD04E3 /* JSFileList.cpp */,
+ BC00F0130E0A189500FD04E3 /* JSFileList.h */,
+ 2E94F439119207DA00B7F75D /* JSFileReader.cpp */,
+ 2E94F43A119207DA00B7F75D /* JSFileReader.h */,
+ 898785F2122E1EAC003AABDA /* JSFileReaderSync.cpp */,
+ 898785F3122E1EAC003AABDA /* JSFileReaderSync.h */,
+ 8987859C122CA2A7003AABDA /* JSFileSystemCallback.cpp */,
+ 8987859D122CA2A7003AABDA /* JSFileSystemCallback.h */,
+ 46DA844B1224A0710060D006 /* JSFileWriter.cpp */,
+ 46DA844C1224A0710060D006 /* JSFileWriter.h */,
+ 8987859E122CA2A7003AABDA /* JSFlags.cpp */,
+ 8987859F122CA2A7003AABDA /* JSFlags.h */,
+ 898785A0122CA2A7003AABDA /* JSMetadata.cpp */,
+ 898785A1122CA2A7003AABDA /* JSMetadata.h */,
+ 898785A2122CA2A7003AABDA /* JSMetadataCallback.cpp */,
+ 898785A3122CA2A7003AABDA /* JSMetadataCallback.h */,
+ );
+ name = FileAPI;
+ sourceTree = "<group>";
+ };
93309D86099E64910056E581 /* editing */ = {
isa = PBXGroup;
children = (
@@ -14006,21 +14041,12 @@
isa = PBXGroup;
children = (
49484FAE102CF01E00187DD3 /* canvas */,
+ 97C1F5511228558800EDE616 /* parser */,
B0149E7911A4B21500196A7B /* AsyncImageResizer.cpp */,
B0149E7A11A4B21500196A7B /* AsyncImageResizer.h */,
- 2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */,
- 2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */,
- 2EAFAF0D10E2AF2D007ED3D6 /* Blob.idl */,
- 89BED5E911BE11CE00448492 /* BlobBuilder.cpp */,
- 89BED5EA11BE11CE00448492 /* BlobBuilder.h */,
- 89CD027911C859A80070B791 /* BlobBuilder.idl */,
- 2EED575012109ED0007656BB /* BlobURL.cpp */,
- 2EED575112109ED0007656BB /* BlobURL.h */,
93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
93C441FF0F813AE100C1A634 /* CollectionType.h */,
- 976E2BA511CAE4DE006C56A0 /* CSSPreloadScanner.cpp */,
- 976E2BA611CAE4DE006C56A0 /* CSSPreloadScanner.h */,
BC77D2380FF298080070887B /* DataGridColumn.cpp */,
BC77CFC10FF175550070887B /* DataGridColumn.h */,
BC77CF9E0FF172B30070887B /* DataGridColumn.idl */,
@@ -14035,25 +14061,6 @@
2ED609BA1145B07100C8684E /* DOMFormData.cpp */,
2ED609BB1145B07100C8684E /* DOMFormData.h */,
2E0888C3114883A900AF4265 /* DOMFormData.idl */,
- BCDBB8CC0E08958400C60FF6 /* File.cpp */,
- BCDBB8CB0E08958400C60FF6 /* File.h */,
- BC1881D90E08C4ED00048C13 /* File.idl */,
- 2E3BC0BB117D3A4F00B9409A /* FileError.h */,
- 2E3BC0BC117D3A4F00B9409A /* FileError.idl */,
- BCDBB8AB0E088CA500C60FF6 /* FileList.cpp */,
- BCDBB8AA0E088CA500C60FF6 /* FileList.h */,
- BC1881DC0E08C54300048C13 /* FileList.idl */,
- 2E94F3CB118B908E00B7F75D /* FileReader.cpp */,
- 2E94F3CC118B908E00B7F75D /* FileReader.h */,
- 2E94F427119205B300B7F75D /* FileReader.idl */,
- 895253DA116C4EF500CABF00 /* FileStreamProxy.cpp */,
- 895253DB116C4EF500CABF00 /* FileStreamProxy.h */,
- 8952535011641B3400CABF00 /* FileThread.cpp */,
- 8952535111641B3400CABF00 /* FileThread.h */,
- 895253DE116C4F0600CABF00 /* FileThreadTask.h */,
- 46A26902121B6B4300C41F3A /* FileWriter.cpp */,
- 46A26903121B6B4300C41F3A /* FileWriter.h */,
- 46A26904121B6B4300C41F3A /* FileWriter.idl */,
A8136D370973A8E700D74463 /* FormDataList.cpp */,
A8136D360973A8E700D74463 /* FormDataList.h */,
BC97E239109144950010D361 /* HTMLAllCollection.cpp */,
@@ -14096,8 +14103,6 @@
A8DF3FC9097FA0FB0052981B /* HTMLCollection.cpp */,
A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */,
85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */,
- 97EF560E11E40783007E026F /* HTMLConstructionSite.cpp */,
- 97EF560F11E40783007E026F /* HTMLConstructionSite.h */,
BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */,
BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */,
BC77CDA20FEFEB530070887B /* HTMLDataGridCellElement.idl */,
@@ -14125,30 +14130,18 @@
F523D23B02DE4396018635CA /* HTMLDocument.cpp */,
F523D23C02DE4396018635CA /* HTMLDocument.h */,
1A494E290A12354300FDAFC1 /* HTMLDocument.idl */,
- A871038811A2947000DBD50E /* HTMLDocumentParser.cpp */,
- A871038911A2947000DBD50E /* HTMLDocumentParser.h */,
F523D23E02DE4396018635CA /* HTMLElement.cpp */,
F523D23F02DE4396018635CA /* HTMLElement.h */,
1A494BBB0A122DCD00FDAFC1 /* HTMLElement.idl */,
- A8A563B311DB3D10003AC2F0 /* HTMLElementStack.cpp */,
- A8A563B211DB3D10003AC2F0 /* HTMLElementStack.h */,
A871D4550A127CBC00B12A68 /* HTMLEmbedElement.cpp */,
A871D4520A127CBC00B12A68 /* HTMLEmbedElement.h */,
859128790AB222EC00202265 /* HTMLEmbedElement.idl */,
- 976E895E11C0CA3A00EA9CA9 /* HTMLEntityParser.cpp */,
- 976E895F11C0CA3A00EA9CA9 /* HTMLEntityParser.h */,
- 970C4FDF1211266200C3D393 /* HTMLEntitySearch.cpp */,
- 970C4FE01211266200C3D393 /* HTMLEntitySearch.h */,
- 970C4FE11211266200C3D393 /* HTMLEntityTable.cpp */,
- 970C4FE21211266200C3D393 /* HTMLEntityTable.h */,
A81369B9097374F500D74463 /* HTMLFieldSetElement.cpp */,
A81369B8097374F500D74463 /* HTMLFieldSetElement.h */,
1AE2A9F40A1CDA5700B42B25 /* HTMLFieldSetElement.idl */,
A8CFF7980A156978000A4234 /* HTMLFontElement.cpp */,
A8CFF79C0A156978000A4234 /* HTMLFontElement.h */,
1AE2A9F50A1CDA5700B42B25 /* HTMLFontElement.idl */,
- A8A564A411DC0E59003AC2F0 /* HTMLFormattingElementList.cpp */,
- A8A564A311DC0E59003AC2F0 /* HTMLFormattingElementList.h */,
A8DF3FC7097FA0FB0052981B /* HTMLFormCollection.cpp */,
A8DF3FC6097FA0FB0052981B /* HTMLFormCollection.h */,
A81369B3097374F500D74463 /* HTMLFormControlElement.cpp */,
@@ -14256,8 +14249,6 @@
BC588B4A0BFA723C00EE679E /* HTMLParserErrorCodes.cpp */,
BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */,
449B19F30FA72ECE0015CA4A /* HTMLParserQuirks.h */,
- A8E6A78011D1661B00311F4A /* HTMLParserScheduler.cpp */,
- A8E6A77F11D1661B00311F4A /* HTMLParserScheduler.h */,
A871D44D0A127CBC00B12A68 /* HTMLPlugInElement.cpp */,
A871D44C0A127CBC00B12A68 /* HTMLPlugInElement.h */,
4415292D0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp */,
@@ -14265,8 +14256,6 @@
A8EA7C9F0A192B9C00A8EF5F /* HTMLPreElement.cpp */,
A8EA7CA20A192B9C00A8EF5F /* HTMLPreElement.h */,
1AE2AB850A1CE85000B42B25 /* HTMLPreElement.idl */,
- 97E7936311C6030900E649BC /* HTMLPreloadScanner.cpp */,
- 97E7936411C6030900E649BC /* HTMLPreloadScanner.h */,
A43BF5961149290A00C643CA /* HTMLProgressElement.cpp */,
A43BF5971149290A00C643CA /* HTMLProgressElement.h */,
A4226EA51163D84D008B8397 /* HTMLProgressElement.idl */,
@@ -14276,9 +14265,6 @@
A871DC160A15205700B12A68 /* HTMLScriptElement.cpp */,
A871DC190A15205700B12A68 /* HTMLScriptElement.h */,
1AE2AB960A1CE88D00B42B25 /* HTMLScriptElement.idl */,
- A83B3AEE11ADEFF500458809 /* HTMLScriptRunner.cpp */,
- A83B3AEF11ADEFF500458809 /* HTMLScriptRunner.h */,
- A87F163411AE841300CBB2E5 /* HTMLScriptRunnerHost.h */,
A81369BD097374F500D74463 /* HTMLSelectElement.cpp */,
A81369BC097374F500D74463 /* HTMLSelectElement.h */,
855542990AA4938800BA89F2 /* HTMLSelectElement.idl */,
@@ -14317,11 +14303,6 @@
A871DC1D0A15205700B12A68 /* HTMLTitleElement.cpp */,
A871DC1C0A15205700B12A68 /* HTMLTitleElement.h */,
A80E7AAE0A19D1F1007FB8C5 /* HTMLTitleElement.idl */,
- 97E8B3C211A2890800169409 /* HTMLToken.h */,
- 97E8B35411A23CE200169409 /* HTMLTokenizer.cpp */,
- 97E8B35511A23CE200169409 /* HTMLTokenizer.h */,
- A879C62311A9D1F70059237A /* HTMLTreeBuilder.cpp */,
- A879C62411A9D1F70059237A /* HTMLTreeBuilder.h */,
A8EA79E70A1916DF00A8EF5F /* HTMLUListElement.cpp */,
A8EA79E60A1916DF00A8EF5F /* HTMLUListElement.h */,
1A85B1D50A1B236C00D8C87C /* HTMLUListElement.idl */,
@@ -14330,8 +14311,6 @@
E446139A0CD6331000FADA75 /* HTMLVideoElement.idl */,
BCCD74E40A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp */,
BCCD74DB0A4C8D35005FDA6D /* HTMLViewSourceDocument.h */,
- 978B6FC712128821001595EF /* HTMLViewSourceParser.cpp */,
- 978B6FC812128821001595EF /* HTMLViewSourceParser.h */,
A77979130D6B9D0C003851B9 /* ImageData.cpp */,
A77979140D6B9D0C003851B9 /* ImageData.h */,
A77979150D6B9D0C003851B9 /* ImageData.idl */,
@@ -14345,8 +14324,6 @@
A5AFB34E115151A700B045CB /* StepRange.h */,
BCEF45E80E687767001C1287 /* TextMetrics.h */,
BCEF453F0E676AC1001C1287 /* TextMetrics.idl */,
- 2EED57FB1214A9C2007656BB /* ThreadableBlobRegistry.cpp */,
- 2EED57FC1214A9C2007656BB /* ThreadableBlobRegistry.h */,
E446139D0CD6331000FADA75 /* TimeRanges.cpp */,
E446139E0CD6331000FADA75 /* TimeRanges.h */,
E446139F0CD6331000FADA75 /* TimeRanges.idl */,
@@ -14361,6 +14338,102 @@
tabWidth = 4;
usesTabs = 0;
};
+ 976D6C57122B8A18001FD1F7 /* fileapi */ = {
+ isa = PBXGroup;
+ children = (
+ 976D6C58122B8A3D001FD1F7 /* AsyncFileWriter.h */,
+ 976D6C59122B8A3D001FD1F7 /* Blob.cpp */,
+ 976D6C5A122B8A3D001FD1F7 /* Blob.h */,
+ 976D6C5C122B8A3D001FD1F7 /* BlobBuilder.cpp */,
+ 976D6C5D122B8A3D001FD1F7 /* BlobBuilder.h */,
+ 976D6C5F122B8A3D001FD1F7 /* BlobURL.cpp */,
+ 976D6C60122B8A3D001FD1F7 /* BlobURL.h */,
+ 89878539122CA064003AABDA /* DirectoryEntry.cpp */,
+ 8987853A122CA064003AABDA /* DirectoryEntry.h */,
+ 8987853B122CA064003AABDA /* DirectoryReader.cpp */,
+ 8987853C122CA064003AABDA /* DirectoryReader.h */,
+ 8987853D122CA064003AABDA /* DOMFilePath.cpp */,
+ 8987853E122CA064003AABDA /* DOMFilePath.h */,
+ 8987853F122CA064003AABDA /* DOMFileSystem.cpp */,
+ 89878540122CA064003AABDA /* DOMFileSystem.h */,
+ 89878541122CA064003AABDA /* EntriesCallback.h */,
+ 89878542122CA064003AABDA /* Entry.cpp */,
+ 89878543122CA064003AABDA /* Entry.h */,
+ 89878544122CA064003AABDA /* EntryArray.cpp */,
+ 89878545122CA064003AABDA /* EntryArray.h */,
+ 89878546122CA064003AABDA /* EntryCallback.h */,
+ 89878547122CA064003AABDA /* ErrorCallback.h */,
+ 976D6C61122B8A3D001FD1F7 /* File.cpp */,
+ 976D6C62122B8A3D001FD1F7 /* File.h */,
+ 89878548122CA064003AABDA /* FileEntry.cpp */,
+ 89878549122CA064003AABDA /* FileEntry.h */,
+ 976D6C64122B8A3D001FD1F7 /* FileError.h */,
+ 2EDF369E122C94C8002F7D4E /* FileException.h */,
+ 976D6C66122B8A3D001FD1F7 /* FileList.cpp */,
+ 976D6C67122B8A3D001FD1F7 /* FileList.h */,
+ 976D6C69122B8A3D001FD1F7 /* FileReader.cpp */,
+ 976D6C6A122B8A3D001FD1F7 /* FileReader.h */,
+ 2EDF369A122C94B4002F7D4E /* FileReaderSync.cpp */,
+ 2EDF369B122C94B4002F7D4E /* FileReaderSync.h */,
+ 976D6C6C122B8A3D001FD1F7 /* FileStreamProxy.cpp */,
+ 976D6C6D122B8A3D001FD1F7 /* FileStreamProxy.h */,
+ 8987854A122CA064003AABDA /* FileSystemCallback.h */,
+ 8987854B122CA064003AABDA /* FileSystemCallbacks.cpp */,
+ 8987854C122CA064003AABDA /* FileSystemCallbacks.h */,
+ 976D6C6E122B8A3D001FD1F7 /* FileThread.cpp */,
+ 976D6C6F122B8A3D001FD1F7 /* FileThread.h */,
+ 976D6C70122B8A3D001FD1F7 /* FileThreadTask.h */,
+ 976D6C71122B8A3D001FD1F7 /* FileWriter.cpp */,
+ 976D6C72122B8A3D001FD1F7 /* FileWriter.h */,
+ 976D6C74122B8A3D001FD1F7 /* FileWriterClient.h */,
+ 8987854D122CA064003AABDA /* Flags.h */,
+ 8987854E122CA064003AABDA /* LocalFileSystem.cpp */,
+ 8987854F122CA064003AABDA /* LocalFileSystem.h */,
+ 89878550122CA064003AABDA /* Metadata.h */,
+ 89878551122CA064003AABDA /* MetadataCallback.h */,
+ 976D6C75122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp */,
+ 976D6C76122B8A3D001FD1F7 /* ThreadableBlobRegistry.h */,
+ );
+ name = fileapi;
+ sourceTree = "<group>";
+ };
+ 97C1F5511228558800EDE616 /* parser */ = {
+ isa = PBXGroup;
+ children = (
+ 977B3849122883E900B81FF8 /* CSSPreloadScanner.cpp */,
+ 977B384A122883E900B81FF8 /* CSSPreloadScanner.h */,
+ 977B384B122883E900B81FF8 /* HTMLConstructionSite.cpp */,
+ 977B384C122883E900B81FF8 /* HTMLConstructionSite.h */,
+ 977B384D122883E900B81FF8 /* HTMLDocumentParser.cpp */,
+ 977B384E122883E900B81FF8 /* HTMLDocumentParser.h */,
+ 977B384F122883E900B81FF8 /* HTMLEntityNames.in */,
+ 977B371F1228721700B81FF8 /* HTMLElementStack.cpp */,
+ 977B37201228721700B81FF8 /* HTMLElementStack.h */,
+ 977B3850122883E900B81FF8 /* HTMLEntityParser.cpp */,
+ 977B3851122883E900B81FF8 /* HTMLEntityParser.h */,
+ 977B3852122883E900B81FF8 /* HTMLEntitySearch.cpp */,
+ 977B3853122883E900B81FF8 /* HTMLEntitySearch.h */,
+ 977B3854122883E900B81FF8 /* HTMLEntityTable.h */,
+ 977B3855122883E900B81FF8 /* HTMLFormattingElementList.cpp */,
+ 977B3856122883E900B81FF8 /* HTMLFormattingElementList.h */,
+ 977B3857122883E900B81FF8 /* HTMLParserScheduler.cpp */,
+ 977B3858122883E900B81FF8 /* HTMLParserScheduler.h */,
+ 977B3859122883E900B81FF8 /* HTMLPreloadScanner.cpp */,
+ 977B385A122883E900B81FF8 /* HTMLPreloadScanner.h */,
+ 977B385B122883E900B81FF8 /* HTMLScriptRunner.cpp */,
+ 977B385C122883E900B81FF8 /* HTMLScriptRunner.h */,
+ 977B385D122883E900B81FF8 /* HTMLScriptRunnerHost.h */,
+ 97C1F552122855CB00EDE616 /* HTMLToken.h */,
+ 977B385E122883E900B81FF8 /* HTMLTokenizer.cpp */,
+ 977B385F122883E900B81FF8 /* HTMLTokenizer.h */,
+ 977B37211228721700B81FF8 /* HTMLTreeBuilder.cpp */,
+ 977B37221228721700B81FF8 /* HTMLTreeBuilder.h */,
+ 977B3860122883E900B81FF8 /* HTMLViewSourceParser.cpp */,
+ 977B3861122883E900B81FF8 /* HTMLViewSourceParser.h */,
+ );
+ name = parser;
+ sourceTree = "<group>";
+ };
A59E3C1B11580F340072928E /* iphone */ = {
isa = PBXGroup;
children = (
@@ -14410,10 +14483,6 @@
49EECEF3105070C400099FAB /* JSArrayBuffer.h */,
49EECF19105072F300099FAB /* JSArrayBufferView.cpp */,
49EECF1A105072F300099FAB /* JSArrayBufferView.h */,
- 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */,
- 2E2D99CC10E2BBDA00496337 /* JSBlob.h */,
- 89CD029111C85B870070B791 /* JSBlobBuilder.cpp */,
- 89CD029211C85B870070B791 /* JSBlobBuilder.h */,
65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
65DF323409D1DE65000BE325 /* JSCanvasGradient.h */,
65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
@@ -14428,14 +14497,6 @@
BC77D1680FF19F550070887B /* JSDataGridColumnList.h */,
2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */,
2E0888D31148848A00AF4265 /* JSDOMFormData.h */,
- BC00F0100E0A189500FD04E3 /* JSFile.cpp */,
- BC00F0110E0A189500FD04E3 /* JSFile.h */,
- 2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */,
- 2E3BC0C9117D3E0800B9409A /* JSFileError.h */,
- BC00F0120E0A189500FD04E3 /* JSFileList.cpp */,
- BC00F0130E0A189500FD04E3 /* JSFileList.h */,
- 2E94F439119207DA00B7F75D /* JSFileReader.cpp */,
- 2E94F43A119207DA00B7F75D /* JSFileReader.h */,
49EECEF4105070C400099FAB /* JSFloat32Array.cpp */,
49EECEF5105070C400099FAB /* JSFloat32Array.h */,
BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */,
@@ -15106,28 +15167,6 @@
B59DD697119029E5007E9684 /* JSDatabaseCallback.h */,
B58CEB6811913607002A6790 /* JSDatabaseSync.cpp */,
B58CEB6711913607002A6790 /* JSDatabaseSync.h */,
- 899ABC551215EB2A00F9F219 /* JSDirectoryEntry.cpp */,
- 899ABC561215EB2A00F9F219 /* JSDirectoryEntry.h */,
- 899ABC6B1215ECEF00F9F219 /* JSDirectoryReader.cpp */,
- 899ABC6C1215ECEF00F9F219 /* JSDirectoryReader.h */,
- 897A2D8D1200035F0082740C /* JSDOMFileSystem.cpp */,
- 897A2D8E1200035F0082740C /* JSDOMFileSystem.h */,
- 899ABC571215EB2A00F9F219 /* JSEntriesCallback.cpp */,
- 899ABC581215EB2A00F9F219 /* JSEntriesCallback.h */,
- 897A2D4911FF6C900082740C /* JSEntry.cpp */,
- 897A2D4A11FF6C900082740C /* JSEntry.h */,
- 899ABC591215EB2A00F9F219 /* JSEntryArray.cpp */,
- 899ABC5A1215EB2A00F9F219 /* JSEntryArray.h */,
- 897A2D4B11FF6C900082740C /* JSEntryCallback.cpp */,
- 897A2D4C11FF6C900082740C /* JSEntryCallback.h */,
- 897A2D4D11FF6C900082740C /* JSErrorCallback.cpp */,
- 897A2D4E11FF6C900082740C /* JSErrorCallback.h */,
- 899ABC5B1215EB2A00F9F219 /* JSFileEntry.cpp */,
- 899ABC5C1215EB2A00F9F219 /* JSFileEntry.h */,
- 897A2D5511FF6CA40082740C /* JSFileSystemCallback.cpp */,
- 897A2D5611FF6CA40082740C /* JSFileSystemCallback.h */,
- 897A2D91120003760082740C /* JSFlags.cpp */,
- 897A2D92120003760082740C /* JSFlags.h */,
C585A66411D4FB07004C3E4B /* JSIDBAny.cpp */,
C585A66511D4FB07004C3E4B /* JSIDBAny.h */,
81BE20A711F4B66F00915DFA /* JSIDBCursor.cpp */,
@@ -15158,10 +15197,6 @@
C585A67B11D4FB07004C3E4B /* JSIDBSuccessEvent.h */,
B656626F120B1227006EA85C /* JSIDBTransaction.cpp */,
B656626E120B1227006EA85C /* JSIDBTransaction.h */,
- 8947A82512222C4700D95F2D /* JSMetadata.cpp */,
- 8947A82612222C4700D95F2D /* JSMetadata.h */,
- 8947A82712222C4700D95F2D /* JSMetadataCallback.cpp */,
- 8947A82812222C4700D95F2D /* JSMetadataCallback.h */,
514C76350CE9225E007EF3CD /* JSSQLError.cpp */,
BC8243250D0CE8A200460C8F /* JSSQLError.h */,
B525A96411CA2340003A23A8 /* JSSQLException.cpp */,
@@ -15793,8 +15828,6 @@
B2AFFC750D00A5C10030074D /* FontCustomPlatformData.cpp */,
B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */,
B2AFFC780D00A5C10030074D /* FontMac.mm */,
- B2AFFC790D00A5C10030074D /* FontPlatformData.h */,
- B2AFFC7A0D00A5C10030074D /* FontPlatformDataMac.mm */,
B2AFFC7B0D00A5C10030074D /* GlyphPageTreeNodeMac.cpp */,
49FFBF1C11C8550E006A7118 /* GraphicsContext3DMac.mm */,
B277B4030B22F37C0004BEC6 /* GraphicsContextMac.mm */,
@@ -15825,6 +15858,7 @@
isa = PBXGroup;
children = (
B27535290B053814002CE64F /* cg */,
+ B5320D68122A24E9002D1440 /* cocoa */,
A75E8B7F0E1DE2B0007F2481 /* filters */,
B27535490B053814002CE64F /* mac */,
F4EAF4AB10C74268009100D3 /* opentype */,
@@ -16021,6 +16055,15 @@
name = cf;
sourceTree = "<group>";
};
+ B5320D68122A24E9002D1440 /* cocoa */ = {
+ isa = PBXGroup;
+ children = (
+ B5320D69122A24E9002D1440 /* FontPlatformData.h */,
+ B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */,
+ );
+ path = cocoa;
+ sourceTree = "<group>";
+ };
B5D31DF711CF60E5009F22B4 /* generic */ = {
isa = PBXGroup;
children = (
@@ -16123,6 +16166,7 @@
41002CCB0F66EDEF009E660D /* ScriptFunctionCall.h */,
4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */,
4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */,
+ 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */,
934CC1160EDCAC7300A658F2 /* ScriptInstance.h */,
41F066E30F64BCF600A07EAC /* ScriptObject.cpp */,
41F066E20F64BCF600A07EAC /* ScriptObject.h */,
@@ -16607,9 +16651,10 @@
BCFB2F74097A2E1A00BA703D /* Arena.cpp */,
BCFB2F75097A2E1A00BA703D /* Arena.h */,
2EF1BFF6121CB0BD00C27627 /* AsyncFileStream.h */,
+ 89D08D9C12228451001241DF /* AsyncFileSystem.cpp */,
+ 89D08D9D12228451001241DF /* AsyncFileSystem.h */,
+ 89D08D9E12228451001241DF /* AsyncFileSystemCallbacks.h */,
51E1ECB10C91C55600DC255B /* AutodrainedPool.h */,
- 8988E10C11A3508B00DB732E /* BlobItem.cpp */,
- 8988E10D11A3508B00DB732E /* BlobItem.h */,
BCC8CFCA0986CD2400140BF2 /* ColorData.gperf */,
41D015C90F4B5C71004A662F /* ContentType.cpp */,
41D015C80F4B5C71004A662F /* ContentType.h */,
@@ -17028,6 +17073,7 @@
BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */,
31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */,
4CDE54EC0E5579780089E26C /* wml.css */,
+ CD4E0AFA11F7BC27009D3811 /* fullscreen.css */,
);
path = css;
sourceTree = "<group>";
@@ -17111,8 +17157,10 @@
0FD308D4117D168400A791F7 /* RenderIFrame.h */,
BCEA4836097D93020094C9E4 /* RenderImage.cpp */,
BCEA4837097D93020094C9E4 /* RenderImage.h */,
- BCB4F8920DB28E530039139B /* RenderImageGeneratedContent.cpp */,
- BCB4F88F0DB28DD60039139B /* RenderImageGeneratedContent.h */,
+ 08F2F0071213E61700DCEC48 /* RenderImageResource.cpp */,
+ 08F2F0081213E61700DCEC48 /* RenderImageResource.h */,
+ 08641D4512142F7D008DE9F6 /* RenderImageResourceStyleImage.cpp */,
+ 08641D4612142F7D008DE9F6 /* RenderImageResourceStyleImage.h */,
A7AA66D411C5ED6A001D8C8C /* RenderIndicator.cpp */,
A7AA66D511C5ED6A001D8C8C /* RenderIndicator.h */,
BCEA4838097D93020094C9E4 /* RenderInline.cpp */,
@@ -17647,6 +17695,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ B5320D6B122A24E9002D1440 /* FontPlatformData.h in Headers */,
B5B5DC6A119BB3D5002A8790 /* AbstractDatabase.h in Headers */,
41E1B1D10FF5986900576B3B /* AbstractWorker.h in Headers */,
29A8122E0FBB9C1D00510293 /* AccessibilityARIAGridCell.h in Headers */,
@@ -17719,10 +17768,6 @@
BCE789861120E7A60060ECE5 /* BidiRun.h in Headers */,
938192050F87E1EC00D5352A /* BinaryPropertyList.h in Headers */,
A89943280B42338800D7C802 /* BitmapImage.h in Headers */,
- 2EAFAF0F10E2AF2D007ED3D6 /* Blob.h in Headers */,
- 89BED5EC11BE11CE00448492 /* BlobBuilder.h in Headers */,
- 8988E10F11A3508B00DB732E /* BlobItem.h in Headers */,
- 2EED575612109ED0007656BB /* BlobURL.h in Headers */,
93F199BE08245E59001E9ABC /* BlockExceptions.h in Headers */,
BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
BC5EB5DB0E81B7EA00B25965 /* BorderValue.h in Headers */,
@@ -17840,7 +17885,6 @@
A80E6D000A1989CA007FB8C5 /* CSSPageRule.h in Headers */,
BC772B3E0C4EA91E0083285F /* CSSParser.h in Headers */,
BC02A4B70E0997B9004B6D2B /* CSSParserValues.h in Headers */,
- 976E2BA811CAE4DE006C56A0 /* CSSPreloadScanner.h in Headers */,
A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */,
E1ED8AC30CC49BE000BFC557 /* CSSPrimitiveValueMappings.h in Headers */,
A80E6CFF0A1989CA007FB8C5 /* CSSProperty.h in Headers */,
@@ -18709,15 +18753,8 @@
A75E8B8D0E1DE2D6007F2481 /* FEComponentTransfer.h in Headers */,
A75E8B8F0E1DE2D6007F2481 /* FEComposite.h in Headers */,
84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */,
- BCDBB8CD0E08958400C60FF6 /* File.h in Headers */,
066C772B0AB603B700238CC4 /* FileChooser.h in Headers */,
- 2E3BC0BD117D3A4F00B9409A /* FileError.h in Headers */,
- BCDBB8AC0E088CA500C60FF6 /* FileList.h in Headers */,
- 2E94F4511192096A00B7F75D /* FileReader.h in Headers */,
- 895253DD116C4EF500CABF00 /* FileStreamProxy.h in Headers */,
514B3F730C722047000530DF /* FileSystem.h in Headers */,
- 8952535311641B3400CABF00 /* FileThread.h in Headers */,
- 895253DF116C4F0600CABF00 /* FileThreadTask.h in Headers */,
BC5EB69F0E81DAEB00B25965 /* FillLayer.h in Headers */,
845E72F80FD261EE00A87D79 /* Filter.h in Headers */,
08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */,
@@ -18739,7 +18776,6 @@
B2C3DA680D006CD600EF6F26 /* FontFallbackList.h in Headers */,
B2C3DA6A0D006CD600EF6F26 /* FontFamily.h in Headers */,
A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */,
- B2AFFC810D00A5C10030074D /* FontPlatformData.h in Headers */,
37ACCE420DA2980F0089E602 /* FontRenderingMode.h in Headers */,
B2C3DA6B0D006CD600EF6F26 /* FontSelector.h in Headers */,
37202199106213C600F25C4B /* FontSmoothingMode.h in Headers */,
@@ -18812,7 +18848,6 @@
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 */,
@@ -18822,17 +18857,12 @@
A8EA7CB70A192B9C00A8EF5F /* HTMLDivElement.h in Headers */,
A8EA79F70A1916DF00A8EF5F /* HTMLDListElement.h in Headers */,
93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */,
- A871038B11A2947000DBD50E /* HTMLDocumentParser.h in Headers */,
93309DE8099E64920056E581 /* htmlediting.h in Headers */,
93F198E608245E59001E9ABC /* HTMLElement.h in Headers */,
A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */,
- A8A563B411DB3D10003AC2F0 /* HTMLElementStack.h in Headers */,
A871D45C0A127CBC00B12A68 /* HTMLEmbedElement.h in Headers */,
- 976E896111C0CA3A00EA9CA9 /* HTMLEntityParser.h in Headers */,
- A8BC044F1214EB2B00B5F122 /* HTMLEntitySearch.h in Headers */,
A81369D4097374F600D74463 /* HTMLFieldSetElement.h in Headers */,
A8CFF7A60A156978000A4234 /* HTMLFontElement.h in Headers */,
- A8A564A511DC0E59003AC2F0 /* HTMLFormattingElementList.h in Headers */,
A8DF3FCE097FA0FC0052981B /* HTMLFormCollection.h in Headers */,
A81369CE097374F600D74463 /* HTMLFormControlElement.h in Headers */,
A81369D0097374F600D74463 /* HTMLFormElement.h in Headers */,
@@ -18874,16 +18904,12 @@
A871D4580A127CBC00B12A68 /* HTMLParamElement.h in Headers */,
BC588AF00BFA6CF900EE679E /* HTMLParserErrorCodes.h in Headers */,
449B19F50FA72ECE0015CA4A /* HTMLParserQuirks.h in Headers */,
- A8E6A78111D1661B00311F4A /* HTMLParserScheduler.h in Headers */,
A871D4560A127CBC00B12A68 /* HTMLPlugInElement.h in Headers */,
4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */,
A8EA7CB00A192B9C00A8EF5F /* HTMLPreElement.h in Headers */,
- 97E7936611C6030900E649BC /* HTMLPreloadScanner.h in Headers */,
A43BF5991149290A00C643CA /* HTMLProgressElement.h in Headers */,
A8CFF7A30A156978000A4234 /* HTMLQuoteElement.h in Headers */,
A871DC250A15205700B12A68 /* HTMLScriptElement.h in Headers */,
- A83B3AF111ADEFF500458809 /* HTMLScriptRunner.h in Headers */,
- A87F163511AE841300CBB2E5 /* HTMLScriptRunnerHost.h in Headers */,
A81369D8097374F600D74463 /* HTMLSelectElement.h in Headers */,
E44613A80CD6331000FADA75 /* HTMLSourceElement.h in Headers */,
A871DC230A15205700B12A68 /* HTMLStyleElement.h in Headers */,
@@ -18897,13 +18923,9 @@
A871DB250A150BD600B12A68 /* HTMLTableSectionElement.h in Headers */,
A81369D6097374F600D74463 /* HTMLTextAreaElement.h in Headers */,
A871DC280A15205700B12A68 /* HTMLTitleElement.h in Headers */,
- 97E8B3C311A2890800169409 /* HTMLToken.h in Headers */,
- 97E8B35711A23CE200169409 /* HTMLTokenizer.h in Headers */,
- A879C62611A9D1F70059237A /* HTMLTreeBuilder.h in Headers */,
A8EA79F20A1916DF00A8EF5F /* HTMLUListElement.h in Headers */,
E44613AB0CD6331000FADA75 /* HTMLVideoElement.h in Headers */,
BCCD74DC0A4C8D35005FDA6D /* HTMLViewSourceDocument.h in Headers */,
- 978B6FCA12128821001595EF /* HTMLViewSourceParser.h in Headers */,
514C76710CE923A1007EF3CD /* HTTPHeaderMap.h in Headers */,
514C76730CE923A1007EF3CD /* HTTPParsers.h in Headers */,
375CD232119D43C800A2A859 /* Hyphenation.h in Headers */,
@@ -19644,7 +19666,8 @@
BCEA486A097D93020094C9E4 /* RenderHTMLCanvas.h in Headers */,
0FD308D6117D168500A791F7 /* RenderIFrame.h in Headers */,
BCEA4876097D93020094C9E4 /* RenderImage.h in Headers */,
- BCB4F8900DB28DD60039139B /* RenderImageGeneratedContent.h in Headers */,
+ 08F2F00A1213E61700DCEC48 /* RenderImageResource.h in Headers */,
+ 08641D4812142F7D008DE9F6 /* RenderImageResourceStyleImage.h in Headers */,
A7AA66D711C5ED6A001D8C8C /* RenderIndicator.h in Headers */,
BCEA4878097D93020094C9E4 /* RenderInline.h in Headers */,
750D029411D0E7F300BD1B27 /* RenderInputSpeech.h in Headers */,
@@ -20138,7 +20161,6 @@
BCE658FF0EA9248A007E4533 /* Theme.h in Headers */,
BCE659E60EA92FB2007E4533 /* ThemeMac.h in Headers */,
BCE659A90EA927B9007E4533 /* ThemeTypes.h in Headers */,
- 2EED57FE1214A9C2007656BB /* ThreadableBlobRegistry.h in Headers */,
0B90561B0F2578BF0095FF6A /* ThreadableLoader.h in Headers */,
0B90561C0F2578BF0095FF6A /* ThreadableLoaderClient.h in Headers */,
5112247410CFB8D8008099D7 /* ThreadableWebSocketChannel.h in Headers */,
@@ -20333,45 +20355,83 @@
C50B561712119D23008B46E0 /* GroupSettings.h in Headers */,
BCA979171215D055005C485C /* ImageBufferData.h in Headers */,
490707E71219C04300D90E51 /* ANGLEWebKitBridge.h in Headers */,
- 899ABC271215E4A300F9F219 /* DirectoryEntry.h in Headers */,
- 899ABC2A1215E4A300F9F219 /* DirectoryReader.h in Headers */,
- 899ABC341215E4BE00F9F219 /* EntriesCallback.h in Headers */,
- 899ABC371215E4BE00F9F219 /* EntryArray.h in Headers */,
- 899ABC3A1215E4BE00F9F219 /* FileEntry.h in Headers */,
- 899ABC5E1215EB2A00F9F219 /* JSDirectoryEntry.h in Headers */,
- 899ABC601215EB2A00F9F219 /* JSEntriesCallback.h in Headers */,
- 899ABC621215EB2A00F9F219 /* JSEntryArray.h in Headers */,
- 899ABC641215EB2A00F9F219 /* JSFileEntry.h in Headers */,
- 899ABC6E1215ECEF00F9F219 /* JSDirectoryReader.h in Headers */,
- 899ABC7A1215F03100F9F219 /* JSDOMFileSystem.h in Headers */,
- 899ABC7C1215F03300F9F219 /* JSEntry.h in Headers */,
- 899ABC7E1215F03700F9F219 /* JSEntryCallback.h in Headers */,
- 899ABC801215F03800F9F219 /* JSErrorCallback.h in Headers */,
- 899ABC811215F03B00F9F219 /* JSFlags.h in Headers */,
- 899ABC831215F03C00F9F219 /* JSFileSystemCallback.h in Headers */,
- 899ABC871215F0DF00F9F219 /* DOMFileSystem.h in Headers */,
- 899ABC961215F9DA00F9F219 /* ErrorCallback.h in Headers */,
- 899ABC971215F9DF00F9F219 /* EntryCallback.h in Headers */,
- 899ABCAA1215FA5500F9F219 /* FileSystemCallback.h in Headers */,
- 899ABCAB1215FA5A00F9F219 /* Flags.h in Headers */,
- 899ABCB91215FAB500F9F219 /* Entry.h in Headers */,
2EDEF1F4121B0EFC00726DB2 /* BlobData.h in Headers */,
2EDEF1F5121B0EFC00726DB2 /* BlobRegistry.h in Headers */,
2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */,
2EDEF1F8121B0EFC00726DB2 /* BlobStorageData.h in Headers */,
2EF1BFEB121C9F4200C27627 /* FileStream.h in Headers */,
- 46A26906121B6B4300C41F3A /* FileWriter.h in Headers */,
2EF1BFF7121CB0BD00C27627 /* AsyncFileStream.h in Headers */,
2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */,
- 89C0DD7B121F0C69009E17CA /* FileSystemCallbacks.h in Headers */,
+ 4617E7B1121E078F005EC8A8 /* AsyncFileWriter.h in Headers */,
CE057FA61220731100A476D5 /* DocumentMarkerController.h in Headers */,
9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */,
2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */,
- 89686CA0122244A00076EAA4 /* DOMFilePath.h in Headers */,
- 8947A82A12222C4700D95F2D /* JSMetadata.h in Headers */,
- 8947A82C12222C4700D95F2D /* JSMetadataCallback.h in Headers */,
- 8947A83C122234F400D95F2D /* Metadata.h in Headers */,
- 8947A83D122234F900D95F2D /* MetadataCallback.h in Headers */,
+ 46DA844E1224A0710060D006 /* JSFileWriter.h in Headers */,
+ 9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */,
+ 89D08DA012228451001241DF /* AsyncFileSystem.h in Headers */,
+ 89D08DA112228451001241DF /* AsyncFileSystemCallbacks.h in Headers */,
+ 977B37241228721700B81FF8 /* HTMLElementStack.h in Headers */,
+ 977B37261228721700B81FF8 /* HTMLTreeBuilder.h in Headers */,
+ 977B3863122883E900B81FF8 /* CSSPreloadScanner.h in Headers */,
+ 977B3865122883E900B81FF8 /* HTMLConstructionSite.h in Headers */,
+ 977B3867122883E900B81FF8 /* HTMLDocumentParser.h in Headers */,
+ 977B386A122883E900B81FF8 /* HTMLEntityParser.h in Headers */,
+ 977B386C122883E900B81FF8 /* HTMLEntitySearch.h in Headers */,
+ 977B386D122883E900B81FF8 /* HTMLEntityTable.h in Headers */,
+ 977B386F122883E900B81FF8 /* HTMLFormattingElementList.h in Headers */,
+ 977B3871122883E900B81FF8 /* HTMLParserScheduler.h in Headers */,
+ 977B3873122883E900B81FF8 /* HTMLPreloadScanner.h in Headers */,
+ 977B3875122883E900B81FF8 /* HTMLScriptRunner.h in Headers */,
+ 977B3876122883E900B81FF8 /* HTMLScriptRunnerHost.h in Headers */,
+ 977B3878122883E900B81FF8 /* HTMLTokenizer.h in Headers */,
+ 977B387A122883E900B81FF8 /* HTMLViewSourceParser.h in Headers */,
+ 976D6C77122B8A3D001FD1F7 /* AsyncFileWriter.h in Headers */,
+ 976D6C79122B8A3D001FD1F7 /* Blob.h in Headers */,
+ 976D6C7C122B8A3D001FD1F7 /* BlobBuilder.h in Headers */,
+ 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */,
+ 976D6C81122B8A3D001FD1F7 /* File.h in Headers */,
+ 976D6C83122B8A3D001FD1F7 /* FileError.h in Headers */,
+ 976D6C86122B8A3D001FD1F7 /* FileList.h in Headers */,
+ 976D6C89122B8A3D001FD1F7 /* FileReader.h in Headers */,
+ 976D6C8C122B8A3D001FD1F7 /* FileStreamProxy.h in Headers */,
+ 976D6C8E122B8A3D001FD1F7 /* FileThread.h in Headers */,
+ 976D6C8F122B8A3D001FD1F7 /* FileThreadTask.h in Headers */,
+ 976D6C91122B8A3D001FD1F7 /* FileWriter.h in Headers */,
+ 976D6C93122B8A3D001FD1F7 /* FileWriterClient.h in Headers */,
+ 976D6C95122B8A3D001FD1F7 /* ThreadableBlobRegistry.h in Headers */,
+ 2EDF369D122C94B4002F7D4E /* FileReaderSync.h in Headers */,
+ 2EDF369F122C94C8002F7D4E /* FileException.h in Headers */,
+ 89878553122CA064003AABDA /* DirectoryEntry.h in Headers */,
+ 89878555122CA064003AABDA /* DirectoryReader.h in Headers */,
+ 89878557122CA064003AABDA /* DOMFilePath.h in Headers */,
+ 89878559122CA064003AABDA /* DOMFileSystem.h in Headers */,
+ 8987855A122CA064003AABDA /* EntriesCallback.h in Headers */,
+ 8987855C122CA064003AABDA /* Entry.h in Headers */,
+ 8987855E122CA064003AABDA /* EntryArray.h in Headers */,
+ 8987855F122CA064003AABDA /* EntryCallback.h in Headers */,
+ 89878560122CA064003AABDA /* ErrorCallback.h in Headers */,
+ 89878562122CA064003AABDA /* FileEntry.h in Headers */,
+ 89878563122CA064003AABDA /* FileSystemCallback.h in Headers */,
+ 89878565122CA064003AABDA /* FileSystemCallbacks.h in Headers */,
+ 89878566122CA064003AABDA /* Flags.h in Headers */,
+ 89878568122CA064003AABDA /* LocalFileSystem.h in Headers */,
+ 89878569122CA064003AABDA /* Metadata.h in Headers */,
+ 8987856A122CA064003AABDA /* MetadataCallback.h in Headers */,
+ 8987858B122CA26A003AABDA /* JSDirectoryEntry.h in Headers */,
+ 8987858D122CA26A003AABDA /* JSDirectoryReader.h in Headers */,
+ 898785A5122CA2A7003AABDA /* JSDOMFileSystem.h in Headers */,
+ 898785A7122CA2A7003AABDA /* JSEntriesCallback.h in Headers */,
+ 898785A9122CA2A7003AABDA /* JSEntry.h in Headers */,
+ 898785AB122CA2A7003AABDA /* JSEntryArray.h in Headers */,
+ 898785AD122CA2A7003AABDA /* JSEntryCallback.h in Headers */,
+ 898785AF122CA2A7003AABDA /* JSErrorCallback.h in Headers */,
+ 898785B1122CA2A7003AABDA /* JSFileEntry.h in Headers */,
+ 898785B3122CA2A7003AABDA /* JSFileSystemCallback.h in Headers */,
+ 898785B5122CA2A7003AABDA /* JSFlags.h in Headers */,
+ 898785B7122CA2A7003AABDA /* JSMetadata.h in Headers */,
+ 898785B9122CA2A7003AABDA /* JSMetadataCallback.h in Headers */,
+ 898785F1122E1E87003AABDA /* JSFileException.h in Headers */,
+ 898785F5122E1EAC003AABDA /* JSFileReaderSync.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -20735,10 +20795,6 @@
BCE7898B1120E8020060ECE5 /* BidiRun.cpp in Sources */,
938192030F87E1E600D5352A /* BinaryPropertyList.cpp in Sources */,
A89943290B42338800D7C802 /* BitmapImage.cpp in Sources */,
- 2EAFAF0E10E2AF2D007ED3D6 /* Blob.cpp in Sources */,
- 89BED5EB11BE11CE00448492 /* BlobBuilder.cpp in Sources */,
- 8988E10E11A3508B00DB732E /* BlobItem.cpp in Sources */,
- 2EED575512109ED0007656BB /* BlobURL.cpp in Sources */,
93F19AE108245E59001E9ABC /* BlockExceptions.mm in Sources */,
BCEA4854097D93020094C9E4 /* break_lines.cpp in Sources */,
93309DDA099E64920056E581 /* BreakBlockquoteCommand.cpp in Sources */,
@@ -20837,7 +20893,6 @@
A80E6CF50A1989CA007FB8C5 /* CSSPageRule.cpp in Sources */,
BC772B3D0C4EA91E0083285F /* CSSParser.cpp in Sources */,
BC02A5400E099C5A004B6D2B /* CSSParserValues.cpp in Sources */,
- 976E2BA711CAE4DE006C56A0 /* CSSPreloadScanner.cpp in Sources */,
A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */,
A80E6CF70A1989CA007FB8C5 /* CSSProperty.cpp in Sources */,
0F6ECD460F252F3700BDE271 /* CSSPropertyLonghand.cpp in Sources */,
@@ -21220,16 +21275,11 @@
A75E8B8C0E1DE2D6007F2481 /* FEComponentTransfer.cpp in Sources */,
A75E8B8E0E1DE2D6007F2481 /* FEComposite.cpp in Sources */,
84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */,
- BCDBB8CE0E08958400C60FF6 /* File.cpp in Sources */,
934FE9E50B5CA539003E4A73 /* FileChooser.cpp in Sources */,
066C772D0AB603D200238CC4 /* FileChooserMac.mm in Sources */,
- BCDBB8AD0E088CA500C60FF6 /* FileList.cpp in Sources */,
- 2E94F4501192096400B7F75D /* FileReader.cpp in Sources */,
- 895253DC116C4EF500CABF00 /* FileStreamProxy.cpp in Sources */,
5160306C0CC4362300C8AC25 /* FileSystemCF.cpp in Sources */,
514B3F760C722055000530DF /* FileSystemMac.mm in Sources */,
5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */,
- 8952535211641B3400CABF00 /* FileThread.cpp in Sources */,
BC5EB69E0E81DAEB00B25965 /* FillLayer.cpp in Sources */,
08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */,
A8CFF04D0A154F09000A4234 /* FixedTableLayout.cpp in Sources */,
@@ -21258,7 +21308,6 @@
A80E6CEC0A1989CA007FB8C5 /* FontFamilyValue.cpp in Sources */,
72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */,
B2AFFC800D00A5C10030074D /* FontMac.mm in Sources */,
- B2AFFC820D00A5C10030074D /* FontPlatformDataMac.mm in Sources */,
B734B181119B9911006587BD /* FontTranscoder.cpp in Sources */,
A80E6CF10A1989CA007FB8C5 /* FontValue.cpp in Sources */,
D05CED290A40BB2C00C5AF38 /* FormatBlockCommand.cpp in Sources */,
@@ -21313,7 +21362,6 @@
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 */,
@@ -21323,18 +21371,13 @@
A8EA7CB10A192B9C00A8EF5F /* HTMLDivElement.cpp in Sources */,
A8EA79F50A1916DF00A8EF5F /* HTMLDListElement.cpp in Sources */,
93F19A9108245E59001E9ABC /* HTMLDocument.cpp in Sources */,
- A871038A11A2947000DBD50E /* HTMLDocumentParser.cpp in Sources */,
93309DE7099E64920056E581 /* htmlediting.cpp in Sources */,
93F19A9208245E59001E9ABC /* HTMLElement.cpp in Sources */,
A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */,
- A8A563B511DB3D10003AC2F0 /* HTMLElementStack.cpp in Sources */,
A871D45F0A127CBC00B12A68 /* HTMLEmbedElement.cpp in Sources */,
- 976E896011C0CA3A00EA9CA9 /* HTMLEntityParser.cpp in Sources */,
- A8BC044E1214EB2A00B5F122 /* HTMLEntitySearch.cpp in Sources */,
A8BC04921214F69600B5F122 /* HTMLEntityTable.cpp in Sources */,
A81369D5097374F600D74463 /* HTMLFieldSetElement.cpp in Sources */,
A8CFF7A20A156978000A4234 /* HTMLFontElement.cpp in Sources */,
- A8A564A611DC0E59003AC2F0 /* HTMLFormattingElementList.cpp in Sources */,
A8DF3FCF097FA0FC0052981B /* HTMLFormCollection.cpp in Sources */,
A81369CF097374F600D74463 /* HTMLFormControlElement.cpp in Sources */,
A81369D1097374F600D74463 /* HTMLFormElement.cpp in Sources */,
@@ -21375,15 +21418,12 @@
A8EA7CB20A192B9C00A8EF5F /* HTMLParagraphElement.cpp in Sources */,
A871D4590A127CBC00B12A68 /* HTMLParamElement.cpp in Sources */,
BC588B4B0BFA723C00EE679E /* HTMLParserErrorCodes.cpp in Sources */,
- A8E6A78211D1661B00311F4A /* HTMLParserScheduler.cpp in Sources */,
A871D4570A127CBC00B12A68 /* HTMLPlugInElement.cpp in Sources */,
4415292F0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp in Sources */,
A8EA7CAD0A192B9C00A8EF5F /* HTMLPreElement.cpp in Sources */,
- 97E7936511C6030900E649BC /* HTMLPreloadScanner.cpp in Sources */,
A43BF5981149290A00C643CA /* HTMLProgressElement.cpp in Sources */,
A8CFF7A50A156978000A4234 /* HTMLQuoteElement.cpp in Sources */,
A871DC220A15205700B12A68 /* HTMLScriptElement.cpp in Sources */,
- A83B3AF011ADEFF500458809 /* HTMLScriptRunner.cpp in Sources */,
A81369D9097374F600D74463 /* HTMLSelectElement.cpp in Sources */,
E44613A70CD6331000FADA75 /* HTMLSourceElement.cpp in Sources */,
A871DC260A15205700B12A68 /* HTMLStyleElement.cpp in Sources */,
@@ -21397,12 +21437,9 @@
A871DB260A150BD600B12A68 /* HTMLTableSectionElement.cpp in Sources */,
A81369D7097374F600D74463 /* HTMLTextAreaElement.cpp in Sources */,
A871DC290A15205700B12A68 /* HTMLTitleElement.cpp in Sources */,
- 97E8B35611A23CE200169409 /* HTMLTokenizer.cpp in Sources */,
- A879C62511A9D1F70059237A /* HTMLTreeBuilder.cpp in Sources */,
A8EA79F30A1916DF00A8EF5F /* HTMLUListElement.cpp in Sources */,
E44613AA0CD6331000FADA75 /* HTMLVideoElement.cpp in Sources */,
BCCD74E50A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp in Sources */,
- 978B6FC912128821001595EF /* HTMLViewSourceParser.cpp in Sources */,
0B8C56D40F28627F000502E1 /* HTTPHeaderMap.cpp in Sources */,
514C76720CE923A1007EF3CD /* HTTPParsers.cpp in Sources */,
371A67CB11C6C7DB00047B8B /* HyphenationCF.cpp in Sources */,
@@ -22186,7 +22223,8 @@
BCEA4869097D93020094C9E4 /* RenderHTMLCanvas.cpp in Sources */,
0FD308D5117D168500A791F7 /* RenderIFrame.cpp in Sources */,
BCEA4875097D93020094C9E4 /* RenderImage.cpp in Sources */,
- BCB4F8930DB28E530039139B /* RenderImageGeneratedContent.cpp in Sources */,
+ 08F2F0091213E61700DCEC48 /* RenderImageResource.cpp in Sources */,
+ 08641D4712142F7D008DE9F6 /* RenderImageResourceStyleImage.cpp in Sources */,
A7AA66D611C5ED6A001D8C8C /* RenderIndicator.cpp in Sources */,
BCEA4877097D93020094C9E4 /* RenderInline.cpp in Sources */,
750D029311D0E7F300BD1B27 /* RenderInputSpeech.cpp in Sources */,
@@ -22636,7 +22674,6 @@
B2C3DA4A0D006C1D00EF6F26 /* TextStream.cpp in Sources */,
BCE65D320EAD1211007E4533 /* Theme.cpp in Sources */,
BCE659E90EA92FFA007E4533 /* ThemeMac.mm in Sources */,
- 2EED57FD1214A9C2007656BB /* ThreadableBlobRegistry.cpp in Sources */,
0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */,
5112247210CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp in Sources */,
51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
@@ -22800,35 +22837,64 @@
D0FF2A5D11F8C45A007E74E0 /* PingLoader.cpp in Sources */,
C50B561612119D23008B46E0 /* GroupSettings.cpp in Sources */,
490707E61219C04300D90E51 /* ANGLEWebKitBridge.cpp in Sources */,
- 899ABC261215E4A300F9F219 /* DirectoryEntry.cpp in Sources */,
- 899ABC291215E4A300F9F219 /* DirectoryReader.cpp in Sources */,
- 899ABC361215E4BE00F9F219 /* EntryArray.cpp in Sources */,
- 899ABC391215E4BE00F9F219 /* FileEntry.cpp in Sources */,
- 899ABC5D1215EB2A00F9F219 /* JSDirectoryEntry.cpp in Sources */,
- 899ABC5F1215EB2A00F9F219 /* JSEntriesCallback.cpp in Sources */,
- 899ABC611215EB2A00F9F219 /* JSEntryArray.cpp in Sources */,
- 899ABC631215EB2A00F9F219 /* JSFileEntry.cpp in Sources */,
- 899ABC6D1215ECEF00F9F219 /* JSDirectoryReader.cpp in Sources */,
- 899ABC791215F03100F9F219 /* JSDOMFileSystem.cpp in Sources */,
- 899ABC7B1215F03300F9F219 /* JSEntry.cpp in Sources */,
- 899ABC7D1215F03600F9F219 /* JSEntryCallback.cpp in Sources */,
- 899ABC7F1215F03800F9F219 /* JSErrorCallback.cpp in Sources */,
- 899ABC821215F03B00F9F219 /* JSFlags.cpp in Sources */,
- 899ABC841215F03D00F9F219 /* JSFileSystemCallback.cpp in Sources */,
- 899ABC861215F0D800F9F219 /* DOMFileSystem.cpp in Sources */,
- 899ABCBA1215FAB800F9F219 /* Entry.cpp in Sources */,
C57FEDE11212EE9C0097BE65 /* FileSystem.cpp in Sources */,
2EDEF1F3121B0EFC00726DB2 /* BlobData.cpp in Sources */,
2EDEF1F6121B0EFC00726DB2 /* BlobRegistryImpl.cpp in Sources */,
2EF1BFEA121C9F4200C27627 /* FileStream.cpp in Sources */,
- 46A26905121B6B4300C41F3A /* FileWriter.cpp in Sources */,
- 89C0DD7A121F0C69009E17CA /* FileSystemCallbacks.cpp in Sources */,
CE057FA51220731100A476D5 /* DocumentMarkerController.cpp in Sources */,
9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */,
2EB4BCD2121F03E300EC4885 /* BlobResourceHandle.cpp in Sources */,
- 89686C9F122244A00076EAA4 /* DOMFilePath.cpp in Sources */,
- 8947A82912222C4700D95F2D /* JSMetadata.cpp in Sources */,
- 8947A82B12222C4700D95F2D /* JSMetadataCallback.cpp in Sources */,
+ 46DA844D1224A0710060D006 /* JSFileWriter.cpp in Sources */,
+ 89D08D9F12228451001241DF /* AsyncFileSystem.cpp in Sources */,
+ 977B37231228721700B81FF8 /* HTMLElementStack.cpp in Sources */,
+ 977B37251228721700B81FF8 /* HTMLTreeBuilder.cpp in Sources */,
+ 977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */,
+ 977B3864122883E900B81FF8 /* HTMLConstructionSite.cpp in Sources */,
+ 977B3866122883E900B81FF8 /* HTMLDocumentParser.cpp in Sources */,
+ 977B3869122883E900B81FF8 /* HTMLEntityParser.cpp in Sources */,
+ 977B386B122883E900B81FF8 /* HTMLEntitySearch.cpp in Sources */,
+ 977B386E122883E900B81FF8 /* HTMLFormattingElementList.cpp in Sources */,
+ 977B3870122883E900B81FF8 /* HTMLParserScheduler.cpp in Sources */,
+ 977B3872122883E900B81FF8 /* HTMLPreloadScanner.cpp in Sources */,
+ 977B3874122883E900B81FF8 /* HTMLScriptRunner.cpp in Sources */,
+ 977B3877122883E900B81FF8 /* HTMLTokenizer.cpp in Sources */,
+ 977B3879122883E900B81FF8 /* HTMLViewSourceParser.cpp in Sources */,
+ B5320D6C122A24E9002D1440 /* FontPlatformDataCocoa.mm in Sources */,
+ 976D6C78122B8A3D001FD1F7 /* Blob.cpp in Sources */,
+ 976D6C7B122B8A3D001FD1F7 /* BlobBuilder.cpp in Sources */,
+ 976D6C7E122B8A3D001FD1F7 /* BlobURL.cpp in Sources */,
+ 976D6C80122B8A3D001FD1F7 /* File.cpp in Sources */,
+ 976D6C85122B8A3D001FD1F7 /* FileList.cpp in Sources */,
+ 976D6C88122B8A3D001FD1F7 /* FileReader.cpp in Sources */,
+ 976D6C8B122B8A3D001FD1F7 /* FileStreamProxy.cpp in Sources */,
+ 976D6C8D122B8A3D001FD1F7 /* FileThread.cpp in Sources */,
+ 976D6C90122B8A3D001FD1F7 /* FileWriter.cpp in Sources */,
+ 976D6C94122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp in Sources */,
+ 2EDF369C122C94B4002F7D4E /* FileReaderSync.cpp in Sources */,
+ 89878552122CA064003AABDA /* DirectoryEntry.cpp in Sources */,
+ 89878554122CA064003AABDA /* DirectoryReader.cpp in Sources */,
+ 89878556122CA064003AABDA /* DOMFilePath.cpp in Sources */,
+ 89878558122CA064003AABDA /* DOMFileSystem.cpp in Sources */,
+ 8987855B122CA064003AABDA /* Entry.cpp in Sources */,
+ 8987855D122CA064003AABDA /* EntryArray.cpp in Sources */,
+ 89878561122CA064003AABDA /* FileEntry.cpp in Sources */,
+ 89878564122CA064003AABDA /* FileSystemCallbacks.cpp in Sources */,
+ 89878567122CA064003AABDA /* LocalFileSystem.cpp in Sources */,
+ 8987858A122CA26A003AABDA /* JSDirectoryEntry.cpp in Sources */,
+ 8987858C122CA26A003AABDA /* JSDirectoryReader.cpp in Sources */,
+ 898785A4122CA2A7003AABDA /* JSDOMFileSystem.cpp in Sources */,
+ 898785A6122CA2A7003AABDA /* JSEntriesCallback.cpp in Sources */,
+ 898785A8122CA2A7003AABDA /* JSEntry.cpp in Sources */,
+ 898785AA122CA2A7003AABDA /* JSEntryArray.cpp in Sources */,
+ 898785AC122CA2A7003AABDA /* JSEntryCallback.cpp in Sources */,
+ 898785AE122CA2A7003AABDA /* JSErrorCallback.cpp in Sources */,
+ 898785B0122CA2A7003AABDA /* JSFileEntry.cpp in Sources */,
+ 898785B2122CA2A7003AABDA /* JSFileSystemCallback.cpp in Sources */,
+ 898785B4122CA2A7003AABDA /* JSFlags.cpp in Sources */,
+ 898785B6122CA2A7003AABDA /* JSMetadata.cpp in Sources */,
+ 898785B8122CA2A7003AABDA /* JSMetadataCallback.cpp in Sources */,
+ 898785F0122E1E87003AABDA /* JSFileException.cpp in Sources */,
+ 898785F4122E1EAC003AABDA /* JSFileReaderSync.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/accessibility/AXObjectCache.h b/WebCore/accessibility/AXObjectCache.h
index 6da6842..28a5917 100644
--- a/WebCore/accessibility/AXObjectCache.h
+++ b/WebCore/accessibility/AXObjectCache.h
@@ -107,6 +107,7 @@ public:
enum AXNotification {
AXActiveDescendantChanged,
AXCheckedStateChanged,
+ AXChildrenChanged,
AXFocusedUIElementChanged,
AXLayoutComplete,
AXLoadComplete,
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 92c57c6..e292971 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -3239,6 +3239,8 @@ void AccessibilityRenderObject::childrenChanged()
if (!m_renderer)
return;
+ bool sentChildrenChanged = false;
+
// Go up the accessibility parent chain, but only if the element already exists. This method is
// called during render layouts, minimal work should be done.
// If AX elements are created now, they could interrogate the render tree while it's in a funky state.
@@ -3248,6 +3250,13 @@ void AccessibilityRenderObject::childrenChanged()
continue;
AccessibilityRenderObject* axParent = static_cast<AccessibilityRenderObject*>(parent);
+
+ // Send the children changed notification on the first accessibility render object ancestor.
+ if (!sentChildrenChanged) {
+ axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXChildrenChanged, true);
+ sentChildrenChanged = true;
+ }
+
// Only do work if the children haven't been marked dirty. This has the effect of blocking
// future live region change notifications until the AX tree has been accessed again. This
// is a good performance win for all parties.
diff --git a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
index 4118c63..d906a91 100644
--- a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
+++ b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
@@ -56,15 +56,34 @@ void AXObjectCache::attachWrapper(AccessibilityObject*)
void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
{
- if (notification != AXCheckedStateChanged)
- return;
-
if (!obj || !obj->document() || !obj->documentFrameView())
return;
ChromeClientChromium* client = toChromeClientChromium(obj->documentFrameView());
- if (client)
- client->didChangeAccessibilityObjectState(obj);
+ if (client) {
+ switch (notification) {
+ case AXCheckedStateChanged:
+ client->didChangeAccessibilityObjectState(obj);
+ break;
+ case AXChildrenChanged:
+ client->didChangeAccessibilityObjectChildren(obj);
+ break;
+ case AXActiveDescendantChanged:
+ case AXFocusedUIElementChanged:
+ case AXLayoutComplete:
+ case AXLiveRegionChanged:
+ case AXLoadComplete:
+ case AXMenuListValueChanged:
+ case AXRowCollapsed:
+ case AXRowCountChanged:
+ case AXRowExpanded:
+ case AXScrolledToAnchor:
+ case AXSelectedChildrenChanged:
+ case AXSelectedTextChanged:
+ case AXValueChanged:
+ break;
+ }
+ }
}
void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
index 94e984f..a15fd6d 100644
--- a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
@@ -51,6 +51,14 @@ bool RuntimeEnabledFeatures::isDeviceMotionEnabled = true;
bool RuntimeEnabledFeatures::isDeviceOrientationEnabled = true;
bool RuntimeEnabledFeatures::isSpeechInputEnabled = true;
+#if ENABLE(XHR_RESPONSE_BLOB)
+bool RuntimeEnabledFeatures::isXHRResponseBlobEnabled = false;
+#endif
+
+#if ENABLE(FILE_SYSTEM)
+bool RuntimeEnabledFeatures::isFileSystemEnabled = false;
+#endif
+
#if ENABLE(VIDEO)
bool RuntimeEnabledFeatures::audioEnabled()
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.h b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
index fd7308e..fb43f3f 100644
--- a/WebCore/bindings/generic/RuntimeEnabledFeatures.h
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
@@ -128,6 +128,19 @@ public:
static bool speechInputEnabled() { return isSpeechInputEnabled; }
static bool speechEnabled() { return isSpeechInputEnabled; }
+#if ENABLE(XHR_RESPONSE_BLOB)
+ static bool xhrResponseBlobEnabled() { return isXHRResponseBlobEnabled; }
+ static void setXHRResponseBlobEnabled(bool isEnabled) { isXHRResponseBlobEnabled = isEnabled; }
+ static bool responseBlobEnabled() { return isXHRResponseBlobEnabled; }
+ static bool asBlobEnabled() { return isXHRResponseBlobEnabled; }
+#endif
+
+#if ENABLE(FILE_SYSTEM)
+ static bool fileSystemEnabled() { return isFileSystemEnabled; }
+ static void setFileSystemEnabled(bool isEnabled) { isFileSystemEnabled = isEnabled; }
+ static bool requestFileSystemEnabled() { return isFileSystemEnabled; }
+#endif
+
private:
// Never instantiate.
RuntimeEnabledFeatures() { }
@@ -144,6 +157,13 @@ private:
static bool isDeviceMotionEnabled;
static bool isDeviceOrientationEnabled;
static bool isSpeechInputEnabled;
+#if ENABLE(XHR_RESPONSE_BLOB)
+ static bool isXHRResponseBlobEnabled;
+#endif
+
+#if ENABLE(FILE_SYSTEM)
+ static bool isFileSystemEnabled;
+#endif
};
} // namespace WebCore
diff --git a/WebCore/bindings/gobject/GNUmakefile.am b/WebCore/bindings/gobject/GNUmakefile.am
new file mode 100644
index 0000000..12835cc
--- /dev/null
+++ b/WebCore/bindings/gobject/GNUmakefile.am
@@ -0,0 +1,415 @@
+webkitgtk_gdom_built_sources += \
+ DerivedSources/webkit/WebKitDOMAttr.cpp \
+ DerivedSources/webkit/WebKitDOMAttrPrivate.h \
+ DerivedSources/webkit/WebKitDOMBarInfo.cpp \
+ DerivedSources/webkit/WebKitDOMBarInfoPrivate.h \
+ DerivedSources/webkit/WebKitDOMBlob.cpp \
+ DerivedSources/webkit/WebKitDOMBlobPrivate.h \
+ DerivedSources/webkit/WebKitDOMCDATASection.cpp \
+ DerivedSources/webkit/WebKitDOMCDATASectionPrivate.h \
+ DerivedSources/webkit/WebKitDOMCharacterData.cpp \
+ DerivedSources/webkit/WebKitDOMCharacterDataPrivate.h \
+ DerivedSources/webkit/WebKitDOMComment.cpp \
+ DerivedSources/webkit/WebKitDOMCommentPrivate.h \
+ DerivedSources/webkit/WebKitDOMConsole.cpp \
+ DerivedSources/webkit/WebKitDOMConsolePrivate.h \
+ DerivedSources/webkit/WebKitDOMCSSRule.cpp \
+ DerivedSources/webkit/WebKitDOMCSSRuleList.cpp \
+ DerivedSources/webkit/WebKitDOMCSSRuleListPrivate.h \
+ DerivedSources/webkit/WebKitDOMCSSRulePrivate.h \
+ DerivedSources/webkit/WebKitDOMCSSStyleDeclaration.cpp \
+ DerivedSources/webkit/WebKitDOMCSSStyleDeclarationPrivate.h \
+ DerivedSources/webkit/WebKitDOMCSSStyleSheet.cpp \
+ DerivedSources/webkit/WebKitDOMCSSStyleSheetPrivate.h \
+ DerivedSources/webkit/WebKitDOMCSSValue.cpp \
+ DerivedSources/webkit/WebKitDOMCSSValuePrivate.h \
+ DerivedSources/webkit/WebKitDOMDatabase.cpp \
+ DerivedSources/webkit/WebKitDOMDatabasePrivate.h \
+ DerivedSources/webkit/WebKitDOMDocument.cpp \
+ DerivedSources/webkit/WebKitDOMDocumentFragment.cpp \
+ DerivedSources/webkit/WebKitDOMDocumentFragmentPrivate.h \
+ DerivedSources/webkit/WebKitDOMDocumentPrivate.h \
+ DerivedSources/webkit/WebKitDOMDocumentType.cpp \
+ DerivedSources/webkit/WebKitDOMDocumentTypePrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMApplicationCache.cpp \
+ DerivedSources/webkit/WebKitDOMDOMApplicationCachePrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMImplementation.cpp \
+ DerivedSources/webkit/WebKitDOMDOMImplementationPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMMimeTypeArray.cpp \
+ DerivedSources/webkit/WebKitDOMDOMMimeTypeArrayPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMMimeType.cpp \
+ DerivedSources/webkit/WebKitDOMDOMMimeTypePrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMPluginArray.cpp \
+ DerivedSources/webkit/WebKitDOMDOMPluginArrayPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMPlugin.cpp \
+ DerivedSources/webkit/WebKitDOMDOMPluginPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMSelection.cpp \
+ DerivedSources/webkit/WebKitDOMDOMSelectionPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMStringList.cpp \
+ DerivedSources/webkit/WebKitDOMDOMStringListPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMStringMap.cpp \
+ DerivedSources/webkit/WebKitDOMDOMStringMapPrivate.h \
+ DerivedSources/webkit/WebKitDOMDOMWindow.cpp \
+ DerivedSources/webkit/WebKitDOMDOMWindowPrivate.h \
+ DerivedSources/webkit/WebKitDOMElement.cpp \
+ DerivedSources/webkit/WebKitDOMElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMEntityReference.cpp \
+ DerivedSources/webkit/WebKitDOMEntityReferencePrivate.h \
+ DerivedSources/webkit/WebKitDOMEvent.cpp \
+ DerivedSources/webkit/WebKitDOMEventPrivate.h \
+ DerivedSources/webkit/WebKitDOMEventTargetPrivate.h \
+ DerivedSources/webkit/WebKitDOMFile.cpp \
+ DerivedSources/webkit/WebKitDOMFileList.cpp \
+ DerivedSources/webkit/WebKitDOMFileListPrivate.h \
+ DerivedSources/webkit/WebKitDOMFilePrivate.h \
+ DerivedSources/webkit/WebKitDOMHistory.cpp \
+ DerivedSources/webkit/WebKitDOMHistoryPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLAnchorElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLAnchorElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLAppletElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLAppletElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLAreaElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLAreaElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLBaseElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLBaseElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLBaseFontElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLBaseFontElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLBlockquoteElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLBlockquoteElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLBodyElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLBodyElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLBRElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLBRElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLButtonElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLButtonElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLCanvasElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLCanvasElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLCollection.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLCollectionPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLDirectoryElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLDirectoryElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLDivElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLDivElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLDListElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLDListElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLDocument.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLDocumentPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLEmbedElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLEmbedElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLFieldSetElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLFieldSetElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLFontElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLFontElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLFormElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLFormElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLFrameElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLFrameElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLFrameSetElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLFrameSetElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLHeadElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLHeadElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLHeadingElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLHeadingElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLHRElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLHRElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLHtmlElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLHtmlElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLIFrameElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLIFrameElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLImageElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLImageElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLInputElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLInputElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLIsIndexElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLIsIndexElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLLabelElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLLabelElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLLegendElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLLegendElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLLIElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLLIElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLLinkElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLLinkElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLMapElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLMapElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLMarqueeElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLMarqueeElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLMediaElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLMenuElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLMenuElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLMetaElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLMetaElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLModElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLModElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLObjectElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLObjectElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLOListElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLOListElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLOptGroupElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLOptGroupElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLOptionElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLOptionElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLOptionsCollection.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLOptionsCollectionPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLParagraphElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLParagraphElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLParamElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLParamElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLPreElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLPreElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLQuoteElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLQuoteElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLScriptElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLScriptElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLSelectElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLSelectElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLStyleElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLStyleElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableCaptionElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTableCaptionElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableCellElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTableCellElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableColElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTableColElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTableElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableRowElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTableRowElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableSectionElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTableSectionElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTextAreaElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTextAreaElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLTitleElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLTitleElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMHTMLUListElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLUListElementPrivate.h \
+ DerivedSources/webkit/WebKitDOMLocation.cpp \
+ DerivedSources/webkit/WebKitDOMLocationPrivate.h \
+ DerivedSources/webkit/WebKitDOMMediaError.cpp \
+ DerivedSources/webkit/WebKitDOMMediaErrorPrivate.h \
+ DerivedSources/webkit/WebKitDOMMediaList.cpp \
+ DerivedSources/webkit/WebKitDOMMediaListPrivate.h \
+ DerivedSources/webkit/WebKitDOMMemoryInfo.cpp \
+ DerivedSources/webkit/WebKitDOMMemoryInfoPrivate.h \
+ DerivedSources/webkit/WebKitDOMMessagePort.cpp \
+ DerivedSources/webkit/WebKitDOMMessagePortPrivate.h \
+ DerivedSources/webkit/WebKitDOMMouseEvent.cpp \
+ DerivedSources/webkit/WebKitDOMMouseEventPrivate.h \
+ DerivedSources/webkit/WebKitDOMNamedNodeMap.cpp \
+ DerivedSources/webkit/WebKitDOMNamedNodeMapPrivate.h \
+ DerivedSources/webkit/WebKitDOMNavigator.cpp \
+ DerivedSources/webkit/WebKitDOMNavigatorPrivate.h \
+ DerivedSources/webkit/WebKitDOMNode.cpp \
+ DerivedSources/webkit/WebKitDOMNodeFilter.cpp \
+ DerivedSources/webkit/WebKitDOMNodeFilterPrivate.h \
+ DerivedSources/webkit/WebKitDOMNodeIterator.cpp \
+ DerivedSources/webkit/WebKitDOMNodeIteratorPrivate.h \
+ DerivedSources/webkit/WebKitDOMNodeList.cpp \
+ DerivedSources/webkit/WebKitDOMNodeListPrivate.h \
+ DerivedSources/webkit/WebKitDOMNodePrivate.h \
+ DerivedSources/webkit/WebKitDOMProcessingInstruction.cpp \
+ DerivedSources/webkit/WebKitDOMProcessingInstructionPrivate.h \
+ DerivedSources/webkit/WebKitDOMRange.cpp \
+ DerivedSources/webkit/WebKitDOMRangePrivate.h \
+ DerivedSources/webkit/WebKitDOMScreen.cpp \
+ DerivedSources/webkit/WebKitDOMScreenPrivate.h \
+ DerivedSources/webkit/WebKitDOMStorage.cpp \
+ DerivedSources/webkit/WebKitDOMStoragePrivate.h \
+ DerivedSources/webkit/WebKitDOMStyleMedia.cpp \
+ DerivedSources/webkit/WebKitDOMStyleMediaPrivate.h \
+ DerivedSources/webkit/WebKitDOMStyleSheet.cpp \
+ DerivedSources/webkit/WebKitDOMStyleSheetList.cpp \
+ DerivedSources/webkit/WebKitDOMStyleSheetListPrivate.h \
+ DerivedSources/webkit/WebKitDOMStyleSheetPrivate.h \
+ DerivedSources/webkit/WebKitDOMText.cpp \
+ DerivedSources/webkit/WebKitDOMTextPrivate.h \
+ DerivedSources/webkit/WebKitDOMTimeRanges.cpp \
+ DerivedSources/webkit/WebKitDOMTimeRangesPrivate.h \
+ DerivedSources/webkit/WebKitDOMTreeWalker.cpp \
+ DerivedSources/webkit/WebKitDOMTreeWalkerPrivate.h \
+ DerivedSources/webkit/WebKitDOMUIEvent.cpp \
+ DerivedSources/webkit/WebKitDOMUIEventPrivate.h \
+ DerivedSources/webkit/WebKitDOMValidityState.cpp \
+ DerivedSources/webkit/WebKitDOMValidityStatePrivate.h \
+ DerivedSources/webkit/WebKitDOMWebKitPoint.cpp \
+ DerivedSources/webkit/WebKitDOMWebKitPointPrivate.h \
+ DerivedSources/webkit/WebKitDOMXPathExpression.cpp \
+ DerivedSources/webkit/WebKitDOMXPathExpressionPrivate.h \
+ DerivedSources/webkit/WebKitDOMXPathNSResolver.cpp \
+ DerivedSources/webkit/WebKitDOMXPathNSResolverPrivate.h \
+ DerivedSources/webkit/WebKitDOMXPathResult.cpp \
+ DerivedSources/webkit/WebKitDOMXPathResultPrivate.h
+
+webkitgtk_built_h_api += \
+ DerivedSources/webkit/WebKitDOMCSSRule.h \
+ DerivedSources/webkit/WebKitDOMCSSRuleList.h \
+ DerivedSources/webkit/WebKitDOMCSSStyleDeclaration.h \
+ DerivedSources/webkit/WebKitDOMCSSStyleSheet.h \
+ DerivedSources/webkit/WebKitDOMCSSValue.h \
+ DerivedSources/webkit/WebKitDOMMediaList.h \
+ DerivedSources/webkit/WebKitDOMStyleMedia.h \
+ DerivedSources/webkit/WebKitDOMStyleSheet.h \
+ DerivedSources/webkit/WebKitDOMStyleSheetList.h \
+ DerivedSources/webkit/WebKitDOMAttr.h \
+ DerivedSources/webkit/WebKitDOMCDATASection.h \
+ DerivedSources/webkit/WebKitDOMCharacterData.h \
+ DerivedSources/webkit/WebKitDOMComment.h \
+ DerivedSources/webkit/WebKitDOMDocument.h \
+ DerivedSources/webkit/WebKitDOMDocumentFragment.h \
+ DerivedSources/webkit/WebKitDOMDocumentType.h \
+ DerivedSources/webkit/WebKitDOMDOMImplementation.h \
+ DerivedSources/webkit/WebKitDOMDOMStringList.h \
+ DerivedSources/webkit/WebKitDOMDOMStringMap.h \
+ DerivedSources/webkit/WebKitDOMElement.h \
+ DerivedSources/webkit/WebKitDOMEntityReference.h \
+ DerivedSources/webkit/WebKitDOMEvent.h \
+ DerivedSources/webkit/WebKitDOMMessagePort.h \
+ DerivedSources/webkit/WebKitDOMMouseEvent.h \
+ DerivedSources/webkit/WebKitDOMNamedNodeMap.h \
+ DerivedSources/webkit/WebKitDOMNode.h \
+ DerivedSources/webkit/WebKitDOMNodeFilter.h \
+ DerivedSources/webkit/WebKitDOMNodeIterator.h \
+ DerivedSources/webkit/WebKitDOMNodeList.h \
+ DerivedSources/webkit/WebKitDOMProcessingInstruction.h \
+ DerivedSources/webkit/WebKitDOMRange.h \
+ DerivedSources/webkit/WebKitDOMText.h \
+ DerivedSources/webkit/WebKitDOMTreeWalker.h \
+ DerivedSources/webkit/WebKitDOMUIEvent.h \
+ DerivedSources/webkit/WebKitDOMBlob.h \
+ DerivedSources/webkit/WebKitDOMFile.h \
+ DerivedSources/webkit/WebKitDOMFileList.h \
+ DerivedSources/webkit/WebKitDOMHTMLAnchorElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLAppletElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLAreaElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLBaseElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLBaseFontElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLBlockquoteElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLBodyElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLBRElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLButtonElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLCanvasElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLCollection.h \
+ DerivedSources/webkit/WebKitDOMHTMLDirectoryElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLDivElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLDListElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLDocument.h \
+ DerivedSources/webkit/WebKitDOMHTMLElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLEmbedElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLFieldSetElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLFontElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLFormElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLFrameElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLFrameSetElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLHeadElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLHeadingElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLHRElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLHtmlElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLIFrameElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLImageElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLInputElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLIsIndexElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLLabelElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLLegendElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLLIElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLLinkElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLMapElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLMarqueeElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLMediaElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLMenuElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLMetaElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLModElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLObjectElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLOListElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLOptGroupElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLOptionElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLOptionsCollection.h \
+ DerivedSources/webkit/WebKitDOMHTMLParagraphElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLParamElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLPreElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLQuoteElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLScriptElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLSelectElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLStyleElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableCaptionElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableColElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableSectionElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableCellElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTextAreaElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTitleElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLTableRowElement.h \
+ DerivedSources/webkit/WebKitDOMHTMLUListElement.h \
+ DerivedSources/webkit/WebKitDOMMediaError.h \
+ DerivedSources/webkit/WebKitDOMTimeRanges.h \
+ DerivedSources/webkit/WebKitDOMValidityState.h \
+ DerivedSources/webkit/WebKitDOMDOMApplicationCache.h \
+ DerivedSources/webkit/WebKitDOMBarInfo.h \
+ DerivedSources/webkit/WebKitDOMConsole.h \
+ DerivedSources/webkit/WebKitDOMDOMWindow.h \
+ DerivedSources/webkit/WebKitDOMDOMSelection.h \
+ DerivedSources/webkit/WebKitDOMEventTarget.h \
+ DerivedSources/webkit/WebKitDOMHistory.h \
+ DerivedSources/webkit/WebKitDOMLocation.h \
+ DerivedSources/webkit/WebKitDOMMemoryInfo.h \
+ DerivedSources/webkit/WebKitDOMObject.h \
+ DerivedSources/webkit/WebKitDOMNavigator.h \
+ DerivedSources/webkit/WebKitDOMScreen.h \
+ DerivedSources/webkit/WebKitDOMWebKitPoint.h \
+ DerivedSources/webkit/WebKitDOMDOMMimeType.h \
+ DerivedSources/webkit/WebKitDOMDOMMimeTypeArray.h \
+ DerivedSources/webkit/WebKitDOMDOMPlugin.h \
+ DerivedSources/webkit/WebKitDOMDOMPluginArray.h \
+ DerivedSources/webkit/WebKitDOMDatabase.h \
+ DerivedSources/webkit/WebKitDOMStorage.h \
+ DerivedSources/webkit/WebKitDOMXPathExpression.h \
+ DerivedSources/webkit/WebKitDOMXPathNSResolver.h \
+ DerivedSources/webkit/WebKitDOMXPathResult.h \
+ DerivedSources/webkit/webkitdom.h \
+ DerivedSources/webkit/webkitdomdefines.h
+
+if ENABLE_GEOLOCATION
+webkitgtk_built_h_api += \
+ $(top_builddir)/DerivedSources/webkit/WebKitDOMGeolocation.h
+webkitgtk_gdom_built_sources += \
+ DerivedSources/webkit/WebKitDOMGeolocation.cpp \
+ DerivedSources/webkit/WebKitDOMGeolocationPrivate.h
+endif
+
+if ENABLE_VIDEO
+webkitgtk_built_h_api += \
+ $(top_builddir)/DerivedSources/webkit/WebKitDOMHTMLAudioElement.h
+webkitgtk_gdom_built_sources += \
+ DerivedSources/webkit/WebKitDOMHTMLAudioElement.cpp \
+ DerivedSources/webkit/WebKitDOMHTMLAudioElementPrivate.h
+endif
+
+gdom_class_list := $(subst WebKitDOM,, $(filter-out %Private, $(basename $(notdir $(webkitgtk_gdom_built_sources)))))
+gdom_class_list += Object EventTarget
+DerivedSources/webkit/webkitdom.h: $(WebCore)/bindings/scripts/gobject-generate-headers.pl $(WebCore)/bindings/gobject/GNUmakefile.am
+ $(AM_V_GEN)echo $(gdom_class_list) | $(PERL) $< gdom > $@
+
+DerivedSources/webkit/webkitdomdefines.h: $(WebCore)/bindings/scripts/gobject-generate-headers.pl $(WebCore)/bindings/gobject/GNUmakefile.am
+ $(AM_V_GEN)echo $(gdom_class_list) | $(PERL) $< defines > $@
+
+# Because WebCore/bindings/gobject/WebKitDOMObject.h is static source but is also a distributed header
+# required by other distributed headers (both static and auto-generated), need to move this to the
+# DerivedSources/webkit directory. The reason is that we want all header files distributed in the
+# include/webkit-x.y/webkit directory, but do not want to name the WebCore/bindings/gobject directory
+# "webkit", as that's a bit presumptuous for a GTK binding.
+$(top_builddir)/DerivedSources/webkit/WebKitDOMObject.h: $(WebCore)/bindings/gobject/WebKitDOMObject.h
+ $(AM_V_GEN)cp -f $< $@
+
+$(top_builddir)/DerivedSources/webkit/WebKitDOMEventTarget.h: $(WebCore)/bindings/gobject/WebKitDOMEventTarget.h
+ $(AM_V_GEN)cp -f $< $@
+
+$(top_builddir)/DerivedSources/webkit/WebKitDOMEventTargetPrivate.h: $(WebCore)/bindings/gobject/WebKitDOMEventTargetPrivate.h
+ $(AM_V_GEN)cp -f $< $@
+
+# Filter out SVG for now
+gdom_feature_defines := $(filter-out ENABLE-SVG%, $(FEATURE_DEFINES))
+DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h:: %.idl $(SCRIPTS_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm
+ $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKIT)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject $<
+
diff --git a/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp b/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
index da75139..2da3771 100644
--- a/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
@@ -124,7 +124,13 @@ JSValue JSXMLHttpRequest::send(ExecState* exec)
JSValue JSXMLHttpRequest::responseText(ExecState* exec) const
{
- return jsOwnedStringOrNull(exec, impl()->responseText());
+ ExceptionCode ec = 0;
+ const ScriptString& text = impl()->responseText(ec);
+ if (ec) {
+ setDOMException(exec, ec);
+ return jsUndefined();
+ }
+ return jsOwnedStringOrNull(exec, text);
}
EncodedJSValue JSC_HOST_CALL JSXMLHttpRequestConstructor::constructJSXMLHttpRequest(ExecState* exec)
diff --git a/WebCore/bindings/js/ScriptHeapSnapshot.h b/WebCore/bindings/js/ScriptHeapSnapshot.h
new file mode 100644
index 0000000..c81c782
--- /dev/null
+++ b/WebCore/bindings/js/ScriptHeapSnapshot.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 ScriptHeapSnapshot_h
+#define ScriptHeapSnapshot_h
+
+#include "InspectorValues.h"
+#include "PlatformString.h"
+
+namespace WebCore {
+
+class ScriptHeapSnapshot : public RefCounted<ScriptHeapSnapshot> {
+public:
+ virtual ~ScriptHeapSnapshot() {}
+
+ String title() const { return ""; }
+ unsigned int uid() const { return 0; }
+
+ PassRefPtr<InspectorObject> buildInspectorObjectForHead() const { return InspectorObject::create(); }
+
+private:
+ ScriptHeapSnapshot() {}
+};
+
+} // namespace WebCore
+
+#endif // ScriptHeapSnapshot_h
diff --git a/WebCore/bindings/js/ScriptProfile.cpp b/WebCore/bindings/js/ScriptProfile.cpp
index 0eb2814..8731ec2 100644
--- a/WebCore/bindings/js/ScriptProfile.cpp
+++ b/WebCore/bindings/js/ScriptProfile.cpp
@@ -76,7 +76,7 @@ static PassRefPtr<InspectorObject> buildInspectorObjectFor(const JSC::ProfileNod
result->setNumber("totalTime", node->totalTime());
result->setNumber("selfTime", node->selfTime());
result->setNumber("numberOfCalls", node->numberOfCalls());
- result->setBool("visible", node->visible());
+ result->setBoolean("visible", node->visible());
result->setNumber("callUID", node->callIdentifier().hash());
RefPtr<InspectorArray> childrenArray = InspectorArray::create();
diff --git a/WebCore/bindings/js/ScriptProfiler.h b/WebCore/bindings/js/ScriptProfiler.h
index 180c49f..05e7a25 100644
--- a/WebCore/bindings/js/ScriptProfiler.h
+++ b/WebCore/bindings/js/ScriptProfiler.h
@@ -28,6 +28,7 @@
#define ScriptProfiler_h
#if ENABLE(JAVASCRIPT_DEBUGGER)
+#include "ScriptHeapSnapshot.h"
#include "ScriptProfile.h"
#include "ScriptState.h"
@@ -39,8 +40,7 @@ class ScriptProfiler : public Noncopyable {
public:
static void start(ScriptState* state, const String& title);
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
- static void takeHeapSnapshot() { }
- static long getProfilerLogLines(long, String*) { return 0; }
+ static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&) { return 0; }
static bool isProfilerAlwaysEnabled();
};
diff --git a/WebCore/bindings/js/SerializedScriptValue.cpp b/WebCore/bindings/js/SerializedScriptValue.cpp
index 00ec25f..ca18ec0 100644
--- a/WebCore/bindings/js/SerializedScriptValue.cpp
+++ b/WebCore/bindings/js/SerializedScriptValue.cpp
@@ -1080,6 +1080,12 @@ PassRefPtr<SerializedScriptValue> SerializedScriptValue::create(JSContextRef ori
return serializedValue;
}
+SerializedScriptValue* SerializedScriptValue::nullValue()
+{
+ DEFINE_STATIC_LOCAL(RefPtr<SerializedScriptValue>, nullValue, (SerializedScriptValue::create()));
+ return nullValue.get();
+}
+
JSValueRef SerializedScriptValue::deserialize(JSContextRef destinationContext, JSValueRef* exception)
{
JSLock lock(SilenceAssertionsOnly);
diff --git a/WebCore/bindings/js/SerializedScriptValue.h b/WebCore/bindings/js/SerializedScriptValue.h
index 2b7d222..32ce418 100644
--- a/WebCore/bindings/js/SerializedScriptValue.h
+++ b/WebCore/bindings/js/SerializedScriptValue.h
@@ -213,6 +213,8 @@ namespace WebCore {
{
return adoptRef(new SerializedScriptValue(SerializedScriptValueData()));
}
+
+ static SerializedScriptValue* nullValue();
PassRefPtr<SerializedScriptValue> release()
{
diff --git a/WebCore/bindings/objc/PublicDOMInterfaces.h b/WebCore/bindings/objc/PublicDOMInterfaces.h
index ea46436..428ac4a 100644
--- a/WebCore/bindings/objc/PublicDOMInterfaces.h
+++ b/WebCore/bindings/objc/PublicDOMInterfaces.h
@@ -156,6 +156,9 @@
- (DOMNodeList *)getElementsByClassName:(NSString *)tagname AVAILABLE_IN_WEBKIT_VERSION_4_0;
- (DOMElement *)querySelector:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0;
- (DOMNodeList *)querySelectorAll:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0;
+#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
+- (void)webkitCancelFullScreen AVAILABLE_IN_WEBKIT_VERSION_4_0;
+#endif
@end
@interface DOMDocumentFragment : DOMNode WEBKIT_VERSION_1_3
@@ -224,6 +227,9 @@
- (DOMNodeList *)getElementsByClassName:(NSString *)name AVAILABLE_IN_WEBKIT_VERSION_4_0;
- (DOMElement *)querySelector:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0;
- (DOMNodeList *)querySelectorAll:(NSString *)selectors AVAILABLE_IN_WEBKIT_VERSION_4_0;
+#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
+- (void)webkitRequestFullScreen:(unsigned short)flags AVAILABLE_IN_WEBKIT_VERSION_4_0;
+#endif
@end
@interface DOMEntity : DOMNode WEBKIT_VERSION_1_3
diff --git a/WebCore/bindings/scripts/CodeGeneratorCPP.pm b/WebCore/bindings/scripts/CodeGeneratorCPP.pm
index 6bafb1e..f9dd5f2 100644
--- a/WebCore/bindings/scripts/CodeGeneratorCPP.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorCPP.pm
@@ -393,7 +393,9 @@ sub GenerateHeader
# Destructor
if ($parentName eq "WebDOMObject") {
- push(@headerContent, " ~$className();\n");
+ push(@headerContent, " virtual ~$className();\n");
+ } else {
+ push(@headerContent, " virtual ~$className() { }\n");
}
push(@headerContent, "\n");
diff --git a/WebCore/bindings/scripts/CodeGeneratorGObject.pm b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
index 5700ff7..6a1d115 100644
--- a/WebCore/bindings/scripts/CodeGeneratorGObject.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
@@ -479,23 +479,11 @@ sub EventSignalName {
}
sub GenerateEventListener {
- my $attribute = shift;
+ my $name = shift;
my $object = shift;
my $interfaceName = shift;
- # This marks event listeners in some subclasses of Element. We
- # cannot add them, otherwise we'll get runtime errors because of
- # duplicated signal definitions between a class and some ancestor.
-
- # FIXME: it would be very good to be a lot more precise in how we
- # do this...
- if ($attribute->signature->extendedAttributes->{"WindowEventListener"}) {
- return;
- }
-
- my $name = $attribute->signature->name;
- my $domSignalName = substr($name, 2);
- my $gobjectSignalName = EventSignalName($domSignalName);
+ my $gobjectSignalName = EventSignalName($name);
my $txtInstallSignal = << "EOF";
g_signal_new("${gobjectSignalName}",
@@ -510,11 +498,11 @@ sub GenerateEventListener {
EOF
push(@txtInstallSignals, $txtInstallSignal);
- my ${listenerName} = $domSignalName . "Listener";
+ my ${listenerName} = $name . "Listener";
my $txtInstallEventListener = << "EOF";
RefPtr<WebCore::GObjectEventListener> ${listenerName} = WebCore::GObjectEventListener::create(reinterpret_cast<GObject*>(object), "${gobjectSignalName}");
- coreObject->addEventListener("${domSignalName}", ${listenerName}, false);
+ coreObject->addEventListener("${name}", ${listenerName}, false);
EOF
push(@txtInstallEventListeners, $txtInstallEventListener);
@@ -522,6 +510,34 @@ EOF
$implIncludes{"GObjectEventListener.h"} = 1;
}
+my @eventSignalNames = (
+ # User Interface Event types
+ "focus", "blur",
+ # Basic Event types
+ "load", "unload", "abort", "error", "select", "change", "submit", "reset",
+ "resize", "scroll",
+ # Mouse Event types
+ "click", "dblclick", "mousedown", "mouseup",
+ "mousemove", "mouseover", "mouseout",
+ # Mouse Wheel Event types
+ "mousewheel",
+ # Keyboard Event types
+ "keydown", "keypress", "keyup",
+ # -- Events not in the spec but defined in WebKit
+ # Media Event types,
+ "loadstart", "progress", "suspend", "emptied", "stalled", "play",
+ "loadedmetadata", "loadeddata", "waiting", "playing", "canplay",
+ "canplaythrough", "seeking", "seeked", "timeupdate", "ended",
+ "ratechange", "durationchange", "volumechange",
+ # Drag and Drop Event types
+ "drag", "dragend", "dragenter", "dragleave", "dragover", "dragstart", "drop",
+ # Cut and Paste Event types
+ "beforecut", "cut", "beforecopy", "copy", "beforepaste", "paste",
+ # Animations
+ "webkitanimationend", "webkitanimationstart", "webkitanimationiteration",
+ # Other
+ "contextmenu", "input", "invalid", "search", "selectstart");
+
sub GenerateProperties {
my ($object, $interfaceName, $dataNode) = @_;
@@ -584,13 +600,20 @@ EOF
push(@txtSetProps, $txtSetProps);
foreach my $attribute (@readableProperties) {
- if ($attribute->signature->type eq "EventListener") {
- GenerateEventListener($attribute, $object, $interfaceName);
- } else {
+ if ($attribute->signature->type ne "EventListener") {
GenerateProperty($attribute, $interfaceName, \@writeableProperties);
}
}
+ # We need to define all the events there are in all base classes
+ # that implement EventTarget. For now we only care about these
+ # two.
+ if ($interfaceName eq "Node" || $interfaceName eq "DOMWindow") {
+ foreach my $signalName (@eventSignalNames) {
+ GenerateEventListener($signalName, $object, $interfaceName);
+ }
+ }
+
push(@cBodyPriv, "};\n\n");
$txtGetProp = << "EOF";
@@ -888,7 +911,11 @@ sub GenerateFunction {
if (!$paramTypeIsPrimitive) {
if ($returnType ne "void") {
# TODO: return proper default result
- push(@cBody, " g_return_val_if_fail($paramName, 0);\n");
+ # FIXME: Temporary hack for generating a proper implementation
+ # of the webkit_dom_document_evaluate function (Bug-ID: 42115)
+ if (!(($functionName eq "webkit_dom_document_evaluate") && ($paramIDLType eq "XPathResult"))) {
+ push(@cBody, " g_return_val_if_fail($paramName, 0);\n");
+ }
} else {
push(@cBody, " g_return_if_fail($paramName);\n");
}
@@ -906,13 +933,18 @@ sub GenerateFunction {
} elsif ($paramIDLType eq "CompareHow") {
push(@cBody, " WebCore::Range::CompareHow converted_${paramName} = static_cast<WebCore::Range::CompareHow>($paramName);\n");
} elsif ($paramIsGDOMType) {
- push(@cBody, " WebCore::${paramIDLType} * converted_${paramName} = WebKit::core($paramName);\n");
+ push(@cBody, " WebCore::${paramIDLType} * converted_${paramName} = NULL;\n");
+ push(@cBody, " if (${paramName} != NULL) {\n");
+ push(@cBody, " converted_${paramName} = WebKit::core($paramName);\n");
+
if ($returnType ne "void") {
# TODO: return proper default result
- push(@cBody, " g_return_val_if_fail(converted_${paramName}, 0);\n");
+ push(@cBody, " g_return_val_if_fail(converted_${paramName}, 0);\n");
} else {
- push(@cBody, " g_return_if_fail(converted_${paramName});\n");
+ push(@cBody, " g_return_if_fail(converted_${paramName});\n");
}
+
+ push(@cBody, " }\n");
}
$returnParamName = "converted_".$paramName if $param->extendedAttributes->{"Return"};
}
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 56838ca..028169f 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -762,8 +762,11 @@ END
}
if ($useExceptions) {
- push(@implContentDecls, " $nativeType v = ");
- push(@implContentDecls, "$getterString;\n");
+ if ($nativeType =~ /^V8Parameter/) {
+ push(@implContentDecls, " " . ConvertToV8Parameter($attribute->signature, $nativeType, "v", $getterString) . ";\n");
+ } else {
+ push(@implContentDecls, " $nativeType v = $getterString;\n");
+ }
push(@implContentDecls, GenerateSetDOMException(" "));
$result = "v";
$result .= ".release()" if (IsRefPtrType($returnType));
@@ -830,6 +833,8 @@ sub GenerateNormalAttrSetter
my $implClassName = shift;
my $interfaceName = shift;
+ $implIncludes{"V8BindingMacros.h"} = 1;
+
my $attrExt = $attribute->signature->extendedAttributes;
my $conditionalString = GenerateConditionalString($attribute->signature);
@@ -890,7 +895,12 @@ END
push(@implContentDecls, " return;\n");
}
} else {
- push(@implContentDecls, " $nativeType v = " . JSValueToNative($attribute->signature, "value") . ";\n");
+ my $value = JSValueToNative($attribute->signature, "value");
+ if ($nativeType =~ /^V8Parameter/) {
+ push(@implContentDecls, " " . ConvertToV8Parameter($attribute->signature, $nativeType, "v", $value, "VOID") . "\n");
+ } else {
+ push(@implContentDecls, " $nativeType v = $value;\n");
+ }
}
my $result = "v";
@@ -1236,13 +1246,7 @@ END
push(@implContentDecls, " }\n");
} elsif ($nativeType =~ /^V8Parameter/) {
my $value = JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ? "${parameterName}Ok" : undef);
- if ($parameter->type eq "DOMString") {
- $implIncludes{"V8BindingMacros.h"} = 1;
- push(@implContentDecls, " STRING_TO_V8PARAMETER_EXCEPTION_BLOCK($nativeType, $parameterName, $value);\n");
- } else {
- # Don't know how to properly check for conversion exceptions when $parameter->type is "DOMUserData"
- push(@implContentDecls, " $nativeType $parameterName = $value;\n");
- }
+ push(@implContentDecls, " " . ConvertToV8Parameter($parameter, $nativeType, $parameterName, $value) . "\n");
} else {
$implIncludes{"V8BindingMacros.h"} = 1;
# For functions with "StrictTypeChecking", if an input parameter's type does not match the signature,
@@ -3055,7 +3059,8 @@ my %non_wrapper_types = (
'EventTarget' => 1,
'NodeFilter' => 1,
'EventListener' => 1,
- 'IDBKey' => 1
+ 'IDBKey' => 1,
+ 'Date' => 1
);
@@ -3316,6 +3321,25 @@ sub GetCallbackClassName
return "V8$interfaceName";
}
+sub ConvertToV8Parameter
+{
+ my $signature = shift;
+ my $nativeType = shift;
+ my $variableName = shift;
+ my $value = shift;
+ my $suffix = shift;
+
+ die "Wrong native type passed: $nativeType" unless $nativeType =~ /^V8Parameter/;
+ if ($signature->type eq "DOMString") {
+ my $macro = "STRING_TO_V8PARAMETER_EXCEPTION_BLOCK";
+ $macro .= "_$suffix" if $suffix;
+ return "$macro($nativeType, $variableName, $value);"
+ } else {
+ # Don't know how to properly check for conversion exceptions when $parameter->type is "DOMUserData"
+ return "$nativeType $variableName($value, true);";
+ }
+}
+
sub DebugPrint
{
my $output = shift;
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
index a4d130e..91ff787 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestCallback.h
@@ -44,7 +44,7 @@ public:
explicit WebDOMTestCallback(WebCore::TestCallback*);
WebDOMTestCallback(const WebDOMTestCallback&);
WebDOMTestCallback& operator=(const WebDOMTestCallback&);
- ~WebDOMTestCallback();
+ virtual ~WebDOMTestCallback();
bool callbackWithClass1Param(const WebDOMClass1& class1Param);
bool callbackWithClass2Param(const WebDOMClass2& class2Param, const WebDOMString& strArg);
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h
index ca20c4e..5db5db8 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h
@@ -39,7 +39,7 @@ public:
explicit WebDOMTestInterface(WebCore::TestInterface*);
WebDOMTestInterface(const WebDOMTestInterface&);
WebDOMTestInterface& operator=(const WebDOMTestInterface&);
- ~WebDOMTestInterface();
+ virtual ~WebDOMTestInterface();
WebCore::TestInterface* impl() const;
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index 2fedf41..770ce51 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -41,7 +41,7 @@ public:
explicit WebDOMTestObj(WebCore::TestObj*);
WebDOMTestObj(const WebDOMTestObj&);
WebDOMTestObj& operator=(const WebDOMTestObj&);
- ~WebDOMTestObj();
+ virtual ~WebDOMTestObj();
enum {
WEBDOM_CONST_VALUE_0 = 0,
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
index e547d35..fbe538d 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
@@ -62,8 +62,11 @@ webkit_dom_test_callback_callback_with_class1param(WebKitDOMTestCallback* self,
g_return_val_if_fail(self, 0);
WebCore::TestCallback * item = WebKit::core(self);
g_return_val_if_fail(class1param, 0);
- WebCore::Class1 * converted_class1param = WebKit::core(class1param);
- g_return_val_if_fail(converted_class1param, 0);
+ WebCore::Class1 * converted_class1param = NULL;
+ if (class1param != NULL) {
+ converted_class1param = WebKit::core(class1param);
+ g_return_val_if_fail(converted_class1param, 0);
+ }
gboolean res = item->callbackWithClass1Param(converted_class1param);
return res;
}
@@ -76,8 +79,11 @@ webkit_dom_test_callback_callback_with_class2param(WebKitDOMTestCallback* self,
WebCore::TestCallback * item = WebKit::core(self);
g_return_val_if_fail(class2param, 0);
g_return_val_if_fail(str_arg, 0);
- WebCore::Class2 * converted_class2param = WebKit::core(class2param);
- g_return_val_if_fail(converted_class2param, 0);
+ WebCore::Class2 * converted_class2param = NULL;
+ if (class2param != NULL) {
+ converted_class2param = WebKit::core(class2param);
+ g_return_val_if_fail(converted_class2param, 0);
+ }
WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
gboolean res = item->callbackWithClass2Param(converted_class2param, converted_str_arg);
return res;
@@ -90,8 +96,11 @@ webkit_dom_test_callback_callback_with_non_bool_return_type(WebKitDOMTestCallbac
g_return_val_if_fail(self, 0);
WebCore::TestCallback * item = WebKit::core(self);
g_return_val_if_fail(class3param, 0);
- WebCore::Class3 * converted_class3param = WebKit::core(class3param);
- g_return_val_if_fail(converted_class3param, 0);
+ WebCore::Class3 * converted_class3param = NULL;
+ if (class3param != NULL) {
+ converted_class3param = WebKit::core(class3param);
+ g_return_val_if_fail(converted_class3param, 0);
+ }
glong res = item->callbackWithNonBoolReturnType(converted_class3param);
return res;
}
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
index 56c6e14..3c27b81 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
@@ -70,8 +70,11 @@ webkit_dom_test_obj_void_method_with_args(WebKitDOMTestObj* self, glong int_arg,
g_return_if_fail(str_arg);
g_return_if_fail(obj_arg);
WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
- WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg);
- g_return_if_fail(converted_obj_arg);
+ WebCore::TestObj * converted_obj_arg = NULL;
+ if (obj_arg != NULL) {
+ converted_obj_arg = WebKit::core(obj_arg);
+ g_return_if_fail(converted_obj_arg);
+ }
item->voidMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg);
}
@@ -94,8 +97,11 @@ webkit_dom_test_obj_int_method_with_args(WebKitDOMTestObj* self, glong int_arg,
g_return_val_if_fail(str_arg, 0);
g_return_val_if_fail(obj_arg, 0);
WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
- WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg);
- g_return_val_if_fail(converted_obj_arg, 0);
+ WebCore::TestObj * converted_obj_arg = NULL;
+ if (obj_arg != NULL) {
+ converted_obj_arg = WebKit::core(obj_arg);
+ g_return_val_if_fail(converted_obj_arg, 0);
+ }
glong res = item->intMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg);
return res;
}
@@ -120,8 +126,11 @@ webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg,
g_return_val_if_fail(str_arg, 0);
g_return_val_if_fail(obj_arg, 0);
WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
- WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg);
- g_return_val_if_fail(converted_obj_arg, 0);
+ WebCore::TestObj * converted_obj_arg = NULL;
+ if (obj_arg != NULL) {
+ converted_obj_arg = WebKit::core(obj_arg);
+ g_return_val_if_fail(converted_obj_arg, 0);
+ }
PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->objMethodWithArgs(int_arg, converted_str_arg, converted_obj_arg));
WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj*>(WebKit::kit(g_res.get()));
return res;
@@ -136,8 +145,11 @@ webkit_dom_test_obj_method_that_requires_all_args(WebKitDOMTestObj* self, const
g_return_val_if_fail(str_arg, 0);
g_return_val_if_fail(obj_arg, 0);
WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
- WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg);
- g_return_val_if_fail(converted_obj_arg, 0);
+ WebCore::TestObj * converted_obj_arg = NULL;
+ if (obj_arg != NULL) {
+ converted_obj_arg = WebKit::core(obj_arg);
+ g_return_val_if_fail(converted_obj_arg, 0);
+ }
PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgs(converted_str_arg, converted_obj_arg));
WebKitDOMTestObj* res = static_cast<WebKitDOMTestObj*>(WebKit::kit(g_res.get()));
return res;
@@ -152,8 +164,11 @@ webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* s
g_return_val_if_fail(str_arg, 0);
g_return_val_if_fail(obj_arg, 0);
WTF::String converted_str_arg = WTF::String::fromUTF8(str_arg);
- WebCore::TestObj * converted_obj_arg = WebKit::core(obj_arg);
- g_return_val_if_fail(converted_obj_arg, 0);
+ WebCore::TestObj * converted_obj_arg = NULL;
+ if (obj_arg != NULL) {
+ converted_obj_arg = WebKit::core(obj_arg);
+ g_return_val_if_fail(converted_obj_arg, 0);
+ }
WebCore::ExceptionCode ec = 0;
PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->methodThatRequiresAllArgsAndThrows(converted_str_arg, converted_obj_arg, ec));
if (ec) {
@@ -172,8 +187,11 @@ webkit_dom_test_obj_serialized_value(WebKitDOMTestObj* self, WebKitDOMSerialized
g_return_if_fail(self);
WebCore::TestObj * item = WebKit::core(self);
g_return_if_fail(serialized_arg);
- WebCore::SerializedScriptValue * converted_serialized_arg = WebKit::core(serialized_arg);
- g_return_if_fail(converted_serialized_arg);
+ WebCore::SerializedScriptValue * converted_serialized_arg = NULL;
+ if (serialized_arg != NULL) {
+ converted_serialized_arg = WebKit::core(serialized_arg);
+ g_return_if_fail(converted_serialized_arg);
+ }
item->serializedValue(converted_serialized_arg);
}
@@ -184,8 +202,11 @@ webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key)
g_return_if_fail(self);
WebCore::TestObj * item = WebKit::core(self);
g_return_if_fail(key);
- WebCore::IDBKey * converted_key = WebKit::core(key);
- g_return_if_fail(converted_key);
+ WebCore::IDBKey * converted_key = NULL;
+ if (key != NULL) {
+ converted_key = WebKit::core(key);
+ g_return_if_fail(converted_key);
+ }
item->idbKey(converted_key);
}
@@ -470,8 +491,11 @@ webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*
g_return_if_fail(self);
WebCore::TestObj * item = WebKit::core(self);
g_return_if_fail(value);
- WebCore::TestObj * converted_value = WebKit::core(value);
- g_return_if_fail(converted_value);
+ WebCore::TestObj * converted_value = NULL;
+ if (value != NULL) {
+ converted_value = WebKit::core(value);
+ g_return_if_fail(converted_value);
+ }
item->setTestObjAttr(converted_value);
}
@@ -493,8 +517,11 @@ webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj* v
g_return_if_fail(self);
WebCore::TestObj * item = WebKit::core(self);
g_return_if_fail(value);
- WebCore::TestObj * converted_value = WebKit::core(value);
- g_return_if_fail(converted_value);
+ WebCore::TestObj * converted_value = NULL;
+ if (value != NULL) {
+ converted_value = WebKit::core(value);
+ g_return_if_fail(converted_value);
+ }
item->setXMLObjAttr(converted_value);
}
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
index a2bc89d..94f734b 100644
--- a/WebCore/bindings/scripts/test/TestObj.idl
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -50,13 +50,13 @@ module test {
attribute [Reflect] DOMString reflectedStringAttr;
attribute [Reflect] long reflectedIntegralAttr;
attribute [Reflect] boolean reflectedBooleanAttr;
- attribute [Reflect,URL] DOMString reflectedURLAttr;
- attribute [Reflect,NonEmpty,URL] DOMString reflectedNonEmptyURLAttr;
+ attribute [Reflect, URL] DOMString reflectedURLAttr;
+ attribute [Reflect, NonEmpty, URL] DOMString reflectedNonEmptyURLAttr;
attribute [Reflect=customContentStringAttr] DOMString reflectedStringAttr;
attribute [Reflect=customContentIntegralAttr] long reflectedCustomIntegralAttr;
attribute [Reflect=customContentBooleanAttr] boolean reflectedCustomBooleanAttr;
- attribute [Reflect=customContentURLAttr,URL] DOMString reflectedCustomURLAttr;
- attribute [Reflect=customContentNonEmptyURLAttr,NonEmpty,URL] DOMString reflectedCustomNonEmptyURLAttr;
+ attribute [Reflect=customContentURLAttr, URL] DOMString reflectedCustomURLAttr;
+ attribute [Reflect=customContentNonEmptyURLAttr, NonEmpty, URL] DOMString reflectedCustomNonEmptyURLAttr;
// Methods
void voidMethod();
diff --git a/WebCore/bindings/v8/ScriptHeapSnapshot.cpp b/WebCore/bindings/v8/ScriptHeapSnapshot.cpp
new file mode 100644
index 0000000..885d039
--- /dev/null
+++ b/WebCore/bindings/v8/ScriptHeapSnapshot.cpp
@@ -0,0 +1,99 @@
+/*
+ * 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 "ScriptHeapSnapshot.h"
+
+#include "InspectorValues.h"
+#include "V8Binding.h"
+#include <v8-profiler.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+String ScriptHeapSnapshot::title() const
+{
+ v8::HandleScope scope;
+ return toWebCoreString(m_snapshot->GetTitle());
+}
+
+unsigned int ScriptHeapSnapshot::uid() const
+{
+ return m_snapshot->GetUid();
+}
+
+static PassRefPtr<InspectorObject> buildInspectorObjectFor(const v8::HeapGraphNode* root)
+{
+ v8::HandleScope scope;
+ RefPtr<InspectorObject> result = InspectorObject::create();
+ RefPtr<InspectorObject> lowLevels = InspectorObject::create();
+ RefPtr<InspectorObject> entries = InspectorObject::create();
+ RefPtr<InspectorObject> children = InspectorObject::create();
+ for (int i = 0, count = root->GetChildrenCount(); i < count; ++i) {
+ const v8::HeapGraphNode* node = root->GetChild(i)->GetToNode();
+ if (node->GetType() == v8::HeapGraphNode::kInternal) {
+ RefPtr<InspectorObject> lowLevel = InspectorObject::create();
+ lowLevel->setNumber("count", node->GetInstancesCount());
+ lowLevel->setNumber("size", node->GetSelfSize());
+ lowLevel->setString("type", toWebCoreString(node->GetName()));
+ lowLevels->setObject(toWebCoreString(node->GetName()), lowLevel);
+ } else if (node->GetInstancesCount()) {
+ RefPtr<InspectorObject> entry = InspectorObject::create();
+ entry->setString("constructorName", toWebCoreString(node->GetName()));
+ entry->setNumber("count", node->GetInstancesCount());
+ entry->setNumber("size", node->GetSelfSize());
+ entries->setObject(toWebCoreString(node->GetName()), entry);
+ } else {
+ RefPtr<InspectorObject> entry = InspectorObject::create();
+ entry->setString("constructorName", toWebCoreString(node->GetName()));
+ for (int j = 0, count = node->GetChildrenCount(); j < count; ++j) {
+ const v8::HeapGraphEdge* v8Edge = node->GetChild(j);
+ const v8::HeapGraphNode* v8Child = v8Edge->GetToNode();
+ RefPtr<InspectorObject> child = InspectorObject::create();
+ child->setString("constructorName", toWebCoreString(v8Child->GetName()));
+ child->setNumber("count", v8Edge->GetName()->ToInteger()->Value());
+ entry->setObject(String::number(reinterpret_cast<unsigned long long>(v8Child)), child);
+ }
+ children->setObject(String::number(reinterpret_cast<unsigned long long>(node)), entry);
+ }
+ }
+ result->setObject("lowlevels", lowLevels);
+ result->setObject("entries", entries);
+ result->setObject("children", children);
+ return result.release();
+}
+
+PassRefPtr<InspectorObject> ScriptHeapSnapshot::buildInspectorObjectForHead() const
+{
+ return buildInspectorObjectFor(m_snapshot->GetRoot());
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptHeapSnapshot.h b/WebCore/bindings/v8/ScriptHeapSnapshot.h
new file mode 100644
index 0000000..794a5a9
--- /dev/null
+++ b/WebCore/bindings/v8/ScriptHeapSnapshot.h
@@ -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.
+ */
+
+#ifndef ScriptHeapSnapshot_h
+#define ScriptHeapSnapshot_h
+
+#include "PlatformString.h"
+
+namespace v8 {
+class HeapSnapshot;
+}
+
+namespace WebCore {
+
+class InspectorObject;
+
+class ScriptHeapSnapshot : public RefCounted<ScriptHeapSnapshot> {
+public:
+ static PassRefPtr<ScriptHeapSnapshot> create(const v8::HeapSnapshot* snapshot)
+ {
+ return adoptRef(new ScriptHeapSnapshot(snapshot));
+ }
+ virtual ~ScriptHeapSnapshot() {}
+
+ String title() const;
+ unsigned int uid() const;
+
+ PassRefPtr<InspectorObject> buildInspectorObjectForHead() const;
+
+private:
+ ScriptHeapSnapshot(const v8::HeapSnapshot* snapshot)
+ : m_snapshot(snapshot)
+ {}
+
+ const v8::HeapSnapshot* m_snapshot;
+};
+
+} // namespace WebCore
+
+#endif // ScriptHeapSnapshot_h
diff --git a/WebCore/bindings/v8/ScriptProfile.cpp b/WebCore/bindings/v8/ScriptProfile.cpp
index 95ac0de..c5a6dbf 100644
--- a/WebCore/bindings/v8/ScriptProfile.cpp
+++ b/WebCore/bindings/v8/ScriptProfile.cpp
@@ -65,7 +65,7 @@ static PassRefPtr<InspectorObject> buildInspectorObjectFor(const v8::CpuProfileN
result->setNumber("totalTime", node->GetTotalTime());
result->setNumber("selfTime", node->GetSelfTime());
result->setNumber("numberOfCalls", 0);
- result->setBool("visible", true);
+ result->setBoolean("visible", true);
result->setNumber("callUID", node->GetCallUid());
RefPtr<InspectorArray> children = InspectorArray::create();
@@ -75,7 +75,7 @@ static PassRefPtr<InspectorObject> buildInspectorObjectFor(const v8::CpuProfileN
children->pushObject(buildInspectorObjectFor(child));
}
result->setArray("children", children);
- return result;
+ return result.release();
}
PassRefPtr<InspectorObject> ScriptProfile::buildInspectorObjectForHead() const
diff --git a/WebCore/bindings/v8/ScriptProfiler.cpp b/WebCore/bindings/v8/ScriptProfiler.cpp
index 0de4a24..ab7cfa7 100644
--- a/WebCore/bindings/v8/ScriptProfiler.cpp
+++ b/WebCore/bindings/v8/ScriptProfiler.cpp
@@ -29,8 +29,9 @@
*/
#include "config.h"
-
#include "ScriptProfiler.h"
+
+#include "InspectorValues.h"
#include "ScriptString.h"
#include <v8-profiler.h>
@@ -52,21 +53,11 @@ PassRefPtr<ScriptProfile> ScriptProfiler::stop(ScriptState* state, const String&
return profile ? ScriptProfile::create(profile) : 0;
}
-void ScriptProfiler::takeHeapSnapshot()
-{
- v8::V8::ResumeProfilerEx(v8::PROFILER_MODULE_HEAP_SNAPSHOT
- | v8::PROFILER_MODULE_HEAP_STATS
- | v8::PROFILER_MODULE_JS_CONSTRUCTORS);
-}
-
-long ScriptProfiler::getProfilerLogLines(long position, String* data)
+PassRefPtr<ScriptHeapSnapshot> ScriptProfiler::takeHeapSnapshot(const String& title)
{
- static char buffer[65536];
- const int readSize = v8::V8::GetLogLines(position, buffer, sizeof(buffer) - 1);
- buffer[readSize] = '\0';
- position += readSize;
- *data = buffer;
- return position;
+ v8::HandleScope hs;
+ const v8::HeapSnapshot* snapshot = v8::HeapProfiler::TakeSnapshot(v8String(title), v8::HeapSnapshot::kAggregated);
+ return snapshot ? ScriptHeapSnapshot::create(snapshot) : 0;
}
bool ScriptProfiler::isProfilerAlwaysEnabled()
diff --git a/WebCore/bindings/v8/ScriptProfiler.h b/WebCore/bindings/v8/ScriptProfiler.h
index b1ab3b1..b75a054 100644
--- a/WebCore/bindings/v8/ScriptProfiler.h
+++ b/WebCore/bindings/v8/ScriptProfiler.h
@@ -32,6 +32,7 @@
#define ScriptProfiler_h
#include "PlatformString.h"
+#include "ScriptHeapSnapshot.h"
#include "ScriptProfile.h"
#include "ScriptState.h"
@@ -39,12 +40,13 @@
namespace WebCore {
+class InspectorObject;
+
class ScriptProfiler : public Noncopyable {
public:
static void start(ScriptState* state, const String& title);
static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& title);
- static void takeHeapSnapshot();
- static long getProfilerLogLines(long position, String* data);
+ static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title);
static bool isProfilerAlwaysEnabled();
};
diff --git a/WebCore/bindings/v8/SerializedScriptValue.cpp b/WebCore/bindings/v8/SerializedScriptValue.cpp
index 395ef1a..0b908b8 100644
--- a/WebCore/bindings/v8/SerializedScriptValue.cpp
+++ b/WebCore/bindings/v8/SerializedScriptValue.cpp
@@ -1096,6 +1096,12 @@ PassRefPtr<SerializedScriptValue> SerializedScriptValue::create()
return adoptRef(new SerializedScriptValue());
}
+SerializedScriptValue* SerializedScriptValue::nullValue()
+{
+ DEFINE_STATIC_LOCAL(RefPtr<SerializedScriptValue>, nullValue, (SerializedScriptValue::create()));
+ return nullValue.get();
+}
+
PassRefPtr<SerializedScriptValue> SerializedScriptValue::release()
{
RefPtr<SerializedScriptValue> result = adoptRef(new SerializedScriptValue(m_data, WireData));
diff --git a/WebCore/bindings/v8/SerializedScriptValue.h b/WebCore/bindings/v8/SerializedScriptValue.h
index 3710b5a..275e5f2 100644
--- a/WebCore/bindings/v8/SerializedScriptValue.h
+++ b/WebCore/bindings/v8/SerializedScriptValue.h
@@ -52,6 +52,8 @@ public:
static PassRefPtr<SerializedScriptValue> createFromWire(String data);
static PassRefPtr<SerializedScriptValue> create(String data);
static PassRefPtr<SerializedScriptValue> create();
+
+ static SerializedScriptValue* nullValue();
PassRefPtr<SerializedScriptValue> release();
diff --git a/WebCore/bindings/v8/V8Binding.cpp b/WebCore/bindings/v8/V8Binding.cpp
index 3799cdb..bfbc647 100644
--- a/WebCore/bindings/v8/V8Binding.cpp
+++ b/WebCore/bindings/v8/V8Binding.cpp
@@ -368,27 +368,33 @@ StringType v8StringToWebCoreString(v8::Handle<v8::String> v8String, ExternalMode
template String v8StringToWebCoreString<String>(v8::Handle<v8::String>, ExternalMode);
template AtomicString v8StringToWebCoreString<AtomicString>(v8::Handle<v8::String>, ExternalMode);
+String int32ToWebCoreString(int value)
+{
+ // Caching of small strings below is not thread safe: newly constructed AtomicString
+ // are not safely published.
+ ASSERT(WTF::isMainThread());
+
+ // Most numbers used are <= 100. Even if they aren't used there's very little cost in using the space.
+ const int kLowNumbers = 100;
+ DEFINE_STATIC_LOCAL(Vector<AtomicString>, lowNumbers, (kLowNumbers + 1));
+ String webCoreString;
+ if (0 <= value && value <= kLowNumbers) {
+ webCoreString = lowNumbers[value];
+ if (!webCoreString) {
+ AtomicString valueString = AtomicString(String::number(value));
+ lowNumbers[value] = valueString;
+ webCoreString = valueString;
+ }
+ } else
+ webCoreString = String::number(value);
+ return webCoreString;
+}
String v8NonStringValueToWebCoreString(v8::Handle<v8::Value> object)
{
ASSERT(!object->IsString());
- if (object->IsInt32()) {
- int value = object->Int32Value();
- // Most numbers used are <= 100. Even if they aren't used there's very little in using the space.
- const int kLowNumbers = 100;
- static AtomicString lowNumbers[kLowNumbers + 1];
- String webCoreString;
- if (0 <= value && value <= kLowNumbers) {
- webCoreString = lowNumbers[value];
- if (!webCoreString) {
- AtomicString valueString = AtomicString(String::number(value));
- lowNumbers[value] = valueString;
- webCoreString = valueString;
- }
- } else
- webCoreString = String::number(value);
- return webCoreString;
- }
+ if (object->IsInt32())
+ return int32ToWebCoreString(object->Int32Value());
v8::TryCatch block;
v8::Handle<v8::String> v8String = object->ToString();
diff --git a/WebCore/bindings/v8/V8Binding.h b/WebCore/bindings/v8/V8Binding.h
index 087c128..58989ed 100644
--- a/WebCore/bindings/v8/V8Binding.h
+++ b/WebCore/bindings/v8/V8Binding.h
@@ -210,6 +210,61 @@ namespace WebCore {
v8::Persistent<v8::String> getToStringName();
v8::Persistent<v8::FunctionTemplate> getToStringTemplate();
+ String int32ToWebCoreString(int value);
+
+ class V8ParameterBase {
+ public:
+ operator String() { return toString<String>(); }
+ operator AtomicString() { return toString<AtomicString>(); }
+
+ protected:
+ V8ParameterBase(v8::Local<v8::Value> object) : m_v8Object(object), m_mode(Externalize), m_string() { }
+
+ bool prepareBase()
+ {
+ if (LIKELY(m_v8Object->IsString()))
+ return true;
+
+ if (LIKELY(m_v8Object->IsInt32())) {
+ setString(int32ToWebCoreString(m_v8Object->Int32Value()));
+ return true;
+ }
+
+ m_mode = DoNotExternalize;
+ v8::TryCatch block;
+ m_v8Object = m_v8Object->ToString();
+ // Handle the case where an exception is thrown as part of invoking toString on the object.
+ if (block.HasCaught()) {
+ block.ReThrow();
+ return false;
+ }
+
+ return true;
+ }
+
+ v8::Local<v8::Value> object() { return m_v8Object; }
+
+ void setString(String string)
+ {
+ m_string = string;
+ m_v8Object.Clear(); // To signal that String is ready.
+ }
+
+ private:
+ v8::Local<v8::Value> m_v8Object;
+ ExternalMode m_mode;
+ String m_string;
+
+ template <class StringType>
+ StringType toString()
+ {
+ if (LIKELY(!m_v8Object.IsEmpty()))
+ return v8StringToWebCoreString<StringType>(m_v8Object.As<v8::String>(), m_mode);
+
+ return StringType(m_string);
+ }
+ };
+
// V8Parameter is an adapter class that converts V8 values to Strings
// or AtomicStrings as appropriate, using multiple typecast operators.
enum V8ParameterMode {
@@ -218,22 +273,38 @@ namespace WebCore {
WithUndefinedOrNullCheck
};
template <V8ParameterMode MODE = DefaultMode>
- class V8Parameter {
+ class V8Parameter: public V8ParameterBase {
public:
- V8Parameter(v8::Local<v8::Value> object = v8::Local<v8::Value>()) : m_v8Object(object) { }
- operator String();
- operator AtomicString();
- private:
- v8::Local<v8::Value> m_v8Object;
+ V8Parameter(v8::Local<v8::Value> object) : V8ParameterBase(object) { }
+ V8Parameter(v8::Local<v8::Value> object, bool) : V8ParameterBase(object) { prepare(); }
+
+ bool prepare();
};
- template<> inline V8Parameter<DefaultMode>::operator String() { return toWebCoreString(m_v8Object); }
- template<> inline V8Parameter<WithNullCheck>::operator String() { return toWebCoreStringWithNullCheck(m_v8Object); }
- template<> inline V8Parameter<WithUndefinedOrNullCheck>::operator String() { return toWebCoreStringWithNullOrUndefinedCheck(m_v8Object); }
+ template<> inline bool V8Parameter<DefaultMode>::prepare()
+ {
+ return V8ParameterBase::prepareBase();
+ }
+
+ template<> inline bool V8Parameter<WithNullCheck>::prepare()
+ {
+ if (object()->IsNull()) {
+ setString(String());
+ return true;
+ }
- template<> inline V8Parameter<DefaultMode>::operator AtomicString() { return v8ValueToAtomicWebCoreString(m_v8Object); }
- template<> inline V8Parameter<WithNullCheck>::operator AtomicString() { return toAtomicWebCoreStringWithNullCheck(m_v8Object); }
- template<> inline V8Parameter<WithUndefinedOrNullCheck>::operator AtomicString() { return toAtomicWebCoreStringWithNullCheck(m_v8Object); }
+ return V8ParameterBase::prepareBase();
+ }
+
+ template<> inline bool V8Parameter<WithUndefinedOrNullCheck>::prepare()
+ {
+ if (object()->IsNull() || object()->IsUndefined()) {
+ setString(String());
+ return true;
+ }
+
+ return V8ParameterBase::prepareBase();
+ }
} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8BindingMacros.h b/WebCore/bindings/v8/custom/V8BindingMacros.h
index b569b10..ad02c3e 100644
--- a/WebCore/bindings/v8/custom/V8BindingMacros.h
+++ b/WebCore/bindings/v8/custom/V8BindingMacros.h
@@ -38,12 +38,11 @@
}
#define STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(type, var, value) \
- type var; \
- { \
- v8::Local<v8::Value> v8Value = (value); \
- v8::TryCatch block; \
- (value)->ToString(); \
- if (block.HasCaught()) \
- return block.ReThrow(); \
- var = v8Value; \
- }
+ type var(value); \
+ if (!var.prepare()) \
+ return v8::Undefined();
+
+#define STRING_TO_V8PARAMETER_EXCEPTION_BLOCK_VOID(type, var, value) \
+ type var(value); \
+ if (!var.prepare()) \
+ return;
diff --git a/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp b/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp
new file mode 100644
index 0000000..7ca18ab
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp
@@ -0,0 +1,96 @@
+/*
+ * 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 "V8DOMStringMap.h"
+
+#include "DOMStringMap.h"
+#include "V8Binding.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Integer> V8DOMStringMap::namedPropertyQuery(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DOMStringMap.NamedPropertyQuery");
+ if (V8DOMStringMap::toNative(info.Holder())->contains(toWebCoreString(name)))
+ return v8::Integer::New(v8::None);
+ return v8::Handle<v8::Integer>();
+}
+
+v8::Handle<v8::Value> V8DOMStringMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DOMStringMap.NamedPropertyGetter");
+ return v8String(V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name)));
+}
+
+v8::Handle<v8::Array> V8DOMStringMap::namedPropertyEnumerator(const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DOMStringMap.NamedPropertyEnumerator");
+ Vector<String> names;
+ V8DOMStringMap::toNative(info.Holder())->getNames(names);
+ v8::Handle<v8::Array> properties = v8::Array::New(names.size());
+ for (unsigned i = 0; i < names.size(); ++i)
+ properties->Set(v8::Integer::New(i), v8String(names[i]));
+ return properties;
+}
+
+v8::Handle<v8::Boolean> V8DOMStringMap::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DOMStringMap.NamedPropertyDeleter");
+ v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
+ if (!value.IsEmpty())
+ return v8::False();
+ if (info.Holder()->HasRealNamedCallbackProperty(name))
+ return v8::False();
+
+ ExceptionCode ec = 0;
+ V8DOMStringMap::toNative(info.Holder())->deleteItem(toWebCoreString(name), ec);
+ if (ec)
+ throwError(ec);
+ return v8::True();
+}
+
+v8::Handle<v8::Value> V8DOMStringMap::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.DOMStringMap.NamedPropertySetter");
+ v8::Handle<v8::Value> property = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
+ if (!property.IsEmpty())
+ return value;
+ if (info.Holder()->HasRealNamedCallbackProperty(name))
+ return value;
+
+ ExceptionCode ec = 0;
+ V8DOMStringMap::toNative(info.Holder())->setItem(toWebCoreString(name), toWebCoreString(value), ec);
+ if (ec)
+ return throwError(ec);
+ return value;
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp b/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
index 39692b6..67f27c5 100644
--- a/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
@@ -30,6 +30,7 @@
#include "DeviceMotionData.h"
#include "V8Binding.h"
+#include "V8BindingMacros.h"
#include "V8Proxy.h"
#include <v8.h>
@@ -110,7 +111,7 @@ v8::Handle<v8::Value> V8DeviceMotionEvent::intervalAccessorGetter(v8::Local<v8::
v8::Handle<v8::Value> V8DeviceMotionEvent::initDeviceMotionEventCallback(const v8::Arguments& args)
{
DeviceMotionEvent* imp = V8DeviceMotionEvent::toNative(args.Holder());
- V8Parameter<> type = args[0];
+ STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, type, args[0]);
bool bubbles = args[1]->BooleanValue();
bool cancelable = args[2]->BooleanValue();
// If any of the parameters are null or undefined, mark them as not provided.
diff --git a/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp b/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
index 26cc6cc..72f759a 100644
--- a/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DeviceOrientationEventCustom.cpp
@@ -30,6 +30,7 @@
#include "DeviceOrientation.h"
#include "V8Binding.h"
+#include "V8BindingMacros.h"
#include "V8Proxy.h"
#include <v8.h>
@@ -69,7 +70,7 @@ v8::Handle<v8::Value> V8DeviceOrientationEvent::gammaAccessorGetter(v8::Local<v8
v8::Handle<v8::Value> V8DeviceOrientationEvent::initDeviceOrientationEventCallback(const v8::Arguments& args)
{
DeviceOrientationEvent* imp = V8DeviceOrientationEvent::toNative(args.Holder());
- V8Parameter<> type = args[0];
+ STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(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.
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 3da664f..cfeb503 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -49,7 +49,11 @@ v8::Handle<v8::Value> V8XMLHttpRequest::responseTextAccessorGetter(v8::Local<v8:
{
INC_STATS("DOM.XMLHttpRequest.responsetext._get");
XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
- return xmlHttpRequest->responseText().v8StringOrNull();
+ ExceptionCode ec = 0;
+ const ScriptString& text = xmlHttpRequest->responseText(ec);
+ if (ec)
+ return throwError(ec);
+ return text.v8StringOrNull();
}
v8::Handle<v8::Value> V8XMLHttpRequest::openCallback(const v8::Arguments& args)
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index cbb9ca8..edb6987 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -404,14 +404,22 @@ PassRefPtr<CSSPrimitiveValue> CSSComputedStyleDeclaration::currentColorOrValidCo
return CSSPrimitiveValue::createColor(color.rgb());
}
-static PassRefPtr<CSSValue> getBorderRadiusCornerValue(IntSize radius)
+static PassRefPtr<CSSValue> getBorderRadiusCornerValue(LengthSize radius)
{
- if (radius.width() == radius.height())
- return CSSPrimitiveValue::create(radius.width(), CSSPrimitiveValue::CSS_PX);
-
RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- list->append(CSSPrimitiveValue::create(radius.width(), CSSPrimitiveValue::CSS_PX));
- list->append(CSSPrimitiveValue::create(radius.height(), CSSPrimitiveValue::CSS_PX));
+ if (radius.width() == radius.height()) {
+ if (radius.width().type() == Percent)
+ return CSSPrimitiveValue::create(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
+ return CSSPrimitiveValue::create(radius.width().value(), CSSPrimitiveValue::CSS_PX);
+ }
+ if (radius.width().type() == Percent)
+ list->append(CSSPrimitiveValue::create(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
+ else
+ list->append(CSSPrimitiveValue::create(radius.width().value(), CSSPrimitiveValue::CSS_PX));
+ if (radius.height().type() == Percent)
+ list->append(CSSPrimitiveValue::create(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
+ else
+ list->append(CSSPrimitiveValue::create(radius.height().value(), CSSPrimitiveValue::CSS_PX));
return list.release();
}
@@ -715,6 +723,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
case CSSPropertyBackgroundColor:
return CSSPrimitiveValue::createColor(m_allowVisitedStyle? style->visitedDependentColor(CSSPropertyBackgroundColor).rgb() : style->backgroundColor().rgb());
case CSSPropertyBackgroundImage:
+ // FIXME: Broken for multiple backgrounds. https://bugs.webkit.org/show_bug.cgi?id=44853
if (style->backgroundImage())
return style->backgroundImage()->cssValue();
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
@@ -861,7 +870,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
if (cursors && cursors->size() > 0) {
list = CSSValueList::createCommaSeparated();
for (unsigned i = 0; i < cursors->size(); ++i)
- list->append(CSSPrimitiveValue::create((*cursors)[i].image()->url(), CSSPrimitiveValue::CSS_URI));
+ list->append((*cursors)[i].image()->cssValue());
}
RefPtr<CSSValue> value = CSSPrimitiveValue::create(style->cursor());
if (list) {
diff --git a/WebCore/css/CSSFontSelector.cpp b/WebCore/css/CSSFontSelector.cpp
index b98dcae..50627d7 100644
--- a/WebCore/css/CSSFontSelector.cpp
+++ b/WebCore/css/CSSFontSelector.cpp
@@ -356,16 +356,14 @@ void CSSFontSelector::fontLoaded()
{
if (!m_document || m_document->inPageCache() || !m_document->renderer())
return;
- m_document->recalcStyle(Document::Force);
- m_document->renderer()->setNeedsLayoutAndPrefWidthsRecalc();
+ m_document->scheduleForcedStyleRecalc();
}
void CSSFontSelector::fontCacheInvalidated()
{
if (!m_document || m_document->inPageCache() || !m_document->renderer())
return;
- m_document->recalcStyle(Document::Force);
- m_document->renderer()->setNeedsLayoutAndPrefWidthsRecalc();
+ m_document->scheduleForcedStyleRecalc();
}
static FontData* fontDataForGenericFamily(Document* document, const FontDescription& fontDescription, const AtomicString& familyName)
diff --git a/WebCore/css/CSSFunctionValue.cpp b/WebCore/css/CSSFunctionValue.cpp
index 0fc260d..70e8174 100644
--- a/WebCore/css/CSSFunctionValue.cpp
+++ b/WebCore/css/CSSFunctionValue.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 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
@@ -25,15 +25,17 @@
#include "config.h"
#include "CSSFunctionValue.h"
+
#include "CSSValueList.h"
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
CSSFunctionValue::CSSFunctionValue(CSSParserFunction* function)
+ : m_name(function->name)
{
- m_name = function->name;
if (function->args)
- m_args = CSSValueList::createFromParserValueList(function->args);
+ m_args = CSSValueList::createFromParserValueList(function->args.get());
}
CSSFunctionValue::~CSSFunctionValue()
@@ -58,7 +60,8 @@ CSSParserValue CSSFunctionValue::parserValue() const
val.function = new CSSParserFunction;
val.function->name.characters = const_cast<UChar*>(m_name.characters());
val.function->name.length = m_name.length();
- val.function->args = m_args ? m_args->createParserValueList() : 0;
+ if (m_args)
+ val.function->args = m_args->createParserValueList();
return val;
}
diff --git a/WebCore/css/CSSGrammar.y b/WebCore/css/CSSGrammar.y
index 26b2ba8..ec507be 100644
--- a/WebCore/css/CSSGrammar.y
+++ b/WebCore/css/CSSGrammar.y
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
* Copyright (C) 2008 Eric Seidel <eric@webkit.org>
*
@@ -34,6 +34,7 @@
#include "Document.h"
#include "HTMLNames.h"
#include "MediaList.h"
+#include "MediaQueryExp.h"
#include "WebKitCSSKeyframeRule.h"
#include "WebKitCSSKeyframesRule.h"
#include <wtf/FastMalloc.h>
@@ -98,7 +99,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
%}
-%expect 55
+%expect 56
%nonassoc LOWEST_PREC
@@ -201,6 +202,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
%type <relation> combinator
%type <rule> charset
+%type <rule> ignored_charset
%type <rule> ruleset
%type <rule> media
%type <rule> import
@@ -389,6 +391,13 @@ charset:
}
;
+ignored_charset:
+ CHARSET_SYM maybe_space STRING maybe_space ';' {
+ // Ignore any @charset rule not at the beginning of the style sheet.
+ $$ = 0;
+ }
+;
+
rule_list:
/* empty */
| rule_list rule maybe_sgml {
@@ -413,6 +422,7 @@ rule:
valid_rule {
static_cast<CSSParser*>(parser)->m_hadSyntacticallyValidCSSRule = true;
}
+ | ignored_charset
| invalid_rule
| invalid_at
;
@@ -617,11 +627,11 @@ media_query_exp_list:
media_query_exp {
CSSParser* p = static_cast<CSSParser*>(parser);
$$ = p->createFloatingMediaQueryExpList();
- $$->append(p->sinkFloatingMediaQueryExp($1));
+ $$->append(p->sinkFloatingMediaQueryExp($1).leakPtr());
}
| media_query_exp_list maybe_space MEDIA_AND maybe_space media_query_exp {
$$ = $1;
- $$->append(static_cast<CSSParser*>(parser)->sinkFloatingMediaQueryExp($5));
+ $$->append(static_cast<CSSParser*>(parser)->sinkFloatingMediaQueryExp($5).leakPtr());
}
;
diff --git a/WebCore/css/CSSImageGeneratorValue.cpp b/WebCore/css/CSSImageGeneratorValue.cpp
index 4cf0873..784f438 100644
--- a/WebCore/css/CSSImageGeneratorValue.cpp
+++ b/WebCore/css/CSSImageGeneratorValue.cpp
@@ -86,6 +86,8 @@ Image* CSSImageGeneratorValue::getImage(RenderObject* renderer, const IntSize& s
SizeCountPair& sizeCount = it->second;
IntSize oldSize = sizeCount.first;
if (oldSize != size) {
+ // If renderer is the only client, make sure we don't delete this.
+ RefPtr<CSSImageGeneratorValue> protect(this);
removeClient(renderer);
addClient(renderer, size);
}
diff --git a/WebCore/css/CSSImageValue.cpp b/WebCore/css/CSSImageValue.cpp
index 96a8dec..dc2d700 100644
--- a/WebCore/css/CSSImageValue.cpp
+++ b/WebCore/css/CSSImageValue.cpp
@@ -26,6 +26,7 @@
#include "CachedImage.h"
#include "DocLoader.h"
#include "StyleCachedImage.h"
+#include "StylePendingImage.h"
namespace WebCore {
@@ -43,8 +44,19 @@ CSSImageValue::CSSImageValue()
CSSImageValue::~CSSImageValue()
{
- if (m_image)
- m_image->cachedImage()->removeClient(this);
+ if (m_image && m_image->isCachedImage())
+ static_cast<StyleCachedImage*>(m_image.get())->cachedImage()->removeClient(this);
+}
+
+StyleImage* CSSImageValue::cachedOrPendingImage()
+{
+ if (getIdent() == CSSValueNone)
+ return 0;
+
+ if (!m_image)
+ m_image = StylePendingImage::create(this);
+
+ return m_image.get();
}
StyleCachedImage* CSSImageValue::cachedImage(DocLoader* loader)
@@ -71,20 +83,20 @@ StyleCachedImage* CSSImageValue::cachedImage(DocLoader* loader, const String& ur
}
}
- return m_image.get();
+ return m_image->isCachedImage() ? static_cast<StyleCachedImage*>(m_image.get()) : 0;
}
String CSSImageValue::cachedImageURL()
{
- if (!m_image)
+ if (!m_image || !m_image->isCachedImage())
return String();
- return m_image->cachedImage()->url();
+ return static_cast<StyleCachedImage*>(m_image.get())->cachedImage()->url();
}
void CSSImageValue::clearCachedImage()
{
- if (m_image)
- m_image->cachedImage()->removeClient(this);
+ if (m_image && m_image->isCachedImage())
+ static_cast<StyleCachedImage*>(m_image.get())->cachedImage()->removeClient(this);
m_image = 0;
m_accessedImage = false;
}
diff --git a/WebCore/css/CSSImageValue.h b/WebCore/css/CSSImageValue.h
index a1715cd..4205c4f 100644
--- a/WebCore/css/CSSImageValue.h
+++ b/WebCore/css/CSSImageValue.h
@@ -29,6 +29,7 @@ namespace WebCore {
class DocLoader;
class StyleCachedImage;
+class StyleImage;
class CSSImageValue : public CSSPrimitiveValue, private CachedResourceClient {
public:
@@ -37,6 +38,8 @@ public:
virtual ~CSSImageValue();
virtual StyleCachedImage* cachedImage(DocLoader*);
+ // Returns a StyleCachedImage if the image is cached already, otherwise a StylePendingImage.
+ StyleImage* cachedOrPendingImage();
virtual bool isImageValue() const { return true; }
@@ -50,7 +53,7 @@ protected:
private:
CSSImageValue();
- RefPtr<StyleCachedImage> m_image;
+ RefPtr<StyleImage> m_image;
bool m_accessedImage;
};
diff --git a/WebCore/css/CSSImportRule.cpp b/WebCore/css/CSSImportRule.cpp
index b4d7e69..cc6083e 100644
--- a/WebCore/css/CSSImportRule.cpp
+++ b/WebCore/css/CSSImportRule.cpp
@@ -1,7 +1,7 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
* (C) 2002-2003 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2002, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2002, 2005, 2006, 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
@@ -65,7 +65,7 @@ void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, co
CSSStyleSheet* parent = parentStyleSheet();
bool strict = !parent || parent->useStrictParsing();
bool enforceMIMEType = strict;
- bool needsSiteSpecificQuirks = parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks();
+ bool needsSiteSpecificQuirks = parent && parent->document() && parent->document()->settings() && parent->document()->settings()->needsSiteSpecificQuirks();
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
if (enforceMIMEType && needsSiteSpecificQuirks) {
@@ -78,7 +78,7 @@ void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, co
String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
m_styleSheet->parseString(sheetText, strict);
- if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(baseURL))
+ if (!parent || !parent->document() || !parent->document()->securityOrigin()->canRequest(baseURL))
crossOriginCSS = true;
if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader())
@@ -115,7 +115,7 @@ void CSSImportRule::insertedIntoParent()
if (!parentSheet)
return;
- DocLoader* docLoader = parentSheet->doc()->docLoader();
+ DocLoader* docLoader = parentSheet->document()->docLoader();
if (!docLoader)
return;
@@ -143,7 +143,7 @@ void CSSImportRule::insertedIntoParent()
// removed from the pending sheet count, so let the doc know
// the sheet being imported is pending.
if (parentSheet && parentSheet->loadCompleted() && root == parentSheet)
- parentSheet->doc()->addPendingSheet();
+ parentSheet->document()->addPendingSheet();
m_loading = true;
m_cachedSheet->addClient(this);
}
diff --git a/WebCore/css/CSSMutableStyleDeclaration.cpp b/WebCore/css/CSSMutableStyleDeclaration.cpp
index e3fed35..f620be1 100644
--- a/WebCore/css/CSSMutableStyleDeclaration.cpp
+++ b/WebCore/css/CSSMutableStyleDeclaration.cpp
@@ -1,6 +1,6 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 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
@@ -499,13 +499,13 @@ void CSSMutableStyleDeclaration::setNeedsStyleRecalc()
return;
}
- // FIXME: quick&dirty hack for KDE 3.0... make this MUCH better! (Dirk)
StyleBase* root = this;
while (StyleBase* parent = root->parent())
root = parent;
- if (root->isCSSStyleSheet())
- if (Document* doc = static_cast<CSSStyleSheet*>(root)->doc())
- doc->updateStyleSelector();
+ if (root->isCSSStyleSheet()) {
+ if (Document* document = static_cast<CSSStyleSheet*>(root)->document())
+ document->styleSelectorChanged(DeferRecalcStyle);
+ }
}
bool CSSMutableStyleDeclaration::getPropertyPriority(int propertyID) const
diff --git a/WebCore/css/CSSNamespace.h b/WebCore/css/CSSNamespace.h
index d7fab4c..6225c36 100644
--- a/WebCore/css/CSSNamespace.h
+++ b/WebCore/css/CSSNamespace.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
* 1999 Waldo Bastian (bastian@kde.org)
- * Copyright (C) 2004, 2006 Apple Computer, Inc.
+ * Copyright (C) 2004, 2006, 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
@@ -27,27 +27,23 @@
namespace WebCore {
struct CSSNamespace : Noncopyable {
- AtomicString m_prefix;
- AtomicString m_uri;
- CSSNamespace* m_parent;
-
- CSSNamespace(const AtomicString& prefix, const AtomicString& uri, CSSNamespace* parent)
- : m_prefix(prefix)
- , m_uri(uri)
- , m_parent(parent)
+ AtomicString prefix;
+ AtomicString uri;
+ OwnPtr<CSSNamespace> parent;
+
+ CSSNamespace(const AtomicString& prefix, const AtomicString& uri, PassOwnPtr<CSSNamespace> parent)
+ : prefix(prefix)
+ , uri(uri)
+ , parent(parent)
{
}
- ~CSSNamespace() { delete m_parent; }
-
- const AtomicString& uri() { return m_uri; }
- const AtomicString& prefix() { return m_prefix; }
CSSNamespace* namespaceForPrefix(const AtomicString& prefix)
{
- if (prefix == m_prefix)
- return this;
- if (m_parent)
- return m_parent->namespaceForPrefix(prefix);
+ for (CSSNamespace* candidate = this; candidate; candidate = candidate->parent.get()) {
+ if (candidate->prefix == prefix)
+ return candidate;
+ }
return 0;
}
};
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index f511507..07cd300 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -138,7 +138,6 @@ CSSParser::CSSParser(bool strictParsing)
, m_important(false)
, m_id(0)
, m_styleSheet(0)
- , m_mediaQuery(0)
, m_valueList(0)
, m_parsedProperties(static_cast<CSSProperty**>(fastMalloc(32 * sizeof(CSSProperty*))))
, m_numParsedProperties(0)
@@ -160,9 +159,6 @@ CSSParser::CSSParser(bool strictParsing)
, m_allowImportRules(true)
, m_allowVariablesRules(true)
, m_allowNamespaceDeclarations(true)
- , m_floatingMediaQuery(0)
- , m_floatingMediaQueryExp(0)
- , m_floatingMediaQueryExpList(0)
{
#if YYDEBUG > 0
cssyydebug = 1;
@@ -180,12 +176,8 @@ CSSParser::~CSSParser()
fastFree(m_data);
- if (m_floatingMediaQueryExpList) {
+ if (m_floatingMediaQueryExpList)
deleteAllValues(*m_floatingMediaQueryExpList);
- delete m_floatingMediaQueryExpList;
- }
- delete m_floatingMediaQueryExp;
- delete m_floatingMediaQuery;
fastDeleteAllValues(m_floatingSelectors);
deleteAllValues(m_floatingValueLists);
deleteAllValues(m_floatingFunctions);
@@ -409,10 +401,15 @@ bool CSSParser::parseMediaQuery(MediaList* queries, const String& string)
if (string.isEmpty())
return true;
+<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
android::TimeCounter::start(android::TimeCounter::CSSParseTimeCounter);
#endif
m_mediaQuery = 0;
+=======
+ ASSERT(!m_mediaQuery);
+
+>>>>>>> webkit.org at r66666
// can't use { because tokenizer state switches from mediaquery to initial state when it sees { token.
// instead insert one " " (which is WHITESPACE in CSSGrammar.y)
setupParser("@-webkit-mediaquery ", string, "} ");
@@ -421,8 +418,7 @@ bool CSSParser::parseMediaQuery(MediaList* queries, const String& string)
bool ok = false;
if (m_mediaQuery) {
ok = true;
- queries->appendMediaQuery(m_mediaQuery);
- m_mediaQuery = 0;
+ queries->appendMediaQuery(m_mediaQuery.release());
}
#ifdef ANDROID_INSTRUMENT
@@ -466,12 +462,13 @@ void CSSParser::clearProperties()
Document* CSSParser::document() const
{
StyleBase* root = m_styleSheet;
- Document* doc = 0;
while (root && root->parent())
root = root->parent();
- if (root && root->isCSSStyleSheet())
- doc = static_cast<CSSStyleSheet*>(root)->doc();
- return doc;
+ if (!root)
+ return 0;
+ if (!root->isCSSStyleSheet())
+ return 0;
+ return static_cast<CSSStyleSheet*>(root)->document();
}
bool CSSParser::validUnit(CSSParserValue* value, Units unitflags, bool strict)
@@ -1219,14 +1216,14 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderBottomRightRadius: {
if (num != 1 && num != 2)
return false;
- validPrimitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength | FPercent, m_strict);
if (!validPrimitive)
return false;
RefPtr<CSSPrimitiveValue> parsedValue1 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
RefPtr<CSSPrimitiveValue> parsedValue2;
if (num == 2) {
value = m_valueList->next();
- validPrimitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength | FPercent, m_strict);
if (!validPrimitive)
return false;
parsedValue2 = CSSPrimitiveValue::create(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
@@ -1242,7 +1239,7 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitBorderRadius:
return parseBorderRadius(propId, important);
case CSSPropertyOutlineOffset:
- validPrimitive = validUnit(value, FLength, m_strict);
+ validPrimitive = validUnit(value, FLength | FPercent, m_strict);
break;
case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
case CSSPropertyWebkitBoxShadow:
@@ -2363,7 +2360,7 @@ bool CSSParser::parseContent(int propId, bool important)
parsedValue = CSSImageValue::create(m_styleSheet->completeURL(val->string));
} else if (val->unit == CSSParserValue::Function) {
// attr(X) | counter(X [,Y]) | counters(X, Y, [,Z]) | -webkit-gradient(...)
- CSSParserValueList* args = val->function->args;
+ CSSParserValueList* args = val->function->args.get();
if (!args)
return false;
if (equalIgnoringCase(val->function->name, "attr(")) {
@@ -2913,7 +2910,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationTimingFunction()
return 0;
// The only timing function we accept for now is a cubic bezier function. 4 points must be specified.
- CSSParserValueList* args = value->function->args;
+ CSSParserValueList* args = value->function->args.get();
if (!equalIgnoringCase(value->function->name, "cubic-bezier(") || !args || args->size() != 7)
return 0;
@@ -3088,7 +3085,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
// also allow
// dashboard-region(label, type) or dashboard-region(label type)
// dashboard-region(label, type) or dashboard-region(label type)
- CSSParserValueList* args = value->function->args;
+ CSSParserValueList* args = value->function->args.get();
if (!equalIgnoringCase(value->function->name, "dashboard-region(") || !args) {
valid = false;
break;
@@ -3234,7 +3231,7 @@ PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bo
bool CSSParser::parseShape(int propId, bool important)
{
CSSParserValue* value = m_valueList->current();
- CSSParserValueList* args = value->function->args;
+ CSSParserValueList* args = value->function->args.get();
if (!equalIgnoringCase(value->function->name, "rect(") || !args)
return false;
@@ -3598,7 +3595,7 @@ bool CSSParser::parseFontWeight(bool important)
static bool isValidFormatFunction(CSSParserValue* val)
{
- CSSParserValueList* args = val->function->args;
+ CSSParserValueList* args = val->function->args.get();
return equalIgnoringCase(val->function->name, "format(") && (args->current()->unit == CSSPrimitiveValue::CSS_STRING || args->current()->unit == CSSPrimitiveValue::CSS_IDENT);
}
@@ -3621,7 +3618,7 @@ bool CSSParser::parseFontFaceSrc()
expectComma = true;
} else if (val->unit == CSSParserValue::Function) {
// There are two allowed functions: local() and format().
- CSSParserValueList* args = val->function->args;
+ CSSParserValueList* args = val->function->args.get();
if (args && args->size() == 1) {
if (equalIgnoringCase(val->function->name, "local(") && !expectComma) {
expectComma = true;
@@ -3959,7 +3956,7 @@ static inline int colorIntFromValue(CSSParserValue* v)
bool CSSParser::parseColorParameters(CSSParserValue* value, int* colorArray, bool parseAlpha)
{
- CSSParserValueList* args = value->function->args;
+ CSSParserValueList* args = value->function->args.get();
CSSParserValue* v = args->current();
Units unitType = FUnknown;
// Get the first value and its type
@@ -4000,7 +3997,7 @@ bool CSSParser::parseColorParameters(CSSParserValue* value, int* colorArray, boo
// The first value, HUE, is in an angle with a value between 0 and 360
bool CSSParser::parseHSLParameters(CSSParserValue* value, double* colorArray, bool parseAlpha)
{
- CSSParserValueList* args = value->function->args;
+ CSSParserValueList* args = value->function->args.get();
CSSParserValue* v = args->current();
// Get the first value
if (!validUnit(v, FNumber, true))
@@ -4549,7 +4546,7 @@ bool CSSParser::parseBorderRadius(int propId, bool important)
if (i - indexAfterSlash >= 4)
return false;
- if (!validUnit(value, FLength, m_strict))
+ if (!validUnit(value, FLength | FPercent, m_strict))
return false;
RefPtr<CSSPrimitiveValue> radius = CSSPrimitiveValue::create(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
@@ -4649,7 +4646,7 @@ static bool parseGradientColorStop(CSSParser* p, CSSParserValue* a, CSSGradientC
!equalIgnoringCase(a->function->name, "color-stop("))
return false;
- CSSParserValueList* args = a->function->args;
+ CSSParserValueList* args = a->function->args.get();
if (!args)
return false;
@@ -4708,7 +4705,7 @@ bool CSSParser::parseGradient(RefPtr<CSSValue>& gradient)
RefPtr<CSSGradientValue> result = CSSGradientValue::create();
// Walk the arguments.
- CSSParserValueList* args = m_valueList->current()->function->args;
+ CSSParserValueList* args = m_valueList->current()->function->args.get();
if (!args || args->size() == 0)
return false;
@@ -4829,7 +4826,7 @@ bool CSSParser::parseCanvas(RefPtr<CSSValue>& canvas)
RefPtr<CSSCanvasValue> result = CSSCanvasValue::create();
// Walk the arguments.
- CSSParserValueList* args = m_valueList->current()->function->args;
+ CSSParserValueList* args = m_valueList->current()->function->args.get();
if (!args || args->size() != 1)
return false;
@@ -4949,7 +4946,7 @@ PassRefPtr<CSSValueList> CSSParser::parseTransform()
return 0;
// Every primitive requires at least one argument.
- CSSParserValueList* args = value->function->args;
+ CSSParserValueList* args = value->function->args.get();
if (!args)
return 0;
@@ -5371,52 +5368,45 @@ CSSParserValue& CSSParser::sinkFloatingValue(CSSParserValue& value)
MediaQueryExp* CSSParser::createFloatingMediaQueryExp(const AtomicString& mediaFeature, CSSParserValueList* values)
{
- delete m_floatingMediaQueryExp;
- m_floatingMediaQueryExp = new MediaQueryExp(mediaFeature, values);
- return m_floatingMediaQueryExp;
+ m_floatingMediaQueryExp = adoptPtr(new MediaQueryExp(mediaFeature, values));
+ return m_floatingMediaQueryExp.get();
}
-MediaQueryExp* CSSParser::sinkFloatingMediaQueryExp(MediaQueryExp* e)
+PassOwnPtr<MediaQueryExp> CSSParser::sinkFloatingMediaQueryExp(MediaQueryExp* expression)
{
- ASSERT(e == m_floatingMediaQueryExp);
- m_floatingMediaQueryExp = 0;
- return e;
+ ASSERT_UNUSED(expression, expression == m_floatingMediaQueryExp);
+ return m_floatingMediaQueryExp.release();
}
Vector<MediaQueryExp*>* CSSParser::createFloatingMediaQueryExpList()
{
- if (m_floatingMediaQueryExpList) {
+ if (m_floatingMediaQueryExpList)
deleteAllValues(*m_floatingMediaQueryExpList);
- delete m_floatingMediaQueryExpList;
- }
- m_floatingMediaQueryExpList = new Vector<MediaQueryExp*>;
- return m_floatingMediaQueryExpList;
+ m_floatingMediaQueryExpList = adoptPtr(new Vector<MediaQueryExp*>);
+ return m_floatingMediaQueryExpList.get();
}
-Vector<MediaQueryExp*>* CSSParser::sinkFloatingMediaQueryExpList(Vector<MediaQueryExp*>* l)
+PassOwnPtr<Vector<MediaQueryExp*> > CSSParser::sinkFloatingMediaQueryExpList(Vector<MediaQueryExp*>* list)
{
- ASSERT(l == m_floatingMediaQueryExpList);
- m_floatingMediaQueryExpList = 0;
- return l;
+ ASSERT_UNUSED(list, list == m_floatingMediaQueryExpList);
+ return m_floatingMediaQueryExpList.release();
}
-MediaQuery* CSSParser::createFloatingMediaQuery(MediaQuery::Restrictor r, const String& mediaType, Vector<MediaQueryExp*>* exprs)
+MediaQuery* CSSParser::createFloatingMediaQuery(MediaQuery::Restrictor restrictor, const String& mediaType, PassOwnPtr<Vector<MediaQueryExp*> > expressions)
{
- delete m_floatingMediaQuery;
- m_floatingMediaQuery = new MediaQuery(r, mediaType, exprs);
- return m_floatingMediaQuery;
+ m_floatingMediaQuery = adoptPtr(new MediaQuery(restrictor, mediaType, expressions));
+ return m_floatingMediaQuery.get();
}
-MediaQuery* CSSParser::createFloatingMediaQuery(Vector<MediaQueryExp*>* exprs)
+MediaQuery* CSSParser::createFloatingMediaQuery(PassOwnPtr<Vector<MediaQueryExp*> > expressions)
{
- return createFloatingMediaQuery(MediaQuery::None, "all", exprs);
+ return createFloatingMediaQuery(MediaQuery::None, "all", expressions);
}
-MediaQuery* CSSParser::sinkFloatingMediaQuery(MediaQuery* mq)
+PassOwnPtr<MediaQuery> CSSParser::sinkFloatingMediaQuery(MediaQuery* query)
{
- ASSERT(mq == m_floatingMediaQuery);
- m_floatingMediaQuery = 0;
- return mq;
+ ASSERT_UNUSED(query, query == m_floatingMediaQuery);
+ return m_floatingMediaQuery.release();
}
MediaList* CSSParser::createMediaList()
@@ -5678,7 +5668,7 @@ bool CSSParser::checkForVariables(CSSParserValueList* valueList)
break;
}
- if (valueList->valueAt(i)->unit == CSSParserValue::Function && checkForVariables(valueList->valueAt(i)->function->args)) {
+ if (valueList->valueAt(i)->unit == CSSParserValue::Function && checkForVariables(valueList->valueAt(i)->function->args.get())) {
hasVariables = true;
break;
}
diff --git a/WebCore/css/CSSParser.h b/WebCore/css/CSSParser.h
index 1e233c8..6211e62 100644
--- a/WebCore/css/CSSParser.h
+++ b/WebCore/css/CSSParser.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 Eric Seidel <eric@webkit.org>
* Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
*
@@ -194,12 +194,12 @@ namespace WebCore {
void endDeclarationsForMarginBox();
MediaQueryExp* createFloatingMediaQueryExp(const AtomicString&, CSSParserValueList*);
- MediaQueryExp* sinkFloatingMediaQueryExp(MediaQueryExp*);
+ PassOwnPtr<MediaQueryExp> sinkFloatingMediaQueryExp(MediaQueryExp*);
Vector<MediaQueryExp*>* createFloatingMediaQueryExpList();
- Vector<MediaQueryExp*>* sinkFloatingMediaQueryExpList(Vector<MediaQueryExp*>*);
- MediaQuery* createFloatingMediaQuery(MediaQuery::Restrictor, const String&, Vector<MediaQueryExp*>*);
- MediaQuery* createFloatingMediaQuery(Vector<MediaQueryExp*>*);
- MediaQuery* sinkFloatingMediaQuery(MediaQuery*);
+ PassOwnPtr<Vector<MediaQueryExp*> > sinkFloatingMediaQueryExpList(Vector<MediaQueryExp*>*);
+ MediaQuery* createFloatingMediaQuery(MediaQuery::Restrictor, const String&, PassOwnPtr<Vector<MediaQueryExp*> >);
+ MediaQuery* createFloatingMediaQuery(PassOwnPtr<Vector<MediaQueryExp*> >);
+ PassOwnPtr<MediaQuery> sinkFloatingMediaQuery(MediaQuery*);
void addNamespace(const AtomicString& prefix, const AtomicString& uri);
@@ -221,7 +221,7 @@ namespace WebCore {
CSSStyleSheet* m_styleSheet;
RefPtr<CSSRule> m_rule;
RefPtr<CSSRule> m_keyframe;
- MediaQuery* m_mediaQuery;
+ OwnPtr<MediaQuery> m_mediaQuery;
CSSParserValueList* m_valueList;
CSSProperty** m_parsedProperties;
CSSSelectorList* m_selectorListForParseSelector;
@@ -301,9 +301,9 @@ namespace WebCore {
HashSet<CSSParserValueList*> m_floatingValueLists;
HashSet<CSSParserFunction*> m_floatingFunctions;
- MediaQuery* m_floatingMediaQuery;
- MediaQueryExp* m_floatingMediaQueryExp;
- Vector<MediaQueryExp*>* m_floatingMediaQueryExpList;
+ OwnPtr<MediaQuery> m_floatingMediaQuery;
+ OwnPtr<MediaQueryExp> m_floatingMediaQueryExp;
+ OwnPtr<Vector<MediaQueryExp*> > m_floatingMediaQueryExpList;
Vector<CSSSelector*> m_reusableSelectorVector;
diff --git a/WebCore/css/CSSParserValues.h b/WebCore/css/CSSParserValues.h
index 5c6f55e..8644d9b 100644
--- a/WebCore/css/CSSParserValues.h
+++ b/WebCore/css/CSSParserValues.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 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
@@ -90,9 +90,7 @@ private:
struct CSSParserFunction : FastAllocBase {
CSSParserString name;
- CSSParserValueList* args;
-
- ~CSSParserFunction() { delete args; }
+ OwnPtr<CSSParserValueList> args;
};
}
diff --git a/WebCore/css/CSSPrimitiveValue.cpp b/WebCore/css/CSSPrimitiveValue.cpp
index 0508cd5..b4478b4 100644
--- a/WebCore/css/CSSPrimitiveValue.cpp
+++ b/WebCore/css/CSSPrimitiveValue.cpp
@@ -329,9 +329,6 @@ int CSSPrimitiveValue::computeLengthInt(RenderStyle* style, RenderStyle* rootSty
return static_cast<int>(result);
}
-const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
-const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
-
// Lengths expect an int that is only 28-bits, so we have to check for a different overflow.
int CSSPrimitiveValue::computeLengthIntForLength(RenderStyle* style, RenderStyle* rootStyle)
{
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index b1d2d3d..3da5cf6 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -262,6 +262,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
case MediaControlsBackgroundPart:
m_value.ident = CSSValueMediaControlsBackground;
break;
+ case MediaControlsFullscreenBackgroundPart:
+ m_value.ident = CSSValueMediaControlsFullscreenBackground;
+ break;
case MediaCurrentTimePart:
m_value.ident = CSSValueMediaCurrentTimeDisplay;
break;
@@ -1005,6 +1008,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case Armenian:
m_value.ident = CSSValueArmenian;
break;
+ case Asterisks:
+ m_value.ident = CSSValueAsterisks;
+ break;
case BinaryListStyle:
m_value.ident = CSSValueBinary;
break;
@@ -1086,6 +1092,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
case EthiopicHalehameTig:
m_value.ident = CSSValueEthiopicHalehameTig;
break;
+ case Footnotes:
+ m_value.ident = CSSValueFootnotes;
+ break;
case Georgian:
m_value.ident = CSSValueGeorgian;
break;
@@ -1602,7 +1611,7 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlign e)
{
switch (e) {
case TAAUTO:
- m_value.ident = CSSValueAuto;
+ m_value.ident = CSSValueWebkitAuto;
break;
case LEFT:
m_value.ident = CSSValueLeft;
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index 0216ae1..a3063db 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -20,6 +20,7 @@ font-style
font-variant
font-weight
text-rendering
+-webkit-font-smoothing
-webkit-text-size-adjust
zoom
@@ -213,7 +214,6 @@ z-index
-webkit-column-width
-webkit-columns
-webkit-font-size-delta
--webkit-font-smoothing
-webkit-highlight
-webkit-hyphenate-character
-webkit-hyphenate-locale
diff --git a/WebCore/css/CSSSelector.cpp b/WebCore/css/CSSSelector.cpp
index 1f336a2..fb8f695 100644
--- a/WebCore/css/CSSSelector.cpp
+++ b/WebCore/css/CSSSelector.cpp
@@ -248,6 +248,13 @@ PseudoId CSSSelector::pseudoId(PseudoType type)
return NOPSEUDO;
#endif
+#if ENABLE(FULLSCREEN_API)
+ case PseudoFullScreen:
+ return FULL_SCREEN;
+ case PseudoFullScreenDocument:
+ return FULL_SCREEN_DOCUMENT;
+#endif
+
case PseudoInputListButton:
#if ENABLE(DATALIST)
return INPUT_LIST_BUTTON;
@@ -426,6 +433,10 @@ static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoTypeMap(
DEFINE_STATIC_LOCAL(AtomicString, firstPage, ("first"));
DEFINE_STATIC_LOCAL(AtomicString, leftPage, ("left"));
DEFINE_STATIC_LOCAL(AtomicString, rightPage, ("right"));
+#if ENABLE(FULLSCREEN_API)
+ DEFINE_STATIC_LOCAL(AtomicString, fullScreen, ("-webkit-full-screen"));
+ DEFINE_STATIC_LOCAL(AtomicString, fullScreenDocument, ("-webkit-full-screen-document"));
+#endif
static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoType = 0;
if (!nameToPseudoType) {
@@ -537,6 +548,10 @@ static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoTypeMap(
nameToPseudoType->set(firstPage.impl(), CSSSelector::PseudoFirstPage);
nameToPseudoType->set(leftPage.impl(), CSSSelector::PseudoLeftPage);
nameToPseudoType->set(rightPage.impl(), CSSSelector::PseudoRightPage);
+#if ENABLE(FULLSCREEN_API)
+ nameToPseudoType->set(fullScreen.impl(), CSSSelector::PseudoFullScreen);
+ nameToPseudoType->set(fullScreenDocument.impl(), CSSSelector::PseudoFullScreenDocument);
+#endif
}
return nameToPseudoType;
}
@@ -666,6 +681,10 @@ void CSSSelector::extractPseudoType() const
case PseudoSingleButton:
case PseudoNoButton:
case PseudoNotParsed:
+#if ENABLE(FULLSCREEN_API)
+ case PseudoFullScreen:
+ case PseudoFullScreenDocument:
+#endif
break;
case PseudoFirstPage:
case PseudoLeftPage:
diff --git a/WebCore/css/CSSSelector.h b/WebCore/css/CSSSelector.h
index e253949..00e23b9 100644
--- a/WebCore/css/CSSSelector.h
+++ b/WebCore/css/CSSSelector.h
@@ -217,6 +217,10 @@ namespace WebCore {
PseudoLeftPage,
PseudoRightPage,
PseudoFirstPage,
+#if ENABLE(FULLSCREEN_API)
+ PseudoFullScreen,
+ PseudoFullScreenDocument,
+#endif
};
enum MarginBoxType {
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index aa724a3..a75dede 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -49,7 +49,6 @@
#include "CSSVariablesRule.h"
#include "CachedImage.h"
#include "Counter.h"
-#include "CounterContent.h"
#include "FocusController.h"
#include "FontFamilyValue.h"
#include "FontValue.h"
@@ -83,6 +82,7 @@
#include "ShadowValue.h"
#include "SkewTransformOperation.h"
#include "StyleCachedImage.h"
+#include "StylePendingImage.h"
#include "StyleGeneratedImage.h"
#include "StyleSheetList.h"
#include "Text.h"
@@ -199,12 +199,12 @@ if (value->isValueList()) { \
currChild = new FillLayer(LayerType##FillLayer); \
prevChild->setNext(currChild); \
} \
- mapFill##Prop(currChild, valueList->itemWithoutBoundsCheck(i)); \
+ mapFill##Prop(property, currChild, valueList->itemWithoutBoundsCheck(i)); \
prevChild = currChild; \
currChild = currChild->next(); \
} \
} else { \
- mapFill##Prop(currChild, value); \
+ mapFill##Prop(property, currChild, value); \
currChild = currChild->next(); \
} \
while (currChild) { \
@@ -370,15 +370,15 @@ public:
CSSRuleDataList* getIDRules(AtomicStringImpl* key) { return m_idRules.get(key); }
CSSRuleDataList* getClassRules(AtomicStringImpl* key) { return m_classRules.get(key); }
CSSRuleDataList* getTagRules(AtomicStringImpl* key) { return m_tagRules.get(key); }
- CSSRuleDataList* getUniversalRules() { return m_universalRules; }
- CSSRuleDataList* getPageRules() { return m_pageRules; }
+ CSSRuleDataList* getUniversalRules() { return m_universalRules.get(); }
+ CSSRuleDataList* getPageRules() { return m_pageRules.get(); }
public:
AtomRuleMap m_idRules;
AtomRuleMap m_classRules;
AtomRuleMap m_tagRules;
- CSSRuleDataList* m_universalRules;
- CSSRuleDataList* m_pageRules;
+ OwnPtr<CSSRuleDataList> m_universalRules;
+ OwnPtr<CSSRuleDataList> m_pageRules;
unsigned m_ruleCount;
unsigned m_pageRuleCount;
};
@@ -413,21 +413,19 @@ static const MediaQueryEvaluator& printEval()
return staticPrintEval;
}
-CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, CSSStyleSheet* mappedElementSheet,
+CSSStyleSelector::CSSStyleSelector(Document* document, StyleSheetList* styleSheets, CSSStyleSheet* mappedElementSheet,
CSSStyleSheet* pageUserSheet, const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets,
bool strictParsing, bool matchAuthorAndUserStyles)
: m_backgroundData(BackgroundFillLayer)
- , m_checker(doc, strictParsing)
+ , m_checker(document, strictParsing)
, m_element(0)
, m_styledElement(0)
, m_elementLinkState(NotInsideLink)
- , m_fontSelector(CSSFontSelector::create(doc))
+ , m_fontSelector(CSSFontSelector::create(document))
{
- init();
-
m_matchAuthorAndUserStyles = matchAuthorAndUserStyles;
- Element* root = doc->documentElement();
+ Element* root = document->documentElement();
if (!defaultStyle) {
if (!root || elementCanUseSimpleDefaultStyle(root))
@@ -436,32 +434,28 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
loadFullDefaultStyle();
}
- m_userStyle = 0;
-
// construct document root element default style. this is needed
// to evaluate media queries that contain relative constraints, like "screen and (max-width: 10em)"
// This is here instead of constructor, because when constructor is run,
// document doesn't have documentElement
// NOTE: this assumes that element that gets passed to styleForElement -call
// is always from the document that owns the style selector
- FrameView* view = doc->view();
+ FrameView* view = document->view();
if (view)
- m_medium = new MediaQueryEvaluator(view->mediaType());
+ m_medium = adoptPtr(new MediaQueryEvaluator(view->mediaType()));
else
- m_medium = new MediaQueryEvaluator("all");
+ m_medium = adoptPtr(new MediaQueryEvaluator("all"));
if (root)
m_rootDefaultStyle = styleForElement(root, 0, false, true); // don't ref, because the RenderStyle is allocated from global heap
- if (m_rootDefaultStyle && view) {
- delete m_medium;
- m_medium = new MediaQueryEvaluator(view->mediaType(), view->frame(), m_rootDefaultStyle.get());
- }
+ if (m_rootDefaultStyle && view)
+ m_medium = adoptPtr(new MediaQueryEvaluator(view->mediaType(), view->frame(), m_rootDefaultStyle.get()));
- m_authorStyle = new CSSRuleSet();
+ m_authorStyle = adoptPtr(new CSSRuleSet);
// FIXME: This sucks! The user sheet is reparsed every time!
- OwnPtr<CSSRuleSet> tempUserStyle(new CSSRuleSet);
+ OwnPtr<CSSRuleSet> tempUserStyle = adoptPtr(new CSSRuleSet);
if (pageUserSheet)
tempUserStyle->addRulesFromSheet(pageUserSheet, *m_medium, this);
if (pageGroupUserSheets) {
@@ -475,7 +469,7 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
}
if (tempUserStyle->m_ruleCount > 0 || tempUserStyle->m_pageRuleCount > 0)
- m_userStyle = tempUserStyle.leakPtr();
+ m_userStyle = tempUserStyle.release();
// Add rules from elements like SVG's <font-face>
if (mappedElementSheet)
@@ -489,8 +483,8 @@ CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, C
m_authorStyle->addRulesFromSheet(static_cast<CSSStyleSheet*>(sheet), *m_medium, this);
}
- if (doc->renderer() && doc->renderer()->style())
- doc->renderer()->style()->font().update(fontSelector());
+ if (document->renderer() && document->renderer()->style())
+ document->renderer()->style()->font().update(fontSelector());
}
// This is a simplified style setting function for keyframe styles
@@ -500,23 +494,10 @@ void CSSStyleSelector::addKeyframeStyle(PassRefPtr<WebKitCSSKeyframesRule> rule)
m_keyframesRuleMap.add(s.impl(), rule);
}
-void CSSStyleSelector::init()
-{
- initElement(0);
- m_matchedDecls.clear();
- m_ruleList = 0;
- m_rootDefaultStyle = 0;
- m_medium = 0;
-}
-
CSSStyleSelector::~CSSStyleSelector()
{
m_fontSelector->clearDocument();
- delete m_medium;
- delete m_authorStyle;
- delete m_userStyle;
deleteAllValues(m_viewportDependentMediaQueryResults);
- m_keyframesRuleMap.clear();
}
static CSSStyleSheet* parseUASheet(const String& str)
@@ -556,6 +537,14 @@ static void loadFullDefaultStyle()
String quirksRules = String(quirksUserAgentStyleSheet, sizeof(quirksUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraQuirksStyleSheet();
CSSStyleSheet* quirksSheet = parseUASheet(quirksRules);
defaultQuirksStyle->addRulesFromSheet(quirksSheet, screenEval());
+
+#if ENABLE(FULLSCREEN_API)
+ // Full-screen rules.
+ String fullscreenRules = String(fullscreenUserAgentStyleSheet, sizeof(fullscreenUserAgentStyleSheet)) + RenderTheme::defaultTheme()->extraDefaultStyleSheet();
+ CSSStyleSheet* fullscreenSheet = parseUASheet(fullscreenRules);
+ defaultStyle->addRulesFromSheet(fullscreenSheet, screenEval());
+ defaultQuirksStyle->addRulesFromSheet(fullscreenSheet, screenEval());
+#endif
}
static void loadSimpleDefaultStyle()
@@ -855,6 +844,8 @@ inline void CSSStyleSelector::initForStyleResolve(Element* e, RenderStyle* paren
m_matchedDecls.clear();
+ m_pendingImageProperties.clear();
+
m_ruleList = 0;
m_fontDirty = false;
@@ -1135,8 +1126,6 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForDocument(Document* document)
documentStyle->setFontDescription(fontDescription);
documentStyle->font().update(0);
- if (document->inCompatMode())
- documentStyle->setHtmlHacks(true); // enable html specific rendering tricks
return documentStyle.release();
}
@@ -1258,7 +1247,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
if (!resolveForRootDefault) {
// 4. Now we check user sheet rules.
if (m_matchAuthorAndUserStyles)
- matchRules(m_userStyle, firstUserRule, lastUserRule);
+ matchRules(m_userStyle.get(), firstUserRule, lastUserRule);
// 5. Now check author rules, beginning first with presentational attributes
// mapped from HTML.
@@ -1297,7 +1286,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
// 6. Check the rules in author sheets next.
if (m_matchAuthorAndUserStyles)
- matchRules(m_authorStyle, firstAuthorRule, lastAuthorRule);
+ matchRules(m_authorStyle.get(), firstAuthorRule, lastAuthorRule);
// 7. Now check our inline style attribute.
if (m_matchAuthorAndUserStyles && m_styledElement) {
@@ -1347,7 +1336,8 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
applyDeclarations<false>(true, firstUserRule, lastUserRule);
}
applyDeclarations<false>(true, firstUARule, lastUARule);
-
+
+ ASSERT(!m_fontDirty);
// If our font got dirtied by one of the non-essential font props,
// go ahead and update it a second time.
if (m_fontDirty)
@@ -1356,6 +1346,9 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
// Clean up our style object's display and text decorations (among other fixups).
adjustRenderStyle(style(), e);
+ // Start loading images referenced by this style.
+ loadPendingImages();
+
// If we have first-letter pseudo style, do not share this style
if (m_style->hasPseudoStyle(FIRST_LETTER))
m_style->setUnique();
@@ -1380,7 +1373,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
return m_style.release();
}
-PassRefPtr<RenderStyle> CSSStyleSelector::styleForKeyframe(const RenderStyle* elementStyle, const WebKitCSSKeyframeRule* keyframeRule, KeyframeList& list)
+PassRefPtr<RenderStyle> CSSStyleSelector::styleForKeyframe(const RenderStyle* elementStyle, const WebKitCSSKeyframeRule* keyframeRule, KeyframeValue& keyframe)
{
if (keyframeRule->style())
addMatchedDeclaration(keyframeRule->style());
@@ -1414,7 +1407,10 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForKeyframe(const RenderStyle* el
if (m_fontDirty)
updateFont();
- // Add all the animating properties to the list
+ // Start loading images referenced by this style.
+ loadPendingImages();
+
+ // Add all the animating properties to the keyframe.
if (keyframeRule->style()) {
CSSMutableStyleDeclaration::const_iterator end = keyframeRule->style()->end();
for (CSSMutableStyleDeclaration::const_iterator it = keyframeRule->style()->begin(); it != end; ++it) {
@@ -1422,7 +1418,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForKeyframe(const RenderStyle* el
// Timing-function within keyframes is special, because it is not animated; it just
// describes the timing function between this keyframe and the next.
if (property != CSSPropertyWebkitAnimationTimingFunction)
- list.addProperty(property);
+ keyframe.addProperty(property);
}
}
@@ -1443,7 +1439,6 @@ void CSSStyleSelector::keyframeStylesForAnimation(Element* e, const RenderStyle*
return;
const WebKitCSSKeyframesRule* rule = m_keyframesRuleMap.find(list.animationName().impl()).get()->second.get();
- RefPtr<RenderStyle> keyframeStyle;
// Construct and populate the style for each keyframe
for (unsigned i = 0; i < rule->length(); ++i) {
@@ -1452,34 +1447,36 @@ void CSSStyleSelector::keyframeStylesForAnimation(Element* e, const RenderStyle*
initForStyleResolve(e);
const WebKitCSSKeyframeRule* keyframeRule = rule->item(i);
-
- keyframeStyle = styleForKeyframe(elementStyle, keyframeRule, list);
+
+ KeyframeValue keyframe(0, 0);
+ keyframe.setStyle(styleForKeyframe(elementStyle, keyframeRule, keyframe));
// Add this keyframe style to all the indicated key times
Vector<float> keys;
keyframeRule->getKeys(keys);
for (size_t keyIndex = 0; keyIndex < keys.size(); ++keyIndex) {
- float key = keys[keyIndex];
- list.insert(key, keyframeStyle.get());
+ keyframe.setKey(keys[keyIndex]);
+ list.insert(keyframe);
}
- keyframeStyle.release();
}
// If the 0% keyframe is missing, create it (but only if there is at least one other keyframe)
int initialListSize = list.size();
- if (initialListSize > 0 && list.beginKeyframes()->key() != 0) {
- RefPtr<WebKitCSSKeyframeRule> keyframe = WebKitCSSKeyframeRule::create();
- keyframe->setKeyText("0%");
- keyframeStyle = styleForKeyframe(elementStyle, keyframe.get(), list);
- list.insert(0, keyframeStyle.release());
+ if (initialListSize > 0 && list[0].key() != 0) {
+ RefPtr<WebKitCSSKeyframeRule> keyframeRule = WebKitCSSKeyframeRule::create();
+ keyframeRule->setKeyText("0%");
+ KeyframeValue keyframe(0, 0);
+ keyframe.setStyle(styleForKeyframe(elementStyle, keyframeRule.get(), keyframe));
+ list.insert(keyframe);
}
// If the 100% keyframe is missing, create it (but only if there is at least one other keyframe)
- if (initialListSize > 0 && (list.endKeyframes() - 1)->key() != 1) {
- RefPtr<WebKitCSSKeyframeRule> keyframe = WebKitCSSKeyframeRule::create();
- keyframe->setKeyText("100%");
- keyframeStyle = styleForKeyframe(elementStyle, keyframe.get(), list);
- list.insert(1, keyframeStyle.release());
+ if (initialListSize > 0 && (list[list.size() - 1].key() != 1)) {
+ RefPtr<WebKitCSSKeyframeRule> keyframeRule = WebKitCSSKeyframeRule::create();
+ keyframeRule->setKeyText("100%");
+ KeyframeValue keyframe(1, 0);
+ keyframe.setStyle(styleForKeyframe(elementStyle, keyframeRule.get(), keyframe));
+ list.insert(keyframe);
}
}
@@ -1518,8 +1515,8 @@ PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForElement(PseudoId pseudo,
matchUARules(firstUARule, lastUARule);
if (m_matchAuthorAndUserStyles) {
- matchRules(m_userStyle, firstUserRule, lastUserRule);
- matchRules(m_authorStyle, firstAuthorRule, lastAuthorRule);
+ matchRules(m_userStyle.get(), firstUserRule, lastUserRule);
+ matchRules(m_authorStyle.get(), firstAuthorRule, lastAuthorRule);
}
if (m_matchedDecls.isEmpty() && !visitedStyle)
@@ -1569,6 +1566,9 @@ PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForElement(PseudoId pseudo,
// Clean up our style object's display and text decorations (among other fixups).
adjustRenderStyle(style(), 0);
+ // Start loading images referenced by this style.
+ loadPendingImages();
+
// Hang our visited style off m_style.
if (visitedStyle)
m_style->addCachedPseudoStyle(visitedStyle.release());
@@ -1588,8 +1588,8 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForPage(int pageIndex)
const bool isFirst = isFirstPage(pageIndex);
const String page = pageName(pageIndex);
matchPageRules(defaultPrintStyle, isLeft, isFirst, page);
- matchPageRules(m_userStyle, isLeft, isFirst, page);
- matchPageRules(m_authorStyle, isLeft, isFirst, page);
+ matchPageRules(m_userStyle.get(), isLeft, isFirst, page);
+ matchPageRules(m_authorStyle.get(), isLeft, isFirst, page);
m_lineHeightValue = 0;
applyDeclarations<true>(false, 0, m_matchedDecls.size() - 1);
@@ -1603,6 +1603,9 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForPage(int pageIndex)
applyDeclarations<false>(false, 0, m_matchedDecls.size() - 1);
+ // Start loading images referenced by this style.
+ loadPendingImages();
+
// Now return the style.
return m_style.release();
}
@@ -1865,14 +1868,14 @@ PassRefPtr<CSSRuleList> CSSStyleSelector::pseudoStyleRulesForElement(Element* e,
// Now we check user sheet rules.
if (m_matchAuthorAndUserStyles) {
int firstUserRule = -1, lastUserRule = -1;
- matchRules(m_userStyle, firstUserRule, lastUserRule);
+ matchRules(m_userStyle.get(), firstUserRule, lastUserRule);
}
}
if (m_matchAuthorAndUserStyles) {
// Check the rules in author sheets.
int firstAuthorRule = -1, lastAuthorRule = -1;
- matchRules(m_authorStyle, firstAuthorRule, lastAuthorRule);
+ matchRules(m_authorStyle.get(), firstAuthorRule, lastAuthorRule);
}
m_checker.m_collectRulesOnly = false;
@@ -2598,22 +2601,7 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
return true;
break;
case CSSSelector::PseudoLang: {
- Node* n = e;
- AtomicString value;
- // The language property is inherited, so we iterate over the parents
- // to find the first language.
- 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.isNull())
- value = static_cast<Element*>(n)->fastGetAttribute(langAttr);
- } else if (n->isDocumentNode())
- // checking the MIME content-language
- value = static_cast<Document*>(n)->contentLanguage();
-
- n = n->parent();
- }
+ AtomicString value = e->computeInheritedLanguage();
const AtomicString& argument = sel->argument();
if (value.isEmpty() || !value.startsWith(argument, false))
break;
@@ -2621,6 +2609,26 @@ bool CSSStyleSelector::SelectorChecker::checkOneSelector(CSSSelector* sel, Eleme
break;
return true;
}
+#if ENABLE(FULLSCREEN_API)
+ case CSSSelector::PseudoFullScreen:
+ // While a Document is in the fullscreen state, and the document's current fullscreen
+ // element is an element in the document, the 'full-screen' pseudoclass applies to
+ // that element. Also, an <iframe>, <object> or <embed> element whose child browsing
+ // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied.
+ if (!e->document()->webkitFullScreen())
+ return false;
+ if (e != e->document()->webkitCurrentFullScreenElement())
+ return false;
+ return true;
+ case CSSSelector::PseudoFullScreenDocument:
+ // While a Document is in the fullscreen state, the 'full-screen-document' pseudoclass applies
+ // to the root element of that Document.
+ if (!e->document()->webkitFullScreen())
+ return false;
+ if (e != e->document()->documentElement())
+ return false;
+ return true;
+#endif
case CSSSelector::PseudoUnknown:
case CSSSelector::PseudoNotParsed:
default:
@@ -2745,11 +2753,9 @@ CSSValue* CSSStyleSelector::resolveVariableDependentValue(CSSVariableDependentVa
// -----------------------------------------------------------------
CSSRuleSet::CSSRuleSet()
+ : m_ruleCount(0)
+ , m_pageRuleCount(0)
{
- m_universalRules = 0;
- m_pageRules = 0;
- m_ruleCount = 0;
- m_pageRuleCount = 0;
}
CSSRuleSet::~CSSRuleSet()
@@ -2757,9 +2763,6 @@ CSSRuleSet::~CSSRuleSet()
deleteAllValues(m_idRules);
deleteAllValues(m_classRules);
deleteAllValues(m_tagRules);
-
- delete m_universalRules;
- delete m_pageRules;
}
@@ -2794,7 +2797,7 @@ void CSSRuleSet::addRule(CSSStyleRule* rule, CSSSelector* sel)
// Just put it in the universal rule set.
if (!m_universalRules)
- m_universalRules = new CSSRuleDataList(m_ruleCount++, rule, sel);
+ m_universalRules = adoptPtr(new CSSRuleDataList(m_ruleCount++, rule, sel));
else
m_universalRules->append(m_ruleCount++, rule, sel);
}
@@ -2802,7 +2805,7 @@ void CSSRuleSet::addRule(CSSStyleRule* rule, CSSSelector* sel)
void CSSRuleSet::addPageRule(CSSStyleRule* rule, CSSSelector* sel)
{
if (!m_pageRules)
- m_pageRules = new CSSRuleDataList(m_pageRuleCount++, rule, sel);
+ m_pageRules = adoptPtr(new CSSRuleDataList(m_pageRuleCount++, rule, sel));
else
m_pageRules->append(m_pageRuleCount++, rule, sel);
}
@@ -2922,7 +2925,7 @@ void CSSStyleSelector::applyDeclarations(bool isImportant, int startIndex, int e
if (applyFirst) {
COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property);
- COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 11, CSS_zoom_is_end_of_first_prop_range);
+ COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 12, CSS_zoom_is_end_of_first_prop_range);
COMPILE_ASSERT(CSSPropertyLineHeight == CSSPropertyZoom + 1, CSS_line_height_is_after_zoom);
// give special priority to font-xxx, color properties, etc
@@ -3120,7 +3123,8 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
// What follows is a list that maps the CSS properties into their corresponding front-end
// RenderStyle values. Shorthands (e.g. border, background) occur in this list as well and
// are only hit when mapping "inherit" or "initial" into front-end values.
- switch (static_cast<CSSPropertyID>(id)) {
+ CSSPropertyID property = static_cast<CSSPropertyID>(id);
+ switch (property) {
// ident only properties
case CSSPropertyBackgroundAttachment:
HANDLE_BACKGROUND_VALUE(attachment, Attachment, value)
@@ -3510,11 +3514,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
CSSCursorImageValue* image = static_cast<CSSCursorImageValue*>(primitiveValue);
if (image->updateIfSVGCursorIsUsed(m_element)) // Elements with SVG cursors are not allowed to share style.
m_style->setUnique();
- // FIXME: Temporary clumsiness to pass off a CachedImage to an API that will eventually convert to using
- // StyleImage.
- RefPtr<StyleCachedImage> styleCachedImage(image->cachedImage(m_element->document()->docLoader()));
- if (styleCachedImage)
- m_style->addCursor(styleCachedImage->cachedImage(), image->hotSpot());
+ m_style->addCursor(cachedOrPendingFromValue(CSSPropertyCursor, image), image->hotSpot());
} else if (type == CSSPrimitiveValue::CSS_IDENT)
m_style->setCursor(*primitiveValue);
}
@@ -3611,7 +3611,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSPropertyListStyleImage:
{
HANDLE_INHERIT_AND_INITIAL(listStyleImage, ListStyleImage)
- m_style->setListStyleImage(styleImage(value));
+ m_style->setListStyleImage(styleImage(CSSPropertyListStyleImage, value));
return;
}
@@ -4066,10 +4066,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
fontDescription.setKeywordSize(primitiveValue->getIdent() - CSSValueXxSmall + 1);
break;
case CSSValueLarger:
- size = largerFontSize(oldSize, m_style->htmlHacks());
+ size = largerFontSize(oldSize, m_checker.m_document->inQuirksMode());
break;
case CSSValueSmaller:
- size = smallerFontSize(oldSize, m_style->htmlHacks());
+ size = smallerFontSize(oldSize, m_checker.m_document->inQuirksMode());
break;
default:
return;
@@ -4273,16 +4273,15 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
break;
}
case CSSPrimitiveValue::CSS_URI: {
- CSSImageValue* image = static_cast<CSSImageValue*>(val);
- m_style->setContent(image->cachedImage(m_element->document()->docLoader()), didSet);
+ m_style->setContent(cachedOrPendingFromValue(CSSPropertyContent, static_cast<CSSImageValue*>(val)), didSet);
didSet = true;
break;
}
case CSSPrimitiveValue::CSS_COUNTER: {
Counter* counterValue = val->getCounterValue();
- CounterContent* counter = new CounterContent(counterValue->identifier(),
- (EListStyleType)counterValue->listStyleNumber(), counterValue->separator());
- m_style->setContent(counter, didSet);
+ OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(counterValue->identifier(),
+ (EListStyleType)counterValue->listStyleNumber(), counterValue->separator()));
+ m_style->setContent(counter.release(), didSet);
didSet = true;
}
}
@@ -4701,7 +4700,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
}
NinePieceImage image;
- mapNinePieceImage(value, image);
+ mapNinePieceImage(property, value, image);
if (id == CSSPropertyWebkitBorderImage)
m_style->setBorderImage(image);
@@ -4751,17 +4750,26 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
if (!pair)
return;
- int width = pair->first()->computeLengthInt(style(), m_rootElementStyle, zoomFactor);
- int height = pair->second()->computeLengthInt(style(), m_rootElementStyle, zoomFactor);
+ Length radiusWidth;
+ Length radiusHeight;
+ if (pair->first()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
+ radiusWidth = Length(pair->first()->getDoubleValue(), Percent);
+ else
+ radiusWidth = Length(max(intMinForLength, min(intMaxForLength, pair->first()->computeLengthInt(style(), m_rootElementStyle, zoomFactor))), Fixed);
+ if (pair->second()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE)
+ radiusHeight = Length(pair->second()->getDoubleValue(), Percent);
+ else
+ radiusHeight = Length(max(intMinForLength, min(intMaxForLength, pair->second()->computeLengthInt(style(), m_rootElementStyle, zoomFactor))), Fixed);
+ int width = radiusWidth.rawValue();
+ int height = radiusHeight.rawValue();
if (width < 0 || height < 0)
return;
-
if (width == 0)
- height = 0; // Null out the other value.
+ radiusHeight = radiusWidth; // Null out the other value.
else if (height == 0)
- width = 0; // Null out the other value.
+ radiusWidth = radiusHeight; // Null out the other value.
- IntSize size(width, height);
+ LengthSize size(radiusWidth, radiusHeight);
switch (id) {
case CSSPropertyBorderTopLeftRadius:
m_style->setBorderTopLeftRadius(size);
@@ -4851,7 +4859,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
reflection->setOffset(Length(reflectValue->offset()->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed));
}
NinePieceImage mask;
- mapNinePieceImage(reflectValue->mask(), mask);
+ mapNinePieceImage(property, reflectValue->mask(), mask);
reflection->setMask(mask);
m_style->setBoxReflect(reflection.release());
@@ -5820,7 +5828,7 @@ Length CSSStyleSelector::inchLength(double inch)
return Length(CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
}
-void CSSStyleSelector::mapFillAttachment(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillAttachment(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setAttachment(FillLayer::initialFillAttachment(layer->type()));
@@ -5846,7 +5854,7 @@ void CSSStyleSelector::mapFillAttachment(FillLayer* layer, CSSValue* value)
}
}
-void CSSStyleSelector::mapFillClip(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillClip(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setClip(FillLayer::initialFillClip(layer->type()));
@@ -5860,7 +5868,7 @@ void CSSStyleSelector::mapFillClip(FillLayer* layer, CSSValue* value)
layer->setClip(*primitiveValue);
}
-void CSSStyleSelector::mapFillComposite(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillComposite(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setComposite(FillLayer::initialFillComposite(layer->type()));
@@ -5874,7 +5882,7 @@ void CSSStyleSelector::mapFillComposite(FillLayer* layer, CSSValue* value)
layer->setComposite(*primitiveValue);
}
-void CSSStyleSelector::mapFillOrigin(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillOrigin(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setOrigin(FillLayer::initialFillOrigin(layer->type()));
@@ -5888,26 +5896,36 @@ void CSSStyleSelector::mapFillOrigin(FillLayer* layer, CSSValue* value)
layer->setOrigin(*primitiveValue);
}
-StyleImage* CSSStyleSelector::styleImage(CSSValue* value)
+StyleImage* CSSStyleSelector::styleImage(CSSPropertyID property, CSSValue* value)
{
if (value->isImageValue())
- return static_cast<CSSImageValue*>(value)->cachedImage(m_element->document()->docLoader());
+ return cachedOrPendingFromValue(property, static_cast<CSSImageValue*>(value));
+
if (value->isImageGeneratorValue())
return static_cast<CSSImageGeneratorValue*>(value)->generatedImage();
+
return 0;
}
-void CSSStyleSelector::mapFillImage(FillLayer* layer, CSSValue* value)
+StyleImage* CSSStyleSelector::cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue* value)
+{
+ StyleImage* image = value->cachedOrPendingImage();
+ if (image && image->isPendingImage())
+ m_pendingImageProperties.add(property);
+ return image;
+}
+
+void CSSStyleSelector::mapFillImage(CSSPropertyID property, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setImage(FillLayer::initialFillImage(layer->type()));
return;
}
- layer->setImage(styleImage(value));
+ layer->setImage(styleImage(property, value));
}
-void CSSStyleSelector::mapFillRepeatX(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillRepeatX(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setRepeatX(FillLayer::initialFillRepeatX(layer->type()));
@@ -5921,7 +5939,7 @@ void CSSStyleSelector::mapFillRepeatX(FillLayer* layer, CSSValue* value)
layer->setRepeatX(*primitiveValue);
}
-void CSSStyleSelector::mapFillRepeatY(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillRepeatY(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setRepeatY(FillLayer::initialFillRepeatY(layer->type()));
@@ -5935,7 +5953,7 @@ void CSSStyleSelector::mapFillRepeatY(FillLayer* layer, CSSValue* value)
layer->setRepeatY(*primitiveValue);
}
-void CSSStyleSelector::mapFillSize(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillSize(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (!value->isPrimitiveValue()) {
layer->setSizeType(SizeNone);
@@ -5997,7 +6015,7 @@ void CSSStyleSelector::mapFillSize(FillLayer* layer, CSSValue* value)
layer->setSizeLength(b);
}
-void CSSStyleSelector::mapFillXPosition(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillXPosition(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setXPosition(FillLayer::initialFillXPosition(layer->type()));
@@ -6021,7 +6039,7 @@ void CSSStyleSelector::mapFillXPosition(FillLayer* layer, CSSValue* value)
layer->setXPosition(l);
}
-void CSSStyleSelector::mapFillYPosition(FillLayer* layer, CSSValue* value)
+void CSSStyleSelector::mapFillYPosition(CSSPropertyID, FillLayer* layer, CSSValue* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setYPosition(FillLayer::initialFillYPosition(layer->type()));
@@ -6209,7 +6227,7 @@ void CSSStyleSelector::mapAnimationTimingFunction(Animation* animation, CSSValue
}
}
-void CSSStyleSelector::mapNinePieceImage(CSSValue* value, NinePieceImage& image)
+void CSSStyleSelector::mapNinePieceImage(CSSPropertyID property, CSSValue* value, NinePieceImage& image)
{
// If we're a primitive value, then we are "none" and don't need to alter the empty image at all.
if (!value || value->isPrimitiveValue())
@@ -6219,7 +6237,7 @@ void CSSStyleSelector::mapNinePieceImage(CSSValue* value, NinePieceImage& image)
CSSBorderImageValue* borderImage = static_cast<CSSBorderImageValue*>(value);
// Set the image (this kicks off the load).
- image.setImage(styleImage(borderImage->imageValue()));
+ image.setImage(styleImage(property, borderImage->imageValue()));
// Set up a length box to represent our image slices.
LengthBox l;
@@ -6430,7 +6448,7 @@ float CSSStyleSelector::fontSizeForKeyword(Document* document, int keyword, bool
if (!settings)
return 1.0f;
- bool quirksMode = document->inCompatMode();
+ bool quirksMode = document->inQuirksMode();
int mediumSize = fixed ? settings->defaultFixedFontSize() : settings->defaultFontSize();
if (mediumSize >= fontSizeTableMin && mediumSize <= fontSizeTableMax) {
// Look up the entry in the table.
@@ -6828,4 +6846,101 @@ bool CSSStyleSelector::createTransformOperations(CSSValue* inValue, RenderStyle*
return true;
}
+void CSSStyleSelector::loadPendingImages()
+{
+ if (m_pendingImageProperties.isEmpty())
+ return;
+
+ HashSet<int>::const_iterator end = m_pendingImageProperties.end();
+ for (HashSet<int>::const_iterator it = m_pendingImageProperties.begin(); it != end; ++it) {
+ CSSPropertyID currentProperty = static_cast<CSSPropertyID>(*it);
+
+ DocLoader* docLoader = m_element->document()->docLoader();
+
+ switch (currentProperty) {
+ case CSSPropertyBackgroundImage: {
+ for (FillLayer* backgroundLayer = m_style->accessBackgroundLayers(); backgroundLayer; backgroundLayer = backgroundLayer->next()) {
+ if (backgroundLayer->image() && backgroundLayer->image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(backgroundLayer->image())->cssImageValue();
+ backgroundLayer->setImage(imageValue->cachedImage(docLoader));
+ }
+ }
+ break;
+ }
+
+ case CSSPropertyContent: {
+ for (ContentData* contentData = const_cast<ContentData*>(m_style->contentData()); contentData; contentData = contentData->next()) {
+ if (contentData->isImage() && contentData->image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(contentData->image())->cssImageValue();
+ contentData->setImage(imageValue->cachedImage(docLoader));
+ }
+ }
+ break;
+ }
+
+ case CSSPropertyCursor: {
+ if (CursorList* cursorList = m_style->cursors()) {
+ for (size_t i = 0; i < cursorList->size(); ++i) {
+ CursorData& currentCursor = (*cursorList)[i];
+ if (currentCursor.image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(currentCursor.image())->cssImageValue();
+ currentCursor.setImage(imageValue->cachedImage(docLoader));
+ }
+ }
+ }
+ break;
+ }
+
+ case CSSPropertyListStyleImage: {
+ if (m_style->listStyleImage() && m_style->listStyleImage()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(m_style->listStyleImage())->cssImageValue();
+ m_style->setListStyleImage(imageValue->cachedImage(docLoader));
+ }
+ break;
+ }
+
+ case CSSPropertyWebkitBorderImage: {
+ const NinePieceImage& borderImage = m_style->borderImage();
+ if (borderImage.image() && borderImage.image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(borderImage.image())->cssImageValue();
+ m_style->setBorderImage(NinePieceImage(imageValue->cachedImage(docLoader), borderImage.slices(), borderImage.horizontalRule(), borderImage.verticalRule()));
+ }
+ break;
+ }
+
+ case CSSPropertyWebkitBoxReflect: {
+ const NinePieceImage& maskImage = m_style->boxReflect()->mask();
+ if (maskImage.image() && maskImage.image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(maskImage.image())->cssImageValue();
+ m_style->boxReflect()->setMask(NinePieceImage(imageValue->cachedImage(docLoader), maskImage.slices(), maskImage.horizontalRule(), maskImage.verticalRule()));
+ }
+ break;
+ }
+
+ case CSSPropertyWebkitMaskBoxImage: {
+ const NinePieceImage& maskBoxImage = m_style->maskBoxImage();
+ if (maskBoxImage.image() && maskBoxImage.image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(maskBoxImage.image())->cssImageValue();
+ m_style->setMaskBoxImage(NinePieceImage(imageValue->cachedImage(docLoader), maskBoxImage.slices(), maskBoxImage.horizontalRule(), maskBoxImage.verticalRule()));
+ }
+ break;
+ }
+
+ case CSSPropertyWebkitMaskImage: {
+ for (FillLayer* maskLayer = m_style->accessMaskLayers(); maskLayer; maskLayer = maskLayer->next()) {
+ if (maskLayer->image() && maskLayer->image()->isPendingImage()) {
+ CSSImageValue* imageValue = static_cast<StylePendingImage*>(maskLayer->image())->cssImageValue();
+ maskLayer->setImage(imageValue->cachedImage(docLoader));
+ }
+ }
+ break;
+ }
+ default:
+ ASSERT_NOT_REACHED();
+ }
+ }
+
+ m_pendingImageProperties.clear();
+}
+
} // namespace WebCore
diff --git a/WebCore/css/CSSStyleSelector.h b/WebCore/css/CSSStyleSelector.h
index b0d977e..28d4488 100644
--- a/WebCore/css/CSSStyleSelector.h
+++ b/WebCore/css/CSSStyleSelector.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 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
@@ -40,6 +40,7 @@ class CSSPrimitiveValue;
class CSSProperty;
class CSSFontFace;
class CSSFontFaceRule;
+class CSSImageValue;
class CSSRuleData;
class CSSRuleDataList;
class CSSRuleList;
@@ -58,6 +59,7 @@ class Frame;
class FrameView;
class KURL;
class KeyframeList;
+class KeyframeValue;
class MediaQueryEvaluator;
class Node;
class Settings;
@@ -113,7 +115,7 @@ public:
RenderStyle* style() const { return m_style.get(); }
- PassRefPtr<RenderStyle> styleForKeyframe(const RenderStyle*, const WebKitCSSKeyframeRule*, KeyframeList&);
+ PassRefPtr<RenderStyle> styleForKeyframe(const RenderStyle*, const WebKitCSSKeyframeRule*, KeyframeValue&);
public:
// These methods will give back the set of rules that matched for a given element (or a pseudo-element).
@@ -194,8 +196,8 @@ public:
bool isFirstPage(int pageIndex) const;
String pageName(int pageIndex) const;
- CSSRuleSet* m_authorStyle;
- CSSRuleSet* m_userStyle;
+ OwnPtr<CSSRuleSet> m_authorStyle;
+ OwnPtr<CSSRuleSet> m_userStyle;
bool m_hasUAAppearance;
BorderData m_borderData;
@@ -234,22 +236,20 @@ public:
private:
static RenderStyle* s_styleNotYetAvailable;
- void init();
-
void matchUARules(int& firstUARule, int& lastUARule);
void updateFont();
void cacheBorderAndBackground();
- void mapFillAttachment(FillLayer*, CSSValue*);
- void mapFillClip(FillLayer*, CSSValue*);
- void mapFillComposite(FillLayer*, CSSValue*);
- void mapFillOrigin(FillLayer*, CSSValue*);
- void mapFillImage(FillLayer*, CSSValue*);
- void mapFillRepeatX(FillLayer*, CSSValue*);
- void mapFillRepeatY(FillLayer*, CSSValue*);
- void mapFillSize(FillLayer*, CSSValue*);
- void mapFillXPosition(FillLayer*, CSSValue*);
- void mapFillYPosition(FillLayer*, CSSValue*);
+ void mapFillAttachment(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillClip(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillComposite(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillOrigin(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillImage(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillRepeatX(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillRepeatY(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillSize(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillXPosition(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*);
void mapAnimationDelay(Animation*, CSSValue*);
void mapAnimationDirection(Animation*, CSSValue*);
@@ -261,7 +261,7 @@ public:
void mapAnimationProperty(Animation*, CSSValue*);
void mapAnimationTimingFunction(Animation*, CSSValue*);
- void mapNinePieceImage(CSSValue*, NinePieceImage&);
+ void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&);
void applyProperty(int id, CSSValue*);
void applyPageSizeProperty(CSSValue*);
@@ -272,7 +272,10 @@ public:
void applySVGProperty(int id, CSSValue*);
#endif
- StyleImage* styleImage(CSSValue* value);
+ void loadPendingImages();
+
+ StyleImage* styleImage(CSSPropertyID, CSSValue* value);
+ StyleImage* cachedOrPendingFromValue(CSSPropertyID property, CSSImageValue* value);
// We collect the set of decls that match in |m_matchedDecls|. We then walk the
// set of matched decls four times, once for those properties that others depend on (like font-size),
@@ -285,8 +288,10 @@ public:
Vector<CSSRuleData*, 32> m_matchedRules;
RefPtr<CSSRuleList> m_ruleList;
+
+ HashSet<int> m_pendingImageProperties; // Hash of CSSPropertyIDs
- MediaQueryEvaluator* m_medium;
+ OwnPtr<MediaQueryEvaluator> m_medium;
RefPtr<RenderStyle> m_rootDefaultStyle;
PseudoId m_dynamicPseudo;
diff --git a/WebCore/css/CSSStyleSheet.cpp b/WebCore/css/CSSStyleSheet.cpp
index 1ef1c2b..9bbcb8b 100644
--- a/WebCore/css/CSSStyleSheet.cpp
+++ b/WebCore/css/CSSStyleSheet.cpp
@@ -36,8 +36,7 @@ namespace WebCore {
CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset)
: StyleSheet(parentSheet, href, baseURL)
- , m_doc(parentSheet ? parentSheet->doc() : 0)
- , m_namespaces(0)
+ , m_document(parentSheet ? parentSheet->document() : 0)
, m_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(!parentSheet || parentSheet->useStrictParsing())
@@ -48,8 +47,7 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, con
CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, const String& charset)
: StyleSheet(parentNode, href, baseURL)
- , m_doc(parentNode->document())
- , m_namespaces(0)
+ , m_document(parentNode->document())
, m_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(false)
@@ -60,20 +58,18 @@ CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const KURL& b
CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
: StyleSheet(ownerRule, href, baseURL)
- , m_namespaces(0)
, m_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(!ownerRule || ownerRule->useStrictParsing())
, m_hasSyntacticallyValidCSSHeader(true)
{
CSSStyleSheet* parentSheet = ownerRule ? ownerRule->parentStyleSheet() : 0;
- m_doc = parentSheet ? parentSheet->doc() : 0;
+ m_document = parentSheet ? parentSheet->document() : 0;
m_isUserStyleSheet = parentSheet ? parentSheet->isUserStyleSheet() : false;
}
CSSStyleSheet::~CSSStyleSheet()
{
- delete m_namespaces;
}
CSSRule *CSSStyleSheet::ownerRule() const
@@ -137,7 +133,7 @@ int CSSStyleSheet::addRule(const String& selector, const String& style, Exceptio
PassRefPtr<CSSRuleList> CSSStyleSheet::cssRules(bool omitCharsetRules)
{
KURL url = finalURL();
- if (!url.isEmpty() && doc() && !doc()->securityOrigin()->canRequest(url))
+ if (!url.isEmpty() && document() && !document()->securityOrigin()->canRequest(url))
return 0;
return CSSRuleList::create(this, omitCharsetRules);
}
@@ -159,7 +155,7 @@ void CSSStyleSheet::addNamespace(CSSParser* p, const AtomicString& prefix, const
if (uri.isNull())
return;
- m_namespaces = new CSSNamespace(prefix, uri, m_namespaces);
+ m_namespaces = adoptPtr(new CSSNamespace(prefix, uri, m_namespaces.release()));
if (prefix.isEmpty())
// Set the default namespace on the parser so that selectors that omit namespace info will
@@ -174,11 +170,10 @@ const AtomicString& CSSStyleSheet::determineNamespace(const AtomicString& prefix
if (prefix == starAtom)
return starAtom; // We'll match any namespace.
if (m_namespaces) {
- CSSNamespace* ns = m_namespaces->namespaceForPrefix(prefix);
- if (ns)
- return ns->uri();
+ if (CSSNamespace* namespaceForPrefix = m_namespaces->namespaceForPrefix(prefix))
+ return namespaceForPrefix->uri;
}
- return nullAtom; // Assume we wont match any namespaces.
+ return nullAtom; // Assume we won't match any namespaces.
}
bool CSSStyleSheet::parseString(const String &string, bool strict)
@@ -224,14 +219,14 @@ void CSSStyleSheet::styleSheetChanged()
StyleBase* root = this;
while (StyleBase* parent = root->parent())
root = parent;
- Document* documentToUpdate = root->isCSSStyleSheet() ? static_cast<CSSStyleSheet*>(root)->doc() : 0;
+ Document* documentToUpdate = root->isCSSStyleSheet() ? static_cast<CSSStyleSheet*>(root)->document() : 0;
/* FIXME: We don't need to do everything updateStyleSelector does,
* basically we just need to recreate the document's selector with the
* already existing style sheets.
*/
if (documentToUpdate)
- documentToUpdate->updateStyleSelector();
+ documentToUpdate->styleSelectorChanged(DeferRecalcStyle);
}
KURL CSSStyleSheet::completeURL(const String& url) const
diff --git a/WebCore/css/CSSStyleSheet.h b/WebCore/css/CSSStyleSheet.h
index fe82794..3b18522 100644
--- a/WebCore/css/CSSStyleSheet.h
+++ b/WebCore/css/CSSStyleSheet.h
@@ -1,6 +1,6 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 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
@@ -87,7 +87,7 @@ public:
virtual void checkLoaded();
- Document* doc() { return m_doc; }
+ Document* document() { return m_document; }
const String& charset() const { return m_charset; }
@@ -112,8 +112,8 @@ private:
virtual bool isCSSStyleSheet() const { return true; }
virtual String type() const { return "text/css"; }
- Document* m_doc;
- CSSNamespace* m_namespaces;
+ Document* m_document;
+ OwnPtr<CSSNamespace> m_namespaces;
String m_charset;
bool m_loadCompleted : 1;
bool m_strictParsing : 1;
diff --git a/WebCore/css/CSSValueKeywords.in b/WebCore/css/CSSValueKeywords.in
index d302990..7a9b9c7 100644
--- a/WebCore/css/CSSValueKeywords.in
+++ b/WebCore/css/CSSValueKeywords.in
@@ -288,6 +288,8 @@ tigrinya-et-abegede
ethiopic-abegede-ti-et
upper-greek
upper-norwegian
+asterisks
+footnotes
hebrew
armenian
georgian
@@ -585,6 +587,7 @@ media-volume-slider
media-volume-sliderthumb
media-volume-slider-mute-button
media-controls-background
+media-controls-fullscreen-background
media-current-time-display
media-time-remaining-display
menulist
diff --git a/WebCore/css/CSSValueList.cpp b/WebCore/css/CSSValueList.cpp
index 8f1f88d..f8d8457 100644
--- a/WebCore/css/CSSValueList.cpp
+++ b/WebCore/css/CSSValueList.cpp
@@ -1,6 +1,6 @@
-/**
+/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 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
@@ -17,11 +17,13 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+
#include "config.h"
#include "CSSValueList.h"
#include "CSSParserValues.h"
#include "PlatformString.h"
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
@@ -34,11 +36,9 @@ CSSValueList::CSSValueList(CSSParserValueList* list)
: m_isSpaceSeparated(true)
{
if (list) {
- unsigned s = list->size();
- for (unsigned i = 0; i < s; ++i) {
- CSSParserValue* v = list->valueAt(i);
- append(v->createCSSValue());
- }
+ size_t size = list->size();
+ for (unsigned i = 0; i < size; ++i)
+ append(list->valueAt(i)->createCSSValue());
}
}
@@ -120,15 +120,15 @@ String CSSValueList::cssText() const
return result;
}
-CSSParserValueList* CSSValueList::createParserValueList() const
+PassOwnPtr<CSSParserValueList> CSSValueList::createParserValueList() const
{
- unsigned s = m_values.size();
- if (!s)
+ size_t size = m_values.size();
+ if (!size)
return 0;
- CSSParserValueList* result = new CSSParserValueList;
- for (unsigned i = 0; i < s; ++i)
+ OwnPtr<CSSParserValueList> result = adoptPtr(new CSSParserValueList);
+ for (size_t i = 0; i < size; ++i)
result->addValue(m_values[i]->parserValue());
- return result;
+ return result.release();
}
void CSSValueList::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSheet* styleSheet)
diff --git a/WebCore/css/CSSValueList.h b/WebCore/css/CSSValueList.h
index b835345..0d5c882 100644
--- a/WebCore/css/CSSValueList.h
+++ b/WebCore/css/CSSValueList.h
@@ -1,6 +1,6 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 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
@@ -58,7 +58,7 @@ public:
virtual String cssText() const;
- CSSParserValueList* createParserValueList() const;
+ PassOwnPtr<CSSParserValueList> createParserValueList() const;
virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*);
diff --git a/WebCore/css/CSSVariablesDeclaration.cpp b/WebCore/css/CSSVariablesDeclaration.cpp
index cb852cb..e40750a 100644
--- a/WebCore/css/CSSVariablesDeclaration.cpp
+++ b/WebCore/css/CSSVariablesDeclaration.cpp
@@ -169,7 +169,7 @@ void CSSVariablesDeclaration::setNeedsStyleRecalc()
while (StyleBase* parent = root->parent())
root = parent;
if (root->isCSSStyleSheet())
- static_cast<CSSStyleSheet*>(root)->doc()->updateStyleSelector();
+ static_cast<CSSStyleSheet*>(root)->document()->styleSelectorChanged(DeferRecalcStyle);
}
}
diff --git a/WebCore/css/MediaList.cpp b/WebCore/css/MediaList.cpp
index 85cf590..e67c9c7 100644
--- a/WebCore/css/MediaList.cpp
+++ b/WebCore/css/MediaList.cpp
@@ -1,6 +1,6 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2006 Apple Computer, Inc.
+ * Copyright (C) 2004, 2006, 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
@@ -122,7 +122,7 @@ void MediaList::deleteMedium(const String& oldMedium, ExceptionCode& ec)
CSSParser p(true);
MediaQuery* oldQuery = 0;
- bool deleteOldQuery = false;
+ OwnPtr<MediaQuery> createdQuery;
if (p.parseMediaQuery(tempMediaList.get(), oldMedium)) {
if (tempMediaList->m_queries.size() > 0)
@@ -130,8 +130,8 @@ void MediaList::deleteMedium(const String& oldMedium, ExceptionCode& ec)
} else if (m_fallback) {
String medium = parseMediaDescriptor(oldMedium);
if (!medium.isNull()) {
- oldQuery = new MediaQuery(MediaQuery::None, medium, 0);
- deleteOldQuery = true;
+ createdQuery = adoptPtr(new MediaQuery(MediaQuery::None, medium, 0));
+ oldQuery = createdQuery.get();
}
}
@@ -148,8 +148,6 @@ void MediaList::deleteMedium(const String& oldMedium, ExceptionCode& ec)
break;
}
}
- if (deleteOldQuery)
- delete oldQuery;
}
if (!ec)
@@ -242,9 +240,9 @@ void MediaList::appendMedium(const String& newMedium, ExceptionCode& ec)
notifyChanged();
}
-void MediaList::appendMediaQuery(MediaQuery* mediaQuery)
+void MediaList::appendMediaQuery(PassOwnPtr<MediaQuery> mediaQuery)
{
- m_queries.append(mediaQuery);
+ m_queries.append(mediaQuery.leakPtr());
}
void MediaList::notifyChanged()
diff --git a/WebCore/css/MediaList.h b/WebCore/css/MediaList.h
index e91ca9d..f4b1fa7 100644
--- a/WebCore/css/MediaList.h
+++ b/WebCore/css/MediaList.h
@@ -1,6 +1,6 @@
/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2006, 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
@@ -73,7 +73,7 @@ public:
String mediaText() const;
void setMediaText(const String&, ExceptionCode&xo);
- void appendMediaQuery(MediaQuery*);
+ void appendMediaQuery(PassOwnPtr<MediaQuery>);
const Vector<MediaQuery*>& mediaQueries() const { return m_queries; }
private:
diff --git a/WebCore/css/fullscreen.css b/WebCore/css/fullscreen.css
new file mode 100644
index 0000000..ebf3a02
--- /dev/null
+++ b/WebCore/css/fullscreen.css
@@ -0,0 +1,27 @@
+:-webkit-full-screen {
+ position:fixed;
+ top:0;
+ left:0;
+ right:0;
+ bottom:0;
+}
+
+:root:full-screen-document:not(:full-screen) {
+ overflow:hidden;
+}
+
+video:-webkit-full-screen {
+ width: 100%;
+ height: 100%
+ image-fit: fill;
+}
+
+img:-webkit-full-screen {
+ width: 100%;
+ height: 100%;
+ image-fit: fill;
+}
+
+video:-webkit-full-page-media:-webkit-full-screen::-webkit-media-controls-panel {
+ bottom: 0px;
+}
diff --git a/WebCore/dom/ClassNodeList.cpp b/WebCore/dom/ClassNodeList.cpp
index d482359..60d668b 100644
--- a/WebCore/dom/ClassNodeList.cpp
+++ b/WebCore/dom/ClassNodeList.cpp
@@ -37,7 +37,7 @@ namespace WebCore {
ClassNodeList::ClassNodeList(PassRefPtr<Node> rootNode, const String& classNames)
: DynamicNodeList(rootNode)
- , m_classNames(classNames, m_rootNode->document()->inCompatMode())
+ , m_classNames(classNames, m_rootNode->document()->inQuirksMode())
, m_originalClassNames(classNames)
{
}
diff --git a/WebCore/dom/ContainerNode.cpp b/WebCore/dom/ContainerNode.cpp
index ef62b38..064d4e5 100644
--- a/WebCore/dom/ContainerNode.cpp
+++ b/WebCore/dom/ContainerNode.cpp
@@ -72,6 +72,23 @@ void ContainerNode::removeAllChildren()
removeAllChildrenInContainer<Node, ContainerNode>(this);
}
+
+void ContainerNode::takeAllChildrenFrom(ContainerNode* oldParent)
+{
+ NodeVector children;
+ for (Node* child = oldParent->firstChild(); child; child = child->nextSibling())
+ children.append(child);
+ oldParent->removeAllChildren();
+
+ for (unsigned i = 0; i < children.size(); ++i) {
+ ExceptionCode ec = 0;
+ // FIXME: We need a no mutation event version of adoptNode.
+ RefPtr<Node> child = document()->adoptNode(children[i].release(), ec);
+ ASSERT(!ec);
+ parserAddChild(child.release());
+ }
+}
+
ContainerNode::~ContainerNode()
{
removeAllChildren();
diff --git a/WebCore/dom/ContainerNode.h b/WebCore/dom/ContainerNode.h
index ad0a54a..ab90783 100644
--- a/WebCore/dom/ContainerNode.h
+++ b/WebCore/dom/ContainerNode.h
@@ -75,6 +75,7 @@ public:
virtual bool removeChildren();
void removeAllChildren();
+ void takeAllChildrenFrom(ContainerNode*);
void cloneChildNodes(ContainerNode* clone);
diff --git a/WebCore/dom/DecodedDataDocumentParser.cpp b/WebCore/dom/DecodedDataDocumentParser.cpp
index 51cc847..39bf8e4 100644
--- a/WebCore/dom/DecodedDataDocumentParser.cpp
+++ b/WebCore/dom/DecodedDataDocumentParser.cpp
@@ -50,7 +50,7 @@ void DecodedDataDocumentParser::appendBytes(DocumentWriter* writer , const char*
if (decoded.isEmpty())
return;
- writer->reportDataRecieved();
+ writer->reportDataReceived();
append(decoded);
}
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 2528b3a..99ce273 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -82,7 +82,6 @@
#include "HTMLStyleElement.h"
#include "HTMLTitleElement.h"
#include "HTTPParsers.h"
-#include "HistoryItem.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "ImageLoader.h"
@@ -136,6 +135,7 @@
#include "XMLHttpRequest.h"
#include "XMLNSNames.h"
#include "XMLNames.h"
+#include "XSSAuditor.h"
#include "htmlediting.h"
#include <wtf/CurrentTime.h>
#include <wtf/HashFunctions.h>
@@ -371,9 +371,12 @@ private:
Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML)
: ContainerNode(0)
+ , m_compatibilityMode(NoQuirksMode)
+ , m_compatibilityModeLocked(false)
, m_domTreeVersion(0)
, m_styleSheets(StyleSheetList::create(this))
, m_styleRecalcTimer(this, &Document::styleRecalcTimerFired)
+ , m_pendingStyleRecalcShouldForce(false)
, m_frameElementsShouldIgnoreScrolling(false)
, m_containsValidityStyleRules(false)
, m_updateFocusAppearanceRestoresSelection(false)
@@ -415,6 +418,11 @@ Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML)
#endif
, m_weakReference(DocumentWeakReference::create(this))
, m_idAttributeName(idAttr)
+#if ENABLE(FULLSCREEN_API)
+ , m_isFullScreen(0)
+ , m_areKeysEnabledInFullScreen(0)
+#endif
+ , m_loadEventDelayCount(0)
{
m_document = this;
@@ -442,8 +450,6 @@ Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML)
m_bParsing = false;
m_wellFormed = false;
- setParseMode(Strict);
-
m_textColor = Color::black;
m_listenerTypes = 0;
setInDocument();
@@ -502,6 +508,9 @@ void Document::removedLastRef()
m_activeNode = 0;
m_titleElement = 0;
m_documentElement = 0;
+#if ENABLE(FULLSCREEN_API)
+ m_fullScreenElement = 0;
+#endif
// removeAllChildren() doesn't always unregister IDs, do it upfront to avoid having stale references in the map.
m_elementsById.clear();
@@ -599,6 +608,20 @@ void Document::destroyAllWrapperCaches()
}
#endif
+void Document::setCompatibilityMode(CompatibilityMode mode)
+{
+ if (m_compatibilityModeLocked || mode == m_compatibilityMode)
+ return;
+ ASSERT(!documentElement() && !m_styleSheets->length());
+ bool wasInQuirksMode = inQuirksMode();
+ m_compatibilityMode = mode;
+ if (inQuirksMode() != wasInQuirksMode) {
+ // All user stylesheets have to reparse using the different mode.
+ clearPageUserSheet();
+ clearPageGroupUserSheets();
+ }
+}
+
void Document::resetLinkColor()
{
m_linkColor = Color(0, 0, 238);
@@ -617,13 +640,11 @@ void Document::resetActiveLinkColor()
void Document::setDocType(PassRefPtr<DocumentType> docType)
{
// This should never be called more than once.
- // Note: This is not a public DOM method and can only be called by the parser.
ASSERT(!m_docType || !docType);
- if (m_docType && docType)
- return;
m_docType = docType;
if (m_docType)
m_docType->setDocument(this);
+<<<<<<< HEAD
#ifdef ANDROID_META_SUPPORT
if (m_docType && !ownerElement()
&& m_docType->publicId().startsWith("-//wapforum//dtd xhtml mobile 1.", false)) {
@@ -635,6 +656,8 @@ void Document::setDocType(PassRefPtr<DocumentType> docType)
}
#endif
determineParseMode();
+=======
+>>>>>>> webkit.org at r66666
}
DOMImplementation* Document::implementation() const
@@ -1388,12 +1411,18 @@ PassRefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned whatToSho
return TreeWalker::create(root, whatToShow, filter, expandEntityReferences);
}
+void Document::scheduleForcedStyleRecalc()
+{
+ m_pendingStyleRecalcShouldForce = true;
+ scheduleStyleRecalc();
+}
+
void Document::scheduleStyleRecalc()
{
if (m_styleRecalcTimer.isActive() || inPageCache())
return;
- ASSERT(childNeedsStyleRecalc());
+ ASSERT(childNeedsStyleRecalc() || m_pendingStyleRecalcShouldForce);
if (!documentsThatNeedStyleRecalc)
documentsThatNeedStyleRecalc = new HashSet<Document*>;
@@ -1416,6 +1445,7 @@ void Document::unscheduleStyleRecalc()
documentsThatNeedStyleRecalc->remove(this);
m_styleRecalcTimer.stop();
+ m_pendingStyleRecalcShouldForce = false;
}
void Document::styleRecalcTimerFired(Timer<Document>*)
@@ -1457,6 +1487,9 @@ void Document::recalcStyle(StyleChange change)
ASSERT(!renderer() || renderArena());
if (!renderer() || !renderArena())
goto bail_out;
+
+ if (m_pendingStyleRecalcShouldForce)
+ change = Force;
if (change == Force) {
// style selector may set this again during recalc
@@ -1512,14 +1545,14 @@ void Document::updateStyleIfNeeded()
{
ASSERT(!view() || (!view()->isInLayout() && !view()->isPainting()));
- if (!childNeedsStyleRecalc() || inPageCache())
+ if ((!m_pendingStyleRecalcShouldForce && !childNeedsStyleRecalc()) || inPageCache())
return;
-
+
if (m_frame)
m_frame->animation()->beginAnimationUpdate();
recalcStyle(NoChange);
-
+
// Tell the animation controller that updateStyleIfNeeded is finished and it can do any post-processing
if (m_frame)
m_frame->animation()->endAnimationUpdate();
@@ -1534,7 +1567,6 @@ void Document::updateStyleForAllDocuments()
HashSet<Document*>::iterator it = documentsThatNeedStyleRecalc->begin();
Document* doc = *it;
documentsThatNeedStyleRecalc->remove(doc);
- ASSERT(doc->childNeedsStyleRecalc() && !doc->inPageCache());
doc->updateStyleIfNeeded();
}
}
@@ -1572,7 +1604,7 @@ void Document::updateLayoutIgnorePendingStylesheets()
// suspend JS instead of doing a layout with inaccurate information.
if (body() && !body()->renderer() && m_pendingSheetLayout == NoLayoutWithPendingSheets) {
m_pendingSheetLayout = DidLayoutWithPendingSheets;
- updateStyleSelector();
+ styleSelectorChanged(RecalcStyleImmediately);
} else if (m_hasNodesWithPlaceholderStyle)
// If new nodes have been added or style recalc has been done with style sheets still pending, some nodes
// may not have had their real style calculated yet. Normally this gets cleaned when style sheets arrive
@@ -1652,7 +1684,7 @@ void Document::createStyleSelector()
if (Settings* docSettings = settings())
matchAuthorAndUserStyles = docSettings->authorAndUserStylesEnabled();
m_styleSelector.set(new CSSStyleSelector(this, m_styleSheets.get(), m_mappedElementSheet.get(), pageUserSheet(), pageGroupUserSheets(),
- !inCompatMode(), matchAuthorAndUserStyles));
+ !inQuirksMode(), matchAuthorAndUserStyles));
}
void Document::attach()
@@ -1883,6 +1915,8 @@ void Document::implicitOpen()
removeChildren();
+ setCompatibilityMode(NoQuirksMode);
+
m_parser = createParser();
setParsing(true);
@@ -2036,8 +2070,7 @@ void Document::implicitClose()
ImageLoader::dispatchPendingLoadEvents();
dispatchWindowLoadEvent();
enqueuePageshowEvent(PageshowEventNotPersisted);
- if (m_pendingStateObject)
- enqueuePopstateEvent(m_pendingStateObject.release());
+ enqueuePopstateEvent(m_pendingStateObject ? m_pendingStateObject.release() : SerializedScriptValue::nullValue());
if (f)
f->loader()->handledOnloadEvents();
@@ -2212,12 +2245,6 @@ void Document::setURL(const KURL& url)
updateBaseURL();
}
-void Document::setBaseElementURL(const KURL& baseElementURL)
-{
- m_baseElementURL = baseElementURL;
- updateBaseURL();
-}
-
void Document::updateBaseURL()
{
// DOM 3 Core: When the Document supports the feature "HTML" [DOM Level 2 HTML], the base URI is computed using
@@ -2238,6 +2265,41 @@ void Document::updateBaseURL()
m_mappedElementSheet->setFinalURL(m_baseURL);
}
+void Document::processBaseElement()
+{
+ // Find the first href attribute in a base element and the first target attribute in a base element.
+ const AtomicString* href = 0;
+ const AtomicString* target = 0;
+ for (Node* node = document()->firstChild(); node && (!href || !target); node = node->traverseNextNode()) {
+ if (node->hasTagName(baseTag)) {
+ if (!href) {
+ const AtomicString& value = static_cast<Element*>(node)->fastGetAttribute(hrefAttr);
+ if (!value.isNull())
+ href = &value;
+ }
+ if (!target) {
+ const AtomicString& value = static_cast<Element*>(node)->fastGetAttribute(targetAttr);
+ if (!value.isNull())
+ target = &value;
+ }
+ }
+ }
+
+ // FIXME: Since this doesn't share code with completeURL it may not handle encodings correctly.
+ KURL baseElementURL;
+ if (href) {
+ String strippedHref = deprecatedParseURL(*href);
+ if (!strippedHref.isEmpty() && (!frame() || frame()->script()->xssAuditor()->canSetBaseElementURL(*href)))
+ baseElementURL = KURL(url(), strippedHref);
+ }
+ if (m_baseElementURL != baseElementURL) {
+ m_baseElementURL = baseElementURL;
+ updateBaseURL();
+ }
+
+ m_baseTarget = target ? *target : nullAtom;
+}
+
String Document::userAgent(const KURL& url) const
{
return frame() ? frame()->loader()->userAgent(url) : String();
@@ -2259,14 +2321,23 @@ CSSStyleSheet* Document::pageUserSheet()
// Parse the sheet and cache it.
m_pageUserSheet = CSSStyleSheet::createInline(this, settings()->userStyleSheetLocation());
m_pageUserSheet->setIsUserStyleSheet(true);
- m_pageUserSheet->parseString(userSheetText, !inCompatMode());
+ m_pageUserSheet->parseString(userSheetText, !inQuirksMode());
return m_pageUserSheet.get();
}
void Document::clearPageUserSheet()
{
- m_pageUserSheet = 0;
- updateStyleSelector();
+ if (m_pageUserSheet) {
+ m_pageUserSheet = 0;
+ styleSelectorChanged(DeferRecalcStyle);
+ }
+}
+
+void Document::updatePageUserSheet()
+{
+ clearPageUserSheet();
+ if (pageUserSheet())
+ styleSelectorChanged(RecalcStyleImmediately);
}
const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const
@@ -2296,7 +2367,7 @@ const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const
continue;
RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::createInline(const_cast<Document*>(this), sheet->url());
parsedSheet->setIsUserStyleSheet(sheet->level() == UserStyleSheet::UserLevel);
- parsedSheet->parseString(sheet->source(), !inCompatMode());
+ parsedSheet->parseString(sheet->source(), !inQuirksMode());
if (!m_pageGroupUserSheets)
m_pageGroupUserSheets.set(new Vector<RefPtr<CSSStyleSheet> >);
m_pageGroupUserSheets->append(parsedSheet.release());
@@ -2308,9 +2379,18 @@ const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const
void Document::clearPageGroupUserSheets()
{
- m_pageGroupUserSheets.clear();
m_pageGroupUserSheetCacheValid = false;
- updateStyleSelector();
+ if (m_pageGroupUserSheets && m_pageGroupUserSheets->size()) {
+ m_pageGroupUserSheets->clear();
+ styleSelectorChanged(DeferRecalcStyle);
+ }
+}
+
+void Document::updatePageGroupUserSheets()
+{
+ clearPageGroupUserSheets();
+ if (pageGroupUserSheets() && pageGroupUserSheets()->size())
+ styleSelectorChanged(RecalcStyleImmediately);
}
CSSStyleSheet* Document::elementSheet()
@@ -2480,7 +2560,7 @@ void Document::processHttpEquiv(const String& equiv, const String& content)
// -dwh
m_selectedStylesheetSet = content;
m_preferredStylesheetSet = content;
- updateStyleSelector();
+ styleSelectorChanged(DeferRecalcStyle);
} else if (equalIgnoringCase(equiv, "refresh")) {
double delay;
String url;
@@ -2746,9 +2826,7 @@ String Document::selectedStylesheetSet() const
void Document::setSelectedStylesheetSet(const String& aString)
{
m_selectedStylesheetSet = aString;
- updateStyleSelector();
- if (renderer())
- renderer()->repaint();
+ styleSelectorChanged(DeferRecalcStyle);
}
// This method is called whenever a top-level stylesheet has finished loading.
@@ -2764,35 +2842,44 @@ void Document::removePendingSheet()
printf("Stylesheet loaded at time %d. %d stylesheets still remain.\n", elapsedTime(), m_pendingStylesheets);
#endif
- updateStyleSelector();
+ styleSelectorChanged(RecalcStyleImmediately);
+
+ if (m_pendingStylesheets)
+ return;
ScriptableDocumentParser* parser = scriptableDocumentParser();
- if (!m_pendingStylesheets && parser)
+ if (parser)
parser->executeScriptsWaitingForStylesheets();
- if (!m_pendingStylesheets && m_gotoAnchorNeededAfterStylesheetsLoad && view())
+ if (m_gotoAnchorNeededAfterStylesheetsLoad && view())
view()->scrollToFragment(m_frame->loader()->url());
}
-void Document::updateStyleSelector()
+void Document::styleSelectorChanged(StyleSelectorUpdateFlag updateFlag)
{
// Don't bother updating, since we haven't loaded all our style info yet
// and haven't calculated the style selector for the first time.
- if (!m_didCalculateStyleSelector && !haveStylesheetsLoaded())
+ if (!attached() || (!m_didCalculateStyleSelector && !haveStylesheetsLoaded()))
return;
- if (didLayoutWithPendingStylesheets() && m_pendingStylesheets <= 0) {
- m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
- if (renderer())
- renderer()->repaint();
- }
-
#ifdef INSTRUMENT_LAYOUT_SCHEDULING
if (!ownerElement())
printf("Beginning update of style selector at time %d.\n", elapsedTime());
#endif
recalcStyleSelector();
+
+ if (updateFlag == DeferRecalcStyle) {
+ scheduleForcedStyleRecalc();
+ return;
+ }
+
+ if (didLayoutWithPendingStylesheets() && m_pendingStylesheets <= 0) {
+ m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
+ if (renderer())
+ renderer()->repaint();
+ }
+
// This recalcStyle initiates a new recalc cycle. We need to bracket it to
// make sure animations get the correct update time
if (m_frame)
@@ -3246,6 +3333,19 @@ void Document::nodeWillBeRemoved(Node* n)
frame->selection()->nodeWillBeRemoved(n);
frame->dragCaretController()->nodeWillBeRemoved(n);
}
+
+#if ENABLE(FULLSCREEN_API)
+ // If the current full screen element or any of its ancestors is removed, set the current
+ // full screen element to the document root, and fire a fullscreenchange event to inform
+ // clients of the DOM.
+ ASSERT(n);
+ if (n->contains(m_fullScreenElement.get())) {
+ ASSERT(n != documentElement());
+ m_fullScreenElement = documentElement();
+ m_fullScreenElement->setNeedsStyleRecalc();
+ m_fullScreenElement->dispatchEvent(Event::create(eventNames().webkitfullscreenchangeEvent, true, false));
+ }
+#endif
}
void Document::textInserted(Node* text, unsigned offset, unsigned length)
@@ -3767,7 +3867,7 @@ void Document::setInPageCache(bool flag)
m_savedRenderer = renderer();
if (FrameView* v = view())
v->resetScrollbars();
- unscheduleStyleRecalc();
+ m_styleRecalcTimer.stop();
} else {
ASSERT(!renderer() || renderer() == m_savedRenderer);
ASSERT(m_renderArena);
@@ -3984,7 +4084,7 @@ const SVGDocumentExtensions* Document::svgExtensions()
SVGDocumentExtensions* Document::accessSVGExtensions()
{
if (!m_svgExtensions)
- m_svgExtensions.set(new SVGDocumentExtensions(this));
+ m_svgExtensions = adoptPtr(new SVGDocumentExtensions(this));
return m_svgExtensions.get();
}
#endif
@@ -4560,7 +4660,7 @@ Element* Document::findAnchor(const String& name)
for (Node* node = this; node; node = node->traverseNextNode()) {
if (node->hasTagName(aTag)) {
HTMLAnchorElement* anchor = static_cast<HTMLAnchorElement*>(node);
- if (inCompatMode()) {
+ if (inQuirksMode()) {
// Quirks mode, case insensitive comparison of names.
if (equalIgnoringCase(anchor->name(), name))
return anchor;
@@ -4659,5 +4759,78 @@ InspectorController* Document::inspectorController() const
return page() ? page()->inspectorController() : 0;
}
#endif
+
+#if ENABLE(FULLSCREEN_API)
+void Document::webkitRequestFullScreenForElement(Element* element, unsigned short flags)
+{
+ if (!page() || !page()->settings()->fullScreenEnabled())
+ return;
+
+ if (!element)
+ element = documentElement();
+
+ if (!page()->chrome()->client()->supportsFullScreenForElement(element))
+ return;
+
+ m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT;
+ page()->chrome()->client()->enterFullScreenForElement(element);
+}
+
+void Document::webkitCancelFullScreen()
+{
+ if (!page() || !m_fullScreenElement)
+ return;
+
+ page()->chrome()->client()->exitFullScreenForElement(m_fullScreenElement.get());
+}
+
+void Document::webkitWillEnterFullScreenForElement(Element* element)
+{
+ ASSERT(element);
+ ASSERT(page() && page()->settings()->fullScreenEnabled());
+
+ m_fullScreenElement = element;
+ m_isFullScreen = true;
+ documentElement()->setNeedsStyleRecalc(FullStyleChange);
+ m_fullScreenElement->setNeedsStyleRecalc(FullStyleChange);
+ updateStyleIfNeeded();
+
+ m_fullScreenElement->dispatchEvent(Event::create(eventNames().webkitfullscreenchangeEvent, true, false));
+}
+
+void Document::webkitDidEnterFullScreenForElement(Element*)
+{
+}
+
+void Document::webkitWillExitFullScreenForElement(Element*)
+{
+}
+
+void Document::webkitDidExitFullScreenForElement(Element* element)
+{
+ ASSERT(element);
+ m_isFullScreen = false;
+ m_areKeysEnabledInFullScreen = false;
+
+ // m_fullScreenElement has already been cleared; recalc the style of
+ // the passed in element instead.
+ element->setNeedsStyleRecalc(FullStyleChange);
+ if (element != documentElement())
+ documentElement()->setNeedsStyleRecalc(FullStyleChange);
+ updateStyleIfNeeded();
+
+ element->dispatchEvent(Event::create(eventNames().webkitfullscreenchangeEvent, true, false));
+}
+
+#endif
+
+void Document::decrementLoadEventDelayCount()
+{
+ ASSERT(m_loadEventDelayCount);
+ --m_loadEventDelayCount;
+
+ if (frame() && !m_loadEventDelayCount)
+ frame()->loader()->checkCompleted();
+}
} // namespace WebCore
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 18dc838..ac0c2a2 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -85,7 +85,6 @@ class HTMLFrameOwnerElement;
class HTMLHeadElement;
class HTMLInputElement;
class HTMLMapElement;
-class HistoryItem;
class HitTestRequest;
class HitTestResult;
class InspectorTimelineAgent;
@@ -182,7 +181,9 @@ enum PageshowEventPersistence {
PageshowEventNotPersisted = 0,
PageshowEventPersisted = 1
};
-
+
+enum StyleSelectorUpdateFlag { RecalcStyleImmediately, DeferRecalcStyle };
+
class Document : public ContainerNode, public ScriptExecutionContext {
public:
static PassRefPtr<Document> create(Frame* frame, const KURL& url)
@@ -271,6 +272,9 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend);
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
#endif
+#if ENABLE(FULLSCREEN_API)
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange);
+#endif
DocumentType* doctype() const { return m_docType.get(); }
@@ -440,8 +444,7 @@ public:
* constructed from these which is used to create the a new style selector which collates all of the stylesheets
* found and is used to calculate the derived styles for all rendering objects.
*/
- void updateStyleSelector();
-
+ void styleSelectorChanged(StyleSelectorUpdateFlag);
void recalcStyleSelector();
bool usesDescendantRules() const { return m_usesDescendantRules; }
@@ -539,12 +542,8 @@ public:
void setURL(const KURL&);
const KURL& baseURL() const { return m_baseURL; }
- // Setting the BaseElementURL will change the baseURL.
- void setBaseElementURL(const KURL&);
-
const String& baseTarget() const { return m_baseTarget; }
- // Setting the BaseElementTarget will change the baseTarget.
- void setBaseElementTarget(const String& baseTarget) { m_baseTarget = baseTarget; }
+ void processBaseElement();
KURL completeURL(const String&) const;
@@ -552,9 +551,11 @@ public:
CSSStyleSheet* pageUserSheet();
void clearPageUserSheet();
+ void updatePageUserSheet();
const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets() const;
void clearPageGroupUserSheets();
+ void updatePageGroupUserSheets();
CSSStyleSheet* elementSheet();
CSSStyleSheet* mappedElementSheet();
@@ -571,14 +572,16 @@ public:
bool paginated() const { return printing() || paginatedForScreen(); }
- enum ParseMode { Compat, AlmostStrict, Strict };
+ enum CompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
- void setParseMode(ParseMode m) { m_parseMode = m; }
- ParseMode parseMode() const { return m_parseMode; }
+ virtual void setCompatibilityModeFromDoctype() { }
+ void setCompatibilityMode(CompatibilityMode m);
+ void lockCompatibilityMode() { m_compatibilityModeLocked = true; }
+ CompatibilityMode compatibilityMode() const { return m_compatibilityMode; }
- bool inCompatMode() const { return m_parseMode == Compat; }
- bool inAlmostStrictMode() const { return m_parseMode == AlmostStrict; }
- bool inStrictMode() const { return m_parseMode == Strict; }
+ bool inQuirksMode() const { return m_compatibilityMode == QuirksMode; }
+ bool inLimitedQuirksMode() const { return m_compatibilityMode == LimitedQuirksMode; }
+ bool inNoQuirksMode() const { return m_compatibilityMode == NoQuirksMode; }
void setParsing(bool);
bool parsing() const { return m_bParsing; }
@@ -640,6 +643,7 @@ public:
void setCSSTarget(Element*);
Element* cssTarget() const { return m_cssTarget; }
+ void scheduleForcedStyleRecalc();
void scheduleStyleRecalc();
void unscheduleStyleRecalc();
void styleRecalcTimerFired(Timer<Document>*);
@@ -993,16 +997,35 @@ public:
void enqueueEvent(PassRefPtr<Event>);
void enqueuePageshowEvent(PageshowEventPersistence);
void enqueueHashchangeEvent(const String& oldURL, const String& newURL);
+ void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObject);
void addMediaCanStartListener(MediaCanStartListener*);
void removeMediaCanStartListener(MediaCanStartListener*);
MediaCanStartListener* takeAnyMediaCanStartListener();
const QualifiedName& idAttributeName() const { return m_idAttributeName; }
+
+#if ENABLE(FULLSCREEN_API)
+ bool webkitFullScreen() const { return m_isFullScreen; }
+ bool webkitFullScreenKeyboardInputAllowed() const { return m_isFullScreen && m_areKeysEnabledInFullScreen; }
+ Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement.get(); }
+ void webkitRequestFullScreenForElement(Element*, unsigned short flags);
+ void webkitCancelFullScreen();
+
+ void webkitWillEnterFullScreenForElement(Element*);
+ void webkitDidEnterFullScreenForElement(Element*);
+ void webkitWillExitFullScreenForElement(Element*);
+ void webkitDidExitFullScreenForElement(Element*);
+#endif
bool writeDisabled() const { return m_writeDisabled; }
void setWriteDisabled(bool flag) { m_writeDisabled = flag; }
+ // Used to allow element that loads data without going through a FrameLoader to delay the 'load' event.
+ void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; }
+ void decrementLoadEventDelayCount();
+ bool isDelayingLoadEvent() const { return m_loadEventDelayCount; }
+
protected:
Document(Frame*, const KURL&, bool isXHTML, bool isHTML);
@@ -1017,7 +1040,6 @@ private:
virtual bool isDocument() const { return true; }
virtual void removedLastRef();
- virtual void determineParseMode() { }
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
@@ -1045,7 +1067,6 @@ private:
void createStyleSelector();
- void enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObject);
void pendingEventTimerFired(Timer<Document>*);
PassRefPtr<NodeList> handleZeroPadding(const HitTestRequest&, HitTestResult&) const;
@@ -1105,7 +1126,8 @@ private:
bool m_ignoreAutofocus;
- ParseMode m_parseMode;
+ CompatibilityMode m_compatibilityMode;
+ bool m_compatibilityModeLocked; // This is cheaper than making setCompatibilityMode virtual.
Color m_textColor;
@@ -1142,9 +1164,12 @@ private:
bool m_loadingSheet;
bool m_visuallyOrdered;
bool m_bParsing;
+
Timer<Document> m_styleRecalcTimer;
+ bool m_pendingStyleRecalcShouldForce;
bool m_inStyleRecalc;
bool m_closeAfterStyleRecalc;
+
bool m_usesDescendantRules;
bool m_usesSiblingRules;
bool m_usesFirstLineRules;
@@ -1281,6 +1306,14 @@ private:
HashSet<MediaCanStartListener*> m_mediaCanStartListeners;
QualifiedName m_idAttributeName;
+
+#if ENABLE(FULLSCREEN_API)
+ bool m_isFullScreen;
+ bool m_areKeysEnabledInFullScreen;
+ RefPtr<Element> m_fullScreenElement;
+#endif
+
+ int m_loadEventDelayCount;
};
inline bool Document::hasElementWithId(AtomicStringImpl* id) const
@@ -1296,8 +1329,7 @@ inline bool Node::isDocumentNode() const
// here because it uses a Document method but we really want to inline it
inline Node::Node(Document* document, ConstructionType type)
- : TreeShared<ContainerNode>(initialRefCount(type))
- , m_document(document)
+ : m_document(document)
, m_previous(0)
, m_next(0)
, m_renderer(0)
diff --git a/WebCore/dom/Document.idl b/WebCore/dom/Document.idl
index 3ae551e..0bd93b8 100644
--- a/WebCore/dom/Document.idl
+++ b/WebCore/dom/Document.idl
@@ -245,6 +245,13 @@ module core {
[DontEnum] void initializeWMLPageState();
#endif
+#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
+ readonly attribute boolean webkitFullScreen;
+ readonly attribute boolean webkitFullScreenKeyboardInputAllowed;
+ readonly attribute Element webkitCurrentFullScreenElement;
+ void webkitCancelFullScreen();
+#endif
+
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
// Event handler DOM attributes
attribute [DontEnum] EventListener onabort;
@@ -317,6 +324,7 @@ module core {
attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchmove;
attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
+ attribute [DontEnum, Conditional=FULLSCREEN_API] EventListener onwebkitfullscreenchange;
#endif
#if defined(LANGUAGE_CPP) && LANGUAGE_CPP
diff --git a/WebCore/dom/DocumentMarker.h b/WebCore/dom/DocumentMarker.h
index 55d2e33..e6160ae 100644
--- a/WebCore/dom/DocumentMarker.h
+++ b/WebCore/dom/DocumentMarker.h
@@ -39,7 +39,8 @@ struct DocumentMarker {
Spelling,
Grammar,
TextMatch,
- Replacement
+ Replacement,
+ RejectedCorrection
};
MarkerType type;
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index 2d44f62..1855101 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -273,8 +273,8 @@ static float localZoomForRenderer(RenderObject* renderer)
// FIXME: This does the wrong thing if two opposing zooms are in effect and canceled each
// other out, but the alternative is that we'd have to crawl up the whole render tree every
// time (or store an additional bit in the RenderStyle to indicate that a zoom was specified).
- float zoomFactor = 1.0f;
- if (renderer->style()->effectiveZoom() != 1.0f) {
+ float zoomFactor = 1;
+ if (renderer->style()->effectiveZoom() != 1) {
// Need to find the nearest enclosing RenderObject that set up
// a differing zoom, and then we divide our result by it to eliminate the zoom.
RenderObject* prev = renderer;
@@ -367,9 +367,9 @@ int Element::clientWidth()
// When in strict mode, clientWidth for the document element should return the width of the containing frame.
// When in quirks mode, clientWidth for the body element should return the width of the containing frame.
- bool inCompatMode = document()->inCompatMode();
- if ((!inCompatMode && document()->documentElement() == this) ||
- (inCompatMode && isHTMLElement() && document()->body() == this)) {
+ bool inQuirksMode = document()->inQuirksMode();
+ if ((!inQuirksMode && document()->documentElement() == this) ||
+ (inQuirksMode && isHTMLElement() && document()->body() == this)) {
if (FrameView* view = document()->view()) {
if (RenderView* renderView = document()->renderView())
return adjustForAbsoluteZoom(view->layoutWidth(), renderView);
@@ -387,10 +387,10 @@ int Element::clientHeight()
// When in strict mode, clientHeight for the document element should return the height of the containing frame.
// When in quirks mode, clientHeight for the body element should return the height of the containing frame.
- bool inCompatMode = document()->inCompatMode();
+ bool inQuirksMode = document()->inQuirksMode();
- if ((!inCompatMode && document()->documentElement() == this) ||
- (inCompatMode && isHTMLElement() && document()->body() == this)) {
+ if ((!inQuirksMode && document()->documentElement() == this) ||
+ (inQuirksMode && isHTMLElement() && document()->body() == this)) {
if (FrameView* view = document()->view()) {
if (RenderView* renderView = document()->renderView())
return adjustForAbsoluteZoom(view->layoutHeight(), renderView);
@@ -1313,8 +1313,11 @@ void Element::focus(bool restorePreviousSelection)
RefPtr<Node> protect;
if (Page* page = doc->page()) {
// Focus and change event handlers can cause us to lose our last ref.
+ // If a focus event handler changes the focus to a different node it
+ // does not make sense to continue and update appearence.
protect = this;
- page->focusController()->setFocusedNode(this, doc->frame());
+ if (!page->focusController()->setFocusedNode(this, doc->frame()))
+ return;
}
// Setting the focused node above might have invalidated the layout due to scripts.
@@ -1420,6 +1423,28 @@ RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier)
return pseudoElementSpecifier ? data->m_computedStyle->getCachedPseudoStyle(pseudoElementSpecifier) : data->m_computedStyle.get();
}
+AtomicString Element::computeInheritedLanguage() const
+{
+ const Node* n = this;
+ AtomicString value;
+ // The language property is inherited, so we iterate over the parents to find the first language.
+ while (n && value.isNull()) {
+ if (n->isElementNode()) {
+ // Spec: xml:lang takes precedence -- http://www.w3.org/TR/xhtml1/#C_7
+ value = static_cast<const Element*>(n)->fastGetAttribute(XMLNames::langAttr);
+ if (value.isNull())
+ value = static_cast<const Element*>(n)->fastGetAttribute(HTMLNames::langAttr);
+ } else if (n->isDocumentNode()) {
+ // checking the MIME content-language
+ value = static_cast<const Document*>(n)->contentLanguage();
+ }
+
+ n = n->parent();
+ }
+
+ return value;
+}
+
void Element::cancelFocusAppearanceUpdate()
{
if (hasRareData())
@@ -1498,7 +1523,7 @@ bool Element::webkitMatchesSelector(const String& selector, ExceptionCode& ec)
return false;
}
- bool strictParsing = !document()->inCompatMode();
+ bool strictParsing = !document()->inQuirksMode();
CSSParser p(strictParsing);
CSSSelectorList selectorList;
@@ -1591,5 +1616,12 @@ bool Element::childShouldCreateRenderer(Node* child) const
return Node::childShouldCreateRenderer(child);
}
#endif
+
+#if ENABLE(FULLSCREEN_API)
+void Element::webkitRequestFullScreen(unsigned short flags)
+{
+ document()->webkitRequestFullScreenForElement(this, flags);
+}
+#endif
} // namespace WebCore
diff --git a/WebCore/dom/Element.h b/WebCore/dom/Element.h
index 694db98..5bbddc2 100644
--- a/WebCore/dom/Element.h
+++ b/WebCore/dom/Element.h
@@ -94,6 +94,9 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend);
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
#endif
+#if ENABLE(FULLSCREEN_API)
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitfullscreenchange);
+#endif
virtual PassRefPtr<DocumentFragment> deprecatedCreateContextualFragment(const String&, FragmentScriptingPermission = FragmentScriptingAllowed);
@@ -215,6 +218,8 @@ public:
RenderStyle* computedStyle(PseudoId = NOPSEUDO);
+ AtomicString computeInheritedLanguage() const;
+
void dispatchAttrRemovalEvent(Attribute*);
void dispatchAttrAdditionEvent(Attribute*);
@@ -292,6 +297,14 @@ public:
#if ENABLE(SVG)
virtual bool childShouldCreateRenderer(Node*) const;
#endif
+
+#if ENABLE(FULLSCREEN_API)
+ enum {
+ ALLOW_KEYBOARD_INPUT = 1
+ };
+
+ void webkitRequestFullScreen(unsigned short flags);
+#endif
protected:
Element(const QualifiedName& tagName, Document* document, ConstructionType type)
diff --git a/WebCore/dom/Element.idl b/WebCore/dom/Element.idl
index 0ad3184..2b62a1a 100644
--- a/WebCore/dom/Element.idl
+++ b/WebCore/dom/Element.idl
@@ -100,10 +100,8 @@ module core {
NodeList getElementsByClassName(in DOMString name);
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-#if !defined(V8_BINDING) || !V8_BINDING
readonly attribute DOMStringMap dataset;
#endif
-#endif
// NodeSelector - Selector API
Element querySelector(in DOMString selectors)
@@ -133,6 +131,11 @@ module core {
readonly attribute DOMString innerText;
#endif
+#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
+ const unsigned short ALLOW_KEYBOARD_INPUT = 1;
+ void webkitRequestFullScreen(in unsigned short flags);
+#endif
+
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
// Event handler DOM attributes
attribute [DontEnum] EventListener onabort;
@@ -205,6 +208,7 @@ module core {
attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchmove;
attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
+ attribute [DontEnum, Conditional=FULLSCREEN_API] EventListener onwebkitfullscreenchange;
#endif
};
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h
index 85fe69b..6b8b908 100644
--- a/WebCore/dom/EventNames.h
+++ b/WebCore/dom/EventNames.h
@@ -170,6 +170,8 @@ namespace WebCore {
\
macro(loadend) \
\
+ macro(webkitfullscreenchange)
+ \
// end of DOM_EVENT_NAMES_FOR_EACH
class EventNames : public Noncopyable {
diff --git a/WebCore/dom/NamedNodeMap.cpp b/WebCore/dom/NamedNodeMap.cpp
index 7c9298a..bc56f7e 100644
--- a/WebCore/dom/NamedNodeMap.cpp
+++ b/WebCore/dom/NamedNodeMap.cpp
@@ -309,7 +309,7 @@ void NamedNodeMap::setClass(const String& classStr)
return;
}
- m_classNames.set(classStr, element()->document()->inCompatMode());
+ m_classNames.set(classStr, element()->document()->inQuirksMode());
}
int NamedNodeMap::declCount() const
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index 2c63b62..9b27089 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -1076,21 +1076,27 @@ void Node::checkSetPrefix(const AtomicString& prefix, ExceptionCode& ec)
// Attribute-specific checks are in Attr::setPrefix().
}
-bool Node::canReplaceChild(Node* newChild, Node*)
+static bool isChildTypeAllowed(Node* newParent, Node* child)
{
- if (newChild->nodeType() != DOCUMENT_FRAGMENT_NODE) {
- if (!childTypeAllowed(newChild->nodeType()))
+ if (child->nodeType() != Node::DOCUMENT_FRAGMENT_NODE) {
+ if (!newParent->childTypeAllowed(child->nodeType()))
return false;
- } else {
- for (Node *n = newChild->firstChild(); n; n = n->nextSibling()) {
- if (!childTypeAllowed(n->nodeType()))
- return false;
- }
}
+
+ for (Node *n = child->firstChild(); n; n = n->nextSibling()) {
+ if (!newParent->childTypeAllowed(n->nodeType()))
+ return false;
+ }
+
return true;
}
-void Node::checkReplaceChild(Node* newChild, Node* oldChild, ExceptionCode& ec)
+bool Node::canReplaceChild(Node* newChild, Node*)
+{
+ return isChildTypeAllowed(this, newChild);
+}
+
+static void checkAcceptChild(Node* newParent, Node* newChild, ExceptionCode& ec)
{
// Perform error checking as required by spec for adding a new child. Used by replaceChild().
@@ -1101,113 +1107,69 @@ void Node::checkReplaceChild(Node* newChild, Node* oldChild, ExceptionCode& ec)
}
// NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly
- if (isReadOnlyNode()) {
+ if (newParent->isReadOnlyNode()) {
ec = NO_MODIFICATION_ALLOWED_ERR;
return;
}
- bool shouldAdoptChild = false;
-
// WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that
// created this node.
// We assume that if newChild is a DocumentFragment, all children are created from the same document
// as the fragment itself (otherwise they could not have been added as children)
- if (newChild->document() != document()) {
+ if (newChild->document() != newParent->document() && newChild->inDocument()) {
// but if the child is not in a document yet then loosen the
// restriction, so that e.g. creating an element with the Option()
// constructor and then adding it to a different document works,
// as it does in Mozilla and Mac IE.
- if (!newChild->inDocument()) {
- shouldAdoptChild = true;
- } else {
- ec = WRONG_DOCUMENT_ERR;
- return;
- }
+ ec = WRONG_DOCUMENT_ERR;
+ return;
}
// HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the
// newChild node, or if the node to append is one of this node's ancestors.
-
+
// check for ancestor/same node
- if (newChild == this || isDescendantOf(newChild)) {
+ if (newChild == newParent || newParent->isDescendantOf(newChild)) {
ec = HIERARCHY_REQUEST_ERR;
return;
}
-
- if (!canReplaceChild(newChild, oldChild)) {
- ec = HIERARCHY_REQUEST_ERR;
- return;
- }
-
- // change the document pointer of newChild and all of its children to be the new document
- if (shouldAdoptChild)
- for (Node* node = newChild; node; node = node->traverseNextNode(newChild))
- node->setDocument(document());
}
-void Node::checkAddChild(Node *newChild, ExceptionCode& ec)
+static void transferOwnerDocument(Document* newDocument, Node* root)
{
- // Perform error checking as required by spec for adding a new child. Used by appendChild() and insertBefore().
-
- // Not mentioned in spec: throw NOT_FOUND_ERR if newChild is null
- if (!newChild) {
- ec = NOT_FOUND_ERR;
- return;
+ // FIXME: To match Gecko, we should do this for nodes that are already in the document as well.
+ if (root->document() != newDocument && !root->inDocument()) {
+ for (Node* node = root; node; node = node->traverseNextNode(root))
+ node->setDocument(newDocument);
}
+}
- // NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly
- if (isReadOnlyNode()) {
- ec = NO_MODIFICATION_ALLOWED_ERR;
+void Node::checkReplaceChild(Node* newChild, Node* oldChild, ExceptionCode& ec)
+{
+ checkAcceptChild(this, newChild, ec);
+ if (ec)
return;
- }
-
- bool shouldAdoptChild = false;
- // WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that
- // created this node.
- // We assume that if newChild is a DocumentFragment, all children are created from the same document
- // as the fragment itself (otherwise they could not have been added as children)
- if (newChild->document() != document()) {
- // but if the child is not in a document yet then loosen the
- // restriction, so that e.g. creating an element with the Option()
- // constructor and then adding it to a different document works,
- // as it does in Mozilla and Mac IE.
- if (!newChild->inDocument()) {
- shouldAdoptChild = true;
- } else {
- ec = WRONG_DOCUMENT_ERR;
- return;
- }
+ if (!canReplaceChild(newChild, oldChild)) {
+ ec = HIERARCHY_REQUEST_ERR;
+ return;
}
- // HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the
- // newChild node, or if the node to append is one of this node's ancestors.
+ transferOwnerDocument(document(), newChild);
+}
- // check for ancestor/same node
- if (newChild == this || isDescendantOf(newChild)) {
- ec = HIERARCHY_REQUEST_ERR;
+void Node::checkAddChild(Node *newChild, ExceptionCode& ec)
+{
+ checkAcceptChild(this, newChild, ec);
+ if (ec)
return;
- }
- if (newChild->nodeType() != DOCUMENT_FRAGMENT_NODE) {
- if (!childTypeAllowed(newChild->nodeType())) {
- ec = HIERARCHY_REQUEST_ERR;
- return;
- }
- }
- else {
- for (Node *n = newChild->firstChild(); n; n = n->nextSibling()) {
- if (!childTypeAllowed(n->nodeType())) {
- ec = HIERARCHY_REQUEST_ERR;
- return;
- }
- }
+ if (!isChildTypeAllowed(this, newChild)) {
+ ec = HIERARCHY_REQUEST_ERR;
+ return;
}
-
- // change the document pointer of newChild and all of its children to be the new document
- if (shouldAdoptChild)
- for (Node* node = newChild; node; node = node->traverseNextNode(newChild))
- node->setDocument(document());
+
+ transferOwnerDocument(document(), newChild);
}
bool Node::isDescendantOf(const Node *other) const
@@ -1646,7 +1608,7 @@ PassRefPtr<Element> Node::querySelector(const String& selectors, ExceptionCode&
ec = SYNTAX_ERR;
return 0;
}
- bool strictParsing = !document()->inCompatMode();
+ bool strictParsing = !document()->inQuirksMode();
CSSParser p(strictParsing);
CSSSelectorList querySelectorList;
@@ -1693,7 +1655,7 @@ PassRefPtr<NodeList> Node::querySelectorAll(const String& selectors, ExceptionCo
ec = SYNTAX_ERR;
return 0;
}
- bool strictParsing = !document()->inCompatMode();
+ bool strictParsing = !document()->inQuirksMode();
CSSParser p(strictParsing);
CSSSelectorList querySelectorList;
diff --git a/WebCore/dom/Node.h b/WebCore/dom/Node.h
index e4e2b4a..c7f07f1 100644
--- a/WebCore/dom/Node.h
+++ b/WebCore/dom/Node.h
@@ -647,7 +647,6 @@ private:
HasSVGRareDataFlag = 1 << 23, // SVGElement
#endif
StyleChangeMask = 1 << nodeStyleChangeShift | 1 << (nodeStyleChangeShift + 1),
- CreateWithZeroRefCountFlag = 1 << 26,
#if ENABLE(SVG)
DefaultNodeFlags = IsParsingChildrenFinishedFlag | IsStyleAttributeValidFlag | AreSVGAttributesValidFlag
@@ -664,8 +663,6 @@ private:
void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
protected:
- // CreateWithZeroRefCountFlag is deprecated and can be removed once we convert all element
- // classes to start with a reference count of 1.
enum ConstructionType {
CreateOther = DefaultNodeFlags,
CreateText = DefaultNodeFlags | IsTextFlag,
@@ -673,10 +670,8 @@ protected:
CreateContainer = DefaultNodeFlags | IsContainerFlag,
CreateElement = CreateContainer | IsElementFlag,
CreateStyledElement = CreateElement | IsStyledElementFlag,
- CreateStyledElementZeroRefCount = CreateStyledElement | CreateWithZeroRefCountFlag,
CreateHTMLElement = CreateStyledElement | IsHTMLFlag,
CreateSVGElement = CreateStyledElement | IsSVGFlag,
- CreateSVGElementZeroRefCount = CreateSVGElement | CreateWithZeroRefCountFlag,
};
Node(Document*, ConstructionType);
@@ -696,7 +691,6 @@ private:
void markCachedNodeListsSlow(JSC::MarkStack&, JSC::JSGlobalData&);
#endif
- static bool initialRefCount(ConstructionType);
void setStyleChange(StyleChangeType);
virtual void refEventTarget() { ref(); }
@@ -753,11 +747,6 @@ private:
#endif
};
-inline bool Node::initialRefCount(ConstructionType type)
-{
- return !(type & CreateWithZeroRefCountFlag);
-}
-
// Used in Node::addSubresourceAttributeURLs() and in addSubresourceStyleURLs()
inline void addSubresourceURL(ListHashSet<KURL>& urls, const KURL& url)
{
diff --git a/WebCore/dom/OptionElement.cpp b/WebCore/dom/OptionElement.cpp
index 1de5fa4..240a8fc 100644
--- a/WebCore/dom/OptionElement.cpp
+++ b/WebCore/dom/OptionElement.cpp
@@ -73,7 +73,7 @@ String OptionElement::collectOptionLabelOrText(const OptionElementData& data, co
String text;
// WinIE does not use the label attribute, so as a quirk, we ignore it.
- if (!document->inCompatMode())
+ if (!document->inQuirksMode())
text = data.label();
if (text.isEmpty())
text = collectOptionInnerText(element);
diff --git a/WebCore/dom/ProcessingInstruction.cpp b/WebCore/dom/ProcessingInstruction.cpp
index 739d62f..8f4a0ce 100644
--- a/WebCore/dom/ProcessingInstruction.cpp
+++ b/WebCore/dom/ProcessingInstruction.cpp
@@ -274,9 +274,8 @@ void ProcessingInstruction::removedFromDocument()
document()->removeStyleSheetCandidateNode(this);
- // FIXME: It's terrible to do a synchronous update of the style selector just because a <style> or <link> element got removed.
if (m_cachedSheet)
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
void ProcessingInstruction::finishParsingChildren()
diff --git a/WebCore/dom/SelectorNodeList.cpp b/WebCore/dom/SelectorNodeList.cpp
index 5beaaee..039a29f 100644
--- a/WebCore/dom/SelectorNodeList.cpp
+++ b/WebCore/dom/SelectorNodeList.cpp
@@ -46,7 +46,7 @@ PassRefPtr<StaticNodeList> createSelectorNodeList(Node* rootNode, const CSSSelec
Vector<RefPtr<Node> > nodes;
Document* document = rootNode->document();
CSSSelector* onlySelector = querySelectorList.hasOneSelector() ? querySelectorList.first() : 0;
- bool strictParsing = !document->inCompatMode();
+ bool strictParsing = !document->inQuirksMode();
CSSStyleSelector::SelectorChecker selectorChecker(document, strictParsing);
diff --git a/WebCore/dom/StyleElement.cpp b/WebCore/dom/StyleElement.cpp
index 4c0e56f..c3a7300 100644
--- a/WebCore/dom/StyleElement.cpp
+++ b/WebCore/dom/StyleElement.cpp
@@ -67,9 +67,8 @@ void StyleElement::removedFromDocument(Document* document, Element* element)
if (!document->renderer())
return;
- // FIXME: It's terrible to do a synchronous update of the style selector just because a <style> or <link> element got removed.
if (m_sheet)
- document->updateStyleSelector();
+ document->styleSelectorChanged(DeferRecalcStyle);
}
void StyleElement::childrenChanged(Element* element)
@@ -138,7 +137,7 @@ void StyleElement::createSheet(Element* e, int startLineNumber, const String& te
document->addPendingSheet();
m_loading = true;
m_sheet = CSSStyleSheet::create(e, String(), KURL(), document->inputEncoding());
- m_sheet->parseStringAtLine(text, !document->inCompatMode(), startLineNumber);
+ m_sheet->parseStringAtLine(text, !document->inQuirksMode(), startLineNumber);
m_sheet->setMedia(mediaList.get());
m_sheet->setTitle(e->title());
m_loading = false;
diff --git a/WebCore/dom/StyledElement.cpp b/WebCore/dom/StyledElement.cpp
index 9b22f1d..a158e2e 100644
--- a/WebCore/dom/StyledElement.cpp
+++ b/WebCore/dom/StyledElement.cpp
@@ -126,7 +126,7 @@ void StyledElement::createInlineStyleDecl()
m_inlineStyleDecl = CSSMutableStyleDeclaration::create();
m_inlineStyleDecl->setParent(document()->elementSheet());
m_inlineStyleDecl->setNode(this);
- m_inlineStyleDecl->setStrictParsing(isHTMLElement() && !document()->inCompatMode());
+ m_inlineStyleDecl->setStrictParsing(isHTMLElement() && !document()->inQuirksMode());
}
void StyledElement::destroyInlineStyleDecl()
@@ -234,7 +234,7 @@ void StyledElement::parseMappedAttribute(Attribute* attr)
if (attributeMap()) {
if (attr->isNull())
attributeMap()->setIdForStyleResolution(nullAtom);
- else if (document()->inCompatMode())
+ else if (document()->inQuirksMode())
attributeMap()->setIdForStyleResolution(attr->value().lower());
else
attributeMap()->setIdForStyleResolution(attr->value());
diff --git a/WebCore/dom/XMLDocumentParser.cpp b/WebCore/dom/XMLDocumentParser.cpp
index c6d9f89..4b76472 100644
--- a/WebCore/dom/XMLDocumentParser.cpp
+++ b/WebCore/dom/XMLDocumentParser.cpp
@@ -231,7 +231,7 @@ void XMLDocumentParser::end()
insertErrorMessageBlock();
else {
exitText();
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(RecalcStyleImmediately);
}
clearCurrentNodeStack();
diff --git a/WebCore/dom/XMLDocumentParserLibxml2.cpp b/WebCore/dom/XMLDocumentParserLibxml2.cpp
index 37da83c..db94c50 100644
--- a/WebCore/dom/XMLDocumentParserLibxml2.cpp
+++ b/WebCore/dom/XMLDocumentParserLibxml2.cpp
@@ -361,6 +361,17 @@ private:
unsigned m_currentOffset;
};
+static void switchToUTF16(xmlParserCtxtPtr ctxt)
+{
+ // Hack around libxml2's lack of encoding overide support by manually
+ // resetting the encoding to UTF-16 before every chunk. Otherwise libxml
+ // will detect <?xml version="1.0" encoding="<encoding name>"?> blocks
+ // and switch encodings, causing the parse to fail.
+ const UChar BOM = 0xFEFF;
+ const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM);
+ xmlSwitchEncoding(ctxt, BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
+}
+
static bool shouldAllowExternalLoad(const KURL& url)
{
String urlString = url.string();
@@ -476,9 +487,7 @@ PassRefPtr<XMLParserContext> XMLParserContext::createStringParser(xmlSAXHandlerP
xmlParserCtxtPtr parser = xmlCreatePushParserCtxt(handlers, 0, 0, 0, 0);
parser->_private = userData;
parser->replaceEntities = true;
- const UChar BOM = 0xFEFF;
- const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM);
- xmlSwitchEncoding(parser, BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
+ switchToUTF16(parser);
return adoptRef(new XMLParserContext(parser));
}
@@ -645,14 +654,7 @@ void XMLDocumentParser::doWrite(const String& parseString)
// keep this alive until this function is done.
RefPtr<XMLDocumentParser> protect(this);
- // Hack around libxml2's lack of encoding overide support by manually
- // resetting the encoding to UTF-16 before every chunk. Otherwise libxml
- // will detect <?xml version="1.0" encoding="<encoding name>"?> blocks
- // and switch encodings, causing the parse to fail.
- const UChar BOM = 0xFEFF;
- const unsigned char BOMHighByte = *reinterpret_cast<const unsigned char*>(&BOM);
- xmlSwitchEncoding(context->context(), BOMHighByte == 0xFF ? XML_CHAR_ENCODING_UTF16LE : XML_CHAR_ENCODING_UTF16BE);
-
+ switchToUTF16(context->context());
XMLDocumentParserScope scope(document()->docLoader());
xmlParseChunk(context->context(), reinterpret_cast<const char*>(parseString.characters()), sizeof(UChar) * parseString.length(), 0);
@@ -1231,6 +1233,7 @@ static xmlEntityPtr getEntityHandler(void* closure, const xmlChar* name)
static void startDocumentHandler(void* closure)
{
xmlParserCtxt* ctxt = static_cast<xmlParserCtxt*>(closure);
+ switchToUTF16(ctxt);
getParser(closure)->startDocument(ctxt->version, ctxt->encoding, ctxt->standalone);
xmlSAX2StartDocument(closure);
}
@@ -1313,7 +1316,7 @@ void XMLDocumentParser::doEnd()
document()->setTransformSource(new TransformSource(doc));
document()->setParsing(false); // Make the doc think it's done, so it will apply xsl sheets.
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(RecalcStyleImmediately);
document()->setParsing(true);
m_parserStopped = true;
}
diff --git a/WebCore/dom/XMLDocumentParserQt.cpp b/WebCore/dom/XMLDocumentParserQt.cpp
index 606770f..dfd6fb1 100644
--- a/WebCore/dom/XMLDocumentParserQt.cpp
+++ b/WebCore/dom/XMLDocumentParserQt.cpp
@@ -211,7 +211,7 @@ void XMLDocumentParser::doEnd()
if (m_sawXSLTransform) {
document()->setTransformSource(new TransformSource(m_originalSourceForTransform));
document()->setParsing(false); // Make the doc think it's done, so it will apply xsl sheets.
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(RecalcStyleImmediately);
document()->setParsing(true);
m_parserStopped = true;
}
diff --git a/WebCore/dom/make_names.pl b/WebCore/dom/make_names.pl
index e111eb7..9dec124 100755
--- a/WebCore/dom/make_names.pl
+++ b/WebCore/dom/make_names.pl
@@ -128,7 +128,6 @@ sub defaultTagPropertyHash
return (
'constructorNeedsCreatedByParser' => 0,
'constructorNeedsFormElement' => 0,
- 'createWithNew' => 0,
'interfaceName' => defaultInterfaceName($_[0]),
# By default, the JSInterfaceName is the same as the interfaceName.
'JSInterfaceName' => defaultInterfaceName($_[0]),
@@ -317,16 +316,8 @@ END
;
}
- my $newPrefix = "";
- my $createSuffix = "::create";
-
- if ($enabledTags{$tagName}{createWithNew}) {
- $newPrefix = "new ";
- $createSuffix = "";
- }
-
# Call the constructor with the right parameters.
- print F " return $newPrefix$interfaceName${createSuffix}($constructorTagName, document";
+ print F " return ${interfaceName}::create($constructorTagName, document";
print F ", formElement" if $enabledTags{$tagName}{constructorNeedsFormElement};
print F ", createdByParser" if $enabledTags{$tagName}{constructorNeedsCreatedByParser};
print F ");\n}\n\n";
diff --git a/WebCore/editing/ApplyStyleCommand.cpp b/WebCore/editing/ApplyStyleCommand.cpp
index 0a02e7a..4385a16 100644
--- a/WebCore/editing/ApplyStyleCommand.cpp
+++ b/WebCore/editing/ApplyStyleCommand.cpp
@@ -909,6 +909,16 @@ void ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock(Node* node, Node* unsp
}
}
+static Node* highestEmbeddingAncestor(Node* startNode, Node* enclosingNode)
+{
+ for (Node* n = startNode; n && n != enclosingNode; n = n->parent()) {
+ if (n->isHTMLElement() && getIdentifierValue(computedStyle(n).get(), CSSPropertyUnicodeBidi) == CSSValueEmbed)
+ return n;
+ }
+
+ return 0;
+}
+
void ApplyStyleCommand::applyInlineStyle(CSSMutableStyleDeclaration *style)
{
Node* startDummySpanAncestor = 0;
@@ -952,56 +962,51 @@ void ApplyStyleCommand::applyInlineStyle(CSSMutableStyleDeclaration *style)
endDummySpanAncestor = dummySpanAncestorForNode(end.node());
}
+ // Remove style from the selection.
+ // Use the upstream position of the start for removing style.
+ // This will ensure we remove all traces of the relevant styles from the selection
+ // and prevent us from adding redundant ones, as described in:
+ // <rdar://problem/3724344> Bolding and unbolding creates extraneous tags
+ Position removeStart = start.upstream();
int unicodeBidi = getIdentifierValue(style, CSSPropertyUnicodeBidi);
int direction = 0;
- HTMLElement* startUnsplitAncestor = 0;
- HTMLElement* endUnsplitAncestor = 0;
+ RefPtr<CSSMutableStyleDeclaration> styleWithoutEmbedding;
if (unicodeBidi) {
// Leave alone an ancestor that provides the desired single level embedding, if there is one.
if (unicodeBidi == CSSValueEmbed)
direction = getIdentifierValue(style, CSSPropertyDirection);
- startUnsplitAncestor = splitAncestorsWithUnicodeBidi(start.node(), true, direction);
- endUnsplitAncestor = splitAncestorsWithUnicodeBidi(end.node(), false, direction);
+ HTMLElement* startUnsplitAncestor = splitAncestorsWithUnicodeBidi(start.node(), true, direction);
+ HTMLElement* endUnsplitAncestor = splitAncestorsWithUnicodeBidi(end.node(), false, direction);
removeEmbeddingUpToEnclosingBlock(start.node(), startUnsplitAncestor);
removeEmbeddingUpToEnclosingBlock(end.node(), endUnsplitAncestor);
- }
- // Remove style from the selection.
- // Use the upstream position of the start for removing style.
- // This will ensure we remove all traces of the relevant styles from the selection
- // and prevent us from adding redundant ones, as described in:
- // <rdar://problem/3724344> Bolding and unbolding creates extraneous tags
- Position removeStart = start.upstream();
- Position embeddingRemoveStart = removeStart;
- Position embeddingRemoveEnd = end;
- if (unicodeBidi) {
// Avoid removing the dir attribute and the unicode-bidi and direction properties from the unsplit ancestors.
+ Position embeddingRemoveStart = removeStart;
if (startUnsplitAncestor && nodeFullySelected(startUnsplitAncestor, removeStart, end))
embeddingRemoveStart = positionInParentAfterNode(startUnsplitAncestor);
+
+ Position embeddingRemoveEnd = end;
if (endUnsplitAncestor && nodeFullySelected(endUnsplitAncestor, removeStart, end))
embeddingRemoveEnd = positionInParentBeforeNode(endUnsplitAncestor).downstream();
- }
-
- if (embeddingRemoveStart != removeStart || embeddingRemoveEnd != end) {
- RefPtr<CSSMutableStyleDeclaration> embeddingStyle = CSSMutableStyleDeclaration::create();
- embeddingStyle->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
- embeddingStyle->setProperty(CSSPropertyDirection, direction);
- if (comparePositions(embeddingRemoveStart, embeddingRemoveEnd) <= 0)
- removeInlineStyle(embeddingStyle, embeddingRemoveStart, embeddingRemoveEnd);
- RefPtr<CSSMutableStyleDeclaration> styleWithoutEmbedding = style->copy();
- styleWithoutEmbedding->removeProperty(CSSPropertyUnicodeBidi);
- styleWithoutEmbedding->removeProperty(CSSPropertyDirection);
- removeInlineStyle(styleWithoutEmbedding, removeStart, end);
- } else
- removeInlineStyle(style, removeStart, end);
+ if (embeddingRemoveEnd != removeStart || embeddingRemoveEnd != end) {
+ RefPtr<CSSMutableStyleDeclaration> embeddingStyle = CSSMutableStyleDeclaration::create();
+ embeddingStyle->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
+ embeddingStyle->setProperty(CSSPropertyDirection, direction);
+ if (comparePositions(embeddingRemoveStart, embeddingRemoveEnd) <= 0)
+ removeInlineStyle(embeddingStyle, embeddingRemoveStart, embeddingRemoveEnd);
+ styleWithoutEmbedding = style->copy();
+ styleWithoutEmbedding->removeProperty(CSSPropertyUnicodeBidi);
+ styleWithoutEmbedding->removeProperty(CSSPropertyDirection);
+ }
+ }
+ removeInlineStyle(styleWithoutEmbedding ? styleWithoutEmbedding.get() : style, removeStart, end);
start = startPosition();
end = endPosition();
if (splitStart) {
- bool mergedStart = mergeStartWithPreviousIfIdentical(start, end);
- if (mergedStart) {
+ if (mergeStartWithPreviousIfIdentical(start, end)) {
start = startPosition();
end = endPosition();
}
@@ -1018,41 +1023,33 @@ void ApplyStyleCommand::applyInlineStyle(CSSMutableStyleDeclaration *style)
// to check a computed style
updateLayout();
- Position embeddingApplyStart = start;
- Position embeddingApplyEnd = end;
+ RefPtr<CSSMutableStyleDeclaration> styleToApply = style;
if (unicodeBidi) {
// Avoid applying the unicode-bidi and direction properties beneath ancestors that already have them.
- Node* startEnclosingBlock = enclosingBlock(start.node());
- for (Node* n = start.node(); n != startEnclosingBlock; n = n->parent()) {
- if (n->isHTMLElement() && getIdentifierValue(computedStyle(n).get(), CSSPropertyUnicodeBidi) == CSSValueEmbed) {
- embeddingApplyStart = positionInParentAfterNode(n);
- break;
- }
- }
+ Node* embeddingStartNode = highestEmbeddingAncestor(start.node(), enclosingBlock(start.node()));
+ Node* embeddingEndNode = highestEmbeddingAncestor(end.node(), enclosingBlock(end.node()));
- Node* endEnclosingBlock = enclosingBlock(end.node());
- for (Node* n = end.node(); n != endEnclosingBlock; n = n->parent()) {
- if (n->isHTMLElement() && getIdentifierValue(computedStyle(n).get(), CSSPropertyUnicodeBidi) == CSSValueEmbed) {
- embeddingApplyEnd = positionInParentBeforeNode(n);
- break;
- }
- }
- }
+ if (embeddingStartNode || embeddingEndNode) {
+ Position embeddingApplyStart = embeddingStartNode ? positionInParentAfterNode(embeddingStartNode) : start;
+ Position embeddingApplyEnd = embeddingEndNode ? positionInParentBeforeNode(embeddingEndNode) : end;
+ ASSERT(embeddingApplyStart.isNotNull() && embeddingApplyEnd.isNotNull());
- if (embeddingApplyStart != start || embeddingApplyEnd != end) {
- if (embeddingApplyStart.isNotNull() && embeddingApplyEnd.isNotNull()) {
RefPtr<CSSMutableStyleDeclaration> embeddingStyle = CSSMutableStyleDeclaration::create();
embeddingStyle->setProperty(CSSPropertyUnicodeBidi, CSSValueEmbed);
embeddingStyle->setProperty(CSSPropertyDirection, direction);
applyInlineStyleToRange(embeddingStyle.get(), embeddingApplyStart, embeddingApplyEnd);
+
+ if (styleWithoutEmbedding)
+ styleToApply = styleWithoutEmbedding;
+ else {
+ styleToApply = style->copy();
+ styleToApply->removeProperty(CSSPropertyUnicodeBidi);
+ styleToApply->removeProperty(CSSPropertyDirection);
+ }
}
+ }
- RefPtr<CSSMutableStyleDeclaration> styleWithoutEmbedding = style->copy();
- styleWithoutEmbedding->removeProperty(CSSPropertyUnicodeBidi);
- styleWithoutEmbedding->removeProperty(CSSPropertyDirection);
- applyInlineStyleToRange(styleWithoutEmbedding.get(), start, end);
- } else
- applyInlineStyleToRange(style, start, end);
+ applyInlineStyleToRange(styleToApply.get(), start, end);
// Remove dummy style spans created by splitting text elements.
cleanupUnstyledAppleStyleSpans(startDummySpanAncestor);
@@ -1135,94 +1132,113 @@ void ApplyStyleCommand::applyInlineStyleToRange(CSSMutableStyleDeclaration* styl
}
}
-bool ApplyStyleCommand::shouldRemoveTextDecorationTag(CSSStyleDeclaration* styleToApply, int textDecorationAddedByTag) const
-{
- // Honor text-decorations-in-effect
- RefPtr<CSSValue> textDecorationsToApply = styleToApply->getPropertyCSSValue(CSSPropertyWebkitTextDecorationsInEffect);
- if (!textDecorationsToApply || !textDecorationsToApply->isValueList())
- textDecorationsToApply = styleToApply->getPropertyCSSValue(CSSPropertyTextDecoration);
-
- // When there is no text decorations to apply, remove any one of u, s, & strike
- if (!textDecorationsToApply || !textDecorationsToApply->isValueList())
- return true;
-
- // Remove node if it implicitly adds style not present in styleToApply
- CSSValueList* valueList = static_cast<CSSValueList*>(textDecorationsToApply.get());
- RefPtr<CSSPrimitiveValue> value = CSSPrimitiveValue::createIdentifier(textDecorationAddedByTag);
- return !valueList->hasValue(value.get());
-}
-
-// This function maps from styling tags to CSS styles. Used for knowing which
-// styling tags should be removed when toggling styles.
-bool ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle(HTMLElement* elem, CSSMutableStyleDeclaration* style)
-{
- CSSMutableStyleDeclaration::const_iterator end = style->end();
- for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) {
- const CSSProperty& property = *it;
- // FIXME: This should probably be re-written to lookup the tagname in a
- // hash and match against an expected property/value pair.
- switch (property.id()) {
- case CSSPropertyFontWeight:
- // IE inserts "strong" tags for execCommand("bold"), so we remove them, even though they're not strictly presentational
- if (elem->hasLocalName(bTag) || elem->hasLocalName(strongTag))
- return !equalIgnoringCase(property.value()->cssText(), "bold") || !elem->hasChildNodes();
- break;
- case CSSPropertyVerticalAlign:
- if (elem->hasLocalName(subTag))
- return !equalIgnoringCase(property.value()->cssText(), "sub") || !elem->hasChildNodes();
- if (elem->hasLocalName(supTag))
- return !equalIgnoringCase(property.value()->cssText(), "sup") || !elem->hasChildNodes();
- break;
- case CSSPropertyFontStyle:
- // IE inserts "em" tags for execCommand("italic"), so we remove them, even though they're not strictly presentational
- if (elem->hasLocalName(iTag) || elem->hasLocalName(emTag))
- return !equalIgnoringCase(property.value()->cssText(), "italic") || !elem->hasChildNodes();
- break;
- case CSSPropertyTextDecoration:
- case CSSPropertyWebkitTextDecorationsInEffect:
- if (elem->hasLocalName(uTag))
- return shouldRemoveTextDecorationTag(style, CSSValueUnderline) || !elem->hasChildNodes();
- else if (elem->hasLocalName(sTag) || elem->hasTagName(strikeTag))
- return shouldRemoveTextDecorationTag(style,CSSValueLineThrough) || !elem->hasChildNodes();
- }
- }
- return false;
-}
-
bool ApplyStyleCommand::removeInlineStyleFromElement(CSSMutableStyleDeclaration* style, HTMLElement* element, InlineStyleRemovalMode mode)
{
ASSERT(style);
ASSERT(element);
- bool removed = false;
-
if (m_styledInlineElement && element->hasTagName(m_styledInlineElement->tagQName())) {
- removed = true;
if (mode == RemoveAttributesAndElements)
removeNodePreservingChildren(element);
+ return true;
}
- if (implicitlyStyledElementShouldBeRemovedWhenApplyingStyle(element, style)) {
+ bool removed = false;
+ if (removeImplicitlyStyledElement(style, element, mode))
removed = true;
- if (mode == RemoveAttributesAndElements)
- replaceWithSpanOrRemoveIfWithoutAttributes(element);
- }
if (!element->inDocument())
return removed;
// If the node was converted to a span, the span may still contain relevant
// styles which must be removed (e.g. <b style='font-weight: bold'>)
- if (removeHTMLFontStyle(style, element, mode))
- removed = true;
- if (removeHTMLBidiEmbeddingStyle(style, element, mode))
- removed = true;
if (removeCSSStyle(style, element, mode))
removed = true;
return removed;
}
+
+enum EPushDownType { ShouldBePushedDown, ShouldNotBePushedDown };
+struct HTMLEquivalent {
+ int propertyID;
+ bool isValueList;
+ int primitiveId;
+ const QualifiedName* element;
+ const QualifiedName* attribute;
+ EPushDownType pushDownType;
+};
+
+static const HTMLEquivalent HTMLEquivalents[] = {
+ { CSSPropertyFontWeight, false, CSSValueBold, &bTag, 0, ShouldBePushedDown },
+ { CSSPropertyFontWeight, false, CSSValueBold, &strongTag, 0, ShouldBePushedDown },
+ { CSSPropertyVerticalAlign, false, CSSValueSub, &subTag, 0, ShouldBePushedDown },
+ { CSSPropertyVerticalAlign, false, CSSValueSuper, &supTag, 0, ShouldBePushedDown },
+ { CSSPropertyFontStyle, false, CSSValueItalic, &iTag, 0, ShouldBePushedDown },
+ { CSSPropertyFontStyle, false, CSSValueItalic, &emTag, 0, ShouldBePushedDown },
+
+ // text-decorations should be CSSValueList
+ { CSSPropertyTextDecoration, true, CSSValueUnderline, &uTag, 0, ShouldBePushedDown },
+ { CSSPropertyTextDecoration, true, CSSValueLineThrough, &sTag, 0, ShouldBePushedDown },
+ { CSSPropertyTextDecoration, true, CSSValueLineThrough, &strikeTag, 0, ShouldBePushedDown },
+ { CSSPropertyWebkitTextDecorationsInEffect, true, CSSValueUnderline, &uTag, 0, ShouldBePushedDown },
+ { CSSPropertyWebkitTextDecorationsInEffect, true, CSSValueLineThrough, &sTag, 0, ShouldBePushedDown },
+ { CSSPropertyWebkitTextDecorationsInEffect, true, CSSValueLineThrough, &strikeTag, 0, ShouldBePushedDown },
+
+ // FIXME: font attributes should only be removed if values were different
+ { CSSPropertyColor, false, CSSValueInvalid, &fontTag, &colorAttr, ShouldBePushedDown },
+ { CSSPropertyFontFamily, false, CSSValueInvalid, &fontTag, &faceAttr, ShouldBePushedDown },
+ { CSSPropertyFontSize, false, CSSValueInvalid, &fontTag, &sizeAttr, ShouldBePushedDown },
+
+ // unicode-bidi and direction are pushed down separately so don't push down with other styles.
+ { CSSPropertyUnicodeBidi, false, CSSValueInvalid, 0, &dirAttr, ShouldNotBePushedDown },
+ { CSSPropertyDirection, false, CSSValueInvalid, 0, &dirAttr, ShouldNotBePushedDown },
+};
+
+bool ApplyStyleCommand::removeImplicitlyStyledElement(CSSMutableStyleDeclaration* style, HTMLElement* element, InlineStyleRemovalMode mode, CSSMutableStyleDeclaration* extractedStyle)
+{
+ // Current implementation does not support stylePushedDown when mode == RemoveNone because of early exit.
+ ASSERT(!extractedStyle || mode != RemoveNone);
+ bool removed = false;
+ for (size_t i = 0; i < sizeof(HTMLEquivalents) / sizeof(HTMLEquivalent); i++) {
+ const HTMLEquivalent& equivalent = HTMLEquivalents[i];
+ ASSERT(equivalent.element || equivalent.attribute);
+ if ((extractedStyle && equivalent.pushDownType == ShouldNotBePushedDown)
+ || (equivalent.element && !element->hasTagName(*equivalent.element))
+ || (equivalent.attribute && !element->hasAttribute(*equivalent.attribute)))
+ continue;
+
+ RefPtr<CSSValue> styleValue = style->getPropertyCSSValue(equivalent.propertyID);
+ if (!styleValue)
+ continue;
+ RefPtr<CSSPrimitiveValue> mapValue = CSSPrimitiveValue::createIdentifier(equivalent.primitiveId);
+
+ if (equivalent.isValueList && styleValue->isValueList() && static_cast<CSSValueList*>(styleValue.get())->hasValue(mapValue.get()))
+ continue; // If CSS value assumes CSSValueList, then only skip if the value was present in style to apply.
+ else if (styleValue->cssText() == mapValue->cssText())
+ continue; // If CSS value is primitive, then skip if they are equal.
+
+ if (extractedStyle) {
+ if (equivalent.primitiveId == CSSValueInvalid)
+ extractedStyle->setProperty(equivalent.propertyID, element->getAttribute(*equivalent.attribute));
+ else
+ extractedStyle->setProperty(equivalent.propertyID, mapValue->cssText());
+ }
+ if (mode == RemoveNone)
+ return true;
+
+ removed = true;
+ if (!equivalent.attribute) {
+ replaceWithSpanOrRemoveIfWithoutAttributes(element);
+ break;
+ }
+ removeNodeAttribute(element, *equivalent.attribute);
+ if (isEmptyFontTag(element) || isSpanWithoutAttributesOrUnstyleStyleSpan(element))
+ removeNodePreservingChildren(element);
+ }
+ return removed;
+}
+
void ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*& elem)
{
bool removeNode = false;
@@ -1247,66 +1263,6 @@ void ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*&
}
}
-bool ApplyStyleCommand::removeHTMLFontStyle(CSSMutableStyleDeclaration* style, HTMLElement* elem, InlineStyleRemovalMode mode)
-{
- ASSERT(style);
- ASSERT(elem);
-
- if (!elem->hasLocalName(fontTag))
- return false;
-
- bool removed = false;
- CSSMutableStyleDeclaration::const_iterator end = style->end();
- for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) {
- const QualifiedName* attrToRemove = 0;
- switch ((*it).id()) {
- case CSSPropertyColor:
- attrToRemove = &colorAttr;
- break;
- case CSSPropertyFontFamily:
- attrToRemove = &faceAttr;
- break;
- case CSSPropertyFontSize:
- attrToRemove = &sizeAttr;
- break;
- }
-
- if (attrToRemove) {
- removed = true;
- if (mode == RemoveAttributesAndElements)
- removeNodeAttribute(elem, *attrToRemove);
- }
- }
-
- if (isEmptyFontTag(elem) && mode == RemoveAttributesAndElements)
- removeNodePreservingChildren(elem);
-
- return removed;
-}
-
-bool ApplyStyleCommand::removeHTMLBidiEmbeddingStyle(CSSMutableStyleDeclaration* style, HTMLElement* elem, InlineStyleRemovalMode mode)
-{
- ASSERT(style);
- ASSERT(elem);
-
- if (!elem->hasAttribute(dirAttr))
- return false;
-
- if (!style->getPropertyCSSValue(CSSPropertyUnicodeBidi) && !style->getPropertyCSSValue(CSSPropertyDirection))
- return false;
-
- if (mode == RemoveNone)
- return true;
-
- removeNodeAttribute(elem, dirAttr);
-
- // FIXME: should this be isSpanWithoutAttributesOrUnstyleStyleSpan? Need a test.
- if (isUnstyledStyleSpan(elem))
- removeNodePreservingChildren(elem);
-
- return true;
-}
-
bool ApplyStyleCommand::removeCSSStyle(CSSMutableStyleDeclaration* style, HTMLElement* elem, InlineStyleRemovalMode mode)
{
ASSERT(style);
@@ -1364,7 +1320,7 @@ HTMLElement* ApplyStyleCommand::highestAncestorWithConflictingInlineStyle(CSSMut
return result;
}
-PassRefPtr<CSSMutableStyleDeclaration> ApplyStyleCommand::extractInlineStyleToPushDown(Node* node, bool isStyledElement, const Vector<int>& properties)
+PassRefPtr<CSSMutableStyleDeclaration> ApplyStyleCommand::extractInlineStyleToPushDown(CSSMutableStyleDeclaration* styleToApply, Node* node, bool isStyledElement)
{
ASSERT(node);
ASSERT(node->isElementNode());
@@ -1380,8 +1336,16 @@ PassRefPtr<CSSMutableStyleDeclaration> ApplyStyleCommand::extractInlineStyleToPu
return style.release();
}
- if (!style)
- return 0;
+ if (!style) {
+ style = CSSMutableStyleDeclaration::create();
+ removeImplicitlyStyledElement(styleToApply, element, RemoveAttributesAndElements, style.get());
+ return style.release();
+ }
+
+ Vector<int> properties;
+ CSSMutableStyleDeclaration::const_iterator end = styleToApply->end();
+ for (CSSMutableStyleDeclaration::const_iterator it = styleToApply->begin(); it != end; ++it)
+ properties.append(it->id());
style = style->copyPropertiesInSet(properties.data(), properties.size());
for (size_t i = 0; i < properties.size(); i++) {
@@ -1396,6 +1360,8 @@ PassRefPtr<CSSMutableStyleDeclaration> ApplyStyleCommand::extractInlineStyleToPu
if (isSpanWithoutAttributesOrUnstyleStyleSpan(element))
removeNodePreservingChildren(element);
+ removeImplicitlyStyledElement(styleToApply, element, RemoveAttributesAndElements, style.get());
+
return style.release();
}
@@ -1406,15 +1372,14 @@ void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, CSSMutableStyleDe
if (!style || !style->length() || !node->renderer())
return;
- // Since addInlineStyleIfNeeded can't add styles to block-flow render objects, add style attribute instead.
- // FIXME: applyInlineStyleToRange should be used here instead.
- if ((node->renderer()->isBlockFlow() || node->childNodeCount()) && node->isHTMLElement()) {
+ RefPtr<CSSMutableStyleDeclaration> newInlineStyle = style;
+ if (node->isHTMLElement()) {
HTMLElement* element = static_cast<HTMLElement*>(node);
CSSMutableStyleDeclaration* existingInlineStyle = element->inlineStyleDecl();
// Avoid overriding existing styles of node
if (existingInlineStyle) {
- RefPtr<CSSMutableStyleDeclaration> newInlineStyle = existingInlineStyle->copy();
+ newInlineStyle = existingInlineStyle->copy();
CSSMutableStyleDeclaration::const_iterator end = style->end();
for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it) {
ExceptionCode ec;
@@ -1441,22 +1406,23 @@ void ApplyStyleCommand::applyInlineStyleToPushDown(Node* node, CSSMutableStyleDe
}
}
}
+ }
+ }
- setNodeAttribute(element, styleAttr, newInlineStyle->cssText());
- } else
- setNodeAttribute(element, styleAttr, style->cssText());
-
+ // Since addInlineStyleIfNeeded can't add styles to block-flow render objects, add style attribute instead.
+ // FIXME: applyInlineStyleToRange should be used here instead.
+ if ((node->renderer()->isBlockFlow() || node->childNodeCount()) && node->isHTMLElement()) {
+ setNodeAttribute(static_cast<HTMLElement*>(node), styleAttr, newInlineStyle->cssText());
return;
}
if (node->renderer()->isText() && static_cast<RenderText*>(node->renderer())->isAllCollapsibleWhitespace())
return;
- // FIXME: addInlineStyleIfNeeded may override the style of node
// We can't wrap node with the styled element here because new styled element will never be removed if we did.
// If we modified the child pointer in pushDownInlineStyleAroundNode to point to new style element
// then we fall into an infinite loop where we keep removing and adding styled element wrapping node.
- addInlineStyleIfNeeded(style, node, node, DoNotAddStyledElement);
+ addInlineStyleIfNeeded(newInlineStyle.get(), node, node, DoNotAddStyledElement);
}
void ApplyStyleCommand::pushDownInlineStyleAroundNode(CSSMutableStyleDeclaration* style, Node* targetNode)
@@ -1465,11 +1431,6 @@ void ApplyStyleCommand::pushDownInlineStyleAroundNode(CSSMutableStyleDeclaration
if (!highestAncestor)
return;
- Vector<int> properties;
- CSSMutableStyleDeclaration::const_iterator end = style->end();
- for (CSSMutableStyleDeclaration::const_iterator it = style->begin(); it != end; ++it)
- properties.append(it->id());
-
// The outer loop is traversing the tree vertically from highestAncestor to targetNode
Node* current = highestAncestor;
while (current != targetNode) {
@@ -1481,7 +1442,7 @@ void ApplyStyleCommand::pushDownInlineStyleAroundNode(CSSMutableStyleDeclaration
RefPtr<StyledElement> styledElement;
if (current->isStyledElement() && m_styledInlineElement && current->hasTagName(m_styledInlineElement->tagQName()))
styledElement = static_cast<StyledElement*>(current);
- RefPtr<CSSMutableStyleDeclaration> styleToPushDown = extractInlineStyleToPushDown(current, styledElement, properties);
+ RefPtr<CSSMutableStyleDeclaration> styleToPushDown = extractInlineStyleToPushDown(style, current, styledElement);
// The inner loop will go through children on each level
// FIXME: we should aggregate inline child elements together so that we don't wrap each child separately.
@@ -1533,6 +1494,13 @@ void ApplyStyleCommand::removeInlineStyle(PassRefPtr<CSSMutableStyleDeclaration>
}
Position pushDownStart = start.downstream();
+ // If the pushDownStart is at the end of a text node, then this node is not fully selected.
+ // Move it to the next deep quivalent position to avoid removing the style from this node.
+ // e.g. if pushDownStart was at Position("hello", 5) in <b>hello<div>world</div></b>, we want Position("world", 0) instead.
+ Node* pushDownStartContainer = pushDownStart.containerNode();
+ if (pushDownStartContainer && pushDownStartContainer->isTextNode()
+ && pushDownStart.computeOffsetInContainerNode() == pushDownStartContainer->maxCharacterOffset())
+ pushDownStart = nextVisuallyDistinctCandidate(pushDownStart);
Position pushDownEnd = end.upstream();
pushDownInlineStyleAroundNode(style.get(), pushDownStart.node());
pushDownInlineStyleAroundNode(style.get(), pushDownEnd.node());
diff --git a/WebCore/editing/ApplyStyleCommand.h b/WebCore/editing/ApplyStyleCommand.h
index abe4909..969384a 100644
--- a/WebCore/editing/ApplyStyleCommand.h
+++ b/WebCore/editing/ApplyStyleCommand.h
@@ -71,16 +71,13 @@ private:
CSSMutableStyleDeclaration* style() const { return m_style.get(); }
// style-removal helpers
- bool shouldRemoveTextDecorationTag(CSSStyleDeclaration* styleToApply, int textDecorationAddedByTag) const;
- bool implicitlyStyledElementShouldBeRemovedWhenApplyingStyle(HTMLElement*, CSSMutableStyleDeclaration*);
bool removeInlineStyleFromElement(CSSMutableStyleDeclaration*, HTMLElement*, InlineStyleRemovalMode = RemoveAttributesAndElements);
inline bool shouldRemoveInlineStyleFromElement(CSSMutableStyleDeclaration* style, HTMLElement* element) {return removeInlineStyleFromElement(style, element, RemoveNone);}
+ bool removeImplicitlyStyledElement(CSSMutableStyleDeclaration*, HTMLElement*, InlineStyleRemovalMode, CSSMutableStyleDeclaration* extractedStyle = 0);
void replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*&);
- bool removeHTMLFontStyle(CSSMutableStyleDeclaration*, HTMLElement*, InlineStyleRemovalMode = RemoveAttributesAndElements);
- bool removeHTMLBidiEmbeddingStyle(CSSMutableStyleDeclaration*, HTMLElement*, InlineStyleRemovalMode = RemoveAttributesAndElements);
bool removeCSSStyle(CSSMutableStyleDeclaration*, HTMLElement*, InlineStyleRemovalMode = RemoveAttributesAndElements);
HTMLElement* highestAncestorWithConflictingInlineStyle(CSSMutableStyleDeclaration*, Node*);
- PassRefPtr<CSSMutableStyleDeclaration> extractInlineStyleToPushDown(Node*, bool isStyledElement, const Vector<int>&);
+ PassRefPtr<CSSMutableStyleDeclaration> extractInlineStyleToPushDown(CSSMutableStyleDeclaration*, Node*, bool isStyledElement);
void applyInlineStyleToPushDown(Node*, CSSMutableStyleDeclaration *style);
void pushDownInlineStyleAroundNode(CSSMutableStyleDeclaration*, Node*);
void removeInlineStyle(PassRefPtr<CSSMutableStyleDeclaration>, const Position& start, const Position& end);
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 3dd6e27..117292c 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -918,6 +918,56 @@ TriState Editor::selectionHasStyle(CSSStyleDeclaration* style) const
return state;
}
+
+static bool hasTransparentBackgroundColor(CSSStyleDeclaration* style)
+{
+ RefPtr<CSSValue> cssValue = style->getPropertyCSSValue(CSSPropertyBackgroundColor);
+ if (!cssValue)
+ return true;
+
+ if (!cssValue->isPrimitiveValue())
+ return false;
+ CSSPrimitiveValue* value = static_cast<CSSPrimitiveValue*>(cssValue.get());
+
+ if (value->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR)
+ return !alphaChannel(value->getRGBA32Value());
+
+ return value->getIdent() == CSSValueTransparent;
+}
+
+String Editor::selectionStartCSSPropertyValue(int propertyID)
+{
+ Node* nodeToRemove;
+ RefPtr<CSSStyleDeclaration> selectionStyle = m_frame->selectionComputedStyle(nodeToRemove);
+ if (!selectionStyle)
+ return String();
+
+ String value = selectionStyle->getPropertyValue(propertyID);
+
+ if (nodeToRemove) {
+ ExceptionCode ec = 0;
+ nodeToRemove->remove(ec);
+ ASSERT(!ec);
+ }
+
+ // If background color is transparent, traverse parent nodes until we hit a different value or document root
+ // Also, if the selection is a range, ignore the background color at the start of selection,
+ // and find the background color of the common ancestor.
+ if (propertyID == CSSPropertyBackgroundColor && (m_frame->selection()->isRange() || hasTransparentBackgroundColor(selectionStyle.get()))) {
+ RefPtr<Range> range(m_frame->selection()->toNormalizedRange());
+ ExceptionCode ec = 0;
+ for (Node* ancestor = range->commonAncestorContainer(ec); ancestor; ancestor = ancestor->parentNode()) {
+ selectionStyle = computedStyle(ancestor);
+ if (!hasTransparentBackgroundColor(selectionStyle.get())) {
+ value = selectionStyle->getPropertyValue(CSSPropertyBackgroundColor);
+ break;
+ }
+ }
+ }
+
+ return value;
+}
+
void Editor::indent()
{
applyCommand(IndentOutdentCommand::create(m_frame->document(), IndentOutdentCommand::Indent));
@@ -1003,11 +1053,16 @@ Editor::Editor(Frame* frame)
// This is off by default, since most editors want this behavior (this matches IE but not FF).
, m_shouldStyleWithCSS(false)
, m_killRing(adoptPtr(new KillRing))
-{
+ , m_correctionPanelTimer(this, &Editor::correctionPanelTimerFired)
+{
}
Editor::~Editor()
{
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (client())
+ client()->dismissCorrectionPanel(true);
+#endif
}
void Editor::clear()
@@ -2301,22 +2356,29 @@ bool Editor::spellingPanelIsShowing()
void Editor::markMisspellingsAfterTypingToPosition(const VisiblePosition &p)
{
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- bool markSpelling = isContinuousSpellCheckingEnabled();
- bool markGrammar = markSpelling && isGrammarCheckingEnabled();
- bool performTextCheckingReplacements = isAutomaticQuoteSubstitutionEnabled()
- || isAutomaticLinkDetectionEnabled()
- || isAutomaticDashSubstitutionEnabled()
- || isAutomaticTextReplacementEnabled()
- || (markSpelling && isAutomaticSpellingCorrectionEnabled());
- if (!markSpelling && !performTextCheckingReplacements)
+ TextCheckingOptions textCheckingOptions = 0;
+ if (isContinuousSpellCheckingEnabled())
+ textCheckingOptions |= MarkSpelling;
+
+ if (isAutomaticQuoteSubstitutionEnabled()
+ || isAutomaticLinkDetectionEnabled()
+ || isAutomaticDashSubstitutionEnabled()
+ || isAutomaticTextReplacementEnabled()
+ || ((textCheckingOptions & MarkSpelling) && isAutomaticSpellingCorrectionEnabled()))
+ textCheckingOptions |= PerformReplacement;
+
+ if (!textCheckingOptions & (MarkSpelling | PerformReplacement))
return;
-
+
+ if (isGrammarCheckingEnabled())
+ textCheckingOptions |= MarkGrammar;
+
VisibleSelection adjacentWords = VisibleSelection(startOfWord(p, LeftWordIfOnBoundary), endOfWord(p, RightWordIfOnBoundary));
- if (markGrammar) {
+ if (textCheckingOptions & MarkGrammar) {
VisibleSelection selectedSentence = VisibleSelection(startOfSentence(p), endOfSentence(p));
- markAllMisspellingsAndBadGrammarInRanges(true, adjacentWords.toNormalizedRange().get(), true, selectedSentence.toNormalizedRange().get(), performTextCheckingReplacements);
+ markAllMisspellingsAndBadGrammarInRanges(textCheckingOptions, adjacentWords.toNormalizedRange().get(), selectedSentence.toNormalizedRange().get());
} else {
- markAllMisspellingsAndBadGrammarInRanges(markSpelling, adjacentWords.toNormalizedRange().get(), false, adjacentWords.toNormalizedRange().get(), performTextCheckingReplacements);
+ markAllMisspellingsAndBadGrammarInRanges(textCheckingOptions, adjacentWords.toNormalizedRange().get(), adjacentWords.toNormalizedRange().get());
}
#else
if (!isContinuousSpellCheckingEnabled())
@@ -2460,13 +2522,18 @@ static inline bool isAmbiguousBoundaryCharacter(UChar character)
return character == '\'' || character == rightSingleQuotationMark || character == hebrewPunctuationGershayim;
}
-void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range* spellingRange, bool markGrammar, Range* grammarRange, bool performTextCheckingReplacements)
+void Editor::markAllMisspellingsAndBadGrammarInRanges(TextCheckingOptions textCheckingOptions, Range* spellingRange, Range* grammarRange)
{
+ bool shouldMarkSpelling = textCheckingOptions & MarkSpelling;
+ bool shouldMarkGrammar = textCheckingOptions & MarkGrammar;
+ bool shouldPerformReplacement = textCheckingOptions & PerformReplacement;
+ bool shouldShowCorrectionPanel = textCheckingOptions & ShowCorrectionPanel;
+
// This function is called with selections already expanded to word boundaries.
ExceptionCode ec = 0;
- if (!client() || !spellingRange || (markGrammar && !grammarRange))
+ if (!client() || !spellingRange || (shouldMarkGrammar && !grammarRange))
return;
-
+
// If we're not in an editable node, bail.
Node* editableNode = spellingRange->startContainer();
if (!editableNode || !editableNode->isContentEditable())
@@ -2489,8 +2556,8 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
bool adjustSelectionForParagraphBoundaries = false;
String paragraphString;
RefPtr<Range> paragraphRange;
-
- if (markGrammar) {
+
+ if (shouldMarkGrammar) {
// The spelling range should be contained in the paragraph-aligned extension of the grammar range.
paragraphRange = paragraphAlignedRangeForRange(grammarRange, grammarRangeStartOffset, paragraphString);
RefPtr<Range> offsetAsRange = Range::create(paragraphRange->startContainer(ec)->document(), paragraphRange->startPosition(), spellingRange->startPosition());
@@ -2501,10 +2568,10 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
}
spellingRangeEndOffset = spellingRangeStartOffset + TextIterator::rangeLength(spellingRange);
paragraphLength = paragraphString.length();
- if (paragraphLength <= 0 || (spellingRangeStartOffset >= spellingRangeEndOffset && (!markGrammar || grammarRangeStartOffset >= grammarRangeEndOffset)))
+ if (paragraphLength <= 0 || (spellingRangeStartOffset >= spellingRangeEndOffset && (!shouldMarkGrammar || grammarRangeStartOffset >= grammarRangeEndOffset)))
return;
-
- if (performTextCheckingReplacements) {
+
+ if (shouldPerformReplacement) {
if (m_frame->selection()->selectionType() == VisibleSelection::CaretSelection) {
// Attempt to save the caret position so we can restore it later if needed
RefPtr<Range> offsetAsRange = Range::create(paragraphRange->startContainer(ec)->document(), paragraphRange->startPosition(), paragraphRange->startPosition());
@@ -2520,14 +2587,16 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
}
}
}
-
+
Vector<TextCheckingResult> results;
uint64_t checkingTypes = 0;
- if (markSpelling)
+ if (shouldMarkSpelling)
checkingTypes |= TextCheckingTypeSpelling;
- if (markGrammar)
+ if (shouldMarkGrammar)
checkingTypes |= TextCheckingTypeGrammar;
- if (performTextCheckingReplacements) {
+ if (shouldShowCorrectionPanel)
+ checkingTypes |= TextCheckingTypeCorrection;
+ if (shouldPerformReplacement) {
if (isAutomaticLinkDetectionEnabled())
checkingTypes |= TextCheckingTypeLink;
if (isAutomaticQuoteSubstitutionEnabled())
@@ -2536,20 +2605,26 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
checkingTypes |= TextCheckingTypeDash;
if (isAutomaticTextReplacementEnabled())
checkingTypes |= TextCheckingTypeReplacement;
- if (markSpelling && isAutomaticSpellingCorrectionEnabled())
+ if (shouldMarkSpelling && isAutomaticSpellingCorrectionEnabled())
checkingTypes |= TextCheckingTypeCorrection;
}
client()->checkTextOfParagraph(paragraphString.characters(), paragraphLength, checkingTypes, results);
-
+
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ // If this checking is only for showing correction panel, we shouldn't bother to mark misspellings.
+ if (shouldShowCorrectionPanel)
+ shouldMarkSpelling = false;
+#endif
+
for (unsigned i = 0; i < results.size(); i++) {
const TextCheckingResult* result = &results[i];
int resultLocation = result->location + offsetDueToReplacement;
int resultLength = result->length;
- if (markSpelling && result->type == TextCheckingTypeSpelling && resultLocation >= spellingRangeStartOffset && resultLocation + resultLength <= spellingRangeEndOffset) {
+ if (shouldMarkSpelling && result->type == TextCheckingTypeSpelling && resultLocation >= spellingRangeStartOffset && resultLocation + resultLength <= spellingRangeEndOffset) {
ASSERT(resultLength > 0 && resultLocation >= 0);
RefPtr<Range> misspellingRange = TextIterator::subrange(spellingRange, resultLocation - spellingRangeStartOffset, resultLength);
misspellingRange->startContainer(ec)->document()->markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling);
- } else if (markGrammar && result->type == TextCheckingTypeGrammar && resultLocation < grammarRangeEndOffset && resultLocation + resultLength > grammarRangeStartOffset) {
+ } else if (shouldMarkGrammar && result->type == TextCheckingTypeGrammar && resultLocation < grammarRangeEndOffset && resultLocation + resultLength > grammarRangeStartOffset) {
ASSERT(resultLength > 0 && resultLocation >= 0);
for (unsigned j = 0; j < result->details.size(); j++) {
const GrammarDetail* detail = &result->details[j];
@@ -2559,7 +2634,7 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
grammarRange->startContainer(ec)->document()->markers()->addMarker(badGrammarRange.get(), DocumentMarker::Grammar, detail->userDescription);
}
}
- } else if (performTextCheckingReplacements && resultLocation + resultLength <= spellingRangeEndOffset && resultLocation + resultLength >= spellingRangeStartOffset
+ } else if ((shouldPerformReplacement || shouldShowCorrectionPanel) && resultLocation + resultLength <= spellingRangeEndOffset && resultLocation + resultLength >= spellingRangeStartOffset
&& (result->type == TextCheckingTypeLink
|| result->type == TextCheckingTypeQuote
|| result->type == TextCheckingTypeDash
@@ -2590,7 +2665,7 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
size_t markerCount = markers.size();
for (size_t i = 0; i < markerCount; ++i) {
const DocumentMarker& marker = markers[i];
- if (marker.type == DocumentMarker::Replacement && static_cast<int>(marker.startOffset) < endOffset && static_cast<int>(marker.endOffset) > startOffset) {
+ if ((marker.type == DocumentMarker::Replacement || marker.type == DocumentMarker::RejectedCorrection) && static_cast<int>(marker.startOffset) < endOffset && static_cast<int>(marker.endOffset) > startOffset) {
doReplacement = false;
break;
}
@@ -2598,7 +2673,7 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
break;
}
}
- if (doReplacement && selectionToReplace != m_frame->selection()->selection()) {
+ if (doReplacement && !shouldShowCorrectionPanel && selectionToReplace != m_frame->selection()->selection()) {
if (m_frame->shouldChangeSelection(selectionToReplace)) {
m_frame->selection()->setSelection(selectionToReplace);
selectionChanged = true;
@@ -2606,30 +2681,52 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range*
doReplacement = false;
}
}
+
+ String replacedString;
if (doReplacement) {
if (result->type == TextCheckingTypeLink) {
restoreSelectionAfterChange = false;
if (canEditRichly())
applyCommand(CreateLinkCommand::create(m_frame->document(), result->replacement));
} else if (canEdit() && shouldInsertText(result->replacement, rangeToReplace.get(), EditorInsertActionTyped)) {
- String replacedString;
if (result->type == TextCheckingTypeCorrection)
replacedString = plainText(rangeToReplace.get());
- replaceSelectionWithText(result->replacement, false, false);
- spellingRangeEndOffset += replacementLength - resultLength;
- offsetDueToReplacement += replacementLength - resultLength;
- if (resultLocation < selectionOffset)
- selectionOffset += replacementLength - resultLength;
- if (result->type == TextCheckingTypeCorrection) {
- // Add a marker so that corrections can easily be undone and won't be re-corrected.
- RefPtr<Range> replacedRange = TextIterator::subrange(paragraphRange.get(), resultLocation, replacementLength);
- replacedRange->startContainer()->document()->markers()->addMarker(replacedRange.get(), DocumentMarker::Replacement, replacedString);
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (shouldShowCorrectionPanel && resultLocation + resultLength == spellingRangeEndOffset && result->type == TextCheckingTypeCorrection) {
+ // We only show the correction panel on the last word.
+ Vector<FloatQuad> textQuads;
+ rangeToReplace->textQuads(textQuads);
+ Vector<FloatQuad>::const_iterator end = textQuads.end();
+ FloatRect totalBoundingBox;
+ for (Vector<FloatQuad>::const_iterator it = textQuads.begin(); it < end; ++it)
+ totalBoundingBox.unite(it->boundingBox());
+ m_rangeToBeReplacedByCorrection = rangeToReplace;
+ m_stringToBeReplacedByCorrection = replacedString;
+ client()->showCorrectionPanel(totalBoundingBox, m_stringToBeReplacedByCorrection, result->replacement, this);
+ doReplacement = false;
+ }
+#endif
+ if (doReplacement) {
+ replaceSelectionWithText(result->replacement, false, false);
+ spellingRangeEndOffset += replacementLength - resultLength;
+ offsetDueToReplacement += replacementLength - resultLength;
+ if (resultLocation < selectionOffset)
+ selectionOffset += replacementLength - resultLength;
+ if (result->type == TextCheckingTypeCorrection) {
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (client())
+ client()->dismissCorrectionPanel(true);
+#endif
+ // Add a marker so that corrections can easily be undone and won't be re-corrected.
+ RefPtr<Range> replacedRange = TextIterator::subrange(paragraphRange.get(), resultLocation, replacementLength);
+ replacedRange->startContainer()->document()->markers()->addMarker(replacedRange.get(), DocumentMarker::Replacement, replacedString);
+ }
}
}
}
}
}
-
+
if (selectionChanged) {
// Restore the caret position if we have made any replacements
setEnd(paragraphRange.get(), endOfParagraph(startOfNextParagraph(paragraphRange->startPosition())));
@@ -2671,7 +2768,10 @@ void Editor::markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelec
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
if (!isContinuousSpellCheckingEnabled())
return;
- markAllMisspellingsAndBadGrammarInRanges(true, spellingSelection.toNormalizedRange().get(), markGrammar && isGrammarCheckingEnabled(), grammarSelection.toNormalizedRange().get(), false);
+ TextCheckingOptions textCheckingOptions = MarkSpelling;
+ if (markGrammar && isGrammarCheckingEnabled())
+ textCheckingOptions |= MarkGrammar;
+ markAllMisspellingsAndBadGrammarInRanges(textCheckingOptions, spellingSelection.toNormalizedRange().get(), grammarSelection.toNormalizedRange().get());
#else
RefPtr<Range> firstMisspellingRange;
markMisspellings(spellingSelection, firstMisspellingRange);
@@ -2680,6 +2780,45 @@ void Editor::markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelec
#endif
}
+void Editor::correctionPanelTimerFired(Timer<Editor>*)
+{
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ VisibleSelection selection(frame()->selection()->selection());
+ VisiblePosition start(selection.start(), selection.affinity());
+ VisiblePosition p = startOfWord(start, LeftWordIfOnBoundary);
+ VisibleSelection adjacentWords = VisibleSelection(p, start);
+ markAllMisspellingsAndBadGrammarInRanges(MarkSpelling | ShowCorrectionPanel, adjacentWords.toNormalizedRange().get(), 0);
+#endif
+}
+
+void Editor::handleRejectedCorrection()
+{
+ Range* replacedRange = m_rangeToBeReplacedByCorrection.get();
+ if (!replacedRange || m_frame->document() != replacedRange->ownerDocument())
+ return;
+
+ replacedRange->startContainer()->document()->markers()->addMarker(replacedRange, DocumentMarker::RejectedCorrection, m_stringToBeReplacedByCorrection);
+}
+
+void Editor::startCorrectionPanelTimer()
+{
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ static const double correctionPanelTimerInterval = 0.3;
+ if (client())
+ client()->dismissCorrectionPanel(true);
+ if (isAutomaticSpellingCorrectionEnabled())
+ m_correctionPanelTimer.startOneShot(correctionPanelTimerInterval);
+#endif
+}
+
+void Editor::handleCancelOperation()
+{
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ if (client())
+ client()->dismissCorrectionPanel(false);
+#endif
+}
+
PassRefPtr<Range> Editor::rangeForPoint(const IntPoint& windowPoint)
{
Document* document = m_frame->documentAtPoint(windowPoint);
diff --git a/WebCore/editing/Editor.h b/WebCore/editing/Editor.h
index 83aef7e..78e89b4 100644
--- a/WebCore/editing/Editor.h
+++ b/WebCore/editing/Editor.h
@@ -119,6 +119,7 @@ public:
void respondToChangedContents(const VisibleSelection& endingSelection);
TriState selectionHasStyle(CSSStyleDeclaration*) const;
+ String selectionStartCSSPropertyValue(int propertyID);
const SimpleFontData* fontForSelection(bool&) const;
WritingDirection textDirectionForSelection(bool&) const;
@@ -223,7 +224,15 @@ public:
void toggleAutomaticTextReplacement();
bool isAutomaticSpellingCorrectionEnabled();
void toggleAutomaticSpellingCorrection();
- void markAllMisspellingsAndBadGrammarInRanges(bool markSpelling, Range* spellingRange, bool markGrammar, Range* grammarRange, bool performTextCheckingReplacements);
+ enum TextCheckingOptionFlags {
+ MarkSpelling = 1 << 0,
+ MarkGrammar = 1 << 1,
+ PerformReplacement = 1 << 2,
+ ShowCorrectionPanel = 1 << 3,
+ };
+ typedef unsigned TextCheckingOptions;
+
+ void markAllMisspellingsAndBadGrammarInRanges(TextCheckingOptions, Range* spellingRange, Range* grammarRange);
void changeBackToReplacedString(const String& replacedString);
#endif
void advanceToNextMisspelling(bool startBeforeSelection = false);
@@ -293,9 +302,13 @@ public:
bool insideVisibleArea(const IntPoint&) const;
bool insideVisibleArea(Range*) const;
PassRefPtr<Range> nextVisibleRange(Range*, const String&, bool forward, bool caseFlag, bool wrapFlag);
-
+
void addToKillRing(Range*, bool prepend);
+ void handleCancelOperation();
+ void startCorrectionPanelTimer();
+ void handleRejectedCorrection();
+
void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool matchStyle);
void pasteAsPlainText(const String&, bool smartReplace);
@@ -317,6 +330,9 @@ private:
bool m_shouldStartNewKillRingSequence;
bool m_shouldStyleWithCSS;
OwnPtr<KillRing> m_killRing;
+ RefPtr<Range> m_rangeToBeReplacedByCorrection;
+ String m_stringToBeReplacedByCorrection;
+ Timer<Editor> m_correctionPanelTimer;
bool canDeleteRange(Range*) const;
bool canSmartReplaceWithPasteboard(Pasteboard*);
@@ -334,8 +350,9 @@ private:
PassRefPtr<Range> firstVisibleRange(const String&, bool caseFlag);
PassRefPtr<Range> lastVisibleRange(const String&, bool caseFlag);
-
+
void changeSelectionAfterCommand(const VisibleSelection& newSelection, bool closeTyping, bool clearTypingStyle);
+ void correctionPanelTimerFired(Timer<Editor>*);
Node* findEventTargetFromSelection() const;
};
diff --git a/WebCore/editing/EditorCommand.cpp b/WebCore/editing/EditorCommand.cpp
index eb89593..4b8da0e 100644
--- a/WebCore/editing/EditorCommand.cpp
+++ b/WebCore/editing/EditorCommand.cpp
@@ -239,7 +239,9 @@ static TriState stateStyle(Frame* frame, int propertyID, const char* desiredValu
static String valueStyle(Frame* frame, int propertyID)
{
- return frame->selectionStartStylePropertyValue(propertyID);
+ // FIXME: Rather than retrieving the style at the start of the current selection,
+ // we should retrieve the style present throughout the selection for non-Mac platforms.
+ return frame->editor()->selectionStartCSSPropertyValue(propertyID);
}
static TriState stateTextWritingDirection(Frame* frame, WritingDirection direction)
@@ -1067,6 +1069,14 @@ static bool executeYankAndSelect(Frame* frame, Event*, EditorCommandSource, cons
return true;
}
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+static bool executeCancelOperation(Frame* frame, Event*, EditorCommandSource, const String&)
+{
+ frame->editor()->handleCancelOperation();
+ return true;
+}
+#endif
+
// Supported functions
static bool supported(Frame*, EditorCommandSource)
@@ -1453,6 +1463,9 @@ static const CommandMap& createCommandMap()
{ "Unselect", { executeUnselect, supported, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "Yank", { executeYank, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
{ "YankAndSelect", { executeYankAndSelect, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ { "CancelOperation", { executeCancelOperation, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
+#endif
};
// These unsupported commands are listed here since they appear in the Microsoft
diff --git a/WebCore/editing/ReplaceSelectionCommand.cpp b/WebCore/editing/ReplaceSelectionCommand.cpp
index d497f30..38f3ed2 100644
--- a/WebCore/editing/ReplaceSelectionCommand.cpp
+++ b/WebCore/editing/ReplaceSelectionCommand.cpp
@@ -992,6 +992,12 @@ void ReplaceSelectionCommand::doApply()
if (shouldMergeStart(selectionStartWasStartOfParagraph, fragment.hasInterchangeNewlineAtStart(), startIsInsideMailBlockquote)) {
VisiblePosition destination = startOfInsertedContent.previous();
VisiblePosition startOfParagraphToMove = startOfInsertedContent;
+ // We need to handle the case where we need to merge the end
+ // but our destination node is inside an inline that is the last in the block.
+ // We insert a placeholder before the newly inserted content to avoid being merged into the inline.
+ Node* destinationNode = destination.deepEquivalent().node();
+ if (m_shouldMergeEnd && destinationNode != destinationNode->enclosingInlineElement() && destinationNode->enclosingInlineElement()->nextSibling())
+ insertNodeBefore(createBreakElement(document()), refNode.get());
// Merging the the first paragraph of inserted content with the content that came
// before the selection that was pasted into would also move content after
@@ -1115,7 +1121,7 @@ bool ReplaceSelectionCommand::shouldRemoveEndBR(Node* endBR, const VisiblePositi
return false;
// Remove the br if it is collapsed away and so is unnecessary.
- if (!document()->inStrictMode() && isEndOfBlock(visiblePos) && !isStartOfParagraph(visiblePos))
+ if (!document()->inNoQuirksMode() && isEndOfBlock(visiblePos) && !isStartOfParagraph(visiblePos))
return true;
// A br that was originally holding a line open should be displaced by inserted content or turned into a line break.
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index 3672e3e..97dde55 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -118,6 +118,7 @@ void SelectionController::setSelection(const VisibleSelection& s, bool closeTypi
m_selection = s;
m_caretRectNeedsUpdate = true;
invalidateCaretRect();
+ updateCaretRect();
return;
}
if (!m_frame) {
diff --git a/WebCore/editing/TextIterator.cpp b/WebCore/editing/TextIterator.cpp
index 57f9a3c..daba80e 100644
--- a/WebCore/editing/TextIterator.cpp
+++ b/WebCore/editing/TextIterator.cpp
@@ -522,7 +522,7 @@ void TextIterator::handleTextBox()
}
String str = renderer->text();
unsigned start = m_offset;
- unsigned end = (m_node == m_endContainer) ? m_endOffset : UINT_MAX;
+ unsigned end = (m_node == m_endContainer) ? static_cast<unsigned>(m_endOffset) : UINT_MAX;
while (m_textBox) {
unsigned textBoxStart = m_textBox->start();
unsigned runStart = max(textBoxStart, start);
diff --git a/WebCore/editing/TypingCommand.cpp b/WebCore/editing/TypingCommand.cpp
index ac865e5..81a6d5c 100644
--- a/WebCore/editing/TypingCommand.cpp
+++ b/WebCore/editing/TypingCommand.cpp
@@ -307,6 +307,10 @@ void TypingCommand::markMisspellingsAfterTyping()
VisiblePosition p2 = startOfWord(start, LeftWordIfOnBoundary);
if (p1 != p2)
document()->frame()->editor()->markMisspellingsAfterTypingToPosition(p1);
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ else
+ document()->frame()->editor()->startCorrectionPanelTimer();
+#endif
}
}
diff --git a/WebCore/editing/markup.cpp b/WebCore/editing/markup.cpp
index 1baf1bc..7bf85a4 100644
--- a/WebCore/editing/markup.cpp
+++ b/WebCore/editing/markup.cpp
@@ -91,6 +91,57 @@ private:
QualifiedName m_name;
String m_value;
};
+
+enum EntityMask {
+ EntityNone = 0x0000,
+ EntityAmp = 0x0001,
+ EntityLt = 0x0002,
+ EntityGt = 0x0004,
+ EntityQuot = 0x0008,
+ EntityNbsp = 0x0010,
+
+ EntityMaskInCDATA = EntityNone,
+ EntityMaskInPCDATA = EntityAmp | EntityLt | EntityGt,
+ EntityMaskInHTMLPCDATA = EntityMaskInPCDATA | EntityNbsp,
+ EntityMaskInAttributeValue = EntityAmp | EntityLt | EntityGt | EntityQuot,
+ EntityMaskInHTMLAttributeValue = EntityMaskInAttributeValue | EntityNbsp,
+};
+
+struct EntityDescription {
+ UChar entity;
+ const String& reference;
+ EntityMask mask;
+};
+
+static void appendCharactersReplacingEntities(Vector<UChar>& out, const UChar* content, size_t length, EntityMask entityMask)
+{
+ DEFINE_STATIC_LOCAL(const String, ampReference, ("&amp;"));
+ DEFINE_STATIC_LOCAL(const String, ltReference, ("&lt;"));
+ DEFINE_STATIC_LOCAL(const String, gtReference, ("&gt;"));
+ DEFINE_STATIC_LOCAL(const String, quotReference, ("&quot;"));
+ DEFINE_STATIC_LOCAL(const String, nbspReference, ("&nbsp;"));
+
+ static const EntityDescription entityMaps[] = {
+ { '&', ampReference, EntityAmp },
+ { '<', ltReference, EntityLt },
+ { '>', gtReference, EntityGt },
+ { '"', quotReference, EntityQuot },
+ { noBreakSpace, nbspReference, EntityNbsp },
+ };
+
+ size_t positionAfterLastEntity = 0;
+ for (size_t i = 0; i < length; i++) {
+ for (size_t m = 0; m < sizeof(entityMaps) / sizeof(EntityDescription); m++) {
+ if (content[i] == entityMaps[m].entity && entityMaps[m].mask & entityMask) {
+ out.append(content + positionAfterLastEntity, i - positionAfterLastEntity);
+ append(out, entityMaps[m].reference);
+ positionAfterLastEntity = i + 1;
+ break;
+ }
+ }
+ }
+ out.append(content + positionAfterLastEntity, length - positionAfterLastEntity);
+}
typedef HashMap<AtomicStringImpl*, AtomicStringImpl*> Namespaces;
@@ -113,12 +164,10 @@ public:
String takeResults();
private:
- void appendAttributeValue(Vector<UChar>& result, const String& attribute, bool escapeNBSP);
- String escapeContentText(const String&, bool escapeNBSP);
+ void appendAttributeValue(Vector<UChar>& result, const String& attribute, bool documentIsHTML);
void appendQuotedURLAttributeValue(Vector<UChar>& result, const String& urlString);
String stringValueForRange(const Node*, const Range*);
- pair<const UChar*, size_t> ucharRange(const Node*, const Range *);
- void appendUCharRange(Vector<UChar>& result, const pair<const UChar*, size_t>& range);
+ void appendNodeValue(Vector<UChar>& out, const Node*, const Range*, EntityMask);
String renderedText(const Node*, const Range*);
bool shouldAddNamespaceElement(const Element*);
bool shouldAddNamespaceAttribute(const Attribute*, Namespaces&);
@@ -221,100 +270,10 @@ String MarkupAccumulator::takeResults()
return String::adopt(result);
}
-void MarkupAccumulator::appendAttributeValue(Vector<UChar>& result, const String& attribute, bool escapeNBSP)
+void MarkupAccumulator::appendAttributeValue(Vector<UChar>& result, const String& attribute, bool documentIsHTML)
{
- const UChar* uchars = attribute.characters();
- unsigned len = attribute.length();
- unsigned lastCopiedFrom = 0;
-
- DEFINE_STATIC_LOCAL(const String, ampEntity, ("&amp;"));
- DEFINE_STATIC_LOCAL(const String, gtEntity, ("&gt;"));
- DEFINE_STATIC_LOCAL(const String, ltEntity, ("&lt;"));
- DEFINE_STATIC_LOCAL(const String, quotEntity, ("&quot;"));
- DEFINE_STATIC_LOCAL(const String, nbspEntity, ("&nbsp;"));
-
- for (unsigned i = 0; i < len; ++i) {
- UChar c = uchars[i];
- switch (c) {
- case '&':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, ampEntity);
- lastCopiedFrom = i + 1;
- break;
- case '<':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, ltEntity);
- lastCopiedFrom = i + 1;
- break;
- case '>':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, gtEntity);
- lastCopiedFrom = i + 1;
- break;
- case '"':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, quotEntity);
- lastCopiedFrom = i + 1;
- break;
- case noBreakSpace:
- if (!escapeNBSP)
- break;
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, nbspEntity);
- lastCopiedFrom = i + 1;
- }
- }
-
- result.append(uchars + lastCopiedFrom, len - lastCopiedFrom);
-}
-
-static void appendEscapedContent(Vector<UChar>& result, pair<const UChar*, size_t> range, bool escapeNBSP)
-{
- const UChar* uchars = range.first;
- unsigned len = range.second;
- unsigned lastCopiedFrom = 0;
-
- DEFINE_STATIC_LOCAL(const String, ampEntity, ("&amp;"));
- DEFINE_STATIC_LOCAL(const String, gtEntity, ("&gt;"));
- DEFINE_STATIC_LOCAL(const String, ltEntity, ("&lt;"));
- DEFINE_STATIC_LOCAL(const String, nbspEntity, ("&nbsp;"));
-
- for (unsigned i = 0; i < len; ++i) {
- UChar c = uchars[i];
- switch (c) {
- case '&':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, ampEntity);
- lastCopiedFrom = i + 1;
- break;
- case '<':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, ltEntity);
- lastCopiedFrom = i + 1;
- break;
- case '>':
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, gtEntity);
- lastCopiedFrom = i + 1;
- break;
- case noBreakSpace:
- if (!escapeNBSP)
- break;
- result.append(uchars + lastCopiedFrom, i - lastCopiedFrom);
- append(result, nbspEntity);
- lastCopiedFrom = i + 1;
- break;
- }
- }
-
- result.append(uchars + lastCopiedFrom, len - lastCopiedFrom);
-}
-
-String MarkupAccumulator::escapeContentText(const String& in, bool escapeNBSP)
-{
- Vector<UChar> buffer;
- appendEscapedContent(buffer, make_pair(in.characters(), in.length()), escapeNBSP);
- return String::adopt(buffer);
+ appendCharactersReplacingEntities(result, attribute.characters(), attribute.length(),
+ documentIsHTML ? EntityMaskInHTMLAttributeValue : EntityMaskInAttributeValue);
}
void MarkupAccumulator::appendQuotedURLAttributeValue(Vector<UChar>& result, const String& urlString)
@@ -355,7 +314,7 @@ String MarkupAccumulator::stringValueForRange(const Node* node, const Range* ran
return str;
}
-pair<const UChar*, size_t> MarkupAccumulator::ucharRange(const Node* node, const Range* range)
+void MarkupAccumulator::appendNodeValue(Vector<UChar>& out, const Node* node, const Range* range, EntityMask entityMask)
{
String str = node->nodeValue();
const UChar* characters = str.characters();
@@ -372,12 +331,7 @@ pair<const UChar*, size_t> MarkupAccumulator::ucharRange(const Node* node, const
}
}
- return make_pair(characters, length);
-}
-
-void MarkupAccumulator::appendUCharRange(Vector<UChar>& result, const pair<const UChar*, size_t>& range)
-{
- result.append(range.first, range.second);
+ appendCharactersReplacingEntities(out, characters, length, entityMask);
}
String MarkupAccumulator::renderedText(const Node* node, const Range* range)
@@ -492,19 +446,20 @@ void MarkupAccumulator::appendText(Vector<UChar>& out, Text* text)
parentName = &static_cast<Element*>(text->parentElement())->tagQName();
if (parentName && (*parentName == scriptTag || *parentName == styleTag || *parentName == xmpTag)) {
- appendUCharRange(out, ucharRange(text, m_range));
+ appendNodeValue(out, text, m_range, EntityMaskInCDATA);
return;
}
if (!shouldAnnotate() || (parentName && *parentName == textareaTag)) {
- appendEscapedContent(out, ucharRange(text, m_range), text->document()->isHTMLDocument());
+ appendNodeValue(out, text, m_range, text->document()->isHTMLDocument() ? EntityMaskInHTMLPCDATA : EntityMaskInPCDATA);
return;
}
bool useRenderedText = !enclosingNodeWithTag(Position(text, 0), selectTag);
- String markup = escapeContentText(useRenderedText ? renderedText(text, m_range) : stringValueForRange(text, m_range), false);
- markup = convertHTMLTextToInterchangeFormat(markup, text);
- append(out, markup);
+ String content = useRenderedText ? renderedText(text, m_range) : stringValueForRange(text, m_range);
+ Vector<UChar> buffer;
+ appendCharactersReplacingEntities(buffer, content.characters(), content.length(), EntityMaskInPCDATA);
+ append(out, convertHTMLTextToInterchangeFormat(String::adopt(buffer), text));
}
void MarkupAccumulator::appendComment(Vector<UChar>& out, const String& comment)
@@ -1355,7 +1310,7 @@ String urlToMarkup(const KURL& url, const String& title)
append(markup, "<a href=\"");
append(markup, url.string());
append(markup, "\">");
- appendEscapedContent(markup, make_pair(title.characters(), title.length()), false);
+ appendCharactersReplacingEntities(markup, title.characters(), title.length(), EntityMaskInPCDATA);
append(markup, "</a>");
return String::adopt(markup);
}
diff --git a/WebCore/fileapi/AsyncFileWriter.h b/WebCore/fileapi/AsyncFileWriter.h
new file mode 100644
index 0000000..cdb815c
--- /dev/null
+++ b/WebCore/fileapi/AsyncFileWriter.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.
+ * * 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 AsyncFileWriter_h
+#define AsyncFileWriter_h
+
+#if ENABLE(FILE_WRITER)
+
+#include "PlatformString.h"
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Blob;
+class FileWriterClient;
+
+class AsyncFileWriter {
+public:
+ virtual ~AsyncFileWriter() {}
+
+ virtual void setFileWriterClient(FileWriterClient* client) = 0;
+
+ virtual void write(long long position, Blob* data) = 0;
+ virtual void truncate(long long length) = 0;
+ virtual void abort() = 0;
+};
+
+} // namespace
+
+#endif // ENABLE(FILE_WRITER)
+
+#endif // AsyncFileWriter_h
+
diff --git a/WebCore/html/Blob.cpp b/WebCore/fileapi/Blob.cpp
index 3a62ab1..5fed327 100644
--- a/WebCore/html/Blob.cpp
+++ b/WebCore/fileapi/Blob.cpp
@@ -31,51 +31,19 @@
#include "config.h"
#include "Blob.h"
-#include "BlobData.h"
-#include "BlobItem.h"
#include "BlobURL.h"
-#include "FileSystem.h"
+#include "File.h"
#include "ScriptExecutionContext.h"
#include "ThreadableBlobRegistry.h"
namespace WebCore {
-// FIXME: To be removed when we switch to using BlobData.
-Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const String& type, const BlobItemList& items)
- : m_scriptExecutionContext(scriptExecutionContext)
- , m_type(type)
- , m_size(0)
-{
- m_scriptExecutionContext->addBlob(this);
- for (size_t i = 0; i < items.size(); ++i)
- m_items.append(items[i]);
-}
-
-// FIXME: To be removed when we switch to using BlobData.
-Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const PassRefPtr<BlobItem>& item)
- : m_scriptExecutionContext(scriptExecutionContext)
- , m_size(0)
-{
- m_scriptExecutionContext->addBlob(this);
- m_items.append(item);
-}
-
-// FIXME: To be removed when we switch to using BlobData.
-Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const String& path)
- : m_scriptExecutionContext(scriptExecutionContext)
- , m_size(0)
-{
- m_scriptExecutionContext->addBlob(this);
- // Note: this doesn't initialize the type unlike File(path).
- m_items.append(FileBlobItem::create(path));
-}
-
Blob::Blob(ScriptExecutionContext* scriptExecutionContext, PassOwnPtr<BlobData> blobData, long long size)
: m_scriptExecutionContext(scriptExecutionContext)
, m_type(blobData->contentType())
, m_size(size)
{
- ASSERT(blobData.get() && !blobData->items().isEmpty());
+ ASSERT(blobData);
m_scriptExecutionContext->addBlob(this);
@@ -89,11 +57,7 @@ Blob::Blob(ScriptExecutionContext* scriptExecutionContext, const KURL& srcURL, c
, m_type(type)
, m_size(size)
{
- m_scriptExecutionContext->addBlob(this);
-
- // FIXME: To be removed when we switch to using BlobData.
- if (srcURL.isEmpty())
- return;
+ m_scriptExecutionContext->addBlob(this);
// Create a new internal URL and register it with the same blob data as the source URL.
m_url = BlobURL::createURL(scriptExecutionContext);
@@ -118,50 +82,42 @@ void Blob::contextDestroyed()
m_scriptExecutionContext = 0;
}
-unsigned long long Blob::size() const
-{
- // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to
- // come up with an exception to throw if file size is not represetable.
- unsigned long long size = 0;
- for (size_t i = 0; i < m_items.size(); ++i)
- size += m_items[i]->size();
- return size;
-}
-
-// FIXME: To be removed when we switch to using BlobData.
-const String& Blob::path() const
-{
- ASSERT(m_items.size() == 1 && m_items[0]->toFileBlobItem());
- return m_items[0]->toFileBlobItem()->path();
-}
-
#if ENABLE(BLOB)
PassRefPtr<Blob> Blob::slice(ScriptExecutionContext* scriptExecutionContext, long long start, long long length, const String& contentType) const
{
+ // When we slice a file for the first time, we obtain a snapshot of the file by capturing its current size and modification time.
+ // The modification time will be used to verify if the file has been changed or not, when the underlying data are accessed.
+ long long size;
+ double modificationTime;
+ if (isFile())
+ // FIXME: This involves synchronous file operation. We need to figure out how to make it asynchronous.
+ static_cast<const File*>(this)->captureSnapshot(size, modificationTime);
+ else {
+ ASSERT(m_size != -1);
+ size = m_size;
+ }
+
+ // Clamp the range if it exceeds the size limit.
if (start < 0)
start = 0;
if (length < 0)
length = 0;
- // Clamp the range if it exceeds the size limit.
- unsigned long long totalSize = size();
- if (static_cast<unsigned long long>(start) > totalSize) {
+ if (start >= size) {
start = 0;
length = 0;
- } else if (static_cast<unsigned long long>(start + length) > totalSize)
- length = totalSize - start;
-
- size_t i = 0;
- BlobItemList items;
- for (; i < m_items.size() && static_cast<unsigned long long>(start) >= m_items[i]->size(); ++i)
- start -= m_items[i]->size();
- for (; length > 0 && i < m_items.size(); ++i) {
- items.append(m_items[i]->slice(start, length));
- length -= items.last()->size();
- start = 0;
- }
- return Blob::create(scriptExecutionContext, contentType, items);
+ } else if (start + length > size)
+ length = size - start;
+
+ OwnPtr<BlobData> blobData = BlobData::create();
+ blobData->setContentType(contentType);
+ if (isFile())
+ blobData->appendFile(static_cast<const File*>(this)->path(), start, length, modificationTime);
+ else
+ blobData->appendBlob(m_url, start, length);
+
+ return Blob::create(scriptExecutionContext, blobData.release(), length);
}
-#endif // ENABLE(BLOB)
+#endif
} // namespace WebCore
diff --git a/WebCore/html/Blob.h b/WebCore/fileapi/Blob.h
index 374a401..0d5649c 100644
--- a/WebCore/html/Blob.h
+++ b/WebCore/fileapi/Blob.h
@@ -31,7 +31,7 @@
#ifndef Blob_h
#define Blob_h
-#include "BlobItem.h"
+#include "BlobData.h"
#include "KURL.h"
#include "PlatformString.h"
#include <wtf/PassOwnPtr.h>
@@ -41,15 +41,13 @@
namespace WebCore {
-class BlobData;
class ScriptExecutionContext;
class Blob : public RefCounted<Blob> {
public:
- // FIXME: To be removed when we switch to using BlobData.
- static PassRefPtr<Blob> create(ScriptExecutionContext* scriptExecutionContext, const String& type, const BlobItemList& items)
+ static PassRefPtr<Blob> create(ScriptExecutionContext* scriptExecutionContext, PassOwnPtr<BlobData> blobData, long long size)
{
- return adoptRef(new Blob(scriptExecutionContext, type, items));
+ return adoptRef(new Blob(scriptExecutionContext, blobData, size));
}
// For deserialization.
@@ -63,38 +61,25 @@ public:
void contextDestroyed();
const KURL& url() const { return m_url; }
- unsigned long long size() const;
const String& type() const { return m_type; }
- virtual bool isFile() const { return false; }
-
- // FIXME: To be removed when we switch to using BlobData.
- const String& path() const;
- // FIXME: To be removed when we switch to using BlobData.
- const BlobItemList& items() const { return m_items; }
+ virtual unsigned long long size() const { return static_cast<unsigned long long>(m_size); }
+ virtual bool isFile() const { return false; }
#if ENABLE(BLOB)
PassRefPtr<Blob> slice(ScriptExecutionContext*, long long start, long long length, const String& contentType = String()) const;
#endif
protected:
- // FIXME: To be removed when we switch to using BlobData.
- Blob(ScriptExecutionContext*, const String& type, const BlobItemList&);
- Blob(ScriptExecutionContext*, const PassRefPtr<BlobItem>&);
- Blob(ScriptExecutionContext*, const String& path);
-
Blob(ScriptExecutionContext*, PassOwnPtr<BlobData>, long long size);
// For deserialization.
Blob(ScriptExecutionContext*, const KURL& srcURL, const String& type, long long size);
- // FIXME: To be removed when we switch to using BlobData.
- BlobItemList m_items;
-
// This is an internal URL referring to the blob data associated with this object.
// It is only used by FileReader to read the blob data via loading from the blob URL resource.
KURL m_url;
-
+
ScriptExecutionContext* m_scriptExecutionContext;
String m_type;
long long m_size;
diff --git a/WebCore/html/Blob.idl b/WebCore/fileapi/Blob.idl
index e063b6d..b220233 100644
--- a/WebCore/html/Blob.idl
+++ b/WebCore/fileapi/Blob.idl
@@ -30,7 +30,9 @@
module html {
- interface Blob {
+ interface [
+ NoStaticTables
+ ] Blob {
readonly attribute unsigned long long size;
readonly attribute DOMString type;
diff --git a/WebCore/html/BlobBuilder.cpp b/WebCore/fileapi/BlobBuilder.cpp
index 29a7595..e10df6b 100644
--- a/WebCore/html/BlobBuilder.cpp
+++ b/WebCore/fileapi/BlobBuilder.cpp
@@ -34,6 +34,7 @@
#include "Blob.h"
#include "ExceptionCode.h"
+#include "File.h"
#include "LineEnding.h"
#include "TextEncoding.h"
#include <wtf/text/AtomicString.h>
@@ -56,13 +57,38 @@ static CString convertToCString(const String& text, const String& endingType, Ex
return CString();
}
+static CString concatenateTwoCStrings(const CString& a, const CString& b)
+{
+ if (a.isNull() && b.isNull())
+ return CString();
+
+ char* q;
+ CString result = CString::newUninitialized(a.length() + b.length(), q);
+ if (a.length())
+ memcpy(q, a.data(), a.length());
+ if (b.length())
+ memcpy(q + a.length(), b.data(), b.length());
+ return result;
+}
+
+BlobBuilder::BlobBuilder()
+ : m_size(0)
+{
+}
+
bool BlobBuilder::append(const String& text, const String& endingType, ExceptionCode& ec)
{
CString cstr = convertToCString(text, endingType, ec);
if (ec)
return false;
- m_items.append(StringBlobItem::create(cstr));
+ m_size += cstr.length();
+
+ // If the last item is a string, concatenate it with current string.
+ if (!m_items.isEmpty() && m_items[m_items.size() - 1].type == BlobDataItem::Data)
+ m_items[m_items.size() - 1].data = concatenateTwoCStrings(m_items[m_items.size() - 1].data, cstr);
+ else
+ m_items.append(BlobDataItem(cstr));
return true;
}
@@ -73,17 +99,37 @@ bool BlobBuilder::append(const String& text, ExceptionCode& ec)
bool BlobBuilder::append(PassRefPtr<Blob> blob)
{
- if (blob) {
- for (size_t i = 0; i < blob->items().size(); ++i)
- m_items.append(blob->items()[i]);
- return true;
+ if (blob->isFile()) {
+ // If the blob is file that is not snapshoted, capture the snapshot now.
+ // FIXME: This involves synchronous file operation. We need to figure out how to make it asynchronous.
+ File* file = static_cast<File*>(blob.get());
+ long long snapshotSize;
+ double snapshotModificationTime;
+ file->captureSnapshot(snapshotSize, snapshotModificationTime);
+
+ m_size += snapshotSize;
+ m_items.append(BlobDataItem(file->path(), 0, snapshotSize, snapshotModificationTime));
+ } else {
+ long long blobSize = static_cast<long long>(blob->size());
+ m_size += blobSize;
+ m_items.append(BlobDataItem(blob->url(), 0, blobSize));
}
- return false;
+ return true;
}
-PassRefPtr<Blob> BlobBuilder::getBlob(ScriptExecutionContext* scriptExecutionContext, const String& contentType) const
+PassRefPtr<Blob> BlobBuilder::getBlob(ScriptExecutionContext* scriptExecutionContext, const String& contentType)
{
- return Blob::create(scriptExecutionContext, contentType, m_items);
+ OwnPtr<BlobData> blobData = BlobData::create();
+ blobData->setContentType(contentType);
+ blobData->swapItems(m_items);
+
+ RefPtr<Blob> blob = Blob::create(scriptExecutionContext, blobData.release(), m_size);
+
+ // After creating a blob from the current blob data, we do not need to keep the data around any more. Instead, we only
+ // need to keep a reference to the URL of the blob just created.
+ m_items.append(BlobDataItem(blob->url(), 0, m_size));
+
+ return blob;
}
} // namespace WebCore
diff --git a/WebCore/html/BlobBuilder.h b/WebCore/fileapi/BlobBuilder.h
index 5d1700f..20e510a 100644
--- a/WebCore/html/BlobBuilder.h
+++ b/WebCore/fileapi/BlobBuilder.h
@@ -31,14 +31,18 @@
#ifndef BlobBuilder_h
#define BlobBuilder_h
-#include "BlobItem.h"
+#include "BlobData.h"
+#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
+#include <wtf/Vector.h>
+#include <wtf/text/CString.h>
namespace WebCore {
class Blob;
class ScriptExecutionContext;
+class TextEncoding;
typedef int ExceptionCode;
@@ -50,10 +54,13 @@ public:
bool append(const String& text, ExceptionCode&);
bool append(const String& text, const String& ending, ExceptionCode&);
- PassRefPtr<Blob> getBlob(ScriptExecutionContext*, const String& contentType = String()) const;
+ PassRefPtr<Blob> getBlob(ScriptExecutionContext*, const String& contentType = String());
private:
- BlobItemList m_items;
+ BlobBuilder();
+
+ long long m_size;
+ BlobDataItemList m_items;
};
} // namespace WebCore
diff --git a/WebCore/html/BlobBuilder.idl b/WebCore/fileapi/BlobBuilder.idl
index 53c7add..53c7add 100644
--- a/WebCore/html/BlobBuilder.idl
+++ b/WebCore/fileapi/BlobBuilder.idl
diff --git a/WebCore/html/BlobURL.cpp b/WebCore/fileapi/BlobURL.cpp
index 610aac4..c5571a7 100644
--- a/WebCore/html/BlobURL.cpp
+++ b/WebCore/fileapi/BlobURL.cpp
@@ -63,4 +63,12 @@ KURL BlobURL::getOrigin(const KURL& url)
return KURL(ParsedURLString, decodeURLEscapeSequences(origin));
}
+String BlobURL::getIdentifier(const KURL& url)
+{
+ ASSERT(url.protocolIs("blob"));
+
+ unsigned startIndex = url.pathAfterLastSlash();
+ return url.string().substring(startIndex);
+}
+
} // namespace WebCore
diff --git a/WebCore/html/BlobURL.h b/WebCore/fileapi/BlobURL.h
index 2ce2c85..e73b771 100644
--- a/WebCore/html/BlobURL.h
+++ b/WebCore/fileapi/BlobURL.h
@@ -41,6 +41,7 @@ class BlobURL {
public:
static KURL createURL(ScriptExecutionContext*);
static KURL getOrigin(const KURL&);
+ static String getIdentifier(const KURL& url);
};
}
diff --git a/WebCore/storage/DOMFilePath.cpp b/WebCore/fileapi/DOMFilePath.cpp
index 2da057c..2da057c 100644
--- a/WebCore/storage/DOMFilePath.cpp
+++ b/WebCore/fileapi/DOMFilePath.cpp
diff --git a/WebCore/storage/DOMFilePath.h b/WebCore/fileapi/DOMFilePath.h
index 2f2bb23..2f2bb23 100644
--- a/WebCore/storage/DOMFilePath.h
+++ b/WebCore/fileapi/DOMFilePath.h
diff --git a/WebCore/fileapi/DOMFileSystem.cpp b/WebCore/fileapi/DOMFileSystem.cpp
new file mode 100644
index 0000000..f1b9342
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystem.cpp
@@ -0,0 +1,210 @@
+/*
+ * 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 "DOMFileSystem.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "DOMFilePath.h"
+#include "DirectoryEntry.h"
+#include "EntriesCallback.h"
+#include "Entry.h"
+#include "EntryCallback.h"
+#include "ErrorCallback.h"
+#include "FileError.h"
+#include "FileSystemCallbacks.h"
+#include "MetadataCallback.h"
+#include "ScriptExecutionContext.h"
+#include "VoidCallback.h"
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+
+DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ : ActiveDOMObject(context, this)
+ , m_name(name)
+ , m_asyncFileSystem(asyncFileSystem)
+{
+}
+
+DOMFileSystem::~DOMFileSystem()
+{
+}
+
+PassRefPtr<DirectoryEntry> DOMFileSystem::root()
+{
+ return DirectoryEntry::create(this, DOMFilePath::root);
+}
+
+void DOMFileSystem::stop()
+{
+ m_asyncFileSystem->stop();
+}
+
+bool DOMFileSystem::hasPendingActivity() const
+{
+ return m_asyncFileSystem->hasPendingActivity();
+}
+
+void DOMFileSystem::contextDestroyed()
+{
+ m_asyncFileSystem->stop();
+}
+
+void DOMFileSystem::getMetadata(const Entry* entry, PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ String platformPath = m_asyncFileSystem->virtualToPlatformPath(entry->fullPath());
+ m_asyncFileSystem->readMetadata(platformPath, new MetadataCallbacks(successCallback, errorCallback));
+}
+
+static bool checkValidityForForCopyOrMove(const Entry* src, Entry* parent, const String& newName)
+{
+ ASSERT(src);
+
+ if (!parent || !parent->isDirectory())
+ return false;
+
+ if (!newName.isEmpty() && !DOMFilePath::isValidName(newName))
+ return false;
+
+ // It is an error to try to copy or move an entry inside itself at any depth if it is a directory.
+ if (src->isDirectory() && DOMFilePath::isParentOf(src->fullPath(), parent->fullPath()))
+ return false;
+
+ // It is an error to copy or move an entry into its parent if a name different from its current one isn't provided.
+ if ((newName.isEmpty() || src->name() == newName) && DOMFilePath::getDirectory(src->fullPath()) == parent->fullPath())
+ return false;
+
+ return true;
+}
+
+void DOMFileSystem::move(const Entry* src, PassRefPtr<Entry> parent, const String& newName, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ if (!checkValidityForForCopyOrMove(src, parent.get(), newName)) {
+ scheduleCallback(scriptExecutionContext(), errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+ return;
+ }
+
+ String destPath = parent->fullPath();
+ if (!newName.isEmpty())
+ destPath = DOMFilePath::append(destPath, newName);
+ else
+ destPath = DOMFilePath::append(destPath, src->name());
+
+ String srcPlatformPath = m_asyncFileSystem->virtualToPlatformPath(src->fullPath());
+ String destPlatformPath = parent->filesystem()->asyncFileSystem()->virtualToPlatformPath(destPath);
+ m_asyncFileSystem->move(srcPlatformPath, destPlatformPath, new EntryCallbacks(successCallback, errorCallback, this, destPath, src->isDirectory()));
+}
+
+void DOMFileSystem::copy(const Entry* src, PassRefPtr<Entry> parent, const String& newName, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ if (!checkValidityForForCopyOrMove(src, parent.get(), newName)) {
+ scheduleCallback(scriptExecutionContext(), errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+ return;
+ }
+
+ String destPath = parent->fullPath();
+ if (!newName.isEmpty())
+ destPath = DOMFilePath::append(destPath, newName);
+ else
+ destPath = DOMFilePath::append(destPath, src->name());
+
+ String srcPlatformPath = m_asyncFileSystem->virtualToPlatformPath(src->fullPath());
+ String destPlatformPath = parent->filesystem()->asyncFileSystem()->virtualToPlatformPath(destPath);
+ m_asyncFileSystem->copy(srcPlatformPath, destPlatformPath, new EntryCallbacks(successCallback, errorCallback, this, destPath, src->isDirectory()));
+}
+
+void DOMFileSystem::remove(const Entry* entry, PassRefPtr<VoidCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(entry);
+ String platformPath = m_asyncFileSystem->virtualToPlatformPath(entry->fullPath());
+ m_asyncFileSystem->remove(platformPath, new VoidCallbacks(successCallback, errorCallback));
+}
+
+void DOMFileSystem::getParent(const Entry* entry, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(entry);
+ String path = DOMFilePath::getDirectory(entry->fullPath());
+ String platformPath = m_asyncFileSystem->virtualToPlatformPath(path);
+ m_asyncFileSystem->directoryExists(platformPath, new EntryCallbacks(successCallback, errorCallback, this, path, true));
+}
+
+void DOMFileSystem::getFile(const Entry* base, const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(base);
+ if (!DOMFilePath::isValidPath(path)) {
+ scheduleCallback(scriptExecutionContext(), errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+ return;
+ }
+
+ String absolutePath = path;
+ if (!DOMFilePath::isAbsolute(path))
+ absolutePath = DOMFilePath::removeExtraParentReferences(DOMFilePath::append(base->fullPath(), path));
+ String platformPath = m_asyncFileSystem->virtualToPlatformPath(absolutePath);
+
+ OwnPtr<EntryCallbacks> callbacks = adoptPtr(new EntryCallbacks(successCallback, errorCallback, this, absolutePath, false));
+ if (flags && flags->isCreate())
+ m_asyncFileSystem->createFile(platformPath, flags->isExclusive(), callbacks.release());
+ else
+ m_asyncFileSystem->fileExists(platformPath, callbacks.release());
+}
+
+void DOMFileSystem::getDirectory(const Entry* base, const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(base);
+ if (!DOMFilePath::isValidPath(path)) {
+ scheduleCallback(scriptExecutionContext(), errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+ return;
+ }
+
+ String absolutePath = path;
+ if (!DOMFilePath::isAbsolute(path))
+ absolutePath = DOMFilePath::removeExtraParentReferences(DOMFilePath::append(base->fullPath(), path));
+ String platformPath = m_asyncFileSystem->virtualToPlatformPath(absolutePath);
+
+ OwnPtr<EntryCallbacks> callbacks = adoptPtr(new EntryCallbacks(successCallback, errorCallback, this, absolutePath, true));
+ if (flags && flags->isCreate())
+ m_asyncFileSystem->createDirectory(platformPath, flags->isExclusive(), callbacks.release());
+ else
+ m_asyncFileSystem->directoryExists(platformPath, callbacks.release());
+}
+
+void DOMFileSystem::readDirectory(const String& path, PassRefPtr<EntriesCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(DOMFilePath::isAbsolute(path));
+ String platformPath = m_asyncFileSystem->virtualToPlatformPath(path);
+ m_asyncFileSystem->readDirectory(platformPath, new EntriesCallbacks(successCallback, errorCallback, this, path));
+}
+
+} // namespace
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/DOMFileSystem.h b/WebCore/fileapi/DOMFileSystem.h
new file mode 100644
index 0000000..f779aba
--- /dev/null
+++ b/WebCore/fileapi/DOMFileSystem.h
@@ -0,0 +1,126 @@
+/*
+ * 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 DOMFileSystem_h
+#define DOMFileSystem_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "ActiveDOMObject.h"
+#include "AsyncFileSystem.h"
+#include "Flags.h"
+#include "PlatformString.h"
+#include "ScriptExecutionContext.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class DirectoryEntry;
+class Entry;
+class EntryCallback;
+class EntriesCallback;
+class ErrorCallback;
+class MetadataCallback;
+class VoidCallback;
+
+class DOMFileSystem : public RefCounted<DOMFileSystem>, public ActiveDOMObject {
+public:
+ static PassRefPtr<DOMFileSystem> create(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ {
+ return adoptRef(new DOMFileSystem(context, name, asyncFileSystem));
+ }
+
+ virtual ~DOMFileSystem();
+
+ const String& name() const { return m_name; }
+ PassRefPtr<DirectoryEntry> root();
+
+ // ActiveDOMObject methods.
+ virtual void stop();
+ virtual bool hasPendingActivity() const;
+ virtual void contextDestroyed();
+
+ // Actual FileSystem API implementations. All the validity checks on virtual paths are done at DOMFileSystem level.
+ void getMetadata(const Entry* entry, PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback);
+ void move(const Entry* src, PassRefPtr<Entry> parent, const String& name, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ void copy(const Entry* src, PassRefPtr<Entry> parent, const String& name, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ void remove(const Entry* entry, PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>);
+ void getParent(const Entry* entry, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ void getFile(const Entry* base, const String& path, PassRefPtr<Flags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ void getDirectory(const Entry* base, const String& path, PassRefPtr<Flags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>);
+ void readDirectory(const String& path, PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>);
+
+ // Schedule a callback. This should not cross threads (should be called on the same context thread).
+ template <typename CB, typename CBArg>
+ static void scheduleCallback(ScriptExecutionContext*, PassRefPtr<CB>, PassRefPtr<CBArg>);
+
+private:
+ DOMFileSystem(ScriptExecutionContext*, const String& name, PassOwnPtr<AsyncFileSystem>);
+
+ AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
+
+ // A helper template to schedule a callback task.
+ // FIXME: move this to a more generic place.
+ template <typename CB, typename CBArg>
+ class DispatchCallbackTask : public ScriptExecutionContext::Task {
+ public:
+ DispatchCallbackTask(PassRefPtr<CB> callback, PassRefPtr<CBArg> arg)
+ : m_callback(callback)
+ , m_callbackArg(arg)
+ {
+ }
+
+ virtual void performTask(ScriptExecutionContext*)
+ {
+ m_callback->handleEvent(m_callbackArg.get());
+ }
+
+ private:
+ RefPtr<CB> m_callback;
+ RefPtr<CBArg> m_callbackArg;
+ };
+
+ String m_name;
+ mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
+};
+
+template <typename CB, typename CBArg>
+void DOMFileSystem::scheduleCallback(ScriptExecutionContext* scriptExecutionContext, PassRefPtr<CB> callback, PassRefPtr<CBArg> arg)
+{
+ ASSERT(scriptExecutionContext->isContextThread());
+ scriptExecutionContext->postTask(new DispatchCallbackTask<CB, CBArg>(callback, arg));
+}
+
+} // namespace
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // DOMFileSystem_h
diff --git a/WebCore/storage/DOMFileSystem.idl b/WebCore/fileapi/DOMFileSystem.idl
index b7307e2..b7307e2 100644
--- a/WebCore/storage/DOMFileSystem.idl
+++ b/WebCore/fileapi/DOMFileSystem.idl
diff --git a/WebCore/storage/DirectoryEntry.cpp b/WebCore/fileapi/DirectoryEntry.cpp
index 60dcace..95c12e4 100644
--- a/WebCore/storage/DirectoryEntry.cpp
+++ b/WebCore/fileapi/DirectoryEntry.cpp
@@ -39,7 +39,7 @@
namespace WebCore {
-DirectoryEntry::DirectoryEntry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
+DirectoryEntry::DirectoryEntry(DOMFileSystem* fileSystem, const String& fullPath)
: Entry(fileSystem, fullPath)
{
}
@@ -49,16 +49,14 @@ PassRefPtr<DirectoryReader> DirectoryEntry::createReader()
return DirectoryReader::create(m_fileSystem, m_fullPath);
}
-void DirectoryEntry::getFile(const String&, PassRefPtr<Flags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>)
+void DirectoryEntry::getFile(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->getFile(this, path, flags, successCallback, errorCallback);
}
-void DirectoryEntry::getDirectory(const String&, PassRefPtr<Flags>, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>)
+void DirectoryEntry::getDirectory(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->getDirectory(this, path, flags, successCallback, errorCallback);
}
} // namespace
diff --git a/WebCore/storage/DirectoryEntry.h b/WebCore/fileapi/DirectoryEntry.h
index 2ae4fb5..3cd8ab5 100644
--- a/WebCore/storage/DirectoryEntry.h
+++ b/WebCore/fileapi/DirectoryEntry.h
@@ -47,7 +47,7 @@ class ErrorCallback;
class DirectoryEntry : public Entry {
public:
- static PassRefPtr<DirectoryEntry> create(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
+ static PassRefPtr<DirectoryEntry> create(DOMFileSystem* fileSystem, const String& fullPath)
{
return adoptRef(new DirectoryEntry(fileSystem, fullPath));
}
@@ -58,7 +58,7 @@ public:
void getDirectory(const String& path, PassRefPtr<Flags> options = 0, PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
private:
- DirectoryEntry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath);
+ DirectoryEntry(DOMFileSystem* fileSystem, const String& fullPath);
};
} // namespace
diff --git a/WebCore/storage/DirectoryEntry.idl b/WebCore/fileapi/DirectoryEntry.idl
index ac30c7f..ac30c7f 100644
--- a/WebCore/storage/DirectoryEntry.idl
+++ b/WebCore/fileapi/DirectoryEntry.idl
diff --git a/WebCore/storage/DirectoryReader.cpp b/WebCore/fileapi/DirectoryReader.cpp
index 0b30f70..b0eef1c 100644
--- a/WebCore/storage/DirectoryReader.cpp
+++ b/WebCore/fileapi/DirectoryReader.cpp
@@ -39,16 +39,15 @@
namespace WebCore {
-DirectoryReader::DirectoryReader(PassRefPtr<DOMFileSystem> fileSystem, const String& path)
+DirectoryReader::DirectoryReader(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
: m_fileSystem(fileSystem)
- , m_path(path)
+ , m_fullPath(fullPath)
{
}
-void DirectoryReader::readEntries(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>)
+void DirectoryReader::readEntries(PassRefPtr<EntriesCallback> entriesCallback, PassRefPtr<ErrorCallback> errorCallback)
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->readDirectory(m_fullPath, entriesCallback, errorCallback);
}
} // namespace
diff --git a/WebCore/storage/DirectoryReader.h b/WebCore/fileapi/DirectoryReader.h
index cf5da8f..0e2ef0f 100644
--- a/WebCore/storage/DirectoryReader.h
+++ b/WebCore/fileapi/DirectoryReader.h
@@ -56,7 +56,7 @@ private:
DirectoryReader(PassRefPtr<DOMFileSystem> fileSystem, const String& path);
RefPtr<DOMFileSystem> m_fileSystem;
- String m_path;
+ String m_fullPath;
};
} // namespace
diff --git a/WebCore/storage/DirectoryReader.idl b/WebCore/fileapi/DirectoryReader.idl
index c3c7012..c3c7012 100644
--- a/WebCore/storage/DirectoryReader.idl
+++ b/WebCore/fileapi/DirectoryReader.idl
diff --git a/WebCore/storage/EntriesCallback.h b/WebCore/fileapi/EntriesCallback.h
index 9f812e9..9f812e9 100644
--- a/WebCore/storage/EntriesCallback.h
+++ b/WebCore/fileapi/EntriesCallback.h
diff --git a/WebCore/storage/EntriesCallback.idl b/WebCore/fileapi/EntriesCallback.idl
index 73b374d..73b374d 100644
--- a/WebCore/storage/EntriesCallback.idl
+++ b/WebCore/fileapi/EntriesCallback.idl
diff --git a/WebCore/storage/Entry.cpp b/WebCore/fileapi/Entry.cpp
index 6783291..fbbedf2 100644
--- a/WebCore/storage/Entry.cpp
+++ b/WebCore/fileapi/Entry.cpp
@@ -32,15 +32,17 @@
#if ENABLE(FILE_SYSTEM)
+#include "DOMFilePath.h"
#include "DOMFileSystem.h"
#include "EntryCallback.h"
#include "ErrorCallback.h"
+#include "FileError.h"
#include "MetadataCallback.h"
#include "VoidCallback.h"
namespace WebCore {
-Entry::Entry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
+Entry::Entry(DOMFileSystem* fileSystem, const String& fullPath)
: m_fileSystem(fileSystem)
, m_fullPath(fullPath)
{
@@ -51,34 +53,29 @@ Entry::Entry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
m_name = fullPath;
}
-void Entry::getMetadata(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>)
+void Entry::getMetadata(PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->getMetadata(this, successCallback, errorCallback);
}
-void Entry::moveTo(PassRefPtr<Entry>, const String&, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>)
+void Entry::moveTo(PassRefPtr<Entry> parent, const String& name, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->move(this, parent, name, successCallback, errorCallback);
}
-void Entry::copyTo(PassRefPtr<Entry>, const String&, PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>)
+void Entry::copyTo(PassRefPtr<Entry> parent, const String& name, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->copy(this, parent, name, successCallback, errorCallback);
}
-void Entry::remove(PassRefPtr<VoidCallback>, PassRefPtr<ErrorCallback>)
+void Entry::remove(PassRefPtr<VoidCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->remove(this, successCallback, errorCallback);
}
-void Entry::getParent(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>)
+void Entry::getParent(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) const
{
- // FIXME: to be implemented.
- ASSERT_NOT_REACHED();
+ m_fileSystem->getParent(this, successCallback, errorCallback);
}
String Entry::toURI(const String&)
diff --git a/WebCore/storage/Entry.h b/WebCore/fileapi/Entry.h
index 7bbb265..9af532f 100644
--- a/WebCore/storage/Entry.h
+++ b/WebCore/fileapi/Entry.h
@@ -54,22 +54,21 @@ public:
const String& fullPath() const { return m_fullPath; }
const String& name() const { return m_name; }
- DOMFileSystem* filesystem() const { return m_fileSystem.get(); }
+ DOMFileSystem* filesystem() const { return m_fileSystem; }
virtual void getMetadata(PassRefPtr<MetadataCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
-
- virtual void moveTo(PassRefPtr<Entry> parent, const String& name = String(), PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
- virtual void copyTo(PassRefPtr<Entry> parent, const String& name = String(), PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
- virtual void remove(PassRefPtr<VoidCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
- virtual void getParent(PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0);
+ virtual void moveTo(PassRefPtr<Entry> parent, const String& name = String(), PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
+ virtual void copyTo(PassRefPtr<Entry> parent, const String& name = String(), PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
+ virtual void remove(PassRefPtr<VoidCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
+ virtual void getParent(PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
virtual String toURI(const String& mimeType = String());
protected:
- Entry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath);
+ Entry(DOMFileSystem* fileSystem, const String& fullPath);
- RefPtr<DOMFileSystem> m_fileSystem;
- String m_fullPath; // virtual path
+ DOMFileSystem* m_fileSystem;
+ String m_fullPath;
String m_name;
};
diff --git a/WebCore/storage/Entry.idl b/WebCore/fileapi/Entry.idl
index 7d4ffee..7d4ffee 100644
--- a/WebCore/storage/Entry.idl
+++ b/WebCore/fileapi/Entry.idl
diff --git a/WebCore/storage/EntryArray.cpp b/WebCore/fileapi/EntryArray.cpp
index 6c4f74f..6c4f74f 100644
--- a/WebCore/storage/EntryArray.cpp
+++ b/WebCore/fileapi/EntryArray.cpp
diff --git a/WebCore/storage/EntryArray.h b/WebCore/fileapi/EntryArray.h
index e5957ab..e5957ab 100644
--- a/WebCore/storage/EntryArray.h
+++ b/WebCore/fileapi/EntryArray.h
diff --git a/WebCore/storage/EntryArray.idl b/WebCore/fileapi/EntryArray.idl
index e987ece..e987ece 100644
--- a/WebCore/storage/EntryArray.idl
+++ b/WebCore/fileapi/EntryArray.idl
diff --git a/WebCore/storage/EntryCallback.h b/WebCore/fileapi/EntryCallback.h
index 9580eda..9580eda 100644
--- a/WebCore/storage/EntryCallback.h
+++ b/WebCore/fileapi/EntryCallback.h
diff --git a/WebCore/storage/EntryCallback.idl b/WebCore/fileapi/EntryCallback.idl
index bea3fd1..bea3fd1 100644
--- a/WebCore/storage/EntryCallback.idl
+++ b/WebCore/fileapi/EntryCallback.idl
diff --git a/WebCore/storage/ErrorCallback.h b/WebCore/fileapi/ErrorCallback.h
index 91143e8..91143e8 100644
--- a/WebCore/storage/ErrorCallback.h
+++ b/WebCore/fileapi/ErrorCallback.h
diff --git a/WebCore/storage/ErrorCallback.idl b/WebCore/fileapi/ErrorCallback.idl
index fc7fa85..fc7fa85 100644
--- a/WebCore/storage/ErrorCallback.idl
+++ b/WebCore/fileapi/ErrorCallback.idl
diff --git a/WebCore/fileapi/File.cpp b/WebCore/fileapi/File.cpp
new file mode 100644
index 0000000..150a05b
--- /dev/null
+++ b/WebCore/fileapi/File.cpp
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "File.h"
+
+#include "BlobRegistry.h"
+#include "FileSystem.h"
+#include "MIMETypeRegistry.h"
+
+namespace WebCore {
+
+static PassOwnPtr<BlobData> createBlobDataForFile(const String& path)
+{
+ String type;
+ int index = path.reverseFind('.');
+ if (index != -1)
+ type = MIMETypeRegistry::getMIMETypeForExtension(path.substring(index + 1));
+
+ OwnPtr<BlobData> blobData = BlobData::create();
+ blobData->setContentType(type);
+ blobData->appendFile(path);
+ return blobData.release();
+}
+
+File::File(ScriptExecutionContext* scriptExecutionContext, const String& path)
+ : Blob(scriptExecutionContext, createBlobDataForFile(path), -1)
+ , m_path(path)
+ , m_name(pathGetFileName(path))
+{
+}
+
+File::File(ScriptExecutionContext* scriptExecutionContext, const String& path, const KURL& url, const String& type)
+ : Blob(scriptExecutionContext, url, type, -1)
+ , m_path(path)
+{
+ m_name = pathGetFileName(path);
+}
+
+#if ENABLE(DIRECTORY_UPLOAD)
+File::File(ScriptExecutionContext* scriptExecutionContext, const String& relativePath, const String& path)
+ : Blob(scriptExecutionContext, createBlobDataForFile(path), -1)
+ , m_path(path)
+ , m_relativePath(relativePath)
+{
+ m_name = pathGetFileName(path);
+}
+#endif
+
+unsigned long long File::size() const
+{
+ // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to
+ // come up with an exception to throw if file size is not representable.
+ long long size;
+ if (!getFileSize(m_path, size))
+ return 0;
+ return static_cast<unsigned long long>(size);
+}
+
+void File::captureSnapshot(long long& snapshotSize, double& snapshotModificationTime) const
+{
+ // Obtains a snapshot of the file by capturing its current size and modification time. This is used when we slice a file for the first time.
+ // If we fail to retrieve the size or modification time, probably due to that the file has been deleted, 0 size is returned.
+ // FIXME: Combine getFileSize and getFileModificationTime into one file system call.
+ time_t modificationTime;
+ if (!getFileSize(m_path, snapshotSize) || !getFileModificationTime(m_path, modificationTime)) {
+ snapshotSize = 0;
+ snapshotModificationTime = 0;
+ } else
+ snapshotModificationTime = modificationTime;
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/File.h b/WebCore/fileapi/File.h
index 06a73c5..d6446d3 100644
--- a/WebCore/html/File.h
+++ b/WebCore/fileapi/File.h
@@ -27,11 +27,15 @@
#define File_h
#include "Blob.h"
+#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
+class KURL;
+class ScriptExecutionContext;
+
class File : public Blob {
public:
static PassRefPtr<File> create(ScriptExecutionContext* scriptExecutionContext, const String& path)
@@ -40,9 +44,9 @@ public:
}
// For deserialization.
- static PassRefPtr<File> create(ScriptExecutionContext* scriptExecutionContext, const String& path, const KURL& url, const String& type)
+ static PassRefPtr<File> create(ScriptExecutionContext* scriptExecutionContext, const String& path, const KURL& srcURL, const String& type)
{
- return adoptRef(new File(scriptExecutionContext, path, url, type));
+ return adoptRef(new File(scriptExecutionContext, path, srcURL, type));
}
#if ENABLE(DIRECTORY_UPLOAD)
@@ -52,29 +56,38 @@ public:
}
#endif
+ virtual unsigned long long size() const;
virtual bool isFile() const { return true; }
- const String& name() const;
+ const String& path() const { return m_path; }
+ const String& name() const { return m_name; }
#if ENABLE(DIRECTORY_UPLOAD)
// Returns the relative path of this file in the context of a directory selection.
- const String& webkitRelativePath() const;
+ const String& webkitRelativePath() const { return m_relativePath; }
#endif
+ // Note that this involves synchronous file operation. Think twice before calling this function.
+ void captureSnapshot(long long& snapshotSize, double& snapshotModificationTime) const;
+
// FIXME: obsolete attributes. To be removed.
const String& fileName() const { return name(); }
unsigned long long fileSize() const { return size(); }
private:
File(ScriptExecutionContext*, const String& path);
-
+
// For deserialization.
- File(ScriptExecutionContext*, const String& path, const KURL&, const String& type);
+ File(ScriptExecutionContext*, const String& path, const KURL& srcURL, const String& type);
#if ENABLE(DIRECTORY_UPLOAD)
File(ScriptExecutionContext*, const String& relativePath, const String& path);
#endif
- void Init();
+ String m_path;
+ String m_name;
+#if ENABLE(DIRECTORY_UPLOAD)
+ String m_relativePath;
+#endif
};
} // namespace WebCore
diff --git a/WebCore/html/File.idl b/WebCore/fileapi/File.idl
index 5626c8e..1937901 100644
--- a/WebCore/html/File.idl
+++ b/WebCore/fileapi/File.idl
@@ -27,7 +27,8 @@ module html {
interface [
GenerateNativeConverter,
- GenerateToJS
+ GenerateToJS,
+ NoStaticTables
] File : Blob {
readonly attribute DOMString name;
#if defined(ENABLE_DIRECTORY_UPLOAD) && ENABLE_DIRECTORY_UPLOAD
diff --git a/WebCore/storage/FileEntry.cpp b/WebCore/fileapi/FileEntry.cpp
index 4bec01d..e2a583c 100644
--- a/WebCore/storage/FileEntry.cpp
+++ b/WebCore/fileapi/FileEntry.cpp
@@ -35,7 +35,7 @@
namespace WebCore {
-FileEntry::FileEntry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
+FileEntry::FileEntry(DOMFileSystem* fileSystem, const String& fullPath)
: Entry(fileSystem, fullPath)
{
}
diff --git a/WebCore/storage/FileEntry.h b/WebCore/fileapi/FileEntry.h
index b02b5c7..abcc6bb 100644
--- a/WebCore/storage/FileEntry.h
+++ b/WebCore/fileapi/FileEntry.h
@@ -34,9 +34,6 @@
#if ENABLE(FILE_SYSTEM)
#include "Entry.h"
-#include "PlatformString.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
namespace WebCore {
@@ -44,14 +41,14 @@ class DOMFileSystem;
class FileEntry : public Entry {
public:
- static PassRefPtr<FileEntry> create(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath)
+ static PassRefPtr<FileEntry> create(DOMFileSystem* fileSystem, const String& fullPath)
{
return adoptRef(new FileEntry(fileSystem, fullPath));
}
virtual bool isFile() const { return true; }
private:
- FileEntry(PassRefPtr<DOMFileSystem> fileSystem, const String& fullPath);
+ FileEntry(DOMFileSystem* fileSystem, const String& fullPath);
};
} // namespace
diff --git a/WebCore/storage/FileEntry.idl b/WebCore/fileapi/FileEntry.idl
index af3b807..af3b807 100644
--- a/WebCore/storage/FileEntry.idl
+++ b/WebCore/fileapi/FileEntry.idl
diff --git a/WebCore/html/FileError.h b/WebCore/fileapi/FileError.h
index 1c74c07..1c74c07 100644
--- a/WebCore/html/FileError.h
+++ b/WebCore/fileapi/FileError.h
diff --git a/WebCore/html/FileError.idl b/WebCore/fileapi/FileError.idl
index 3423e72..a5e2bac 100644
--- a/WebCore/html/FileError.idl
+++ b/WebCore/fileapi/FileError.idl
@@ -31,14 +31,19 @@
module html {
interface [
Conditional=BLOB|FILE_WRITER,
- DontCheckEnums
+ DontCheckEnums,
+ NoStaticTables
] FileError {
#if !defined(LANGUAGE_OBJECTIVE_C)
const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
const unsigned short NOT_FOUND_ERR = 8;
+ const unsigned short INVALID_STATE_ERR = 11;
+ const unsigned short SYNTAX_ERR = 12;
+ const unsigned short INVALID_MODIFICATION_ERR = 13;
#endif
const unsigned short SECURITY_ERR = 18;
const unsigned short ABORT_ERR = 20;
+ const unsigned short QUOTA_EXCEEDED_ERR = 22;
const unsigned short NOT_READABLE_ERR = 24;
const unsigned short ENCODING_ERR = 26;
readonly attribute unsigned short code;
diff --git a/WebCore/html/FileWriter.cpp b/WebCore/fileapi/FileException.h
index 7d112e2..4419eb7 100644
--- a/WebCore/html/FileWriter.cpp
+++ b/WebCore/fileapi/FileException.h
@@ -28,59 +28,39 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
+#ifndef FileException_h
+#define FileException_h
-#if ENABLE(FILE_WRITER)
+#if ENABLE(BLOB) || ENABLE(FILE_WRITER)
-#include "FileWriter.h"
+#include "ExceptionBase.h"
namespace WebCore {
-FileWriter::FileWriter(ScriptExecutionContext* context)
- : ActiveDOMObject(context, this)
-{
-}
+class FileException : public ExceptionBase {
+public:
+ static PassRefPtr<FileException> create(const ExceptionCodeDescription& description)
+ {
+ return adoptRef(new FileException(description));
+ }
-FileWriter::~FileWriter()
-{
-}
+ static const int FileExceptionOffset = 100;
+ static const int FileExceptionMax = 199;
-bool FileWriter::hasPendingActivity() const
-{
- return false;
-}
+ enum EventExceptionCode {
+ UNSPECIFIED_EVENT_TYPE_ERR = FileExceptionOffset
+ };
-bool FileWriter::canSuspend() const
-{
- // FIXME: It is not currently possible to suspend a FileWriter, so pages with FileWriter can not go into page cache.
- return false;
-}
+private:
+ FileException(const ExceptionCodeDescription& description)
+ : ExceptionBase(description)
+ {
+ }
+};
-void FileWriter::stop()
-{
-}
-
-void FileWriter::write(Blob*)
-{
-}
-
-void FileWriter::seek(long long)
-{
-}
-
-void FileWriter::truncate(long long)
-{
-}
+} // namespace WebCore
-void FileWriter::abort()
-{
-}
+#endif // ENABLE(BLOB) || ENABLE(FILE_WRITER)
-FileWriter::ReadyState FileWriter::readyState() const
-{
- return EMPTY;
-}
+#endif // FileException_h
-} // namespace WebCore
-
-#endif // ENABLE(FILE_WRITER)
diff --git a/WebCore/fileapi/FileException.idl b/WebCore/fileapi/FileException.idl
new file mode 100644
index 0000000..cd53a7e
--- /dev/null
+++ b/WebCore/fileapi/FileException.idl
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+module html {
+ interface [
+ Conditional=BLOB|FILE_WRITER,
+ DontCheckEnums,
+ NoStaticTables
+ ] FileException {
+
+ readonly attribute unsigned short code;
+ readonly attribute DOMString name;
+ readonly attribute DOMString message;
+
+#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
+ // Override in a Mozilla compatible format
+ [DontEnum] DOMString toString();
+#endif
+
+ // FileExceptionCode
+ const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
+ const unsigned short NOT_FOUND_ERR = 8;
+ const unsigned short INVALID_STATE_ERR = 11;
+ const unsigned short SYNTAX_ERR = 12;
+ const unsigned short INVALID_MODIFICATION_ERR = 13;
+ const unsigned short SECURITY_ERR = 18;
+ const unsigned short ABORT_ERR = 20;
+ const unsigned short QUOTA_EXCEEDED_ERR = 22;
+ const unsigned short NOT_READABLE_ERR = 24;
+ const unsigned short ENCODING_ERR = 26;
+ };
+}
diff --git a/WebCore/html/FileList.cpp b/WebCore/fileapi/FileList.cpp
index ba81087..ba81087 100644
--- a/WebCore/html/FileList.cpp
+++ b/WebCore/fileapi/FileList.cpp
diff --git a/WebCore/html/FileList.h b/WebCore/fileapi/FileList.h
index e078191..e078191 100644
--- a/WebCore/html/FileList.h
+++ b/WebCore/fileapi/FileList.h
diff --git a/WebCore/html/FileList.idl b/WebCore/fileapi/FileList.idl
index 6baf3e1..0d0b046 100644
--- a/WebCore/html/FileList.idl
+++ b/WebCore/fileapi/FileList.idl
@@ -26,7 +26,8 @@
module html {
interface [
- HasIndexGetter
+ HasIndexGetter,
+ NoStaticTables
] FileList {
readonly attribute unsigned long length;
File item(in [IsIndex] unsigned long index);
diff --git a/WebCore/html/FileReader.cpp b/WebCore/fileapi/FileReader.cpp
index d600d40..747b6ff 100644
--- a/WebCore/html/FileReader.cpp
+++ b/WebCore/fileapi/FileReader.cpp
@@ -36,17 +36,19 @@
#include "Base64.h"
#include "Blob.h"
+#include "CrossThreadTask.h"
#include "File.h"
-#include "FileStreamProxy.h"
#include "Logging.h"
#include "ProgressEvent.h"
+#include "ResourceError.h"
+#include "ResourceRequest.h"
#include "ScriptExecutionContext.h"
#include "TextResourceDecoder.h"
+#include "ThreadableLoader.h"
#include <wtf/CurrentTime.h>
namespace WebCore {
-const unsigned bufferSize = 1024;
const double progressNotificationIntervalMS = 50;
FileReader::FileReader(ScriptExecutionContext* context)
@@ -59,7 +61,6 @@ FileReader::FileReader(ScriptExecutionContext* context)
, m_totalBytes(0)
, m_lastProgressNotificationTimeMS(0)
{
- m_buffer.resize(bufferSize);
}
FileReader::~FileReader()
@@ -83,55 +84,56 @@ void FileReader::stop()
terminate();
}
-void FileReader::readAsBinaryString(Blob* fileBlob)
+void FileReader::readAsBinaryString(Blob* blob)
{
- if (!fileBlob)
+ if (!blob)
return;
- // FIXME: needs to handle non-file blobs.
- LOG(FileAPI, "FileReader: reading as binary: %s\n", fileBlob->path().utf8().data());
+ LOG(FileAPI, "FileReader: reading as binary: %s %s\n", blob->url().string().utf8().data(), blob->isFile() ? static_cast<File*>(blob)->path().utf8().data() : "");
- readInternal(fileBlob, ReadFileAsBinaryString);
+ readInternal(blob, ReadFileAsBinaryString);
}
-void FileReader::readAsText(Blob* fileBlob, const String& encoding)
+void FileReader::readAsText(Blob* blob, const String& encoding)
{
- if (!fileBlob)
+ if (!blob)
return;
- // FIXME: needs to handle non-file blobs.
- LOG(FileAPI, "FileReader: reading as text: %s\n", fileBlob->path().utf8().data());
+ LOG(FileAPI, "FileReader: reading as text: %s %s\n", blob->url().string().utf8().data(), blob->isFile() ? static_cast<File*>(blob)->path().utf8().data() : "");
if (!encoding.isEmpty())
m_encoding = TextEncoding(encoding);
- readInternal(fileBlob, ReadFileAsText);
+ readInternal(blob, ReadFileAsText);
}
-void FileReader::readAsDataURL(File* file)
+void FileReader::readAsDataURL(Blob* blob)
{
- if (!file)
+ if (!blob)
return;
- LOG(FileAPI, "FileReader: reading as data URL: %s\n", file->path().utf8().data());
+ LOG(FileAPI, "FileReader: reading as data URL: %s %s\n", blob->url().string().utf8().data(), blob->isFile() ? static_cast<File*>(blob)->path().utf8().data() : "");
- m_fileType = file->type();
- readInternal(file, ReadFileAsDataURL);
+ m_fileType = blob->type();
+ readInternal(blob, ReadFileAsDataURL);
}
-void FileReader::readInternal(Blob* fileBlob, ReadType type)
+static void delayedStart(ScriptExecutionContext*, FileReader* reader)
+{
+ reader->start();
+}
+
+void FileReader::readInternal(Blob* blob, ReadType type)
{
// readAs*** methods() can be called multiple times. Only the last call before the actual reading happens is processed.
if (m_state != None && m_state != Starting)
return;
- m_fileBlob = fileBlob;
+ if (m_state == None)
+ scriptExecutionContext()->postTask(createCallbackTask(&delayedStart, this));
+
+ m_blob = blob;
m_readType = type;
m_state = Starting;
-
- // When FileStreamProxy is created, FileReader::didStart() will get notified on the File thread and we will start
- // opening and reading the file since then.
- if (!m_streamProxy.get())
- m_streamProxy = FileStreamProxy::create(scriptExecutionContext(), this);
}
void FileReader::abort()
@@ -150,87 +152,66 @@ void FileReader::abort()
void FileReader::terminate()
{
- if (m_streamProxy) {
- m_streamProxy->stop();
- m_streamProxy = 0;
+ if (m_loader) {
+ m_loader->cancel();
+ m_loader = 0;
}
m_state = Completed;
}
-void FileReader::didStart()
+void FileReader::start()
{
m_state = Opening;
- ASSERT(m_fileBlob->items().size() == 1 && m_fileBlob->items().at(0)->toFileBlobItem());
- const FileRangeBlobItem* fileRangeItem = m_fileBlob->items().at(0)->toFileRangeBlobItem();
- double expectedModificationTime = fileRangeItem ? fileRangeItem->snapshotModificationTime() : 0;
+ // The blob is read by routing through the request handling layer given the blob url.
+ ResourceRequest request(m_blob->url());
+ request.setHTTPMethod("GET");
+
+ ThreadableLoaderOptions options;
+ options.sendLoadCallbacks = true;
+ options.sniffContent = false;
+ options.forcePreflight = false;
+ options.allowCredentials = true;
+ options.crossOriginRequestPolicy = DenyCrossOriginRequests;
- m_streamProxy->getSize(m_fileBlob->path(), expectedModificationTime);
+ m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request, options);
}
-void FileReader::didGetSize(long long size)
+void FileReader::didReceiveResponse(const ResourceResponse& response)
{
- // If the size is -1, it means the file has been moved or changed. Fail now.
- if (size == -1) {
- didFail(NOT_FOUND_ERR);
+ if (response.httpStatusCode() != 200) {
+ failed(response.httpStatusCode());
return;
}
m_state = Reading;
fireEvent(eventNames().loadstartEvent);
- ASSERT(m_fileBlob->items().size() == 1 && m_fileBlob->items().at(0)->toFileBlobItem());
- const FileRangeBlobItem* fileRangeItem = m_fileBlob->items().at(0)->toFileRangeBlobItem();
- long long start = fileRangeItem ? fileRangeItem->start() : 0;
-
- // The size passed back is the size of the whole file. If the underlying item is a sliced file, we need to use the slice length.
- m_totalBytes = fileRangeItem ? fileRangeItem->size() : size;
-
- m_streamProxy->openForRead(m_fileBlob->path(), start, m_totalBytes);
+ m_totalBytes = response.expectedContentLength();
}
-void FileReader::didOpen(bool success)
+void FileReader::didReceiveData(const char* data, int lengthReceived)
{
- if (!success) {
- didFail(NOT_READABLE_ERR);
- return;
- }
-
- m_streamProxy->read(m_buffer.data(), m_buffer.size());
-}
+ ASSERT(data && lengthReceived);
-void FileReader::didRead(int bytesRead)
-{
// Bail out if we have aborted the reading.
if (m_state == Completed)
return;
- // If bytesRead is -1, it means an error happens.
- if (bytesRead == -1) {
- didFail(NOT_READABLE_ERR);
- return;
- }
-
- // If bytesRead is 0, it means the reading is done.
- if (!bytesRead) {
- didFinish();
- return;
- }
-
switch (m_readType) {
case ReadFileAsBinaryString:
- m_result += String(m_buffer.data(), static_cast<unsigned>(bytesRead));
+ m_result += String(data, static_cast<unsigned>(lengthReceived));
break;
case ReadFileAsText:
case ReadFileAsDataURL:
- m_rawData.append(m_buffer.data(), static_cast<unsigned>(bytesRead));
+ m_rawData.append(data, static_cast<unsigned>(lengthReceived));
m_isRawDataConverted = false;
break;
default:
ASSERT_NOT_REACHED();
}
- m_bytesLoaded += bytesRead;
+ m_bytesLoaded += lengthReceived;
// Fire the progress event at least every 50ms.
double now = WTF::currentTimeMS();
@@ -240,30 +221,45 @@ void FileReader::didRead(int bytesRead)
fireEvent(eventNames().progressEvent);
m_lastProgressNotificationTimeMS = now;
}
-
- // Continue reading.
- m_streamProxy->read(m_buffer.data(), m_buffer.size());
}
-void FileReader::didFinish()
+void FileReader::didFinishLoading(unsigned long)
{
m_state = Completed;
- m_streamProxy->close();
-
fireEvent(eventNames().loadEvent);
fireEvent(eventNames().loadendEvent);
+
+ m_loader = 0;
}
-void FileReader::didFail(ExceptionCode ec)
+void FileReader::didFail(const ResourceError&)
{
- m_state = Completed;
- m_error = FileError::create(ec);
+ // Treat as internal error.
+ failed(500);
+}
- m_streamProxy->close();
+void FileReader::failed(int httpStatusCode)
+{
+ m_state = Completed;
+ m_error = FileError::create(httpStatusCodeToExceptionCode(httpStatusCode));
fireEvent(eventNames().errorEvent);
fireEvent(eventNames().loadendEvent);
+
+ m_loader = 0;
+}
+
+ExceptionCode FileReader::httpStatusCodeToExceptionCode(int httpStatusCode)
+{
+ switch (httpStatusCode) {
+ case 403:
+ return SECURITY_ERR;
+ case 404:
+ return NOT_FOUND_ERR;
+ default:
+ return NOT_READABLE_ERR;
+ }
}
void FileReader::fireEvent(const AtomicString& type)
@@ -303,7 +299,7 @@ const ScriptString& FileReader::result()
convertToText();
// For data URL, we only do the coversion until we receive all the raw data.
else if (m_readType == ReadFileAsDataURL && m_state == Completed)
- convertToDataURL();
+ convertToDataURL(m_rawData, m_fileType, m_result);
return m_result;
}
@@ -328,22 +324,22 @@ void FileReader::convertToText()
m_result += m_decoder->flush();
}
-void FileReader::convertToDataURL()
+void FileReader::convertToDataURL(const Vector<char>& rawData, const String& fileType, ScriptString& result)
{
- m_result = "data:";
+ result = "data:";
- if (!m_rawData.size())
+ if (!rawData.size())
return;
- m_result += m_fileType;
- if (!m_fileType.isEmpty())
- m_result += ";";
- m_result += "base64,";
+ result += fileType;
+ if (!fileType.isEmpty())
+ result += ";";
+ result += "base64,";
Vector<char> out;
- base64Encode(m_rawData, out);
+ base64Encode(rawData, out);
out.append('\0');
- m_result += out.data();
+ result += out.data();
}
} // namespace WebCore
diff --git a/WebCore/html/FileReader.h b/WebCore/fileapi/FileReader.h
index ee15968..48ce229 100644
--- a/WebCore/html/FileReader.h
+++ b/WebCore/fileapi/FileReader.h
@@ -36,10 +36,10 @@
#include "ActiveDOMObject.h"
#include "EventTarget.h"
#include "FileError.h"
-#include "FileStreamClient.h"
#include "PlatformString.h"
#include "ScriptString.h"
#include "TextEncoding.h"
+#include "ThreadableLoaderClient.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -48,12 +48,11 @@
namespace WebCore {
class Blob;
-class File;
-class FileStreamProxy;
class ScriptExecutionContext;
class TextResourceDecoder;
+class ThreadableLoader;
-class FileReader : public RefCounted<FileReader>, public ActiveDOMObject, public EventTarget, public FileStreamClient {
+class FileReader : public RefCounted<FileReader>, public ActiveDOMObject, public EventTarget, public ThreadableLoaderClient {
public:
static PassRefPtr<FileReader> create(ScriptExecutionContext* context)
{
@@ -70,13 +69,19 @@ public:
void readAsBinaryString(Blob*);
void readAsText(Blob*, const String& encoding = "");
- void readAsDataURL(File*);
+ void readAsDataURL(Blob*);
void abort();
+ void start();
+
ReadyState readyState() const;
PassRefPtr<FileError> error() { return m_error; }
const ScriptString& result();
+ // Helper methods, also used by FileReaderSync.
+ static ExceptionCode httpStatusCodeToExceptionCode(int httpStatusCode);
+ static void convertToDataURL(const Vector<char>& rawData, const String& fileType, ScriptString& result);
+
// ActiveDOMObject
virtual bool canSuspend() const;
virtual void stop();
@@ -86,11 +91,11 @@ public:
virtual FileReader* toFileReader() { return this; }
virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
- // FileStreamClient
- virtual void didStart();
- virtual void didGetSize(long long);
- virtual void didOpen(bool);
- virtual void didRead(int);
+ // ThreadableLoaderClient
+ virtual void didReceiveResponse(const ResourceResponse&);
+ virtual void didReceiveData(const char*, int);
+ virtual void didFinishLoading(unsigned long identifier);
+ virtual void didFail(const ResourceError&);
using RefCounted<FileReader>::ref;
using RefCounted<FileReader>::deref;
@@ -126,16 +131,16 @@ private:
void terminate();
void readInternal(Blob*, ReadType);
+ void failed(int httpStatusCode);
+ void fireErrorEvent(int httpStatusCode);
void fireEvent(const AtomicString& type);
void convertToText();
void convertToDataURL();
- void didFinish();
- void didFail(ExceptionCode);
InternalState m_state;
EventTargetData m_eventTargetData;
- RefPtr<Blob> m_fileBlob;
+ RefPtr<Blob> m_blob;
ReadType m_readType;
TextEncoding m_encoding;
@@ -157,8 +162,7 @@ private:
// Needed to create data URL.
String m_fileType;
- RefPtr<FileStreamProxy> m_streamProxy;
- Vector<char> m_buffer;
+ RefPtr<ThreadableLoader> m_loader;
RefPtr<FileError> m_error;
long long m_bytesLoaded;
long long m_totalBytes;
diff --git a/WebCore/html/FileReader.idl b/WebCore/fileapi/FileReader.idl
index b36e9d3..b36e9d3 100644
--- a/WebCore/html/FileReader.idl
+++ b/WebCore/fileapi/FileReader.idl
diff --git a/WebCore/fileapi/FileReaderSync.cpp b/WebCore/fileapi/FileReaderSync.cpp
new file mode 100644
index 0000000..a907044
--- /dev/null
+++ b/WebCore/fileapi/FileReaderSync.cpp
@@ -0,0 +1,193 @@
+/*
+ * 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 ENABLE(BLOB)
+
+#include "FileReaderSync.h"
+
+#include "Base64.h"
+#include "Blob.h"
+#include "FileReader.h"
+#include "ResourceRequest.h"
+#include "ScriptExecutionContext.h"
+#include "TextEncoding.h"
+#include "TextResourceDecoder.h"
+#include "ThreadableLoader.h"
+
+namespace WebCore {
+
+class FileReaderSyncLoader : public ThreadableLoaderClient {
+public:
+ // If the output result is provided, use it. Otherwise, save it as the raw data.
+ FileReaderSyncLoader(ScriptString* result);
+
+ // Returns the http status code.
+ void start(ScriptExecutionContext*, const ResourceRequest&, ExceptionCode&);
+
+ // ThreadableLoaderClient
+ virtual void didReceiveResponse(const ResourceResponse&);
+ virtual void didReceiveData(const char*, int);
+ virtual void didFinishLoading(unsigned long identifier);
+ virtual void didFail(const ResourceError&);
+
+ const Vector<char>& rawData() const { return m_rawData; }
+
+private:
+ // The output result. The caller provides this in order to load the binary data directly.
+ ScriptString* m_result;
+
+ // The raw data. The caller does not provide the above output result and we need to save it here.
+ Vector<char> m_rawData;
+
+ int m_httpStatusCode;
+};
+
+FileReaderSyncLoader::FileReaderSyncLoader(ScriptString* result)
+ : m_result(result)
+ , m_httpStatusCode(0)
+{
+}
+
+void FileReaderSyncLoader::start(ScriptExecutionContext* scriptExecutionContext, const ResourceRequest& request, ExceptionCode& ec)
+{
+ ThreadableLoaderOptions options;
+ options.sendLoadCallbacks = true;
+ options.sniffContent = false;
+ options.forcePreflight = false;
+ options.allowCredentials = true;
+ options.crossOriginRequestPolicy = DenyCrossOriginRequests;
+
+ ThreadableLoader::loadResourceSynchronously(scriptExecutionContext, request, *this, options);
+
+ ec = (m_httpStatusCode == 200) ? 0 : FileReader::httpStatusCodeToExceptionCode(m_httpStatusCode);
+}
+
+void FileReaderSyncLoader::didReceiveResponse(const ResourceResponse& response)
+{
+ m_httpStatusCode = response.httpStatusCode();
+}
+
+void FileReaderSyncLoader::didReceiveData(const char* data, int lengthReceived)
+{
+ if (m_result)
+ *m_result += String(data, static_cast<unsigned>(lengthReceived));
+ else
+ m_rawData.append(data, static_cast<unsigned>(lengthReceived));
+}
+
+void FileReaderSyncLoader::didFinishLoading(unsigned long)
+{
+}
+
+void FileReaderSyncLoader::didFail(const ResourceError&)
+{
+ // Treat as internal error.
+ m_httpStatusCode = 500;
+}
+
+FileReaderSync::FileReaderSync()
+ : m_result("")
+{
+}
+
+const ScriptString& FileReaderSync::readAsBinaryString(ScriptExecutionContext* scriptExecutionContext, Blob* blob, ExceptionCode& ec)
+{
+ if (!blob)
+ return m_result;
+
+ read(scriptExecutionContext, blob, ReadAsBinaryString, ec);
+ return m_result;
+}
+
+const ScriptString& FileReaderSync::readAsText(ScriptExecutionContext* scriptExecutionContext, Blob* blob, const String& encoding, ExceptionCode& ec)
+{
+ if (!blob)
+ return m_result;
+
+ m_encoding = encoding;
+ read(scriptExecutionContext, blob, ReadAsText, ec);
+ return m_result;
+}
+
+const ScriptString& FileReaderSync::readAsDataURL(ScriptExecutionContext* scriptExecutionContext, Blob* blob, ExceptionCode& ec)
+{
+ if (!blob)
+ return m_result;
+
+ read(scriptExecutionContext, blob, ReadAsDataURL, ec);
+ return m_result;
+}
+
+void FileReaderSync::read(ScriptExecutionContext* scriptExecutionContext, Blob* blob, ReadType readType, ExceptionCode& ec)
+{
+ // The blob is read by routing through the request handling layer given the blob url.
+ ResourceRequest request(blob->url());
+ request.setHTTPMethod("GET");
+
+ FileReaderSyncLoader loader((readType == ReadAsBinaryString) ? &m_result : 0);
+ loader.start(scriptExecutionContext, request, ec);
+ if (ec)
+ return;
+
+ switch (readType) {
+ case ReadAsBinaryString:
+ // Nothing to do since we need no conversion.
+ return;
+ case ReadAsText:
+ convertToText(loader.rawData().data(), loader.rawData().size(), m_result);
+ return;
+ case ReadAsDataURL:
+ FileReader::convertToDataURL(loader.rawData(), blob->type(), m_result);
+ return;
+ }
+
+ ASSERT_NOT_REACHED();
+}
+
+void FileReaderSync::convertToText(const char* data, int size, ScriptString& result)
+{
+ if (!size)
+ return;
+
+ // Decode the data.
+ // The File API spec says that we should use the supplied encoding if it is valid. However, we choose to ignore this
+ // requirement in order to be consistent with how WebKit decodes the web content: always have the BOM override the
+ // provided encoding.
+ // FIXME: consider supporting incremental decoding to improve the perf.
+ RefPtr<TextResourceDecoder> decoder = TextResourceDecoder::create("text/plain", m_encoding.isEmpty() ? UTF8Encoding() : TextEncoding(m_encoding));
+ result = decoder->decode(data, size);
+ result += decoder->flush();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(BLOB)
diff --git a/WebCore/fileapi/FileReaderSync.h b/WebCore/fileapi/FileReaderSync.h
new file mode 100644
index 0000000..a517cab
--- /dev/null
+++ b/WebCore/fileapi/FileReaderSync.h
@@ -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.
+ * * 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 FileReaderSync_h
+#define FileReaderSync_h
+
+#if ENABLE(BLOB)
+
+#include "ExceptionCode.h"
+#include "ScriptString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Blob;
+class ScriptExecutionContext;
+
+class FileReaderSync : public RefCounted<FileReaderSync> {
+public:
+ static PassRefPtr<FileReaderSync> create()
+ {
+ return adoptRef(new FileReaderSync());
+ }
+
+ virtual ~FileReaderSync() { }
+
+ const ScriptString& readAsBinaryString(ScriptExecutionContext*, Blob*, ExceptionCode&);
+ const ScriptString& readAsText(ScriptExecutionContext* scriptExecutionContext, Blob* blob, ExceptionCode& ec)
+ {
+ return readAsText(scriptExecutionContext, blob, "", ec);
+ }
+ const ScriptString& readAsText(ScriptExecutionContext*, Blob*, const String& encoding, ExceptionCode&);
+ const ScriptString& readAsDataURL(ScriptExecutionContext*, Blob*, ExceptionCode&);
+
+private:
+ enum ReadType {
+ ReadAsBinaryString,
+ ReadAsText,
+ ReadAsDataURL
+ };
+
+ FileReaderSync();
+
+ void read(ScriptExecutionContext*, Blob*, ReadType, ExceptionCode&);
+ void convertToText(const char* data, int size, ScriptString& result);
+
+ // Like XMLHttpRequest.m_responseText, we keep this as a ScriptString, not a WTF::String.
+ // That's because these strings can easily get huge (they are filled from the file) and
+ // because JS can easily observe many intermediate states, so it's very useful to be
+ // able to share the buffer with JavaScript versions of the whole or partial string.
+ // In contrast, this string doesn't interact much with the rest of the engine so it's not that
+ // big a cost that it isn't a String.
+ ScriptString m_result;
+
+ String m_encoding;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(BLOB)
+
+#endif // FileReaderSync_h
diff --git a/WebCore/fileapi/FileReaderSync.idl b/WebCore/fileapi/FileReaderSync.idl
new file mode 100644
index 0000000..72818b1
--- /dev/null
+++ b/WebCore/fileapi/FileReaderSync.idl
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+module html {
+ interface [
+ Conditional=BLOB,
+ CanBeConstructed,
+ NoStaticTables
+ ] FileReaderSync {
+ [CallWith=ScriptExecutionContext, ConvertScriptString] DOMString readAsBinaryString(in Blob blob)
+ raises(FileException);
+ [CallWith=ScriptExecutionContext, ConvertScriptString] DOMString readAsText(in Blob blob, in [Optional] DOMString encoding)
+ raises(FileException);
+ [CallWith=ScriptExecutionContext, ConvertScriptString] DOMString readAsDataURL(in Blob blob)
+ raises(FileException);
+ };
+}
diff --git a/WebCore/html/FileStreamProxy.cpp b/WebCore/fileapi/FileStreamProxy.cpp
index 30813d3..30813d3 100644
--- a/WebCore/html/FileStreamProxy.cpp
+++ b/WebCore/fileapi/FileStreamProxy.cpp
diff --git a/WebCore/html/FileStreamProxy.h b/WebCore/fileapi/FileStreamProxy.h
index 35a3af8..35a3af8 100644
--- a/WebCore/html/FileStreamProxy.h
+++ b/WebCore/fileapi/FileStreamProxy.h
diff --git a/WebCore/storage/FileSystemCallback.h b/WebCore/fileapi/FileSystemCallback.h
index 63f8416..63f8416 100644
--- a/WebCore/storage/FileSystemCallback.h
+++ b/WebCore/fileapi/FileSystemCallback.h
diff --git a/WebCore/storage/FileSystemCallback.idl b/WebCore/fileapi/FileSystemCallback.idl
index cf686ff..cf686ff 100644
--- a/WebCore/storage/FileSystemCallback.idl
+++ b/WebCore/fileapi/FileSystemCallback.idl
diff --git a/WebCore/storage/FileSystemCallbacks.cpp b/WebCore/fileapi/FileSystemCallbacks.cpp
index ec352dd..741df78 100644
--- a/WebCore/storage/FileSystemCallbacks.cpp
+++ b/WebCore/fileapi/FileSystemCallbacks.cpp
@@ -33,6 +33,8 @@
#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystem.h"
+#include "DOMFilePath.h"
#include "DOMFileSystem.h"
#include "DirectoryEntry.h"
#include "EntriesCallback.h"
@@ -65,7 +67,7 @@ void FileSystemCallbacksBase::didSucceed()
ASSERT_NOT_REACHED();
}
-void FileSystemCallbacksBase::didOpenFileSystem(const String&, const String&)
+void FileSystemCallbacksBase::didOpenFileSystem(const String&, PassOwnPtr<AsyncFileSystem>)
{
// Each subclass must implement an appropriate one.
ASSERT_NOT_REACHED();
@@ -77,7 +79,7 @@ void FileSystemCallbacksBase::didReadMetadata(double)
ASSERT_NOT_REACHED();
}
-void FileSystemCallbacksBase::didReadDirectoryChunkDone(bool)
+void FileSystemCallbacksBase::didReadDirectoryEntries(bool)
{
// Each subclass must implement an appropriate one.
ASSERT_NOT_REACHED();
@@ -89,7 +91,7 @@ void FileSystemCallbacksBase::didReadDirectoryEntry(const String&, bool)
ASSERT_NOT_REACHED();
}
-void FileSystemCallbacksBase::didFail(ExceptionCode code)
+void FileSystemCallbacksBase::didFail(int code)
{
if (m_errorCallback) {
m_errorCallback->handleEvent(FileError::create(code).get());
@@ -131,14 +133,17 @@ EntriesCallbacks::EntriesCallbacks(PassRefPtr<EntriesCallback> successCallback,
void EntriesCallbacks::didReadDirectoryEntry(const String& name, bool isDirectory)
{
+ if (!m_entries)
+ m_entries = EntryArray::create();
if (isDirectory)
- m_entries->append(DirectoryEntry::create(m_fileSystem, m_basePath + "/" + name));
+ m_entries->append(DirectoryEntry::create(m_fileSystem, DOMFilePath::append(m_basePath, name)));
else
- m_entries->append(FileEntry::create(m_fileSystem, m_basePath + "/" + name));
+ m_entries->append(FileEntry::create(m_fileSystem, DOMFilePath::append(m_basePath, name)));
}
-void EntriesCallbacks::didReadDirectoryChunkDone(bool hasMore)
+void EntriesCallbacks::didReadDirectoryEntries(bool hasMore)
{
+ ASSERT(m_entries);
if (m_successCallback) {
m_successCallback->handleEvent(m_entries.get());
m_entries->clear();
@@ -152,16 +157,20 @@ void EntriesCallbacks::didReadDirectoryChunkDone(bool hasMore)
// FileSystemCallbacks --------------------------------------------------------
-FileSystemCallbacks::FileSystemCallbacks(PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+FileSystemCallbacks::FileSystemCallbacks(PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, ScriptExecutionContext* context)
: FileSystemCallbacksBase(errorCallback)
, m_successCallback(successCallback)
+ , m_scriptExecutionContext(context)
{
}
-void FileSystemCallbacks::didOpenFileSystem(const String& name, const String& rootPath)
+void FileSystemCallbacks::didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
{
- if (m_successCallback)
- m_successCallback->handleEvent(DOMFileSystem::create(name, rootPath).get());
+ if (m_successCallback) {
+ ASSERT(asyncFileSystem);
+ m_successCallback->handleEvent(DOMFileSystem::create(m_scriptExecutionContext.get(), name, asyncFileSystem.leakPtr()).get());
+ m_scriptExecutionContext.clear();
+ }
m_successCallback.clear();
}
diff --git a/WebCore/storage/FileSystemCallbacks.h b/WebCore/fileapi/FileSystemCallbacks.h
index e0e78d3..31a2a0c 100644
--- a/WebCore/storage/FileSystemCallbacks.h
+++ b/WebCore/fileapi/FileSystemCallbacks.h
@@ -33,6 +33,7 @@
#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystemCallbacks.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/Vector.h>
@@ -49,10 +50,7 @@ class MetadataCallback;
class ScriptExecutionContext;
class VoidCallback;
-typedef int ExceptionCode;
-
-// A base class for FileSystem callbacks that bundles successCallback, errorCallback and some closure data for the callbacks.
-class FileSystemCallbacksBase : public Noncopyable {
+class FileSystemCallbacksBase : public AsyncFileSystemCallbacks {
public:
virtual ~FileSystemCallbacksBase();
@@ -60,17 +58,17 @@ public:
virtual void didSucceed();
// For FileSystemCallbacks.
- virtual void didOpenFileSystem(const String& name, const String& rootPath);
+ virtual void didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem>);
// For MetadataCallbacks.
virtual void didReadMetadata(double modificationTime);
// For EntriesCallbacks. didReadDirectoryEntry is called each time the API reads an entry, and didReadDirectoryDone is called when a chunk of entries have been read (i.e. good time to call back to the application). If hasMore is true there can be more chunks.
virtual void didReadDirectoryEntry(const String& name, bool isDirectory);
- virtual void didReadDirectoryChunkDone(bool hasMore);
+ virtual void didReadDirectoryEntries(bool hasMore);
// For ErrorCallback.
- virtual void didFail(ExceptionCode code);
+ virtual void didFail(int code);
protected:
FileSystemCallbacksBase(PassRefPtr<ErrorCallback> errorCallback);
@@ -95,7 +93,7 @@ class EntriesCallbacks : public FileSystemCallbacksBase {
public:
EntriesCallbacks(PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>, DOMFileSystem*, const String& basePath);
virtual void didReadDirectoryEntry(const String& name, bool isDirectory);
- virtual void didReadDirectoryChunkDone(bool hasMore);
+ virtual void didReadDirectoryEntries(bool hasMore);
private:
RefPtr<EntriesCallback> m_successCallback;
@@ -106,11 +104,12 @@ private:
class FileSystemCallbacks : public FileSystemCallbacksBase {
public:
- FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>);
- virtual void didOpenFileSystem(const String& name, const String& rootPath);
+ FileSystemCallbacks(PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*);
+ virtual void didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem>);
private:
RefPtr<FileSystemCallback> m_successCallback;
+ RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
};
class MetadataCallbacks : public FileSystemCallbacksBase {
diff --git a/WebCore/html/FileThread.cpp b/WebCore/fileapi/FileThread.cpp
index 4e48cfb..4e48cfb 100644
--- a/WebCore/html/FileThread.cpp
+++ b/WebCore/fileapi/FileThread.cpp
diff --git a/WebCore/html/FileThread.h b/WebCore/fileapi/FileThread.h
index 16acacc..16acacc 100644
--- a/WebCore/html/FileThread.h
+++ b/WebCore/fileapi/FileThread.h
diff --git a/WebCore/html/FileThreadTask.h b/WebCore/fileapi/FileThreadTask.h
index 8a8ffcb..8a8ffcb 100644
--- a/WebCore/html/FileThreadTask.h
+++ b/WebCore/fileapi/FileThreadTask.h
diff --git a/WebCore/fileapi/FileWriter.cpp b/WebCore/fileapi/FileWriter.cpp
new file mode 100644
index 0000000..7ead354
--- /dev/null
+++ b/WebCore/fileapi/FileWriter.cpp
@@ -0,0 +1,199 @@
+/*
+ * 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 ENABLE(FILE_WRITER)
+
+#include "FileWriter.h"
+
+#include "AsyncFileWriter.h"
+#include "Blob.h"
+#include "ExceptionCode.h"
+#include "FileError.h"
+#include "ProgressEvent.h"
+
+namespace WebCore {
+
+FileWriter::FileWriter(ScriptExecutionContext* context)
+ : ActiveDOMObject(context, this)
+ , m_readyState(INIT)
+ , m_position(0)
+ , m_bytesWritten(0)
+ , m_bytesToWrite(0)
+{
+}
+
+void FileWriter::initialize(PassOwnPtr<AsyncFileWriter> writer, long long length)
+{
+ ASSERT(!m_writer);
+ ASSERT(length >= 0);
+ m_writer = writer;
+ m_length = length;
+}
+
+FileWriter::~FileWriter()
+{
+ if (m_readyState == WRITING)
+ stop();
+}
+
+bool FileWriter::hasPendingActivity() const
+{
+ return m_readyState == WRITING || ActiveDOMObject::hasPendingActivity();
+}
+
+bool FileWriter::canSuspend() const
+{
+ // FIXME: It is not currently possible to suspend a FileWriter, so pages with FileWriter can not go into page cache.
+ return false;
+}
+
+void FileWriter::stop()
+{
+ if (m_writer && m_readyState == WRITING)
+ m_writer->abort();
+ m_readyState = DONE;
+}
+
+void FileWriter::write(Blob* data, ExceptionCode& ec)
+{
+ ASSERT(m_writer);
+ if (m_readyState == WRITING) {
+ ec = INVALID_STATE_ERR;
+ m_error = FileError::create(ec);
+ return;
+ }
+
+ m_readyState = WRITING;
+ m_bytesWritten = 0;
+ m_bytesToWrite = data->size();
+ fireEvent(eventNames().writestartEvent);
+ m_writer->write(m_position, data);
+}
+
+void FileWriter::seek(long long position, ExceptionCode& ec)
+{
+ ASSERT(m_writer);
+ if (m_readyState == WRITING) {
+ ec = INVALID_STATE_ERR;
+ m_error = FileError::create(ec);
+ return;
+ }
+
+ m_bytesWritten = 0;
+ m_bytesToWrite = 0;
+ if (position > m_length)
+ position = m_length;
+ else if (position < 0)
+ position = m_length + position;
+ if (position < 0)
+ position = 0;
+ m_position = position;
+}
+
+void FileWriter::truncate(long long position, ExceptionCode& ec)
+{
+ ASSERT(m_writer);
+ if (m_readyState == WRITING || position >= m_length) {
+ ec = INVALID_STATE_ERR;
+ m_error = FileError::create(ec);
+ return;
+ }
+ m_readyState = WRITING;
+ m_bytesWritten = 0;
+ m_bytesToWrite = 0;
+ fireEvent(eventNames().writestartEvent);
+ m_writer->truncate(position);
+}
+
+void FileWriter::abort(ExceptionCode& ec)
+{
+ ASSERT(m_writer);
+ if (m_readyState != WRITING) {
+ ec = INVALID_STATE_ERR;
+ m_error = FileError::create(ec);
+ return;
+ }
+ m_error = FileError::create(ABORT_ERR);
+ m_readyState = DONE;
+ fireEvent(eventNames().errorEvent);
+ fireEvent(eventNames().abortEvent);
+ fireEvent(eventNames().writeendEvent);
+ m_writer->abort();
+}
+
+void FileWriter::didWrite(long long bytes, bool complete)
+{
+ ASSERT(bytes > 0);
+ ASSERT(bytes + m_bytesWritten > 0);
+ ASSERT(bytes + m_bytesWritten <= m_bytesToWrite);
+ m_bytesWritten += bytes;
+ ASSERT((m_bytesWritten == m_bytesToWrite) == complete);
+ m_position += bytes;
+ if (m_position > m_length)
+ m_length = m_position;
+ if (complete)
+ m_readyState = DONE;
+ fireEvent(eventNames().writeEvent);
+ if (complete)
+ fireEvent(eventNames().writeendEvent);
+}
+
+void FileWriter::didTruncate(long long length)
+{
+ ASSERT(length > 0);
+ ASSERT(length >= 0);
+ ASSERT(length < m_length);
+ m_length = length;
+ if (m_position > m_length)
+ m_position = m_length;
+ m_readyState = DONE;
+ fireEvent(eventNames().writeEvent);
+ fireEvent(eventNames().writeendEvent);
+}
+
+void FileWriter::didFail(ExceptionCode ec)
+{
+ m_error = FileError::create(ec);
+ m_readyState = DONE;
+ fireEvent(eventNames().errorEvent);
+ fireEvent(eventNames().writeendEvent);
+}
+
+void FileWriter::fireEvent(const AtomicString& type)
+{
+ // FIXME: the current ProgressEvent uses "unsigned long" for total and loaded attributes. Need to talk with the spec writer to resolve the issue.
+ dispatchEvent(ProgressEvent::create(type, true, static_cast<unsigned>(m_bytesWritten), static_cast<unsigned>(m_bytesToWrite)));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_WRITER)
diff --git a/WebCore/html/FileWriter.h b/WebCore/fileapi/FileWriter.h
index fd5babf..b0af7ea 100644
--- a/WebCore/html/FileWriter.h
+++ b/WebCore/fileapi/FileWriter.h
@@ -35,44 +35,54 @@
#include "ActiveDOMObject.h"
#include "EventTarget.h"
+#include "FileWriterClient.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
namespace WebCore {
+class AsyncFileWriter;
class Blob;
class FileError;
class ScriptExecutionContext;
-// FIXME: This is an empty, do-nothing placeholder for implementation yet to come.
-class FileWriter : public RefCounted<FileWriter>, public ActiveDOMObject, public EventTarget {
+class FileWriter : public RefCounted<FileWriter>, public ActiveDOMObject, public EventTarget, public FileWriterClient {
public:
static PassRefPtr<FileWriter> create(ScriptExecutionContext* context)
{
return adoptRef(new FileWriter(context));
}
+ void initialize(PassOwnPtr<AsyncFileWriter> writer, long long length);
+
enum ReadyState {
- EMPTY = 0,
+ INIT = 0,
WRITING = 1,
DONE = 2
};
- void write(Blob*);
- void seek(long long position);
- void truncate(long long length);
- void abort();
+ void write(Blob* data, ExceptionCode& ec);
+ void seek(long long position, ExceptionCode& ec);
+ void truncate(long long length, ExceptionCode& ec);
+ void abort(ExceptionCode& ec);
+
+ ReadyState readyState() const { return m_readyState; }
+ FileError* error() const { return m_error.get(); }
+ long long position() const { return m_position; }
+ long long length() const { return m_length; }
- ReadyState readyState() const;
- FileError* error() const { return m_error; };
- long long position() const { return 0; };
- long long length() const { return 0; };
+ // FileWriterClient
+ void didWrite(long long bytes, bool complete);
+ void didTruncate(long long length);
+ void didFail(ExceptionCode ec);
// ActiveDOMObject
virtual bool canSuspend() const;
- virtual void stop();
virtual bool hasPendingActivity() const;
+ virtual void stop();
// EventTarget
virtual FileWriter* toFileWriter() { return this; }
@@ -87,7 +97,7 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_ATTRIBUTE_EVENT_LISTENER(writeend);
-
+
private:
FileWriter(ScriptExecutionContext*);
@@ -101,8 +111,16 @@ private:
virtual EventTargetData* eventTargetData() { return &m_eventTargetData; }
virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; }
- RefPtr<FileError*> m_error;
+ void fireEvent(const AtomicString& type);
+
+ RefPtr<FileError> m_error;
EventTargetData m_eventTargetData;
+ OwnPtr<AsyncFileWriter> m_writer;
+ ReadyState m_readyState;
+ long long m_position;
+ long long m_length;
+ long long m_bytesWritten;
+ long long m_bytesToWrite;
};
} // namespace WebCore
diff --git a/WebCore/html/FileWriter.idl b/WebCore/fileapi/FileWriter.idl
index bb95ee1..bb95ee1 100644
--- a/WebCore/html/FileWriter.idl
+++ b/WebCore/fileapi/FileWriter.idl
diff --git a/WebCore/fileapi/FileWriterClient.h b/WebCore/fileapi/FileWriterClient.h
new file mode 100644
index 0000000..091b1c1
--- /dev/null
+++ b/WebCore/fileapi/FileWriterClient.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 FileWriterClient_h
+#define FileWriterClient_h
+
+#if ENABLE(FILE_WRITER)
+
+#include "ExceptionCode.h"
+
+namespace WebCore {
+
+class FileWriterClient {
+public:
+ virtual ~FileWriterClient() {}
+
+ virtual void didWrite(long long bytes, bool complete) = 0;
+ virtual void didTruncate(long long position) = 0;
+ virtual void didFail(ExceptionCode) = 0;
+};
+
+} // namespace
+
+#endif // ENABLE(FILE_WRITER)
+
+#endif // FileWriterClient_h
diff --git a/WebCore/storage/Flags.h b/WebCore/fileapi/Flags.h
index ffe3403..30884fc 100644
--- a/WebCore/storage/Flags.h
+++ b/WebCore/fileapi/Flags.h
@@ -33,6 +33,7 @@
#if ENABLE(FILE_SYSTEM)
+#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
diff --git a/WebCore/storage/Flags.idl b/WebCore/fileapi/Flags.idl
index cfe73d2..cfe73d2 100644
--- a/WebCore/storage/Flags.idl
+++ b/WebCore/fileapi/Flags.idl
diff --git a/WebCore/fileapi/LocalFileSystem.cpp b/WebCore/fileapi/LocalFileSystem.cpp
new file mode 100644
index 0000000..59ec2a1
--- /dev/null
+++ b/WebCore/fileapi/LocalFileSystem.cpp
@@ -0,0 +1,76 @@
+/*
+ * 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 "LocalFileSystem.h"
+
+#if PLATFORM(CHROMIUM)
+#error "Chromium should not compile this file and instead define its own version of these factories."
+#endif
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "CrossThreadTask.h"
+#include "DOMFileSystem.h"
+#include "ErrorCallback.h"
+#include "ExceptionCode.h"
+#include "FileError.h"
+#include "FileSystemCallback.h"
+#include "FileSystemCallbacks.h"
+#include "ScriptExecutionContext.h"
+#include "SecurityOrigin.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+PassRefPtr<LocalFileSystem> LocalFileSystem::create(const String& basePath)
+{
+ return adoptRef(new LocalFileSystem(basePath));
+}
+
+static void openFileSystem(ScriptExecutionContext*, const String& basePath, const String& identifier, AsyncFileSystem::Type type, PassOwnPtr<FileSystemCallbacks> callbacks)
+{
+ AsyncFileSystem::openFileSystem(basePath, identifier, type, callbacks);
+}
+
+void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ if (type != AsyncFileSystem::Temporary && type != AsyncFileSystem::Persistent) {
+ DOMFileSystem::scheduleCallback(context, errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+ return;
+ }
+
+ // AsyncFileSystem::openFileSystem calls callbacks synchronously, so the method needs to be called asynchronously.
+ context->postTask(createCallbackTask(&openFileSystem, m_basePath, context->securityOrigin()->databaseIdentifier(), type, new FileSystemCallbacks(successCallback, errorCallback, context)));
+}
+
+} // namespace
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/storage/DOMFileSystem.h b/WebCore/fileapi/LocalFileSystem.h
index b87aaaf..48cfa8f 100644
--- a/WebCore/storage/DOMFileSystem.h
+++ b/WebCore/fileapi/LocalFileSystem.h
@@ -28,38 +28,40 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DOMFileSystem_h
-#define DOMFileSystem_h
+#ifndef LocalFileSystem_h
+#define LocalFileSystem_h
#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystem.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
-class DirectoryEntry;
+class ErrorCallback;
+class FileSystemCallback;
+class ScriptExecutionContext;
-class DOMFileSystem : public RefCounted<DOMFileSystem> {
+class LocalFileSystem : public RefCounted<LocalFileSystem> {
public:
- static PassRefPtr<DOMFileSystem> create(const String& name, const String& rootPath)
- {
- return adoptRef(new DOMFileSystem(name, rootPath));
- }
+ static PassRefPtr<LocalFileSystem> create(const String& basePath);
+ virtual ~LocalFileSystem() { }
- const String& name() const { return m_name; }
- PassRefPtr<DirectoryEntry> root();
+ void requestFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, long long size, PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>);
-private:
- DOMFileSystem(const String& name, const String& rootPath);
+protected:
+ LocalFileSystem(const String& basePath)
+ : m_basePath(basePath)
+ {
+ }
- String m_rootPath;
- String m_name;
+ String m_basePath;
};
} // namespace
#endif // ENABLE(FILE_SYSTEM)
-#endif // DOMFileSystem_h
+#endif // LocalFileSystem_h
diff --git a/WebCore/storage/Metadata.h b/WebCore/fileapi/Metadata.h
index 0b06f90..1fec943 100644
--- a/WebCore/storage/Metadata.h
+++ b/WebCore/fileapi/Metadata.h
@@ -43,7 +43,9 @@ public:
{
return adoptRef(new Metadata(modificationTime));
}
- double modificationTime() const { return m_modificationTime; }
+
+ // Needs to return epoch time in milliseconds for Date.
+ double modificationTime() const { return m_modificationTime * 1000.0; }
private:
Metadata(double modificationTime)
diff --git a/WebCore/storage/Metadata.idl b/WebCore/fileapi/Metadata.idl
index 711fae8..a5a90bc 100644
--- a/WebCore/storage/Metadata.idl
+++ b/WebCore/fileapi/Metadata.idl
@@ -32,6 +32,6 @@ module storage {
interface [
Conditional=FILE_SYSTEM
] Metadata {
- readonly attribute double modificationTime;
+ readonly attribute Date modificationTime;
};
}
diff --git a/WebCore/storage/MetadataCallback.h b/WebCore/fileapi/MetadataCallback.h
index 3d57400..3d57400 100644
--- a/WebCore/storage/MetadataCallback.h
+++ b/WebCore/fileapi/MetadataCallback.h
diff --git a/WebCore/storage/MetadataCallback.idl b/WebCore/fileapi/MetadataCallback.idl
index 44ca180..44ca180 100644
--- a/WebCore/storage/MetadataCallback.idl
+++ b/WebCore/fileapi/MetadataCallback.idl
diff --git a/WebCore/fileapi/ThreadableBlobRegistry.cpp b/WebCore/fileapi/ThreadableBlobRegistry.cpp
new file mode 100644
index 0000000..034557b
--- /dev/null
+++ b/WebCore/fileapi/ThreadableBlobRegistry.cpp
@@ -0,0 +1,130 @@
+/*
+ * 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 "ThreadableBlobRegistry.h"
+
+#include "BlobData.h"
+#include "BlobRegistry.h"
+#include "ScriptExecutionContext.h"
+#include <wtf/MainThread.h>
+
+namespace WebCore {
+
+struct BlobRegistryContext {
+ BlobRegistryContext(const KURL& url, PassOwnPtr<BlobData> blobData)
+ : url(url.copy())
+ , blobData(blobData)
+ {
+ }
+
+ BlobRegistryContext(const KURL& url, const KURL& srcURL)
+ : url(url.copy())
+ , srcURL(srcURL.copy())
+ {
+ }
+
+ BlobRegistryContext(const KURL& url)
+ : url(url.copy())
+ {
+ }
+
+ KURL url;
+ KURL srcURL;
+ OwnPtr<BlobData> blobData;
+};
+
+#if ENABLE(BLOB)
+
+static void registerBlobURLTask(void* context)
+{
+ OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
+ blobRegistry().registerBlobURL(blobRegistryContext->url, blobRegistryContext->blobData.release());
+}
+
+void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext*, const KURL& url, PassOwnPtr<BlobData> blobData)
+{
+ if (isMainThread())
+ blobRegistry().registerBlobURL(url, blobData);
+ else {
+ OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url, blobData));
+ callOnMainThread(&registerBlobURLTask, context.leakPtr());
+ }
+}
+
+static void registerBlobURLFromTask(void* context)
+{
+ OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
+ blobRegistry().registerBlobURL(blobRegistryContext->url, blobRegistryContext->srcURL);
+}
+
+void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext*, const KURL& url, const KURL& srcURL)
+{
+ if (isMainThread())
+ blobRegistry().registerBlobURL(url, srcURL);
+ else {
+ OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url, srcURL));
+ callOnMainThread(&registerBlobURLFromTask, context.leakPtr());
+ }
+}
+
+static void unregisterBlobURLTask(void* context)
+{
+ OwnPtr<BlobRegistryContext> blobRegistryContext = adoptPtr(static_cast<BlobRegistryContext*>(context));
+ blobRegistry().unregisterBlobURL(blobRegistryContext->url);
+}
+
+void ThreadableBlobRegistry::unregisterBlobURL(ScriptExecutionContext*, const KURL& url)
+{
+ if (isMainThread())
+ blobRegistry().unregisterBlobURL(url);
+ else {
+ OwnPtr<BlobRegistryContext> context = adoptPtr(new BlobRegistryContext(url));
+ callOnMainThread(&unregisterBlobURLTask, context.leakPtr());
+ }
+}
+
+#else
+
+void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext*, const KURL&, PassOwnPtr<BlobData>)
+{
+}
+
+void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext*, const KURL&, const KURL&)
+{
+}
+
+void ThreadableBlobRegistry::unregisterBlobURL(ScriptExecutionContext*, const KURL&)
+{
+}
+#endif // ENABL(BLOB)
+
+} // namespace WebCore
diff --git a/WebCore/html/ThreadableBlobRegistry.h b/WebCore/fileapi/ThreadableBlobRegistry.h
index 7dce6bb..7dce6bb 100644
--- a/WebCore/html/ThreadableBlobRegistry.h
+++ b/WebCore/fileapi/ThreadableBlobRegistry.h
diff --git a/WebCore/history/CachedFrame.cpp b/WebCore/history/CachedFrame.cpp
index 1f4895f..f0a4fed 100644
--- a/WebCore/history/CachedFrame.cpp
+++ b/WebCore/history/CachedFrame.cpp
@@ -33,6 +33,7 @@
#include "Frame.h"
#include "FrameLoaderClient.h"
#include "FrameView.h"
+#include "HistoryItem.h"
#include "Logging.h"
#include "PageTransitionEvent.h"
#include <wtf/text/CString.h>
@@ -106,6 +107,10 @@ void CachedFrameBase::restore()
m_childFrames[i]->open();
m_document->enqueuePageshowEvent(PageshowEventPersisted);
+
+ HistoryItem* historyItem = frame->loader()->history()->currentItem();
+ m_document->enqueuePopstateEvent(historyItem && historyItem->stateObject() ? historyItem->stateObject() : SerializedScriptValue::nullValue());
+
#if ENABLE(TOUCH_EVENTS)
if (m_document->hasListenerType(Document::TOUCH_LISTENER))
m_document->page()->chrome()->client()->needTouchEvents(true);
diff --git a/WebCore/history/HistoryItem.cpp b/WebCore/history/HistoryItem.cpp
index 42adcfb..8a84e2e 100644
--- a/WebCore/history/HistoryItem.cpp
+++ b/WebCore/history/HistoryItem.cpp
@@ -446,6 +446,16 @@ HistoryItem* HistoryItem::childItemWithTarget(const String& target) const
return 0;
}
+HistoryItem* HistoryItem::childItemWithDocumentSequenceNumber(long long number) const
+{
+ unsigned size = m_children.size();
+ for (unsigned i = 0; i < size; ++i) {
+ if (m_children[i]->documentSequenceNumber() == number)
+ return m_children[i].get();
+ }
+ return 0;
+}
+
// <rdar://problem/4895849> HistoryItem::findTargetItem() should be replaced with a non-recursive method.
HistoryItem* HistoryItem::findTargetItem()
{
@@ -480,6 +490,8 @@ void HistoryItem::clearChildren()
m_children.clear();
}
+// Does a recursive check that this item and its descendants have the same
+// document sequence numbers as the other item.
bool HistoryItem::hasSameDocuments(HistoryItem* otherItem)
{
if (documentSequenceNumber() != otherItem->documentSequenceNumber())
@@ -487,12 +499,32 @@ bool HistoryItem::hasSameDocuments(HistoryItem* otherItem)
if (children().size() != otherItem->children().size())
return false;
-
+
for (size_t i = 0; i < children().size(); i++) {
- if (!children()[i]->hasSameDocuments(otherItem->children()[i].get()))
+ HistoryItem* child = children()[i].get();
+ HistoryItem* otherChild = otherItem->childItemWithDocumentSequenceNumber(child->documentSequenceNumber());
+ if (!otherChild || !child->hasSameDocuments(otherChild))
return false;
}
-
+
+ return true;
+}
+
+// Does a non-recursive check that this item and its immediate children have the
+// same frames as the other item.
+bool HistoryItem::hasSameFrames(HistoryItem* otherItem)
+{
+ if (target() != otherItem->target())
+ return false;
+
+ if (children().size() != otherItem->children().size())
+ return false;
+
+ for (size_t i = 0; i < children().size(); i++) {
+ if (!otherItem->childItemWithTarget(children()[i]->target()))
+ return false;
+ }
+
return true;
}
diff --git a/WebCore/history/HistoryItem.h b/WebCore/history/HistoryItem.h
index dfdbc43..b11a92e 100644
--- a/WebCore/history/HistoryItem.h
+++ b/WebCore/history/HistoryItem.h
@@ -155,12 +155,14 @@ public:
void addChildItem(PassRefPtr<HistoryItem>);
void setChildItem(PassRefPtr<HistoryItem>);
HistoryItem* childItemWithTarget(const String&) const;
+ HistoryItem* childItemWithDocumentSequenceNumber(long long number) const;
HistoryItem* targetItem();
const HistoryItemVector& children() const;
bool hasChildren() const;
void clearChildren();
bool hasSameDocuments(HistoryItem* otherItem);
+ bool hasSameFrames(HistoryItem* otherItem);
// This should not be called directly for HistoryItems that are already included
// in GlobalHistory. The WebKit api for this is to use -[WebHistory setLastVisitedTimeInterval:forItem:] instead.
diff --git a/WebCore/html/DateComponents.cpp b/WebCore/html/DateComponents.cpp
index 39dd733..8dced1d 100644
--- a/WebCore/html/DateComponents.cpp
+++ b/WebCore/html/DateComponents.cpp
@@ -41,10 +41,15 @@ using namespace std;
namespace WebCore {
-// The oldest day of Gregorian Calendar is 1582-10-15. We don't support dates older than it.
-static const int gregorianStartYear = 1582;
-static const int gregorianStartMonth = 9; // This is October, since months are 0 based.
-static const int gregorianStartDay = 15;
+// HTML5 uses ISO-8601 format with year >= 1. Gregorian calendar started in
+// 1582. However, we need to support 0001-01-01 in Gregorian calendar rule.
+static const int minimumYear = 1;
+// Date in ECMAScript can't represent dates later than 275760-09-13T00:00Z.
+// So, we have the same upper limit in HTML5 dates.
+static const int maximumYear = 275760;
+static const int maximumMonthInMaximumYear = 8; // This is September, since months are 0 based.
+static const int maximumDayInMaximumMonth = 13;
+static const int maximumWeekInMaximumYear = 37; // The week of 275760-09-13
static const int daysInMonth[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
@@ -134,19 +139,47 @@ bool DateComponents::parseYear(const UChar* src, unsigned length, unsigned start
int year;
if (!toInt(src, length, start, digitsLength, year))
return false;
- // No support for years before Gregorian calendar.
- if (year < gregorianStartYear)
+ if (year < minimumYear || year > maximumYear)
return false;
m_year = year;
end = start + digitsLength;
return true;
}
-static bool beforeGregorianStartDate(int year, int month, int monthDay)
+static bool withinHTMLDateLimits(int year, int month)
{
- return year < gregorianStartYear
- || (year == gregorianStartYear && month < gregorianStartMonth)
- || (year == gregorianStartYear && month == gregorianStartMonth && monthDay < gregorianStartDay);
+ if (year < minimumYear)
+ return false;
+ if (year < maximumYear)
+ return true;
+ return month <= maximumMonthInMaximumYear;
+}
+
+static bool withinHTMLDateLimits(int year, int month, int monthDay)
+{
+ if (year < minimumYear)
+ return false;
+ if (year < maximumYear)
+ return true;
+ if (month < maximumMonthInMaximumYear)
+ return true;
+ return monthDay <= maximumDayInMaximumMonth;
+}
+
+static bool withinHTMLDateLimits(int year, int month, int monthDay, int hour, int minute, int second, int millisecond)
+{
+ if (year < minimumYear)
+ return false;
+ if (year < maximumYear)
+ return true;
+ if (month < maximumMonthInMaximumYear)
+ return true;
+ if (monthDay < maximumDayInMaximumMonth)
+ return true;
+ if (monthDay > maximumDayInMaximumMonth)
+ return false;
+ // (year, month, monthDay) = (maximumYear, maximumMonthInMaximumYear, maximumDayInMaximumMonth)
+ return !hour && !minute && !second && !millisecond;
}
bool DateComponents::addDay(int dayDiff)
@@ -167,12 +200,12 @@ bool DateComponents::addDay(int dayDiff)
if (month >= 12) { // month is 0-origin.
month = 0;
++year;
- if (year < 0) // Check for overflow.
- return false;
}
maxDay = maxDayOfMonth(year, month);
}
}
+ if (!withinHTMLDateLimits(year, month, day))
+ return false;
m_year = year;
m_month = month;
} else if (day < 1) {
@@ -189,11 +222,14 @@ bool DateComponents::addDay(int dayDiff)
}
day = maxDayOfMonth(year, month);
}
- if (beforeGregorianStartDate(year, month, day))
- return false;
}
+ if (!withinHTMLDateLimits(year, month, day))
+ return false;
m_year = year;
m_month = month;
+ } else {
+ if (!withinHTMLDateLimits(m_year, m_month, day))
+ return false;
}
m_monthDay = day;
return true;
@@ -201,8 +237,12 @@ bool DateComponents::addDay(int dayDiff)
bool DateComponents::addMinute(int minute)
{
+ // This function is used to adjust timezone offset. So m_year, m_month,
+ // m_monthDay have values between the lower and higher limits.
+ ASSERT(withinHTMLDateLimits(m_year, m_month, m_monthDay));
+
int carry;
- // min can be negative or greater than 59.
+ // minute can be negative or greater than 59.
minute += m_minute;
if (minute > 59) {
carry = minute / 60;
@@ -213,6 +253,8 @@ bool DateComponents::addMinute(int minute)
carry = -carry;
ASSERT(minute >= 0 && minute <= 59);
} else {
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, minute, m_second, m_millisecond))
+ return false;
m_minute = minute;
return true;
}
@@ -227,12 +269,16 @@ bool DateComponents::addMinute(int minute)
carry = -carry;
ASSERT(hour >= 0 && hour <= 23);
} else {
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, hour, minute, m_second, m_millisecond))
+ return false;
m_minute = minute;
m_hour = hour;
return true;
}
if (!addDay(carry))
return false;
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, hour, minute, m_second, m_millisecond))
+ return false;
m_minute = minute;
m_hour = hour;
return true;
@@ -298,8 +344,7 @@ bool DateComponents::parseMonth(const UChar* src, unsigned length, unsigned star
if (!toInt(src, length, index, 2, month) || month < 1 || month > 12)
return false;
--month;
- // No support for months before Gregorian calendar.
- if (beforeGregorianStartDate(m_year, month, gregorianStartDay))
+ if (!withinHTMLDateLimits(m_year, month))
return false;
m_month = month;
end = index + 2;
@@ -323,8 +368,7 @@ bool DateComponents::parseDate(const UChar* src, unsigned length, unsigned start
int day;
if (!toInt(src, length, index, 2, day) || day < 1 || day > maxDayOfMonth(m_year, m_month))
return false;
- // No support for dates before Gregorian calendar.
- if (m_year == gregorianStartYear && m_month == gregorianStartMonth && day < gregorianStartDay)
+ if (!withinHTMLDateLimits(m_year, m_month, day))
return false;
m_monthDay = day;
end = index + 2;
@@ -352,8 +396,7 @@ bool DateComponents::parseWeek(const UChar* src, unsigned length, unsigned start
int week;
if (!toInt(src, length, index, 2, week) || week < 1 || week > maxWeekNumberInYear())
return false;
- // No support for years older than or equals to Gregorian calendar start year.
- if (m_year <= gregorianStartYear)
+ if (m_year == maximumYear && week > maximumWeekInMaximumYear)
return false;
m_week = week;
end = index + 2;
@@ -429,6 +472,8 @@ bool DateComponents::parseDateTimeLocal(const UChar* src, unsigned length, unsig
++index;
if (!parseTime(src, length, index, end))
return false;
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, m_minute, m_second, m_millisecond))
+ return false;
m_type = DateTimeLocal;
return true;
}
@@ -448,6 +493,8 @@ bool DateComponents::parseDateTime(const UChar* src, unsigned length, unsigned s
return false;
if (!parseTimeZone(src, length, index, end))
return false;
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, m_minute, m_second, m_millisecond))
+ return false;
m_type = DateTime;
return true;
}
@@ -485,7 +532,7 @@ bool DateComponents::setMillisecondsSinceEpochForDate(double ms)
return false;
if (!setMillisecondsSinceEpochForDateInternal(round(ms)))
return false;
- if (beforeGregorianStartDate(m_year, m_month, m_monthDay))
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay))
return false;
m_type = Date;
return true;
@@ -500,7 +547,7 @@ bool DateComponents::setMillisecondsSinceEpochForDateTime(double ms)
setMillisecondsSinceMidnightInternal(positiveFmod(ms, msPerDay));
if (!setMillisecondsSinceEpochForDateInternal(ms))
return false;
- if (beforeGregorianStartDate(m_year, m_month, m_monthDay))
+ if (!withinHTMLDateLimits(m_year, m_month, m_monthDay, m_hour, m_minute, m_second, m_millisecond))
return false;
m_type = DateTime;
return true;
@@ -522,8 +569,7 @@ bool DateComponents::setMillisecondsSinceEpochForMonth(double ms)
return false;
if (!setMillisecondsSinceEpochForDateInternal(round(ms)))
return false;
- // Ignore m_monthDay updated by setMillisecondsSinceEpochForDateInternal().
- if (beforeGregorianStartDate(m_year, m_month, gregorianStartDay))
+ if (!withinHTMLDateLimits(m_year, m_month))
return false;
m_type = Month;
return true;
@@ -546,11 +592,11 @@ bool DateComponents::setMonthsSinceEpoch(double months)
months = round(months);
double doubleMonth = positiveFmod(months, 12);
double doubleYear = 1970 + (months - doubleMonth) / 12;
- if (doubleYear < gregorianStartYear || numeric_limits<int>::max() < doubleYear)
+ if (doubleYear < minimumYear || maximumYear < doubleYear)
return false;
int year = static_cast<int>(doubleYear);
int month = static_cast<int>(doubleMonth);
- if (beforeGregorianStartDate(year, month, gregorianStartDay))
+ if (!withinHTMLDateLimits(year, month))
return false;
m_year = year;
m_month = month;
@@ -576,8 +622,7 @@ bool DateComponents::setMillisecondsSinceEpochForWeek(double ms)
ms = round(ms);
m_year = msToYear(ms);
- // We don't support gregorianStartYear. Week numbers are undefined in that year.
- if (m_year <= gregorianStartYear)
+ if (m_year < minimumYear || m_year > maximumYear)
return false;
int yearDay = dayInYear(ms, m_year);
@@ -585,7 +630,7 @@ bool DateComponents::setMillisecondsSinceEpochForWeek(double ms)
if (yearDay < offset) {
// The day belongs to the last week of the previous year.
m_year--;
- if (m_year <= gregorianStartYear)
+ if (m_year <= minimumYear)
return false;
m_week = maxWeekNumberInYear();
} else {
@@ -594,6 +639,8 @@ bool DateComponents::setMillisecondsSinceEpochForWeek(double ms)
m_year++;
m_week = 1;
}
+ if (m_year > maximumYear || (m_year == maximumYear && m_week > maximumWeekInMaximumYear))
+ return false;
}
m_type = Week;
return true;
diff --git a/WebCore/html/DateComponents.h b/WebCore/html/DateComponents.h
index efc3248..9bce0c3 100644
--- a/WebCore/html/DateComponents.h
+++ b/WebCore/html/DateComponents.h
@@ -137,17 +137,16 @@ public:
// Minimum and maxmimum limits for setMillisecondsSince*(),
// setMonthsSinceEpoch(), millisecondsSinceEpoch(), and monthsSinceEpoch().
- static inline double minimumDate() { return -12219292800000.0; } // This means 1582-10-15T00:00Z.
- static inline double minimumDateTime() { return -12219292800000.0; } // ditto.
- static inline double minimumMonth() { return (1582.0 - 1970) * 12 + 10 - 1; } // 1582-10
+ static inline double minimumDate() { return -62135596800000.0; } // 0001-01-01T00:00Z
+ static inline double minimumDateTime() { return -62135596800000.0; } // ditto.
+ static inline double minimumMonth() { return (1 - 1970) * 12.0 + 1 - 1; } // 0001-01
static inline double minimumTime() { return 0; } // 00:00:00.000
- static inline double minimumWeek() { return -12212380800000.0; } // 1583-01-03, the first Monday of 1583.
- static inline double maximumDate() { return std::numeric_limits<double>::max(); }
- static inline double maximumDateTime() { return std::numeric_limits<double>::max(); }
- // DateComponents::m_year can't represent a year greater than INT_MAX.
- static inline double maximumMonth() { return (std::numeric_limits<int>::max() - 1970) * 12.0 + 12 - 1; }
+ static inline double minimumWeek() { return -62135596800000.0; } // 0001-01-01, the first Monday of 0001.
+ static inline double maximumDate() { return 8640000000000000.0; } // 275760-09-13T00:00Z
+ static inline double maximumDateTime() { return 8640000000000000.0; } // ditto.
+ static inline double maximumMonth() { return (275760 - 1970) * 12.0 + 9 - 1; } // 275760-09
static inline double maximumTime() { return 86399999; } // 23:59:59.999
- static inline double maximumWeek() { return std::numeric_limits<double>::max(); }
+ static inline double maximumWeek() { return 8639999568000000.0; } // 275760-09-08, the Monday of the week including 275760-09-13.
private:
// Returns the maximum week number in this DateComponents's year.
diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp
deleted file mode 100644
index 253cb4d..0000000
--- a/WebCore/html/File.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "File.h"
-
-#include "BlobData.h"
-#include "FileSystem.h"
-#include "MIMETypeRegistry.h"
-
-namespace WebCore {
-
-File::File(ScriptExecutionContext* scriptExecutionContext, const String& path)
- : Blob(scriptExecutionContext, path)
-{
- Init();
-}
-
-File::File(ScriptExecutionContext* scriptExecutionContext, const String& path, const KURL& url, const String& type)
- : Blob(scriptExecutionContext, url, type, BlobDataItem::toEndOfFile)
-{
- // FIXME: To be removed when we switch to using BlobData.
- m_items.append(FileBlobItem::create(path));
-}
-
-#if ENABLE(DIRECTORY_UPLOAD)
-File::File(ScriptExecutionContext* scriptExecutionContext, const String& relativePath, const String& filePath)
- : Blob(scriptExecutionContext, 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();
- size_t index = fileName.reverseFind('.');
- if (index != notFound)
- m_type = MIMETypeRegistry::getMIMETypeForExtension(fileName.substring(index + 1));
-}
-
-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/FormDataList.cpp b/WebCore/html/FormDataList.cpp
index 94d0031..4503fd2 100644
--- a/WebCore/html/FormDataList.cpp
+++ b/WebCore/html/FormDataList.cpp
@@ -33,20 +33,17 @@ FormDataList::FormDataList(const TextEncoding& c)
void FormDataList::appendString(const String& s)
{
CString cstr = m_encoding.encode(s.characters(), s.length(), EntitiesForUnencodables);
- m_items.append(StringBlobItem::create(normalizeLineEndingsToCRLF(cstr)));
+ m_items.append(normalizeLineEndingsToCRLF(cstr));
}
void FormDataList::appendString(const CString& s)
{
- m_items.append(StringBlobItem::create(s));
+ m_items.append(s);
}
-void FormDataList::appendBlob(const String& key, PassRefPtr<Blob> blob)
+void FormDataList::appendBlob(PassRefPtr<Blob> blob)
{
- appendString(key);
- const BlobItemList& items = blob->items();
- for (size_t i = 0; i < items.size(); ++i)
- m_items.append(items.at(i));
+ m_items.append(blob);
}
} // namespace
diff --git a/WebCore/html/FormDataList.h b/WebCore/html/FormDataList.h
index 38b07f9..8e1a937 100644
--- a/WebCore/html/FormDataList.h
+++ b/WebCore/html/FormDataList.h
@@ -30,6 +30,20 @@ namespace WebCore {
class FormDataList {
public:
+ class Item {
+ public:
+ Item() { }
+ Item(const WTF::CString& data) : m_data(data) { }
+ Item(PassRefPtr<Blob> blob) : m_blob(blob) { }
+
+ const WTF::CString& data() const { return m_data; }
+ Blob* blob() const { return m_blob.get(); }
+
+ private:
+ WTF::CString m_data;
+ RefPtr<Blob> m_blob;
+ };
+
FormDataList(const TextEncoding&);
void appendData(const String& key, const String& value)
@@ -47,17 +61,22 @@ public:
appendString(key);
appendString(String::number(value));
}
- void appendBlob(const String& key, PassRefPtr<Blob>);
+ void appendBlob(const String& key, PassRefPtr<Blob> blob)
+ {
+ appendString(key);
+ appendBlob(blob);
+ }
- const BlobItemList& items() const { return m_items; }
+ const Vector<Item>& items() const { return m_items; }
const TextEncoding& encoding() const { return m_encoding; }
private:
void appendString(const CString&);
void appendString(const String&);
+ void appendBlob(PassRefPtr<Blob>);
TextEncoding m_encoding;
- BlobItemList m_items;
+ Vector<Item> m_items;
};
} // namespace WebCore
diff --git a/WebCore/html/HTMLAnchorElement.idl b/WebCore/html/HTMLAnchorElement.idl
index d57fcb6..f5e1bd9 100644
--- a/WebCore/html/HTMLAnchorElement.idl
+++ b/WebCore/html/HTMLAnchorElement.idl
@@ -24,7 +24,7 @@ module html {
attribute [Reflect] DOMString accessKey;
attribute [Reflect] DOMString charset;
attribute [Reflect] DOMString coords;
- attribute [Reflect,URL] DOMString href;
+ attribute [Reflect, URL] DOMString href;
attribute [Reflect] DOMString hreflang;
attribute [Reflect] DOMString name;
attribute [Reflect] DOMString rel;
diff --git a/WebCore/html/HTMLAreaElement.idl b/WebCore/html/HTMLAreaElement.idl
index 64c6468..a77e615 100644
--- a/WebCore/html/HTMLAreaElement.idl
+++ b/WebCore/html/HTMLAreaElement.idl
@@ -24,7 +24,7 @@ module html {
attribute [Reflect] DOMString accessKey;
attribute [Reflect] DOMString alt;
attribute [Reflect] DOMString coords;
- attribute [Reflect,URL] DOMString href;
+ attribute [Reflect, URL] DOMString href;
attribute [Reflect] boolean noHref;
attribute [Reflect] DOMString shape;
attribute [Reflect] DOMString target;
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
index b4cdb02..103d2c6 100644
--- a/WebCore/html/HTMLAttributeNames.in
+++ b/WebCore/html/HTMLAttributeNames.in
@@ -223,6 +223,7 @@ onwebkitanimationiteration
onwebkitanimationend
onwebkitbeginfullscreen
onwebkitendfullscreen
+onwebkitfullscreenchange
onwebkittransitionend
optimum
pattern
diff --git a/WebCore/html/HTMLBaseElement.cpp b/WebCore/html/HTMLBaseElement.cpp
index a3095d1..0dd16fa 100644
--- a/WebCore/html/HTMLBaseElement.cpp
+++ b/WebCore/html/HTMLBaseElement.cpp
@@ -24,11 +24,8 @@
#include "HTMLBaseElement.h"
#include "Attribute.h"
-#include "CSSHelper.h"
#include "Document.h"
-#include "Frame.h"
#include "HTMLNames.h"
-#include "XSSAuditor.h"
namespace WebCore {
@@ -45,47 +42,34 @@ PassRefPtr<HTMLBaseElement> HTMLBaseElement::create(const QualifiedName& tagName
return adoptRef(new HTMLBaseElement(tagName, document));
}
-void HTMLBaseElement::parseMappedAttribute(Attribute* attr)
+void HTMLBaseElement::parseMappedAttribute(Attribute* attribute)
{
- if (attr->name() == hrefAttr) {
- m_hrefAttrValue = attr->value();
- m_href = deprecatedParseURL(attr->value());
- process();
- } else if (attr->name() == targetAttr) {
- m_target = attr->value();
- process();
- } else
- HTMLElement::parseMappedAttribute(attr);
+ if (attribute->name() == hrefAttr || attribute->name() == targetAttr)
+ document()->processBaseElement();
+ else
+ HTMLElement::parseMappedAttribute(attribute);
}
void HTMLBaseElement::insertedIntoDocument()
{
HTMLElement::insertedIntoDocument();
- process();
+ document()->processBaseElement();
}
void HTMLBaseElement::removedFromDocument()
{
HTMLElement::removedFromDocument();
-
- // Since the document doesn't have a base element, clear the base URL and target.
- // FIXME: This does not handle the case of multiple base elements correctly.
- document()->setBaseElementURL(KURL());
- document()->setBaseElementTarget(String());
+ document()->processBaseElement();
}
-void HTMLBaseElement::process()
+bool HTMLBaseElement::isURLAttribute(Attribute* attribute) const
{
- if (!inDocument())
- return;
-
- if (!m_href.isEmpty() && (!document()->frame() || document()->frame()->script()->xssAuditor()->canSetBaseElementURL(m_hrefAttrValue)))
- document()->setBaseElementURL(KURL(document()->url(), m_href));
-
- if (!m_target.isEmpty())
- document()->setBaseElementTarget(m_target);
+ return attribute->name() == hrefAttr;
+}
- // FIXME: Changing a document's base URL should probably automatically update the resolved relative URLs of all images, stylesheets, etc.
+String HTMLBaseElement::target() const
+{
+ return fastGetAttribute(targetAttr);
}
}
diff --git a/WebCore/html/HTMLBaseElement.h b/WebCore/html/HTMLBaseElement.h
index aa1454f..fd3cef6 100644
--- a/WebCore/html/HTMLBaseElement.h
+++ b/WebCore/html/HTMLBaseElement.h
@@ -34,20 +34,11 @@ public:
private:
HTMLBaseElement(const QualifiedName&, Document*);
- virtual String target() const { return m_target; }
-
+ virtual String target() const;
+ virtual bool isURLAttribute(Attribute*) const;
virtual void parseMappedAttribute(Attribute*);
virtual void insertedIntoDocument();
virtual void removedFromDocument();
-
- void process();
-
- void setHref(const String&);
- void setTarget(const String&);
-
- String m_hrefAttrValue;
- String m_href;
- String m_target;
};
} // namespace
diff --git a/WebCore/html/HTMLBaseElement.idl b/WebCore/html/HTMLBaseElement.idl
index 8bf82a9..2750c9e 100644
--- a/WebCore/html/HTMLBaseElement.idl
+++ b/WebCore/html/HTMLBaseElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 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
@@ -20,7 +20,7 @@
module html {
interface HTMLBaseElement : HTMLElement {
- attribute [Reflect] DOMString href;
+ attribute [Reflect, URL] DOMString href;
attribute [Reflect] DOMString target;
};
diff --git a/WebCore/html/HTMLBlockquoteElement.cpp b/WebCore/html/HTMLBlockquoteElement.cpp
index cacd8b4..726bc0f 100644
--- a/WebCore/html/HTMLBlockquoteElement.cpp
+++ b/WebCore/html/HTMLBlockquoteElement.cpp
@@ -45,4 +45,9 @@ PassRefPtr<HTMLBlockquoteElement> HTMLBlockquoteElement::create(const QualifiedN
return adoptRef(new HTMLBlockquoteElement(tagName, document));
}
+bool HTMLBlockquoteElement::isURLAttribute(Attribute* attribute) const
+{
+ return attribute->name() == citeAttr;
+}
+
}
diff --git a/WebCore/html/HTMLBlockquoteElement.h b/WebCore/html/HTMLBlockquoteElement.h
index 194fe54..6566117 100644
--- a/WebCore/html/HTMLBlockquoteElement.h
+++ b/WebCore/html/HTMLBlockquoteElement.h
@@ -34,6 +34,8 @@ public:
private:
HTMLBlockquoteElement(const QualifiedName&, Document*);
+
+ virtual bool isURLAttribute(Attribute*) const;
};
} // namespace WebCore
diff --git a/WebCore/html/HTMLBlockquoteElement.idl b/WebCore/html/HTMLBlockquoteElement.idl
index f0045c7..5a319a3 100644
--- a/WebCore/html/HTMLBlockquoteElement.idl
+++ b/WebCore/html/HTMLBlockquoteElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 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
@@ -20,7 +20,7 @@
module html {
interface HTMLBlockquoteElement : HTMLElement {
- attribute [Reflect] DOMString cite;
+ attribute [Reflect, URL] DOMString cite;
};
}
diff --git a/WebCore/html/HTMLBodyElement.cpp b/WebCore/html/HTMLBodyElement.cpp
index 35dbd9d..98e0d6f 100644
--- a/WebCore/html/HTMLBodyElement.cpp
+++ b/WebCore/html/HTMLBodyElement.cpp
@@ -73,7 +73,7 @@ void HTMLBodyElement::createLinkDecl()
m_linkDecl = CSSMutableStyleDeclaration::create();
m_linkDecl->setParent(document()->elementSheet());
m_linkDecl->setNode(this);
- m_linkDecl->setStrictParsing(!document()->inCompatMode());
+ m_linkDecl->setStrictParsing(!document()->inQuirksMode());
}
bool HTMLBodyElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index 7463551..3838f14 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -146,7 +146,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas
if (Settings* settings = document()->settings())
usesDashbardCompatibilityMode = settings->usesDashboardBackwardCompatibilityMode();
#endif
- m_context = adoptPtr(new CanvasRenderingContext2D(this, document()->inCompatMode(), usesDashbardCompatibilityMode));
+ m_context = adoptPtr(new CanvasRenderingContext2D(this, document()->inQuirksMode(), usesDashbardCompatibilityMode));
#if ENABLE(ACCELERATED_2D_CANVAS) && USE(ACCELERATED_COMPOSITING)
if (m_context) {
// Need to make sure a RenderLayer and compositing layer get created for the Canvas
@@ -185,7 +185,7 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, Canvas
return 0;
}
-void HTMLCanvasElement::willDraw(const FloatRect& rect)
+void HTMLCanvasElement::didDraw(const FloatRect& rect)
{
m_copiedImage.clear(); // Clear our image snapshot if we have one.
@@ -394,8 +394,14 @@ ImageBuffer* HTMLCanvasElement::buffer() const
Image* HTMLCanvasElement::copiedImage() const
{
- if (!m_copiedImage && buffer())
+ if (!m_copiedImage && buffer()) {
+ if (m_context) {
+ // If we're not rendering to the ImageBuffer, copy the rendering results to it.
+ if (!m_context->paintsIntoCanvasBuffer())
+ m_context->paintRenderingResultsToCanvas();
+ }
m_copiedImage = buffer()->copyImage();
+ }
return m_copiedImage.get();
}
diff --git a/WebCore/html/HTMLCanvasElement.h b/WebCore/html/HTMLCanvasElement.h
index c9b258d..01665c8 100644
--- a/WebCore/html/HTMLCanvasElement.h
+++ b/WebCore/html/HTMLCanvasElement.h
@@ -85,7 +85,7 @@ public:
String toDataURL(const String& mimeType, ExceptionCode& ec) { return toDataURL(mimeType, 0, ec); }
// Used for rendering
- void willDraw(const FloatRect&);
+ void didDraw(const FloatRect&);
void paint(GraphicsContext*, const IntRect&);
diff --git a/WebCore/html/HTMLDocument.cpp b/WebCore/html/HTMLDocument.cpp
index 5e11ad2..26e8314 100644
--- a/WebCore/html/HTMLDocument.cpp
+++ b/WebCore/html/HTMLDocument.cpp
@@ -84,7 +84,6 @@ HTMLDocument::HTMLDocument(Frame* frame, const KURL& url)
: Document(frame, url, false, true)
{
clearXMLVersion();
- setParseMode(Compat);
}
HTMLDocument::~HTMLDocument()
@@ -139,7 +138,7 @@ void HTMLDocument::setDesignMode(const String& value)
String HTMLDocument::compatMode() const
{
- return inCompatMode() ? "BackCompat" : "CSS1Compat";
+ return inQuirksMode() ? "BackCompat" : "CSS1Compat";
}
Element* HTMLDocument::activeElement()
@@ -343,65 +342,97 @@ void HTMLDocument::removeExtraNamedItem(const AtomicString& name)
removeItemFromMap(m_extraNamedItemCounts, name);
}
-void HTMLDocument::determineParseMode()
+void HTMLDocument::setCompatibilityModeFromDoctype()
{
- // FIXME: It's terrible that this code runs separately and isn't just built in to the
- // HTML tokenizer/parser.
-
- // This code more or less mimics Mozilla's implementation (specifically the
- // doctype parsing implemented by David Baron in Mozilla's nsParser.cpp).
- //
- // There are three possible parse modes:
- // COMPAT - quirks mode emulates WinIE and NS4. CSS parsing is also relaxed in this mode, e.g., unit types can
+ // There are three possible compatibility modes:
+ // Quirks - quirks mode emulates WinIE and NS4. CSS parsing is also relaxed in this mode, e.g., unit types can
// be omitted from numbers.
- // ALMOST STRICT - This mode is identical to strict mode except for its treatment of line-height in the inline box model. For
- // now (until the inline box model is re-written), this mode is identical to STANDARDS mode.
- // STRICT - no quirks apply. Web pages will obey the specifications to the letter.
- bool wasInCompatMode = inCompatMode();
+ // Limited Quirks - This mode is identical to no-quirks mode except for its treatment of line-height in the inline box model.
+ // No Quirks - no quirks apply. Web pages will obey the specifications to the letter.
DocumentType* docType = doctype();
- if (!docType || !equalIgnoringCase(docType->name(), "html"))
- // No doctype found at all or the doctype is not HTML. Default to quirks mode and Html4.
- setParseMode(Compat);
- else if (!doctype()->systemId().isEmpty() && equalIgnoringCase(docType->systemId(), "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"))
- // Assume quirks mode for this particular system ID. In the HTML5 spec, this is the only
- // system identifier that is examined.
- setParseMode(Compat);
- else if (docType->publicId().isEmpty())
- // A doctype without a public ID means use strict mode.
- setParseMode(Strict);
- else {
- // We have to check a list of public IDs to see what we
- // should do.
- String lowerPubID = docType->publicId().lower();
- CString pubIDStr = lowerPubID.latin1();
-
- // Look up the entry in our gperf-generated table.
- const PubIDInfo* doctypeEntry = findDoctypeEntry(pubIDStr.data(), pubIDStr.length());
- if (!doctypeEntry)
- // The DOCTYPE is not in the list. Assume strict mode.
- setParseMode(Strict);
- else {
- switch (docType->systemId().isEmpty() ?
- doctypeEntry->mode_if_no_sysid :
- doctypeEntry->mode_if_sysid) {
- case PubIDInfo::eQuirks3:
- case PubIDInfo::eQuirks:
- setParseMode(Compat);
- break;
- case PubIDInfo::eAlmostStandards:
- setParseMode(AlmostStrict);
- break;
- default:
- ASSERT(false);
- }
- }
+ if (!docType)
+ return;
+
+ // Check for Quirks Mode.
+ const String& publicId = docType->publicId();
+ if (docType->name() != "html"
+ || publicId.startsWith("+//Silmaril//dtd html Pro v0r11 19970101//", false)
+ || publicId.startsWith("-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//", false)
+ || publicId.startsWith("-//AS//DTD HTML 3.0 asWedit + extensions//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.0 Level 1//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.0 Level 2//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict Level 1//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict Level 2//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.0//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 2.1E//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 3.0//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 3.2 Final//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 3.2//", false)
+ || publicId.startsWith("-//IETF//DTD HTML 3//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Level 0//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Level 1//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Level 2//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Level 3//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Strict Level 0//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Strict Level 1//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Strict Level 2//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Strict Level 3//", false)
+ || publicId.startsWith("-//IETF//DTD HTML Strict//", false)
+ || publicId.startsWith("-//IETF//DTD HTML//", false)
+ || publicId.startsWith("-//Metrius//DTD Metrius Presentational//", false)
+ || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//", false)
+ || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML//", false)
+ || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 Tables//", false)
+ || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//", false)
+ || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML//", false)
+ || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 Tables//", false)
+ || publicId.startsWith("-//Netscape Comm. Corp.//DTD HTML//", false)
+ || publicId.startsWith("-//Netscape Comm. Corp.//DTD Strict HTML//", false)
+ || publicId.startsWith("-//O'Reilly and Associates//DTD HTML 2.0//", false)
+ || publicId.startsWith("-//O'Reilly and Associates//DTD HTML Extended 1.0//", false)
+ || publicId.startsWith("-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//", false)
+ || publicId.startsWith("-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//", false)
+ || publicId.startsWith("-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//", false)
+ || publicId.startsWith("-//Spyglass//DTD HTML 2.0 Extended//", false)
+ || publicId.startsWith("-//SQ//DTD HTML 2.0 HoTMetaL + extensions//", false)
+ || publicId.startsWith("-//Sun Microsystems Corp.//DTD HotJava HTML//", false)
+ || publicId.startsWith("-//Sun Microsystems Corp.//DTD HotJava Strict HTML//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 3 1995-03-24//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 3.2 Draft//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 3.2 Final//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 3.2//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 3.2S Draft//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 4.0 Frameset//", false)
+ || publicId.startsWith("-//W3C//DTD HTML 4.0 Transitional//", false)
+ || publicId.startsWith("-//W3C//DTD HTML Experimental 19960712//", false)
+ || publicId.startsWith("-//W3C//DTD HTML Experimental 970421//", false)
+ || publicId.startsWith("-//W3C//DTD W3 HTML//", false)
+ || publicId.startsWith("-//W3O//DTD W3 HTML 3.0//", false)
+ || equalIgnoringCase(publicId, "-//W3O//DTD W3 HTML Strict 3.0//EN//")
+ || publicId.startsWith("-//WebTechs//DTD Mozilla HTML 2.0//", false)
+ || publicId.startsWith("-//WebTechs//DTD Mozilla HTML//", false)
+ || equalIgnoringCase(publicId, "-/W3C/DTD HTML 4.0 Transitional/EN")
+ || equalIgnoringCase(publicId, "HTML")
+ || equalIgnoringCase(docType->systemId(), "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd")
+ || (docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Frameset//", false))
+ || (docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Transitional//", false))) {
+ setCompatibilityMode(QuirksMode);
+ return;
}
-
- if (inCompatMode() != wasInCompatMode) {
- clearPageUserSheet();
- clearPageGroupUserSheets();
- updateStyleSelector();
+
+ // Check for Limited Quirks Mode.
+ if (publicId.startsWith("-//W3C//DTD XHTML 1.0 Frameset//", false)
+ || publicId.startsWith("-//W3C//DTD XHTML 1.0 Transitional//", false)
+ || (!docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Frameset//", false))
+ || (!docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Transitional//", false))) {
+ setCompatibilityMode(LimitedQuirksMode);
+ return;
}
+
+ // Otherwise we are No Quirks Mode.
+ setCompatibilityMode(NoQuirksMode);
+ return;
}
void HTMLDocument::clear()
diff --git a/WebCore/html/HTMLDocument.h b/WebCore/html/HTMLDocument.h
index 583cdcc..ae65d42 100644
--- a/WebCore/html/HTMLDocument.h
+++ b/WebCore/html/HTMLDocument.h
@@ -51,6 +51,7 @@ public:
void setDesignMode(const String&);
String compatMode() const;
+ virtual void setCompatibilityModeFromDoctype();
Element* activeElement();
bool hasFocus();
@@ -95,7 +96,6 @@ private:
virtual bool isFrameSet() const;
virtual PassRefPtr<DocumentParser> createParser();
- virtual void determineParseMode();
void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&);
void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&);
diff --git a/WebCore/html/HTMLElement.cpp b/WebCore/html/HTMLElement.cpp
index f40489b..0862130 100644
--- a/WebCore/html/HTMLElement.cpp
+++ b/WebCore/html/HTMLElement.cpp
@@ -249,6 +249,10 @@ void HTMLElement::parseMappedAttribute(Attribute* attr)
setAttributeEventListener(eventNames().touchendEvent, createAttributeEventListener(this, attr));
} else if (attr->name() == ontouchcancelAttr) {
setAttributeEventListener(eventNames().touchcancelEvent, createAttributeEventListener(this, attr));
+#if ENABLE(FULLSCREEN_API)
+ } else if (attr->name() == onwebkitfullscreenchangeAttr) {
+ setAttributeEventListener(eventNames().webkitfullscreenchangeEvent, createAttributeEventListener(this, attr));
+#endif
}
}
diff --git a/WebCore/html/HTMLEmbedElement.cpp b/WebCore/html/HTMLEmbedElement.cpp
index 0a15321..eeb28e7 100644
--- a/WebCore/html/HTMLEmbedElement.cpp
+++ b/WebCore/html/HTMLEmbedElement.cpp
@@ -42,16 +42,15 @@ namespace WebCore {
using namespace HTMLNames;
-inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document)
- : HTMLPlugInImageElement(tagName, document)
- , m_needWidgetUpdate(false)
+inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+ : HTMLPlugInImageElement(tagName, document, createdByParser)
{
ASSERT(hasTagName(embedTag));
}
-PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(const QualifiedName& tagName, Document* document)
+PassRefPtr<HTMLEmbedElement> HTMLEmbedElement::create(const QualifiedName& tagName, Document* document, bool createdByParser)
{
- return adoptRef(new HTMLEmbedElement(tagName, document));
+ return adoptRef(new HTMLEmbedElement(tagName, document, createdByParser));
}
static inline RenderWidget* findWidgetRenderer(const Node* n)
@@ -80,7 +79,7 @@ bool HTMLEmbedElement::mapToEntry(const QualifiedName& attrName, MappedAttribute
return false;
}
- return HTMLPlugInElement::mapToEntry(attrName, result);
+ return HTMLPlugInImageElement::mapToEntry(attrName, result);
}
void HTMLEmbedElement::parseMappedAttribute(Attribute* attr)
@@ -118,22 +117,27 @@ void HTMLEmbedElement::parseMappedAttribute(Attribute* attr)
}
m_name = value;
} else
- HTMLPlugInElement::parseMappedAttribute(attr);
+ HTMLPlugInImageElement::parseMappedAttribute(attr);
}
bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style)
{
if (isImageType())
- return HTMLPlugInElement::rendererIsNeeded(style);
+ return HTMLPlugInImageElement::rendererIsNeeded(style);
Frame* frame = document()->frame();
if (!frame)
return false;
+ // If my parent is an <object> and is not set to use fallback content, I
+ // should be ignored and not get a renderer.
Node* p = parentNode();
if (p && p->hasTagName(objectTag)) {
ASSERT(p->renderer());
- return false;
+ if (!static_cast<HTMLObjectElement*>(p)->useFallbackContent()) {
+ ASSERT(!p->renderer()->isEmbeddedObject());
+ return false;
+ }
}
#if ENABLE(DASHBOARD_SUPPORT)
@@ -144,42 +148,7 @@ bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style)
}
#endif
- return HTMLPlugInElement::rendererIsNeeded(style);
-}
-
-RenderObject* HTMLEmbedElement::createRenderer(RenderArena* arena, RenderStyle*)
-{
- if (isImageType())
- return new (arena) RenderImage(this);
- return new (arena) RenderEmbeddedObject(this);
-}
-
-void HTMLEmbedElement::attach()
-{
- m_needWidgetUpdate = true;
-
- bool isImage = isImageType();
-
- if (!isImage)
- queuePostAttachCallback(&HTMLPlugInElement::updateWidgetCallback, this);
-
- HTMLPlugInElement::attach();
-
- if (isImage && renderer()) {
- if (!m_imageLoader)
- m_imageLoader = adoptPtr(new HTMLImageLoader(this));
- m_imageLoader->updateFromElement();
-
- if (renderer())
- toRenderImage(renderer())->setCachedImage(m_imageLoader->image());
- }
-}
-
-void HTMLEmbedElement::updateWidget()
-{
- document()->updateStyleIfNeeded();
- if (m_needWidgetUpdate && renderer() && !isImageType())
- toRenderEmbeddedObject(renderer())->updateWidget(true);
+ return HTMLPlugInImageElement::rendererIsNeeded(style);
}
void HTMLEmbedElement::insertedIntoDocument()
@@ -201,7 +170,7 @@ void HTMLEmbedElement::insertedIntoDocument()
}
}
- HTMLPlugInElement::insertedIntoDocument();
+ HTMLPlugInImageElement::insertedIntoDocument();
}
void HTMLEmbedElement::removedFromDocument()
@@ -209,12 +178,12 @@ void HTMLEmbedElement::removedFromDocument()
if (document()->isHTMLDocument())
static_cast<HTMLDocument*>(document())->removeNamedItem(m_name);
- HTMLPlugInElement::removedFromDocument();
+ HTMLPlugInImageElement::removedFromDocument();
}
void HTMLEmbedElement::attributeChanged(Attribute* attr, bool preserveDecls)
{
- HTMLPlugInElement::attributeChanged(attr, preserveDecls);
+ HTMLPlugInImageElement::attributeChanged(attr, preserveDecls);
if ((attr->name() == widthAttr || attr->name() == heightAttr) && !attr->isEmpty()) {
Node* n = parent();
diff --git a/WebCore/html/HTMLEmbedElement.h b/WebCore/html/HTMLEmbedElement.h
index 5f4df67..e27b717 100644
--- a/WebCore/html/HTMLEmbedElement.h
+++ b/WebCore/html/HTMLEmbedElement.h
@@ -29,20 +29,15 @@ namespace WebCore {
class HTMLEmbedElement : public HTMLPlugInImageElement {
public:
- static PassRefPtr<HTMLEmbedElement> create(const QualifiedName&, Document*);
-
- void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
+ static PassRefPtr<HTMLEmbedElement> create(const QualifiedName&, Document*, bool createdByParser);
private:
- HTMLEmbedElement(const QualifiedName&, Document*);
+ HTMLEmbedElement(const QualifiedName&, Document*, bool createdByParser);
virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
virtual void parseMappedAttribute(Attribute*);
- virtual void attach();
- virtual bool canLazyAttach() { return false; }
virtual bool rendererIsNeeded(RenderStyle*);
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void insertedIntoDocument();
virtual void removedFromDocument();
virtual void attributeChanged(Attribute*, bool preserveDecls = false);
@@ -50,13 +45,9 @@ private:
virtual bool isURLAttribute(Attribute*) const;
virtual const QualifiedName& imageSourceAttributeName() const;
- virtual void updateWidget();
-
virtual RenderWidget* renderWidgetForJSBindings() const;
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
-
- bool m_needWidgetUpdate;
};
}
diff --git a/WebCore/html/HTMLEmbedElement.idl b/WebCore/html/HTMLEmbedElement.idl
index 4997210..e395fc6 100644
--- a/WebCore/html/HTMLEmbedElement.idl
+++ b/WebCore/html/HTMLEmbedElement.idl
@@ -32,7 +32,7 @@ module html {
attribute [Reflect] long height;
#endif
attribute [Reflect] DOMString name;
- attribute [Reflect] DOMString src;
+ attribute [Reflect, URL] DOMString src;
attribute [Reflect] DOMString type;
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
attribute [Reflect] DOMString width;
diff --git a/WebCore/html/HTMLEntityNames.json b/WebCore/html/HTMLEntityNames.json
deleted file mode 100644
index da3b881..0000000
--- a/WebCore/html/HTMLEntityNames.json
+++ /dev/null
@@ -1,8554 +0,0 @@
-[
- {
- "entity": "AElig;",
- "value": "U+000C6"
- },
- {
- "entity": "AElig",
- "value": "U+000C6"
- },
- {
- "entity": "AMP;",
- "value": "U+00026"
- },
- {
- "entity": "AMP",
- "value": "U+00026"
- },
- {
- "entity": "Aacute;",
- "value": "U+000C1"
- },
- {
- "entity": "Aacute",
- "value": "U+000C1"
- },
- {
- "entity": "Abreve;",
- "value": "U+00102"
- },
- {
- "entity": "Acirc;",
- "value": "U+000C2"
- },
- {
- "entity": "Acirc",
- "value": "U+000C2"
- },
- {
- "entity": "Acy;",
- "value": "U+00410"
- },
- {
- "entity": "Afr;",
- "value": "U+1D504"
- },
- {
- "entity": "Agrave;",
- "value": "U+000C0"
- },
- {
- "entity": "Agrave",
- "value": "U+000C0"
- },
- {
- "entity": "Alpha;",
- "value": "U+00391"
- },
- {
- "entity": "Amacr;",
- "value": "U+00100"
- },
- {
- "entity": "And;",
- "value": "U+02A53"
- },
- {
- "entity": "Aogon;",
- "value": "U+00104"
- },
- {
- "entity": "Aopf;",
- "value": "U+1D538"
- },
- {
- "entity": "ApplyFunction;",
- "value": "U+02061"
- },
- {
- "entity": "Aring;",
- "value": "U+000C5"
- },
- {
- "entity": "Aring",
- "value": "U+000C5"
- },
- {
- "entity": "Ascr;",
- "value": "U+1D49C"
- },
- {
- "entity": "Assign;",
- "value": "U+02254"
- },
- {
- "entity": "Atilde;",
- "value": "U+000C3"
- },
- {
- "entity": "Atilde",
- "value": "U+000C3"
- },
- {
- "entity": "Auml;",
- "value": "U+000C4"
- },
- {
- "entity": "Auml",
- "value": "U+000C4"
- },
- {
- "entity": "Backslash;",
- "value": "U+02216"
- },
- {
- "entity": "Barv;",
- "value": "U+02AE7"
- },
- {
- "entity": "Barwed;",
- "value": "U+02306"
- },
- {
- "entity": "Bcy;",
- "value": "U+00411"
- },
- {
- "entity": "Because;",
- "value": "U+02235"
- },
- {
- "entity": "Bernoullis;",
- "value": "U+0212C"
- },
- {
- "entity": "Beta;",
- "value": "U+00392"
- },
- {
- "entity": "Bfr;",
- "value": "U+1D505"
- },
- {
- "entity": "Bopf;",
- "value": "U+1D539"
- },
- {
- "entity": "Breve;",
- "value": "U+002D8"
- },
- {
- "entity": "Bscr;",
- "value": "U+0212C"
- },
- {
- "entity": "Bumpeq;",
- "value": "U+0224E"
- },
- {
- "entity": "CHcy;",
- "value": "U+00427"
- },
- {
- "entity": "COPY;",
- "value": "U+000A9"
- },
- {
- "entity": "COPY",
- "value": "U+000A9"
- },
- {
- "entity": "Cacute;",
- "value": "U+00106"
- },
- {
- "entity": "Cap;",
- "value": "U+022D2"
- },
- {
- "entity": "CapitalDifferentialD;",
- "value": "U+02145"
- },
- {
- "entity": "Cayleys;",
- "value": "U+0212D"
- },
- {
- "entity": "Ccaron;",
- "value": "U+0010C"
- },
- {
- "entity": "Ccedil;",
- "value": "U+000C7"
- },
- {
- "entity": "Ccedil",
- "value": "U+000C7"
- },
- {
- "entity": "Ccirc;",
- "value": "U+00108"
- },
- {
- "entity": "Cconint;",
- "value": "U+02230"
- },
- {
- "entity": "Cdot;",
- "value": "U+0010A"
- },
- {
- "entity": "Cedilla;",
- "value": "U+000B8"
- },
- {
- "entity": "CenterDot;",
- "value": "U+000B7"
- },
- {
- "entity": "Cfr;",
- "value": "U+0212D"
- },
- {
- "entity": "Chi;",
- "value": "U+003A7"
- },
- {
- "entity": "CircleDot;",
- "value": "U+02299"
- },
- {
- "entity": "CircleMinus;",
- "value": "U+02296"
- },
- {
- "entity": "CirclePlus;",
- "value": "U+02295"
- },
- {
- "entity": "CircleTimes;",
- "value": "U+02297"
- },
- {
- "entity": "ClockwiseContourIntegral;",
- "value": "U+02232"
- },
- {
- "entity": "CloseCurlyDoubleQuote;",
- "value": "U+0201D"
- },
- {
- "entity": "CloseCurlyQuote;",
- "value": "U+02019"
- },
- {
- "entity": "Colon;",
- "value": "U+02237"
- },
- {
- "entity": "Colone;",
- "value": "U+02A74"
- },
- {
- "entity": "Congruent;",
- "value": "U+02261"
- },
- {
- "entity": "Conint;",
- "value": "U+0222F"
- },
- {
- "entity": "ContourIntegral;",
- "value": "U+0222E"
- },
- {
- "entity": "Copf;",
- "value": "U+02102"
- },
- {
- "entity": "Coproduct;",
- "value": "U+02210"
- },
- {
- "entity": "CounterClockwiseContourIntegral;",
- "value": "U+02233"
- },
- {
- "entity": "Cross;",
- "value": "U+02A2F"
- },
- {
- "entity": "Cscr;",
- "value": "U+1D49E"
- },
- {
- "entity": "Cup;",
- "value": "U+022D3"
- },
- {
- "entity": "CupCap;",
- "value": "U+0224D"
- },
- {
- "entity": "DD;",
- "value": "U+02145"
- },
- {
- "entity": "DDotrahd;",
- "value": "U+02911"
- },
- {
- "entity": "DJcy;",
- "value": "U+00402"
- },
- {
- "entity": "DScy;",
- "value": "U+00405"
- },
- {
- "entity": "DZcy;",
- "value": "U+0040F"
- },
- {
- "entity": "Dagger;",
- "value": "U+02021"
- },
- {
- "entity": "Darr;",
- "value": "U+021A1"
- },
- {
- "entity": "Dashv;",
- "value": "U+02AE4"
- },
- {
- "entity": "Dcaron;",
- "value": "U+0010E"
- },
- {
- "entity": "Dcy;",
- "value": "U+00414"
- },
- {
- "entity": "Del;",
- "value": "U+02207"
- },
- {
- "entity": "Delta;",
- "value": "U+00394"
- },
- {
- "entity": "Dfr;",
- "value": "U+1D507"
- },
- {
- "entity": "DiacriticalAcute;",
- "value": "U+000B4"
- },
- {
- "entity": "DiacriticalDot;",
- "value": "U+002D9"
- },
- {
- "entity": "DiacriticalDoubleAcute;",
- "value": "U+002DD"
- },
- {
- "entity": "DiacriticalGrave;",
- "value": "U+00060"
- },
- {
- "entity": "DiacriticalTilde;",
- "value": "U+002DC"
- },
- {
- "entity": "Diamond;",
- "value": "U+022C4"
- },
- {
- "entity": "DifferentialD;",
- "value": "U+02146"
- },
- {
- "entity": "Dopf;",
- "value": "U+1D53B"
- },
- {
- "entity": "Dot;",
- "value": "U+000A8"
- },
- {
- "entity": "DotDot;",
- "value": "U+020DC"
- },
- {
- "entity": "DotEqual;",
- "value": "U+02250"
- },
- {
- "entity": "DoubleContourIntegral;",
- "value": "U+0222F"
- },
- {
- "entity": "DoubleDot;",
- "value": "U+000A8"
- },
- {
- "entity": "DoubleDownArrow;",
- "value": "U+021D3"
- },
- {
- "entity": "DoubleLeftArrow;",
- "value": "U+021D0"
- },
- {
- "entity": "DoubleLeftRightArrow;",
- "value": "U+021D4"
- },
- {
- "entity": "DoubleLeftTee;",
- "value": "U+02AE4"
- },
- {
- "entity": "DoubleLongLeftArrow;",
- "value": "U+027F8"
- },
- {
- "entity": "DoubleLongLeftRightArrow;",
- "value": "U+027FA"
- },
- {
- "entity": "DoubleLongRightArrow;",
- "value": "U+027F9"
- },
- {
- "entity": "DoubleRightArrow;",
- "value": "U+021D2"
- },
- {
- "entity": "DoubleRightTee;",
- "value": "U+022A8"
- },
- {
- "entity": "DoubleUpArrow;",
- "value": "U+021D1"
- },
- {
- "entity": "DoubleUpDownArrow;",
- "value": "U+021D5"
- },
- {
- "entity": "DoubleVerticalBar;",
- "value": "U+02225"
- },
- {
- "entity": "DownArrow;",
- "value": "U+02193"
- },
- {
- "entity": "DownArrowBar;",
- "value": "U+02913"
- },
- {
- "entity": "DownArrowUpArrow;",
- "value": "U+021F5"
- },
- {
- "entity": "DownBreve;",
- "value": "U+00311"
- },
- {
- "entity": "DownLeftRightVector;",
- "value": "U+02950"
- },
- {
- "entity": "DownLeftTeeVector;",
- "value": "U+0295E"
- },
- {
- "entity": "DownLeftVector;",
- "value": "U+021BD"
- },
- {
- "entity": "DownLeftVectorBar;",
- "value": "U+02956"
- },
- {
- "entity": "DownRightTeeVector;",
- "value": "U+0295F"
- },
- {
- "entity": "DownRightVector;",
- "value": "U+021C1"
- },
- {
- "entity": "DownRightVectorBar;",
- "value": "U+02957"
- },
- {
- "entity": "DownTee;",
- "value": "U+022A4"
- },
- {
- "entity": "DownTeeArrow;",
- "value": "U+021A7"
- },
- {
- "entity": "Downarrow;",
- "value": "U+021D3"
- },
- {
- "entity": "Dscr;",
- "value": "U+1D49F"
- },
- {
- "entity": "Dstrok;",
- "value": "U+00110"
- },
- {
- "entity": "ENG;",
- "value": "U+0014A"
- },
- {
- "entity": "ETH;",
- "value": "U+000D0"
- },
- {
- "entity": "ETH",
- "value": "U+000D0"
- },
- {
- "entity": "Eacute;",
- "value": "U+000C9"
- },
- {
- "entity": "Eacute",
- "value": "U+000C9"
- },
- {
- "entity": "Ecaron;",
- "value": "U+0011A"
- },
- {
- "entity": "Ecirc;",
- "value": "U+000CA"
- },
- {
- "entity": "Ecirc",
- "value": "U+000CA"
- },
- {
- "entity": "Ecy;",
- "value": "U+0042D"
- },
- {
- "entity": "Edot;",
- "value": "U+00116"
- },
- {
- "entity": "Efr;",
- "value": "U+1D508"
- },
- {
- "entity": "Egrave;",
- "value": "U+000C8"
- },
- {
- "entity": "Egrave",
- "value": "U+000C8"
- },
- {
- "entity": "Element;",
- "value": "U+02208"
- },
- {
- "entity": "Emacr;",
- "value": "U+00112"
- },
- {
- "entity": "EmptySmallSquare;",
- "value": "U+025FB"
- },
- {
- "entity": "EmptyVerySmallSquare;",
- "value": "U+025AB"
- },
- {
- "entity": "Eogon;",
- "value": "U+00118"
- },
- {
- "entity": "Eopf;",
- "value": "U+1D53C"
- },
- {
- "entity": "Epsilon;",
- "value": "U+00395"
- },
- {
- "entity": "Equal;",
- "value": "U+02A75"
- },
- {
- "entity": "EqualTilde;",
- "value": "U+02242"
- },
- {
- "entity": "Equilibrium;",
- "value": "U+021CC"
- },
- {
- "entity": "Escr;",
- "value": "U+02130"
- },
- {
- "entity": "Esim;",
- "value": "U+02A73"
- },
- {
- "entity": "Eta;",
- "value": "U+00397"
- },
- {
- "entity": "Euml;",
- "value": "U+000CB"
- },
- {
- "entity": "Euml",
- "value": "U+000CB"
- },
- {
- "entity": "Exists;",
- "value": "U+02203"
- },
- {
- "entity": "ExponentialE;",
- "value": "U+02147"
- },
- {
- "entity": "Fcy;",
- "value": "U+00424"
- },
- {
- "entity": "Ffr;",
- "value": "U+1D509"
- },
- {
- "entity": "FilledSmallSquare;",
- "value": "U+025FC"
- },
- {
- "entity": "FilledVerySmallSquare;",
- "value": "U+025AA"
- },
- {
- "entity": "Fopf;",
- "value": "U+1D53D"
- },
- {
- "entity": "ForAll;",
- "value": "U+02200"
- },
- {
- "entity": "Fouriertrf;",
- "value": "U+02131"
- },
- {
- "entity": "Fscr;",
- "value": "U+02131"
- },
- {
- "entity": "GJcy;",
- "value": "U+00403"
- },
- {
- "entity": "GT;",
- "value": "U+0003E"
- },
- {
- "entity": "GT",
- "value": "U+0003E"
- },
- {
- "entity": "Gamma;",
- "value": "U+00393"
- },
- {
- "entity": "Gammad;",
- "value": "U+003DC"
- },
- {
- "entity": "Gbreve;",
- "value": "U+0011E"
- },
- {
- "entity": "Gcedil;",
- "value": "U+00122"
- },
- {
- "entity": "Gcirc;",
- "value": "U+0011C"
- },
- {
- "entity": "Gcy;",
- "value": "U+00413"
- },
- {
- "entity": "Gdot;",
- "value": "U+00120"
- },
- {
- "entity": "Gfr;",
- "value": "U+1D50A"
- },
- {
- "entity": "Gg;",
- "value": "U+022D9"
- },
- {
- "entity": "Gopf;",
- "value": "U+1D53E"
- },
- {
- "entity": "GreaterEqual;",
- "value": "U+02265"
- },
- {
- "entity": "GreaterEqualLess;",
- "value": "U+022DB"
- },
- {
- "entity": "GreaterFullEqual;",
- "value": "U+02267"
- },
- {
- "entity": "GreaterGreater;",
- "value": "U+02AA2"
- },
- {
- "entity": "GreaterLess;",
- "value": "U+02277"
- },
- {
- "entity": "GreaterSlantEqual;",
- "value": "U+02A7E"
- },
- {
- "entity": "GreaterTilde;",
- "value": "U+02273"
- },
- {
- "entity": "Gscr;",
- "value": "U+1D4A2"
- },
- {
- "entity": "Gt;",
- "value": "U+0226B"
- },
- {
- "entity": "HARDcy;",
- "value": "U+0042A"
- },
- {
- "entity": "Hacek;",
- "value": "U+002C7"
- },
- {
- "entity": "Hat;",
- "value": "U+0005E"
- },
- {
- "entity": "Hcirc;",
- "value": "U+00124"
- },
- {
- "entity": "Hfr;",
- "value": "U+0210C"
- },
- {
- "entity": "HilbertSpace;",
- "value": "U+0210B"
- },
- {
- "entity": "Hopf;",
- "value": "U+0210D"
- },
- {
- "entity": "HorizontalLine;",
- "value": "U+02500"
- },
- {
- "entity": "Hscr;",
- "value": "U+0210B"
- },
- {
- "entity": "Hstrok;",
- "value": "U+00126"
- },
- {
- "entity": "HumpDownHump;",
- "value": "U+0224E"
- },
- {
- "entity": "HumpEqual;",
- "value": "U+0224F"
- },
- {
- "entity": "IEcy;",
- "value": "U+00415"
- },
- {
- "entity": "IJlig;",
- "value": "U+00132"
- },
- {
- "entity": "IOcy;",
- "value": "U+00401"
- },
- {
- "entity": "Iacute;",
- "value": "U+000CD"
- },
- {
- "entity": "Iacute",
- "value": "U+000CD"
- },
- {
- "entity": "Icirc;",
- "value": "U+000CE"
- },
- {
- "entity": "Icirc",
- "value": "U+000CE"
- },
- {
- "entity": "Icy;",
- "value": "U+00418"
- },
- {
- "entity": "Idot;",
- "value": "U+00130"
- },
- {
- "entity": "Ifr;",
- "value": "U+02111"
- },
- {
- "entity": "Igrave;",
- "value": "U+000CC"
- },
- {
- "entity": "Igrave",
- "value": "U+000CC"
- },
- {
- "entity": "Im;",
- "value": "U+02111"
- },
- {
- "entity": "Imacr;",
- "value": "U+0012A"
- },
- {
- "entity": "ImaginaryI;",
- "value": "U+02148"
- },
- {
- "entity": "Implies;",
- "value": "U+021D2"
- },
- {
- "entity": "Int;",
- "value": "U+0222C"
- },
- {
- "entity": "Integral;",
- "value": "U+0222B"
- },
- {
- "entity": "Intersection;",
- "value": "U+022C2"
- },
- {
- "entity": "InvisibleComma;",
- "value": "U+02063"
- },
- {
- "entity": "InvisibleTimes;",
- "value": "U+02062"
- },
- {
- "entity": "Iogon;",
- "value": "U+0012E"
- },
- {
- "entity": "Iopf;",
- "value": "U+1D540"
- },
- {
- "entity": "Iota;",
- "value": "U+00399"
- },
- {
- "entity": "Iscr;",
- "value": "U+02110"
- },
- {
- "entity": "Itilde;",
- "value": "U+00128"
- },
- {
- "entity": "Iukcy;",
- "value": "U+00406"
- },
- {
- "entity": "Iuml;",
- "value": "U+000CF"
- },
- {
- "entity": "Iuml",
- "value": "U+000CF"
- },
- {
- "entity": "Jcirc;",
- "value": "U+00134"
- },
- {
- "entity": "Jcy;",
- "value": "U+00419"
- },
- {
- "entity": "Jfr;",
- "value": "U+1D50D"
- },
- {
- "entity": "Jopf;",
- "value": "U+1D541"
- },
- {
- "entity": "Jscr;",
- "value": "U+1D4A5"
- },
- {
- "entity": "Jsercy;",
- "value": "U+00408"
- },
- {
- "entity": "Jukcy;",
- "value": "U+00404"
- },
- {
- "entity": "KHcy;",
- "value": "U+00425"
- },
- {
- "entity": "KJcy;",
- "value": "U+0040C"
- },
- {
- "entity": "Kappa;",
- "value": "U+0039A"
- },
- {
- "entity": "Kcedil;",
- "value": "U+00136"
- },
- {
- "entity": "Kcy;",
- "value": "U+0041A"
- },
- {
- "entity": "Kfr;",
- "value": "U+1D50E"
- },
- {
- "entity": "Kopf;",
- "value": "U+1D542"
- },
- {
- "entity": "Kscr;",
- "value": "U+1D4A6"
- },
- {
- "entity": "LJcy;",
- "value": "U+00409"
- },
- {
- "entity": "LT;",
- "value": "U+0003C"
- },
- {
- "entity": "LT",
- "value": "U+0003C"
- },
- {
- "entity": "Lacute;",
- "value": "U+00139"
- },
- {
- "entity": "Lambda;",
- "value": "U+0039B"
- },
- {
- "entity": "Lang;",
- "value": "U+027EA"
- },
- {
- "entity": "Laplacetrf;",
- "value": "U+02112"
- },
- {
- "entity": "Larr;",
- "value": "U+0219E"
- },
- {
- "entity": "Lcaron;",
- "value": "U+0013D"
- },
- {
- "entity": "Lcedil;",
- "value": "U+0013B"
- },
- {
- "entity": "Lcy;",
- "value": "U+0041B"
- },
- {
- "entity": "LeftAngleBracket;",
- "value": "U+027E8"
- },
- {
- "entity": "LeftArrow;",
- "value": "U+02190"
- },
- {
- "entity": "LeftArrowBar;",
- "value": "U+021E4"
- },
- {
- "entity": "LeftArrowRightArrow;",
- "value": "U+021C6"
- },
- {
- "entity": "LeftCeiling;",
- "value": "U+02308"
- },
- {
- "entity": "LeftDoubleBracket;",
- "value": "U+027E6"
- },
- {
- "entity": "LeftDownTeeVector;",
- "value": "U+02961"
- },
- {
- "entity": "LeftDownVector;",
- "value": "U+021C3"
- },
- {
- "entity": "LeftDownVectorBar;",
- "value": "U+02959"
- },
- {
- "entity": "LeftFloor;",
- "value": "U+0230A"
- },
- {
- "entity": "LeftRightArrow;",
- "value": "U+02194"
- },
- {
- "entity": "LeftRightVector;",
- "value": "U+0294E"
- },
- {
- "entity": "LeftTee;",
- "value": "U+022A3"
- },
- {
- "entity": "LeftTeeArrow;",
- "value": "U+021A4"
- },
- {
- "entity": "LeftTeeVector;",
- "value": "U+0295A"
- },
- {
- "entity": "LeftTriangle;",
- "value": "U+022B2"
- },
- {
- "entity": "LeftTriangleBar;",
- "value": "U+029CF"
- },
- {
- "entity": "LeftTriangleEqual;",
- "value": "U+022B4"
- },
- {
- "entity": "LeftUpDownVector;",
- "value": "U+02951"
- },
- {
- "entity": "LeftUpTeeVector;",
- "value": "U+02960"
- },
- {
- "entity": "LeftUpVector;",
- "value": "U+021BF"
- },
- {
- "entity": "LeftUpVectorBar;",
- "value": "U+02958"
- },
- {
- "entity": "LeftVector;",
- "value": "U+021BC"
- },
- {
- "entity": "LeftVectorBar;",
- "value": "U+02952"
- },
- {
- "entity": "Leftarrow;",
- "value": "U+021D0"
- },
- {
- "entity": "Leftrightarrow;",
- "value": "U+021D4"
- },
- {
- "entity": "LessEqualGreater;",
- "value": "U+022DA"
- },
- {
- "entity": "LessFullEqual;",
- "value": "U+02266"
- },
- {
- "entity": "LessGreater;",
- "value": "U+02276"
- },
- {
- "entity": "LessLess;",
- "value": "U+02AA1"
- },
- {
- "entity": "LessSlantEqual;",
- "value": "U+02A7D"
- },
- {
- "entity": "LessTilde;",
- "value": "U+02272"
- },
- {
- "entity": "Lfr;",
- "value": "U+1D50F"
- },
- {
- "entity": "Ll;",
- "value": "U+022D8"
- },
- {
- "entity": "Lleftarrow;",
- "value": "U+021DA"
- },
- {
- "entity": "Lmidot;",
- "value": "U+0013F"
- },
- {
- "entity": "LongLeftArrow;",
- "value": "U+027F5"
- },
- {
- "entity": "LongLeftRightArrow;",
- "value": "U+027F7"
- },
- {
- "entity": "LongRightArrow;",
- "value": "U+027F6"
- },
- {
- "entity": "Longleftarrow;",
- "value": "U+027F8"
- },
- {
- "entity": "Longleftrightarrow;",
- "value": "U+027FA"
- },
- {
- "entity": "Longrightarrow;",
- "value": "U+027F9"
- },
- {
- "entity": "Lopf;",
- "value": "U+1D543"
- },
- {
- "entity": "LowerLeftArrow;",
- "value": "U+02199"
- },
- {
- "entity": "LowerRightArrow;",
- "value": "U+02198"
- },
- {
- "entity": "Lscr;",
- "value": "U+02112"
- },
- {
- "entity": "Lsh;",
- "value": "U+021B0"
- },
- {
- "entity": "Lstrok;",
- "value": "U+00141"
- },
- {
- "entity": "Lt;",
- "value": "U+0226A"
- },
- {
- "entity": "Map;",
- "value": "U+02905"
- },
- {
- "entity": "Mcy;",
- "value": "U+0041C"
- },
- {
- "entity": "MediumSpace;",
- "value": "U+0205F"
- },
- {
- "entity": "Mellintrf;",
- "value": "U+02133"
- },
- {
- "entity": "Mfr;",
- "value": "U+1D510"
- },
- {
- "entity": "MinusPlus;",
- "value": "U+02213"
- },
- {
- "entity": "Mopf;",
- "value": "U+1D544"
- },
- {
- "entity": "Mscr;",
- "value": "U+02133"
- },
- {
- "entity": "Mu;",
- "value": "U+0039C"
- },
- {
- "entity": "NJcy;",
- "value": "U+0040A"
- },
- {
- "entity": "Nacute;",
- "value": "U+00143"
- },
- {
- "entity": "Ncaron;",
- "value": "U+00147"
- },
- {
- "entity": "Ncedil;",
- "value": "U+00145"
- },
- {
- "entity": "Ncy;",
- "value": "U+0041D"
- },
- {
- "entity": "NegativeMediumSpace;",
- "value": "U+0200B"
- },
- {
- "entity": "NegativeThickSpace;",
- "value": "U+0200B"
- },
- {
- "entity": "NegativeThinSpace;",
- "value": "U+0200B"
- },
- {
- "entity": "NegativeVeryThinSpace;",
- "value": "U+0200B"
- },
- {
- "entity": "NestedGreaterGreater;",
- "value": "U+0226B"
- },
- {
- "entity": "NestedLessLess;",
- "value": "U+0226A"
- },
- {
- "entity": "NewLine;",
- "value": "U+0000A"
- },
- {
- "entity": "Nfr;",
- "value": "U+1D511"
- },
- {
- "entity": "NoBreak;",
- "value": "U+02060"
- },
- {
- "entity": "NonBreakingSpace;",
- "value": "U+000A0"
- },
- {
- "entity": "Nopf;",
- "value": "U+02115"
- },
- {
- "entity": "Not;",
- "value": "U+02AEC"
- },
- {
- "entity": "NotCongruent;",
- "value": "U+02262"
- },
- {
- "entity": "NotCupCap;",
- "value": "U+0226D"
- },
- {
- "entity": "NotDoubleVerticalBar;",
- "value": "U+02226"
- },
- {
- "entity": "NotElement;",
- "value": "U+02209"
- },
- {
- "entity": "NotEqual;",
- "value": "U+02260"
- },
- {
- "entity": "NotExists;",
- "value": "U+02204"
- },
- {
- "entity": "NotGreater;",
- "value": "U+0226F"
- },
- {
- "entity": "NotGreaterEqual;",
- "value": "U+02271"
- },
- {
- "entity": "NotGreaterLess;",
- "value": "U+02279"
- },
- {
- "entity": "NotGreaterTilde;",
- "value": "U+02275"
- },
- {
- "entity": "NotLeftTriangle;",
- "value": "U+022EA"
- },
- {
- "entity": "NotLeftTriangleEqual;",
- "value": "U+022EC"
- },
- {
- "entity": "NotLess;",
- "value": "U+0226E"
- },
- {
- "entity": "NotLessEqual;",
- "value": "U+02270"
- },
- {
- "entity": "NotLessGreater;",
- "value": "U+02278"
- },
- {
- "entity": "NotLessTilde;",
- "value": "U+02274"
- },
- {
- "entity": "NotPrecedes;",
- "value": "U+02280"
- },
- {
- "entity": "NotPrecedesSlantEqual;",
- "value": "U+022E0"
- },
- {
- "entity": "NotReverseElement;",
- "value": "U+0220C"
- },
- {
- "entity": "NotRightTriangle;",
- "value": "U+022EB"
- },
- {
- "entity": "NotRightTriangleEqual;",
- "value": "U+022ED"
- },
- {
- "entity": "NotSquareSubsetEqual;",
- "value": "U+022E2"
- },
- {
- "entity": "NotSquareSupersetEqual;",
- "value": "U+022E3"
- },
- {
- "entity": "NotSubsetEqual;",
- "value": "U+02288"
- },
- {
- "entity": "NotSucceeds;",
- "value": "U+02281"
- },
- {
- "entity": "NotSucceedsSlantEqual;",
- "value": "U+022E1"
- },
- {
- "entity": "NotSupersetEqual;",
- "value": "U+02289"
- },
- {
- "entity": "NotTilde;",
- "value": "U+02241"
- },
- {
- "entity": "NotTildeEqual;",
- "value": "U+02244"
- },
- {
- "entity": "NotTildeFullEqual;",
- "value": "U+02247"
- },
- {
- "entity": "NotTildeTilde;",
- "value": "U+02249"
- },
- {
- "entity": "NotVerticalBar;",
- "value": "U+02224"
- },
- {
- "entity": "Nscr;",
- "value": "U+1D4A9"
- },
- {
- "entity": "Ntilde;",
- "value": "U+000D1"
- },
- {
- "entity": "Ntilde",
- "value": "U+000D1"
- },
- {
- "entity": "Nu;",
- "value": "U+0039D"
- },
- {
- "entity": "OElig;",
- "value": "U+00152"
- },
- {
- "entity": "Oacute;",
- "value": "U+000D3"
- },
- {
- "entity": "Oacute",
- "value": "U+000D3"
- },
- {
- "entity": "Ocirc;",
- "value": "U+000D4"
- },
- {
- "entity": "Ocirc",
- "value": "U+000D4"
- },
- {
- "entity": "Ocy;",
- "value": "U+0041E"
- },
- {
- "entity": "Odblac;",
- "value": "U+00150"
- },
- {
- "entity": "Ofr;",
- "value": "U+1D512"
- },
- {
- "entity": "Ograve;",
- "value": "U+000D2"
- },
- {
- "entity": "Ograve",
- "value": "U+000D2"
- },
- {
- "entity": "Omacr;",
- "value": "U+0014C"
- },
- {
- "entity": "Omega;",
- "value": "U+003A9"
- },
- {
- "entity": "Omicron;",
- "value": "U+0039F"
- },
- {
- "entity": "Oopf;",
- "value": "U+1D546"
- },
- {
- "entity": "OpenCurlyDoubleQuote;",
- "value": "U+0201C"
- },
- {
- "entity": "OpenCurlyQuote;",
- "value": "U+02018"
- },
- {
- "entity": "Or;",
- "value": "U+02A54"
- },
- {
- "entity": "Oscr;",
- "value": "U+1D4AA"
- },
- {
- "entity": "Oslash;",
- "value": "U+000D8"
- },
- {
- "entity": "Oslash",
- "value": "U+000D8"
- },
- {
- "entity": "Otilde;",
- "value": "U+000D5"
- },
- {
- "entity": "Otilde",
- "value": "U+000D5"
- },
- {
- "entity": "Otimes;",
- "value": "U+02A37"
- },
- {
- "entity": "Ouml;",
- "value": "U+000D6"
- },
- {
- "entity": "Ouml",
- "value": "U+000D6"
- },
- {
- "entity": "OverBar;",
- "value": "U+0203E"
- },
- {
- "entity": "OverBrace;",
- "value": "U+023DE"
- },
- {
- "entity": "OverBracket;",
- "value": "U+023B4"
- },
- {
- "entity": "OverParenthesis;",
- "value": "U+023DC"
- },
- {
- "entity": "PartialD;",
- "value": "U+02202"
- },
- {
- "entity": "Pcy;",
- "value": "U+0041F"
- },
- {
- "entity": "Pfr;",
- "value": "U+1D513"
- },
- {
- "entity": "Phi;",
- "value": "U+003A6"
- },
- {
- "entity": "Pi;",
- "value": "U+003A0"
- },
- {
- "entity": "PlusMinus;",
- "value": "U+000B1"
- },
- {
- "entity": "Poincareplane;",
- "value": "U+0210C"
- },
- {
- "entity": "Popf;",
- "value": "U+02119"
- },
- {
- "entity": "Pr;",
- "value": "U+02ABB"
- },
- {
- "entity": "Precedes;",
- "value": "U+0227A"
- },
- {
- "entity": "PrecedesEqual;",
- "value": "U+02AAF"
- },
- {
- "entity": "PrecedesSlantEqual;",
- "value": "U+0227C"
- },
- {
- "entity": "PrecedesTilde;",
- "value": "U+0227E"
- },
- {
- "entity": "Prime;",
- "value": "U+02033"
- },
- {
- "entity": "Product;",
- "value": "U+0220F"
- },
- {
- "entity": "Proportion;",
- "value": "U+02237"
- },
- {
- "entity": "Proportional;",
- "value": "U+0221D"
- },
- {
- "entity": "Pscr;",
- "value": "U+1D4AB"
- },
- {
- "entity": "Psi;",
- "value": "U+003A8"
- },
- {
- "entity": "QUOT;",
- "value": "U+00022"
- },
- {
- "entity": "QUOT",
- "value": "U+00022"
- },
- {
- "entity": "Qfr;",
- "value": "U+1D514"
- },
- {
- "entity": "Qopf;",
- "value": "U+0211A"
- },
- {
- "entity": "Qscr;",
- "value": "U+1D4AC"
- },
- {
- "entity": "RBarr;",
- "value": "U+02910"
- },
- {
- "entity": "REG;",
- "value": "U+000AE"
- },
- {
- "entity": "REG",
- "value": "U+000AE"
- },
- {
- "entity": "Racute;",
- "value": "U+00154"
- },
- {
- "entity": "Rang;",
- "value": "U+027EB"
- },
- {
- "entity": "Rarr;",
- "value": "U+021A0"
- },
- {
- "entity": "Rarrtl;",
- "value": "U+02916"
- },
- {
- "entity": "Rcaron;",
- "value": "U+00158"
- },
- {
- "entity": "Rcedil;",
- "value": "U+00156"
- },
- {
- "entity": "Rcy;",
- "value": "U+00420"
- },
- {
- "entity": "Re;",
- "value": "U+0211C"
- },
- {
- "entity": "ReverseElement;",
- "value": "U+0220B"
- },
- {
- "entity": "ReverseEquilibrium;",
- "value": "U+021CB"
- },
- {
- "entity": "ReverseUpEquilibrium;",
- "value": "U+0296F"
- },
- {
- "entity": "Rfr;",
- "value": "U+0211C"
- },
- {
- "entity": "Rho;",
- "value": "U+003A1"
- },
- {
- "entity": "RightAngleBracket;",
- "value": "U+027E9"
- },
- {
- "entity": "RightArrow;",
- "value": "U+02192"
- },
- {
- "entity": "RightArrowBar;",
- "value": "U+021E5"
- },
- {
- "entity": "RightArrowLeftArrow;",
- "value": "U+021C4"
- },
- {
- "entity": "RightCeiling;",
- "value": "U+02309"
- },
- {
- "entity": "RightDoubleBracket;",
- "value": "U+027E7"
- },
- {
- "entity": "RightDownTeeVector;",
- "value": "U+0295D"
- },
- {
- "entity": "RightDownVector;",
- "value": "U+021C2"
- },
- {
- "entity": "RightDownVectorBar;",
- "value": "U+02955"
- },
- {
- "entity": "RightFloor;",
- "value": "U+0230B"
- },
- {
- "entity": "RightTee;",
- "value": "U+022A2"
- },
- {
- "entity": "RightTeeArrow;",
- "value": "U+021A6"
- },
- {
- "entity": "RightTeeVector;",
- "value": "U+0295B"
- },
- {
- "entity": "RightTriangle;",
- "value": "U+022B3"
- },
- {
- "entity": "RightTriangleBar;",
- "value": "U+029D0"
- },
- {
- "entity": "RightTriangleEqual;",
- "value": "U+022B5"
- },
- {
- "entity": "RightUpDownVector;",
- "value": "U+0294F"
- },
- {
- "entity": "RightUpTeeVector;",
- "value": "U+0295C"
- },
- {
- "entity": "RightUpVector;",
- "value": "U+021BE"
- },
- {
- "entity": "RightUpVectorBar;",
- "value": "U+02954"
- },
- {
- "entity": "RightVector;",
- "value": "U+021C0"
- },
- {
- "entity": "RightVectorBar;",
- "value": "U+02953"
- },
- {
- "entity": "Rightarrow;",
- "value": "U+021D2"
- },
- {
- "entity": "Ropf;",
- "value": "U+0211D"
- },
- {
- "entity": "RoundImplies;",
- "value": "U+02970"
- },
- {
- "entity": "Rrightarrow;",
- "value": "U+021DB"
- },
- {
- "entity": "Rscr;",
- "value": "U+0211B"
- },
- {
- "entity": "Rsh;",
- "value": "U+021B1"
- },
- {
- "entity": "RuleDelayed;",
- "value": "U+029F4"
- },
- {
- "entity": "SHCHcy;",
- "value": "U+00429"
- },
- {
- "entity": "SHcy;",
- "value": "U+00428"
- },
- {
- "entity": "SOFTcy;",
- "value": "U+0042C"
- },
- {
- "entity": "Sacute;",
- "value": "U+0015A"
- },
- {
- "entity": "Sc;",
- "value": "U+02ABC"
- },
- {
- "entity": "Scaron;",
- "value": "U+00160"
- },
- {
- "entity": "Scedil;",
- "value": "U+0015E"
- },
- {
- "entity": "Scirc;",
- "value": "U+0015C"
- },
- {
- "entity": "Scy;",
- "value": "U+00421"
- },
- {
- "entity": "Sfr;",
- "value": "U+1D516"
- },
- {
- "entity": "ShortDownArrow;",
- "value": "U+02193"
- },
- {
- "entity": "ShortLeftArrow;",
- "value": "U+02190"
- },
- {
- "entity": "ShortRightArrow;",
- "value": "U+02192"
- },
- {
- "entity": "ShortUpArrow;",
- "value": "U+02191"
- },
- {
- "entity": "Sigma;",
- "value": "U+003A3"
- },
- {
- "entity": "SmallCircle;",
- "value": "U+02218"
- },
- {
- "entity": "Sopf;",
- "value": "U+1D54A"
- },
- {
- "entity": "Sqrt;",
- "value": "U+0221A"
- },
- {
- "entity": "Square;",
- "value": "U+025A1"
- },
- {
- "entity": "SquareIntersection;",
- "value": "U+02293"
- },
- {
- "entity": "SquareSubset;",
- "value": "U+0228F"
- },
- {
- "entity": "SquareSubsetEqual;",
- "value": "U+02291"
- },
- {
- "entity": "SquareSuperset;",
- "value": "U+02290"
- },
- {
- "entity": "SquareSupersetEqual;",
- "value": "U+02292"
- },
- {
- "entity": "SquareUnion;",
- "value": "U+02294"
- },
- {
- "entity": "Sscr;",
- "value": "U+1D4AE"
- },
- {
- "entity": "Star;",
- "value": "U+022C6"
- },
- {
- "entity": "Sub;",
- "value": "U+022D0"
- },
- {
- "entity": "Subset;",
- "value": "U+022D0"
- },
- {
- "entity": "SubsetEqual;",
- "value": "U+02286"
- },
- {
- "entity": "Succeeds;",
- "value": "U+0227B"
- },
- {
- "entity": "SucceedsEqual;",
- "value": "U+02AB0"
- },
- {
- "entity": "SucceedsSlantEqual;",
- "value": "U+0227D"
- },
- {
- "entity": "SucceedsTilde;",
- "value": "U+0227F"
- },
- {
- "entity": "SuchThat;",
- "value": "U+0220B"
- },
- {
- "entity": "Sum;",
- "value": "U+02211"
- },
- {
- "entity": "Sup;",
- "value": "U+022D1"
- },
- {
- "entity": "Superset;",
- "value": "U+02283"
- },
- {
- "entity": "SupersetEqual;",
- "value": "U+02287"
- },
- {
- "entity": "Supset;",
- "value": "U+022D1"
- },
- {
- "entity": "THORN;",
- "value": "U+000DE"
- },
- {
- "entity": "THORN",
- "value": "U+000DE"
- },
- {
- "entity": "TRADE;",
- "value": "U+02122"
- },
- {
- "entity": "TSHcy;",
- "value": "U+0040B"
- },
- {
- "entity": "TScy;",
- "value": "U+00426"
- },
- {
- "entity": "Tab;",
- "value": "U+00009"
- },
- {
- "entity": "Tau;",
- "value": "U+003A4"
- },
- {
- "entity": "Tcaron;",
- "value": "U+00164"
- },
- {
- "entity": "Tcedil;",
- "value": "U+00162"
- },
- {
- "entity": "Tcy;",
- "value": "U+00422"
- },
- {
- "entity": "Tfr;",
- "value": "U+1D517"
- },
- {
- "entity": "Therefore;",
- "value": "U+02234"
- },
- {
- "entity": "Theta;",
- "value": "U+00398"
- },
- {
- "entity": "ThinSpace;",
- "value": "U+02009"
- },
- {
- "entity": "Tilde;",
- "value": "U+0223C"
- },
- {
- "entity": "TildeEqual;",
- "value": "U+02243"
- },
- {
- "entity": "TildeFullEqual;",
- "value": "U+02245"
- },
- {
- "entity": "TildeTilde;",
- "value": "U+02248"
- },
- {
- "entity": "Topf;",
- "value": "U+1D54B"
- },
- {
- "entity": "TripleDot;",
- "value": "U+020DB"
- },
- {
- "entity": "Tscr;",
- "value": "U+1D4AF"
- },
- {
- "entity": "Tstrok;",
- "value": "U+00166"
- },
- {
- "entity": "Uacute;",
- "value": "U+000DA"
- },
- {
- "entity": "Uacute",
- "value": "U+000DA"
- },
- {
- "entity": "Uarr;",
- "value": "U+0219F"
- },
- {
- "entity": "Uarrocir;",
- "value": "U+02949"
- },
- {
- "entity": "Ubrcy;",
- "value": "U+0040E"
- },
- {
- "entity": "Ubreve;",
- "value": "U+0016C"
- },
- {
- "entity": "Ucirc;",
- "value": "U+000DB"
- },
- {
- "entity": "Ucirc",
- "value": "U+000DB"
- },
- {
- "entity": "Ucy;",
- "value": "U+00423"
- },
- {
- "entity": "Udblac;",
- "value": "U+00170"
- },
- {
- "entity": "Ufr;",
- "value": "U+1D518"
- },
- {
- "entity": "Ugrave;",
- "value": "U+000D9"
- },
- {
- "entity": "Ugrave",
- "value": "U+000D9"
- },
- {
- "entity": "Umacr;",
- "value": "U+0016A"
- },
- {
- "entity": "UnderBar;",
- "value": "U+0005F"
- },
- {
- "entity": "UnderBrace;",
- "value": "U+023DF"
- },
- {
- "entity": "UnderBracket;",
- "value": "U+023B5"
- },
- {
- "entity": "UnderParenthesis;",
- "value": "U+023DD"
- },
- {
- "entity": "Union;",
- "value": "U+022C3"
- },
- {
- "entity": "UnionPlus;",
- "value": "U+0228E"
- },
- {
- "entity": "Uogon;",
- "value": "U+00172"
- },
- {
- "entity": "Uopf;",
- "value": "U+1D54C"
- },
- {
- "entity": "UpArrow;",
- "value": "U+02191"
- },
- {
- "entity": "UpArrowBar;",
- "value": "U+02912"
- },
- {
- "entity": "UpArrowDownArrow;",
- "value": "U+021C5"
- },
- {
- "entity": "UpDownArrow;",
- "value": "U+02195"
- },
- {
- "entity": "UpEquilibrium;",
- "value": "U+0296E"
- },
- {
- "entity": "UpTee;",
- "value": "U+022A5"
- },
- {
- "entity": "UpTeeArrow;",
- "value": "U+021A5"
- },
- {
- "entity": "Uparrow;",
- "value": "U+021D1"
- },
- {
- "entity": "Updownarrow;",
- "value": "U+021D5"
- },
- {
- "entity": "UpperLeftArrow;",
- "value": "U+02196"
- },
- {
- "entity": "UpperRightArrow;",
- "value": "U+02197"
- },
- {
- "entity": "Upsi;",
- "value": "U+003D2"
- },
- {
- "entity": "Upsilon;",
- "value": "U+003A5"
- },
- {
- "entity": "Uring;",
- "value": "U+0016E"
- },
- {
- "entity": "Uscr;",
- "value": "U+1D4B0"
- },
- {
- "entity": "Utilde;",
- "value": "U+00168"
- },
- {
- "entity": "Uuml;",
- "value": "U+000DC"
- },
- {
- "entity": "Uuml",
- "value": "U+000DC"
- },
- {
- "entity": "VDash;",
- "value": "U+022AB"
- },
- {
- "entity": "Vbar;",
- "value": "U+02AEB"
- },
- {
- "entity": "Vcy;",
- "value": "U+00412"
- },
- {
- "entity": "Vdash;",
- "value": "U+022A9"
- },
- {
- "entity": "Vdashl;",
- "value": "U+02AE6"
- },
- {
- "entity": "Vee;",
- "value": "U+022C1"
- },
- {
- "entity": "Verbar;",
- "value": "U+02016"
- },
- {
- "entity": "Vert;",
- "value": "U+02016"
- },
- {
- "entity": "VerticalBar;",
- "value": "U+02223"
- },
- {
- "entity": "VerticalLine;",
- "value": "U+0007C"
- },
- {
- "entity": "VerticalSeparator;",
- "value": "U+02758"
- },
- {
- "entity": "VerticalTilde;",
- "value": "U+02240"
- },
- {
- "entity": "VeryThinSpace;",
- "value": "U+0200A"
- },
- {
- "entity": "Vfr;",
- "value": "U+1D519"
- },
- {
- "entity": "Vopf;",
- "value": "U+1D54D"
- },
- {
- "entity": "Vscr;",
- "value": "U+1D4B1"
- },
- {
- "entity": "Vvdash;",
- "value": "U+022AA"
- },
- {
- "entity": "Wcirc;",
- "value": "U+00174"
- },
- {
- "entity": "Wedge;",
- "value": "U+022C0"
- },
- {
- "entity": "Wfr;",
- "value": "U+1D51A"
- },
- {
- "entity": "Wopf;",
- "value": "U+1D54E"
- },
- {
- "entity": "Wscr;",
- "value": "U+1D4B2"
- },
- {
- "entity": "Xfr;",
- "value": "U+1D51B"
- },
- {
- "entity": "Xi;",
- "value": "U+0039E"
- },
- {
- "entity": "Xopf;",
- "value": "U+1D54F"
- },
- {
- "entity": "Xscr;",
- "value": "U+1D4B3"
- },
- {
- "entity": "YAcy;",
- "value": "U+0042F"
- },
- {
- "entity": "YIcy;",
- "value": "U+00407"
- },
- {
- "entity": "YUcy;",
- "value": "U+0042E"
- },
- {
- "entity": "Yacute;",
- "value": "U+000DD"
- },
- {
- "entity": "Yacute",
- "value": "U+000DD"
- },
- {
- "entity": "Ycirc;",
- "value": "U+00176"
- },
- {
- "entity": "Ycy;",
- "value": "U+0042B"
- },
- {
- "entity": "Yfr;",
- "value": "U+1D51C"
- },
- {
- "entity": "Yopf;",
- "value": "U+1D550"
- },
- {
- "entity": "Yscr;",
- "value": "U+1D4B4"
- },
- {
- "entity": "Yuml;",
- "value": "U+00178"
- },
- {
- "entity": "ZHcy;",
- "value": "U+00416"
- },
- {
- "entity": "Zacute;",
- "value": "U+00179"
- },
- {
- "entity": "Zcaron;",
- "value": "U+0017D"
- },
- {
- "entity": "Zcy;",
- "value": "U+00417"
- },
- {
- "entity": "Zdot;",
- "value": "U+0017B"
- },
- {
- "entity": "ZeroWidthSpace;",
- "value": "U+0200B"
- },
- {
- "entity": "Zeta;",
- "value": "U+00396"
- },
- {
- "entity": "Zfr;",
- "value": "U+02128"
- },
- {
- "entity": "Zopf;",
- "value": "U+02124"
- },
- {
- "entity": "Zscr;",
- "value": "U+1D4B5"
- },
- {
- "entity": "aacute;",
- "value": "U+000E1"
- },
- {
- "entity": "aacute",
- "value": "U+000E1"
- },
- {
- "entity": "abreve;",
- "value": "U+00103"
- },
- {
- "entity": "ac;",
- "value": "U+0223E"
- },
- {
- "entity": "acd;",
- "value": "U+0223F"
- },
- {
- "entity": "acirc;",
- "value": "U+000E2"
- },
- {
- "entity": "acirc",
- "value": "U+000E2"
- },
- {
- "entity": "acute;",
- "value": "U+000B4"
- },
- {
- "entity": "acute",
- "value": "U+000B4"
- },
- {
- "entity": "acy;",
- "value": "U+00430"
- },
- {
- "entity": "aelig;",
- "value": "U+000E6"
- },
- {
- "entity": "aelig",
- "value": "U+000E6"
- },
- {
- "entity": "af;",
- "value": "U+02061"
- },
- {
- "entity": "afr;",
- "value": "U+1D51E"
- },
- {
- "entity": "agrave;",
- "value": "U+000E0"
- },
- {
- "entity": "agrave",
- "value": "U+000E0"
- },
- {
- "entity": "alefsym;",
- "value": "U+02135"
- },
- {
- "entity": "aleph;",
- "value": "U+02135"
- },
- {
- "entity": "alpha;",
- "value": "U+003B1"
- },
- {
- "entity": "amacr;",
- "value": "U+00101"
- },
- {
- "entity": "amalg;",
- "value": "U+02A3F"
- },
- {
- "entity": "amp;",
- "value": "U+00026"
- },
- {
- "entity": "amp",
- "value": "U+00026"
- },
- {
- "entity": "and;",
- "value": "U+02227"
- },
- {
- "entity": "andand;",
- "value": "U+02A55"
- },
- {
- "entity": "andd;",
- "value": "U+02A5C"
- },
- {
- "entity": "andslope;",
- "value": "U+02A58"
- },
- {
- "entity": "andv;",
- "value": "U+02A5A"
- },
- {
- "entity": "ang;",
- "value": "U+02220"
- },
- {
- "entity": "ange;",
- "value": "U+029A4"
- },
- {
- "entity": "angle;",
- "value": "U+02220"
- },
- {
- "entity": "angmsd;",
- "value": "U+02221"
- },
- {
- "entity": "angmsdaa;",
- "value": "U+029A8"
- },
- {
- "entity": "angmsdab;",
- "value": "U+029A9"
- },
- {
- "entity": "angmsdac;",
- "value": "U+029AA"
- },
- {
- "entity": "angmsdad;",
- "value": "U+029AB"
- },
- {
- "entity": "angmsdae;",
- "value": "U+029AC"
- },
- {
- "entity": "angmsdaf;",
- "value": "U+029AD"
- },
- {
- "entity": "angmsdag;",
- "value": "U+029AE"
- },
- {
- "entity": "angmsdah;",
- "value": "U+029AF"
- },
- {
- "entity": "angrt;",
- "value": "U+0221F"
- },
- {
- "entity": "angrtvb;",
- "value": "U+022BE"
- },
- {
- "entity": "angrtvbd;",
- "value": "U+0299D"
- },
- {
- "entity": "angsph;",
- "value": "U+02222"
- },
- {
- "entity": "angst;",
- "value": "U+000C5"
- },
- {
- "entity": "angzarr;",
- "value": "U+0237C"
- },
- {
- "entity": "aogon;",
- "value": "U+00105"
- },
- {
- "entity": "aopf;",
- "value": "U+1D552"
- },
- {
- "entity": "ap;",
- "value": "U+02248"
- },
- {
- "entity": "apE;",
- "value": "U+02A70"
- },
- {
- "entity": "apacir;",
- "value": "U+02A6F"
- },
- {
- "entity": "ape;",
- "value": "U+0224A"
- },
- {
- "entity": "apid;",
- "value": "U+0224B"
- },
- {
- "entity": "apos;",
- "value": "U+00027"
- },
- {
- "entity": "approx;",
- "value": "U+02248"
- },
- {
- "entity": "approxeq;",
- "value": "U+0224A"
- },
- {
- "entity": "aring;",
- "value": "U+000E5"
- },
- {
- "entity": "aring",
- "value": "U+000E5"
- },
- {
- "entity": "ascr;",
- "value": "U+1D4B6"
- },
- {
- "entity": "ast;",
- "value": "U+0002A"
- },
- {
- "entity": "asymp;",
- "value": "U+02248"
- },
- {
- "entity": "asympeq;",
- "value": "U+0224D"
- },
- {
- "entity": "atilde;",
- "value": "U+000E3"
- },
- {
- "entity": "atilde",
- "value": "U+000E3"
- },
- {
- "entity": "auml;",
- "value": "U+000E4"
- },
- {
- "entity": "auml",
- "value": "U+000E4"
- },
- {
- "entity": "awconint;",
- "value": "U+02233"
- },
- {
- "entity": "awint;",
- "value": "U+02A11"
- },
- {
- "entity": "bNot;",
- "value": "U+02AED"
- },
- {
- "entity": "backcong;",
- "value": "U+0224C"
- },
- {
- "entity": "backepsilon;",
- "value": "U+003F6"
- },
- {
- "entity": "backprime;",
- "value": "U+02035"
- },
- {
- "entity": "backsim;",
- "value": "U+0223D"
- },
- {
- "entity": "backsimeq;",
- "value": "U+022CD"
- },
- {
- "entity": "barvee;",
- "value": "U+022BD"
- },
- {
- "entity": "barwed;",
- "value": "U+02305"
- },
- {
- "entity": "barwedge;",
- "value": "U+02305"
- },
- {
- "entity": "bbrk;",
- "value": "U+023B5"
- },
- {
- "entity": "bbrktbrk;",
- "value": "U+023B6"
- },
- {
- "entity": "bcong;",
- "value": "U+0224C"
- },
- {
- "entity": "bcy;",
- "value": "U+00431"
- },
- {
- "entity": "bdquo;",
- "value": "U+0201E"
- },
- {
- "entity": "becaus;",
- "value": "U+02235"
- },
- {
- "entity": "because;",
- "value": "U+02235"
- },
- {
- "entity": "bemptyv;",
- "value": "U+029B0"
- },
- {
- "entity": "bepsi;",
- "value": "U+003F6"
- },
- {
- "entity": "bernou;",
- "value": "U+0212C"
- },
- {
- "entity": "beta;",
- "value": "U+003B2"
- },
- {
- "entity": "beth;",
- "value": "U+02136"
- },
- {
- "entity": "between;",
- "value": "U+0226C"
- },
- {
- "entity": "bfr;",
- "value": "U+1D51F"
- },
- {
- "entity": "bigcap;",
- "value": "U+022C2"
- },
- {
- "entity": "bigcirc;",
- "value": "U+025EF"
- },
- {
- "entity": "bigcup;",
- "value": "U+022C3"
- },
- {
- "entity": "bigodot;",
- "value": "U+02A00"
- },
- {
- "entity": "bigoplus;",
- "value": "U+02A01"
- },
- {
- "entity": "bigotimes;",
- "value": "U+02A02"
- },
- {
- "entity": "bigsqcup;",
- "value": "U+02A06"
- },
- {
- "entity": "bigstar;",
- "value": "U+02605"
- },
- {
- "entity": "bigtriangledown;",
- "value": "U+025BD"
- },
- {
- "entity": "bigtriangleup;",
- "value": "U+025B3"
- },
- {
- "entity": "biguplus;",
- "value": "U+02A04"
- },
- {
- "entity": "bigvee;",
- "value": "U+022C1"
- },
- {
- "entity": "bigwedge;",
- "value": "U+022C0"
- },
- {
- "entity": "bkarow;",
- "value": "U+0290D"
- },
- {
- "entity": "blacklozenge;",
- "value": "U+029EB"
- },
- {
- "entity": "blacksquare;",
- "value": "U+025AA"
- },
- {
- "entity": "blacktriangle;",
- "value": "U+025B4"
- },
- {
- "entity": "blacktriangledown;",
- "value": "U+025BE"
- },
- {
- "entity": "blacktriangleleft;",
- "value": "U+025C2"
- },
- {
- "entity": "blacktriangleright;",
- "value": "U+025B8"
- },
- {
- "entity": "blank;",
- "value": "U+02423"
- },
- {
- "entity": "blk12;",
- "value": "U+02592"
- },
- {
- "entity": "blk14;",
- "value": "U+02591"
- },
- {
- "entity": "blk34;",
- "value": "U+02593"
- },
- {
- "entity": "block;",
- "value": "U+02588"
- },
- {
- "entity": "bnot;",
- "value": "U+02310"
- },
- {
- "entity": "bopf;",
- "value": "U+1D553"
- },
- {
- "entity": "bot;",
- "value": "U+022A5"
- },
- {
- "entity": "bottom;",
- "value": "U+022A5"
- },
- {
- "entity": "bowtie;",
- "value": "U+022C8"
- },
- {
- "entity": "boxDL;",
- "value": "U+02557"
- },
- {
- "entity": "boxDR;",
- "value": "U+02554"
- },
- {
- "entity": "boxDl;",
- "value": "U+02556"
- },
- {
- "entity": "boxDr;",
- "value": "U+02553"
- },
- {
- "entity": "boxH;",
- "value": "U+02550"
- },
- {
- "entity": "boxHD;",
- "value": "U+02566"
- },
- {
- "entity": "boxHU;",
- "value": "U+02569"
- },
- {
- "entity": "boxHd;",
- "value": "U+02564"
- },
- {
- "entity": "boxHu;",
- "value": "U+02567"
- },
- {
- "entity": "boxUL;",
- "value": "U+0255D"
- },
- {
- "entity": "boxUR;",
- "value": "U+0255A"
- },
- {
- "entity": "boxUl;",
- "value": "U+0255C"
- },
- {
- "entity": "boxUr;",
- "value": "U+02559"
- },
- {
- "entity": "boxV;",
- "value": "U+02551"
- },
- {
- "entity": "boxVH;",
- "value": "U+0256C"
- },
- {
- "entity": "boxVL;",
- "value": "U+02563"
- },
- {
- "entity": "boxVR;",
- "value": "U+02560"
- },
- {
- "entity": "boxVh;",
- "value": "U+0256B"
- },
- {
- "entity": "boxVl;",
- "value": "U+02562"
- },
- {
- "entity": "boxVr;",
- "value": "U+0255F"
- },
- {
- "entity": "boxbox;",
- "value": "U+029C9"
- },
- {
- "entity": "boxdL;",
- "value": "U+02555"
- },
- {
- "entity": "boxdR;",
- "value": "U+02552"
- },
- {
- "entity": "boxdl;",
- "value": "U+02510"
- },
- {
- "entity": "boxdr;",
- "value": "U+0250C"
- },
- {
- "entity": "boxh;",
- "value": "U+02500"
- },
- {
- "entity": "boxhD;",
- "value": "U+02565"
- },
- {
- "entity": "boxhU;",
- "value": "U+02568"
- },
- {
- "entity": "boxhd;",
- "value": "U+0252C"
- },
- {
- "entity": "boxhu;",
- "value": "U+02534"
- },
- {
- "entity": "boxminus;",
- "value": "U+0229F"
- },
- {
- "entity": "boxplus;",
- "value": "U+0229E"
- },
- {
- "entity": "boxtimes;",
- "value": "U+022A0"
- },
- {
- "entity": "boxuL;",
- "value": "U+0255B"
- },
- {
- "entity": "boxuR;",
- "value": "U+02558"
- },
- {
- "entity": "boxul;",
- "value": "U+02518"
- },
- {
- "entity": "boxur;",
- "value": "U+02514"
- },
- {
- "entity": "boxv;",
- "value": "U+02502"
- },
- {
- "entity": "boxvH;",
- "value": "U+0256A"
- },
- {
- "entity": "boxvL;",
- "value": "U+02561"
- },
- {
- "entity": "boxvR;",
- "value": "U+0255E"
- },
- {
- "entity": "boxvh;",
- "value": "U+0253C"
- },
- {
- "entity": "boxvl;",
- "value": "U+02524"
- },
- {
- "entity": "boxvr;",
- "value": "U+0251C"
- },
- {
- "entity": "bprime;",
- "value": "U+02035"
- },
- {
- "entity": "breve;",
- "value": "U+002D8"
- },
- {
- "entity": "brvbar;",
- "value": "U+000A6"
- },
- {
- "entity": "brvbar",
- "value": "U+000A6"
- },
- {
- "entity": "bscr;",
- "value": "U+1D4B7"
- },
- {
- "entity": "bsemi;",
- "value": "U+0204F"
- },
- {
- "entity": "bsim;",
- "value": "U+0223D"
- },
- {
- "entity": "bsime;",
- "value": "U+022CD"
- },
- {
- "entity": "bsol;",
- "value": "U+0005C"
- },
- {
- "entity": "bsolb;",
- "value": "U+029C5"
- },
- {
- "entity": "bsolhsub;",
- "value": "U+027C8"
- },
- {
- "entity": "bull;",
- "value": "U+02022"
- },
- {
- "entity": "bullet;",
- "value": "U+02022"
- },
- {
- "entity": "bump;",
- "value": "U+0224E"
- },
- {
- "entity": "bumpE;",
- "value": "U+02AAE"
- },
- {
- "entity": "bumpe;",
- "value": "U+0224F"
- },
- {
- "entity": "bumpeq;",
- "value": "U+0224F"
- },
- {
- "entity": "cacute;",
- "value": "U+00107"
- },
- {
- "entity": "cap;",
- "value": "U+02229"
- },
- {
- "entity": "capand;",
- "value": "U+02A44"
- },
- {
- "entity": "capbrcup;",
- "value": "U+02A49"
- },
- {
- "entity": "capcap;",
- "value": "U+02A4B"
- },
- {
- "entity": "capcup;",
- "value": "U+02A47"
- },
- {
- "entity": "capdot;",
- "value": "U+02A40"
- },
- {
- "entity": "caret;",
- "value": "U+02041"
- },
- {
- "entity": "caron;",
- "value": "U+002C7"
- },
- {
- "entity": "ccaps;",
- "value": "U+02A4D"
- },
- {
- "entity": "ccaron;",
- "value": "U+0010D"
- },
- {
- "entity": "ccedil;",
- "value": "U+000E7"
- },
- {
- "entity": "ccedil",
- "value": "U+000E7"
- },
- {
- "entity": "ccirc;",
- "value": "U+00109"
- },
- {
- "entity": "ccups;",
- "value": "U+02A4C"
- },
- {
- "entity": "ccupssm;",
- "value": "U+02A50"
- },
- {
- "entity": "cdot;",
- "value": "U+0010B"
- },
- {
- "entity": "cedil;",
- "value": "U+000B8"
- },
- {
- "entity": "cedil",
- "value": "U+000B8"
- },
- {
- "entity": "cemptyv;",
- "value": "U+029B2"
- },
- {
- "entity": "cent;",
- "value": "U+000A2"
- },
- {
- "entity": "cent",
- "value": "U+000A2"
- },
- {
- "entity": "centerdot;",
- "value": "U+000B7"
- },
- {
- "entity": "cfr;",
- "value": "U+1D520"
- },
- {
- "entity": "chcy;",
- "value": "U+00447"
- },
- {
- "entity": "check;",
- "value": "U+02713"
- },
- {
- "entity": "checkmark;",
- "value": "U+02713"
- },
- {
- "entity": "chi;",
- "value": "U+003C7"
- },
- {
- "entity": "cir;",
- "value": "U+025CB"
- },
- {
- "entity": "cirE;",
- "value": "U+029C3"
- },
- {
- "entity": "circ;",
- "value": "U+002C6"
- },
- {
- "entity": "circeq;",
- "value": "U+02257"
- },
- {
- "entity": "circlearrowleft;",
- "value": "U+021BA"
- },
- {
- "entity": "circlearrowright;",
- "value": "U+021BB"
- },
- {
- "entity": "circledR;",
- "value": "U+000AE"
- },
- {
- "entity": "circledS;",
- "value": "U+024C8"
- },
- {
- "entity": "circledast;",
- "value": "U+0229B"
- },
- {
- "entity": "circledcirc;",
- "value": "U+0229A"
- },
- {
- "entity": "circleddash;",
- "value": "U+0229D"
- },
- {
- "entity": "cire;",
- "value": "U+02257"
- },
- {
- "entity": "cirfnint;",
- "value": "U+02A10"
- },
- {
- "entity": "cirmid;",
- "value": "U+02AEF"
- },
- {
- "entity": "cirscir;",
- "value": "U+029C2"
- },
- {
- "entity": "clubs;",
- "value": "U+02663"
- },
- {
- "entity": "clubsuit;",
- "value": "U+02663"
- },
- {
- "entity": "colon;",
- "value": "U+0003A"
- },
- {
- "entity": "colone;",
- "value": "U+02254"
- },
- {
- "entity": "coloneq;",
- "value": "U+02254"
- },
- {
- "entity": "comma;",
- "value": "U+0002C"
- },
- {
- "entity": "commat;",
- "value": "U+00040"
- },
- {
- "entity": "comp;",
- "value": "U+02201"
- },
- {
- "entity": "compfn;",
- "value": "U+02218"
- },
- {
- "entity": "complement;",
- "value": "U+02201"
- },
- {
- "entity": "complexes;",
- "value": "U+02102"
- },
- {
- "entity": "cong;",
- "value": "U+02245"
- },
- {
- "entity": "congdot;",
- "value": "U+02A6D"
- },
- {
- "entity": "conint;",
- "value": "U+0222E"
- },
- {
- "entity": "copf;",
- "value": "U+1D554"
- },
- {
- "entity": "coprod;",
- "value": "U+02210"
- },
- {
- "entity": "copy;",
- "value": "U+000A9"
- },
- {
- "entity": "copy",
- "value": "U+000A9"
- },
- {
- "entity": "copysr;",
- "value": "U+02117"
- },
- {
- "entity": "crarr;",
- "value": "U+021B5"
- },
- {
- "entity": "cross;",
- "value": "U+02717"
- },
- {
- "entity": "cscr;",
- "value": "U+1D4B8"
- },
- {
- "entity": "csub;",
- "value": "U+02ACF"
- },
- {
- "entity": "csube;",
- "value": "U+02AD1"
- },
- {
- "entity": "csup;",
- "value": "U+02AD0"
- },
- {
- "entity": "csupe;",
- "value": "U+02AD2"
- },
- {
- "entity": "ctdot;",
- "value": "U+022EF"
- },
- {
- "entity": "cudarrl;",
- "value": "U+02938"
- },
- {
- "entity": "cudarrr;",
- "value": "U+02935"
- },
- {
- "entity": "cuepr;",
- "value": "U+022DE"
- },
- {
- "entity": "cuesc;",
- "value": "U+022DF"
- },
- {
- "entity": "cularr;",
- "value": "U+021B6"
- },
- {
- "entity": "cularrp;",
- "value": "U+0293D"
- },
- {
- "entity": "cup;",
- "value": "U+0222A"
- },
- {
- "entity": "cupbrcap;",
- "value": "U+02A48"
- },
- {
- "entity": "cupcap;",
- "value": "U+02A46"
- },
- {
- "entity": "cupcup;",
- "value": "U+02A4A"
- },
- {
- "entity": "cupdot;",
- "value": "U+0228D"
- },
- {
- "entity": "cupor;",
- "value": "U+02A45"
- },
- {
- "entity": "curarr;",
- "value": "U+021B7"
- },
- {
- "entity": "curarrm;",
- "value": "U+0293C"
- },
- {
- "entity": "curlyeqprec;",
- "value": "U+022DE"
- },
- {
- "entity": "curlyeqsucc;",
- "value": "U+022DF"
- },
- {
- "entity": "curlyvee;",
- "value": "U+022CE"
- },
- {
- "entity": "curlywedge;",
- "value": "U+022CF"
- },
- {
- "entity": "curren;",
- "value": "U+000A4"
- },
- {
- "entity": "curren",
- "value": "U+000A4"
- },
- {
- "entity": "curvearrowleft;",
- "value": "U+021B6"
- },
- {
- "entity": "curvearrowright;",
- "value": "U+021B7"
- },
- {
- "entity": "cuvee;",
- "value": "U+022CE"
- },
- {
- "entity": "cuwed;",
- "value": "U+022CF"
- },
- {
- "entity": "cwconint;",
- "value": "U+02232"
- },
- {
- "entity": "cwint;",
- "value": "U+02231"
- },
- {
- "entity": "cylcty;",
- "value": "U+0232D"
- },
- {
- "entity": "dArr;",
- "value": "U+021D3"
- },
- {
- "entity": "dHar;",
- "value": "U+02965"
- },
- {
- "entity": "dagger;",
- "value": "U+02020"
- },
- {
- "entity": "daleth;",
- "value": "U+02138"
- },
- {
- "entity": "darr;",
- "value": "U+02193"
- },
- {
- "entity": "dash;",
- "value": "U+02010"
- },
- {
- "entity": "dashv;",
- "value": "U+022A3"
- },
- {
- "entity": "dbkarow;",
- "value": "U+0290F"
- },
- {
- "entity": "dblac;",
- "value": "U+002DD"
- },
- {
- "entity": "dcaron;",
- "value": "U+0010F"
- },
- {
- "entity": "dcy;",
- "value": "U+00434"
- },
- {
- "entity": "dd;",
- "value": "U+02146"
- },
- {
- "entity": "ddagger;",
- "value": "U+02021"
- },
- {
- "entity": "ddarr;",
- "value": "U+021CA"
- },
- {
- "entity": "ddotseq;",
- "value": "U+02A77"
- },
- {
- "entity": "deg;",
- "value": "U+000B0"
- },
- {
- "entity": "deg",
- "value": "U+000B0"
- },
- {
- "entity": "delta;",
- "value": "U+003B4"
- },
- {
- "entity": "demptyv;",
- "value": "U+029B1"
- },
- {
- "entity": "dfisht;",
- "value": "U+0297F"
- },
- {
- "entity": "dfr;",
- "value": "U+1D521"
- },
- {
- "entity": "dharl;",
- "value": "U+021C3"
- },
- {
- "entity": "dharr;",
- "value": "U+021C2"
- },
- {
- "entity": "diam;",
- "value": "U+022C4"
- },
- {
- "entity": "diamond;",
- "value": "U+022C4"
- },
- {
- "entity": "diamondsuit;",
- "value": "U+02666"
- },
- {
- "entity": "diams;",
- "value": "U+02666"
- },
- {
- "entity": "die;",
- "value": "U+000A8"
- },
- {
- "entity": "digamma;",
- "value": "U+003DD"
- },
- {
- "entity": "disin;",
- "value": "U+022F2"
- },
- {
- "entity": "div;",
- "value": "U+000F7"
- },
- {
- "entity": "divide;",
- "value": "U+000F7"
- },
- {
- "entity": "divide",
- "value": "U+000F7"
- },
- {
- "entity": "divideontimes;",
- "value": "U+022C7"
- },
- {
- "entity": "divonx;",
- "value": "U+022C7"
- },
- {
- "entity": "djcy;",
- "value": "U+00452"
- },
- {
- "entity": "dlcorn;",
- "value": "U+0231E"
- },
- {
- "entity": "dlcrop;",
- "value": "U+0230D"
- },
- {
- "entity": "dollar;",
- "value": "U+00024"
- },
- {
- "entity": "dopf;",
- "value": "U+1D555"
- },
- {
- "entity": "dot;",
- "value": "U+002D9"
- },
- {
- "entity": "doteq;",
- "value": "U+02250"
- },
- {
- "entity": "doteqdot;",
- "value": "U+02251"
- },
- {
- "entity": "dotminus;",
- "value": "U+02238"
- },
- {
- "entity": "dotplus;",
- "value": "U+02214"
- },
- {
- "entity": "dotsquare;",
- "value": "U+022A1"
- },
- {
- "entity": "doublebarwedge;",
- "value": "U+02306"
- },
- {
- "entity": "downarrow;",
- "value": "U+02193"
- },
- {
- "entity": "downdownarrows;",
- "value": "U+021CA"
- },
- {
- "entity": "downharpoonleft;",
- "value": "U+021C3"
- },
- {
- "entity": "downharpoonright;",
- "value": "U+021C2"
- },
- {
- "entity": "drbkarow;",
- "value": "U+02910"
- },
- {
- "entity": "drcorn;",
- "value": "U+0231F"
- },
- {
- "entity": "drcrop;",
- "value": "U+0230C"
- },
- {
- "entity": "dscr;",
- "value": "U+1D4B9"
- },
- {
- "entity": "dscy;",
- "value": "U+00455"
- },
- {
- "entity": "dsol;",
- "value": "U+029F6"
- },
- {
- "entity": "dstrok;",
- "value": "U+00111"
- },
- {
- "entity": "dtdot;",
- "value": "U+022F1"
- },
- {
- "entity": "dtri;",
- "value": "U+025BF"
- },
- {
- "entity": "dtrif;",
- "value": "U+025BE"
- },
- {
- "entity": "duarr;",
- "value": "U+021F5"
- },
- {
- "entity": "duhar;",
- "value": "U+0296F"
- },
- {
- "entity": "dwangle;",
- "value": "U+029A6"
- },
- {
- "entity": "dzcy;",
- "value": "U+0045F"
- },
- {
- "entity": "dzigrarr;",
- "value": "U+027FF"
- },
- {
- "entity": "eDDot;",
- "value": "U+02A77"
- },
- {
- "entity": "eDot;",
- "value": "U+02251"
- },
- {
- "entity": "eacute;",
- "value": "U+000E9"
- },
- {
- "entity": "eacute",
- "value": "U+000E9"
- },
- {
- "entity": "easter;",
- "value": "U+02A6E"
- },
- {
- "entity": "ecaron;",
- "value": "U+0011B"
- },
- {
- "entity": "ecir;",
- "value": "U+02256"
- },
- {
- "entity": "ecirc;",
- "value": "U+000EA"
- },
- {
- "entity": "ecirc",
- "value": "U+000EA"
- },
- {
- "entity": "ecolon;",
- "value": "U+02255"
- },
- {
- "entity": "ecy;",
- "value": "U+0044D"
- },
- {
- "entity": "edot;",
- "value": "U+00117"
- },
- {
- "entity": "ee;",
- "value": "U+02147"
- },
- {
- "entity": "efDot;",
- "value": "U+02252"
- },
- {
- "entity": "efr;",
- "value": "U+1D522"
- },
- {
- "entity": "eg;",
- "value": "U+02A9A"
- },
- {
- "entity": "egrave;",
- "value": "U+000E8"
- },
- {
- "entity": "egrave",
- "value": "U+000E8"
- },
- {
- "entity": "egs;",
- "value": "U+02A96"
- },
- {
- "entity": "egsdot;",
- "value": "U+02A98"
- },
- {
- "entity": "el;",
- "value": "U+02A99"
- },
- {
- "entity": "elinters;",
- "value": "U+023E7"
- },
- {
- "entity": "ell;",
- "value": "U+02113"
- },
- {
- "entity": "els;",
- "value": "U+02A95"
- },
- {
- "entity": "elsdot;",
- "value": "U+02A97"
- },
- {
- "entity": "emacr;",
- "value": "U+00113"
- },
- {
- "entity": "empty;",
- "value": "U+02205"
- },
- {
- "entity": "emptyset;",
- "value": "U+02205"
- },
- {
- "entity": "emptyv;",
- "value": "U+02205"
- },
- {
- "entity": "emsp13;",
- "value": "U+02004"
- },
- {
- "entity": "emsp14;",
- "value": "U+02005"
- },
- {
- "entity": "emsp;",
- "value": "U+02003"
- },
- {
- "entity": "eng;",
- "value": "U+0014B"
- },
- {
- "entity": "ensp;",
- "value": "U+02002"
- },
- {
- "entity": "eogon;",
- "value": "U+00119"
- },
- {
- "entity": "eopf;",
- "value": "U+1D556"
- },
- {
- "entity": "epar;",
- "value": "U+022D5"
- },
- {
- "entity": "eparsl;",
- "value": "U+029E3"
- },
- {
- "entity": "eplus;",
- "value": "U+02A71"
- },
- {
- "entity": "epsi;",
- "value": "U+003B5"
- },
- {
- "entity": "epsilon;",
- "value": "U+003B5"
- },
- {
- "entity": "epsiv;",
- "value": "U+003F5"
- },
- {
- "entity": "eqcirc;",
- "value": "U+02256"
- },
- {
- "entity": "eqcolon;",
- "value": "U+02255"
- },
- {
- "entity": "eqsim;",
- "value": "U+02242"
- },
- {
- "entity": "eqslantgtr;",
- "value": "U+02A96"
- },
- {
- "entity": "eqslantless;",
- "value": "U+02A95"
- },
- {
- "entity": "equals;",
- "value": "U+0003D"
- },
- {
- "entity": "equest;",
- "value": "U+0225F"
- },
- {
- "entity": "equiv;",
- "value": "U+02261"
- },
- {
- "entity": "equivDD;",
- "value": "U+02A78"
- },
- {
- "entity": "eqvparsl;",
- "value": "U+029E5"
- },
- {
- "entity": "erDot;",
- "value": "U+02253"
- },
- {
- "entity": "erarr;",
- "value": "U+02971"
- },
- {
- "entity": "escr;",
- "value": "U+0212F"
- },
- {
- "entity": "esdot;",
- "value": "U+02250"
- },
- {
- "entity": "esim;",
- "value": "U+02242"
- },
- {
- "entity": "eta;",
- "value": "U+003B7"
- },
- {
- "entity": "eth;",
- "value": "U+000F0"
- },
- {
- "entity": "eth",
- "value": "U+000F0"
- },
- {
- "entity": "euml;",
- "value": "U+000EB"
- },
- {
- "entity": "euml",
- "value": "U+000EB"
- },
- {
- "entity": "euro;",
- "value": "U+020AC"
- },
- {
- "entity": "excl;",
- "value": "U+00021"
- },
- {
- "entity": "exist;",
- "value": "U+02203"
- },
- {
- "entity": "expectation;",
- "value": "U+02130"
- },
- {
- "entity": "exponentiale;",
- "value": "U+02147"
- },
- {
- "entity": "fallingdotseq;",
- "value": "U+02252"
- },
- {
- "entity": "fcy;",
- "value": "U+00444"
- },
- {
- "entity": "female;",
- "value": "U+02640"
- },
- {
- "entity": "ffilig;",
- "value": "U+0FB03"
- },
- {
- "entity": "fflig;",
- "value": "U+0FB00"
- },
- {
- "entity": "ffllig;",
- "value": "U+0FB04"
- },
- {
- "entity": "ffr;",
- "value": "U+1D523"
- },
- {
- "entity": "filig;",
- "value": "U+0FB01"
- },
- {
- "entity": "flat;",
- "value": "U+0266D"
- },
- {
- "entity": "fllig;",
- "value": "U+0FB02"
- },
- {
- "entity": "fltns;",
- "value": "U+025B1"
- },
- {
- "entity": "fnof;",
- "value": "U+00192"
- },
- {
- "entity": "fopf;",
- "value": "U+1D557"
- },
- {
- "entity": "forall;",
- "value": "U+02200"
- },
- {
- "entity": "fork;",
- "value": "U+022D4"
- },
- {
- "entity": "forkv;",
- "value": "U+02AD9"
- },
- {
- "entity": "fpartint;",
- "value": "U+02A0D"
- },
- {
- "entity": "frac12;",
- "value": "U+000BD"
- },
- {
- "entity": "frac12",
- "value": "U+000BD"
- },
- {
- "entity": "frac13;",
- "value": "U+02153"
- },
- {
- "entity": "frac14;",
- "value": "U+000BC"
- },
- {
- "entity": "frac14",
- "value": "U+000BC"
- },
- {
- "entity": "frac15;",
- "value": "U+02155"
- },
- {
- "entity": "frac16;",
- "value": "U+02159"
- },
- {
- "entity": "frac18;",
- "value": "U+0215B"
- },
- {
- "entity": "frac23;",
- "value": "U+02154"
- },
- {
- "entity": "frac25;",
- "value": "U+02156"
- },
- {
- "entity": "frac34;",
- "value": "U+000BE"
- },
- {
- "entity": "frac34",
- "value": "U+000BE"
- },
- {
- "entity": "frac35;",
- "value": "U+02157"
- },
- {
- "entity": "frac38;",
- "value": "U+0215C"
- },
- {
- "entity": "frac45;",
- "value": "U+02158"
- },
- {
- "entity": "frac56;",
- "value": "U+0215A"
- },
- {
- "entity": "frac58;",
- "value": "U+0215D"
- },
- {
- "entity": "frac78;",
- "value": "U+0215E"
- },
- {
- "entity": "frasl;",
- "value": "U+02044"
- },
- {
- "entity": "frown;",
- "value": "U+02322"
- },
- {
- "entity": "fscr;",
- "value": "U+1D4BB"
- },
- {
- "entity": "gE;",
- "value": "U+02267"
- },
- {
- "entity": "gEl;",
- "value": "U+02A8C"
- },
- {
- "entity": "gacute;",
- "value": "U+001F5"
- },
- {
- "entity": "gamma;",
- "value": "U+003B3"
- },
- {
- "entity": "gammad;",
- "value": "U+003DD"
- },
- {
- "entity": "gap;",
- "value": "U+02A86"
- },
- {
- "entity": "gbreve;",
- "value": "U+0011F"
- },
- {
- "entity": "gcirc;",
- "value": "U+0011D"
- },
- {
- "entity": "gcy;",
- "value": "U+00433"
- },
- {
- "entity": "gdot;",
- "value": "U+00121"
- },
- {
- "entity": "ge;",
- "value": "U+02265"
- },
- {
- "entity": "gel;",
- "value": "U+022DB"
- },
- {
- "entity": "geq;",
- "value": "U+02265"
- },
- {
- "entity": "geqq;",
- "value": "U+02267"
- },
- {
- "entity": "geqslant;",
- "value": "U+02A7E"
- },
- {
- "entity": "ges;",
- "value": "U+02A7E"
- },
- {
- "entity": "gescc;",
- "value": "U+02AA9"
- },
- {
- "entity": "gesdot;",
- "value": "U+02A80"
- },
- {
- "entity": "gesdoto;",
- "value": "U+02A82"
- },
- {
- "entity": "gesdotol;",
- "value": "U+02A84"
- },
- {
- "entity": "gesles;",
- "value": "U+02A94"
- },
- {
- "entity": "gfr;",
- "value": "U+1D524"
- },
- {
- "entity": "gg;",
- "value": "U+0226B"
- },
- {
- "entity": "ggg;",
- "value": "U+022D9"
- },
- {
- "entity": "gimel;",
- "value": "U+02137"
- },
- {
- "entity": "gjcy;",
- "value": "U+00453"
- },
- {
- "entity": "gl;",
- "value": "U+02277"
- },
- {
- "entity": "glE;",
- "value": "U+02A92"
- },
- {
- "entity": "gla;",
- "value": "U+02AA5"
- },
- {
- "entity": "glj;",
- "value": "U+02AA4"
- },
- {
- "entity": "gnE;",
- "value": "U+02269"
- },
- {
- "entity": "gnap;",
- "value": "U+02A8A"
- },
- {
- "entity": "gnapprox;",
- "value": "U+02A8A"
- },
- {
- "entity": "gne;",
- "value": "U+02A88"
- },
- {
- "entity": "gneq;",
- "value": "U+02A88"
- },
- {
- "entity": "gneqq;",
- "value": "U+02269"
- },
- {
- "entity": "gnsim;",
- "value": "U+022E7"
- },
- {
- "entity": "gopf;",
- "value": "U+1D558"
- },
- {
- "entity": "grave;",
- "value": "U+00060"
- },
- {
- "entity": "gscr;",
- "value": "U+0210A"
- },
- {
- "entity": "gsim;",
- "value": "U+02273"
- },
- {
- "entity": "gsime;",
- "value": "U+02A8E"
- },
- {
- "entity": "gsiml;",
- "value": "U+02A90"
- },
- {
- "entity": "gt;",
- "value": "U+0003E"
- },
- {
- "entity": "gt",
- "value": "U+0003E"
- },
- {
- "entity": "gtcc;",
- "value": "U+02AA7"
- },
- {
- "entity": "gtcir;",
- "value": "U+02A7A"
- },
- {
- "entity": "gtdot;",
- "value": "U+022D7"
- },
- {
- "entity": "gtlPar;",
- "value": "U+02995"
- },
- {
- "entity": "gtquest;",
- "value": "U+02A7C"
- },
- {
- "entity": "gtrapprox;",
- "value": "U+02A86"
- },
- {
- "entity": "gtrarr;",
- "value": "U+02978"
- },
- {
- "entity": "gtrdot;",
- "value": "U+022D7"
- },
- {
- "entity": "gtreqless;",
- "value": "U+022DB"
- },
- {
- "entity": "gtreqqless;",
- "value": "U+02A8C"
- },
- {
- "entity": "gtrless;",
- "value": "U+02277"
- },
- {
- "entity": "gtrsim;",
- "value": "U+02273"
- },
- {
- "entity": "hArr;",
- "value": "U+021D4"
- },
- {
- "entity": "hairsp;",
- "value": "U+0200A"
- },
- {
- "entity": "half;",
- "value": "U+000BD"
- },
- {
- "entity": "hamilt;",
- "value": "U+0210B"
- },
- {
- "entity": "hardcy;",
- "value": "U+0044A"
- },
- {
- "entity": "harr;",
- "value": "U+02194"
- },
- {
- "entity": "harrcir;",
- "value": "U+02948"
- },
- {
- "entity": "harrw;",
- "value": "U+021AD"
- },
- {
- "entity": "hbar;",
- "value": "U+0210F"
- },
- {
- "entity": "hcirc;",
- "value": "U+00125"
- },
- {
- "entity": "hearts;",
- "value": "U+02665"
- },
- {
- "entity": "heartsuit;",
- "value": "U+02665"
- },
- {
- "entity": "hellip;",
- "value": "U+02026"
- },
- {
- "entity": "hercon;",
- "value": "U+022B9"
- },
- {
- "entity": "hfr;",
- "value": "U+1D525"
- },
- {
- "entity": "hksearow;",
- "value": "U+02925"
- },
- {
- "entity": "hkswarow;",
- "value": "U+02926"
- },
- {
- "entity": "hoarr;",
- "value": "U+021FF"
- },
- {
- "entity": "homtht;",
- "value": "U+0223B"
- },
- {
- "entity": "hookleftarrow;",
- "value": "U+021A9"
- },
- {
- "entity": "hookrightarrow;",
- "value": "U+021AA"
- },
- {
- "entity": "hopf;",
- "value": "U+1D559"
- },
- {
- "entity": "horbar;",
- "value": "U+02015"
- },
- {
- "entity": "hscr;",
- "value": "U+1D4BD"
- },
- {
- "entity": "hslash;",
- "value": "U+0210F"
- },
- {
- "entity": "hstrok;",
- "value": "U+00127"
- },
- {
- "entity": "hybull;",
- "value": "U+02043"
- },
- {
- "entity": "hyphen;",
- "value": "U+02010"
- },
- {
- "entity": "iacute;",
- "value": "U+000ED"
- },
- {
- "entity": "iacute",
- "value": "U+000ED"
- },
- {
- "entity": "ic;",
- "value": "U+02063"
- },
- {
- "entity": "icirc;",
- "value": "U+000EE"
- },
- {
- "entity": "icirc",
- "value": "U+000EE"
- },
- {
- "entity": "icy;",
- "value": "U+00438"
- },
- {
- "entity": "iecy;",
- "value": "U+00435"
- },
- {
- "entity": "iexcl;",
- "value": "U+000A1"
- },
- {
- "entity": "iexcl",
- "value": "U+000A1"
- },
- {
- "entity": "iff;",
- "value": "U+021D4"
- },
- {
- "entity": "ifr;",
- "value": "U+1D526"
- },
- {
- "entity": "igrave;",
- "value": "U+000EC"
- },
- {
- "entity": "igrave",
- "value": "U+000EC"
- },
- {
- "entity": "ii;",
- "value": "U+02148"
- },
- {
- "entity": "iiiint;",
- "value": "U+02A0C"
- },
- {
- "entity": "iiint;",
- "value": "U+0222D"
- },
- {
- "entity": "iinfin;",
- "value": "U+029DC"
- },
- {
- "entity": "iiota;",
- "value": "U+02129"
- },
- {
- "entity": "ijlig;",
- "value": "U+00133"
- },
- {
- "entity": "imacr;",
- "value": "U+0012B"
- },
- {
- "entity": "image;",
- "value": "U+02111"
- },
- {
- "entity": "imagline;",
- "value": "U+02110"
- },
- {
- "entity": "imagpart;",
- "value": "U+02111"
- },
- {
- "entity": "imath;",
- "value": "U+00131"
- },
- {
- "entity": "imof;",
- "value": "U+022B7"
- },
- {
- "entity": "imped;",
- "value": "U+001B5"
- },
- {
- "entity": "in;",
- "value": "U+02208"
- },
- {
- "entity": "incare;",
- "value": "U+02105"
- },
- {
- "entity": "infin;",
- "value": "U+0221E"
- },
- {
- "entity": "infintie;",
- "value": "U+029DD"
- },
- {
- "entity": "inodot;",
- "value": "U+00131"
- },
- {
- "entity": "int;",
- "value": "U+0222B"
- },
- {
- "entity": "intcal;",
- "value": "U+022BA"
- },
- {
- "entity": "integers;",
- "value": "U+02124"
- },
- {
- "entity": "intercal;",
- "value": "U+022BA"
- },
- {
- "entity": "intlarhk;",
- "value": "U+02A17"
- },
- {
- "entity": "intprod;",
- "value": "U+02A3C"
- },
- {
- "entity": "iocy;",
- "value": "U+00451"
- },
- {
- "entity": "iogon;",
- "value": "U+0012F"
- },
- {
- "entity": "iopf;",
- "value": "U+1D55A"
- },
- {
- "entity": "iota;",
- "value": "U+003B9"
- },
- {
- "entity": "iprod;",
- "value": "U+02A3C"
- },
- {
- "entity": "iquest;",
- "value": "U+000BF"
- },
- {
- "entity": "iquest",
- "value": "U+000BF"
- },
- {
- "entity": "iscr;",
- "value": "U+1D4BE"
- },
- {
- "entity": "isin;",
- "value": "U+02208"
- },
- {
- "entity": "isinE;",
- "value": "U+022F9"
- },
- {
- "entity": "isindot;",
- "value": "U+022F5"
- },
- {
- "entity": "isins;",
- "value": "U+022F4"
- },
- {
- "entity": "isinsv;",
- "value": "U+022F3"
- },
- {
- "entity": "isinv;",
- "value": "U+02208"
- },
- {
- "entity": "it;",
- "value": "U+02062"
- },
- {
- "entity": "itilde;",
- "value": "U+00129"
- },
- {
- "entity": "iukcy;",
- "value": "U+00456"
- },
- {
- "entity": "iuml;",
- "value": "U+000EF"
- },
- {
- "entity": "iuml",
- "value": "U+000EF"
- },
- {
- "entity": "jcirc;",
- "value": "U+00135"
- },
- {
- "entity": "jcy;",
- "value": "U+00439"
- },
- {
- "entity": "jfr;",
- "value": "U+1D527"
- },
- {
- "entity": "jmath;",
- "value": "U+00237"
- },
- {
- "entity": "jopf;",
- "value": "U+1D55B"
- },
- {
- "entity": "jscr;",
- "value": "U+1D4BF"
- },
- {
- "entity": "jsercy;",
- "value": "U+00458"
- },
- {
- "entity": "jukcy;",
- "value": "U+00454"
- },
- {
- "entity": "kappa;",
- "value": "U+003BA"
- },
- {
- "entity": "kappav;",
- "value": "U+003F0"
- },
- {
- "entity": "kcedil;",
- "value": "U+00137"
- },
- {
- "entity": "kcy;",
- "value": "U+0043A"
- },
- {
- "entity": "kfr;",
- "value": "U+1D528"
- },
- {
- "entity": "kgreen;",
- "value": "U+00138"
- },
- {
- "entity": "khcy;",
- "value": "U+00445"
- },
- {
- "entity": "kjcy;",
- "value": "U+0045C"
- },
- {
- "entity": "kopf;",
- "value": "U+1D55C"
- },
- {
- "entity": "kscr;",
- "value": "U+1D4C0"
- },
- {
- "entity": "lAarr;",
- "value": "U+021DA"
- },
- {
- "entity": "lArr;",
- "value": "U+021D0"
- },
- {
- "entity": "lAtail;",
- "value": "U+0291B"
- },
- {
- "entity": "lBarr;",
- "value": "U+0290E"
- },
- {
- "entity": "lE;",
- "value": "U+02266"
- },
- {
- "entity": "lEg;",
- "value": "U+02A8B"
- },
- {
- "entity": "lHar;",
- "value": "U+02962"
- },
- {
- "entity": "lacute;",
- "value": "U+0013A"
- },
- {
- "entity": "laemptyv;",
- "value": "U+029B4"
- },
- {
- "entity": "lagran;",
- "value": "U+02112"
- },
- {
- "entity": "lambda;",
- "value": "U+003BB"
- },
- {
- "entity": "lang;",
- "value": "U+027E8"
- },
- {
- "entity": "langd;",
- "value": "U+02991"
- },
- {
- "entity": "langle;",
- "value": "U+027E8"
- },
- {
- "entity": "lap;",
- "value": "U+02A85"
- },
- {
- "entity": "laquo;",
- "value": "U+000AB"
- },
- {
- "entity": "laquo",
- "value": "U+000AB"
- },
- {
- "entity": "larr;",
- "value": "U+02190"
- },
- {
- "entity": "larrb;",
- "value": "U+021E4"
- },
- {
- "entity": "larrbfs;",
- "value": "U+0291F"
- },
- {
- "entity": "larrfs;",
- "value": "U+0291D"
- },
- {
- "entity": "larrhk;",
- "value": "U+021A9"
- },
- {
- "entity": "larrlp;",
- "value": "U+021AB"
- },
- {
- "entity": "larrpl;",
- "value": "U+02939"
- },
- {
- "entity": "larrsim;",
- "value": "U+02973"
- },
- {
- "entity": "larrtl;",
- "value": "U+021A2"
- },
- {
- "entity": "lat;",
- "value": "U+02AAB"
- },
- {
- "entity": "latail;",
- "value": "U+02919"
- },
- {
- "entity": "late;",
- "value": "U+02AAD"
- },
- {
- "entity": "lbarr;",
- "value": "U+0290C"
- },
- {
- "entity": "lbbrk;",
- "value": "U+02772"
- },
- {
- "entity": "lbrace;",
- "value": "U+0007B"
- },
- {
- "entity": "lbrack;",
- "value": "U+0005B"
- },
- {
- "entity": "lbrke;",
- "value": "U+0298B"
- },
- {
- "entity": "lbrksld;",
- "value": "U+0298F"
- },
- {
- "entity": "lbrkslu;",
- "value": "U+0298D"
- },
- {
- "entity": "lcaron;",
- "value": "U+0013E"
- },
- {
- "entity": "lcedil;",
- "value": "U+0013C"
- },
- {
- "entity": "lceil;",
- "value": "U+02308"
- },
- {
- "entity": "lcub;",
- "value": "U+0007B"
- },
- {
- "entity": "lcy;",
- "value": "U+0043B"
- },
- {
- "entity": "ldca;",
- "value": "U+02936"
- },
- {
- "entity": "ldquo;",
- "value": "U+0201C"
- },
- {
- "entity": "ldquor;",
- "value": "U+0201E"
- },
- {
- "entity": "ldrdhar;",
- "value": "U+02967"
- },
- {
- "entity": "ldrushar;",
- "value": "U+0294B"
- },
- {
- "entity": "ldsh;",
- "value": "U+021B2"
- },
- {
- "entity": "le;",
- "value": "U+02264"
- },
- {
- "entity": "leftarrow;",
- "value": "U+02190"
- },
- {
- "entity": "leftarrowtail;",
- "value": "U+021A2"
- },
- {
- "entity": "leftharpoondown;",
- "value": "U+021BD"
- },
- {
- "entity": "leftharpoonup;",
- "value": "U+021BC"
- },
- {
- "entity": "leftleftarrows;",
- "value": "U+021C7"
- },
- {
- "entity": "leftrightarrow;",
- "value": "U+02194"
- },
- {
- "entity": "leftrightarrows;",
- "value": "U+021C6"
- },
- {
- "entity": "leftrightharpoons;",
- "value": "U+021CB"
- },
- {
- "entity": "leftrightsquigarrow;",
- "value": "U+021AD"
- },
- {
- "entity": "leftthreetimes;",
- "value": "U+022CB"
- },
- {
- "entity": "leg;",
- "value": "U+022DA"
- },
- {
- "entity": "leq;",
- "value": "U+02264"
- },
- {
- "entity": "leqq;",
- "value": "U+02266"
- },
- {
- "entity": "leqslant;",
- "value": "U+02A7D"
- },
- {
- "entity": "les;",
- "value": "U+02A7D"
- },
- {
- "entity": "lescc;",
- "value": "U+02AA8"
- },
- {
- "entity": "lesdot;",
- "value": "U+02A7F"
- },
- {
- "entity": "lesdoto;",
- "value": "U+02A81"
- },
- {
- "entity": "lesdotor;",
- "value": "U+02A83"
- },
- {
- "entity": "lesges;",
- "value": "U+02A93"
- },
- {
- "entity": "lessapprox;",
- "value": "U+02A85"
- },
- {
- "entity": "lessdot;",
- "value": "U+022D6"
- },
- {
- "entity": "lesseqgtr;",
- "value": "U+022DA"
- },
- {
- "entity": "lesseqqgtr;",
- "value": "U+02A8B"
- },
- {
- "entity": "lessgtr;",
- "value": "U+02276"
- },
- {
- "entity": "lesssim;",
- "value": "U+02272"
- },
- {
- "entity": "lfisht;",
- "value": "U+0297C"
- },
- {
- "entity": "lfloor;",
- "value": "U+0230A"
- },
- {
- "entity": "lfr;",
- "value": "U+1D529"
- },
- {
- "entity": "lg;",
- "value": "U+02276"
- },
- {
- "entity": "lgE;",
- "value": "U+02A91"
- },
- {
- "entity": "lhard;",
- "value": "U+021BD"
- },
- {
- "entity": "lharu;",
- "value": "U+021BC"
- },
- {
- "entity": "lharul;",
- "value": "U+0296A"
- },
- {
- "entity": "lhblk;",
- "value": "U+02584"
- },
- {
- "entity": "ljcy;",
- "value": "U+00459"
- },
- {
- "entity": "ll;",
- "value": "U+0226A"
- },
- {
- "entity": "llarr;",
- "value": "U+021C7"
- },
- {
- "entity": "llcorner;",
- "value": "U+0231E"
- },
- {
- "entity": "llhard;",
- "value": "U+0296B"
- },
- {
- "entity": "lltri;",
- "value": "U+025FA"
- },
- {
- "entity": "lmidot;",
- "value": "U+00140"
- },
- {
- "entity": "lmoust;",
- "value": "U+023B0"
- },
- {
- "entity": "lmoustache;",
- "value": "U+023B0"
- },
- {
- "entity": "lnE;",
- "value": "U+02268"
- },
- {
- "entity": "lnap;",
- "value": "U+02A89"
- },
- {
- "entity": "lnapprox;",
- "value": "U+02A89"
- },
- {
- "entity": "lne;",
- "value": "U+02A87"
- },
- {
- "entity": "lneq;",
- "value": "U+02A87"
- },
- {
- "entity": "lneqq;",
- "value": "U+02268"
- },
- {
- "entity": "lnsim;",
- "value": "U+022E6"
- },
- {
- "entity": "loang;",
- "value": "U+027EC"
- },
- {
- "entity": "loarr;",
- "value": "U+021FD"
- },
- {
- "entity": "lobrk;",
- "value": "U+027E6"
- },
- {
- "entity": "longleftarrow;",
- "value": "U+027F5"
- },
- {
- "entity": "longleftrightarrow;",
- "value": "U+027F7"
- },
- {
- "entity": "longmapsto;",
- "value": "U+027FC"
- },
- {
- "entity": "longrightarrow;",
- "value": "U+027F6"
- },
- {
- "entity": "looparrowleft;",
- "value": "U+021AB"
- },
- {
- "entity": "looparrowright;",
- "value": "U+021AC"
- },
- {
- "entity": "lopar;",
- "value": "U+02985"
- },
- {
- "entity": "lopf;",
- "value": "U+1D55D"
- },
- {
- "entity": "loplus;",
- "value": "U+02A2D"
- },
- {
- "entity": "lotimes;",
- "value": "U+02A34"
- },
- {
- "entity": "lowast;",
- "value": "U+02217"
- },
- {
- "entity": "lowbar;",
- "value": "U+0005F"
- },
- {
- "entity": "loz;",
- "value": "U+025CA"
- },
- {
- "entity": "lozenge;",
- "value": "U+025CA"
- },
- {
- "entity": "lozf;",
- "value": "U+029EB"
- },
- {
- "entity": "lpar;",
- "value": "U+00028"
- },
- {
- "entity": "lparlt;",
- "value": "U+02993"
- },
- {
- "entity": "lrarr;",
- "value": "U+021C6"
- },
- {
- "entity": "lrcorner;",
- "value": "U+0231F"
- },
- {
- "entity": "lrhar;",
- "value": "U+021CB"
- },
- {
- "entity": "lrhard;",
- "value": "U+0296D"
- },
- {
- "entity": "lrm;",
- "value": "U+0200E"
- },
- {
- "entity": "lrtri;",
- "value": "U+022BF"
- },
- {
- "entity": "lsaquo;",
- "value": "U+02039"
- },
- {
- "entity": "lscr;",
- "value": "U+1D4C1"
- },
- {
- "entity": "lsh;",
- "value": "U+021B0"
- },
- {
- "entity": "lsim;",
- "value": "U+02272"
- },
- {
- "entity": "lsime;",
- "value": "U+02A8D"
- },
- {
- "entity": "lsimg;",
- "value": "U+02A8F"
- },
- {
- "entity": "lsqb;",
- "value": "U+0005B"
- },
- {
- "entity": "lsquo;",
- "value": "U+02018"
- },
- {
- "entity": "lsquor;",
- "value": "U+0201A"
- },
- {
- "entity": "lstrok;",
- "value": "U+00142"
- },
- {
- "entity": "lt;",
- "value": "U+0003C"
- },
- {
- "entity": "lt",
- "value": "U+0003C"
- },
- {
- "entity": "ltcc;",
- "value": "U+02AA6"
- },
- {
- "entity": "ltcir;",
- "value": "U+02A79"
- },
- {
- "entity": "ltdot;",
- "value": "U+022D6"
- },
- {
- "entity": "lthree;",
- "value": "U+022CB"
- },
- {
- "entity": "ltimes;",
- "value": "U+022C9"
- },
- {
- "entity": "ltlarr;",
- "value": "U+02976"
- },
- {
- "entity": "ltquest;",
- "value": "U+02A7B"
- },
- {
- "entity": "ltrPar;",
- "value": "U+02996"
- },
- {
- "entity": "ltri;",
- "value": "U+025C3"
- },
- {
- "entity": "ltrie;",
- "value": "U+022B4"
- },
- {
- "entity": "ltrif;",
- "value": "U+025C2"
- },
- {
- "entity": "lurdshar;",
- "value": "U+0294A"
- },
- {
- "entity": "luruhar;",
- "value": "U+02966"
- },
- {
- "entity": "mDDot;",
- "value": "U+0223A"
- },
- {
- "entity": "macr;",
- "value": "U+000AF"
- },
- {
- "entity": "macr",
- "value": "U+000AF"
- },
- {
- "entity": "male;",
- "value": "U+02642"
- },
- {
- "entity": "malt;",
- "value": "U+02720"
- },
- {
- "entity": "maltese;",
- "value": "U+02720"
- },
- {
- "entity": "map;",
- "value": "U+021A6"
- },
- {
- "entity": "mapsto;",
- "value": "U+021A6"
- },
- {
- "entity": "mapstodown;",
- "value": "U+021A7"
- },
- {
- "entity": "mapstoleft;",
- "value": "U+021A4"
- },
- {
- "entity": "mapstoup;",
- "value": "U+021A5"
- },
- {
- "entity": "marker;",
- "value": "U+025AE"
- },
- {
- "entity": "mcomma;",
- "value": "U+02A29"
- },
- {
- "entity": "mcy;",
- "value": "U+0043C"
- },
- {
- "entity": "mdash;",
- "value": "U+02014"
- },
- {
- "entity": "measuredangle;",
- "value": "U+02221"
- },
- {
- "entity": "mfr;",
- "value": "U+1D52A"
- },
- {
- "entity": "mho;",
- "value": "U+02127"
- },
- {
- "entity": "micro;",
- "value": "U+000B5"
- },
- {
- "entity": "micro",
- "value": "U+000B5"
- },
- {
- "entity": "mid;",
- "value": "U+02223"
- },
- {
- "entity": "midast;",
- "value": "U+0002A"
- },
- {
- "entity": "midcir;",
- "value": "U+02AF0"
- },
- {
- "entity": "middot;",
- "value": "U+000B7"
- },
- {
- "entity": "middot",
- "value": "U+000B7"
- },
- {
- "entity": "minus;",
- "value": "U+02212"
- },
- {
- "entity": "minusb;",
- "value": "U+0229F"
- },
- {
- "entity": "minusd;",
- "value": "U+02238"
- },
- {
- "entity": "minusdu;",
- "value": "U+02A2A"
- },
- {
- "entity": "mlcp;",
- "value": "U+02ADB"
- },
- {
- "entity": "mldr;",
- "value": "U+02026"
- },
- {
- "entity": "mnplus;",
- "value": "U+02213"
- },
- {
- "entity": "models;",
- "value": "U+022A7"
- },
- {
- "entity": "mopf;",
- "value": "U+1D55E"
- },
- {
- "entity": "mp;",
- "value": "U+02213"
- },
- {
- "entity": "mscr;",
- "value": "U+1D4C2"
- },
- {
- "entity": "mstpos;",
- "value": "U+0223E"
- },
- {
- "entity": "mu;",
- "value": "U+003BC"
- },
- {
- "entity": "multimap;",
- "value": "U+022B8"
- },
- {
- "entity": "mumap;",
- "value": "U+022B8"
- },
- {
- "entity": "nLeftarrow;",
- "value": "U+021CD"
- },
- {
- "entity": "nLeftrightarrow;",
- "value": "U+021CE"
- },
- {
- "entity": "nRightarrow;",
- "value": "U+021CF"
- },
- {
- "entity": "nVDash;",
- "value": "U+022AF"
- },
- {
- "entity": "nVdash;",
- "value": "U+022AE"
- },
- {
- "entity": "nabla;",
- "value": "U+02207"
- },
- {
- "entity": "nacute;",
- "value": "U+00144"
- },
- {
- "entity": "nap;",
- "value": "U+02249"
- },
- {
- "entity": "napos;",
- "value": "U+00149"
- },
- {
- "entity": "napprox;",
- "value": "U+02249"
- },
- {
- "entity": "natur;",
- "value": "U+0266E"
- },
- {
- "entity": "natural;",
- "value": "U+0266E"
- },
- {
- "entity": "naturals;",
- "value": "U+02115"
- },
- {
- "entity": "nbsp;",
- "value": "U+000A0"
- },
- {
- "entity": "nbsp",
- "value": "U+000A0"
- },
- {
- "entity": "ncap;",
- "value": "U+02A43"
- },
- {
- "entity": "ncaron;",
- "value": "U+00148"
- },
- {
- "entity": "ncedil;",
- "value": "U+00146"
- },
- {
- "entity": "ncong;",
- "value": "U+02247"
- },
- {
- "entity": "ncup;",
- "value": "U+02A42"
- },
- {
- "entity": "ncy;",
- "value": "U+0043D"
- },
- {
- "entity": "ndash;",
- "value": "U+02013"
- },
- {
- "entity": "ne;",
- "value": "U+02260"
- },
- {
- "entity": "neArr;",
- "value": "U+021D7"
- },
- {
- "entity": "nearhk;",
- "value": "U+02924"
- },
- {
- "entity": "nearr;",
- "value": "U+02197"
- },
- {
- "entity": "nearrow;",
- "value": "U+02197"
- },
- {
- "entity": "nequiv;",
- "value": "U+02262"
- },
- {
- "entity": "nesear;",
- "value": "U+02928"
- },
- {
- "entity": "nexist;",
- "value": "U+02204"
- },
- {
- "entity": "nexists;",
- "value": "U+02204"
- },
- {
- "entity": "nfr;",
- "value": "U+1D52B"
- },
- {
- "entity": "nge;",
- "value": "U+02271"
- },
- {
- "entity": "ngeq;",
- "value": "U+02271"
- },
- {
- "entity": "ngsim;",
- "value": "U+02275"
- },
- {
- "entity": "ngt;",
- "value": "U+0226F"
- },
- {
- "entity": "ngtr;",
- "value": "U+0226F"
- },
- {
- "entity": "nhArr;",
- "value": "U+021CE"
- },
- {
- "entity": "nharr;",
- "value": "U+021AE"
- },
- {
- "entity": "nhpar;",
- "value": "U+02AF2"
- },
- {
- "entity": "ni;",
- "value": "U+0220B"
- },
- {
- "entity": "nis;",
- "value": "U+022FC"
- },
- {
- "entity": "nisd;",
- "value": "U+022FA"
- },
- {
- "entity": "niv;",
- "value": "U+0220B"
- },
- {
- "entity": "njcy;",
- "value": "U+0045A"
- },
- {
- "entity": "nlArr;",
- "value": "U+021CD"
- },
- {
- "entity": "nlarr;",
- "value": "U+0219A"
- },
- {
- "entity": "nldr;",
- "value": "U+02025"
- },
- {
- "entity": "nle;",
- "value": "U+02270"
- },
- {
- "entity": "nleftarrow;",
- "value": "U+0219A"
- },
- {
- "entity": "nleftrightarrow;",
- "value": "U+021AE"
- },
- {
- "entity": "nleq;",
- "value": "U+02270"
- },
- {
- "entity": "nless;",
- "value": "U+0226E"
- },
- {
- "entity": "nlsim;",
- "value": "U+02274"
- },
- {
- "entity": "nlt;",
- "value": "U+0226E"
- },
- {
- "entity": "nltri;",
- "value": "U+022EA"
- },
- {
- "entity": "nltrie;",
- "value": "U+022EC"
- },
- {
- "entity": "nmid;",
- "value": "U+02224"
- },
- {
- "entity": "nopf;",
- "value": "U+1D55F"
- },
- {
- "entity": "not;",
- "value": "U+000AC"
- },
- {
- "entity": "not",
- "value": "U+000AC"
- },
- {
- "entity": "notin;",
- "value": "U+02209"
- },
- {
- "entity": "notinva;",
- "value": "U+02209"
- },
- {
- "entity": "notinvb;",
- "value": "U+022F7"
- },
- {
- "entity": "notinvc;",
- "value": "U+022F6"
- },
- {
- "entity": "notni;",
- "value": "U+0220C"
- },
- {
- "entity": "notniva;",
- "value": "U+0220C"
- },
- {
- "entity": "notnivb;",
- "value": "U+022FE"
- },
- {
- "entity": "notnivc;",
- "value": "U+022FD"
- },
- {
- "entity": "npar;",
- "value": "U+02226"
- },
- {
- "entity": "nparallel;",
- "value": "U+02226"
- },
- {
- "entity": "npolint;",
- "value": "U+02A14"
- },
- {
- "entity": "npr;",
- "value": "U+02280"
- },
- {
- "entity": "nprcue;",
- "value": "U+022E0"
- },
- {
- "entity": "nprec;",
- "value": "U+02280"
- },
- {
- "entity": "nrArr;",
- "value": "U+021CF"
- },
- {
- "entity": "nrarr;",
- "value": "U+0219B"
- },
- {
- "entity": "nrightarrow;",
- "value": "U+0219B"
- },
- {
- "entity": "nrtri;",
- "value": "U+022EB"
- },
- {
- "entity": "nrtrie;",
- "value": "U+022ED"
- },
- {
- "entity": "nsc;",
- "value": "U+02281"
- },
- {
- "entity": "nsccue;",
- "value": "U+022E1"
- },
- {
- "entity": "nscr;",
- "value": "U+1D4C3"
- },
- {
- "entity": "nshortmid;",
- "value": "U+02224"
- },
- {
- "entity": "nshortparallel;",
- "value": "U+02226"
- },
- {
- "entity": "nsim;",
- "value": "U+02241"
- },
- {
- "entity": "nsime;",
- "value": "U+02244"
- },
- {
- "entity": "nsimeq;",
- "value": "U+02244"
- },
- {
- "entity": "nsmid;",
- "value": "U+02224"
- },
- {
- "entity": "nspar;",
- "value": "U+02226"
- },
- {
- "entity": "nsqsube;",
- "value": "U+022E2"
- },
- {
- "entity": "nsqsupe;",
- "value": "U+022E3"
- },
- {
- "entity": "nsub;",
- "value": "U+02284"
- },
- {
- "entity": "nsube;",
- "value": "U+02288"
- },
- {
- "entity": "nsubseteq;",
- "value": "U+02288"
- },
- {
- "entity": "nsucc;",
- "value": "U+02281"
- },
- {
- "entity": "nsup;",
- "value": "U+02285"
- },
- {
- "entity": "nsupe;",
- "value": "U+02289"
- },
- {
- "entity": "nsupseteq;",
- "value": "U+02289"
- },
- {
- "entity": "ntgl;",
- "value": "U+02279"
- },
- {
- "entity": "ntilde;",
- "value": "U+000F1"
- },
- {
- "entity": "ntilde",
- "value": "U+000F1"
- },
- {
- "entity": "ntlg;",
- "value": "U+02278"
- },
- {
- "entity": "ntriangleleft;",
- "value": "U+022EA"
- },
- {
- "entity": "ntrianglelefteq;",
- "value": "U+022EC"
- },
- {
- "entity": "ntriangleright;",
- "value": "U+022EB"
- },
- {
- "entity": "ntrianglerighteq;",
- "value": "U+022ED"
- },
- {
- "entity": "nu;",
- "value": "U+003BD"
- },
- {
- "entity": "num;",
- "value": "U+00023"
- },
- {
- "entity": "numero;",
- "value": "U+02116"
- },
- {
- "entity": "numsp;",
- "value": "U+02007"
- },
- {
- "entity": "nvDash;",
- "value": "U+022AD"
- },
- {
- "entity": "nvHarr;",
- "value": "U+02904"
- },
- {
- "entity": "nvdash;",
- "value": "U+022AC"
- },
- {
- "entity": "nvinfin;",
- "value": "U+029DE"
- },
- {
- "entity": "nvlArr;",
- "value": "U+02902"
- },
- {
- "entity": "nvrArr;",
- "value": "U+02903"
- },
- {
- "entity": "nwArr;",
- "value": "U+021D6"
- },
- {
- "entity": "nwarhk;",
- "value": "U+02923"
- },
- {
- "entity": "nwarr;",
- "value": "U+02196"
- },
- {
- "entity": "nwarrow;",
- "value": "U+02196"
- },
- {
- "entity": "nwnear;",
- "value": "U+02927"
- },
- {
- "entity": "oS;",
- "value": "U+024C8"
- },
- {
- "entity": "oacute;",
- "value": "U+000F3"
- },
- {
- "entity": "oacute",
- "value": "U+000F3"
- },
- {
- "entity": "oast;",
- "value": "U+0229B"
- },
- {
- "entity": "ocir;",
- "value": "U+0229A"
- },
- {
- "entity": "ocirc;",
- "value": "U+000F4"
- },
- {
- "entity": "ocirc",
- "value": "U+000F4"
- },
- {
- "entity": "ocy;",
- "value": "U+0043E"
- },
- {
- "entity": "odash;",
- "value": "U+0229D"
- },
- {
- "entity": "odblac;",
- "value": "U+00151"
- },
- {
- "entity": "odiv;",
- "value": "U+02A38"
- },
- {
- "entity": "odot;",
- "value": "U+02299"
- },
- {
- "entity": "odsold;",
- "value": "U+029BC"
- },
- {
- "entity": "oelig;",
- "value": "U+00153"
- },
- {
- "entity": "ofcir;",
- "value": "U+029BF"
- },
- {
- "entity": "ofr;",
- "value": "U+1D52C"
- },
- {
- "entity": "ogon;",
- "value": "U+002DB"
- },
- {
- "entity": "ograve;",
- "value": "U+000F2"
- },
- {
- "entity": "ograve",
- "value": "U+000F2"
- },
- {
- "entity": "ogt;",
- "value": "U+029C1"
- },
- {
- "entity": "ohbar;",
- "value": "U+029B5"
- },
- {
- "entity": "ohm;",
- "value": "U+003A9"
- },
- {
- "entity": "oint;",
- "value": "U+0222E"
- },
- {
- "entity": "olarr;",
- "value": "U+021BA"
- },
- {
- "entity": "olcir;",
- "value": "U+029BE"
- },
- {
- "entity": "olcross;",
- "value": "U+029BB"
- },
- {
- "entity": "oline;",
- "value": "U+0203E"
- },
- {
- "entity": "olt;",
- "value": "U+029C0"
- },
- {
- "entity": "omacr;",
- "value": "U+0014D"
- },
- {
- "entity": "omega;",
- "value": "U+003C9"
- },
- {
- "entity": "omicron;",
- "value": "U+003BF"
- },
- {
- "entity": "omid;",
- "value": "U+029B6"
- },
- {
- "entity": "ominus;",
- "value": "U+02296"
- },
- {
- "entity": "oopf;",
- "value": "U+1D560"
- },
- {
- "entity": "opar;",
- "value": "U+029B7"
- },
- {
- "entity": "operp;",
- "value": "U+029B9"
- },
- {
- "entity": "oplus;",
- "value": "U+02295"
- },
- {
- "entity": "or;",
- "value": "U+02228"
- },
- {
- "entity": "orarr;",
- "value": "U+021BB"
- },
- {
- "entity": "ord;",
- "value": "U+02A5D"
- },
- {
- "entity": "order;",
- "value": "U+02134"
- },
- {
- "entity": "orderof;",
- "value": "U+02134"
- },
- {
- "entity": "ordf;",
- "value": "U+000AA"
- },
- {
- "entity": "ordf",
- "value": "U+000AA"
- },
- {
- "entity": "ordm;",
- "value": "U+000BA"
- },
- {
- "entity": "ordm",
- "value": "U+000BA"
- },
- {
- "entity": "origof;",
- "value": "U+022B6"
- },
- {
- "entity": "oror;",
- "value": "U+02A56"
- },
- {
- "entity": "orslope;",
- "value": "U+02A57"
- },
- {
- "entity": "orv;",
- "value": "U+02A5B"
- },
- {
- "entity": "oscr;",
- "value": "U+02134"
- },
- {
- "entity": "oslash;",
- "value": "U+000F8"
- },
- {
- "entity": "oslash",
- "value": "U+000F8"
- },
- {
- "entity": "osol;",
- "value": "U+02298"
- },
- {
- "entity": "otilde;",
- "value": "U+000F5"
- },
- {
- "entity": "otilde",
- "value": "U+000F5"
- },
- {
- "entity": "otimes;",
- "value": "U+02297"
- },
- {
- "entity": "otimesas;",
- "value": "U+02A36"
- },
- {
- "entity": "ouml;",
- "value": "U+000F6"
- },
- {
- "entity": "ouml",
- "value": "U+000F6"
- },
- {
- "entity": "ovbar;",
- "value": "U+0233D"
- },
- {
- "entity": "par;",
- "value": "U+02225"
- },
- {
- "entity": "para;",
- "value": "U+000B6"
- },
- {
- "entity": "para",
- "value": "U+000B6"
- },
- {
- "entity": "parallel;",
- "value": "U+02225"
- },
- {
- "entity": "parsim;",
- "value": "U+02AF3"
- },
- {
- "entity": "parsl;",
- "value": "U+02AFD"
- },
- {
- "entity": "part;",
- "value": "U+02202"
- },
- {
- "entity": "pcy;",
- "value": "U+0043F"
- },
- {
- "entity": "percnt;",
- "value": "U+00025"
- },
- {
- "entity": "period;",
- "value": "U+0002E"
- },
- {
- "entity": "permil;",
- "value": "U+02030"
- },
- {
- "entity": "perp;",
- "value": "U+022A5"
- },
- {
- "entity": "pertenk;",
- "value": "U+02031"
- },
- {
- "entity": "pfr;",
- "value": "U+1D52D"
- },
- {
- "entity": "phi;",
- "value": "U+003C6"
- },
- {
- "entity": "phiv;",
- "value": "U+003D5"
- },
- {
- "entity": "phmmat;",
- "value": "U+02133"
- },
- {
- "entity": "phone;",
- "value": "U+0260E"
- },
- {
- "entity": "pi;",
- "value": "U+003C0"
- },
- {
- "entity": "pitchfork;",
- "value": "U+022D4"
- },
- {
- "entity": "piv;",
- "value": "U+003D6"
- },
- {
- "entity": "planck;",
- "value": "U+0210F"
- },
- {
- "entity": "planckh;",
- "value": "U+0210E"
- },
- {
- "entity": "plankv;",
- "value": "U+0210F"
- },
- {
- "entity": "plus;",
- "value": "U+0002B"
- },
- {
- "entity": "plusacir;",
- "value": "U+02A23"
- },
- {
- "entity": "plusb;",
- "value": "U+0229E"
- },
- {
- "entity": "pluscir;",
- "value": "U+02A22"
- },
- {
- "entity": "plusdo;",
- "value": "U+02214"
- },
- {
- "entity": "plusdu;",
- "value": "U+02A25"
- },
- {
- "entity": "pluse;",
- "value": "U+02A72"
- },
- {
- "entity": "plusmn;",
- "value": "U+000B1"
- },
- {
- "entity": "plusmn",
- "value": "U+000B1"
- },
- {
- "entity": "plussim;",
- "value": "U+02A26"
- },
- {
- "entity": "plustwo;",
- "value": "U+02A27"
- },
- {
- "entity": "pm;",
- "value": "U+000B1"
- },
- {
- "entity": "pointint;",
- "value": "U+02A15"
- },
- {
- "entity": "popf;",
- "value": "U+1D561"
- },
- {
- "entity": "pound;",
- "value": "U+000A3"
- },
- {
- "entity": "pound",
- "value": "U+000A3"
- },
- {
- "entity": "pr;",
- "value": "U+0227A"
- },
- {
- "entity": "prE;",
- "value": "U+02AB3"
- },
- {
- "entity": "prap;",
- "value": "U+02AB7"
- },
- {
- "entity": "prcue;",
- "value": "U+0227C"
- },
- {
- "entity": "pre;",
- "value": "U+02AAF"
- },
- {
- "entity": "prec;",
- "value": "U+0227A"
- },
- {
- "entity": "precapprox;",
- "value": "U+02AB7"
- },
- {
- "entity": "preccurlyeq;",
- "value": "U+0227C"
- },
- {
- "entity": "preceq;",
- "value": "U+02AAF"
- },
- {
- "entity": "precnapprox;",
- "value": "U+02AB9"
- },
- {
- "entity": "precneqq;",
- "value": "U+02AB5"
- },
- {
- "entity": "precnsim;",
- "value": "U+022E8"
- },
- {
- "entity": "precsim;",
- "value": "U+0227E"
- },
- {
- "entity": "prime;",
- "value": "U+02032"
- },
- {
- "entity": "primes;",
- "value": "U+02119"
- },
- {
- "entity": "prnE;",
- "value": "U+02AB5"
- },
- {
- "entity": "prnap;",
- "value": "U+02AB9"
- },
- {
- "entity": "prnsim;",
- "value": "U+022E8"
- },
- {
- "entity": "prod;",
- "value": "U+0220F"
- },
- {
- "entity": "profalar;",
- "value": "U+0232E"
- },
- {
- "entity": "profline;",
- "value": "U+02312"
- },
- {
- "entity": "profsurf;",
- "value": "U+02313"
- },
- {
- "entity": "prop;",
- "value": "U+0221D"
- },
- {
- "entity": "propto;",
- "value": "U+0221D"
- },
- {
- "entity": "prsim;",
- "value": "U+0227E"
- },
- {
- "entity": "prurel;",
- "value": "U+022B0"
- },
- {
- "entity": "pscr;",
- "value": "U+1D4C5"
- },
- {
- "entity": "psi;",
- "value": "U+003C8"
- },
- {
- "entity": "puncsp;",
- "value": "U+02008"
- },
- {
- "entity": "qfr;",
- "value": "U+1D52E"
- },
- {
- "entity": "qint;",
- "value": "U+02A0C"
- },
- {
- "entity": "qopf;",
- "value": "U+1D562"
- },
- {
- "entity": "qprime;",
- "value": "U+02057"
- },
- {
- "entity": "qscr;",
- "value": "U+1D4C6"
- },
- {
- "entity": "quaternions;",
- "value": "U+0210D"
- },
- {
- "entity": "quatint;",
- "value": "U+02A16"
- },
- {
- "entity": "quest;",
- "value": "U+0003F"
- },
- {
- "entity": "questeq;",
- "value": "U+0225F"
- },
- {
- "entity": "quot;",
- "value": "U+00022"
- },
- {
- "entity": "quot",
- "value": "U+00022"
- },
- {
- "entity": "rAarr;",
- "value": "U+021DB"
- },
- {
- "entity": "rArr;",
- "value": "U+021D2"
- },
- {
- "entity": "rAtail;",
- "value": "U+0291C"
- },
- {
- "entity": "rBarr;",
- "value": "U+0290F"
- },
- {
- "entity": "rHar;",
- "value": "U+02964"
- },
- {
- "entity": "racute;",
- "value": "U+00155"
- },
- {
- "entity": "radic;",
- "value": "U+0221A"
- },
- {
- "entity": "raemptyv;",
- "value": "U+029B3"
- },
- {
- "entity": "rang;",
- "value": "U+027E9"
- },
- {
- "entity": "rangd;",
- "value": "U+02992"
- },
- {
- "entity": "range;",
- "value": "U+029A5"
- },
- {
- "entity": "rangle;",
- "value": "U+027E9"
- },
- {
- "entity": "raquo;",
- "value": "U+000BB"
- },
- {
- "entity": "raquo",
- "value": "U+000BB"
- },
- {
- "entity": "rarr;",
- "value": "U+02192"
- },
- {
- "entity": "rarrap;",
- "value": "U+02975"
- },
- {
- "entity": "rarrb;",
- "value": "U+021E5"
- },
- {
- "entity": "rarrbfs;",
- "value": "U+02920"
- },
- {
- "entity": "rarrc;",
- "value": "U+02933"
- },
- {
- "entity": "rarrfs;",
- "value": "U+0291E"
- },
- {
- "entity": "rarrhk;",
- "value": "U+021AA"
- },
- {
- "entity": "rarrlp;",
- "value": "U+021AC"
- },
- {
- "entity": "rarrpl;",
- "value": "U+02945"
- },
- {
- "entity": "rarrsim;",
- "value": "U+02974"
- },
- {
- "entity": "rarrtl;",
- "value": "U+021A3"
- },
- {
- "entity": "rarrw;",
- "value": "U+0219D"
- },
- {
- "entity": "ratail;",
- "value": "U+0291A"
- },
- {
- "entity": "ratio;",
- "value": "U+02236"
- },
- {
- "entity": "rationals;",
- "value": "U+0211A"
- },
- {
- "entity": "rbarr;",
- "value": "U+0290D"
- },
- {
- "entity": "rbbrk;",
- "value": "U+02773"
- },
- {
- "entity": "rbrace;",
- "value": "U+0007D"
- },
- {
- "entity": "rbrack;",
- "value": "U+0005D"
- },
- {
- "entity": "rbrke;",
- "value": "U+0298C"
- },
- {
- "entity": "rbrksld;",
- "value": "U+0298E"
- },
- {
- "entity": "rbrkslu;",
- "value": "U+02990"
- },
- {
- "entity": "rcaron;",
- "value": "U+00159"
- },
- {
- "entity": "rcedil;",
- "value": "U+00157"
- },
- {
- "entity": "rceil;",
- "value": "U+02309"
- },
- {
- "entity": "rcub;",
- "value": "U+0007D"
- },
- {
- "entity": "rcy;",
- "value": "U+00440"
- },
- {
- "entity": "rdca;",
- "value": "U+02937"
- },
- {
- "entity": "rdldhar;",
- "value": "U+02969"
- },
- {
- "entity": "rdquo;",
- "value": "U+0201D"
- },
- {
- "entity": "rdquor;",
- "value": "U+0201D"
- },
- {
- "entity": "rdsh;",
- "value": "U+021B3"
- },
- {
- "entity": "real;",
- "value": "U+0211C"
- },
- {
- "entity": "realine;",
- "value": "U+0211B"
- },
- {
- "entity": "realpart;",
- "value": "U+0211C"
- },
- {
- "entity": "reals;",
- "value": "U+0211D"
- },
- {
- "entity": "rect;",
- "value": "U+025AD"
- },
- {
- "entity": "reg;",
- "value": "U+000AE"
- },
- {
- "entity": "reg",
- "value": "U+000AE"
- },
- {
- "entity": "rfisht;",
- "value": "U+0297D"
- },
- {
- "entity": "rfloor;",
- "value": "U+0230B"
- },
- {
- "entity": "rfr;",
- "value": "U+1D52F"
- },
- {
- "entity": "rhard;",
- "value": "U+021C1"
- },
- {
- "entity": "rharu;",
- "value": "U+021C0"
- },
- {
- "entity": "rharul;",
- "value": "U+0296C"
- },
- {
- "entity": "rho;",
- "value": "U+003C1"
- },
- {
- "entity": "rhov;",
- "value": "U+003F1"
- },
- {
- "entity": "rightarrow;",
- "value": "U+02192"
- },
- {
- "entity": "rightarrowtail;",
- "value": "U+021A3"
- },
- {
- "entity": "rightharpoondown;",
- "value": "U+021C1"
- },
- {
- "entity": "rightharpoonup;",
- "value": "U+021C0"
- },
- {
- "entity": "rightleftarrows;",
- "value": "U+021C4"
- },
- {
- "entity": "rightleftharpoons;",
- "value": "U+021CC"
- },
- {
- "entity": "rightrightarrows;",
- "value": "U+021C9"
- },
- {
- "entity": "rightsquigarrow;",
- "value": "U+0219D"
- },
- {
- "entity": "rightthreetimes;",
- "value": "U+022CC"
- },
- {
- "entity": "ring;",
- "value": "U+002DA"
- },
- {
- "entity": "risingdotseq;",
- "value": "U+02253"
- },
- {
- "entity": "rlarr;",
- "value": "U+021C4"
- },
- {
- "entity": "rlhar;",
- "value": "U+021CC"
- },
- {
- "entity": "rlm;",
- "value": "U+0200F"
- },
- {
- "entity": "rmoust;",
- "value": "U+023B1"
- },
- {
- "entity": "rmoustache;",
- "value": "U+023B1"
- },
- {
- "entity": "rnmid;",
- "value": "U+02AEE"
- },
- {
- "entity": "roang;",
- "value": "U+027ED"
- },
- {
- "entity": "roarr;",
- "value": "U+021FE"
- },
- {
- "entity": "robrk;",
- "value": "U+027E7"
- },
- {
- "entity": "ropar;",
- "value": "U+02986"
- },
- {
- "entity": "ropf;",
- "value": "U+1D563"
- },
- {
- "entity": "roplus;",
- "value": "U+02A2E"
- },
- {
- "entity": "rotimes;",
- "value": "U+02A35"
- },
- {
- "entity": "rpar;",
- "value": "U+00029"
- },
- {
- "entity": "rpargt;",
- "value": "U+02994"
- },
- {
- "entity": "rppolint;",
- "value": "U+02A12"
- },
- {
- "entity": "rrarr;",
- "value": "U+021C9"
- },
- {
- "entity": "rsaquo;",
- "value": "U+0203A"
- },
- {
- "entity": "rscr;",
- "value": "U+1D4C7"
- },
- {
- "entity": "rsh;",
- "value": "U+021B1"
- },
- {
- "entity": "rsqb;",
- "value": "U+0005D"
- },
- {
- "entity": "rsquo;",
- "value": "U+02019"
- },
- {
- "entity": "rsquor;",
- "value": "U+02019"
- },
- {
- "entity": "rthree;",
- "value": "U+022CC"
- },
- {
- "entity": "rtimes;",
- "value": "U+022CA"
- },
- {
- "entity": "rtri;",
- "value": "U+025B9"
- },
- {
- "entity": "rtrie;",
- "value": "U+022B5"
- },
- {
- "entity": "rtrif;",
- "value": "U+025B8"
- },
- {
- "entity": "rtriltri;",
- "value": "U+029CE"
- },
- {
- "entity": "ruluhar;",
- "value": "U+02968"
- },
- {
- "entity": "rx;",
- "value": "U+0211E"
- },
- {
- "entity": "sacute;",
- "value": "U+0015B"
- },
- {
- "entity": "sbquo;",
- "value": "U+0201A"
- },
- {
- "entity": "sc;",
- "value": "U+0227B"
- },
- {
- "entity": "scE;",
- "value": "U+02AB4"
- },
- {
- "entity": "scap;",
- "value": "U+02AB8"
- },
- {
- "entity": "scaron;",
- "value": "U+00161"
- },
- {
- "entity": "sccue;",
- "value": "U+0227D"
- },
- {
- "entity": "sce;",
- "value": "U+02AB0"
- },
- {
- "entity": "scedil;",
- "value": "U+0015F"
- },
- {
- "entity": "scirc;",
- "value": "U+0015D"
- },
- {
- "entity": "scnE;",
- "value": "U+02AB6"
- },
- {
- "entity": "scnap;",
- "value": "U+02ABA"
- },
- {
- "entity": "scnsim;",
- "value": "U+022E9"
- },
- {
- "entity": "scpolint;",
- "value": "U+02A13"
- },
- {
- "entity": "scsim;",
- "value": "U+0227F"
- },
- {
- "entity": "scy;",
- "value": "U+00441"
- },
- {
- "entity": "sdot;",
- "value": "U+022C5"
- },
- {
- "entity": "sdotb;",
- "value": "U+022A1"
- },
- {
- "entity": "sdote;",
- "value": "U+02A66"
- },
- {
- "entity": "seArr;",
- "value": "U+021D8"
- },
- {
- "entity": "searhk;",
- "value": "U+02925"
- },
- {
- "entity": "searr;",
- "value": "U+02198"
- },
- {
- "entity": "searrow;",
- "value": "U+02198"
- },
- {
- "entity": "sect;",
- "value": "U+000A7"
- },
- {
- "entity": "sect",
- "value": "U+000A7"
- },
- {
- "entity": "semi;",
- "value": "U+0003B"
- },
- {
- "entity": "seswar;",
- "value": "U+02929"
- },
- {
- "entity": "setminus;",
- "value": "U+02216"
- },
- {
- "entity": "setmn;",
- "value": "U+02216"
- },
- {
- "entity": "sext;",
- "value": "U+02736"
- },
- {
- "entity": "sfr;",
- "value": "U+1D530"
- },
- {
- "entity": "sfrown;",
- "value": "U+02322"
- },
- {
- "entity": "sharp;",
- "value": "U+0266F"
- },
- {
- "entity": "shchcy;",
- "value": "U+00449"
- },
- {
- "entity": "shcy;",
- "value": "U+00448"
- },
- {
- "entity": "shortmid;",
- "value": "U+02223"
- },
- {
- "entity": "shortparallel;",
- "value": "U+02225"
- },
- {
- "entity": "shy;",
- "value": "U+000AD "
- },
- {
- "entity": "shy",
- "value": "U+000AD "
- },
- {
- "entity": "sigma;",
- "value": "U+003C3"
- },
- {
- "entity": "sigmaf;",
- "value": "U+003C2"
- },
- {
- "entity": "sigmav;",
- "value": "U+003C2"
- },
- {
- "entity": "sim;",
- "value": "U+0223C"
- },
- {
- "entity": "simdot;",
- "value": "U+02A6A"
- },
- {
- "entity": "sime;",
- "value": "U+02243"
- },
- {
- "entity": "simeq;",
- "value": "U+02243"
- },
- {
- "entity": "simg;",
- "value": "U+02A9E"
- },
- {
- "entity": "simgE;",
- "value": "U+02AA0"
- },
- {
- "entity": "siml;",
- "value": "U+02A9D"
- },
- {
- "entity": "simlE;",
- "value": "U+02A9F"
- },
- {
- "entity": "simne;",
- "value": "U+02246"
- },
- {
- "entity": "simplus;",
- "value": "U+02A24"
- },
- {
- "entity": "simrarr;",
- "value": "U+02972"
- },
- {
- "entity": "slarr;",
- "value": "U+02190"
- },
- {
- "entity": "smallsetminus;",
- "value": "U+02216"
- },
- {
- "entity": "smashp;",
- "value": "U+02A33"
- },
- {
- "entity": "smeparsl;",
- "value": "U+029E4"
- },
- {
- "entity": "smid;",
- "value": "U+02223"
- },
- {
- "entity": "smile;",
- "value": "U+02323"
- },
- {
- "entity": "smt;",
- "value": "U+02AAA"
- },
- {
- "entity": "smte;",
- "value": "U+02AAC"
- },
- {
- "entity": "softcy;",
- "value": "U+0044C"
- },
- {
- "entity": "sol;",
- "value": "U+0002F"
- },
- {
- "entity": "solb;",
- "value": "U+029C4"
- },
- {
- "entity": "solbar;",
- "value": "U+0233F"
- },
- {
- "entity": "sopf;",
- "value": "U+1D564"
- },
- {
- "entity": "spades;",
- "value": "U+02660"
- },
- {
- "entity": "spadesuit;",
- "value": "U+02660"
- },
- {
- "entity": "spar;",
- "value": "U+02225"
- },
- {
- "entity": "sqcap;",
- "value": "U+02293"
- },
- {
- "entity": "sqcup;",
- "value": "U+02294"
- },
- {
- "entity": "sqsub;",
- "value": "U+0228F"
- },
- {
- "entity": "sqsube;",
- "value": "U+02291"
- },
- {
- "entity": "sqsubset;",
- "value": "U+0228F"
- },
- {
- "entity": "sqsubseteq;",
- "value": "U+02291"
- },
- {
- "entity": "sqsup;",
- "value": "U+02290"
- },
- {
- "entity": "sqsupe;",
- "value": "U+02292"
- },
- {
- "entity": "sqsupset;",
- "value": "U+02290"
- },
- {
- "entity": "sqsupseteq;",
- "value": "U+02292"
- },
- {
- "entity": "squ;",
- "value": "U+025A1"
- },
- {
- "entity": "square;",
- "value": "U+025A1"
- },
- {
- "entity": "squarf;",
- "value": "U+025AA"
- },
- {
- "entity": "squf;",
- "value": "U+025AA"
- },
- {
- "entity": "srarr;",
- "value": "U+02192"
- },
- {
- "entity": "sscr;",
- "value": "U+1D4C8"
- },
- {
- "entity": "ssetmn;",
- "value": "U+02216"
- },
- {
- "entity": "ssmile;",
- "value": "U+02323"
- },
- {
- "entity": "sstarf;",
- "value": "U+022C6"
- },
- {
- "entity": "star;",
- "value": "U+02606"
- },
- {
- "entity": "starf;",
- "value": "U+02605"
- },
- {
- "entity": "straightepsilon;",
- "value": "U+003F5"
- },
- {
- "entity": "straightphi;",
- "value": "U+003D5"
- },
- {
- "entity": "strns;",
- "value": "U+000AF"
- },
- {
- "entity": "sub;",
- "value": "U+02282"
- },
- {
- "entity": "subE;",
- "value": "U+02AC5"
- },
- {
- "entity": "subdot;",
- "value": "U+02ABD"
- },
- {
- "entity": "sube;",
- "value": "U+02286"
- },
- {
- "entity": "subedot;",
- "value": "U+02AC3"
- },
- {
- "entity": "submult;",
- "value": "U+02AC1"
- },
- {
- "entity": "subnE;",
- "value": "U+02ACB"
- },
- {
- "entity": "subne;",
- "value": "U+0228A"
- },
- {
- "entity": "subplus;",
- "value": "U+02ABF"
- },
- {
- "entity": "subrarr;",
- "value": "U+02979"
- },
- {
- "entity": "subset;",
- "value": "U+02282"
- },
- {
- "entity": "subseteq;",
- "value": "U+02286"
- },
- {
- "entity": "subseteqq;",
- "value": "U+02AC5"
- },
- {
- "entity": "subsetneq;",
- "value": "U+0228A"
- },
- {
- "entity": "subsetneqq;",
- "value": "U+02ACB"
- },
- {
- "entity": "subsim;",
- "value": "U+02AC7"
- },
- {
- "entity": "subsub;",
- "value": "U+02AD5"
- },
- {
- "entity": "subsup;",
- "value": "U+02AD3"
- },
- {
- "entity": "succ;",
- "value": "U+0227B"
- },
- {
- "entity": "succapprox;",
- "value": "U+02AB8"
- },
- {
- "entity": "succcurlyeq;",
- "value": "U+0227D"
- },
- {
- "entity": "succeq;",
- "value": "U+02AB0"
- },
- {
- "entity": "succnapprox;",
- "value": "U+02ABA"
- },
- {
- "entity": "succneqq;",
- "value": "U+02AB6"
- },
- {
- "entity": "succnsim;",
- "value": "U+022E9"
- },
- {
- "entity": "succsim;",
- "value": "U+0227F"
- },
- {
- "entity": "sum;",
- "value": "U+02211"
- },
- {
- "entity": "sung;",
- "value": "U+0266A"
- },
- {
- "entity": "sup1;",
- "value": "U+000B9"
- },
- {
- "entity": "sup1",
- "value": "U+000B9"
- },
- {
- "entity": "sup2;",
- "value": "U+000B2"
- },
- {
- "entity": "sup2",
- "value": "U+000B2"
- },
- {
- "entity": "sup3;",
- "value": "U+000B3"
- },
- {
- "entity": "sup3",
- "value": "U+000B3"
- },
- {
- "entity": "sup;",
- "value": "U+02283"
- },
- {
- "entity": "supE;",
- "value": "U+02AC6"
- },
- {
- "entity": "supdot;",
- "value": "U+02ABE"
- },
- {
- "entity": "supdsub;",
- "value": "U+02AD8"
- },
- {
- "entity": "supe;",
- "value": "U+02287"
- },
- {
- "entity": "supedot;",
- "value": "U+02AC4"
- },
- {
- "entity": "suphsol;",
- "value": "U+027C9"
- },
- {
- "entity": "suphsub;",
- "value": "U+02AD7"
- },
- {
- "entity": "suplarr;",
- "value": "U+0297B"
- },
- {
- "entity": "supmult;",
- "value": "U+02AC2"
- },
- {
- "entity": "supnE;",
- "value": "U+02ACC"
- },
- {
- "entity": "supne;",
- "value": "U+0228B"
- },
- {
- "entity": "supplus;",
- "value": "U+02AC0"
- },
- {
- "entity": "supset;",
- "value": "U+02283"
- },
- {
- "entity": "supseteq;",
- "value": "U+02287"
- },
- {
- "entity": "supseteqq;",
- "value": "U+02AC6"
- },
- {
- "entity": "supsetneq;",
- "value": "U+0228B"
- },
- {
- "entity": "supsetneqq;",
- "value": "U+02ACC"
- },
- {
- "entity": "supsim;",
- "value": "U+02AC8"
- },
- {
- "entity": "supsub;",
- "value": "U+02AD4"
- },
- {
- "entity": "supsup;",
- "value": "U+02AD6"
- },
- {
- "entity": "swArr;",
- "value": "U+021D9"
- },
- {
- "entity": "swarhk;",
- "value": "U+02926"
- },
- {
- "entity": "swarr;",
- "value": "U+02199"
- },
- {
- "entity": "swarrow;",
- "value": "U+02199"
- },
- {
- "entity": "swnwar;",
- "value": "U+0292A"
- },
- {
- "entity": "szlig;",
- "value": "U+000DF"
- },
- {
- "entity": "szlig",
- "value": "U+000DF"
- },
- {
- "entity": "target;",
- "value": "U+02316"
- },
- {
- "entity": "tau;",
- "value": "U+003C4"
- },
- {
- "entity": "tbrk;",
- "value": "U+023B4"
- },
- {
- "entity": "tcaron;",
- "value": "U+00165"
- },
- {
- "entity": "tcedil;",
- "value": "U+00163"
- },
- {
- "entity": "tcy;",
- "value": "U+00442"
- },
- {
- "entity": "tdot;",
- "value": "U+020DB"
- },
- {
- "entity": "telrec;",
- "value": "U+02315"
- },
- {
- "entity": "tfr;",
- "value": "U+1D531"
- },
- {
- "entity": "there4;",
- "value": "U+02234"
- },
- {
- "entity": "therefore;",
- "value": "U+02234"
- },
- {
- "entity": "theta;",
- "value": "U+003B8"
- },
- {
- "entity": "thetasym;",
- "value": "U+003D1"
- },
- {
- "entity": "thetav;",
- "value": "U+003D1"
- },
- {
- "entity": "thickapprox;",
- "value": "U+02248"
- },
- {
- "entity": "thicksim;",
- "value": "U+0223C"
- },
- {
- "entity": "thinsp;",
- "value": "U+02009"
- },
- {
- "entity": "thkap;",
- "value": "U+02248"
- },
- {
- "entity": "thksim;",
- "value": "U+0223C"
- },
- {
- "entity": "thorn;",
- "value": "U+000FE"
- },
- {
- "entity": "thorn",
- "value": "U+000FE"
- },
- {
- "entity": "tilde;",
- "value": "U+002DC"
- },
- {
- "entity": "times;",
- "value": "U+000D7"
- },
- {
- "entity": "times",
- "value": "U+000D7"
- },
- {
- "entity": "timesb;",
- "value": "U+022A0"
- },
- {
- "entity": "timesbar;",
- "value": "U+02A31"
- },
- {
- "entity": "timesd;",
- "value": "U+02A30"
- },
- {
- "entity": "tint;",
- "value": "U+0222D"
- },
- {
- "entity": "toea;",
- "value": "U+02928"
- },
- {
- "entity": "top;",
- "value": "U+022A4"
- },
- {
- "entity": "topbot;",
- "value": "U+02336"
- },
- {
- "entity": "topcir;",
- "value": "U+02AF1"
- },
- {
- "entity": "topf;",
- "value": "U+1D565"
- },
- {
- "entity": "topfork;",
- "value": "U+02ADA"
- },
- {
- "entity": "tosa;",
- "value": "U+02929"
- },
- {
- "entity": "tprime;",
- "value": "U+02034"
- },
- {
- "entity": "trade;",
- "value": "U+02122"
- },
- {
- "entity": "triangle;",
- "value": "U+025B5"
- },
- {
- "entity": "triangledown;",
- "value": "U+025BF"
- },
- {
- "entity": "triangleleft;",
- "value": "U+025C3"
- },
- {
- "entity": "trianglelefteq;",
- "value": "U+022B4"
- },
- {
- "entity": "triangleq;",
- "value": "U+0225C"
- },
- {
- "entity": "triangleright;",
- "value": "U+025B9"
- },
- {
- "entity": "trianglerighteq;",
- "value": "U+022B5"
- },
- {
- "entity": "tridot;",
- "value": "U+025EC"
- },
- {
- "entity": "trie;",
- "value": "U+0225C"
- },
- {
- "entity": "triminus;",
- "value": "U+02A3A"
- },
- {
- "entity": "triplus;",
- "value": "U+02A39"
- },
- {
- "entity": "trisb;",
- "value": "U+029CD"
- },
- {
- "entity": "tritime;",
- "value": "U+02A3B"
- },
- {
- "entity": "trpezium;",
- "value": "U+023E2"
- },
- {
- "entity": "tscr;",
- "value": "U+1D4C9"
- },
- {
- "entity": "tscy;",
- "value": "U+00446"
- },
- {
- "entity": "tshcy;",
- "value": "U+0045B"
- },
- {
- "entity": "tstrok;",
- "value": "U+00167"
- },
- {
- "entity": "twixt;",
- "value": "U+0226C"
- },
- {
- "entity": "twoheadleftarrow;",
- "value": "U+0219E"
- },
- {
- "entity": "twoheadrightarrow;",
- "value": "U+021A0"
- },
- {
- "entity": "uArr;",
- "value": "U+021D1"
- },
- {
- "entity": "uHar;",
- "value": "U+02963"
- },
- {
- "entity": "uacute;",
- "value": "U+000FA"
- },
- {
- "entity": "uacute",
- "value": "U+000FA"
- },
- {
- "entity": "uarr;",
- "value": "U+02191"
- },
- {
- "entity": "ubrcy;",
- "value": "U+0045E"
- },
- {
- "entity": "ubreve;",
- "value": "U+0016D"
- },
- {
- "entity": "ucirc;",
- "value": "U+000FB"
- },
- {
- "entity": "ucirc",
- "value": "U+000FB"
- },
- {
- "entity": "ucy;",
- "value": "U+00443"
- },
- {
- "entity": "udarr;",
- "value": "U+021C5"
- },
- {
- "entity": "udblac;",
- "value": "U+00171"
- },
- {
- "entity": "udhar;",
- "value": "U+0296E"
- },
- {
- "entity": "ufisht;",
- "value": "U+0297E"
- },
- {
- "entity": "ufr;",
- "value": "U+1D532"
- },
- {
- "entity": "ugrave;",
- "value": "U+000F9"
- },
- {
- "entity": "ugrave",
- "value": "U+000F9"
- },
- {
- "entity": "uharl;",
- "value": "U+021BF"
- },
- {
- "entity": "uharr;",
- "value": "U+021BE"
- },
- {
- "entity": "uhblk;",
- "value": "U+02580"
- },
- {
- "entity": "ulcorn;",
- "value": "U+0231C"
- },
- {
- "entity": "ulcorner;",
- "value": "U+0231C"
- },
- {
- "entity": "ulcrop;",
- "value": "U+0230F"
- },
- {
- "entity": "ultri;",
- "value": "U+025F8"
- },
- {
- "entity": "umacr;",
- "value": "U+0016B"
- },
- {
- "entity": "uml;",
- "value": "U+000A8"
- },
- {
- "entity": "uml",
- "value": "U+000A8"
- },
- {
- "entity": "uogon;",
- "value": "U+00173"
- },
- {
- "entity": "uopf;",
- "value": "U+1D566"
- },
- {
- "entity": "uparrow;",
- "value": "U+02191"
- },
- {
- "entity": "updownarrow;",
- "value": "U+02195"
- },
- {
- "entity": "upharpoonleft;",
- "value": "U+021BF"
- },
- {
- "entity": "upharpoonright;",
- "value": "U+021BE"
- },
- {
- "entity": "uplus;",
- "value": "U+0228E"
- },
- {
- "entity": "upsi;",
- "value": "U+003C5"
- },
- {
- "entity": "upsih;",
- "value": "U+003D2"
- },
- {
- "entity": "upsilon;",
- "value": "U+003C5"
- },
- {
- "entity": "upuparrows;",
- "value": "U+021C8"
- },
- {
- "entity": "urcorn;",
- "value": "U+0231D"
- },
- {
- "entity": "urcorner;",
- "value": "U+0231D"
- },
- {
- "entity": "urcrop;",
- "value": "U+0230E"
- },
- {
- "entity": "uring;",
- "value": "U+0016F"
- },
- {
- "entity": "urtri;",
- "value": "U+025F9"
- },
- {
- "entity": "uscr;",
- "value": "U+1D4CA"
- },
- {
- "entity": "utdot;",
- "value": "U+022F0"
- },
- {
- "entity": "utilde;",
- "value": "U+00169"
- },
- {
- "entity": "utri;",
- "value": "U+025B5"
- },
- {
- "entity": "utrif;",
- "value": "U+025B4"
- },
- {
- "entity": "uuarr;",
- "value": "U+021C8"
- },
- {
- "entity": "uuml;",
- "value": "U+000FC"
- },
- {
- "entity": "uuml",
- "value": "U+000FC"
- },
- {
- "entity": "uwangle;",
- "value": "U+029A7"
- },
- {
- "entity": "vArr;",
- "value": "U+021D5"
- },
- {
- "entity": "vBar;",
- "value": "U+02AE8"
- },
- {
- "entity": "vBarv;",
- "value": "U+02AE9"
- },
- {
- "entity": "vDash;",
- "value": "U+022A8"
- },
- {
- "entity": "vangrt;",
- "value": "U+0299C"
- },
- {
- "entity": "varepsilon;",
- "value": "U+003F5"
- },
- {
- "entity": "varkappa;",
- "value": "U+003F0"
- },
- {
- "entity": "varnothing;",
- "value": "U+02205"
- },
- {
- "entity": "varphi;",
- "value": "U+003D5"
- },
- {
- "entity": "varpi;",
- "value": "U+003D6"
- },
- {
- "entity": "varpropto;",
- "value": "U+0221D"
- },
- {
- "entity": "varr;",
- "value": "U+02195"
- },
- {
- "entity": "varrho;",
- "value": "U+003F1"
- },
- {
- "entity": "varsigma;",
- "value": "U+003C2"
- },
- {
- "entity": "vartheta;",
- "value": "U+003D1"
- },
- {
- "entity": "vartriangleleft;",
- "value": "U+022B2"
- },
- {
- "entity": "vartriangleright;",
- "value": "U+022B3"
- },
- {
- "entity": "vcy;",
- "value": "U+00432"
- },
- {
- "entity": "vdash;",
- "value": "U+022A2"
- },
- {
- "entity": "vee;",
- "value": "U+02228"
- },
- {
- "entity": "veebar;",
- "value": "U+022BB"
- },
- {
- "entity": "veeeq;",
- "value": "U+0225A"
- },
- {
- "entity": "vellip;",
- "value": "U+022EE"
- },
- {
- "entity": "verbar;",
- "value": "U+0007C"
- },
- {
- "entity": "vert;",
- "value": "U+0007C"
- },
- {
- "entity": "vfr;",
- "value": "U+1D533"
- },
- {
- "entity": "vltri;",
- "value": "U+022B2"
- },
- {
- "entity": "vopf;",
- "value": "U+1D567"
- },
- {
- "entity": "vprop;",
- "value": "U+0221D"
- },
- {
- "entity": "vrtri;",
- "value": "U+022B3"
- },
- {
- "entity": "vscr;",
- "value": "U+1D4CB"
- },
- {
- "entity": "vzigzag;",
- "value": "U+0299A"
- },
- {
- "entity": "wcirc;",
- "value": "U+00175"
- },
- {
- "entity": "wedbar;",
- "value": "U+02A5F"
- },
- {
- "entity": "wedge;",
- "value": "U+02227"
- },
- {
- "entity": "wedgeq;",
- "value": "U+02259"
- },
- {
- "entity": "weierp;",
- "value": "U+02118"
- },
- {
- "entity": "wfr;",
- "value": "U+1D534"
- },
- {
- "entity": "wopf;",
- "value": "U+1D568"
- },
- {
- "entity": "wp;",
- "value": "U+02118"
- },
- {
- "entity": "wr;",
- "value": "U+02240"
- },
- {
- "entity": "wreath;",
- "value": "U+02240"
- },
- {
- "entity": "wscr;",
- "value": "U+1D4CC"
- },
- {
- "entity": "xcap;",
- "value": "U+022C2"
- },
- {
- "entity": "xcirc;",
- "value": "U+025EF"
- },
- {
- "entity": "xcup;",
- "value": "U+022C3"
- },
- {
- "entity": "xdtri;",
- "value": "U+025BD"
- },
- {
- "entity": "xfr;",
- "value": "U+1D535"
- },
- {
- "entity": "xhArr;",
- "value": "U+027FA"
- },
- {
- "entity": "xharr;",
- "value": "U+027F7"
- },
- {
- "entity": "xi;",
- "value": "U+003BE"
- },
- {
- "entity": "xlArr;",
- "value": "U+027F8"
- },
- {
- "entity": "xlarr;",
- "value": "U+027F5"
- },
- {
- "entity": "xmap;",
- "value": "U+027FC"
- },
- {
- "entity": "xnis;",
- "value": "U+022FB"
- },
- {
- "entity": "xodot;",
- "value": "U+02A00"
- },
- {
- "entity": "xopf;",
- "value": "U+1D569"
- },
- {
- "entity": "xoplus;",
- "value": "U+02A01"
- },
- {
- "entity": "xotime;",
- "value": "U+02A02"
- },
- {
- "entity": "xrArr;",
- "value": "U+027F9"
- },
- {
- "entity": "xrarr;",
- "value": "U+027F6"
- },
- {
- "entity": "xscr;",
- "value": "U+1D4CD"
- },
- {
- "entity": "xsqcup;",
- "value": "U+02A06"
- },
- {
- "entity": "xuplus;",
- "value": "U+02A04"
- },
- {
- "entity": "xutri;",
- "value": "U+025B3"
- },
- {
- "entity": "xvee;",
- "value": "U+022C1"
- },
- {
- "entity": "xwedge;",
- "value": "U+022C0"
- },
- {
- "entity": "yacute;",
- "value": "U+000FD"
- },
- {
- "entity": "yacute",
- "value": "U+000FD"
- },
- {
- "entity": "yacy;",
- "value": "U+0044F"
- },
- {
- "entity": "ycirc;",
- "value": "U+00177"
- },
- {
- "entity": "ycy;",
- "value": "U+0044B"
- },
- {
- "entity": "yen;",
- "value": "U+000A5"
- },
- {
- "entity": "yen",
- "value": "U+000A5"
- },
- {
- "entity": "yfr;",
- "value": "U+1D536"
- },
- {
- "entity": "yicy;",
- "value": "U+00457"
- },
- {
- "entity": "yopf;",
- "value": "U+1D56A"
- },
- {
- "entity": "yscr;",
- "value": "U+1D4CE"
- },
- {
- "entity": "yucy;",
- "value": "U+0044E"
- },
- {
- "entity": "yuml;",
- "value": "U+000FF"
- },
- {
- "entity": "yuml",
- "value": "U+000FF"
- },
- {
- "entity": "zacute;",
- "value": "U+0017A"
- },
- {
- "entity": "zcaron;",
- "value": "U+0017E"
- },
- {
- "entity": "zcy;",
- "value": "U+00437"
- },
- {
- "entity": "zdot;",
- "value": "U+0017C"
- },
- {
- "entity": "zeetrf;",
- "value": "U+02128"
- },
- {
- "entity": "zeta;",
- "value": "U+003B6"
- },
- {
- "entity": "zfr;",
- "value": "U+1D537"
- },
- {
- "entity": "zhcy;",
- "value": "U+00436"
- },
- {
- "entity": "zigrarr;",
- "value": "U+021DD"
- },
- {
- "entity": "zopf;",
- "value": "U+1D56B"
- },
- {
- "entity": "zscr;",
- "value": "U+1D4CF"
- },
- {
- "entity": "zwj;",
- "value": "U+0200D"
- },
- {
- "entity": "zwnj;",
- "value": "U+0200C"
- }
-]
diff --git a/WebCore/html/HTMLFormControlElement.h b/WebCore/html/HTMLFormControlElement.h
index 2352182..eae7f0a 100644
--- a/WebCore/html/HTMLFormControlElement.h
+++ b/WebCore/html/HTMLFormControlElement.h
@@ -88,9 +88,6 @@ public:
// This must be called when a validation constraint or control value is changed.
void setNeedsValidityCheck();
void setCustomValidity(const String&);
- virtual bool valueMissing() const { return false; }
- virtual bool patternMismatch() const { return false; }
- virtual bool tooLong() const { return false; }
void formDestroyed() { m_form = 0; }
@@ -175,6 +172,9 @@ private:
// FIXME: Give this class its own header file.
class HTMLTextFormControlElement : public HTMLFormControlElementWithState {
public:
+ // Common flag for HTMLInputElement::tooLong() and HTMLTextAreaElement::tooLong().
+ enum NeedsToCheckDirtyFlag {CheckDirtyFlag, IgnoreDirtyFlag};
+
virtual ~HTMLTextFormControlElement();
String strippedPlaceholder() const;
diff --git a/WebCore/html/HTMLFormElement.cpp b/WebCore/html/HTMLFormElement.cpp
index c53ea1d..56ffd0f 100644
--- a/WebCore/html/HTMLFormElement.cpp
+++ b/WebCore/html/HTMLFormElement.cpp
@@ -449,6 +449,9 @@ bool HTMLFormElement::noValidate() const
return !getAttribute(novalidateAttr).isNull();
}
+// FIXME: This function should be removed because it does not do the same thing as the
+// JavaScript binding for action, which treats action as a URL attribute. Last time I
+// (Darin Adler) removed this, someone added it back, so I am leaving it in for now.
String HTMLFormElement::action() const
{
return getAttribute(actionAttr);
diff --git a/WebCore/html/HTMLFormElement.idl b/WebCore/html/HTMLFormElement.idl
index c5162f9..a9f8ea1 100644
--- a/WebCore/html/HTMLFormElement.idl
+++ b/WebCore/html/HTMLFormElement.idl
@@ -30,7 +30,7 @@ module html {
attribute [Reflect] DOMString name;
attribute [Reflect] boolean noValidate;
attribute [Reflect=accept_charset] DOMString acceptCharset;
- attribute [Reflect] DOMString action;
+ attribute [Reflect, URL] DOMString action;
attribute [ConvertNullToNullString] DOMString encoding; /* Netscape/Firefox legacy attribute. Same as enctype. */
attribute [ConvertNullToNullString] DOMString enctype;
attribute [Reflect] DOMString method;
diff --git a/WebCore/html/HTMLFrameElement.idl b/WebCore/html/HTMLFrameElement.idl
index 4a5268c..dfe4ef8 100644
--- a/WebCore/html/HTMLFrameElement.idl
+++ b/WebCore/html/HTMLFrameElement.idl
@@ -29,7 +29,7 @@ module html {
attribute [Reflect] DOMString name;
attribute [Reflect] boolean noResize;
attribute [Reflect] DOMString scrolling;
- attribute [Reflect,URL] DOMString src;
+ attribute [Reflect, URL] DOMString src;
// Introduced in DOM Level 2:
readonly attribute [CheckFrameSecurity] Document contentDocument;
diff --git a/WebCore/html/HTMLFrameElementBase.cpp b/WebCore/html/HTMLFrameElementBase.cpp
index 6cae891..b967926 100644
--- a/WebCore/html/HTMLFrameElementBase.cpp
+++ b/WebCore/html/HTMLFrameElementBase.cpp
@@ -37,6 +37,7 @@
#include "HTMLNames.h"
#include "KURL.h"
#include "Page.h"
+#include "RenderEmbeddedObject.h"
#include "RenderFrame.h"
#include "ScriptController.h"
#include "ScriptEventListener.h"
@@ -210,10 +211,10 @@ void HTMLFrameElementBase::attach()
setRemainsAliveOnRemovalFromTree(false);
HTMLFrameOwnerElement::attach();
-
- if (RenderPart* renderPart = toRenderPart(renderer())) {
+
+ if (RenderPart* part = renderPart()) {
if (Frame* frame = contentFrame())
- renderPart->setWidget(frame->view());
+ part->setWidget(frame->view());
}
}
@@ -257,20 +258,20 @@ bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const
int HTMLFrameElementBase::width() const
{
- if (!renderer())
+ if (!renderBox())
return 0;
-
+
document()->updateLayoutIgnorePendingStylesheets();
- return toRenderBox(renderer())->width();
+ return renderBox()->width();
}
int HTMLFrameElementBase::height() const
{
- if (!renderer())
+ if (!renderBox())
return 0;
-
+
document()->updateLayoutIgnorePendingStylesheets();
- return toRenderBox(renderer())->height();
+ return renderBox()->height();
}
void HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree(bool value)
diff --git a/WebCore/html/HTMLFrameOwnerElement.cpp b/WebCore/html/HTMLFrameOwnerElement.cpp
index a1a69f3..3f946f0 100644
--- a/WebCore/html/HTMLFrameOwnerElement.cpp
+++ b/WebCore/html/HTMLFrameOwnerElement.cpp
@@ -24,6 +24,7 @@
#include "DOMWindow.h"
#include "Frame.h"
#include "FrameLoader.h"
+#include "RenderPart.h"
#if ENABLE(SVG)
#include "ExceptionCode.h"
@@ -39,6 +40,15 @@ HTMLFrameOwnerElement::HTMLFrameOwnerElement(const QualifiedName& tagName, Docum
{
}
+RenderPart* HTMLFrameOwnerElement::renderPart() const
+{
+ // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
+ // when using fallback content.
+ if (!renderer() || !renderer()->isRenderPart())
+ return 0;
+ return toRenderPart(renderer());
+}
+
void HTMLFrameOwnerElement::willRemove()
{
if (Frame* frame = contentFrame()) {
diff --git a/WebCore/html/HTMLFrameOwnerElement.h b/WebCore/html/HTMLFrameOwnerElement.h
index 804ab22..c84d7bb 100644
--- a/WebCore/html/HTMLFrameOwnerElement.h
+++ b/WebCore/html/HTMLFrameOwnerElement.h
@@ -28,6 +28,7 @@ namespace WebCore {
class DOMWindow;
class Frame;
+class RenderPart;
#if ENABLE(SVG)
class SVGDocument;
@@ -41,6 +42,11 @@ public:
DOMWindow* contentWindow() const;
Document* contentDocument() const;
+ // Most subclasses use RenderPart (either RenderEmbeddedObject or RenderIFrame)
+ // except for HTMLObjectElement and HTMLEmbedElement which may return any
+ // RenderObject when using fallback content.
+ RenderPart* renderPart() const;
+
#if ENABLE(SVG)
SVGDocument* getSVGDocument(ExceptionCode&) const;
#endif
diff --git a/WebCore/html/HTMLHtmlElement.cpp b/WebCore/html/HTMLHtmlElement.cpp
index 6205d10..6007805 100644
--- a/WebCore/html/HTMLHtmlElement.cpp
+++ b/WebCore/html/HTMLHtmlElement.cpp
@@ -50,6 +50,11 @@ PassRefPtr<HTMLHtmlElement> HTMLHtmlElement::create(const QualifiedName& tagName
return adoptRef(new HTMLHtmlElement(tagName, document));
}
+bool HTMLHtmlElement::isURLAttribute(Attribute* attribute) const
+{
+ return attribute->name() == manifestAttr;
+}
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
void HTMLHtmlElement::insertedIntoDocument()
{
@@ -68,8 +73,8 @@ void HTMLHtmlElement::insertedIntoDocument()
// Check the manifest attribute
// FIXME: Revisit this when we get a clarification from whatwg on how to handle empty
// manifest attributes. As spec'd, and coded here, the system will initiate an update
- // passing in the document url as the manifest url. That's not a good thing.
- AtomicString manifest = getAttribute(manifestAttr);
+ // passing in the document URL as the manifest URL. That's not a good thing.
+ const AtomicString& manifest = getAttribute(manifestAttr);
if (manifest.isNull())
documentLoader->applicationCacheHost()->selectCacheWithoutManifest();
else
diff --git a/WebCore/html/HTMLHtmlElement.h b/WebCore/html/HTMLHtmlElement.h
index e854fb1..47503f7 100644
--- a/WebCore/html/HTMLHtmlElement.h
+++ b/WebCore/html/HTMLHtmlElement.h
@@ -36,6 +36,8 @@ public:
private:
HTMLHtmlElement(const QualifiedName&, Document*);
+ virtual bool isURLAttribute(Attribute*) const;
+
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
virtual void insertedIntoDocument();
#endif
diff --git a/WebCore/html/HTMLHtmlElement.idl b/WebCore/html/HTMLHtmlElement.idl
index 42ba861..03c661c 100644
--- a/WebCore/html/HTMLHtmlElement.idl
+++ b/WebCore/html/HTMLHtmlElement.idl
@@ -21,6 +21,7 @@ module html {
interface HTMLHtmlElement : HTMLElement {
attribute [Reflect] DOMString version;
+ attribute [Reflect, URL] DOMString manifest;
};
}
diff --git a/WebCore/html/HTMLIFrameElement.idl b/WebCore/html/HTMLIFrameElement.idl
index b21263e..7f9e25a 100644
--- a/WebCore/html/HTMLIFrameElement.idl
+++ b/WebCore/html/HTMLIFrameElement.idl
@@ -30,7 +30,7 @@ module html {
attribute [Reflect] DOMString name;
attribute [Reflect] DOMString sandbox;
attribute [Reflect] DOMString scrolling;
- attribute [Reflect] DOMString src;
+ attribute [Reflect, URL] DOMString src;
attribute [Reflect] DOMString width;
// Introduced in DOM Level 2:
diff --git a/WebCore/html/HTMLImageElement.cpp b/WebCore/html/HTMLImageElement.cpp
index 82eeab1..b7ece78 100644
--- a/WebCore/html/HTMLImageElement.cpp
+++ b/WebCore/html/HTMLImageElement.cpp
@@ -183,7 +183,9 @@ RenderObject* HTMLImageElement::createRenderer(RenderArena* arena, RenderStyle*
if (style->contentData())
return RenderObject::createObject(this, style);
- return new (arena) RenderImage(this);
+ RenderImage* image = new (arena) RenderImage(this);
+ image->setImageResource(RenderImageResource::create());
+ return image;
}
void HTMLImageElement::attach()
@@ -191,15 +193,16 @@ void HTMLImageElement::attach()
HTMLElement::attach();
if (renderer() && renderer()->isImage() && m_imageLoader.haveFiredBeforeLoadEvent()) {
- RenderImage* imageObj = toRenderImage(renderer());
- if (imageObj->hasImage())
+ RenderImage* renderImage = toRenderImage(renderer());
+ RenderImageResource* renderImageResource = renderImage->imageResource();
+ if (renderImageResource->hasImage())
return;
- imageObj->setCachedImage(m_imageLoader.image());
+ renderImageResource->setCachedImage(m_imageLoader.image());
// If we have no image at all because we have no src attribute, set
// image height and width for the alt text instead.
- if (!m_imageLoader.image() && !imageObj->cachedImage())
- imageObj->setImageSizeForAltText();
+ if (!m_imageLoader.image() && !renderImageResource->cachedImage())
+ renderImage->setImageSizeForAltText();
}
}
diff --git a/WebCore/html/HTMLImageElement.idl b/WebCore/html/HTMLImageElement.idl
index 1bf8a28..935b721 100644
--- a/WebCore/html/HTMLImageElement.idl
+++ b/WebCore/html/HTMLImageElement.idl
@@ -30,8 +30,8 @@ module html {
attribute long height;
attribute [Reflect] long hspace;
attribute [Reflect] boolean isMap;
- attribute [Reflect,URL] DOMString longDesc;
- attribute [Reflect,URL] DOMString src;
+ attribute [Reflect, URL] DOMString longDesc;
+ attribute [Reflect, URL] DOMString src;
attribute [Reflect] DOMString useMap;
attribute [Reflect] long vspace;
attribute long width;
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index f9c5162..c2e5416 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -111,12 +111,44 @@ static const double weekDefaultStepBase = -259200000.0; // The first day of 1970
static const double msecPerMinute = 60 * 1000;
static const double msecPerSecond = 1000;
+static const char emailPattern[] =
+ "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part
+ "@"
+ "[a-z0-9-]+(\\.[a-z0-9-]+)+"; // domain part
+
static bool isNumberCharacter(UChar ch)
{
return ch == '+' || ch == '-' || ch == '.' || ch == 'e' || ch == 'E'
|| (ch >= '0' && ch <= '9');
}
+static bool isValidColorString(const String& value)
+{
+ if (value.isEmpty())
+ return false;
+ if (value[0] == '#') {
+ // We don't accept #rgb and #aarrggbb formats.
+ if (value.length() != 7)
+ return false;
+ }
+ Color color(value); // This accepts named colors such as "white".
+ return color.isValid() && !color.hasAlpha();
+}
+
+static bool isValidEmailAddress(const String& address)
+{
+ int addressLength = address.length();
+ if (!addressLength)
+ return false;
+
+ DEFINE_STATIC_LOCAL(const RegularExpression, regExp, (emailPattern, TextCaseInsensitive));
+
+ int matchLength;
+ int matchOffset = regExp.match(address, 0, &matchLength);
+
+ return !matchOffset && matchLength == addressLength;
+}
+
HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
: HTMLTextFormControlElement(tagName, document, form)
, m_xPos(0)
@@ -208,7 +240,71 @@ void HTMLInputElement::updateCheckedRadioButtons()
renderer()->theme()->stateChanged(renderer(), CheckedState);
}
-bool HTMLInputElement::valueMissing() const
+bool HTMLInputElement::isValidValue(const String& value) const
+{
+ // Should not call isValidValue() for the following types because
+ // we can't set string values for these types.
+ if (inputType() == CHECKBOX || inputType() == FILE || inputType() == RADIO) {
+ ASSERT_NOT_REACHED();
+ return false;
+ }
+ return !typeMismatch(value)
+ && !stepMismatch(value)
+ && !rangeUnderflow(value)
+ && !rangeOverflow(value)
+ && !tooLong(value, IgnoreDirtyFlag)
+ && !patternMismatch(value)
+ && !valueMissing(value);
+}
+
+bool HTMLInputElement::typeMismatch(const String& value) const
+{
+ switch (inputType()) {
+ case COLOR:
+ return !isValidColorString(value);
+ case NUMBER:
+ return !parseToDoubleForNumberType(value, 0);
+ case URL:
+ return !KURL(KURL(), value).isValid();
+ case EMAIL: {
+ if (!multiple())
+ return !isValidEmailAddress(value);
+ Vector<String> addresses;
+ value.split(',', addresses);
+ for (unsigned i = 0; i < addresses.size(); ++i) {
+ if (!isValidEmailAddress(addresses[i]))
+ return true;
+ }
+ return false;
+ }
+ case DATE:
+ case DATETIME:
+ case DATETIMELOCAL:
+ case MONTH:
+ case TIME:
+ case WEEK:
+ return !parseToDateComponents(inputType(), value, 0);
+ case BUTTON:
+ case CHECKBOX:
+ case FILE:
+ case HIDDEN:
+ case IMAGE:
+ case ISINDEX:
+ case PASSWORD:
+ case RADIO:
+ case RANGE:
+ case RESET:
+ case SEARCH:
+ case SUBMIT:
+ case TELEPHONE:
+ case TEXT:
+ return false;
+ }
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
+bool HTMLInputElement::valueMissing(const String& value) const
{
if (!isRequiredFormControl() || readOnly() || disabled())
return false;
@@ -228,7 +324,7 @@ bool HTMLInputElement::valueMissing() const
case TIME:
case URL:
case WEEK:
- return value().isEmpty();
+ return value.isEmpty();
case CHECKBOX:
return !checked();
case RADIO:
@@ -249,12 +345,11 @@ bool HTMLInputElement::valueMissing() const
return false;
}
-bool HTMLInputElement::patternMismatch() const
+bool HTMLInputElement::patternMismatch(const String& value) const
{
if (!isTextType())
return false;
const AtomicString& pattern = getAttribute(patternAttr);
- String value = this->value();
// Empty values can't be mismatched
if (pattern.isEmpty() || value.isEmpty())
return false;
@@ -265,7 +360,7 @@ bool HTMLInputElement::patternMismatch() const
return matchOffset || matchLength != valueLength;
}
-bool HTMLInputElement::tooLong() const
+bool HTMLInputElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const
{
// We use isTextType() instead of supportsMaxLength() because of the
// 'virtual' overhead.
@@ -274,14 +369,16 @@ bool HTMLInputElement::tooLong() const
int max = maxLength();
if (max < 0)
return false;
- // Return false for the default value even if it is longer than maxLength.
- bool userEdited = !m_data.value().isNull();
- if (!userEdited)
- return false;
- return numGraphemeClusters(value()) > static_cast<unsigned>(max);
+ if (check == CheckDirtyFlag) {
+ // Return false for the default value even if it is longer than maxLength.
+ bool userEdited = !m_data.value().isNull();
+ if (!userEdited)
+ return false;
+ }
+ return numGraphemeClusters(value) > static_cast<unsigned>(max);
}
-bool HTMLInputElement::rangeUnderflow() const
+bool HTMLInputElement::rangeUnderflow(const String& value) const
{
const double nan = numeric_limits<double>::quiet_NaN();
switch (inputType()) {
@@ -292,11 +389,11 @@ bool HTMLInputElement::rangeUnderflow() const
case NUMBER:
case TIME:
case WEEK: {
- double doubleValue = parseToDouble(value(), nan);
+ double doubleValue = parseToDouble(value, nan);
return isfinite(doubleValue) && doubleValue < minimum();
}
case RANGE: // Guaranteed by sanitization.
- ASSERT(parseToDouble(value(), nan) >= minimum());
+ ASSERT(parseToDouble(value, nan) >= minimum());
case BUTTON:
case CHECKBOX:
case COLOR:
@@ -318,7 +415,7 @@ bool HTMLInputElement::rangeUnderflow() const
return false;
}
-bool HTMLInputElement::rangeOverflow() const
+bool HTMLInputElement::rangeOverflow(const String& value) const
{
const double nan = numeric_limits<double>::quiet_NaN();
switch (inputType()) {
@@ -329,11 +426,11 @@ bool HTMLInputElement::rangeOverflow() const
case NUMBER:
case TIME:
case WEEK: {
- double doubleValue = parseToDouble(value(), nan);
+ double doubleValue = parseToDouble(value, nan);
return isfinite(doubleValue) && doubleValue > maximum();
}
case RANGE: // Guaranteed by sanitization.
- ASSERT(parseToDouble(value(), nan) <= maximum());
+ ASSERT(parseToDouble(value, nan) <= maximum());
case BUTTON:
case CHECKBOX:
case COLOR:
@@ -478,7 +575,7 @@ double HTMLInputElement::stepBase() const
return 0.0;
}
-bool HTMLInputElement::stepMismatch() const
+bool HTMLInputElement::stepMismatch(const String& value) const
{
double step;
if (!getAllowedValueStep(&step))
@@ -491,7 +588,7 @@ bool HTMLInputElement::stepMismatch() const
return false;
case NUMBER: {
double doubleValue;
- if (!parseToDoubleForNumberType(value(), &doubleValue))
+ if (!parseToDoubleForNumberType(value, &doubleValue))
return false;
doubleValue = fabs(doubleValue - stepBase());
if (isinf(doubleValue))
@@ -513,7 +610,7 @@ bool HTMLInputElement::stepMismatch() const
case TIME:
case WEEK: {
const double nan = numeric_limits<double>::quiet_NaN();
- double doubleValue = parseToDouble(value(), nan);
+ double doubleValue = parseToDouble(value, nan);
doubleValue = fabs(doubleValue - stepBase());
if (!isfinite(doubleValue))
return false;
@@ -1175,8 +1272,11 @@ RenderObject* HTMLInputElement::createRenderer(RenderArena *arena, RenderStyle *
return new (arena) RenderFileUploadControl(this);
case HIDDEN:
break;
- case IMAGE:
- return new (arena) RenderImage(this);
+ case IMAGE: {
+ RenderImage* image = new (arena) RenderImage(this);
+ image->setImageResource(RenderImageResource::create());
+ return image;
+ }
case RANGE:
return new (arena) RenderSlider(this);
case COLOR:
@@ -1215,13 +1315,14 @@ void HTMLInputElement::attach()
m_imageLoader = adoptPtr(new HTMLImageLoader(this));
m_imageLoader->updateFromElement();
if (renderer() && m_imageLoader->haveFiredBeforeLoadEvent()) {
- RenderImage* imageObj = toRenderImage(renderer());
- imageObj->setCachedImage(m_imageLoader->image());
-
+ RenderImage* renderImage = toRenderImage(renderer());
+ RenderImageResource* renderImageResource = renderImage->imageResource();
+ renderImageResource->setCachedImage(m_imageLoader->image());
+
// If we have no image at all because we have no src attribute, set
// image height and width for the alt text instead.
- if (!m_imageLoader->image() && !imageObj->cachedImage())
- imageObj->setImageSizeForAltText();
+ if (!m_imageLoader->image() && !renderImageResource->cachedImage())
+ renderImage->setImageSizeForAltText();
}
}
@@ -1501,11 +1602,16 @@ void HTMLInputElement::copyNonAttributeProperties(const Element* source)
String HTMLInputElement::value() const
{
- // The HTML5 spec (as of the 10/24/08 working draft) says that the value attribute isn't applicable to the file upload control
- // but we don't want to break existing websites, who may be relying on being able to get the file name as a value.
if (inputType() == FILE) {
- if (!m_fileList->isEmpty())
- return m_fileList->item(0)->fileName();
+ if (!m_fileList->isEmpty()) {
+ // HTML5 tells us that we're supposed to use this goofy value for
+ // file input controls. Historically, browsers reveals the real
+ // file path, but that's a privacy problem. Code on the web
+ // decided to try to parse the value by looking for backslashes
+ // (because that's what Windows file paths use). To be compatible
+ // with that code, we make up a fake path for the file.
+ return "C:\\fakepath\\" + m_fileList->item(0)->fileName();
+ }
return String();
}
diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h
index e6cdda3..657b468 100644
--- a/WebCore/html/HTMLInputElement.h
+++ b/WebCore/html/HTMLInputElement.h
@@ -75,8 +75,13 @@ public:
bool autoComplete() const;
// For ValidityState
- bool rangeUnderflow() const;
- bool rangeOverflow() const;
+ bool typeMismatch(const String&) const;
+ // valueMissing() ignores the specified string value for CHECKBOX and RADIO.
+ bool valueMissing(const String&) const;
+ bool patternMismatch(const String&) const;
+ bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
+ bool rangeUnderflow(const String&) const;
+ bool rangeOverflow(const String&) const;
// Returns the minimum value for type=date, number, or range. Don't call this for other types.
double minimum() const;
// Returns the maximum value for type=date, number, or range. Don't call this for other types.
@@ -86,7 +91,8 @@ public:
// Returns false if there is no "allowed value step."
bool getAllowedValueStep(double*) const;
// For ValidityState.
- bool stepMismatch() const;
+ bool stepMismatch(const String&) const;
+
// Implementations of HTMLInputElement::stepUp() and stepDown().
void stepUp(int, ExceptionCode&);
void stepDown(int, ExceptionCode&);
@@ -124,6 +130,9 @@ public:
virtual String value() const;
virtual void setValue(const String&, bool sendChangeEvent = false);
virtual void setValueForUser(const String&);
+ // Checks if the specified string would be a valid value.
+ // We should not call this for types with no string value such as CHECKBOX and RADIO.
+ bool isValidValue(const String&) const;
virtual const String& suggestedValue() const;
void setSuggestedValue(const String&);
@@ -233,10 +242,6 @@ private:
virtual bool isTextFormControl() const { return isTextField(); }
- virtual bool valueMissing() const;
- virtual bool patternMismatch() const;
- virtual bool tooLong() const;
-
virtual bool hasSpinButton() const { return m_type == NUMBER || m_type == DATE || m_type == DATETIME || m_type == DATETIMELOCAL || m_type == MONTH || m_type == TIME || m_type == WEEK; }
virtual bool canTriggerImplicitSubmission() const { return isTextField(); }
diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl
index c726caa..19e4226 100644
--- a/WebCore/html/HTMLInputElement.idl
+++ b/WebCore/html/HTMLInputElement.idl
@@ -54,7 +54,7 @@ module html {
// FIXME: The spec says this should be a long, not an unsigned long.
attribute unsigned long size; // Changed string -> long as part of DOM level 2
#endif
- attribute [Reflect,URL] DOMString src;
+ attribute [Reflect, URL] DOMString src;
attribute [Reflect] DOMString step;
attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
attribute [Reflect] DOMString useMap;
diff --git a/WebCore/html/HTMLLinkElement.cpp b/WebCore/html/HTMLLinkElement.cpp
index c778b6f..bc7b9a6 100644
--- a/WebCore/html/HTMLLinkElement.cpp
+++ b/WebCore/html/HTMLLinkElement.cpp
@@ -103,7 +103,7 @@ void HTMLLinkElement::setDisabledState(bool _disabled)
if (!m_sheet && m_disabledState == EnabledViaScript)
process();
else
- document()->updateStyleSelector(); // Update the style selector.
+ document()->styleSelectorChanged(DeferRecalcStyle); // Update the style selector.
}
}
@@ -211,7 +211,7 @@ void HTMLLinkElement::process()
ResourceHandle::prepareForURL(m_url);
#if ENABLE(LINK_PREFETCH)
- if (m_relAttribute.m_isLinkPrefetch && m_url.isValid())
+ if (m_relAttribute.m_isLinkPrefetch && m_url.isValid() && document()->frame())
document()->docLoader()->requestLinkPrefetch(m_url);
#endif
@@ -256,7 +256,7 @@ void HTMLLinkElement::process()
} else if (m_sheet) {
// we no longer contain a stylesheet, e.g. perhaps rel or type was changed
m_sheet = 0;
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
}
@@ -274,9 +274,8 @@ void HTMLLinkElement::removedFromDocument()
document()->removeStyleSheetCandidateNode(this);
- // FIXME: It's terrible to do a synchronous update of the style selector just because a <style> or <link> element got removed.
if (document()->renderer())
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
void HTMLLinkElement::finishParsingChildren()
@@ -289,7 +288,7 @@ void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL,
{
m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
- bool strictParsing = !document()->inCompatMode();
+ bool strictParsing = !document()->inQuirksMode();
bool enforceMIMEType = strictParsing;
bool crossOriginCSS = false;
bool validMIMEType = false;
@@ -297,7 +296,7 @@ void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL,
// Check to see if we should enforce the MIME type of the CSS resource in strict mode.
// Running in iWeb 2 is one example of where we don't want to - <rdar://problem/6099748>
- if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInStrictMode())
+ if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInNoQuirksMode())
enforceMIMEType = false;
#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
diff --git a/WebCore/html/HTMLLinkElement.idl b/WebCore/html/HTMLLinkElement.idl
index dfec24b..734e8cc 100644
--- a/WebCore/html/HTMLLinkElement.idl
+++ b/WebCore/html/HTMLLinkElement.idl
@@ -23,7 +23,7 @@ module html {
interface HTMLLinkElement : HTMLElement {
attribute [Reflect] boolean disabled;
attribute [Reflect] DOMString charset;
- attribute [Reflect,URL] DOMString href;
+ attribute [Reflect, URL] DOMString href;
attribute [Reflect] DOMString hreflang;
attribute [Reflect] DOMString media;
attribute [Reflect] DOMString rel;
diff --git a/WebCore/html/HTMLMediaElement.cpp b/WebCore/html/HTMLMediaElement.cpp
index 751735d..bc7960c 100644
--- a/WebCore/html/HTMLMediaElement.cpp
+++ b/WebCore/html/HTMLMediaElement.cpp
@@ -37,7 +37,6 @@
#include "ClientRect.h"
#include "ClientRectList.h"
#include "ContentType.h"
-#include "DocLoader.h"
#include "Event.h"
#include "EventNames.h"
#include "ExceptionCode.h"
@@ -112,7 +111,8 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc)
, m_processingMediaPlayerCallback(0)
, m_playing(false)
, m_isWaitingUntilMediaCanStart(false)
- , m_delayingTheLoadEvent(false)
+ , m_shouldDelayLoadEvent(false)
+ , m_isWaitingToDecrementLoadEventDelayCount(false)
, m_haveFiredLoadedData(false)
, m_inActiveDocument(true)
, m_autoplaying(true)
@@ -140,6 +140,7 @@ HTMLMediaElement::~HTMLMediaElement()
{
if (m_isWaitingUntilMediaCanStart)
document()->removeMediaCanStartListener(this);
+ setShouldDelayLoadEvent(false);
document()->unregisterForDocumentActivationCallbacks(this);
document()->unregisterForMediaVolumeCallbacks(this);
}
@@ -148,6 +149,7 @@ void HTMLMediaElement::willMoveToNewOwnerDocument()
{
if (m_isWaitingUntilMediaCanStart)
document()->removeMediaCanStartListener(this);
+ setShouldDelayLoadEvent(false);
document()->unregisterForDocumentActivationCallbacks(this);
document()->unregisterForMediaVolumeCallbacks(this);
HTMLElement::willMoveToNewOwnerDocument();
@@ -157,6 +159,8 @@ void HTMLMediaElement::didMoveToNewOwnerDocument()
{
if (m_isWaitingUntilMediaCanStart)
document()->addMediaCanStartListener(this);
+ if (m_readyState < HAVE_CURRENT_DATA)
+ setShouldDelayLoadEvent(true);
document()->registerForDocumentActivationCallbacks(this);
document()->registerForMediaVolumeCallbacks(this);
HTMLElement::didMoveToNewOwnerDocument();
@@ -368,6 +372,15 @@ void HTMLMediaElement::scheduleEvent(const AtomicString& eventName)
void HTMLMediaElement::asyncEventTimerFired(Timer<HTMLMediaElement>*)
{
+ // If we are waiting to release our delay on the load event, do that first and post
+ // the pending events on the next go around.
+ if (m_isWaitingToDecrementLoadEventDelayCount) {
+ setShouldDelayLoadEvent(false);
+ if (!m_asyncEventTimer.isActive())
+ m_asyncEventTimer.startOneShot(0);
+ return;
+ }
+
Vector<RefPtr<Event> > pendingEvents;
ExceptionCode ec = 0;
@@ -541,6 +554,11 @@ void HTMLMediaElement::prepareForLoad()
m_playedTimeRanges = TimeRanges::create();
m_lastSeekTime = 0;
m_closedCaptionsVisible = false;
+
+ // The spec doesn't say to block the load event until we actually run the asynchronous section
+ // algorithm, but do it now because we won't start that until after the timer fires and the
+ // event may have already fired by then.
+ setShouldDelayLoadEvent(true);
}
void HTMLMediaElement::loadInternal()
@@ -574,18 +592,19 @@ void HTMLMediaElement::selectMediaResource()
if (!node) {
m_loadState = WaitingForSource;
+ setShouldDelayLoadEvent(false);
// ... set the networkState to NETWORK_EMPTY, and abort these steps
m_networkState = NETWORK_EMPTY;
- ASSERT(!m_delayingTheLoadEvent);
return;
}
mode = children;
}
- // 4
- m_delayingTheLoadEvent = true;
+ // 4 - Set the media element's delaying-the-load-event flag to true (this delays the load event),
+ // and set its networkState to NETWORK_LOADING.
+ setShouldDelayLoadEvent(true);
m_networkState = NETWORK_LOADING;
// 5
@@ -715,7 +734,7 @@ void HTMLMediaElement::waitForSourceChange()
m_networkState = NETWORK_NO_SOURCE;
// 6.18 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
- m_delayingTheLoadEvent = false;
+ setShouldDelayLoadEvent(false);
}
void HTMLMediaElement::noneSupported()
@@ -738,7 +757,7 @@ void HTMLMediaElement::noneSupported()
scheduleEvent(eventNames().errorEvent);
// 8 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
- m_delayingTheLoadEvent = false;
+ setShouldDelayLoadEvent(false);
// 9 -Abort these steps. Until the load() method is invoked, the element won't attempt to load another resource.
@@ -758,8 +777,7 @@ void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err)
// set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE.
m_error = err;
- // 3 - Queue a task to fire a progress event called error at the media element, in
- // the context of the fetching process started by this instance of this algorithm.
+ // 3 - Queue a task to fire a simple event named error at the media element.
scheduleEvent(eventNames().errorEvent);
// 4 - Set the element's networkState attribute to the NETWORK_EMPTY value and queue a
@@ -768,7 +786,7 @@ void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err)
scheduleEvent(eventNames().emptiedEvent);
// 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
- m_delayingTheLoadEvent = false;
+ setShouldDelayLoadEvent(false);
// 6 - Abort the overall resource selection algorithm.
m_currentSourceNode = 0;
@@ -915,21 +933,16 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state)
scheduleEvent(eventNames().loadedmetadataEvent);
if (renderer())
renderer()->updateFromElement();
- m_delayingTheLoadEvent = false;
m_player->seek(0);
}
bool shouldUpdateDisplayState = false;
- // 4.8.10.7 says loadeddata is sent only when the new state *is* HAVE_CURRENT_DATA: "If the
- // previous ready state was HAVE_METADATA and the new ready state is HAVE_CURRENT_DATA",
- // but the event table at the end of the spec says it is sent when: "readyState newly
- // increased to HAVE_CURRENT_DATA or greater for the first time"
- // We go with the later because it seems useful to count on getting this event
if (m_readyState >= HAVE_CURRENT_DATA && oldState < HAVE_CURRENT_DATA && !m_haveFiredLoadedData) {
m_haveFiredLoadedData = true;
shouldUpdateDisplayState = true;
scheduleEvent(eventNames().loadeddataEvent);
+ setShouldDelayLoadEvent(false);
}
bool isPotentiallyPlaying = potentiallyPlaying();
@@ -1818,13 +1831,12 @@ void HTMLMediaElement::userCancelledLoad()
// 2 - Set the error attribute to a new MediaError object whose code attribute is set to MEDIA_ERR_ABORTED.
m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED);
- // 3 - Queue a task to fire a progress event called abort at the media element, in the context
- // of the fetching process started by this instance of this algorithm.
+ // 3 - Queue a task to fire a simple event named error at the media element.
scheduleEvent(eventNames().abortEvent);
- // 5 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the
- // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a
- // simple event called emptied at the element. Otherwise, set set the element's networkState
+ // 4 - If the media element's readyState attribute has a value equal to HAVE_NOTHING, set the
+ // element's networkState attribute to the NETWORK_EMPTY value and queue a task to fire a
+ // simple event named emptied at the element. Otherwise, set the element's networkState
// attribute to the NETWORK_IDLE value.
if (m_readyState == HAVE_NOTHING) {
m_networkState = NETWORK_EMPTY;
@@ -1833,10 +1845,10 @@ void HTMLMediaElement::userCancelledLoad()
else
m_networkState = NETWORK_IDLE;
- // 6 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
- m_delayingTheLoadEvent = false;
+ // 5 - Set the element's delaying-the-load-event flag to false. This stops delaying the load event.
+ setShouldDelayLoadEvent(false);
- // 7 - Abort the overall resource selection algorithm.
+ // 6 - Abort the overall resource selection algorithm.
m_currentSourceNode = 0;
// Reset m_readyState since m_player is gone.
@@ -2087,6 +2099,33 @@ bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const
return attribute->name() == srcAttr;
}
+void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay)
+{
+ if (m_shouldDelayLoadEvent == shouldDelay)
+ return;
+
+ // Don't decrement the load event delay if we are in the middle of a callback from
+ // the media engine. The load event is sent synchronously and may trigger a script that
+ // causes the document to be come inactive and that will clear the media engine, causing
+ // the return to be a rough one.
+ if (!shouldDelay && processingMediaPlayerCallback()) {
+ m_isWaitingToDecrementLoadEventDelayCount = true;
+
+ // Instead of creating yet-another-timer, reuse the async event timer which is always
+ // used as a one-shot.
+ if (!m_asyncEventTimer.isActive())
+ m_asyncEventTimer.startOneShot(0);
+ return;
+ }
+
+ m_shouldDelayLoadEvent = shouldDelay;
+ m_isWaitingToDecrementLoadEventDelayCount = false;
+ if (shouldDelay)
+ document()->incrementLoadEventDelayCount();
+ else
+ document()->decrementLoadEventDelayCount();
+}
+
}
#endif
diff --git a/WebCore/html/HTMLMediaElement.h b/WebCore/html/HTMLMediaElement.h
index 4706178..3895fe3 100644
--- a/WebCore/html/HTMLMediaElement.h
+++ b/WebCore/html/HTMLMediaElement.h
@@ -280,6 +280,8 @@ private:
virtual void mediaCanStart();
+ void setShouldDelayLoadEvent(bool);
+
// Restrictions to change default behaviors. This is effectively a compile time choice at the moment
// because there are no accessor functions.
enum BehaviorRestrictions {
@@ -339,7 +341,8 @@ private:
bool m_playing : 1;
bool m_isWaitingUntilMediaCanStart : 1;
- bool m_delayingTheLoadEvent : 1;
+ bool m_shouldDelayLoadEvent : 1;
+ bool m_isWaitingToDecrementLoadEventDelayCount : 1;
bool m_haveFiredLoadedData : 1;
bool m_inActiveDocument : 1;
bool m_autoplaying : 1;
diff --git a/WebCore/html/HTMLMediaElement.idl b/WebCore/html/HTMLMediaElement.idl
index 12a1464..d6ba79d 100644
--- a/WebCore/html/HTMLMediaElement.idl
+++ b/WebCore/html/HTMLMediaElement.idl
@@ -30,7 +30,7 @@ interface [Conditional=VIDEO] HTMLMediaElement : HTMLElement {
readonly attribute MediaError error;
// network state
- attribute [Reflect,URL] DOMString src;
+ attribute [Reflect, URL] DOMString src;
readonly attribute DOMString currentSrc;
const unsigned short NETWORK_EMPTY = 0;
diff --git a/WebCore/html/HTMLModElement.cpp b/WebCore/html/HTMLModElement.cpp
index ab161d9..2d409b0 100644
--- a/WebCore/html/HTMLModElement.cpp
+++ b/WebCore/html/HTMLModElement.cpp
@@ -39,4 +39,9 @@ PassRefPtr<HTMLModElement> HTMLModElement::create(const QualifiedName& tagName,
return adoptRef(new HTMLModElement(tagName, document));
}
+bool HTMLModElement::isURLAttribute(Attribute* attribute) const
+{
+ return attribute->name() == citeAttr;
+}
+
}
diff --git a/WebCore/html/HTMLModElement.h b/WebCore/html/HTMLModElement.h
index 2b09e21..cdb6dce 100644
--- a/WebCore/html/HTMLModElement.h
+++ b/WebCore/html/HTMLModElement.h
@@ -34,6 +34,8 @@ public:
private:
HTMLModElement(const QualifiedName&, Document*);
+
+ virtual bool isURLAttribute(Attribute*) const;
};
} //namespace
diff --git a/WebCore/html/HTMLModElement.idl b/WebCore/html/HTMLModElement.idl
index e9e996d..ad8281c 100644
--- a/WebCore/html/HTMLModElement.idl
+++ b/WebCore/html/HTMLModElement.idl
@@ -20,7 +20,7 @@
module html {
interface HTMLModElement : HTMLElement {
- attribute [Reflect] DOMString cite;
+ attribute [Reflect, URL] DOMString cite;
attribute [Reflect] DOMString dateTime;
};
diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp
index de1ed91..e8884ef 100644
--- a/WebCore/html/HTMLObjectElement.cpp
+++ b/WebCore/html/HTMLObjectElement.cpp
@@ -46,9 +46,8 @@ namespace WebCore {
using namespace HTMLNames;
inline HTMLObjectElement::HTMLObjectElement(const QualifiedName& tagName, Document* document, bool createdByParser)
- : HTMLPlugInImageElement(tagName, document)
+ : HTMLPlugInImageElement(tagName, document, createdByParser)
, m_docNamedItem(true)
- , m_needWidgetUpdate(!createdByParser)
, m_useFallbackContent(false)
{
ASSERT(hasTagName(objectTag));
@@ -62,37 +61,34 @@ PassRefPtr<HTMLObjectElement> HTMLObjectElement::create(const QualifiedName& tag
RenderWidget* HTMLObjectElement::renderWidgetForJSBindings() const
{
document()->updateLayoutIgnorePendingStylesheets();
- if (!renderer() || !renderer()->isWidget())
- return 0;
- return toRenderWidget(renderer());
+ return renderPart(); // This will return 0 if the renderer is not a RenderPart.
}
void HTMLObjectElement::parseMappedAttribute(Attribute* attr)
{
- String val = attr->value();
- size_t pos;
if (attr->name() == typeAttr) {
- m_serviceType = val.lower();
- pos = m_serviceType.find(";");
+ m_serviceType = attr->value().lower();
+ size_t pos = m_serviceType.find(";");
if (pos != notFound)
- m_serviceType = m_serviceType.left(pos);
+ m_serviceType = m_serviceType.left(pos);
if (renderer())
- m_needWidgetUpdate = true;
+ setNeedsWidgetUpdate(true);
if (!isImageType() && m_imageLoader)
- m_imageLoader.clear();
+ m_imageLoader.clear();
} else if (attr->name() == dataAttr) {
- m_url = deprecatedParseURL(val);
- if (renderer())
- m_needWidgetUpdate = true;
- if (renderer() && isImageType()) {
- if (!m_imageLoader)
- m_imageLoader = adoptPtr(new HTMLImageLoader(this));
- m_imageLoader->updateFromElementIgnoringPreviousError();
+ m_url = deprecatedParseURL(attr->value());
+ if (renderer()) {
+ setNeedsWidgetUpdate(true);
+ if (isImageType()) {
+ if (!m_imageLoader)
+ m_imageLoader = adoptPtr(new HTMLImageLoader(this));
+ m_imageLoader->updateFromElementIgnoringPreviousError();
+ }
}
} else if (attr->name() == classidAttr) {
- m_classId = val;
+ m_classId = attr->value();
if (renderer())
- m_needWidgetUpdate = true;
+ setNeedsWidgetUpdate(true);
} else if (attr->name() == onloadAttr)
setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
else if (attr->name() == onbeforeloadAttr)
@@ -114,13 +110,14 @@ void HTMLObjectElement::parseMappedAttribute(Attribute* attr)
}
m_id = newId;
// also call superclass
- HTMLPlugInElement::parseMappedAttribute(attr);
+ HTMLPlugInImageElement::parseMappedAttribute(attr);
} else
- HTMLPlugInElement::parseMappedAttribute(attr);
+ HTMLPlugInImageElement::parseMappedAttribute(attr);
}
bool HTMLObjectElement::rendererIsNeeded(RenderStyle* style)
{
+ // FIXME: This check should not be needed, detached documents never render!
Frame* frame = document()->frame();
if (!frame)
return false;
@@ -129,57 +126,7 @@ bool HTMLObjectElement::rendererIsNeeded(RenderStyle* style)
// Gears expects the plugin to be instantiated even if display:none is set
// for the object element.
bool isGearsPlugin = equalIgnoringCase(getAttribute(typeAttr), "application/x-googlegears");
- return isGearsPlugin || HTMLPlugInElement::rendererIsNeeded(style);
-}
-
-RenderObject *HTMLObjectElement::createRenderer(RenderArena* arena, RenderStyle* style)
-{
- if (m_useFallbackContent)
- return RenderObject::createObject(this, style);
- if (isImageType())
- return new (arena) RenderImage(this);
- return new (arena) RenderEmbeddedObject(this);
-}
-
-void HTMLObjectElement::attach()
-{
- bool isImage = isImageType();
-
- if (!isImage)
- queuePostAttachCallback(&HTMLPlugInElement::updateWidgetCallback, this);
-
- HTMLPlugInElement::attach();
-
- if (isImage && renderer() && !m_useFallbackContent) {
- if (!m_imageLoader)
- m_imageLoader = adoptPtr(new HTMLImageLoader(this));
- m_imageLoader->updateFromElement();
- }
-}
-
-void HTMLObjectElement::updateWidget()
-{
- document()->updateStyleIfNeeded();
- if (m_needWidgetUpdate && renderer() && !m_useFallbackContent && !isImageType())
- toRenderEmbeddedObject(renderer())->updateWidget(true);
-}
-
-void HTMLObjectElement::finishParsingChildren()
-{
- HTMLPlugInElement::finishParsingChildren();
- if (!m_useFallbackContent) {
- m_needWidgetUpdate = true;
- if (inDocument())
- setNeedsStyleRecalc();
- }
-}
-
-void HTMLObjectElement::detach()
-{
- if (attached() && renderer() && !m_useFallbackContent)
- // Update the widget the next time we attach (detaching destroys the plugin).
- m_needWidgetUpdate = true;
- HTMLPlugInElement::detach();
+ return isGearsPlugin || HTMLPlugInImageElement::rendererIsNeeded(style);
}
void HTMLObjectElement::insertedIntoDocument()
@@ -190,7 +137,7 @@ void HTMLObjectElement::insertedIntoDocument()
document->addExtraNamedItem(m_id);
}
- HTMLPlugInElement::insertedIntoDocument();
+ HTMLPlugInImageElement::insertedIntoDocument();
}
void HTMLObjectElement::removedFromDocument()
@@ -201,26 +148,17 @@ void HTMLObjectElement::removedFromDocument()
document->removeExtraNamedItem(m_id);
}
- HTMLPlugInElement::removedFromDocument();
-}
-
-void HTMLObjectElement::recalcStyle(StyleChange ch)
-{
- if (!m_useFallbackContent && m_needWidgetUpdate && renderer() && !isImageType()) {
- detach();
- attach();
- }
- HTMLPlugInElement::recalcStyle(ch);
+ HTMLPlugInImageElement::removedFromDocument();
}
void HTMLObjectElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
updateDocNamedItem();
- if (inDocument() && !m_useFallbackContent) {
- m_needWidgetUpdate = true;
+ if (inDocument() && !useFallbackContent()) {
+ setNeedsWidgetUpdate(true);
setNeedsStyleRecalc();
}
- HTMLPlugInElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+ HTMLPlugInImageElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
}
bool HTMLObjectElement::isURLAttribute(Attribute *attr) const
@@ -235,7 +173,7 @@ const QualifiedName& HTMLObjectElement::imageSourceAttributeName() const
void HTMLObjectElement::renderFallbackContent()
{
- if (m_useFallbackContent)
+ if (useFallbackContent())
return;
if (!inDocument())
@@ -253,10 +191,8 @@ void HTMLObjectElement::renderFallbackContent()
}
}
- // Mark ourselves as using the fallback content.
m_useFallbackContent = true;
- // Now do a detach and reattach.
// FIXME: Style gets recalculated which is suboptimal.
detach();
attach();
diff --git a/WebCore/html/HTMLObjectElement.h b/WebCore/html/HTMLObjectElement.h
index 8dc59be..9fafae9 100644
--- a/WebCore/html/HTMLObjectElement.h
+++ b/WebCore/html/HTMLObjectElement.h
@@ -31,8 +31,6 @@ class HTMLObjectElement : public HTMLPlugInImageElement {
public:
static PassRefPtr<HTMLObjectElement> create(const QualifiedName&, Document*, bool createdByParser);
- void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
-
void renderFallbackContent();
bool isDocNamedItem() const { return m_docNamedItem; }
@@ -41,28 +39,22 @@ public:
bool containsJavaApplet() const;
+ virtual bool useFallbackContent() const { return m_useFallbackContent; }
+
private:
HTMLObjectElement(const QualifiedName&, Document*, bool createdByParser);
virtual void parseMappedAttribute(Attribute*);
- virtual void attach();
- virtual bool canLazyAttach() { return false; }
virtual bool rendererIsNeeded(RenderStyle*);
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- virtual void finishParsingChildren();
- virtual void detach();
virtual void insertedIntoDocument();
virtual void removedFromDocument();
- virtual void recalcStyle(StyleChange);
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual bool isURLAttribute(Attribute*) const;
virtual const QualifiedName& imageSourceAttributeName() const;
- virtual void updateWidget();
-
virtual RenderWidget* renderWidgetForJSBindings() const;
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
@@ -72,7 +64,6 @@ private:
AtomicString m_id;
String m_classId;
bool m_docNamedItem : 1;
- bool m_needWidgetUpdate : 1;
bool m_useFallbackContent : 1;
};
diff --git a/WebCore/html/HTMLObjectElement.idl b/WebCore/html/HTMLObjectElement.idl
index e4d85b3..82801ae 100644
--- a/WebCore/html/HTMLObjectElement.idl
+++ b/WebCore/html/HTMLObjectElement.idl
@@ -32,7 +32,7 @@ module html {
attribute [Reflect] DOMString border;
attribute [Reflect] DOMString codeBase;
attribute [Reflect] DOMString codeType;
- attribute [Reflect,URL] DOMString data;
+ attribute [Reflect, URL] DOMString data;
attribute [Reflect] boolean declare;
attribute [Reflect] DOMString height;
attribute [Reflect] long hspace;
diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp
index 9f479fb..88642f7 100644
--- a/WebCore/html/HTMLPlugInElement.cpp
+++ b/WebCore/html/HTMLPlugInElement.cpp
@@ -177,6 +177,7 @@ NPObject* HTMLPlugInElement::getNPObject()
#endif /* ENABLE(NETSCAPE_PLUGIN_API) */
+<<<<<<< HEAD
void HTMLPlugInElement::updateWidgetCallback(Node* n)
{
static_cast<HTMLPlugInElement*>(n)->updateWidget();
@@ -189,4 +190,6 @@ bool HTMLPlugInElement::supportsFocus() const
}
#endif
+=======
+>>>>>>> webkit.org at r66666
}
diff --git a/WebCore/html/HTMLPlugInElement.h b/WebCore/html/HTMLPlugInElement.h
index eadf38a..5467177 100644
--- a/WebCore/html/HTMLPlugInElement.h
+++ b/WebCore/html/HTMLPlugInElement.h
@@ -32,6 +32,7 @@ struct NPObject;
namespace WebCore {
+class RenderEmbeddedObject;
class RenderWidget;
class Widget;
@@ -55,8 +56,6 @@ protected:
virtual void detach();
- static void updateWidgetCallback(Node*);
-
virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const;
virtual void parseMappedAttribute(Attribute*);
@@ -71,8 +70,6 @@ private:
virtual RenderWidget* renderWidgetForJSBindings() const = 0;
- virtual void updateWidget() { }
-
protected:
AtomicString m_name;
diff --git a/WebCore/html/HTMLPlugInImageElement.cpp b/WebCore/html/HTMLPlugInImageElement.cpp
index e2898a2..75407dd 100644
--- a/WebCore/html/HTMLPlugInImageElement.cpp
+++ b/WebCore/html/HTMLPlugInImageElement.cpp
@@ -26,14 +26,30 @@
#include "FrameLoaderClient.h"
#include "HTMLImageLoader.h"
#include "Image.h"
+#include "RenderEmbeddedObject.h"
+#include "RenderImage.h"
namespace WebCore {
-HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document)
+HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser)
: HTMLPlugInElement(tagName, document)
+ // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay
+ // widget updates until after all children are parsed. For HTMLEmbedElement
+ // this delay is unnecessary, but it is simpler to make both classes share
+ // the same codepath in this class.
+ , m_needsWidgetUpdate(!createdByParser)
{
}
+RenderEmbeddedObject* HTMLPlugInImageElement::renderEmbeddedObject() const
+{
+ // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
+ // when using fallback content.
+ if (!renderer() || !renderer()->isEmbeddedObject())
+ return 0;
+ return toRenderEmbeddedObject(renderer());
+}
+
bool HTMLPlugInImageElement::isImageType()
{
if (m_serviceType.isEmpty() && protocolIs(m_url, "data"))
@@ -47,6 +63,76 @@ bool HTMLPlugInImageElement::isImageType()
return Image::supportsType(m_serviceType);
}
+RenderObject* HTMLPlugInImageElement::createRenderer(RenderArena* arena, RenderStyle* style)
+{
+ // Fallback content breaks the DOM->Renderer class relationship of this
+ // class and all superclasses because createObject won't necessarily
+ // return a RenderEmbeddedObject, RenderPart or even RenderWidget.
+ if (useFallbackContent())
+ return RenderObject::createObject(this, style);
+ if (isImageType()) {
+ RenderImage* image = new (arena) RenderImage(this);
+ image->setImageResource(RenderImageResource::create());
+ return image;
+ }
+ return new (arena) RenderEmbeddedObject(this);
+}
+
+void HTMLPlugInImageElement::recalcStyle(StyleChange ch)
+{
+ // FIXME: Why is this necessary? Manual re-attach is almost always wrong.
+ if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageType()) {
+ detach();
+ attach();
+ }
+ HTMLPlugInElement::recalcStyle(ch);
+}
+
+void HTMLPlugInImageElement::attach()
+{
+ bool isImage = isImageType();
+
+ if (!isImage)
+ queuePostAttachCallback(&HTMLPlugInImageElement::updateWidgetCallback, this);
+
+ HTMLPlugInElement::attach();
+
+ if (isImage && renderer() && !useFallbackContent()) {
+ if (!m_imageLoader)
+ m_imageLoader = adoptPtr(new HTMLImageLoader(this));
+ m_imageLoader->updateFromElement();
+ }
+}
+
+void HTMLPlugInImageElement::detach()
+{
+ // FIXME: Because of the insanity that is HTMLObjectElement::recalcStyle,
+ // we can end up detaching during an attach() call, before we even have a
+ // renderer. In that case, don't mark the widget for update.
+ if (attached() && renderer() && !useFallbackContent())
+ // Update the widget the next time we attach (detaching destroys the plugin).
+ setNeedsWidgetUpdate(true);
+ HTMLPlugInElement::detach();
+}
+
+void HTMLPlugInImageElement::updateWidget()
+{
+ document()->updateStyleIfNeeded();
+ if (needsWidgetUpdate() && renderEmbeddedObject() && !useFallbackContent() && !isImageType())
+ renderEmbeddedObject()->updateWidget(true);
+}
+
+void HTMLPlugInImageElement::finishParsingChildren()
+{
+ HTMLPlugInElement::finishParsingChildren();
+ if (useFallbackContent())
+ return;
+
+ setNeedsWidgetUpdate(true);
+ if (inDocument())
+ setNeedsStyleRecalc();
+}
+
void HTMLPlugInImageElement::willMoveToNewOwnerDocument()
{
if (m_imageLoader)
@@ -54,4 +140,9 @@ void HTMLPlugInImageElement::willMoveToNewOwnerDocument()
HTMLPlugInElement::willMoveToNewOwnerDocument();
}
+void HTMLPlugInImageElement::updateWidgetCallback(Node* n)
+{
+ static_cast<HTMLPlugInImageElement*>(n)->updateWidget();
+}
+
} // namespace WebCore
diff --git a/WebCore/html/HTMLPlugInImageElement.h b/WebCore/html/HTMLPlugInImageElement.h
index 6f8d305..65c5f37 100644
--- a/WebCore/html/HTMLPlugInImageElement.h
+++ b/WebCore/html/HTMLPlugInImageElement.h
@@ -28,22 +28,42 @@ namespace WebCore {
class HTMLImageLoader;
+// Base class for HTMLObjectElement and HTMLEmbedElement
class HTMLPlugInImageElement : public HTMLPlugInElement {
public:
const String& serviceType() const { return m_serviceType; }
const String& url() const { return m_url; }
+ bool needsWidgetUpdate() const { return m_needsWidgetUpdate; }
+ void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; }
+
+ RenderEmbeddedObject* renderEmbeddedObject() const;
+
protected:
- HTMLPlugInImageElement(const QualifiedName& tagName, Document*);
+ HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser);
bool isImageType();
OwnPtr<HTMLImageLoader> m_imageLoader;
String m_serviceType;
String m_url;
+
+ static void updateWidgetCallback(Node*);
+ virtual void attach();
+ virtual void detach();
private:
+ virtual bool canLazyAttach() { return false; }
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual void recalcStyle(StyleChange);
+
+ virtual void finishParsingChildren();
virtual void willMoveToNewOwnerDocument();
+
+ void updateWidget();
+ virtual bool useFallbackContent() const { return false; }
+
+ bool m_needsWidgetUpdate;
};
} // namespace WebCore
diff --git a/WebCore/html/HTMLQuoteElement.cpp b/WebCore/html/HTMLQuoteElement.cpp
index 2a2440a..a58a504 100644
--- a/WebCore/html/HTMLQuoteElement.cpp
+++ b/WebCore/html/HTMLQuoteElement.cpp
@@ -48,4 +48,9 @@ void HTMLQuoteElement::insertedIntoDocument()
HTMLElement::insertedIntoDocument();
}
+bool HTMLQuoteElement::isURLAttribute(Attribute* attribute) const
+{
+ return attribute->name() == citeAttr;
+}
+
}
diff --git a/WebCore/html/HTMLQuoteElement.h b/WebCore/html/HTMLQuoteElement.h
index 225dde8..d378de4 100644
--- a/WebCore/html/HTMLQuoteElement.h
+++ b/WebCore/html/HTMLQuoteElement.h
@@ -37,6 +37,7 @@ private:
HTMLQuoteElement(const QualifiedName&, Document*);
virtual void insertedIntoDocument();
+ virtual bool isURLAttribute(Attribute*) const;
};
} //namespace
diff --git a/WebCore/html/HTMLQuoteElement.idl b/WebCore/html/HTMLQuoteElement.idl
index a4e6005..fa1bcdb 100644
--- a/WebCore/html/HTMLQuoteElement.idl
+++ b/WebCore/html/HTMLQuoteElement.idl
@@ -20,6 +20,6 @@
module html {
interface HTMLQuoteElement : HTMLElement {
- attribute [Reflect] DOMString cite;
+ attribute [Reflect, URL] DOMString cite;
};
}
diff --git a/WebCore/html/HTMLScriptElement.idl b/WebCore/html/HTMLScriptElement.idl
index 6b7c86d..20b7331 100644
--- a/WebCore/html/HTMLScriptElement.idl
+++ b/WebCore/html/HTMLScriptElement.idl
@@ -26,7 +26,7 @@ module html {
attribute [Reflect] DOMString charset;
attribute [Reflect] boolean async;
attribute [Reflect] boolean defer;
- attribute [Reflect,URL] DOMString src;
+ attribute [Reflect, URL] DOMString src;
attribute [Reflect] DOMString type;
};
}
diff --git a/WebCore/html/HTMLSourceElement.idl b/WebCore/html/HTMLSourceElement.idl
index 61dc4d0..dbd6d6a 100644
--- a/WebCore/html/HTMLSourceElement.idl
+++ b/WebCore/html/HTMLSourceElement.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 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
@@ -25,7 +25,7 @@
module html {
interface [Conditional=VIDEO] HTMLSourceElement : HTMLElement {
- attribute [Reflect,URL] DOMString src;
+ attribute [Reflect, URL] DOMString src;
attribute DOMString type;
attribute DOMString media;
};
diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in
index f844fa8..209636d 100644
--- a/WebCore/html/HTMLTagNames.in
+++ b/WebCore/html/HTMLTagNames.in
@@ -43,7 +43,7 @@ div
dl interfaceName=HTMLDListElement
dt interfaceName=HTMLElement
em interfaceName=HTMLElement
-embed
+embed constructorNeedsCreatedByParser
fieldset interfaceName=HTMLFieldSetElement, constructorNeedsFormElement
figcaption interfaceName=HTMLElement
figure interfaceName=HTMLElement
diff --git a/WebCore/html/HTMLTextAreaElement.cpp b/WebCore/html/HTMLTextAreaElement.cpp
index b528c19..3e34844 100644
--- a/WebCore/html/HTMLTextAreaElement.cpp
+++ b/WebCore/html/HTMLTextAreaElement.cpp
@@ -390,16 +390,21 @@ void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionCode& ec)
setAttribute(maxlengthAttr, String::number(newValue));
}
-bool HTMLTextAreaElement::tooLong() const
+bool HTMLTextAreaElement::tooLong(const String& value, NeedsToCheckDirtyFlag check) const
{
// Return false for the default value even if it is longer than maxLength.
- if (!m_isDirty)
+ if (check == CheckDirtyFlag && !m_isDirty)
return false;
int max = maxLength();
if (max < 0)
return false;
- return numGraphemeClusters(value()) > static_cast<unsigned>(max);
+ return numGraphemeClusters(value) > static_cast<unsigned>(max);
+}
+
+bool HTMLTextAreaElement::isValidValue(const String& candidate) const
+{
+ return !valueMissing(candidate) && !tooLong(candidate, IgnoreDirtyFlag);
}
void HTMLTextAreaElement::accessKeyAction(bool)
diff --git a/WebCore/html/HTMLTextAreaElement.h b/WebCore/html/HTMLTextAreaElement.h
index bb0039e..28d0b61 100644
--- a/WebCore/html/HTMLTextAreaElement.h
+++ b/WebCore/html/HTMLTextAreaElement.h
@@ -47,7 +47,9 @@ public:
int textLength() const { return value().length(); }
int maxLength() const;
void setMaxLength(int, ExceptionCode&);
- virtual bool tooLong() const;
+ bool valueMissing(const String& value) const { return isRequiredFormControl() && !disabled() && !readOnly() && value.isEmpty(); }
+ bool tooLong(const String&, NeedsToCheckDirtyFlag) const;
+ bool isValidValue(const String&) const;
void rendererWillBeDestroyed();
@@ -85,8 +87,6 @@ private:
virtual bool isTextFormControl() const { return true; }
- virtual bool valueMissing() const { return isRequiredFormControl() && !disabled() && !readOnly() && value().isEmpty(); }
-
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual void parseMappedAttribute(Attribute*);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/WebCore/html/HTMLVideoElement.cpp b/WebCore/html/HTMLVideoElement.cpp
index cd9c7ec..219bb85 100644
--- a/WebCore/html/HTMLVideoElement.cpp
+++ b/WebCore/html/HTMLVideoElement.cpp
@@ -78,10 +78,8 @@ void HTMLVideoElement::attach()
if (!m_imageLoader)
m_imageLoader = adoptPtr(new HTMLImageLoader(this));
m_imageLoader->updateFromElement();
- if (renderer()) {
- RenderImage* imageRenderer = toRenderImage(renderer());
- imageRenderer->setCachedImage(m_imageLoader->image());
- }
+ if (renderer())
+ toRenderImage(renderer())->imageResource()->setCachedImage(m_imageLoader->image());
}
#endif
}
@@ -111,7 +109,7 @@ void HTMLVideoElement::parseMappedAttribute(Attribute* attr)
if (m_imageLoader)
m_imageLoader.clear();
if (renderer())
- toRenderImage(renderer())->setCachedImage(0);
+ toRenderImage(renderer())->imageResource()->setCachedImage(0);
}
#endif
} else if (attrName == widthAttr)
diff --git a/WebCore/html/HTMLVideoElement.idl b/WebCore/html/HTMLVideoElement.idl
index ca5db5e..770e4b2 100644
--- a/WebCore/html/HTMLVideoElement.idl
+++ b/WebCore/html/HTMLVideoElement.idl
@@ -32,7 +32,7 @@ module html {
attribute [Reflect] unsigned long height;
readonly attribute unsigned long videoWidth;
readonly attribute unsigned long videoHeight;
- attribute [Reflect,URL] DOMString poster;
+ attribute [Reflect, URL] DOMString poster;
readonly attribute boolean webkitSupportsFullscreen;
readonly attribute boolean webkitDisplayingFullscreen;
diff --git a/WebCore/html/HTMLViewSourceDocument.cpp b/WebCore/html/HTMLViewSourceDocument.cpp
index b307ea2..3299b27 100644
--- a/WebCore/html/HTMLViewSourceDocument.cpp
+++ b/WebCore/html/HTMLViewSourceDocument.cpp
@@ -28,6 +28,7 @@
#include "Attribute.h"
#include "DOMImplementation.h"
#include "HTMLAnchorElement.h"
+#include "HTMLBaseElement.h"
#include "HTMLBodyElement.h"
#include "HTMLDivElement.h"
#include "HTMLHtmlElement.h"
@@ -51,6 +52,8 @@ HTMLViewSourceDocument::HTMLViewSourceDocument(Frame* frame, const KURL& url, co
, m_type(mimeType)
{
setUsesBeforeAfterRules(true);
+ setCompatibilityMode(QuirksMode);
+ lockCompatibilityMode();
}
PassRefPtr<DocumentParser> HTMLViewSourceDocument::createParser()
@@ -138,8 +141,7 @@ void HTMLViewSourceDocument::processDoctypeToken(const String& source, HTMLToken
void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& token)
{
- String classNameStr = "webkit-html-tag";
- m_current = addSpanWithClassName(classNameStr);
+ m_current = addSpanWithClassName("webkit-html-tag");
AtomicString tagName(token.name().data(), token.name().size());
@@ -159,11 +161,8 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to
index = addRange(source, index, iter->m_nameRange.m_start - token.startIndex(), "");
index = addRange(source, index, iter->m_nameRange.m_end - token.startIndex(), "webkit-html-attribute-name");
- if (tagName == baseTag && name == hrefAttr) {
- // Catch the href attribute in the base element. It will be used
- // for rendering anchors created by addLink() below.
- setBaseElementURL(KURL(url(), value));
- }
+ if (tagName == baseTag && name == hrefAttr)
+ m_current = addBase(value);
index = addRange(source, index, iter->m_valueRange.m_start - token.startIndex(), "");
@@ -187,7 +186,7 @@ void HTMLViewSourceDocument::processCharacterToken(const String& source, HTMLTok
addText(source, "");
}
-PassRefPtr<Element> HTMLViewSourceDocument::addSpanWithClassName(const String& className)
+PassRefPtr<Element> HTMLViewSourceDocument::addSpanWithClassName(const AtomicString& className)
{
if (m_current == m_tbody) {
addLine(className);
@@ -203,7 +202,7 @@ PassRefPtr<Element> HTMLViewSourceDocument::addSpanWithClassName(const String& c
return span.release();
}
-void HTMLViewSourceDocument::addLine(const String& className)
+void HTMLViewSourceDocument::addLine(const AtomicString& className)
{
// Create a table row.
RefPtr<HTMLTableRowElement> trow = HTMLTableRowElement::create(this);
@@ -241,7 +240,7 @@ void HTMLViewSourceDocument::addLine(const String& className)
}
}
-void HTMLViewSourceDocument::addText(const String& text, const String& className)
+void HTMLViewSourceDocument::addText(const String& text, const AtomicString& className)
{
if (text.isEmpty())
return;
@@ -290,7 +289,18 @@ int HTMLViewSourceDocument::addRange(const String& source, int start, int end, c
return end;
}
-PassRefPtr<Element> HTMLViewSourceDocument::addLink(const String& url, bool isAnchor)
+PassRefPtr<Element> HTMLViewSourceDocument::addBase(const AtomicString& href)
+{
+ RefPtr<HTMLBaseElement> base = HTMLBaseElement::create(baseTag, this);
+ RefPtr<NamedNodeMap> attributeMap = NamedNodeMap::create();
+ attributeMap->addAttribute(Attribute::createMapped(hrefAttr, href));
+ base->setAttributeMap(attributeMap.release());
+ m_current->parserAddChild(base);
+ base->attach();
+ return base.release();
+}
+
+PassRefPtr<Element> HTMLViewSourceDocument::addLink(const AtomicString& url, bool isAnchor)
{
if (m_current == m_tbody)
addLine("webkit-html-tag");
diff --git a/WebCore/html/HTMLViewSourceDocument.h b/WebCore/html/HTMLViewSourceDocument.h
index f459016..445c95b 100644
--- a/WebCore/html/HTMLViewSourceDocument.h
+++ b/WebCore/html/HTMLViewSourceDocument.h
@@ -57,11 +57,12 @@ private:
void processCharacterToken(const String& source, HTMLToken&);
void createContainingTable();
- PassRefPtr<Element> addSpanWithClassName(const String&);
- void addLine(const String& className);
- void addText(const String& text, const String& className);
+ PassRefPtr<Element> addSpanWithClassName(const AtomicString&);
+ void addLine(const AtomicString& className);
+ void addText(const String& text, const AtomicString& className);
int addRange(const String& source, int start, int end, const String& className, bool isLink = false, bool isAnchor = false);
- PassRefPtr<Element> addLink(const String& url, bool isAnchor);
+ PassRefPtr<Element> addLink(const AtomicString& url, bool isAnchor);
+ PassRefPtr<Element> addBase(const AtomicString& href);
String m_type;
RefPtr<Element> m_current;
diff --git a/WebCore/html/ThreadableBlobRegistry.cpp b/WebCore/html/ThreadableBlobRegistry.cpp
deleted file mode 100644
index d92d570..0000000
--- a/WebCore/html/ThreadableBlobRegistry.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "ThreadableBlobRegistry.h"
-
-#include "BlobData.h"
-#include "BlobRegistry.h"
-#include "CrossThreadTask.h"
-#include "NotImplemented.h"
-#include "ScriptExecutionContext.h"
-#include "WorkerContext.h"
-#include "WorkerLoaderProxy.h"
-#include "WorkerThread.h"
-
-namespace WebCore {
-
-static void postTaskToMainThread(ScriptExecutionContext* scriptExecutionContext, PassOwnPtr<ScriptExecutionContext::Task> task)
-{
-#if ENABLE(WORKERS)
- ASSERT(scriptExecutionContext->isWorkerContext());
- WorkerLoaderProxy& proxy = static_cast<WorkerContext*>(scriptExecutionContext)->thread()->workerLoaderProxy();
- proxy.postTaskToLoader(task);
-#else
- notImplemented();
-#endif
-}
-
-static void registerBlobURLTask(ScriptExecutionContext*, const KURL& url, PassOwnPtr<BlobData> blobData)
-{
- blobRegistry().registerBlobURL(url, blobData);
-}
-
-void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext* scriptExecutionContext, const KURL& url, PassOwnPtr<BlobData> blobData)
-{
- if (scriptExecutionContext->isWorkerContext())
- postTaskToMainThread(scriptExecutionContext, createCallbackTask(&registerBlobURLTask, url, blobData));
- else
- registerBlobURLTask(scriptExecutionContext, url, blobData);
-}
-
-static void registerBlobURLFromTask(ScriptExecutionContext*, const KURL& url, const KURL& srcURL)
-{
- blobRegistry().registerBlobURL(url, srcURL);
-}
-
-void ThreadableBlobRegistry::registerBlobURL(ScriptExecutionContext* scriptExecutionContext, const KURL& url, const KURL& srcURL)
-{
- if (scriptExecutionContext->isWorkerContext())
- postTaskToMainThread(scriptExecutionContext, createCallbackTask(&registerBlobURLFromTask, url, srcURL));
- else
- registerBlobURLFromTask(scriptExecutionContext, url, srcURL);
-}
-
-static void unregisterBlobURLTask(ScriptExecutionContext*, const KURL& url)
-{
- blobRegistry().unregisterBlobURL(url);
-}
-
-void ThreadableBlobRegistry::unregisterBlobURL(ScriptExecutionContext* scriptExecutionContext, const KURL& url)
-{
- if (scriptExecutionContext->isWorkerContext())
- postTaskToMainThread(scriptExecutionContext, createCallbackTask(&unregisterBlobURLTask, url));
- else
- unregisterBlobURLTask(scriptExecutionContext, url);
-}
-
-} // namespace WebCore
diff --git a/WebCore/html/ValidityState.cpp b/WebCore/html/ValidityState.cpp
index 0c25dac..f18469e 100644
--- a/WebCore/html/ValidityState.cpp
+++ b/WebCore/html/ValidityState.cpp
@@ -26,21 +26,15 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "HTMLTextAreaElement.h"
#include "HTMLTreeBuilder.h"
-#include "KURL.h"
#include "LocalizedStrings.h"
-#include "RegularExpression.h"
#include <wtf/StdLibExtras.h>
namespace WebCore {
using namespace HTMLNames;
-static const char emailPattern[] =
- "[a-z0-9!#$%&'*+/=?^_`{|}~.-]+" // local part
- "@"
- "[a-z0-9-]+(\\.[a-z0-9-]+)+"; // domain part
-
String ValidityState::validationMessage() const
{
if (!m_control->willValidate())
@@ -72,6 +66,19 @@ void ValidityState::setCustomErrorMessage(const String& message)
m_control->setNeedsValidityCheck();
}
+bool ValidityState::valueMissing() const
+{
+ if (m_control->hasTagName(inputTag)) {
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
+ return input->valueMissing(input->value());
+ }
+ if (m_control->hasTagName(textareaTag)) {
+ HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(m_control);
+ return textArea->valueMissing(textArea->value());
+ }
+ return false;
+}
+
bool ValidityState::typeMismatch() const
{
if (!m_control->hasTagName(inputTag))
@@ -79,53 +86,29 @@ bool ValidityState::typeMismatch() const
HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
String value = input->value();
-
if (value.isEmpty())
return false;
+ return input->typeMismatch(value);
+}
- switch (input->inputType()) {
- case HTMLInputElement::COLOR:
- return !isValidColorString(value);
- case HTMLInputElement::NUMBER:
- return !parseToDoubleForNumberType(value, 0);
- case HTMLInputElement::URL:
- return !KURL(KURL(), value).isValid();
- case HTMLInputElement::EMAIL: {
- if (!input->multiple())
- return !isValidEmailAddress(value);
- Vector<String> addresses;
- value.split(',', addresses);
- for (unsigned i = 0; i < addresses.size(); ++i) {
- if (!isValidEmailAddress(addresses[i]))
- return true;
- }
+bool ValidityState::patternMismatch() const
+{
+ if (!m_control->hasTagName(inputTag))
return false;
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
+ return input->patternMismatch(input->value());
+}
+
+bool ValidityState::tooLong() const
+{
+ if (m_control->hasTagName(inputTag)) {
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
+ return input->tooLong(input->value(), HTMLTextFormControlElement::CheckDirtyFlag);
}
- case HTMLInputElement::DATE:
- case HTMLInputElement::DATETIME:
- case HTMLInputElement::DATETIMELOCAL:
- case HTMLInputElement::MONTH:
- case HTMLInputElement::TIME:
- case HTMLInputElement::WEEK:
- return !HTMLInputElement::parseToDateComponents(input->inputType(), value, 0);
- case HTMLInputElement::BUTTON:
- case HTMLInputElement::CHECKBOX:
- case HTMLInputElement::FILE:
- case HTMLInputElement::HIDDEN:
- case HTMLInputElement::IMAGE:
- case HTMLInputElement::ISINDEX:
- case HTMLInputElement::PASSWORD:
- case HTMLInputElement::RADIO:
- case HTMLInputElement::RANGE:
- case HTMLInputElement::RESET:
- case HTMLInputElement::SEARCH:
- case HTMLInputElement::SUBMIT:
- case HTMLInputElement::TELEPHONE: // FIXME: Is there validation for <input type=telephone>?
- case HTMLInputElement::TEXT:
- return false;
+ if (m_control->hasTagName(textareaTag)) {
+ HTMLTextAreaElement* textArea = static_cast<HTMLTextAreaElement*>(m_control);
+ return textArea->tooLong(textArea->value(), HTMLTextFormControlElement::CheckDirtyFlag);
}
-
- ASSERT_NOT_REACHED();
return false;
}
@@ -133,21 +116,24 @@ bool ValidityState::rangeUnderflow() const
{
if (!m_control->hasTagName(inputTag))
return false;
- return static_cast<HTMLInputElement*>(m_control)->rangeUnderflow();
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
+ return input->rangeUnderflow(input->value());
}
bool ValidityState::rangeOverflow() const
{
if (!m_control->hasTagName(inputTag))
return false;
- return static_cast<HTMLInputElement*>(m_control)->rangeOverflow();
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
+ return input->rangeOverflow(input->value());
}
bool ValidityState::stepMismatch() const
{
if (!m_control->hasTagName(inputTag))
return false;
- return static_cast<HTMLInputElement*>(m_control)->stepMismatch();
+ HTMLInputElement* input = static_cast<HTMLInputElement*>(m_control);
+ return input->stepMismatch(input->value());
}
bool ValidityState::valid() const
@@ -157,31 +143,4 @@ bool ValidityState::valid() const
return !someError;
}
-bool ValidityState::isValidColorString(const String& value)
-{
- if (value.isEmpty())
- return false;
- if (value[0] == '#') {
- // We don't accept #rgb and #aarrggbb formats.
- if (value.length() != 7)
- return false;
- }
- Color color(value); // This accepts named colors such as "white".
- return color.isValid() && !color.hasAlpha();
-}
-
-bool ValidityState::isValidEmailAddress(const String& address)
-{
- int addressLength = address.length();
- if (!addressLength)
- return false;
-
- DEFINE_STATIC_LOCAL(const RegularExpression, regExp, (emailPattern, TextCaseInsensitive));
-
- int matchLength;
- int matchOffset = regExp.match(address, 0, &matchLength);
-
- return matchOffset == 0 && matchLength == addressLength;
-}
-
} // namespace
diff --git a/WebCore/html/ValidityState.h b/WebCore/html/ValidityState.h
index eecb9be..532ddb2 100644
--- a/WebCore/html/ValidityState.h
+++ b/WebCore/html/ValidityState.h
@@ -43,10 +43,10 @@ public:
void setCustomErrorMessage(const String&);
- bool valueMissing() const { return m_control->valueMissing(); }
+ bool valueMissing() const;
bool typeMismatch() const;
- bool patternMismatch() const { return m_control->patternMismatch(); }
- bool tooLong() const { return m_control->tooLong(); }
+ bool patternMismatch() const;
+ bool tooLong() const;
bool rangeUnderflow() const;
bool rangeOverflow() const;
bool stepMismatch() const;
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 2a7b96a..6df6abf 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -804,8 +804,8 @@ void CanvasRenderingContext2D::fill()
if (!m_path.isEmpty()) {
c->beginPath();
c->addPath(m_path);
- willDraw(m_path.boundingRect());
c->fillPath();
+ didDraw(m_path.boundingRect());
}
#if ENABLE(DASHBOARD_SUPPORT)
@@ -835,9 +835,8 @@ void CanvasRenderingContext2D::stroke()
CanvasStrokeStyleApplier strokeApplier(this);
FloatRect boundingRect = m_path.strokeBoundingRect(&strokeApplier);
#endif
- willDraw(boundingRect);
-
c->strokePath();
+ didDraw(boundingRect);
}
#if ENABLE(DASHBOARD_SUPPORT)
@@ -885,8 +884,8 @@ void CanvasRenderingContext2D::clearRect(float x, float y, float width, float he
save();
setAllAttributesToDefault();
- willDraw(rect);
context->clearRect(rect);
+ didDraw(rect);
restore();
}
@@ -909,9 +908,9 @@ void CanvasRenderingContext2D::fillRect(float x, float y, float width, float hei
return;
FloatRect rect(x, y, width, height);
- willDraw(rect);
c->fillRect(rect);
+ didDraw(rect);
}
void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float height)
@@ -939,9 +938,9 @@ void CanvasRenderingContext2D::strokeRect(float x, float y, float width, float h
FloatRect boundingRect = rect;
boundingRect.inflate(lineWidth / 2);
- willDraw(boundingRect);
c->strokeRect(rect, lineWidth);
+ didDraw(boundingRect);
}
#if PLATFORM(CG)
@@ -1198,8 +1197,8 @@ void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRec
FloatRect sourceRect = c->roundToDevicePixels(srcRect);
FloatRect destRect = c->roundToDevicePixels(dstRect);
- willDraw(destRect);
c->drawImage(cachedImage->image(), DeviceColorSpace, destRect, sourceRect, state().m_globalComposite);
+ didDraw(destRect);
}
void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas, float x, float y, ExceptionCode& ec)
@@ -1273,8 +1272,7 @@ void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const
sourceCanvas->makeRenderingResultsAvailable();
c->drawImageBuffer(buffer, 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.
+ didDraw(destRect);
}
#if ENABLE(VIDEO)
@@ -1342,7 +1340,6 @@ void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRec
FloatRect sourceRect = c->roundToDevicePixels(srcRect);
FloatRect destRect = c->roundToDevicePixels(dstRect);
- willDraw(destRect);
c->save();
c->clip(destRect);
@@ -1351,6 +1348,7 @@ void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRec
c->translate(-sourceRect.x(), -sourceRect.y());
video->paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video)));
c->restore();
+ didDraw(destRect);
}
#endif
@@ -1384,8 +1382,8 @@ void CanvasRenderingContext2D::drawImageFromRect(HTMLImageElement* image,
op = CompositeSourceOver;
FloatRect destRect = FloatRect(dx, dy, dw, dh);
- willDraw(destRect);
c->drawImage(cachedImage->image(), DeviceColorSpace, destRect, FloatRect(sx, sy, sw, sh), op);
+ didDraw(destRect);
}
void CanvasRenderingContext2D::setAlpha(float alpha)
@@ -1475,7 +1473,7 @@ PassRefPtr<CanvasPattern> CanvasRenderingContext2D::createPattern(HTMLCanvasElem
return CanvasPattern::create(canvas->copiedImage(), repeatX, repeatY, canvas->originClean());
}
-void CanvasRenderingContext2D::willDraw(const FloatRect& r, unsigned options)
+void CanvasRenderingContext2D::didDraw(const FloatRect& r, unsigned options)
{
GraphicsContext* c = drawingContext();
if (!c)
@@ -1510,7 +1508,7 @@ void CanvasRenderingContext2D::willDraw(const FloatRect& r, unsigned options)
renderBox->layer()->rendererContentChanged();
else
#endif
- canvas()->willDraw(dirtyRect);
+ canvas()->didDraw(dirtyRect);
}
GraphicsContext* CanvasRenderingContext2D::drawingContext() const
@@ -1628,11 +1626,11 @@ void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy,
sourceRect.intersect(IntRect(IntPoint(), buffer->size()));
if (sourceRect.isEmpty())
return;
- willDraw(sourceRect, 0); // ignore transform, shadow and clip
sourceRect.move(-destOffset);
IntPoint destPoint(destOffset.width(), destOffset.height());
buffer->putUnmultipliedImageData(data, sourceRect, destPoint);
+ didDraw(sourceRect, 0); // ignore transform, shadow and clip
}
String CanvasRenderingContext2D::font() const
@@ -1809,14 +1807,6 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
if (!fill)
textRect.inflate(c->strokeThickness() / 2);
- if (fill)
- canvas()->willDraw(textRect);
- else {
- // When stroking text, pointy miters can extend outside of textRect, so we
- // punt and dirty the whole canvas.
- canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
- }
-
#if PLATFORM(CG)
CanvasStyle* drawStyle = fill ? state().m_fillStyle.get() : state().m_strokeStyle.get();
if (drawStyle->canvasGradient() || drawStyle->canvasPattern()) {
@@ -1859,6 +1849,14 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
c->drawBidiText(font, textRun, location);
+ if (fill)
+ canvas()->didDraw(textRect);
+ else {
+ // When stroking text, pointy miters can extend outside of textRect, so we
+ // punt and dirty the whole canvas.
+ canvas()->didDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
+ }
+
#if PLATFORM(QT)
Font::setCodePath(oldCodePath);
#endif
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.h b/WebCore/html/canvas/CanvasRenderingContext2D.h
index f610250..9857344 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.h
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.h
@@ -269,7 +269,7 @@ private:
CanvasWillDrawApplyAll = 0xffffffff
};
- void willDraw(const FloatRect&, unsigned options = CanvasWillDrawApplyAll);
+ void didDraw(const FloatRect&, unsigned options = CanvasWillDrawApplyAll);
GraphicsContext* drawingContext() const;
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 44d3e08..2a1464a 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -29,6 +29,7 @@
#include "WebGLRenderingContext.h"
+#include "CachedImage.h"
#include "CanvasPixelArray.h"
#include "CheckedInt.h"
#include "Console.h"
@@ -86,7 +87,8 @@ private:
PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs)
{
HostWindow* hostWindow = canvas->document()->view()->root()->hostWindow();
- OwnPtr<GraphicsContext3D> context(GraphicsContext3D::create(attrs->attributes(), hostWindow));
+ GraphicsContext3D::Attributes emptyAttributes;
+ OwnPtr<GraphicsContext3D> context(GraphicsContext3D::create(attrs ? attrs->attributes() : emptyAttributes, hostWindow));
if (!context)
return 0;
@@ -152,7 +154,7 @@ void WebGLRenderingContext::markContextChanged()
else {
#endif
if (!m_markedCanvasDirty)
- canvas()->willDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
+ canvas()->didDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
#if USE(ACCELERATED_COMPOSITING)
}
#endif
@@ -309,23 +311,14 @@ void WebGLRenderingContext::bindTexture(unsigned long target, WebGLTexture* text
if (texture)
texture->setTarget(target, maxLevel);
- // FIXME: do we want to do this on all platforms?
-#if PLATFORM(CHROMIUM)
- // FIXME: GL_TEXTURE_WRAP_R isn't exposed in the OpenGL ES 2.0
- // API. On desktop OpenGL implementations it seems necessary to
- // set this wrap mode to GL_CLAMP_TO_EDGE to get correct behavior
- // of cube maps.
- if (texture) {
- if (target == GraphicsContext3D::TEXTURE_CUBE_MAP) {
- if (!texture->isCubeMapRWrapModeInitialized()) {
- static const int textureWrapR = 0x8072;
- texParameteri(GraphicsContext3D::TEXTURE_CUBE_MAP, textureWrapR, GraphicsContext3D::CLAMP_TO_EDGE);
- texture->setCubeMapRWrapModeInitialized(true);
- }
- } else
- texture->setCubeMapRWrapModeInitialized(false);
- }
-#endif
+ // Note: previously we used to automatically set the TEXTURE_WRAP_R
+ // repeat mode to CLAMP_TO_EDGE for cube map textures, because OpenGL
+ // ES 2.0 doesn't expose this flag (a bug in the specification) and
+ // otherwise the application has no control over the seams in this
+ // dimension. However, it appears that supporting this properly on all
+ // platforms is fairly involved (will require a HashMap from texture ID
+ // in all ports), and we have not had any complaints, so the logic has
+ // been removed.
cleanupAfterGraphicsCall(false);
}
diff --git a/WebCore/html/canvas/WebGLTexture.cpp b/WebCore/html/canvas/WebGLTexture.cpp
index 7b2869f..7fc84ad 100644
--- a/WebCore/html/canvas/WebGLTexture.cpp
+++ b/WebCore/html/canvas/WebGLTexture.cpp
@@ -40,7 +40,6 @@ PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext* ctx)
WebGLTexture::WebGLTexture(WebGLRenderingContext* ctx)
: WebGLObject(ctx)
- , cubeMapRWrapModeInitialized(false)
, m_target(0)
, m_minFilter(GraphicsContext3D::NEAREST_MIPMAP_LINEAR)
, m_magFilter(GraphicsContext3D::LINEAR)
diff --git a/WebCore/html/canvas/WebGLTexture.h b/WebCore/html/canvas/WebGLTexture.h
index a1ce348..191957d 100644
--- a/WebCore/html/canvas/WebGLTexture.h
+++ b/WebCore/html/canvas/WebGLTexture.h
@@ -40,16 +40,6 @@ public:
static PassRefPtr<WebGLTexture> create(WebGLRenderingContext*);
- bool isCubeMapRWrapModeInitialized()
- {
- return cubeMapRWrapModeInitialized;
- }
-
- void setCubeMapRWrapModeInitialized(bool initialized)
- {
- cubeMapRWrapModeInitialized = initialized;
- }
-
void setTarget(unsigned long target, int maxLevel);
void setParameteri(unsigned long pname, int param);
void setParameterf(unsigned long pname, float param);
@@ -83,8 +73,6 @@ private:
int mapTargetToIndex(unsigned long);
- bool cubeMapRWrapModeInitialized;
-
unsigned long m_target;
int m_minFilter;
diff --git a/WebCore/html/CSSPreloadScanner.cpp b/WebCore/html/parser/CSSPreloadScanner.cpp
index 729103e..729103e 100644
--- a/WebCore/html/CSSPreloadScanner.cpp
+++ b/WebCore/html/parser/CSSPreloadScanner.cpp
diff --git a/WebCore/html/CSSPreloadScanner.h b/WebCore/html/parser/CSSPreloadScanner.h
index 7ac282f..7ac282f 100644
--- a/WebCore/html/CSSPreloadScanner.h
+++ b/WebCore/html/parser/CSSPreloadScanner.h
diff --git a/WebCore/html/HTMLConstructionSite.cpp b/WebCore/html/parser/HTMLConstructionSite.cpp
index 8735cd2..975b1af 100644
--- a/WebCore/html/HTMLConstructionSite.cpp
+++ b/WebCore/html/parser/HTMLConstructionSite.cpp
@@ -203,10 +203,11 @@ void HTMLConstructionSite::insertDoctype(AtomicHTMLToken& token)
{
ASSERT(token.type() == HTMLToken::DOCTYPE);
attach(m_document, DocumentType::create(m_document, token.name(), String::adopt(token.publicIdentifier()), String::adopt(token.systemIdentifier())));
- // FIXME: Move quirks mode detection from DocumentType element to here.
- notImplemented();
+
if (token.forceQuirks())
- m_document->setParseMode(Document::Compat);
+ m_document->setCompatibilityMode(Document::QuirksMode);
+ else
+ m_document->setCompatibilityModeFromDoctype();
}
void HTMLConstructionSite::insertComment(AtomicHTMLToken& token)
@@ -252,9 +253,13 @@ void HTMLConstructionSite::insertHTMLBodyElement(AtomicHTMLToken& token)
m_openElements.pushHTMLBodyElement(attachToCurrent(createHTMLElement(token)));
}
-void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken& token)
+void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken& token, bool isDemoted)
{
- insertHTMLElement(token);
+ RefPtr<Element> element = createHTMLElement(token);
+ ASSERT(element->hasTagName(formTag));
+ RefPtr<HTMLFormElement> form = static_pointer_cast<HTMLFormElement>(element.release());
+ form->setDemoted(isDemoted);
+ m_openElements.push(attachToCurrent(form.release()));
ASSERT(currentElement()->isHTMLElement());
ASSERT(currentElement()->hasTagName(formTag));
m_form = static_cast<HTMLFormElement*>(currentElement());
diff --git a/WebCore/html/HTMLConstructionSite.h b/WebCore/html/parser/HTMLConstructionSite.h
index 2e746b4..6bed6a7 100644
--- a/WebCore/html/HTMLConstructionSite.h
+++ b/WebCore/html/parser/HTMLConstructionSite.h
@@ -57,7 +57,7 @@ public:
void insertHTMLHtmlElement(AtomicHTMLToken&);
void insertHTMLHeadElement(AtomicHTMLToken&);
void insertHTMLBodyElement(AtomicHTMLToken&);
- void insertHTMLFormElement(AtomicHTMLToken&);
+ void insertHTMLFormElement(AtomicHTMLToken&, bool isDemoted = false);
void insertScriptElement(AtomicHTMLToken&);
void insertTextNode(const String&);
void insertForeignElement(AtomicHTMLToken&, const AtomicString& namespaceURI);
diff --git a/WebCore/html/HTMLDocumentParser.cpp b/WebCore/html/parser/HTMLDocumentParser.cpp
index 0a1208d..0a1208d 100644
--- a/WebCore/html/HTMLDocumentParser.cpp
+++ b/WebCore/html/parser/HTMLDocumentParser.cpp
diff --git a/WebCore/html/HTMLDocumentParser.h b/WebCore/html/parser/HTMLDocumentParser.h
index da21a2b..da21a2b 100644
--- a/WebCore/html/HTMLDocumentParser.h
+++ b/WebCore/html/parser/HTMLDocumentParser.h
diff --git a/WebCore/html/HTMLElementStack.cpp b/WebCore/html/parser/HTMLElementStack.cpp
index b6f4111..b6f4111 100644
--- a/WebCore/html/HTMLElementStack.cpp
+++ b/WebCore/html/parser/HTMLElementStack.cpp
diff --git a/WebCore/html/HTMLElementStack.h b/WebCore/html/parser/HTMLElementStack.h
index 73cfcb1..73cfcb1 100644
--- a/WebCore/html/HTMLElementStack.h
+++ b/WebCore/html/parser/HTMLElementStack.h
diff --git a/WebCore/html/parser/HTMLEntityNames.in b/WebCore/html/parser/HTMLEntityNames.in
new file mode 100644
index 0000000..2d42ab2
--- /dev/null
+++ b/WebCore/html/parser/HTMLEntityNames.in
@@ -0,0 +1,2138 @@
+"AElig;","U+000C6"
+"AElig","U+000C6"
+"AMP;","U+00026"
+"AMP","U+00026"
+"Aacute;","U+000C1"
+"Aacute","U+000C1"
+"Abreve;","U+00102"
+"Acirc;","U+000C2"
+"Acirc","U+000C2"
+"Acy;","U+00410"
+"Afr;","U+1D504"
+"Agrave;","U+000C0"
+"Agrave","U+000C0"
+"Alpha;","U+00391"
+"Amacr;","U+00100"
+"And;","U+02A53"
+"Aogon;","U+00104"
+"Aopf;","U+1D538"
+"ApplyFunction;","U+02061"
+"Aring;","U+000C5"
+"Aring","U+000C5"
+"Ascr;","U+1D49C"
+"Assign;","U+02254"
+"Atilde;","U+000C3"
+"Atilde","U+000C3"
+"Auml;","U+000C4"
+"Auml","U+000C4"
+"Backslash;","U+02216"
+"Barv;","U+02AE7"
+"Barwed;","U+02306"
+"Bcy;","U+00411"
+"Because;","U+02235"
+"Bernoullis;","U+0212C"
+"Beta;","U+00392"
+"Bfr;","U+1D505"
+"Bopf;","U+1D539"
+"Breve;","U+002D8"
+"Bscr;","U+0212C"
+"Bumpeq;","U+0224E"
+"CHcy;","U+00427"
+"COPY;","U+000A9"
+"COPY","U+000A9"
+"Cacute;","U+00106"
+"Cap;","U+022D2"
+"CapitalDifferentialD;","U+02145"
+"Cayleys;","U+0212D"
+"Ccaron;","U+0010C"
+"Ccedil;","U+000C7"
+"Ccedil","U+000C7"
+"Ccirc;","U+00108"
+"Cconint;","U+02230"
+"Cdot;","U+0010A"
+"Cedilla;","U+000B8"
+"CenterDot;","U+000B7"
+"Cfr;","U+0212D"
+"Chi;","U+003A7"
+"CircleDot;","U+02299"
+"CircleMinus;","U+02296"
+"CirclePlus;","U+02295"
+"CircleTimes;","U+02297"
+"ClockwiseContourIntegral;","U+02232"
+"CloseCurlyDoubleQuote;","U+0201D"
+"CloseCurlyQuote;","U+02019"
+"Colon;","U+02237"
+"Colone;","U+02A74"
+"Congruent;","U+02261"
+"Conint;","U+0222F"
+"ContourIntegral;","U+0222E"
+"Copf;","U+02102"
+"Coproduct;","U+02210"
+"CounterClockwiseContourIntegral;","U+02233"
+"Cross;","U+02A2F"
+"Cscr;","U+1D49E"
+"Cup;","U+022D3"
+"CupCap;","U+0224D"
+"DD;","U+02145"
+"DDotrahd;","U+02911"
+"DJcy;","U+00402"
+"DScy;","U+00405"
+"DZcy;","U+0040F"
+"Dagger;","U+02021"
+"Darr;","U+021A1"
+"Dashv;","U+02AE4"
+"Dcaron;","U+0010E"
+"Dcy;","U+00414"
+"Del;","U+02207"
+"Delta;","U+00394"
+"Dfr;","U+1D507"
+"DiacriticalAcute;","U+000B4"
+"DiacriticalDot;","U+002D9"
+"DiacriticalDoubleAcute;","U+002DD"
+"DiacriticalGrave;","U+00060"
+"DiacriticalTilde;","U+002DC"
+"Diamond;","U+022C4"
+"DifferentialD;","U+02146"
+"Dopf;","U+1D53B"
+"Dot;","U+000A8"
+"DotDot;","U+020DC"
+"DotEqual;","U+02250"
+"DoubleContourIntegral;","U+0222F"
+"DoubleDot;","U+000A8"
+"DoubleDownArrow;","U+021D3"
+"DoubleLeftArrow;","U+021D0"
+"DoubleLeftRightArrow;","U+021D4"
+"DoubleLeftTee;","U+02AE4"
+"DoubleLongLeftArrow;","U+027F8"
+"DoubleLongLeftRightArrow;","U+027FA"
+"DoubleLongRightArrow;","U+027F9"
+"DoubleRightArrow;","U+021D2"
+"DoubleRightTee;","U+022A8"
+"DoubleUpArrow;","U+021D1"
+"DoubleUpDownArrow;","U+021D5"
+"DoubleVerticalBar;","U+02225"
+"DownArrow;","U+02193"
+"DownArrowBar;","U+02913"
+"DownArrowUpArrow;","U+021F5"
+"DownBreve;","U+00311"
+"DownLeftRightVector;","U+02950"
+"DownLeftTeeVector;","U+0295E"
+"DownLeftVector;","U+021BD"
+"DownLeftVectorBar;","U+02956"
+"DownRightTeeVector;","U+0295F"
+"DownRightVector;","U+021C1"
+"DownRightVectorBar;","U+02957"
+"DownTee;","U+022A4"
+"DownTeeArrow;","U+021A7"
+"Downarrow;","U+021D3"
+"Dscr;","U+1D49F"
+"Dstrok;","U+00110"
+"ENG;","U+0014A"
+"ETH;","U+000D0"
+"ETH","U+000D0"
+"Eacute;","U+000C9"
+"Eacute","U+000C9"
+"Ecaron;","U+0011A"
+"Ecirc;","U+000CA"
+"Ecirc","U+000CA"
+"Ecy;","U+0042D"
+"Edot;","U+00116"
+"Efr;","U+1D508"
+"Egrave;","U+000C8"
+"Egrave","U+000C8"
+"Element;","U+02208"
+"Emacr;","U+00112"
+"EmptySmallSquare;","U+025FB"
+"EmptyVerySmallSquare;","U+025AB"
+"Eogon;","U+00118"
+"Eopf;","U+1D53C"
+"Epsilon;","U+00395"
+"Equal;","U+02A75"
+"EqualTilde;","U+02242"
+"Equilibrium;","U+021CC"
+"Escr;","U+02130"
+"Esim;","U+02A73"
+"Eta;","U+00397"
+"Euml;","U+000CB"
+"Euml","U+000CB"
+"Exists;","U+02203"
+"ExponentialE;","U+02147"
+"Fcy;","U+00424"
+"Ffr;","U+1D509"
+"FilledSmallSquare;","U+025FC"
+"FilledVerySmallSquare;","U+025AA"
+"Fopf;","U+1D53D"
+"ForAll;","U+02200"
+"Fouriertrf;","U+02131"
+"Fscr;","U+02131"
+"GJcy;","U+00403"
+"GT;","U+0003E"
+"GT","U+0003E"
+"Gamma;","U+00393"
+"Gammad;","U+003DC"
+"Gbreve;","U+0011E"
+"Gcedil;","U+00122"
+"Gcirc;","U+0011C"
+"Gcy;","U+00413"
+"Gdot;","U+00120"
+"Gfr;","U+1D50A"
+"Gg;","U+022D9"
+"Gopf;","U+1D53E"
+"GreaterEqual;","U+02265"
+"GreaterEqualLess;","U+022DB"
+"GreaterFullEqual;","U+02267"
+"GreaterGreater;","U+02AA2"
+"GreaterLess;","U+02277"
+"GreaterSlantEqual;","U+02A7E"
+"GreaterTilde;","U+02273"
+"Gscr;","U+1D4A2"
+"Gt;","U+0226B"
+"HARDcy;","U+0042A"
+"Hacek;","U+002C7"
+"Hat;","U+0005E"
+"Hcirc;","U+00124"
+"Hfr;","U+0210C"
+"HilbertSpace;","U+0210B"
+"Hopf;","U+0210D"
+"HorizontalLine;","U+02500"
+"Hscr;","U+0210B"
+"Hstrok;","U+00126"
+"HumpDownHump;","U+0224E"
+"HumpEqual;","U+0224F"
+"IEcy;","U+00415"
+"IJlig;","U+00132"
+"IOcy;","U+00401"
+"Iacute;","U+000CD"
+"Iacute","U+000CD"
+"Icirc;","U+000CE"
+"Icirc","U+000CE"
+"Icy;","U+00418"
+"Idot;","U+00130"
+"Ifr;","U+02111"
+"Igrave;","U+000CC"
+"Igrave","U+000CC"
+"Im;","U+02111"
+"Imacr;","U+0012A"
+"ImaginaryI;","U+02148"
+"Implies;","U+021D2"
+"Int;","U+0222C"
+"Integral;","U+0222B"
+"Intersection;","U+022C2"
+"InvisibleComma;","U+02063"
+"InvisibleTimes;","U+02062"
+"Iogon;","U+0012E"
+"Iopf;","U+1D540"
+"Iota;","U+00399"
+"Iscr;","U+02110"
+"Itilde;","U+00128"
+"Iukcy;","U+00406"
+"Iuml;","U+000CF"
+"Iuml","U+000CF"
+"Jcirc;","U+00134"
+"Jcy;","U+00419"
+"Jfr;","U+1D50D"
+"Jopf;","U+1D541"
+"Jscr;","U+1D4A5"
+"Jsercy;","U+00408"
+"Jukcy;","U+00404"
+"KHcy;","U+00425"
+"KJcy;","U+0040C"
+"Kappa;","U+0039A"
+"Kcedil;","U+00136"
+"Kcy;","U+0041A"
+"Kfr;","U+1D50E"
+"Kopf;","U+1D542"
+"Kscr;","U+1D4A6"
+"LJcy;","U+00409"
+"LT;","U+0003C"
+"LT","U+0003C"
+"Lacute;","U+00139"
+"Lambda;","U+0039B"
+"Lang;","U+027EA"
+"Laplacetrf;","U+02112"
+"Larr;","U+0219E"
+"Lcaron;","U+0013D"
+"Lcedil;","U+0013B"
+"Lcy;","U+0041B"
+"LeftAngleBracket;","U+027E8"
+"LeftArrow;","U+02190"
+"LeftArrowBar;","U+021E4"
+"LeftArrowRightArrow;","U+021C6"
+"LeftCeiling;","U+02308"
+"LeftDoubleBracket;","U+027E6"
+"LeftDownTeeVector;","U+02961"
+"LeftDownVector;","U+021C3"
+"LeftDownVectorBar;","U+02959"
+"LeftFloor;","U+0230A"
+"LeftRightArrow;","U+02194"
+"LeftRightVector;","U+0294E"
+"LeftTee;","U+022A3"
+"LeftTeeArrow;","U+021A4"
+"LeftTeeVector;","U+0295A"
+"LeftTriangle;","U+022B2"
+"LeftTriangleBar;","U+029CF"
+"LeftTriangleEqual;","U+022B4"
+"LeftUpDownVector;","U+02951"
+"LeftUpTeeVector;","U+02960"
+"LeftUpVector;","U+021BF"
+"LeftUpVectorBar;","U+02958"
+"LeftVector;","U+021BC"
+"LeftVectorBar;","U+02952"
+"Leftarrow;","U+021D0"
+"Leftrightarrow;","U+021D4"
+"LessEqualGreater;","U+022DA"
+"LessFullEqual;","U+02266"
+"LessGreater;","U+02276"
+"LessLess;","U+02AA1"
+"LessSlantEqual;","U+02A7D"
+"LessTilde;","U+02272"
+"Lfr;","U+1D50F"
+"Ll;","U+022D8"
+"Lleftarrow;","U+021DA"
+"Lmidot;","U+0013F"
+"LongLeftArrow;","U+027F5"
+"LongLeftRightArrow;","U+027F7"
+"LongRightArrow;","U+027F6"
+"Longleftarrow;","U+027F8"
+"Longleftrightarrow;","U+027FA"
+"Longrightarrow;","U+027F9"
+"Lopf;","U+1D543"
+"LowerLeftArrow;","U+02199"
+"LowerRightArrow;","U+02198"
+"Lscr;","U+02112"
+"Lsh;","U+021B0"
+"Lstrok;","U+00141"
+"Lt;","U+0226A"
+"Map;","U+02905"
+"Mcy;","U+0041C"
+"MediumSpace;","U+0205F"
+"Mellintrf;","U+02133"
+"Mfr;","U+1D510"
+"MinusPlus;","U+02213"
+"Mopf;","U+1D544"
+"Mscr;","U+02133"
+"Mu;","U+0039C"
+"NJcy;","U+0040A"
+"Nacute;","U+00143"
+"Ncaron;","U+00147"
+"Ncedil;","U+00145"
+"Ncy;","U+0041D"
+"NegativeMediumSpace;","U+0200B"
+"NegativeThickSpace;","U+0200B"
+"NegativeThinSpace;","U+0200B"
+"NegativeVeryThinSpace;","U+0200B"
+"NestedGreaterGreater;","U+0226B"
+"NestedLessLess;","U+0226A"
+"NewLine;","U+0000A"
+"Nfr;","U+1D511"
+"NoBreak;","U+02060"
+"NonBreakingSpace;","U+000A0"
+"Nopf;","U+02115"
+"Not;","U+02AEC"
+"NotCongruent;","U+02262"
+"NotCupCap;","U+0226D"
+"NotDoubleVerticalBar;","U+02226"
+"NotElement;","U+02209"
+"NotEqual;","U+02260"
+"NotExists;","U+02204"
+"NotGreater;","U+0226F"
+"NotGreaterEqual;","U+02271"
+"NotGreaterLess;","U+02279"
+"NotGreaterTilde;","U+02275"
+"NotLeftTriangle;","U+022EA"
+"NotLeftTriangleEqual;","U+022EC"
+"NotLess;","U+0226E"
+"NotLessEqual;","U+02270"
+"NotLessGreater;","U+02278"
+"NotLessTilde;","U+02274"
+"NotPrecedes;","U+02280"
+"NotPrecedesSlantEqual;","U+022E0"
+"NotReverseElement;","U+0220C"
+"NotRightTriangle;","U+022EB"
+"NotRightTriangleEqual;","U+022ED"
+"NotSquareSubsetEqual;","U+022E2"
+"NotSquareSupersetEqual;","U+022E3"
+"NotSubsetEqual;","U+02288"
+"NotSucceeds;","U+02281"
+"NotSucceedsSlantEqual;","U+022E1"
+"NotSupersetEqual;","U+02289"
+"NotTilde;","U+02241"
+"NotTildeEqual;","U+02244"
+"NotTildeFullEqual;","U+02247"
+"NotTildeTilde;","U+02249"
+"NotVerticalBar;","U+02224"
+"Nscr;","U+1D4A9"
+"Ntilde;","U+000D1"
+"Ntilde","U+000D1"
+"Nu;","U+0039D"
+"OElig;","U+00152"
+"Oacute;","U+000D3"
+"Oacute","U+000D3"
+"Ocirc;","U+000D4"
+"Ocirc","U+000D4"
+"Ocy;","U+0041E"
+"Odblac;","U+00150"
+"Ofr;","U+1D512"
+"Ograve;","U+000D2"
+"Ograve","U+000D2"
+"Omacr;","U+0014C"
+"Omega;","U+003A9"
+"Omicron;","U+0039F"
+"Oopf;","U+1D546"
+"OpenCurlyDoubleQuote;","U+0201C"
+"OpenCurlyQuote;","U+02018"
+"Or;","U+02A54"
+"Oscr;","U+1D4AA"
+"Oslash;","U+000D8"
+"Oslash","U+000D8"
+"Otilde;","U+000D5"
+"Otilde","U+000D5"
+"Otimes;","U+02A37"
+"Ouml;","U+000D6"
+"Ouml","U+000D6"
+"OverBar;","U+0203E"
+"OverBrace;","U+023DE"
+"OverBracket;","U+023B4"
+"OverParenthesis;","U+023DC"
+"PartialD;","U+02202"
+"Pcy;","U+0041F"
+"Pfr;","U+1D513"
+"Phi;","U+003A6"
+"Pi;","U+003A0"
+"PlusMinus;","U+000B1"
+"Poincareplane;","U+0210C"
+"Popf;","U+02119"
+"Pr;","U+02ABB"
+"Precedes;","U+0227A"
+"PrecedesEqual;","U+02AAF"
+"PrecedesSlantEqual;","U+0227C"
+"PrecedesTilde;","U+0227E"
+"Prime;","U+02033"
+"Product;","U+0220F"
+"Proportion;","U+02237"
+"Proportional;","U+0221D"
+"Pscr;","U+1D4AB"
+"Psi;","U+003A8"
+"QUOT;","U+00022"
+"QUOT","U+00022"
+"Qfr;","U+1D514"
+"Qopf;","U+0211A"
+"Qscr;","U+1D4AC"
+"RBarr;","U+02910"
+"REG;","U+000AE"
+"REG","U+000AE"
+"Racute;","U+00154"
+"Rang;","U+027EB"
+"Rarr;","U+021A0"
+"Rarrtl;","U+02916"
+"Rcaron;","U+00158"
+"Rcedil;","U+00156"
+"Rcy;","U+00420"
+"Re;","U+0211C"
+"ReverseElement;","U+0220B"
+"ReverseEquilibrium;","U+021CB"
+"ReverseUpEquilibrium;","U+0296F"
+"Rfr;","U+0211C"
+"Rho;","U+003A1"
+"RightAngleBracket;","U+027E9"
+"RightArrow;","U+02192"
+"RightArrowBar;","U+021E5"
+"RightArrowLeftArrow;","U+021C4"
+"RightCeiling;","U+02309"
+"RightDoubleBracket;","U+027E7"
+"RightDownTeeVector;","U+0295D"
+"RightDownVector;","U+021C2"
+"RightDownVectorBar;","U+02955"
+"RightFloor;","U+0230B"
+"RightTee;","U+022A2"
+"RightTeeArrow;","U+021A6"
+"RightTeeVector;","U+0295B"
+"RightTriangle;","U+022B3"
+"RightTriangleBar;","U+029D0"
+"RightTriangleEqual;","U+022B5"
+"RightUpDownVector;","U+0294F"
+"RightUpTeeVector;","U+0295C"
+"RightUpVector;","U+021BE"
+"RightUpVectorBar;","U+02954"
+"RightVector;","U+021C0"
+"RightVectorBar;","U+02953"
+"Rightarrow;","U+021D2"
+"Ropf;","U+0211D"
+"RoundImplies;","U+02970"
+"Rrightarrow;","U+021DB"
+"Rscr;","U+0211B"
+"Rsh;","U+021B1"
+"RuleDelayed;","U+029F4"
+"SHCHcy;","U+00429"
+"SHcy;","U+00428"
+"SOFTcy;","U+0042C"
+"Sacute;","U+0015A"
+"Sc;","U+02ABC"
+"Scaron;","U+00160"
+"Scedil;","U+0015E"
+"Scirc;","U+0015C"
+"Scy;","U+00421"
+"Sfr;","U+1D516"
+"ShortDownArrow;","U+02193"
+"ShortLeftArrow;","U+02190"
+"ShortRightArrow;","U+02192"
+"ShortUpArrow;","U+02191"
+"Sigma;","U+003A3"
+"SmallCircle;","U+02218"
+"Sopf;","U+1D54A"
+"Sqrt;","U+0221A"
+"Square;","U+025A1"
+"SquareIntersection;","U+02293"
+"SquareSubset;","U+0228F"
+"SquareSubsetEqual;","U+02291"
+"SquareSuperset;","U+02290"
+"SquareSupersetEqual;","U+02292"
+"SquareUnion;","U+02294"
+"Sscr;","U+1D4AE"
+"Star;","U+022C6"
+"Sub;","U+022D0"
+"Subset;","U+022D0"
+"SubsetEqual;","U+02286"
+"Succeeds;","U+0227B"
+"SucceedsEqual;","U+02AB0"
+"SucceedsSlantEqual;","U+0227D"
+"SucceedsTilde;","U+0227F"
+"SuchThat;","U+0220B"
+"Sum;","U+02211"
+"Sup;","U+022D1"
+"Superset;","U+02283"
+"SupersetEqual;","U+02287"
+"Supset;","U+022D1"
+"THORN;","U+000DE"
+"THORN","U+000DE"
+"TRADE;","U+02122"
+"TSHcy;","U+0040B"
+"TScy;","U+00426"
+"Tab;","U+00009"
+"Tau;","U+003A4"
+"Tcaron;","U+00164"
+"Tcedil;","U+00162"
+"Tcy;","U+00422"
+"Tfr;","U+1D517"
+"Therefore;","U+02234"
+"Theta;","U+00398"
+"ThinSpace;","U+02009"
+"Tilde;","U+0223C"
+"TildeEqual;","U+02243"
+"TildeFullEqual;","U+02245"
+"TildeTilde;","U+02248"
+"Topf;","U+1D54B"
+"TripleDot;","U+020DB"
+"Tscr;","U+1D4AF"
+"Tstrok;","U+00166"
+"Uacute;","U+000DA"
+"Uacute","U+000DA"
+"Uarr;","U+0219F"
+"Uarrocir;","U+02949"
+"Ubrcy;","U+0040E"
+"Ubreve;","U+0016C"
+"Ucirc;","U+000DB"
+"Ucirc","U+000DB"
+"Ucy;","U+00423"
+"Udblac;","U+00170"
+"Ufr;","U+1D518"
+"Ugrave;","U+000D9"
+"Ugrave","U+000D9"
+"Umacr;","U+0016A"
+"UnderBar;","U+0005F"
+"UnderBrace;","U+023DF"
+"UnderBracket;","U+023B5"
+"UnderParenthesis;","U+023DD"
+"Union;","U+022C3"
+"UnionPlus;","U+0228E"
+"Uogon;","U+00172"
+"Uopf;","U+1D54C"
+"UpArrow;","U+02191"
+"UpArrowBar;","U+02912"
+"UpArrowDownArrow;","U+021C5"
+"UpDownArrow;","U+02195"
+"UpEquilibrium;","U+0296E"
+"UpTee;","U+022A5"
+"UpTeeArrow;","U+021A5"
+"Uparrow;","U+021D1"
+"Updownarrow;","U+021D5"
+"UpperLeftArrow;","U+02196"
+"UpperRightArrow;","U+02197"
+"Upsi;","U+003D2"
+"Upsilon;","U+003A5"
+"Uring;","U+0016E"
+"Uscr;","U+1D4B0"
+"Utilde;","U+00168"
+"Uuml;","U+000DC"
+"Uuml","U+000DC"
+"VDash;","U+022AB"
+"Vbar;","U+02AEB"
+"Vcy;","U+00412"
+"Vdash;","U+022A9"
+"Vdashl;","U+02AE6"
+"Vee;","U+022C1"
+"Verbar;","U+02016"
+"Vert;","U+02016"
+"VerticalBar;","U+02223"
+"VerticalLine;","U+0007C"
+"VerticalSeparator;","U+02758"
+"VerticalTilde;","U+02240"
+"VeryThinSpace;","U+0200A"
+"Vfr;","U+1D519"
+"Vopf;","U+1D54D"
+"Vscr;","U+1D4B1"
+"Vvdash;","U+022AA"
+"Wcirc;","U+00174"
+"Wedge;","U+022C0"
+"Wfr;","U+1D51A"
+"Wopf;","U+1D54E"
+"Wscr;","U+1D4B2"
+"Xfr;","U+1D51B"
+"Xi;","U+0039E"
+"Xopf;","U+1D54F"
+"Xscr;","U+1D4B3"
+"YAcy;","U+0042F"
+"YIcy;","U+00407"
+"YUcy;","U+0042E"
+"Yacute;","U+000DD"
+"Yacute","U+000DD"
+"Ycirc;","U+00176"
+"Ycy;","U+0042B"
+"Yfr;","U+1D51C"
+"Yopf;","U+1D550"
+"Yscr;","U+1D4B4"
+"Yuml;","U+00178"
+"ZHcy;","U+00416"
+"Zacute;","U+00179"
+"Zcaron;","U+0017D"
+"Zcy;","U+00417"
+"Zdot;","U+0017B"
+"ZeroWidthSpace;","U+0200B"
+"Zeta;","U+00396"
+"Zfr;","U+02128"
+"Zopf;","U+02124"
+"Zscr;","U+1D4B5"
+"aacute;","U+000E1"
+"aacute","U+000E1"
+"abreve;","U+00103"
+"ac;","U+0223E"
+"acd;","U+0223F"
+"acirc;","U+000E2"
+"acirc","U+000E2"
+"acute;","U+000B4"
+"acute","U+000B4"
+"acy;","U+00430"
+"aelig;","U+000E6"
+"aelig","U+000E6"
+"af;","U+02061"
+"afr;","U+1D51E"
+"agrave;","U+000E0"
+"agrave","U+000E0"
+"alefsym;","U+02135"
+"aleph;","U+02135"
+"alpha;","U+003B1"
+"amacr;","U+00101"
+"amalg;","U+02A3F"
+"amp;","U+00026"
+"amp","U+00026"
+"and;","U+02227"
+"andand;","U+02A55"
+"andd;","U+02A5C"
+"andslope;","U+02A58"
+"andv;","U+02A5A"
+"ang;","U+02220"
+"ange;","U+029A4"
+"angle;","U+02220"
+"angmsd;","U+02221"
+"angmsdaa;","U+029A8"
+"angmsdab;","U+029A9"
+"angmsdac;","U+029AA"
+"angmsdad;","U+029AB"
+"angmsdae;","U+029AC"
+"angmsdaf;","U+029AD"
+"angmsdag;","U+029AE"
+"angmsdah;","U+029AF"
+"angrt;","U+0221F"
+"angrtvb;","U+022BE"
+"angrtvbd;","U+0299D"
+"angsph;","U+02222"
+"angst;","U+000C5"
+"angzarr;","U+0237C"
+"aogon;","U+00105"
+"aopf;","U+1D552"
+"ap;","U+02248"
+"apE;","U+02A70"
+"apacir;","U+02A6F"
+"ape;","U+0224A"
+"apid;","U+0224B"
+"apos;","U+00027"
+"approx;","U+02248"
+"approxeq;","U+0224A"
+"aring;","U+000E5"
+"aring","U+000E5"
+"ascr;","U+1D4B6"
+"ast;","U+0002A"
+"asymp;","U+02248"
+"asympeq;","U+0224D"
+"atilde;","U+000E3"
+"atilde","U+000E3"
+"auml;","U+000E4"
+"auml","U+000E4"
+"awconint;","U+02233"
+"awint;","U+02A11"
+"bNot;","U+02AED"
+"backcong;","U+0224C"
+"backepsilon;","U+003F6"
+"backprime;","U+02035"
+"backsim;","U+0223D"
+"backsimeq;","U+022CD"
+"barvee;","U+022BD"
+"barwed;","U+02305"
+"barwedge;","U+02305"
+"bbrk;","U+023B5"
+"bbrktbrk;","U+023B6"
+"bcong;","U+0224C"
+"bcy;","U+00431"
+"bdquo;","U+0201E"
+"becaus;","U+02235"
+"because;","U+02235"
+"bemptyv;","U+029B0"
+"bepsi;","U+003F6"
+"bernou;","U+0212C"
+"beta;","U+003B2"
+"beth;","U+02136"
+"between;","U+0226C"
+"bfr;","U+1D51F"
+"bigcap;","U+022C2"
+"bigcirc;","U+025EF"
+"bigcup;","U+022C3"
+"bigodot;","U+02A00"
+"bigoplus;","U+02A01"
+"bigotimes;","U+02A02"
+"bigsqcup;","U+02A06"
+"bigstar;","U+02605"
+"bigtriangledown;","U+025BD"
+"bigtriangleup;","U+025B3"
+"biguplus;","U+02A04"
+"bigvee;","U+022C1"
+"bigwedge;","U+022C0"
+"bkarow;","U+0290D"
+"blacklozenge;","U+029EB"
+"blacksquare;","U+025AA"
+"blacktriangle;","U+025B4"
+"blacktriangledown;","U+025BE"
+"blacktriangleleft;","U+025C2"
+"blacktriangleright;","U+025B8"
+"blank;","U+02423"
+"blk12;","U+02592"
+"blk14;","U+02591"
+"blk34;","U+02593"
+"block;","U+02588"
+"bnot;","U+02310"
+"bopf;","U+1D553"
+"bot;","U+022A5"
+"bottom;","U+022A5"
+"bowtie;","U+022C8"
+"boxDL;","U+02557"
+"boxDR;","U+02554"
+"boxDl;","U+02556"
+"boxDr;","U+02553"
+"boxH;","U+02550"
+"boxHD;","U+02566"
+"boxHU;","U+02569"
+"boxHd;","U+02564"
+"boxHu;","U+02567"
+"boxUL;","U+0255D"
+"boxUR;","U+0255A"
+"boxUl;","U+0255C"
+"boxUr;","U+02559"
+"boxV;","U+02551"
+"boxVH;","U+0256C"
+"boxVL;","U+02563"
+"boxVR;","U+02560"
+"boxVh;","U+0256B"
+"boxVl;","U+02562"
+"boxVr;","U+0255F"
+"boxbox;","U+029C9"
+"boxdL;","U+02555"
+"boxdR;","U+02552"
+"boxdl;","U+02510"
+"boxdr;","U+0250C"
+"boxh;","U+02500"
+"boxhD;","U+02565"
+"boxhU;","U+02568"
+"boxhd;","U+0252C"
+"boxhu;","U+02534"
+"boxminus;","U+0229F"
+"boxplus;","U+0229E"
+"boxtimes;","U+022A0"
+"boxuL;","U+0255B"
+"boxuR;","U+02558"
+"boxul;","U+02518"
+"boxur;","U+02514"
+"boxv;","U+02502"
+"boxvH;","U+0256A"
+"boxvL;","U+02561"
+"boxvR;","U+0255E"
+"boxvh;","U+0253C"
+"boxvl;","U+02524"
+"boxvr;","U+0251C"
+"bprime;","U+02035"
+"breve;","U+002D8"
+"brvbar;","U+000A6"
+"brvbar","U+000A6"
+"bscr;","U+1D4B7"
+"bsemi;","U+0204F"
+"bsim;","U+0223D"
+"bsime;","U+022CD"
+"bsol;","U+0005C"
+"bsolb;","U+029C5"
+"bsolhsub;","U+027C8"
+"bull;","U+02022"
+"bullet;","U+02022"
+"bump;","U+0224E"
+"bumpE;","U+02AAE"
+"bumpe;","U+0224F"
+"bumpeq;","U+0224F"
+"cacute;","U+00107"
+"cap;","U+02229"
+"capand;","U+02A44"
+"capbrcup;","U+02A49"
+"capcap;","U+02A4B"
+"capcup;","U+02A47"
+"capdot;","U+02A40"
+"caret;","U+02041"
+"caron;","U+002C7"
+"ccaps;","U+02A4D"
+"ccaron;","U+0010D"
+"ccedil;","U+000E7"
+"ccedil","U+000E7"
+"ccirc;","U+00109"
+"ccups;","U+02A4C"
+"ccupssm;","U+02A50"
+"cdot;","U+0010B"
+"cedil;","U+000B8"
+"cedil","U+000B8"
+"cemptyv;","U+029B2"
+"cent;","U+000A2"
+"cent","U+000A2"
+"centerdot;","U+000B7"
+"cfr;","U+1D520"
+"chcy;","U+00447"
+"check;","U+02713"
+"checkmark;","U+02713"
+"chi;","U+003C7"
+"cir;","U+025CB"
+"cirE;","U+029C3"
+"circ;","U+002C6"
+"circeq;","U+02257"
+"circlearrowleft;","U+021BA"
+"circlearrowright;","U+021BB"
+"circledR;","U+000AE"
+"circledS;","U+024C8"
+"circledast;","U+0229B"
+"circledcirc;","U+0229A"
+"circleddash;","U+0229D"
+"cire;","U+02257"
+"cirfnint;","U+02A10"
+"cirmid;","U+02AEF"
+"cirscir;","U+029C2"
+"clubs;","U+02663"
+"clubsuit;","U+02663"
+"colon;","U+0003A"
+"colone;","U+02254"
+"coloneq;","U+02254"
+"comma;","U+0002C"
+"commat;","U+00040"
+"comp;","U+02201"
+"compfn;","U+02218"
+"complement;","U+02201"
+"complexes;","U+02102"
+"cong;","U+02245"
+"congdot;","U+02A6D"
+"conint;","U+0222E"
+"copf;","U+1D554"
+"coprod;","U+02210"
+"copy;","U+000A9"
+"copy","U+000A9"
+"copysr;","U+02117"
+"crarr;","U+021B5"
+"cross;","U+02717"
+"cscr;","U+1D4B8"
+"csub;","U+02ACF"
+"csube;","U+02AD1"
+"csup;","U+02AD0"
+"csupe;","U+02AD2"
+"ctdot;","U+022EF"
+"cudarrl;","U+02938"
+"cudarrr;","U+02935"
+"cuepr;","U+022DE"
+"cuesc;","U+022DF"
+"cularr;","U+021B6"
+"cularrp;","U+0293D"
+"cup;","U+0222A"
+"cupbrcap;","U+02A48"
+"cupcap;","U+02A46"
+"cupcup;","U+02A4A"
+"cupdot;","U+0228D"
+"cupor;","U+02A45"
+"curarr;","U+021B7"
+"curarrm;","U+0293C"
+"curlyeqprec;","U+022DE"
+"curlyeqsucc;","U+022DF"
+"curlyvee;","U+022CE"
+"curlywedge;","U+022CF"
+"curren;","U+000A4"
+"curren","U+000A4"
+"curvearrowleft;","U+021B6"
+"curvearrowright;","U+021B7"
+"cuvee;","U+022CE"
+"cuwed;","U+022CF"
+"cwconint;","U+02232"
+"cwint;","U+02231"
+"cylcty;","U+0232D"
+"dArr;","U+021D3"
+"dHar;","U+02965"
+"dagger;","U+02020"
+"daleth;","U+02138"
+"darr;","U+02193"
+"dash;","U+02010"
+"dashv;","U+022A3"
+"dbkarow;","U+0290F"
+"dblac;","U+002DD"
+"dcaron;","U+0010F"
+"dcy;","U+00434"
+"dd;","U+02146"
+"ddagger;","U+02021"
+"ddarr;","U+021CA"
+"ddotseq;","U+02A77"
+"deg;","U+000B0"
+"deg","U+000B0"
+"delta;","U+003B4"
+"demptyv;","U+029B1"
+"dfisht;","U+0297F"
+"dfr;","U+1D521"
+"dharl;","U+021C3"
+"dharr;","U+021C2"
+"diam;","U+022C4"
+"diamond;","U+022C4"
+"diamondsuit;","U+02666"
+"diams;","U+02666"
+"die;","U+000A8"
+"digamma;","U+003DD"
+"disin;","U+022F2"
+"div;","U+000F7"
+"divide;","U+000F7"
+"divide","U+000F7"
+"divideontimes;","U+022C7"
+"divonx;","U+022C7"
+"djcy;","U+00452"
+"dlcorn;","U+0231E"
+"dlcrop;","U+0230D"
+"dollar;","U+00024"
+"dopf;","U+1D555"
+"dot;","U+002D9"
+"doteq;","U+02250"
+"doteqdot;","U+02251"
+"dotminus;","U+02238"
+"dotplus;","U+02214"
+"dotsquare;","U+022A1"
+"doublebarwedge;","U+02306"
+"downarrow;","U+02193"
+"downdownarrows;","U+021CA"
+"downharpoonleft;","U+021C3"
+"downharpoonright;","U+021C2"
+"drbkarow;","U+02910"
+"drcorn;","U+0231F"
+"drcrop;","U+0230C"
+"dscr;","U+1D4B9"
+"dscy;","U+00455"
+"dsol;","U+029F6"
+"dstrok;","U+00111"
+"dtdot;","U+022F1"
+"dtri;","U+025BF"
+"dtrif;","U+025BE"
+"duarr;","U+021F5"
+"duhar;","U+0296F"
+"dwangle;","U+029A6"
+"dzcy;","U+0045F"
+"dzigrarr;","U+027FF"
+"eDDot;","U+02A77"
+"eDot;","U+02251"
+"eacute;","U+000E9"
+"eacute","U+000E9"
+"easter;","U+02A6E"
+"ecaron;","U+0011B"
+"ecir;","U+02256"
+"ecirc;","U+000EA"
+"ecirc","U+000EA"
+"ecolon;","U+02255"
+"ecy;","U+0044D"
+"edot;","U+00117"
+"ee;","U+02147"
+"efDot;","U+02252"
+"efr;","U+1D522"
+"eg;","U+02A9A"
+"egrave;","U+000E8"
+"egrave","U+000E8"
+"egs;","U+02A96"
+"egsdot;","U+02A98"
+"el;","U+02A99"
+"elinters;","U+023E7"
+"ell;","U+02113"
+"els;","U+02A95"
+"elsdot;","U+02A97"
+"emacr;","U+00113"
+"empty;","U+02205"
+"emptyset;","U+02205"
+"emptyv;","U+02205"
+"emsp13;","U+02004"
+"emsp14;","U+02005"
+"emsp;","U+02003"
+"eng;","U+0014B"
+"ensp;","U+02002"
+"eogon;","U+00119"
+"eopf;","U+1D556"
+"epar;","U+022D5"
+"eparsl;","U+029E3"
+"eplus;","U+02A71"
+"epsi;","U+003B5"
+"epsilon;","U+003B5"
+"epsiv;","U+003F5"
+"eqcirc;","U+02256"
+"eqcolon;","U+02255"
+"eqsim;","U+02242"
+"eqslantgtr;","U+02A96"
+"eqslantless;","U+02A95"
+"equals;","U+0003D"
+"equest;","U+0225F"
+"equiv;","U+02261"
+"equivDD;","U+02A78"
+"eqvparsl;","U+029E5"
+"erDot;","U+02253"
+"erarr;","U+02971"
+"escr;","U+0212F"
+"esdot;","U+02250"
+"esim;","U+02242"
+"eta;","U+003B7"
+"eth;","U+000F0"
+"eth","U+000F0"
+"euml;","U+000EB"
+"euml","U+000EB"
+"euro;","U+020AC"
+"excl;","U+00021"
+"exist;","U+02203"
+"expectation;","U+02130"
+"exponentiale;","U+02147"
+"fallingdotseq;","U+02252"
+"fcy;","U+00444"
+"female;","U+02640"
+"ffilig;","U+0FB03"
+"fflig;","U+0FB00"
+"ffllig;","U+0FB04"
+"ffr;","U+1D523"
+"filig;","U+0FB01"
+"flat;","U+0266D"
+"fllig;","U+0FB02"
+"fltns;","U+025B1"
+"fnof;","U+00192"
+"fopf;","U+1D557"
+"forall;","U+02200"
+"fork;","U+022D4"
+"forkv;","U+02AD9"
+"fpartint;","U+02A0D"
+"frac12;","U+000BD"
+"frac12","U+000BD"
+"frac13;","U+02153"
+"frac14;","U+000BC"
+"frac14","U+000BC"
+"frac15;","U+02155"
+"frac16;","U+02159"
+"frac18;","U+0215B"
+"frac23;","U+02154"
+"frac25;","U+02156"
+"frac34;","U+000BE"
+"frac34","U+000BE"
+"frac35;","U+02157"
+"frac38;","U+0215C"
+"frac45;","U+02158"
+"frac56;","U+0215A"
+"frac58;","U+0215D"
+"frac78;","U+0215E"
+"frasl;","U+02044"
+"frown;","U+02322"
+"fscr;","U+1D4BB"
+"gE;","U+02267"
+"gEl;","U+02A8C"
+"gacute;","U+001F5"
+"gamma;","U+003B3"
+"gammad;","U+003DD"
+"gap;","U+02A86"
+"gbreve;","U+0011F"
+"gcirc;","U+0011D"
+"gcy;","U+00433"
+"gdot;","U+00121"
+"ge;","U+02265"
+"gel;","U+022DB"
+"geq;","U+02265"
+"geqq;","U+02267"
+"geqslant;","U+02A7E"
+"ges;","U+02A7E"
+"gescc;","U+02AA9"
+"gesdot;","U+02A80"
+"gesdoto;","U+02A82"
+"gesdotol;","U+02A84"
+"gesles;","U+02A94"
+"gfr;","U+1D524"
+"gg;","U+0226B"
+"ggg;","U+022D9"
+"gimel;","U+02137"
+"gjcy;","U+00453"
+"gl;","U+02277"
+"glE;","U+02A92"
+"gla;","U+02AA5"
+"glj;","U+02AA4"
+"gnE;","U+02269"
+"gnap;","U+02A8A"
+"gnapprox;","U+02A8A"
+"gne;","U+02A88"
+"gneq;","U+02A88"
+"gneqq;","U+02269"
+"gnsim;","U+022E7"
+"gopf;","U+1D558"
+"grave;","U+00060"
+"gscr;","U+0210A"
+"gsim;","U+02273"
+"gsime;","U+02A8E"
+"gsiml;","U+02A90"
+"gt;","U+0003E"
+"gt","U+0003E"
+"gtcc;","U+02AA7"
+"gtcir;","U+02A7A"
+"gtdot;","U+022D7"
+"gtlPar;","U+02995"
+"gtquest;","U+02A7C"
+"gtrapprox;","U+02A86"
+"gtrarr;","U+02978"
+"gtrdot;","U+022D7"
+"gtreqless;","U+022DB"
+"gtreqqless;","U+02A8C"
+"gtrless;","U+02277"
+"gtrsim;","U+02273"
+"hArr;","U+021D4"
+"hairsp;","U+0200A"
+"half;","U+000BD"
+"hamilt;","U+0210B"
+"hardcy;","U+0044A"
+"harr;","U+02194"
+"harrcir;","U+02948"
+"harrw;","U+021AD"
+"hbar;","U+0210F"
+"hcirc;","U+00125"
+"hearts;","U+02665"
+"heartsuit;","U+02665"
+"hellip;","U+02026"
+"hercon;","U+022B9"
+"hfr;","U+1D525"
+"hksearow;","U+02925"
+"hkswarow;","U+02926"
+"hoarr;","U+021FF"
+"homtht;","U+0223B"
+"hookleftarrow;","U+021A9"
+"hookrightarrow;","U+021AA"
+"hopf;","U+1D559"
+"horbar;","U+02015"
+"hscr;","U+1D4BD"
+"hslash;","U+0210F"
+"hstrok;","U+00127"
+"hybull;","U+02043"
+"hyphen;","U+02010"
+"iacute;","U+000ED"
+"iacute","U+000ED"
+"ic;","U+02063"
+"icirc;","U+000EE"
+"icirc","U+000EE"
+"icy;","U+00438"
+"iecy;","U+00435"
+"iexcl;","U+000A1"
+"iexcl","U+000A1"
+"iff;","U+021D4"
+"ifr;","U+1D526"
+"igrave;","U+000EC"
+"igrave","U+000EC"
+"ii;","U+02148"
+"iiiint;","U+02A0C"
+"iiint;","U+0222D"
+"iinfin;","U+029DC"
+"iiota;","U+02129"
+"ijlig;","U+00133"
+"imacr;","U+0012B"
+"image;","U+02111"
+"imagline;","U+02110"
+"imagpart;","U+02111"
+"imath;","U+00131"
+"imof;","U+022B7"
+"imped;","U+001B5"
+"in;","U+02208"
+"incare;","U+02105"
+"infin;","U+0221E"
+"infintie;","U+029DD"
+"inodot;","U+00131"
+"int;","U+0222B"
+"intcal;","U+022BA"
+"integers;","U+02124"
+"intercal;","U+022BA"
+"intlarhk;","U+02A17"
+"intprod;","U+02A3C"
+"iocy;","U+00451"
+"iogon;","U+0012F"
+"iopf;","U+1D55A"
+"iota;","U+003B9"
+"iprod;","U+02A3C"
+"iquest;","U+000BF"
+"iquest","U+000BF"
+"iscr;","U+1D4BE"
+"isin;","U+02208"
+"isinE;","U+022F9"
+"isindot;","U+022F5"
+"isins;","U+022F4"
+"isinsv;","U+022F3"
+"isinv;","U+02208"
+"it;","U+02062"
+"itilde;","U+00129"
+"iukcy;","U+00456"
+"iuml;","U+000EF"
+"iuml","U+000EF"
+"jcirc;","U+00135"
+"jcy;","U+00439"
+"jfr;","U+1D527"
+"jmath;","U+00237"
+"jopf;","U+1D55B"
+"jscr;","U+1D4BF"
+"jsercy;","U+00458"
+"jukcy;","U+00454"
+"kappa;","U+003BA"
+"kappav;","U+003F0"
+"kcedil;","U+00137"
+"kcy;","U+0043A"
+"kfr;","U+1D528"
+"kgreen;","U+00138"
+"khcy;","U+00445"
+"kjcy;","U+0045C"
+"kopf;","U+1D55C"
+"kscr;","U+1D4C0"
+"lAarr;","U+021DA"
+"lArr;","U+021D0"
+"lAtail;","U+0291B"
+"lBarr;","U+0290E"
+"lE;","U+02266"
+"lEg;","U+02A8B"
+"lHar;","U+02962"
+"lacute;","U+0013A"
+"laemptyv;","U+029B4"
+"lagran;","U+02112"
+"lambda;","U+003BB"
+"lang;","U+027E8"
+"langd;","U+02991"
+"langle;","U+027E8"
+"lap;","U+02A85"
+"laquo;","U+000AB"
+"laquo","U+000AB"
+"larr;","U+02190"
+"larrb;","U+021E4"
+"larrbfs;","U+0291F"
+"larrfs;","U+0291D"
+"larrhk;","U+021A9"
+"larrlp;","U+021AB"
+"larrpl;","U+02939"
+"larrsim;","U+02973"
+"larrtl;","U+021A2"
+"lat;","U+02AAB"
+"latail;","U+02919"
+"late;","U+02AAD"
+"lbarr;","U+0290C"
+"lbbrk;","U+02772"
+"lbrace;","U+0007B"
+"lbrack;","U+0005B"
+"lbrke;","U+0298B"
+"lbrksld;","U+0298F"
+"lbrkslu;","U+0298D"
+"lcaron;","U+0013E"
+"lcedil;","U+0013C"
+"lceil;","U+02308"
+"lcub;","U+0007B"
+"lcy;","U+0043B"
+"ldca;","U+02936"
+"ldquo;","U+0201C"
+"ldquor;","U+0201E"
+"ldrdhar;","U+02967"
+"ldrushar;","U+0294B"
+"ldsh;","U+021B2"
+"le;","U+02264"
+"leftarrow;","U+02190"
+"leftarrowtail;","U+021A2"
+"leftharpoondown;","U+021BD"
+"leftharpoonup;","U+021BC"
+"leftleftarrows;","U+021C7"
+"leftrightarrow;","U+02194"
+"leftrightarrows;","U+021C6"
+"leftrightharpoons;","U+021CB"
+"leftrightsquigarrow;","U+021AD"
+"leftthreetimes;","U+022CB"
+"leg;","U+022DA"
+"leq;","U+02264"
+"leqq;","U+02266"
+"leqslant;","U+02A7D"
+"les;","U+02A7D"
+"lescc;","U+02AA8"
+"lesdot;","U+02A7F"
+"lesdoto;","U+02A81"
+"lesdotor;","U+02A83"
+"lesges;","U+02A93"
+"lessapprox;","U+02A85"
+"lessdot;","U+022D6"
+"lesseqgtr;","U+022DA"
+"lesseqqgtr;","U+02A8B"
+"lessgtr;","U+02276"
+"lesssim;","U+02272"
+"lfisht;","U+0297C"
+"lfloor;","U+0230A"
+"lfr;","U+1D529"
+"lg;","U+02276"
+"lgE;","U+02A91"
+"lhard;","U+021BD"
+"lharu;","U+021BC"
+"lharul;","U+0296A"
+"lhblk;","U+02584"
+"ljcy;","U+00459"
+"ll;","U+0226A"
+"llarr;","U+021C7"
+"llcorner;","U+0231E"
+"llhard;","U+0296B"
+"lltri;","U+025FA"
+"lmidot;","U+00140"
+"lmoust;","U+023B0"
+"lmoustache;","U+023B0"
+"lnE;","U+02268"
+"lnap;","U+02A89"
+"lnapprox;","U+02A89"
+"lne;","U+02A87"
+"lneq;","U+02A87"
+"lneqq;","U+02268"
+"lnsim;","U+022E6"
+"loang;","U+027EC"
+"loarr;","U+021FD"
+"lobrk;","U+027E6"
+"longleftarrow;","U+027F5"
+"longleftrightarrow;","U+027F7"
+"longmapsto;","U+027FC"
+"longrightarrow;","U+027F6"
+"looparrowleft;","U+021AB"
+"looparrowright;","U+021AC"
+"lopar;","U+02985"
+"lopf;","U+1D55D"
+"loplus;","U+02A2D"
+"lotimes;","U+02A34"
+"lowast;","U+02217"
+"lowbar;","U+0005F"
+"loz;","U+025CA"
+"lozenge;","U+025CA"
+"lozf;","U+029EB"
+"lpar;","U+00028"
+"lparlt;","U+02993"
+"lrarr;","U+021C6"
+"lrcorner;","U+0231F"
+"lrhar;","U+021CB"
+"lrhard;","U+0296D"
+"lrm;","U+0200E"
+"lrtri;","U+022BF"
+"lsaquo;","U+02039"
+"lscr;","U+1D4C1"
+"lsh;","U+021B0"
+"lsim;","U+02272"
+"lsime;","U+02A8D"
+"lsimg;","U+02A8F"
+"lsqb;","U+0005B"
+"lsquo;","U+02018"
+"lsquor;","U+0201A"
+"lstrok;","U+00142"
+"lt;","U+0003C"
+"lt","U+0003C"
+"ltcc;","U+02AA6"
+"ltcir;","U+02A79"
+"ltdot;","U+022D6"
+"lthree;","U+022CB"
+"ltimes;","U+022C9"
+"ltlarr;","U+02976"
+"ltquest;","U+02A7B"
+"ltrPar;","U+02996"
+"ltri;","U+025C3"
+"ltrie;","U+022B4"
+"ltrif;","U+025C2"
+"lurdshar;","U+0294A"
+"luruhar;","U+02966"
+"mDDot;","U+0223A"
+"macr;","U+000AF"
+"macr","U+000AF"
+"male;","U+02642"
+"malt;","U+02720"
+"maltese;","U+02720"
+"map;","U+021A6"
+"mapsto;","U+021A6"
+"mapstodown;","U+021A7"
+"mapstoleft;","U+021A4"
+"mapstoup;","U+021A5"
+"marker;","U+025AE"
+"mcomma;","U+02A29"
+"mcy;","U+0043C"
+"mdash;","U+02014"
+"measuredangle;","U+02221"
+"mfr;","U+1D52A"
+"mho;","U+02127"
+"micro;","U+000B5"
+"micro","U+000B5"
+"mid;","U+02223"
+"midast;","U+0002A"
+"midcir;","U+02AF0"
+"middot;","U+000B7"
+"middot","U+000B7"
+"minus;","U+02212"
+"minusb;","U+0229F"
+"minusd;","U+02238"
+"minusdu;","U+02A2A"
+"mlcp;","U+02ADB"
+"mldr;","U+02026"
+"mnplus;","U+02213"
+"models;","U+022A7"
+"mopf;","U+1D55E"
+"mp;","U+02213"
+"mscr;","U+1D4C2"
+"mstpos;","U+0223E"
+"mu;","U+003BC"
+"multimap;","U+022B8"
+"mumap;","U+022B8"
+"nLeftarrow;","U+021CD"
+"nLeftrightarrow;","U+021CE"
+"nRightarrow;","U+021CF"
+"nVDash;","U+022AF"
+"nVdash;","U+022AE"
+"nabla;","U+02207"
+"nacute;","U+00144"
+"nap;","U+02249"
+"napos;","U+00149"
+"napprox;","U+02249"
+"natur;","U+0266E"
+"natural;","U+0266E"
+"naturals;","U+02115"
+"nbsp;","U+000A0"
+"nbsp","U+000A0"
+"ncap;","U+02A43"
+"ncaron;","U+00148"
+"ncedil;","U+00146"
+"ncong;","U+02247"
+"ncup;","U+02A42"
+"ncy;","U+0043D"
+"ndash;","U+02013"
+"ne;","U+02260"
+"neArr;","U+021D7"
+"nearhk;","U+02924"
+"nearr;","U+02197"
+"nearrow;","U+02197"
+"nequiv;","U+02262"
+"nesear;","U+02928"
+"nexist;","U+02204"
+"nexists;","U+02204"
+"nfr;","U+1D52B"
+"nge;","U+02271"
+"ngeq;","U+02271"
+"ngsim;","U+02275"
+"ngt;","U+0226F"
+"ngtr;","U+0226F"
+"nhArr;","U+021CE"
+"nharr;","U+021AE"
+"nhpar;","U+02AF2"
+"ni;","U+0220B"
+"nis;","U+022FC"
+"nisd;","U+022FA"
+"niv;","U+0220B"
+"njcy;","U+0045A"
+"nlArr;","U+021CD"
+"nlarr;","U+0219A"
+"nldr;","U+02025"
+"nle;","U+02270"
+"nleftarrow;","U+0219A"
+"nleftrightarrow;","U+021AE"
+"nleq;","U+02270"
+"nless;","U+0226E"
+"nlsim;","U+02274"
+"nlt;","U+0226E"
+"nltri;","U+022EA"
+"nltrie;","U+022EC"
+"nmid;","U+02224"
+"nopf;","U+1D55F"
+"not;","U+000AC"
+"not","U+000AC"
+"notin;","U+02209"
+"notinva;","U+02209"
+"notinvb;","U+022F7"
+"notinvc;","U+022F6"
+"notni;","U+0220C"
+"notniva;","U+0220C"
+"notnivb;","U+022FE"
+"notnivc;","U+022FD"
+"npar;","U+02226"
+"nparallel;","U+02226"
+"npolint;","U+02A14"
+"npr;","U+02280"
+"nprcue;","U+022E0"
+"nprec;","U+02280"
+"nrArr;","U+021CF"
+"nrarr;","U+0219B"
+"nrightarrow;","U+0219B"
+"nrtri;","U+022EB"
+"nrtrie;","U+022ED"
+"nsc;","U+02281"
+"nsccue;","U+022E1"
+"nscr;","U+1D4C3"
+"nshortmid;","U+02224"
+"nshortparallel;","U+02226"
+"nsim;","U+02241"
+"nsime;","U+02244"
+"nsimeq;","U+02244"
+"nsmid;","U+02224"
+"nspar;","U+02226"
+"nsqsube;","U+022E2"
+"nsqsupe;","U+022E3"
+"nsub;","U+02284"
+"nsube;","U+02288"
+"nsubseteq;","U+02288"
+"nsucc;","U+02281"
+"nsup;","U+02285"
+"nsupe;","U+02289"
+"nsupseteq;","U+02289"
+"ntgl;","U+02279"
+"ntilde;","U+000F1"
+"ntilde","U+000F1"
+"ntlg;","U+02278"
+"ntriangleleft;","U+022EA"
+"ntrianglelefteq;","U+022EC"
+"ntriangleright;","U+022EB"
+"ntrianglerighteq;","U+022ED"
+"nu;","U+003BD"
+"num;","U+00023"
+"numero;","U+02116"
+"numsp;","U+02007"
+"nvDash;","U+022AD"
+"nvHarr;","U+02904"
+"nvdash;","U+022AC"
+"nvinfin;","U+029DE"
+"nvlArr;","U+02902"
+"nvrArr;","U+02903"
+"nwArr;","U+021D6"
+"nwarhk;","U+02923"
+"nwarr;","U+02196"
+"nwarrow;","U+02196"
+"nwnear;","U+02927"
+"oS;","U+024C8"
+"oacute;","U+000F3"
+"oacute","U+000F3"
+"oast;","U+0229B"
+"ocir;","U+0229A"
+"ocirc;","U+000F4"
+"ocirc","U+000F4"
+"ocy;","U+0043E"
+"odash;","U+0229D"
+"odblac;","U+00151"
+"odiv;","U+02A38"
+"odot;","U+02299"
+"odsold;","U+029BC"
+"oelig;","U+00153"
+"ofcir;","U+029BF"
+"ofr;","U+1D52C"
+"ogon;","U+002DB"
+"ograve;","U+000F2"
+"ograve","U+000F2"
+"ogt;","U+029C1"
+"ohbar;","U+029B5"
+"ohm;","U+003A9"
+"oint;","U+0222E"
+"olarr;","U+021BA"
+"olcir;","U+029BE"
+"olcross;","U+029BB"
+"oline;","U+0203E"
+"olt;","U+029C0"
+"omacr;","U+0014D"
+"omega;","U+003C9"
+"omicron;","U+003BF"
+"omid;","U+029B6"
+"ominus;","U+02296"
+"oopf;","U+1D560"
+"opar;","U+029B7"
+"operp;","U+029B9"
+"oplus;","U+02295"
+"or;","U+02228"
+"orarr;","U+021BB"
+"ord;","U+02A5D"
+"order;","U+02134"
+"orderof;","U+02134"
+"ordf;","U+000AA"
+"ordf","U+000AA"
+"ordm;","U+000BA"
+"ordm","U+000BA"
+"origof;","U+022B6"
+"oror;","U+02A56"
+"orslope;","U+02A57"
+"orv;","U+02A5B"
+"oscr;","U+02134"
+"oslash;","U+000F8"
+"oslash","U+000F8"
+"osol;","U+02298"
+"otilde;","U+000F5"
+"otilde","U+000F5"
+"otimes;","U+02297"
+"otimesas;","U+02A36"
+"ouml;","U+000F6"
+"ouml","U+000F6"
+"ovbar;","U+0233D"
+"par;","U+02225"
+"para;","U+000B6"
+"para","U+000B6"
+"parallel;","U+02225"
+"parsim;","U+02AF3"
+"parsl;","U+02AFD"
+"part;","U+02202"
+"pcy;","U+0043F"
+"percnt;","U+00025"
+"period;","U+0002E"
+"permil;","U+02030"
+"perp;","U+022A5"
+"pertenk;","U+02031"
+"pfr;","U+1D52D"
+"phi;","U+003C6"
+"phiv;","U+003D5"
+"phmmat;","U+02133"
+"phone;","U+0260E"
+"pi;","U+003C0"
+"pitchfork;","U+022D4"
+"piv;","U+003D6"
+"planck;","U+0210F"
+"planckh;","U+0210E"
+"plankv;","U+0210F"
+"plus;","U+0002B"
+"plusacir;","U+02A23"
+"plusb;","U+0229E"
+"pluscir;","U+02A22"
+"plusdo;","U+02214"
+"plusdu;","U+02A25"
+"pluse;","U+02A72"
+"plusmn;","U+000B1"
+"plusmn","U+000B1"
+"plussim;","U+02A26"
+"plustwo;","U+02A27"
+"pm;","U+000B1"
+"pointint;","U+02A15"
+"popf;","U+1D561"
+"pound;","U+000A3"
+"pound","U+000A3"
+"pr;","U+0227A"
+"prE;","U+02AB3"
+"prap;","U+02AB7"
+"prcue;","U+0227C"
+"pre;","U+02AAF"
+"prec;","U+0227A"
+"precapprox;","U+02AB7"
+"preccurlyeq;","U+0227C"
+"preceq;","U+02AAF"
+"precnapprox;","U+02AB9"
+"precneqq;","U+02AB5"
+"precnsim;","U+022E8"
+"precsim;","U+0227E"
+"prime;","U+02032"
+"primes;","U+02119"
+"prnE;","U+02AB5"
+"prnap;","U+02AB9"
+"prnsim;","U+022E8"
+"prod;","U+0220F"
+"profalar;","U+0232E"
+"profline;","U+02312"
+"profsurf;","U+02313"
+"prop;","U+0221D"
+"propto;","U+0221D"
+"prsim;","U+0227E"
+"prurel;","U+022B0"
+"pscr;","U+1D4C5"
+"psi;","U+003C8"
+"puncsp;","U+02008"
+"qfr;","U+1D52E"
+"qint;","U+02A0C"
+"qopf;","U+1D562"
+"qprime;","U+02057"
+"qscr;","U+1D4C6"
+"quaternions;","U+0210D"
+"quatint;","U+02A16"
+"quest;","U+0003F"
+"questeq;","U+0225F"
+"quot;","U+00022"
+"quot","U+00022"
+"rAarr;","U+021DB"
+"rArr;","U+021D2"
+"rAtail;","U+0291C"
+"rBarr;","U+0290F"
+"rHar;","U+02964"
+"racute;","U+00155"
+"radic;","U+0221A"
+"raemptyv;","U+029B3"
+"rang;","U+027E9"
+"rangd;","U+02992"
+"range;","U+029A5"
+"rangle;","U+027E9"
+"raquo;","U+000BB"
+"raquo","U+000BB"
+"rarr;","U+02192"
+"rarrap;","U+02975"
+"rarrb;","U+021E5"
+"rarrbfs;","U+02920"
+"rarrc;","U+02933"
+"rarrfs;","U+0291E"
+"rarrhk;","U+021AA"
+"rarrlp;","U+021AC"
+"rarrpl;","U+02945"
+"rarrsim;","U+02974"
+"rarrtl;","U+021A3"
+"rarrw;","U+0219D"
+"ratail;","U+0291A"
+"ratio;","U+02236"
+"rationals;","U+0211A"
+"rbarr;","U+0290D"
+"rbbrk;","U+02773"
+"rbrace;","U+0007D"
+"rbrack;","U+0005D"
+"rbrke;","U+0298C"
+"rbrksld;","U+0298E"
+"rbrkslu;","U+02990"
+"rcaron;","U+00159"
+"rcedil;","U+00157"
+"rceil;","U+02309"
+"rcub;","U+0007D"
+"rcy;","U+00440"
+"rdca;","U+02937"
+"rdldhar;","U+02969"
+"rdquo;","U+0201D"
+"rdquor;","U+0201D"
+"rdsh;","U+021B3"
+"real;","U+0211C"
+"realine;","U+0211B"
+"realpart;","U+0211C"
+"reals;","U+0211D"
+"rect;","U+025AD"
+"reg;","U+000AE"
+"reg","U+000AE"
+"rfisht;","U+0297D"
+"rfloor;","U+0230B"
+"rfr;","U+1D52F"
+"rhard;","U+021C1"
+"rharu;","U+021C0"
+"rharul;","U+0296C"
+"rho;","U+003C1"
+"rhov;","U+003F1"
+"rightarrow;","U+02192"
+"rightarrowtail;","U+021A3"
+"rightharpoondown;","U+021C1"
+"rightharpoonup;","U+021C0"
+"rightleftarrows;","U+021C4"
+"rightleftharpoons;","U+021CC"
+"rightrightarrows;","U+021C9"
+"rightsquigarrow;","U+0219D"
+"rightthreetimes;","U+022CC"
+"ring;","U+002DA"
+"risingdotseq;","U+02253"
+"rlarr;","U+021C4"
+"rlhar;","U+021CC"
+"rlm;","U+0200F"
+"rmoust;","U+023B1"
+"rmoustache;","U+023B1"
+"rnmid;","U+02AEE"
+"roang;","U+027ED"
+"roarr;","U+021FE"
+"robrk;","U+027E7"
+"ropar;","U+02986"
+"ropf;","U+1D563"
+"roplus;","U+02A2E"
+"rotimes;","U+02A35"
+"rpar;","U+00029"
+"rpargt;","U+02994"
+"rppolint;","U+02A12"
+"rrarr;","U+021C9"
+"rsaquo;","U+0203A"
+"rscr;","U+1D4C7"
+"rsh;","U+021B1"
+"rsqb;","U+0005D"
+"rsquo;","U+02019"
+"rsquor;","U+02019"
+"rthree;","U+022CC"
+"rtimes;","U+022CA"
+"rtri;","U+025B9"
+"rtrie;","U+022B5"
+"rtrif;","U+025B8"
+"rtriltri;","U+029CE"
+"ruluhar;","U+02968"
+"rx;","U+0211E"
+"sacute;","U+0015B"
+"sbquo;","U+0201A"
+"sc;","U+0227B"
+"scE;","U+02AB4"
+"scap;","U+02AB8"
+"scaron;","U+00161"
+"sccue;","U+0227D"
+"sce;","U+02AB0"
+"scedil;","U+0015F"
+"scirc;","U+0015D"
+"scnE;","U+02AB6"
+"scnap;","U+02ABA"
+"scnsim;","U+022E9"
+"scpolint;","U+02A13"
+"scsim;","U+0227F"
+"scy;","U+00441"
+"sdot;","U+022C5"
+"sdotb;","U+022A1"
+"sdote;","U+02A66"
+"seArr;","U+021D8"
+"searhk;","U+02925"
+"searr;","U+02198"
+"searrow;","U+02198"
+"sect;","U+000A7"
+"sect","U+000A7"
+"semi;","U+0003B"
+"seswar;","U+02929"
+"setminus;","U+02216"
+"setmn;","U+02216"
+"sext;","U+02736"
+"sfr;","U+1D530"
+"sfrown;","U+02322"
+"sharp;","U+0266F"
+"shchcy;","U+00449"
+"shcy;","U+00448"
+"shortmid;","U+02223"
+"shortparallel;","U+02225"
+"shy;","U+000AD "
+"shy","U+000AD "
+"sigma;","U+003C3"
+"sigmaf;","U+003C2"
+"sigmav;","U+003C2"
+"sim;","U+0223C"
+"simdot;","U+02A6A"
+"sime;","U+02243"
+"simeq;","U+02243"
+"simg;","U+02A9E"
+"simgE;","U+02AA0"
+"siml;","U+02A9D"
+"simlE;","U+02A9F"
+"simne;","U+02246"
+"simplus;","U+02A24"
+"simrarr;","U+02972"
+"slarr;","U+02190"
+"smallsetminus;","U+02216"
+"smashp;","U+02A33"
+"smeparsl;","U+029E4"
+"smid;","U+02223"
+"smile;","U+02323"
+"smt;","U+02AAA"
+"smte;","U+02AAC"
+"softcy;","U+0044C"
+"sol;","U+0002F"
+"solb;","U+029C4"
+"solbar;","U+0233F"
+"sopf;","U+1D564"
+"spades;","U+02660"
+"spadesuit;","U+02660"
+"spar;","U+02225"
+"sqcap;","U+02293"
+"sqcup;","U+02294"
+"sqsub;","U+0228F"
+"sqsube;","U+02291"
+"sqsubset;","U+0228F"
+"sqsubseteq;","U+02291"
+"sqsup;","U+02290"
+"sqsupe;","U+02292"
+"sqsupset;","U+02290"
+"sqsupseteq;","U+02292"
+"squ;","U+025A1"
+"square;","U+025A1"
+"squarf;","U+025AA"
+"squf;","U+025AA"
+"srarr;","U+02192"
+"sscr;","U+1D4C8"
+"ssetmn;","U+02216"
+"ssmile;","U+02323"
+"sstarf;","U+022C6"
+"star;","U+02606"
+"starf;","U+02605"
+"straightepsilon;","U+003F5"
+"straightphi;","U+003D5"
+"strns;","U+000AF"
+"sub;","U+02282"
+"subE;","U+02AC5"
+"subdot;","U+02ABD"
+"sube;","U+02286"
+"subedot;","U+02AC3"
+"submult;","U+02AC1"
+"subnE;","U+02ACB"
+"subne;","U+0228A"
+"subplus;","U+02ABF"
+"subrarr;","U+02979"
+"subset;","U+02282"
+"subseteq;","U+02286"
+"subseteqq;","U+02AC5"
+"subsetneq;","U+0228A"
+"subsetneqq;","U+02ACB"
+"subsim;","U+02AC7"
+"subsub;","U+02AD5"
+"subsup;","U+02AD3"
+"succ;","U+0227B"
+"succapprox;","U+02AB8"
+"succcurlyeq;","U+0227D"
+"succeq;","U+02AB0"
+"succnapprox;","U+02ABA"
+"succneqq;","U+02AB6"
+"succnsim;","U+022E9"
+"succsim;","U+0227F"
+"sum;","U+02211"
+"sung;","U+0266A"
+"sup1;","U+000B9"
+"sup1","U+000B9"
+"sup2;","U+000B2"
+"sup2","U+000B2"
+"sup3;","U+000B3"
+"sup3","U+000B3"
+"sup;","U+02283"
+"supE;","U+02AC6"
+"supdot;","U+02ABE"
+"supdsub;","U+02AD8"
+"supe;","U+02287"
+"supedot;","U+02AC4"
+"suphsol;","U+027C9"
+"suphsub;","U+02AD7"
+"suplarr;","U+0297B"
+"supmult;","U+02AC2"
+"supnE;","U+02ACC"
+"supne;","U+0228B"
+"supplus;","U+02AC0"
+"supset;","U+02283"
+"supseteq;","U+02287"
+"supseteqq;","U+02AC6"
+"supsetneq;","U+0228B"
+"supsetneqq;","U+02ACC"
+"supsim;","U+02AC8"
+"supsub;","U+02AD4"
+"supsup;","U+02AD6"
+"swArr;","U+021D9"
+"swarhk;","U+02926"
+"swarr;","U+02199"
+"swarrow;","U+02199"
+"swnwar;","U+0292A"
+"szlig;","U+000DF"
+"szlig","U+000DF"
+"target;","U+02316"
+"tau;","U+003C4"
+"tbrk;","U+023B4"
+"tcaron;","U+00165"
+"tcedil;","U+00163"
+"tcy;","U+00442"
+"tdot;","U+020DB"
+"telrec;","U+02315"
+"tfr;","U+1D531"
+"there4;","U+02234"
+"therefore;","U+02234"
+"theta;","U+003B8"
+"thetasym;","U+003D1"
+"thetav;","U+003D1"
+"thickapprox;","U+02248"
+"thicksim;","U+0223C"
+"thinsp;","U+02009"
+"thkap;","U+02248"
+"thksim;","U+0223C"
+"thorn;","U+000FE"
+"thorn","U+000FE"
+"tilde;","U+002DC"
+"times;","U+000D7"
+"times","U+000D7"
+"timesb;","U+022A0"
+"timesbar;","U+02A31"
+"timesd;","U+02A30"
+"tint;","U+0222D"
+"toea;","U+02928"
+"top;","U+022A4"
+"topbot;","U+02336"
+"topcir;","U+02AF1"
+"topf;","U+1D565"
+"topfork;","U+02ADA"
+"tosa;","U+02929"
+"tprime;","U+02034"
+"trade;","U+02122"
+"triangle;","U+025B5"
+"triangledown;","U+025BF"
+"triangleleft;","U+025C3"
+"trianglelefteq;","U+022B4"
+"triangleq;","U+0225C"
+"triangleright;","U+025B9"
+"trianglerighteq;","U+022B5"
+"tridot;","U+025EC"
+"trie;","U+0225C"
+"triminus;","U+02A3A"
+"triplus;","U+02A39"
+"trisb;","U+029CD"
+"tritime;","U+02A3B"
+"trpezium;","U+023E2"
+"tscr;","U+1D4C9"
+"tscy;","U+00446"
+"tshcy;","U+0045B"
+"tstrok;","U+00167"
+"twixt;","U+0226C"
+"twoheadleftarrow;","U+0219E"
+"twoheadrightarrow;","U+021A0"
+"uArr;","U+021D1"
+"uHar;","U+02963"
+"uacute;","U+000FA"
+"uacute","U+000FA"
+"uarr;","U+02191"
+"ubrcy;","U+0045E"
+"ubreve;","U+0016D"
+"ucirc;","U+000FB"
+"ucirc","U+000FB"
+"ucy;","U+00443"
+"udarr;","U+021C5"
+"udblac;","U+00171"
+"udhar;","U+0296E"
+"ufisht;","U+0297E"
+"ufr;","U+1D532"
+"ugrave;","U+000F9"
+"ugrave","U+000F9"
+"uharl;","U+021BF"
+"uharr;","U+021BE"
+"uhblk;","U+02580"
+"ulcorn;","U+0231C"
+"ulcorner;","U+0231C"
+"ulcrop;","U+0230F"
+"ultri;","U+025F8"
+"umacr;","U+0016B"
+"uml;","U+000A8"
+"uml","U+000A8"
+"uogon;","U+00173"
+"uopf;","U+1D566"
+"uparrow;","U+02191"
+"updownarrow;","U+02195"
+"upharpoonleft;","U+021BF"
+"upharpoonright;","U+021BE"
+"uplus;","U+0228E"
+"upsi;","U+003C5"
+"upsih;","U+003D2"
+"upsilon;","U+003C5"
+"upuparrows;","U+021C8"
+"urcorn;","U+0231D"
+"urcorner;","U+0231D"
+"urcrop;","U+0230E"
+"uring;","U+0016F"
+"urtri;","U+025F9"
+"uscr;","U+1D4CA"
+"utdot;","U+022F0"
+"utilde;","U+00169"
+"utri;","U+025B5"
+"utrif;","U+025B4"
+"uuarr;","U+021C8"
+"uuml;","U+000FC"
+"uuml","U+000FC"
+"uwangle;","U+029A7"
+"vArr;","U+021D5"
+"vBar;","U+02AE8"
+"vBarv;","U+02AE9"
+"vDash;","U+022A8"
+"vangrt;","U+0299C"
+"varepsilon;","U+003F5"
+"varkappa;","U+003F0"
+"varnothing;","U+02205"
+"varphi;","U+003D5"
+"varpi;","U+003D6"
+"varpropto;","U+0221D"
+"varr;","U+02195"
+"varrho;","U+003F1"
+"varsigma;","U+003C2"
+"vartheta;","U+003D1"
+"vartriangleleft;","U+022B2"
+"vartriangleright;","U+022B3"
+"vcy;","U+00432"
+"vdash;","U+022A2"
+"vee;","U+02228"
+"veebar;","U+022BB"
+"veeeq;","U+0225A"
+"vellip;","U+022EE"
+"verbar;","U+0007C"
+"vert;","U+0007C"
+"vfr;","U+1D533"
+"vltri;","U+022B2"
+"vopf;","U+1D567"
+"vprop;","U+0221D"
+"vrtri;","U+022B3"
+"vscr;","U+1D4CB"
+"vzigzag;","U+0299A"
+"wcirc;","U+00175"
+"wedbar;","U+02A5F"
+"wedge;","U+02227"
+"wedgeq;","U+02259"
+"weierp;","U+02118"
+"wfr;","U+1D534"
+"wopf;","U+1D568"
+"wp;","U+02118"
+"wr;","U+02240"
+"wreath;","U+02240"
+"wscr;","U+1D4CC"
+"xcap;","U+022C2"
+"xcirc;","U+025EF"
+"xcup;","U+022C3"
+"xdtri;","U+025BD"
+"xfr;","U+1D535"
+"xhArr;","U+027FA"
+"xharr;","U+027F7"
+"xi;","U+003BE"
+"xlArr;","U+027F8"
+"xlarr;","U+027F5"
+"xmap;","U+027FC"
+"xnis;","U+022FB"
+"xodot;","U+02A00"
+"xopf;","U+1D569"
+"xoplus;","U+02A01"
+"xotime;","U+02A02"
+"xrArr;","U+027F9"
+"xrarr;","U+027F6"
+"xscr;","U+1D4CD"
+"xsqcup;","U+02A06"
+"xuplus;","U+02A04"
+"xutri;","U+025B3"
+"xvee;","U+022C1"
+"xwedge;","U+022C0"
+"yacute;","U+000FD"
+"yacute","U+000FD"
+"yacy;","U+0044F"
+"ycirc;","U+00177"
+"ycy;","U+0044B"
+"yen;","U+000A5"
+"yen","U+000A5"
+"yfr;","U+1D536"
+"yicy;","U+00457"
+"yopf;","U+1D56A"
+"yscr;","U+1D4CE"
+"yucy;","U+0044E"
+"yuml;","U+000FF"
+"yuml","U+000FF"
+"zacute;","U+0017A"
+"zcaron;","U+0017E"
+"zcy;","U+00437"
+"zdot;","U+0017C"
+"zeetrf;","U+02128"
+"zeta;","U+003B6"
+"zfr;","U+1D537"
+"zhcy;","U+00436"
+"zigrarr;","U+021DD"
+"zopf;","U+1D56B"
+"zscr;","U+1D4CF"
+"zwj;","U+0200D"
+"zwnj;","U+0200C"
diff --git a/WebCore/html/HTMLEntityParser.cpp b/WebCore/html/parser/HTMLEntityParser.cpp
index f675844..6a422b8 100644
--- a/WebCore/html/HTMLEntityParser.cpp
+++ b/WebCore/html/parser/HTMLEntityParser.cpp
@@ -45,23 +45,36 @@ static const UChar windowsLatin1ExtensionArray[32] = {
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178, // 98-9F
};
-inline UChar adjustEntity(unsigned value)
+inline UChar adjustEntity(UChar32 value)
{
if ((value & ~0x1F) != 0x0080)
return value;
return windowsLatin1ExtensionArray[value - 0x80];
}
-inline unsigned legalEntityFor(unsigned value)
+inline UChar32 legalEntityFor(UChar32 value)
{
// FIXME: A number of specific entity values generate parse errors.
if (value == 0 || value > 0x10FFFF || (value >= 0xD800 && value <= 0xDFFF))
return 0xFFFD;
- if (value < 0xFFFF)
+ if (U_IS_BMP(value))
return adjustEntity(value);
return value;
}
+inline bool convertToUTF16(UChar32 value, Vector<UChar, 16>& decodedEntity)
+{
+ if (U_IS_BMP(value)) {
+ UChar character = static_cast<UChar>(value);
+ ASSERT(character == value);
+ decodedEntity.append(character);
+ return true;
+ }
+ decodedEntity.append(U16_LEAD(value));
+ decodedEntity.append(U16_TRAIL(value));
+ return true;
+}
+
inline bool isHexDigit(UChar cc)
{
return (cc >= '0' && cc <= '9') || (cc >= 'a' && cc <= 'f') || (cc >= 'A' && cc <= 'F');
@@ -85,14 +98,15 @@ void unconsumeCharacters(SegmentedString& source, const Vector<UChar, 10>& consu
}
-unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, UChar additionalAllowedCharacter)
+bool consumeHTMLEntity(SegmentedString& source, Vector<UChar, 16>& decodedEntity, bool& notEnoughCharacters, UChar additionalAllowedCharacter)
{
ASSERT(!additionalAllowedCharacter || additionalAllowedCharacter == '"' || additionalAllowedCharacter == '\'' || additionalAllowedCharacter == '>');
ASSERT(!notEnoughCharacters);
+ ASSERT(decodedEntity.isEmpty());
enum EntityState {
Initial,
- NumberType,
+ Number,
MaybeHexLowerCaseX,
MaybeHexUpperCaseX,
Hex,
@@ -100,7 +114,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
Named
};
EntityState entityState = Initial;
- unsigned result = 0;
+ UChar32 result = 0;
Vector<UChar, 10> consumedCharacters;
while (!source.isEmpty()) {
@@ -108,20 +122,20 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
switch (entityState) {
case Initial: {
if (cc == '\x09' || cc == '\x0A' || cc == '\x0C' || cc == ' ' || cc == '<' || cc == '&')
- return 0;
+ return false;
if (additionalAllowedCharacter && cc == additionalAllowedCharacter)
- return 0;
+ return false;
if (cc == '#') {
- entityState = NumberType;
+ entityState = Number;
break;
}
if ((cc >= 'a' && cc <= 'z') || (cc >= 'A' && cc <= 'Z')) {
entityState = Named;
continue;
}
- return 0;
+ return false;
}
- case NumberType: {
+ case Number: {
if (cc == 'x') {
entityState = MaybeHexLowerCaseX;
break;
@@ -135,7 +149,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
continue;
}
source.push('#');
- return 0;
+ return false;
}
case MaybeHexLowerCaseX: {
if (isHexDigit(cc)) {
@@ -144,7 +158,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
}
source.push('#');
source.push('x');
- return 0;
+ return false;
}
case MaybeHexUpperCaseX: {
if (isHexDigit(cc)) {
@@ -153,7 +167,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
}
source.push('#');
source.push('X');
- return 0;
+ return false;
}
case Hex: {
if (cc >= '0' && cc <= '9')
@@ -162,21 +176,21 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
result = result * 16 + 10 + cc - 'a';
else if (cc >= 'A' && cc <= 'F')
result = result * 16 + 10 + cc - 'A';
- else if (cc == ';') {
- source.advancePastNonNewline();
- return legalEntityFor(result);
- } else
- return legalEntityFor(result);
+ else {
+ if (cc == ';')
+ source.advanceAndASSERT(cc);
+ return convertToUTF16(legalEntityFor(result), decodedEntity);
+ }
break;
}
case Decimal: {
if (cc >= '0' && cc <= '9')
result = result * 10 + cc - '0';
- else if (cc == ';') {
- source.advancePastNonNewline();
- return legalEntityFor(result);
- } else
- return legalEntityFor(result);
+ else {
+ if (cc == ';')
+ source.advanceAndASSERT(cc);
+ return convertToUTF16(legalEntityFor(result), decodedEntity);
+ }
break;
}
case Named: {
@@ -194,12 +208,12 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
// We can't an entity because there might be a longer entity
// that we could match if we had more data.
unconsumeCharacters(source, consumedCharacters);
- return 0;
+ return false;
}
if (!entitySearch.mostRecentMatch()) {
ASSERT(!entitySearch.currentValue());
unconsumeCharacters(source, consumedCharacters);
- return 0;
+ return false;
}
if (entitySearch.mostRecentMatch()->length != entitySearch.currentLength()) {
// We've consumed too many characters. We need to walk the
@@ -218,12 +232,13 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
}
cc = *source;
}
- if (entitySearch.mostRecentMatch()->lastCharacter() == ';')
- return entitySearch.mostRecentMatch()->value;
- if (!additionalAllowedCharacter || !(isAlphaNumeric(cc) || cc == '='))
- return entitySearch.mostRecentMatch()->value;
+ if (entitySearch.mostRecentMatch()->lastCharacter() == ';'
+ || !additionalAllowedCharacter
+ || !(isAlphaNumeric(cc) || cc == '=')) {
+ return convertToUTF16(entitySearch.mostRecentMatch()->value, decodedEntity);
+ }
unconsumeCharacters(source, consumedCharacters);
- return 0;
+ return false;
}
}
consumedCharacters.append(cc);
@@ -232,7 +247,7 @@ unsigned consumeHTMLEntity(SegmentedString& source, bool& notEnoughCharacters, U
ASSERT(source.isEmpty());
notEnoughCharacters = true;
unconsumeCharacters(source, consumedCharacters);
- return 0;
+ return false;
}
UChar decodeNamedEntity(const char* name)
diff --git a/WebCore/html/HTMLEntityParser.h b/WebCore/html/parser/HTMLEntityParser.h
index 1059b24..f02e849 100644
--- a/WebCore/html/HTMLEntityParser.h
+++ b/WebCore/html/parser/HTMLEntityParser.h
@@ -31,7 +31,7 @@
namespace WebCore {
-unsigned consumeHTMLEntity(SegmentedString&, bool& notEnoughCharacters, UChar additionalAllowedCharacter = '\0');
+bool consumeHTMLEntity(SegmentedString&, Vector<UChar, 16>& decodedEntity, bool& notEnoughCharacters, UChar additionalAllowedCharacter = '\0');
// Used by the XML parser. Not suitable for use in HTML parsing. Use consumeHTMLEntity instead.
UChar decodeNamedEntity(const char*);
diff --git a/WebCore/html/HTMLEntitySearch.cpp b/WebCore/html/parser/HTMLEntitySearch.cpp
index 580609e..580609e 100644
--- a/WebCore/html/HTMLEntitySearch.cpp
+++ b/WebCore/html/parser/HTMLEntitySearch.cpp
diff --git a/WebCore/html/HTMLEntitySearch.h b/WebCore/html/parser/HTMLEntitySearch.h
index 11a23ae..0c66318 100644
--- a/WebCore/html/HTMLEntitySearch.h
+++ b/WebCore/html/parser/HTMLEntitySearch.h
@@ -39,7 +39,7 @@ public:
void advance(UChar);
bool isEntityPrefix() const { return !!m_first; }
- int currentValue() const { return m_currentValue; }
+ UChar32 currentValue() const { return m_currentValue; }
int currentLength() const { return m_currentLength; }
const HTMLEntityTableEntry* mostRecentMatch() const { return m_mostRecentMatch; }
@@ -63,7 +63,7 @@ private:
}
int m_currentLength;
- int m_currentValue;
+ UChar32 m_currentValue;
const HTMLEntityTableEntry* m_mostRecentMatch;
const HTMLEntityTableEntry* m_first;
diff --git a/WebCore/html/HTMLEntityTable.h b/WebCore/html/parser/HTMLEntityTable.h
index 3734c34..3b9ab4e 100644
--- a/WebCore/html/HTMLEntityTable.h
+++ b/WebCore/html/parser/HTMLEntityTable.h
@@ -35,7 +35,7 @@ struct HTMLEntityTableEntry {
const UChar* entity;
int length;
- int value;
+ UChar32 value;
};
class HTMLEntityTable {
diff --git a/WebCore/html/HTMLFormattingElementList.cpp b/WebCore/html/parser/HTMLFormattingElementList.cpp
index 22bf03e..22bf03e 100644
--- a/WebCore/html/HTMLFormattingElementList.cpp
+++ b/WebCore/html/parser/HTMLFormattingElementList.cpp
diff --git a/WebCore/html/HTMLFormattingElementList.h b/WebCore/html/parser/HTMLFormattingElementList.h
index aca05bb..aca05bb 100644
--- a/WebCore/html/HTMLFormattingElementList.h
+++ b/WebCore/html/parser/HTMLFormattingElementList.h
diff --git a/WebCore/html/HTMLParserScheduler.cpp b/WebCore/html/parser/HTMLParserScheduler.cpp
index 6e67697..6e67697 100644
--- a/WebCore/html/HTMLParserScheduler.cpp
+++ b/WebCore/html/parser/HTMLParserScheduler.cpp
diff --git a/WebCore/html/HTMLParserScheduler.h b/WebCore/html/parser/HTMLParserScheduler.h
index 5be33b0..5be33b0 100644
--- a/WebCore/html/HTMLParserScheduler.h
+++ b/WebCore/html/parser/HTMLParserScheduler.h
diff --git a/WebCore/html/HTMLPreloadScanner.cpp b/WebCore/html/parser/HTMLPreloadScanner.cpp
index 7aafd90..7aafd90 100644
--- a/WebCore/html/HTMLPreloadScanner.cpp
+++ b/WebCore/html/parser/HTMLPreloadScanner.cpp
diff --git a/WebCore/html/HTMLPreloadScanner.h b/WebCore/html/parser/HTMLPreloadScanner.h
index 94a90e6..94a90e6 100644
--- a/WebCore/html/HTMLPreloadScanner.h
+++ b/WebCore/html/parser/HTMLPreloadScanner.h
diff --git a/WebCore/html/HTMLScriptRunner.cpp b/WebCore/html/parser/HTMLScriptRunner.cpp
index 6d470a0..6d470a0 100644
--- a/WebCore/html/HTMLScriptRunner.cpp
+++ b/WebCore/html/parser/HTMLScriptRunner.cpp
diff --git a/WebCore/html/HTMLScriptRunner.h b/WebCore/html/parser/HTMLScriptRunner.h
index ead9289..ead9289 100644
--- a/WebCore/html/HTMLScriptRunner.h
+++ b/WebCore/html/parser/HTMLScriptRunner.h
diff --git a/WebCore/html/HTMLScriptRunnerHost.h b/WebCore/html/parser/HTMLScriptRunnerHost.h
index 5b40a931..5b40a931 100644
--- a/WebCore/html/HTMLScriptRunnerHost.h
+++ b/WebCore/html/parser/HTMLScriptRunnerHost.h
diff --git a/WebCore/html/HTMLToken.h b/WebCore/html/parser/HTMLToken.h
index 42cddb8..42cddb8 100644
--- a/WebCore/html/HTMLToken.h
+++ b/WebCore/html/parser/HTMLToken.h
diff --git a/WebCore/html/HTMLTokenizer.cpp b/WebCore/html/parser/HTMLTokenizer.cpp
index a18701a..5791842 100644
--- a/WebCore/html/HTMLTokenizer.cpp
+++ b/WebCore/html/parser/HTMLTokenizer.cpp
@@ -67,6 +67,12 @@ inline void advanceStringAndASSERTIgnoringCase(SegmentedString& source, const ch
source.advanceAndASSERTIgnoringCase(*expectedCharacters++);
}
+inline void advanceStringAndASSERT(SegmentedString& source, const char* expectedCharacters)
+{
+ while (*expectedCharacters)
+ source.advanceAndASSERT(*expectedCharacters++);
+}
+
inline bool vectorEqualsString(const Vector<UChar, 32>& vector, const String& string)
{
if (vector.size() != string.length())
@@ -113,19 +119,25 @@ void HTMLTokenizer::reset()
m_lineNumber = 0;
m_skipLeadingNewLineForListing = false;
m_forceNullCharacterReplacement = false;
+ m_shouldAllowCDATA = false;
m_additionalAllowedCharacter = '\0';
}
inline bool HTMLTokenizer::processEntity(SegmentedString& source)
{
bool notEnoughCharacters = false;
- unsigned value = consumeHTMLEntity(source, notEnoughCharacters);
+ Vector<UChar, 16> decodedEntity;
+ bool success = consumeHTMLEntity(source, decodedEntity, notEnoughCharacters);
if (notEnoughCharacters)
return false;
- if (!value)
+ if (!success) {
+ ASSERT(decodedEntity.isEmpty());
bufferCharacter('&');
- else
- bufferCodePoint(value);
+ } else {
+ Vector<UChar>::const_iterator iter = decodedEntity.begin();
+ for (; iter != decodedEntity.end(); ++iter)
+ bufferCharacter(*iter);
+ }
return true;
}
@@ -1027,16 +1039,17 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token)
BEGIN_STATE(CharacterReferenceInAttributeValueState) {
bool notEnoughCharacters = false;
- unsigned value = consumeHTMLEntity(source, notEnoughCharacters, m_additionalAllowedCharacter);
+ Vector<UChar, 16> decodedEntity;
+ bool success = consumeHTMLEntity(source, decodedEntity, notEnoughCharacters, m_additionalAllowedCharacter);
if (notEnoughCharacters)
return haveBufferedCharacterToken();
- if (!value)
+ if (!success) {
+ ASSERT(decodedEntity.isEmpty());
m_token->appendToAttributeValue('&');
- else if (value < 0xFFFF)
- m_token->appendToAttributeValue(value);
- else {
- m_token->appendToAttributeValue(U16_LEAD(value));
- m_token->appendToAttributeValue(U16_TRAIL(value));
+ } else {
+ Vector<UChar>::const_iterator iter = decodedEntity.begin();
+ for (; iter != decodedEntity.end(); ++iter)
+ m_token->appendToAttributeValue(*iter);
}
// We're supposed to switch back to the attribute value state that
// we were in when we were switched into this state. Rather than
@@ -1105,6 +1118,7 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token)
BEGIN_STATE(MarkupDeclarationOpenState) {
DEFINE_STATIC_LOCAL(String, dashDashString, ("--"));
DEFINE_STATIC_LOCAL(String, doctypeString, ("doctype"));
+ DEFINE_STATIC_LOCAL(String, cdataString, ("[CDATA["));
if (cc == '-') {
SegmentedString::LookAheadResult result = source.lookAhead(dashDashString);
if (result == SegmentedString::DidMatch) {
@@ -1121,10 +1135,14 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token)
SWITCH_TO(DOCTYPEState);
} else if (result == SegmentedString::NotEnoughCharacters)
return haveBufferedCharacterToken();
+ } else if (cc == '[' && shouldAllowCDATA()) {
+ SegmentedString::LookAheadResult result = source.lookAhead(cdataString);
+ if (result == SegmentedString::DidMatch) {
+ advanceStringAndASSERT(source, "[CDATA[");
+ SWITCH_TO(CDATASectionState);
+ } else if (result == SegmentedString::NotEnoughCharacters)
+ return haveBufferedCharacterToken();
}
- notImplemented();
- // FIXME: We're still missing the bits about the insertion mode being in foreign content:
- // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#markup-declaration-open-state
parseError();
RECONSUME_IN(BogusCommentState);
}
@@ -1599,9 +1617,34 @@ bool HTMLTokenizer::nextToken(SegmentedString& source, HTMLToken& token)
END_STATE()
BEGIN_STATE(CDATASectionState) {
- notImplemented();
- ADVANCE_TO(CDATASectionState);
- // FIXME: Handle EOF properly.
+ if (cc == ']')
+ ADVANCE_TO(CDATASectionRightSquareBracketState);
+ else if (cc == InputStreamPreprocessor::endOfFileMarker)
+ RECONSUME_IN(DataState);
+ else {
+ bufferCharacter(cc);
+ ADVANCE_TO(CDATASectionState);
+ }
+ }
+ END_STATE()
+
+ BEGIN_STATE(CDATASectionRightSquareBracketState) {
+ if (cc == ']')
+ ADVANCE_TO(CDATASectionDoubleRightSquareBracketState);
+ else {
+ bufferCharacter(']');
+ RECONSUME_IN(CDATASectionState);
+ }
+ }
+
+ BEGIN_STATE(CDATASectionDoubleRightSquareBracketState) {
+ if (cc == '>')
+ ADVANCE_TO(DataState);
+ else {
+ bufferCharacter(']');
+ bufferCharacter(']');
+ RECONSUME_IN(CDATASectionState);
+ }
}
END_STATE()
@@ -1634,16 +1677,6 @@ inline void HTMLTokenizer::bufferCharacter(UChar character)
m_token->appendToCharacter(character);
}
-inline void HTMLTokenizer::bufferCodePoint(unsigned value)
-{
- if (value < 0xFFFF) {
- bufferCharacter(value);
- return;
- }
- bufferCharacter(U16_LEAD(value));
- bufferCharacter(U16_TRAIL(value));
-}
-
inline void HTMLTokenizer::parseError()
{
notImplemented();
diff --git a/WebCore/html/HTMLTokenizer.h b/WebCore/html/parser/HTMLTokenizer.h
index 2b93e15..bab77f3 100644
--- a/WebCore/html/HTMLTokenizer.h
+++ b/WebCore/html/parser/HTMLTokenizer.h
@@ -114,6 +114,9 @@ public:
AfterDOCTYPESystemIdentifierState,
BogusDOCTYPEState,
CDATASectionState,
+ // These CDATA states are not in the HTML5 spec, but we use them internally.
+ CDATASectionRightSquareBracketState,
+ CDATASectionDoubleRightSquareBracketState,
};
static PassOwnPtr<HTMLTokenizer> create() { return adoptPtr(new HTMLTokenizer); }
@@ -139,6 +142,9 @@ public:
bool forceNullCharacterReplacement() const { return m_forceNullCharacterReplacement; }
void setForceNullCharacterReplacement(bool value) { m_forceNullCharacterReplacement = value; }
+ bool shouldAllowCDATA() const { return m_shouldAllowCDATA; }
+ void setShouldAllowCDATA(bool value) { m_shouldAllowCDATA = value; }
+
bool shouldSkipNullCharacters() const
{
return !m_forceNullCharacterReplacement
@@ -270,6 +276,7 @@ private:
bool m_skipLeadingNewLineForListing;
bool m_forceNullCharacterReplacement;
+ bool m_shouldAllowCDATA;
// http://www.whatwg.org/specs/web-apps/current-work/#temporary-buffer
Vector<UChar, 32> m_temporaryBuffer;
diff --git a/WebCore/html/HTMLTreeBuilder.cpp b/WebCore/html/parser/HTMLTreeBuilder.cpp
index 24eb62f..8c76fc0 100644
--- a/WebCore/html/HTMLTreeBuilder.cpp
+++ b/WebCore/html/parser/HTMLTreeBuilder.cpp
@@ -200,20 +200,6 @@ bool isSpecialNode(Node* node)
|| tagName == xmpTag;
}
-// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#scoping
-// and isScopeMarker in HTMLElementStack.cpp
-bool isScopingTag(const AtomicString& tagName)
-{
- return tagName == appletTag
- || tagName == captionTag
- || tagName == SVGNames::foreignObjectTag
- || tagName == htmlTag
- || tagName == marqueeTag
- || tagName == objectTag
- || tagName == tableTag
- || isTableCellContextTag(tagName);
-}
-
bool isNonAnchorNonNobrFormattingTag(const AtomicString& tagName)
{
return tagName == bTag
@@ -255,16 +241,6 @@ HTMLFormElement* closestFormAncestor(Element* element)
return 0;
}
-// FIXME: This belongs on ContainerNode, where it could avoid the double ref
-// by directly releasing into the Vector. Such an implementation would need to
-// be careful not to send mutation events.
-void takeChildrenFromNode(ContainerNode* container, Vector<RefPtr<Node> >& children)
-{
- for (Node* child = container->firstChild(); child; child = child->nextSibling())
- children.append(child);
- container->removeAllChildren();
-}
-
} // namespace
class HTMLTreeBuilder::ExternalCharacterTokenBuffer : public Noncopyable {
@@ -397,7 +373,7 @@ HTMLTreeBuilder::HTMLTreeBuilder(HTMLTokenizer* tokenizer, DocumentFragment* fra
if (contextElement) {
// Steps 4.2-4.6 of the HTML5 Fragment Case parsing algorithm:
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#fragment-case
- m_document->setParseMode(contextElement->document()->parseMode());
+ m_document->setCompatibilityMode(contextElement->document()->compatibilityMode());
processFakeStartTag(htmlTag);
resetInsertionModeAppropriately();
m_tree.setForm(closestFormAncestor(contextElement));
@@ -431,6 +407,7 @@ HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext(DocumentFragment
, m_contextElement(contextElement)
, m_scriptingPermission(scriptingPermission)
{
+ m_dummyDocumentForFragmentParsing->setCompatibilityMode(fragment->document()->compatibilityMode());
}
Document* HTMLTreeBuilder::FragmentParsingContext::document() const
@@ -445,15 +422,7 @@ void HTMLTreeBuilder::FragmentParsingContext::finished()
ContainerNode* root = m_dummyDocumentForFragmentParsing.get();
if (m_contextElement)
root = m_dummyDocumentForFragmentParsing->documentElement();
- Vector<RefPtr<Node> > children;
- takeChildrenFromNode(root, children);
- for (unsigned i = 0; i < children.size(); ++i) {
- ExceptionCode ec = 0;
- // FIXME: We need a parser-safe (no events) version of adoptNode.
- RefPtr<Node> child = m_fragment->document()->adoptNode(children[i].release(), ec);
- ASSERT(!ec);
- m_fragment->parserAddChild(child.release());
- }
+ m_fragment->takeAllChildrenFrom(root);
}
HTMLTreeBuilder::FragmentParsingContext::~FragmentParsingContext()
@@ -500,6 +469,7 @@ void HTMLTreeBuilder::constructTreeFromToken(HTMLToken& rawToken)
// the U+0000 characters into replacement characters has compatibility
// problems.
m_tokenizer->setForceNullCharacterReplacement(m_insertionMode == TextMode || m_insertionMode == InForeignContentMode);
+ m_tokenizer->setShouldAllowCDATA(m_insertionMode == InForeignContentMode && m_tree.currentElement()->namespaceURI() != xhtmlNamespaceURI);
}
void HTMLTreeBuilder::processToken(AtomicHTMLToken& token)
@@ -534,6 +504,7 @@ void HTMLTreeBuilder::processDoctypeToken(AtomicHTMLToken& token)
ASSERT(token.type() == HTMLToken::DOCTYPE);
if (m_insertionMode == InitialMode) {
m_tree.insertDoctype(token);
+ setInsertionMode(BeforeHTMLMode);
return;
}
if (m_insertionMode == InTableTextMode) {
@@ -666,11 +637,6 @@ void mapLoweredLocalNameToName(PrefixedNameToQualifiedNameMap* map, QualifiedNam
}
}
-void addName(PrefixedNameToQualifiedNameMap* map, const QualifiedName& name)
-{
- map->add(name.localName().lower(), name);
-}
-
void adjustSVGTagNameCase(AtomicHTMLToken& token)
{
static PrefixedNameToQualifiedNameMap* caseMap = 0;
@@ -923,7 +889,7 @@ void HTMLTreeBuilder::processStartTagForInBody(AtomicHTMLToken& token)
return;
}
if (token.name() == tableTag) {
- if (m_document->parseMode() != Document::Compat && m_tree.openElements()->inButtonScope(pTag))
+ if (!m_document->inQuirksMode() && m_tree.openElements()->inButtonScope(pTag))
processFakeEndTag(pTag);
m_tree.insertHTMLElement(token);
m_framesetOk = false;
@@ -1152,7 +1118,7 @@ void HTMLTreeBuilder::processStartTagForInTable(AtomicHTMLToken& token)
return;
// FIXME: This deviates from the spec:
// http://www.w3.org/Bugs/Public/show_bug.cgi?id=10216
- m_tree.insertHTMLFormElement(token);
+ m_tree.insertHTMLFormElement(token, true);
m_tree.openElements()->pop();
return;
}
@@ -1486,7 +1452,10 @@ void HTMLTreeBuilder::processStartTag(AtomicHTMLToken& token)
|| token.name() == keygenTag
|| token.name() == textareaTag) {
parseError(token);
- notImplemented(); // fragment case
+ if (!m_tree.openElements()->inTableScope(selectTag)) {
+ ASSERT(isParsingFragment());
+ return;
+ }
AtomicHTMLToken endSelect(HTMLToken::EndTag, selectTag.localName());
processEndTag(endSelect);
processStartTag(token);
@@ -2356,7 +2325,11 @@ void HTMLTreeBuilder::processEndTag(AtomicHTMLToken& token)
return;
}
if (token.name() == selectTag) {
- notImplemented(); // fragment case
+ if (!m_tree.openElements()->inTableScope(token.name())) {
+ ASSERT(isParsingFragment());
+ parseError(token);
+ return;
+ }
m_tree.openElements()->popUntilPopped(selectTag.localName());
resetInsertionModeAppropriately();
return;
@@ -2692,6 +2665,8 @@ void HTMLTreeBuilder::processEndOfFile(AtomicHTMLToken& token)
void HTMLTreeBuilder::defaultForInitial()
{
notImplemented();
+ if (!m_fragmentContext.fragment())
+ m_document->setCompatibilityMode(Document::QuirksMode);
// FIXME: parse error
setInsertionMode(BeforeHTMLMode);
}
@@ -2851,8 +2826,9 @@ String serializeForNumberType(double number)
// According to HTML5, "the best representation of the number n as a floating
// point number" is a string produced by applying ToString() to n.
NumberToStringBuffer buffer;
- return String(buffer, numberToString(number, buffer));
- }
+ unsigned length = numberToString(number, buffer);
+ return String(buffer, length);
+}
// FIXME: Move this function to a more appropriate place.
bool parseToDoubleForNumberType(const String& src, double* out)
diff --git a/WebCore/html/HTMLTreeBuilder.h b/WebCore/html/parser/HTMLTreeBuilder.h
index c30e6b8..c30e6b8 100644
--- a/WebCore/html/HTMLTreeBuilder.h
+++ b/WebCore/html/parser/HTMLTreeBuilder.h
diff --git a/WebCore/html/HTMLViewSourceParser.cpp b/WebCore/html/parser/HTMLViewSourceParser.cpp
index 8a7984d..8a7984d 100644
--- a/WebCore/html/HTMLViewSourceParser.cpp
+++ b/WebCore/html/parser/HTMLViewSourceParser.cpp
diff --git a/WebCore/html/HTMLViewSourceParser.h b/WebCore/html/parser/HTMLViewSourceParser.h
index 34caf43..34caf43 100644
--- a/WebCore/html/HTMLViewSourceParser.h
+++ b/WebCore/html/parser/HTMLViewSourceParser.h
diff --git a/WebKitTools/Scripts/create-html-entity-table b/WebCore/html/parser/create-html-entity-table
index c408207..e6132bc 100755
--- a/WebKitTools/Scripts/create-html-entity-table
+++ b/WebCore/html/parser/create-html-entity-table
@@ -27,18 +27,13 @@
# (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 csv
import os.path
import string
import sys
-# Hack sys.path to avoid executing webkitpy __init__.py code which may
-# use Python 2.5 features. This code needs to run on Python 2.3 in order
-# to support Mac OS X Tiger.
-scripts_directory = sys.path[0]
-sys.path.append("%s/webkitpy/thirdparty" % scripts_directory)
-
-import simplejson
-
+ENTITY = 0
+VALUE = 1
def convert_entity_to_cpp_name(entity):
postfix = "EntityName"
@@ -70,10 +65,10 @@ output_path = sys.argv[2]
input_path = sys.argv[3]
html_entity_names_file = open(input_path)
-entries = simplejson.load(html_entity_names_file)
+entries = list(csv.reader(html_entity_names_file))
html_entity_names_file.close()
-entries.sort(lambda a, b: cmp(a['entity'], b['entity']))
+entries.sort(lambda a, b: cmp(a[ENTITY], b[ENTITY]))
entity_count = len(entries)
output_file = open(output_path, "w")
@@ -103,7 +98,7 @@ print >> output_file, """/*
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// THIS FILE IS GENERATED BY WebKitTools/Scripts/create-html-entity-table
+// THIS FILE IS GENERATED BY WebCore/html/parser/create-html-entity-table
// DO NOT EDIT (unless you are a ninja)!
#include "config.h"
@@ -116,8 +111,8 @@ namespace {
for entry in entries:
print >> output_file, "const UChar %sEntityName[] = %s;" % (
- convert_entity_to_cpp_name(entry["entity"]),
- convert_entity_to_uchar_array(entry["entity"]))
+ convert_entity_to_cpp_name(entry[ENTITY]),
+ convert_entity_to_uchar_array(entry[ENTITY]))
print >> output_file, """
HTMLEntityTableEntry staticEntityTable[%s] = {""" % entity_count
@@ -125,13 +120,13 @@ HTMLEntityTableEntry staticEntityTable[%s] = {""" % entity_count
index = {}
offset = 0
for entry in entries:
- letter = entry["entity"][0]
+ letter = entry[ENTITY][0]
if not index.get(letter):
index[letter] = offset
print >> output_file, ' { %sEntityName, %s, %s },' % (
- convert_entity_to_cpp_name(entry["entity"]),
- len(entry["entity"]),
- convert_value_to_int(entry["value"]))
+ convert_entity_to_cpp_name(entry[ENTITY]),
+ len(entry[ENTITY]),
+ convert_value_to_int(entry[VALUE]))
offset += 1
print >> output_file, """};
diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm
index be0948b..d76fbd3 100644
--- a/WebCore/inspector/CodeGeneratorInspector.pm
+++ b/WebCore/inspector/CodeGeneratorInspector.pm
@@ -120,7 +120,7 @@ $typeTransform{"boolean"} = {
"defaultValue" => "false",
"forward" => "",
"header" => "",
- "JSONType" => "Bool"
+ "JSONType" => "Boolean"
};
$typeTransform{"void"} = {
"forward" => "",
@@ -211,7 +211,7 @@ sub GenerateInterface
$backendJSStubName = $className . "BackendStub";
my @backendHead;
push(@backendHead, " ${backendClassName}(InspectorController* inspectorController) : m_inspectorController(inspectorController) { }");
- push(@backendHead, " void reportProtocolError(const long callId, const String& method, const String& errorText) const;");
+ push(@backendHead, " void reportProtocolError(const long callId, const String& errorText) const;");
push(@backendHead, " void dispatch(const String& message);");
push(@backendHead, " static bool getCommandName(const String& message, String* result);");
$backendConstructor = join("\n", @backendHead);
@@ -306,7 +306,7 @@ sub generateBackendFunction
my $domainAccessor = $typeTransform{$domain}->{"domainAccessor"};
$backendTypes{$domain} = 1;
push(@function, " if (!$domainAccessor)");
- push(@function, " protocolErrors->pushString(String::format(\"Error: %s handler is not available.\", \"$domain\"));");
+ push(@function, " protocolErrors->pushString(String::format(\"Protocol Error: %s handler is not available.\", \"$domain\"));");
push(@function, "");
if (scalar(@inArgs)) {
@@ -316,8 +316,7 @@ sub generateBackendFunction
push(@function, "");
push(@function, " RefPtr<InspectorObject> argumentsContainer;");
push(@function, " if (!(argumentsContainer = requestMessageObject->getObject(\"arguments\"))) {");
- push(@function, " ASSERT_NOT_REACHED();");
- push(@function, " protocolErrors->pushString(String::format(\"Error: arguments object was not found.\"));");
+ push(@function, " protocolErrors->pushString(String::format(\"Protocol Error: 'arguments' property with type 'object' was not found.\"));");
push(@function, " } else {");
push(@function, " InspectorObject::const_iterator argumentsEndIterator = argumentsContainer->end();");
@@ -330,12 +329,10 @@ sub generateBackendFunction
push(@function, "");
push(@function, " InspectorObject::const_iterator ${name}ValueIterator = argumentsContainer->find(\"$name\");");
push(@function, " if (${name}ValueIterator == argumentsEndIterator) {");
- push(@function, " ASSERT_NOT_REACHED();");
- push(@function, " protocolErrors->pushString(String::format(\"Error: Argument '%s' with type '%s' was not found.\", \"$name\", \"$JSONType\"));");
+ push(@function, " protocolErrors->pushString(String::format(\"Protocol Error: Argument '%s' with type '%s' was not found.\", \"$name\", \"$JSONType\"));");
push(@function, " } else {");
push(@function, " if (!${name}ValueIterator->second->as$JSONType(&$name)) {");
- push(@function, " ASSERT_NOT_REACHED();");
- push(@function, " protocolErrors->pushString(String::format(\"Error: Argument '%s' has wrong type. It should be '%s'.\", \"$name\", \"$JSONType\"));");
+ push(@function, " protocolErrors->pushString(String::format(\"Protocol Error: Argument '%s' has wrong type. It should be '%s'.\", \"$name\", \"$JSONType\"));");
push(@function, " }");
push(@function, " }");
}
@@ -351,13 +348,10 @@ sub generateBackendFunction
push(@function, "");
push(@function, " // use InspectorFrontend as a marker of WebInspector availability");
- push(@function, " if (callId && m_inspectorController->hasFrontend()) {");
+ push(@function, " if ((callId || protocolErrors->length()) && m_inspectorController->hasFrontend()) {");
push(@function, " RefPtr<InspectorObject> responseMessage = InspectorObject::create();");
push(@function, " responseMessage->setNumber(\"seq\", callId);");
- push(@function, " responseMessage->setString(\"type\", \"response\");");
- push(@function, " responseMessage->setString(\"domain\", \"$domain\");");
- push(@function, " responseMessage->setString(\"command\", \"$functionName\");");
- push(@function, " responseMessage->setBool(\"success\", !protocolErrors->length());");
+ push(@function, " responseMessage->setBoolean(\"success\", !protocolErrors->length());");
push(@function, "");
push(@function, " if (protocolErrors->length())");
push(@function, " responseMessage->setArray(\"errors\", protocolErrors);");
@@ -381,14 +375,11 @@ sub generateBackendReportProtocolError
{
my $reportProtocolError = << "EOF";
-void ${backendClassName}::reportProtocolError(const long callId, const String& method, const String& errorText) const
+void ${backendClassName}::reportProtocolError(const long callId, const String& errorText) const
{
RefPtr<InspectorObject> message = InspectorObject::create();
message->setNumber("seq", callId);
- message->setString("type", "error");
- message->setString("domain", "inspectorProtocol");
- message->setString("command", method);
- message->setBool("success", false);
+ message->setBoolean("success", false);
RefPtr<InspectorArray> errors = InspectorArray::create();
errors->pushString(errorText);
message->setArray("errors", errors);
@@ -420,49 +411,42 @@ $mapEntries
RefPtr<InspectorValue> parsedMessage = InspectorValue::parseJSON(message);
if (!parsedMessage) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", "Error: Invalid message format. Message should be in JSON format.");
+ reportProtocolError(callId, "Protocol Error: Invalid message format. Message should be in JSON format.");
return;
}
RefPtr<InspectorObject> messageObject = parsedMessage->asObject();
if (!messageObject) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", "Error: Invalid message format. The message should be a JSONified object.");
+ reportProtocolError(callId, "Protocol Error: Invalid message format. The message should be a JSONified object.");
return;
}
- RefPtr<InspectorValue> callIdValue = messageObject->get("seq");
- if (!callIdValue) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", "Error: Invalid message format. 'seq' property was not found in the request.");
+ RefPtr<InspectorValue> commandValue = messageObject->get("command");
+ if (!commandValue) {
+ reportProtocolError(callId, "Protocol Error: Invalid message format. 'command' property wasn't found.");
return;
}
- if (!callIdValue->asNumber(&callId)) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", "Error: Invalid message format. the type of 'seq' property should be number.");
+ String command;
+ if (!commandValue->asString(&command)) {
+ reportProtocolError(callId, "Protocol Error: Invalid message format. The type of 'command' property should be string.");
return;
}
- RefPtr<InspectorValue> commandValue = messageObject->get("command");
- if (!commandValue) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", "Error: Invalid message format. 'command' property wasn't found.");
+ RefPtr<InspectorValue> callIdValue = messageObject->get("seq");
+ if (!callIdValue) {
+ reportProtocolError(callId, "Protocol Error: Invalid message format. 'seq' property was not found in the request.");
return;
}
- String command;
- if (!commandValue->asString(&command)) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", "Error: Invalid message format. The type of 'command' property should be string.");
+ if (!callIdValue->asNumber(&callId)) {
+ reportProtocolError(callId, "Protocol Error: Invalid message format. The type of 'seq' property should be number.");
return;
}
HashMap<String, CallHandler>::iterator it = dispatchMap.find(command);
if (it == dispatchMap.end()) {
- ASSERT_NOT_REACHED();
- reportProtocolError(callId, "dispatch", String::format("Error: Invalid command was received. '%s' wasn't found.", command.utf8().data()));
+ reportProtocolError(callId, String::format("Protocol Error: Invalid command was received. '%s' wasn't found.", command.utf8().data()));
return;
}
@@ -505,10 +489,9 @@ sub generateBackendStubJS
foreach my $function (@backendFunctions) {
my $name = $function->signature->name;
my $domain = $function->signature->extendedAttributes->{"handler"};
- my $argumentNames = join(",", map("\"" . $_->name . "\": null", grep($_->direction eq "in", @{$function->parameters})));
+ my $argumentNames = join(",", map("\"" . $_->name . "\": \"" . lc($typeTransform{$_->type}->{"JSONType"}) . "\"", grep($_->direction eq "in", @{$function->parameters})));
push(@JSStubs, " this._registerDelegate('{" .
"\"seq\": 0, " .
- "\"type\": \"request\", " .
"\"domain\": \"$domain\", " .
"\"command\": \"$name\", " .
"\"arguments\": {$argumentNames}" .
@@ -535,14 +518,27 @@ WebInspector.InspectorBackendStub.prototype = {
{
var args = Array.prototype.slice.call(arguments);
var request = JSON.parse(args.shift());
+
for (var key in request.arguments) {
- if (key === "callId")
- request.seq = args.shift();
- else
- request.arguments[key] = args.shift();
+ if (args.length === 0) {
+ console.error("Protocol Error: Invalid number of arguments for 'InspectorBackend.%s' call. It should have the next arguments '%s'.", request.command, JSON.stringify(request.arguments));
+ return;
+ }
+ var value = args.shift();
+ if (typeof value !== request.arguments[key]) {
+ console.error("Protocol Error: Invalid type of argument '%s' for 'InspectorBackend.%s' call. It should be '%s' but it is '%s'.", key, request.command, request.arguments[key], typeof value);
+ return;
+ }
+ request.arguments[key] = value;
}
- if (args.length === 1 && typeof args[0] === "function")
+
+ if (args.length === 1) {
+ if (typeof args[0] !== "function") {
+ console.error("Protocol Error: Optional callback argument for 'InspectorBackend.%s' call should be a function but its type is '%s'.", request.command, typeof args[0]);
+ return;
+ }
request.seq = WebInspector.Callback.wrap(args[0]);
+ }
var message = JSON.stringify(request);
InspectorFrontendHost.sendMessageToBackend(message);
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index a56ef14..ff1c2af 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -102,7 +102,7 @@ module core {
// This method is going to be broken down into smaller parts.
[handler=Controller] void populateScriptObjects();
- [handler=Controller] void getSettings(in long callId, out Object settings);
+ [handler=Controller] void getSettings(out Object settings);
[handler=Controller] void storeLastActivePanel(in String panelName);
[handler=Controller] void saveApplicationSettings(in String settings);
@@ -116,7 +116,7 @@ module core {
[handler=Controller] void enableResourceTracking(in boolean always);
[handler=Controller] void disableResourceTracking(in boolean always);
- [handler=Controller] void getResourceContent(in long callId, in unsigned long identifier, out String content);
+ [handler=Controller] void getResourceContent(in unsigned long identifier, out String content);
[handler=Controller] void reloadPage();
[handler=Controller] void startTimelineProfiler();
@@ -126,7 +126,7 @@ module core {
[handler=Backend] void enableDebugger(in boolean always);
[handler=Controller] void disableDebugger(in boolean always);
- [handler=Debug] void setBreakpoint(in long callId, in String sourceID, in unsigned int lineNumber, in boolean enabled, in String condition, out boolean success, out unsigned int actualLineNumber);
+ [handler=Debug] void setBreakpoint(in String sourceID, in unsigned int lineNumber, in boolean enabled, in String condition, out boolean success, out unsigned int actualLineNumber);
[handler=Debug] void removeBreakpoint(in String sourceID, in unsigned long lineNumber);
[handler=Debug] void activateBreakpoints();
[handler=Debug] void deactivateBreakpoints();
@@ -140,8 +140,8 @@ module core {
[handler=Debug] void setPauseOnExceptionsState(in long pauseOnExceptionsState);
- [handler=Debug] void editScriptSource(in long callId, in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames);
- [handler=Debug] void getScriptSource(in long callId, in String sourceID, out String scriptSource);
+ [handler=Debug] void editScriptSource(in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames);
+ [handler=Debug] void getScriptSource(in String sourceID, out String scriptSource);
[handler=Controller] void enableProfiler(in boolean always);
[handler=Controller] void disableProfiler(in boolean always);
@@ -149,34 +149,33 @@ module core {
[handler=Profiler] void startProfiling();
[handler=Profiler] void stopProfiling();
- [handler=Profiler] void getProfileHeaders(in long callId, out Array headers);
- [handler=Profiler] void getProfile(in long callId, in unsigned long uid, out Object profile);
+ [handler=Profiler] void getProfileHeaders(out Array headers);
+ [handler=Profiler] void getProfile(in String type, in unsigned long uid, out Object profile);
- [handler=Profiler] void removeProfile(in unsigned long uid);
+ [handler=Profiler] void removeProfile(in String type, in unsigned long uid);
[handler=Profiler] void clearProfiles();
- [handler=Backend] void takeHeapSnapshot();
- [handler=Backend] void getProfilerLogLines(in long callId, in long inPosition, out long outPosition, out String log);
+ [handler=Profiler] void takeHeapSnapshot();
#endif
[handler=Backend] void setInjectedScriptSource(in String scriptSource);
- [handler=Backend] void dispatchOnInjectedScript(in long callId, in long injectedScriptId, in String methodName, in String arguments, out Value result, out boolean isException);
+ [handler=Backend] void dispatchOnInjectedScript(in long injectedScriptId, in String methodName, in String arguments, out Value result, out boolean isException);
[handler=Controller] void addScriptToEvaluateOnLoad(in String scriptSource);
[handler=Controller] void removeAllScriptsToEvaluateOnLoad();
- [handler=DOM] void getChildNodes(in long callId, in long nodeId);
- [handler=DOM] void setAttribute(in long callId, in long elementId, in String name, in String value, out boolean success);
- [handler=DOM] void removeAttribute(in long callId, in long elementId, in String name, out boolean success);
- [handler=DOM] void setTextNodeValue(in long callId, in long nodeId, in String value, out boolean success);
- [handler=DOM] void getEventListenersForNode(in long callId, in long nodeId, out long outNodeId, out Array listenersArray);
+ [handler=DOM] void getChildNodes(in long nodeId);
+ [handler=DOM] void setAttribute(in long elementId, in String name, in String value, out boolean success);
+ [handler=DOM] void removeAttribute(in long elementId, in String name, out boolean success);
+ [handler=DOM] void setTextNodeValue(in long nodeId, in String value, out boolean success);
+ [handler=DOM] void getEventListenersForNode(in long nodeId, out long outNodeId, out Array listenersArray);
[handler=DOM] void copyNode(in long nodeId);
- [handler=DOM] void removeNode(in long callId, in long nodeId, out long outNodeId);
- [handler=DOM] void changeTagName(in long callId, in long nodeId, in String newTagName, out long outNodeId);
- [handler=DOM] void getOuterHTML(in long callId, in long nodeId, out String outerHTML);
- [handler=DOM] void setOuterHTML(in long callId, in long nodeId, in String outerHTML, out long outNodeId);
+ [handler=DOM] void removeNode(in long nodeId, out long outNodeId);
+ [handler=DOM] void changeTagName(in long nodeId, in String newTagName, out long outNodeId);
+ [handler=DOM] void getOuterHTML(in long nodeId, out String outerHTML);
+ [handler=DOM] void setOuterHTML(in long nodeId, in String outerHTML, out long outNodeId);
[handler=DOM] void addInspectedNode(in long nodeId);
[handler=DOM] void performSearch(in String query, in boolean runSynchronously);
[handler=DOM] void searchCanceled();
- [handler=DOM] void pushNodeByPathToFrontend(in long callId, in String path, out long nodeId);
+ [handler=DOM] void pushNodeByPathToFrontend(in String path, out long nodeId);
[handler=DOM] void setDOMBreakpoint(in long nodeId, in long type);
[handler=DOM] void removeDOMBreakpoint(in long nodeId, in long type);
@@ -185,41 +184,41 @@ module core {
[handler=Controller] void hideDOMNodeHighlight();
[handler=Controller] void openInInspectedWindow(in String url);
- [handler=DOM] void getStyles(in long callId, in long nodeId, in boolean authOnly, out Value styles);
- [handler=DOM] void getAllStyles(in long callId, out Array styles);
- [handler=DOM] void getInlineStyle(in long callId, in long nodeId, out Value style);
- [handler=DOM] void getComputedStyle(in long callId, in long nodeId, out Value style);
- [handler=DOM] void getStyleSheet(in long callId, in long styleSheetId, out Object styleSheet);
- [handler=DOM] void getRuleRanges(in long callId, in long styleSheetId, out Value ranges);
- [handler=DOM] void applyStyleText(in long callId, in long styleId, in String styleText, in String propertyName, out boolean success, out Value style, out Array changedProperties);
- [handler=DOM] void setStyleText(in long callId, in long styleId, in String styleText, out boolean success);
- [handler=DOM] void setStyleProperty(in long callId, in long styleId, in String name, in String value, out boolean success);
- [handler=DOM] void toggleStyleEnabled(in long callId, in long styleId, in String propertyName, in boolean disabled, out Value style);
- [handler=DOM] void setRuleSelector(in long callId, in long ruleId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
- [handler=DOM] void addRule(in long callId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
- [handler=DOM] void getSupportedCSSProperties(in long callId, out Array cssProperties);
-
- [handler=Controller] void getCookies(in long callId, out Array cookies, out String cookiesString);
+ [handler=DOM] void getStyles(in long nodeId, in boolean authOnly, out Value styles);
+ [handler=DOM] void getAllStyles(out Array styles);
+ [handler=DOM] void getInlineStyle(in long nodeId, out Value style);
+ [handler=DOM] void getComputedStyle(in long nodeId, out Value style);
+ [handler=DOM] void getStyleSheet(in long styleSheetId, out Object styleSheet);
+ [handler=DOM] void getRuleRanges(in long styleSheetId, out Value ranges);
+ [handler=DOM] void applyStyleText(in long styleId, in String styleText, in String propertyName, out boolean success, out Value style, out Array changedProperties);
+ [handler=DOM] void setStyleText(in long styleId, in String styleText, out boolean success);
+ [handler=DOM] void setStyleProperty(in long styleId, in String name, in String value, out boolean success);
+ [handler=DOM] void toggleStyleEnabled(in long styleId, in String propertyName, in boolean disabled, out Value style);
+ [handler=DOM] void setRuleSelector(in long ruleId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
+ [handler=DOM] void addRule(in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
+ [handler=DOM] void getSupportedCSSProperties(out Array cssProperties);
+
+ [handler=Controller] void getCookies(out Array cookies, out String cookiesString);
[handler=Controller] void deleteCookie(in String cookieName, in String domain);
#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS
- [handler=ApplicationCache] void getApplicationCaches(in long callId, out Value applicationCaches);
+ [handler=ApplicationCache] void getApplicationCaches(out Value applicationCaches);
#endif
[handler=Backend] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup);
[handler=Controller] void didEvaluateForTestInFrontend(in long testCallId, in String jsonResult);
#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
- [handler=Backend] void getDatabaseTableNames(in long callId, in long databaseId, out Array tableNames);
- [handler=Backend] void executeSQL(in long callId, in long databaseId, in String query, out boolean success, out long transactionId);
+ [handler=Backend] void getDatabaseTableNames(in long databaseId, out Array tableNames);
+ [handler=Backend] void executeSQL(in long databaseId, in String query, out boolean success, out long transactionId);
[notify] void sqlTransactionSucceeded(out long transactionId, out Value columnNames, out Value values);
[notify] void sqlTransactionFailed(out long transactionId, out Value sqlError);
#endif
#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
- [handler=Controller] void getDOMStorageEntries(in long callId, in long storageId, out Array entries);
- [handler=Controller] void setDOMStorageItem(in long callId, in long storageId, in String key, in String value, out boolean success);
- [handler=Controller] void removeDOMStorageItem(in long callId, in long storageId, in String key, out boolean success);
+ [handler=Controller] void getDOMStorageEntries(in long storageId, out Array entries);
+ [handler=Controller] void setDOMStorageItem(in long storageId, in String key, in String value, out boolean success);
+ [handler=Controller] void removeDOMStorageItem(in long storageId, in String key, out boolean success);
#endif
};
}
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 99f40a9..791e3a6 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -68,17 +68,6 @@ void InspectorBackend::enableDebugger(bool always)
m_inspectorController->enableDebuggerFromFrontend(always);
}
-void InspectorBackend::takeHeapSnapshot()
-{
- ScriptProfiler::takeHeapSnapshot();
-}
-
-void InspectorBackend::getProfilerLogLines(long position, long* outPosition, String* data)
-{
- // FIXME: we should make inspector dispatcher pluggable, so that embedders could contribute APIs instead of polluting the core one
- // https://bugs.webkit.org/show_bug.cgi?id=43357
- *outPosition = ScriptProfiler::getProfilerLogLines(position, data);
-}
#endif
void InspectorBackend::setInjectedScriptSource(const String& source)
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index 23b31a3..1fcec96 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -60,8 +60,6 @@ public:
#if ENABLE(JAVASCRIPT_DEBUGGER)
void enableDebugger(bool always);
- void takeHeapSnapshot();
- void getProfilerLogLines(long position, long* outPosition, String* data);
#endif
void setInjectedScriptSource(const String& source);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index f47b321..7fb052c 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -490,24 +490,6 @@ void InspectorController::connectFrontend()
// Initialize Web Inspector title.
m_frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
-#if ENABLE(JAVASCRIPT_DEBUGGER)
- if (InspectorDebuggerAgent::isDebuggerAlwaysEnabled()) {
- // FIXME (40364): This will force pushing script sources to frontend even if script
- // panel is inactive.
- enableDebuggerFromFrontend(false);
- } else {
- String debuggerEnabled = setting(debuggerEnabledSettingName);
- if (debuggerEnabled == "true" || m_attachDebuggerWhenShown)
- enableDebugger();
- }
- m_profilerAgent->setFrontend(m_frontend.get());
- if (!ScriptProfiler::isProfilerAlwaysEnabled()) {
- String profilerEnabledSetting = setting(profilerEnabledSettingName);
- if (profilerEnabledSetting == "true")
- enableProfiler();
- }
-#endif
-
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
m_applicationCacheAgent = new InspectorApplicationCacheAgent(this, m_frontend.get());
#endif
@@ -676,6 +658,22 @@ void InspectorController::populateScriptObjects()
for (Vector<pair<long, String> >::iterator it = m_pendingEvaluateTestCommands.begin(); it != m_pendingEvaluateTestCommands.end(); ++it)
m_frontend->evaluateForTestInFrontend((*it).first, (*it).second);
m_pendingEvaluateTestCommands.clear();
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+ if (InspectorDebuggerAgent::isDebuggerAlwaysEnabled())
+ enableDebuggerFromFrontend(false);
+ else {
+ String debuggerEnabled = setting(debuggerEnabledSettingName);
+ if (debuggerEnabled == "true" || m_attachDebuggerWhenShown)
+ enableDebugger();
+ }
+ m_profilerAgent->setFrontend(m_frontend.get());
+ if (!ScriptProfiler::isProfilerAlwaysEnabled()) {
+ String profilerEnabledSetting = setting(profilerEnabledSettingName);
+ if (profilerEnabledSetting == "true")
+ enableProfiler();
+ }
+#endif
}
void InspectorController::unbindAllResources()
@@ -1339,9 +1337,9 @@ PassRefPtr<InspectorObject> InspectorController::buildObjectForCookie(const Cook
value->setString("path", cookie.path);
value->setNumber("expires", cookie.expires);
value->setNumber("size", (cookie.name.length() + cookie.value.length()));
- value->setBool("httpOnly", cookie.httpOnly);
- value->setBool("secure", cookie.secure);
- value->setBool("session", cookie.session);
+ value->setBoolean("httpOnly", cookie.httpOnly);
+ value->setBoolean("secure", cookie.secure);
+ value->setBoolean("session", cookie.session);
return value;
}
diff --git a/WebCore/inspector/InspectorDOMAgent.cpp b/WebCore/inspector/InspectorDOMAgent.cpp
index b8ae047..d2760e4 100644
--- a/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/WebCore/inspector/InspectorDOMAgent.cpp
@@ -33,6 +33,7 @@
#if ENABLE(INSPECTOR)
+#include "Attr.h"
#include "CSSComputedStyleDeclaration.h"
#include "CSSMutableStyleDeclaration.h"
#include "CSSPropertyNames.h"
@@ -538,6 +539,8 @@ void InspectorDOMAgent::setOuterHTML(long nodeId, const String& outerHTML, long*
if (!node || !node->isHTMLElement())
return;
+ bool requiresTotalUpdate = node->nodeName() == "HTML" || node->nodeName() == "BODY" || node->nodeName() == "HEAD";
+
bool childrenRequested = m_childrenRequested.contains(nodeId);
Node* previousSibling = node->previousSibling();
Node* parentNode = node->parentNode();
@@ -548,8 +551,15 @@ void InspectorDOMAgent::setOuterHTML(long nodeId, const String& outerHTML, long*
if (ec)
return;
- Node* newNode = previousSibling ? previousSibling->nextSibling() : parentNode->firstChild();
+ if (requiresTotalUpdate) {
+ Document* document = mainFrameDocument();
+ reset();
+ setDocument(document);
+ *newId = 0;
+ return;
+ }
+ Node* newNode = previousSibling ? previousSibling->nextSibling() : parentNode->firstChild();
*newId = pushNodePathToFrontend(newNode);
if (childrenRequested)
pushChildNodesToFrontend(*newId);
@@ -834,6 +844,10 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForNode(Node* node, in
value->setString("publicId", docType->publicId());
value->setString("systemId", docType->systemId());
value->setString("internalSubset", docType->internalSubset());
+ } else if (node->nodeType() == Node::ATTRIBUTE_NODE) {
+ Attr* attribute = static_cast<Attr*>(node);
+ value->setString("name", attribute->name());
+ value->setString("value", attribute->value());
}
return value.release();
}
@@ -880,8 +894,8 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForEventListener(const
RefPtr<EventListener> eventListener = registeredEventListener.listener;
RefPtr<InspectorObject> value = InspectorObject::create();
value->setString("type", eventType);
- value->setBool("useCapture", registeredEventListener.useCapture);
- value->setBool("isAttribute", eventListener->isAttribute());
+ value->setBoolean("useCapture", registeredEventListener.useCapture);
+ value->setBoolean("isAttribute", eventListener->isAttribute());
value->setNumber("nodeId", pushNodePathToFrontend(node));
value->setString("listenerBody", eventListenerHandlerBody(node->document(), eventListener.get()));
String sourceName;
@@ -1153,14 +1167,14 @@ void InspectorDOMAgent::getAllStyles(RefPtr<InspectorArray>* styles)
void InspectorDOMAgent::getStyleSheet(long styleSheetId, RefPtr<InspectorObject>* styleSheetObject)
{
CSSStyleSheet* styleSheet = cssStore()->styleSheetForId(styleSheetId);
- if (styleSheet && styleSheet->doc())
- *styleSheetObject = buildObjectForStyleSheet(styleSheet->doc(), styleSheet);
+ if (styleSheet && styleSheet->document())
+ *styleSheetObject = buildObjectForStyleSheet(styleSheet->document(), styleSheet);
}
void InspectorDOMAgent::getRuleRanges(long styleSheetId, RefPtr<InspectorValue>* ruleRange)
{
CSSStyleSheet* styleSheet = cssStore()->styleSheetForId(styleSheetId);
- if (styleSheet && styleSheet->doc()) {
+ if (styleSheet && styleSheet->document()) {
HashMap<long, SourceRange> ruleRanges = cssStore()->getRuleRanges(styleSheet);
if (!ruleRanges.size())
return;
@@ -1460,7 +1474,7 @@ void InspectorDOMAgent::populateObjectWithStyleProperties(CSSStyleDeclaration* s
String name = style->item(i);
property->setString("name", name);
property->setString("priority", style->getPropertyPriority(name));
- property->setBool("implicit", style->isPropertyImplicit(name));
+ property->setBoolean("implicit", style->isPropertyImplicit(name));
String shorthand = style->getPropertyShorthand(name);
property->setString("shorthand", shorthand);
if (!shorthand.isEmpty() && !foundShorthands.contains(shorthand)) {
@@ -1492,10 +1506,10 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForStyleSheet(Document
RefPtr<InspectorObject> result = InspectorObject::create();
long id = cssStore()->bindStyleSheet(styleSheet);
result->setNumber("id", id);
- result->setBool("disabled", styleSheet->disabled());
+ result->setBoolean("disabled", styleSheet->disabled());
result->setString("href", styleSheet->href());
result->setString("title", styleSheet->title());
- result->setNumber("documentElementId", m_documentNodeToIdMap.get(styleSheet->doc()));
+ result->setNumber("documentElementId", m_documentNodeToIdMap.get(styleSheet->document()));
RefPtr<InspectorArray> cssRules = InspectorArray::create();
PassRefPtr<CSSRuleList> cssRuleList = CSSRuleList::create(styleSheet, true);
if (cssRuleList) {
@@ -1526,9 +1540,9 @@ PassRefPtr<InspectorObject> InspectorDOMAgent::buildObjectForRule(Document* owne
}
bool isUserAgent = parentStyleSheet && !parentStyleSheet->ownerNode() && parentStyleSheet->href().isEmpty();
bool isUser = parentStyleSheet && parentStyleSheet->ownerNode() && parentStyleSheet->ownerNode()->nodeName() == "#document";
- result->setBool("isUserAgent", isUserAgent);
- result->setBool("isUser", isUser);
- result->setBool("isViaInspector", rule->parentStyleSheet() == cssStore()->inspectorStyleSheet(ownerDocument, false));
+ result->setBoolean("isUserAgent", isUserAgent);
+ result->setBoolean("isUser", isUser);
+ result->setBoolean("isViaInspector", rule->parentStyleSheet() == cssStore()->inspectorStyleSheet(ownerDocument, false));
// Bind editable scripts only.
bool bind = !isUserAgent && !isUser;
diff --git a/WebCore/inspector/InspectorDOMStorageResource.cpp b/WebCore/inspector/InspectorDOMStorageResource.cpp
index 72b4e10..c8d76ba 100644
--- a/WebCore/inspector/InspectorDOMStorageResource.cpp
+++ b/WebCore/inspector/InspectorDOMStorageResource.cpp
@@ -71,7 +71,7 @@ void InspectorDOMStorageResource::bind(InspectorFrontend* frontend)
RefPtr<InspectorObject> jsonObject = InspectorObject::create();
jsonObject->setString("host", m_frame->document()->securityOrigin()->host());
- jsonObject->setBool("isLocalStorage", m_isLocalStorage);
+ jsonObject->setBoolean("isLocalStorage", m_isLocalStorage);
jsonObject->setNumber("id", m_id);
frontend->addDOMStorage(jsonObject);
}
diff --git a/WebCore/inspector/InspectorProfilerAgent.cpp b/WebCore/inspector/InspectorProfilerAgent.cpp
index a73469a..9161c3b 100644
--- a/WebCore/inspector/InspectorProfilerAgent.cpp
+++ b/WebCore/inspector/InspectorProfilerAgent.cpp
@@ -39,6 +39,7 @@
#include "KURL.h"
#include "Page.h"
#include "ScriptDebugServer.h"
+#include "ScriptHeapSnapshot.h"
#include "ScriptProfile.h"
#include "ScriptProfiler.h"
#include <wtf/OwnPtr.h>
@@ -51,6 +52,7 @@ namespace WebCore {
static const char* const UserInitiatedProfileName = "org.webkit.profiles.user-initiated";
static const char* const CPUProfileType = "CPU";
+static const char* const HeapProfileType = "HEAP";
PassOwnPtr<InspectorProfilerAgent> InspectorProfilerAgent::create(InspectorController* inspectorController)
{
@@ -65,6 +67,7 @@ InspectorProfilerAgent::InspectorProfilerAgent(InspectorController* inspectorCon
, m_recordingUserInitiatedProfile(false)
, m_currentUserInitiatedProfileNumber(-1)
, m_nextUserInitiatedProfileNumber(1)
+ , m_nextUserInitiatedHeapSnapshotNumber(1)
{
}
@@ -104,6 +107,15 @@ PassRefPtr<InspectorObject> InspectorProfilerAgent::createProfileHeader(const Sc
return header;
}
+PassRefPtr<InspectorObject> InspectorProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot)
+{
+ RefPtr<InspectorObject> header = InspectorObject::create();
+ header->setString("title", snapshot.title());
+ header->setNumber("uid", snapshot.uid());
+ header->setString("typeId", String(HeapProfileType));
+ return header;
+}
+
void InspectorProfilerAgent::disable()
{
if (!m_enabled)
@@ -138,28 +150,46 @@ void InspectorProfilerAgent::getProfileHeaders(RefPtr<InspectorArray>* headers)
ProfilesMap::iterator profilesEnd = m_profiles.end();
for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it)
(*headers)->pushObject(createProfileHeader(*it->second));
-}
-
-void InspectorProfilerAgent::getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject)
-{
- ProfilesMap::iterator it = m_profiles.find(uid);
- if (it != m_profiles.end()) {
- *profileObject = createProfileHeader(*it->second);
- (*profileObject)->setObject("head", it->second->buildInspectorObjectForHead());
+ HeapSnapshotsMap::iterator snapshotsEnd = m_snapshots.end();
+ for (HeapSnapshotsMap::iterator it = m_snapshots.begin(); it != snapshotsEnd; ++it)
+ (*headers)->pushObject(createSnapshotHeader(*it->second));
+}
+
+void InspectorProfilerAgent::getProfile(const String& type, unsigned uid, RefPtr<InspectorObject>* profileObject)
+{
+ if (type == CPUProfileType) {
+ ProfilesMap::iterator it = m_profiles.find(uid);
+ if (it != m_profiles.end()) {
+ *profileObject = createProfileHeader(*it->second);
+ (*profileObject)->setObject("head", it->second->buildInspectorObjectForHead());
+ }
+ } else if (type == HeapProfileType) {
+ HeapSnapshotsMap::iterator it = m_snapshots.find(uid);
+ if (it != m_snapshots.end()) {
+ *profileObject = createSnapshotHeader(*it->second);
+ (*profileObject)->setObject("head", it->second->buildInspectorObjectForHead());
+ }
}
}
-void InspectorProfilerAgent::removeProfile(unsigned uid)
+void InspectorProfilerAgent::removeProfile(const String& type, unsigned uid)
{
- if (m_profiles.contains(uid))
- m_profiles.remove(uid);
+ if (type == CPUProfileType) {
+ if (m_profiles.contains(uid))
+ m_profiles.remove(uid);
+ } else if (type == HeapProfileType) {
+ if (m_snapshots.contains(uid))
+ m_snapshots.remove(uid);
+ }
}
void InspectorProfilerAgent::resetState()
{
m_profiles.clear();
+ m_snapshots.clear();
m_currentUserInitiatedProfileNumber = 1;
m_nextUserInitiatedProfileNumber = 1;
+ m_nextUserInitiatedHeapSnapshotNumber = 1;
if (m_frontend)
m_frontend->resetProfilesPanel();
}
@@ -199,6 +229,17 @@ void InspectorProfilerAgent::stopUserInitiatedProfiling()
toggleRecordButton(false);
}
+void InspectorProfilerAgent::takeHeapSnapshot()
+{
+ String title = String::format("%s.%d", UserInitiatedProfileName, m_nextUserInitiatedHeapSnapshotNumber++);
+ RefPtr<ScriptHeapSnapshot> snapshot = ScriptProfiler::takeHeapSnapshot(title);
+ if (snapshot) {
+ m_snapshots.add(snapshot->uid(), snapshot);
+ if (m_frontend)
+ m_frontend->addProfileHeader(createSnapshotHeader(*snapshot));
+ }
+}
+
void InspectorProfilerAgent::toggleRecordButton(bool isProfiling)
{
if (m_frontend)
diff --git a/WebCore/inspector/InspectorProfilerAgent.h b/WebCore/inspector/InspectorProfilerAgent.h
index 9593eba..421efb0 100644
--- a/WebCore/inspector/InspectorProfilerAgent.h
+++ b/WebCore/inspector/InspectorProfilerAgent.h
@@ -44,6 +44,7 @@ class InspectorArray;
class InspectorController;
class InspectorFrontend;
class InspectorObject;
+class ScriptHeapSnapshot;
class ScriptProfile;
class InspectorProfilerAgent : public Noncopyable {
@@ -60,22 +61,25 @@ public:
bool enabled() { return m_enabled; }
String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
void getProfileHeaders(RefPtr<InspectorArray>* headers);
- void getProfile(unsigned uid, RefPtr<InspectorObject>* profileObject);
+ void getProfile(const String& type, unsigned uid, RefPtr<InspectorObject>* profileObject);
bool isRecordingUserInitiatedProfile() { return m_recordingUserInitiatedProfile; }
- void removeProfile(unsigned uid);
+ void removeProfile(const String& type, unsigned uid);
void resetState();
void setFrontend(InspectorFrontend* frontend) { m_frontend = frontend; }
void startProfiling() { startUserInitiatedProfiling(); }
void startUserInitiatedProfiling();
void stopProfiling() { stopUserInitiatedProfiling(); }
void stopUserInitiatedProfiling();
+ void takeHeapSnapshot();
void toggleRecordButton(bool isProfiling);
private:
typedef HashMap<unsigned int, RefPtr<ScriptProfile> > ProfilesMap;
+ typedef HashMap<unsigned int, RefPtr<ScriptHeapSnapshot> > HeapSnapshotsMap;
InspectorProfilerAgent(InspectorController*);
PassRefPtr<InspectorObject> createProfileHeader(const ScriptProfile& profile);
+ PassRefPtr<InspectorObject> createSnapshotHeader(const ScriptHeapSnapshot& snapshot);
InspectorController* m_inspectorController;
InspectorFrontend* m_frontend;
@@ -83,7 +87,9 @@ private:
bool m_recordingUserInitiatedProfile;
int m_currentUserInitiatedProfileNumber;
unsigned m_nextUserInitiatedProfileNumber;
+ unsigned m_nextUserInitiatedHeapSnapshotNumber;
ProfilesMap m_profiles;
+ HeapSnapshotsMap m_snapshots;
};
} // namespace WebCore
diff --git a/WebCore/inspector/InspectorResource.cpp b/WebCore/inspector/InspectorResource.cpp
index ed07339..131ce95 100644
--- a/WebCore/inspector/InspectorResource.cpp
+++ b/WebCore/inspector/InspectorResource.cpp
@@ -190,10 +190,10 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
jsonObject->setString("lastPathComponent", m_requestURL.lastPathComponent());
RefPtr<InspectorObject> requestHeaders = buildHeadersObject(m_requestHeaderFields);
jsonObject->setObject("requestHeaders", requestHeaders);
- jsonObject->setBool("mainResource", m_isMainResource);
+ jsonObject->setBoolean("mainResource", m_isMainResource);
jsonObject->setString("requestMethod", m_requestMethod);
jsonObject->setString("requestFormData", m_requestFormData);
- jsonObject->setBool("didRequestChange", true);
+ jsonObject->setBoolean("didRequestChange", true);
}
if (m_changes.hasChange(ResponseChange)) {
@@ -205,27 +205,27 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
RefPtr<InspectorObject> responseHeaders = buildHeadersObject(m_responseHeaderFields);
jsonObject->setObject("responseHeaders", responseHeaders);
jsonObject->setNumber("connectionID", m_connectionID);
- jsonObject->setBool("connectionReused", m_connectionReused);
- jsonObject->setBool("cached", m_cached);
+ jsonObject->setBoolean("connectionReused", m_connectionReused);
+ jsonObject->setBoolean("cached", m_cached);
if (m_loadTiming && !m_cached)
jsonObject->setObject("timing", buildObjectForTiming(m_loadTiming.get()));
- jsonObject->setBool("didResponseChange", true);
+ jsonObject->setBoolean("didResponseChange", true);
}
if (m_changes.hasChange(TypeChange)) {
jsonObject->setNumber("type", static_cast<int>(type()));
- jsonObject->setBool("didTypeChange", true);
+ jsonObject->setBoolean("didTypeChange", true);
}
if (m_changes.hasChange(LengthChange)) {
jsonObject->setNumber("resourceSize", m_length);
- jsonObject->setBool("didLengthChange", true);
+ jsonObject->setBoolean("didLengthChange", true);
}
if (m_changes.hasChange(CompletionChange)) {
- jsonObject->setBool("failed", m_failed);
- jsonObject->setBool("finished", m_finished);
- jsonObject->setBool("didCompletionChange", true);
+ jsonObject->setBoolean("failed", m_failed);
+ jsonObject->setBoolean("finished", m_finished);
+ jsonObject->setBoolean("didCompletionChange", true);
}
if (m_changes.hasChange(TimingChange)) {
@@ -239,7 +239,7 @@ void InspectorResource::updateScriptObject(InspectorFrontend* frontend)
jsonObject->setNumber("loadEventTime", m_loadEventTime);
if (m_domContentEventTime > 0)
jsonObject->setNumber("domContentEventTime", m_domContentEventTime);
- jsonObject->setBool("didTimingChange", true);
+ jsonObject->setBoolean("didTimingChange", true);
}
if (m_changes.hasChange(RedirectsChange)) {
diff --git a/WebCore/inspector/InspectorValues.cpp b/WebCore/inspector/InspectorValues.cpp
index a7c43a5..c96e953 100644
--- a/WebCore/inspector/InspectorValues.cpp
+++ b/WebCore/inspector/InspectorValues.cpp
@@ -474,7 +474,7 @@ inline void doubleQuoteString(const String& str, Vector<UChar>* dst)
} // anonymous namespace
-bool InspectorValue::asBool(bool*) const
+bool InspectorValue::asBoolean(bool*) const
{
return false;
}
@@ -555,7 +555,7 @@ void InspectorValue::writeJSON(Vector<UChar>* output) const
output->append(nullString, 4);
}
-bool InspectorBasicValue::asBool(bool* output) const
+bool InspectorBasicValue::asBoolean(bool* output) const
{
if (type() != TypeBoolean)
return false;
@@ -565,7 +565,7 @@ bool InspectorBasicValue::asBool(bool* output) const
bool InspectorBasicValue::asNumber(double* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = m_doubleValue;
return true;
@@ -573,7 +573,7 @@ bool InspectorBasicValue::asNumber(double* output) const
bool InspectorBasicValue::asNumber(long* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = static_cast<long>(m_doubleValue);
return true;
@@ -581,7 +581,7 @@ bool InspectorBasicValue::asNumber(long* output) const
bool InspectorBasicValue::asNumber(unsigned long* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = static_cast<unsigned long>(m_doubleValue);
return true;
@@ -589,7 +589,7 @@ bool InspectorBasicValue::asNumber(unsigned long* output) const
bool InspectorBasicValue::asNumber(unsigned int* output) const
{
- if (type() != TypeDouble)
+ if (type() != TypeNumber)
return false;
*output = static_cast<unsigned int>(m_doubleValue);
return true;
@@ -597,13 +597,13 @@ bool InspectorBasicValue::asNumber(unsigned int* output) const
void InspectorBasicValue::writeJSON(Vector<UChar>* output) const
{
- ASSERT(type() == TypeBoolean || type() == TypeDouble);
+ ASSERT(type() == TypeBoolean || type() == TypeNumber);
if (type() == TypeBoolean) {
if (m_boolValue)
output->append(trueString, 4);
else
output->append(falseString, 5);
- } else if (type() == TypeDouble) {
+ } else if (type() == TypeNumber) {
String value = String::format("%f", m_doubleValue);
value.replace(',', '.');
output->append(value.characters(), value.length());
@@ -633,12 +633,12 @@ PassRefPtr<InspectorObject> InspectorObject::asObject()
return this;
}
-bool InspectorObject::getBool(const String& name, bool* output) const
+bool InspectorObject::getBoolean(const String& name, bool* output) const
{
RefPtr<InspectorValue> value = get(name);
if (!value)
return false;
- return value->asBool(output);
+ return value->asBoolean(output);
}
bool InspectorObject::getNumber(const String& name, double* output) const
diff --git a/WebCore/inspector/InspectorValues.h b/WebCore/inspector/InspectorValues.h
index 473ad21..3dd9594 100644
--- a/WebCore/inspector/InspectorValues.h
+++ b/WebCore/inspector/InspectorValues.h
@@ -59,7 +59,7 @@ public:
typedef enum {
TypeNull = 0,
TypeBoolean,
- TypeDouble,
+ TypeNumber,
TypeString,
TypeObject,
TypeArray
@@ -67,7 +67,7 @@ public:
Type type() const { return m_type; }
- virtual bool asBool(bool* output) const;
+ virtual bool asBoolean(bool* output) const;
virtual bool asNumber(double* output) const;
virtual bool asNumber(long* output) const;
virtual bool asNumber(unsigned long* output) const;
@@ -109,7 +109,7 @@ public:
return adoptRef(new InspectorBasicValue(value));
}
- virtual bool asBool(bool* output) const;
+ virtual bool asBoolean(bool* output) const;
virtual bool asNumber(double* output) const;
virtual bool asNumber(long* output) const;
virtual bool asNumber(unsigned long* output) const;
@@ -119,8 +119,8 @@ public:
private:
explicit InspectorBasicValue(bool value) : InspectorValue(TypeBoolean), m_boolValue(value) { }
- explicit InspectorBasicValue(int value) : InspectorValue(TypeDouble), m_doubleValue((double)value) { }
- explicit InspectorBasicValue(double value) : InspectorValue(TypeDouble), m_doubleValue(value) { }
+ explicit InspectorBasicValue(int value) : InspectorValue(TypeNumber), m_doubleValue((double)value) { }
+ explicit InspectorBasicValue(double value) : InspectorValue(TypeNumber), m_doubleValue(value) { }
union {
bool m_boolValue;
@@ -169,7 +169,7 @@ public:
virtual bool asObject(RefPtr<InspectorObject>* output);
virtual PassRefPtr<InspectorObject> asObject();
- void setBool(const String& name, bool);
+ void setBoolean(const String& name, bool);
void setNumber(const String& name, double);
void setString(const String& name, const String&);
void setValue(const String& name, PassRefPtr<InspectorValue>);
@@ -177,7 +177,7 @@ public:
void setArray(const String& name, PassRefPtr<InspectorArray>);
const_iterator find(const String& name) const;
- bool getBool(const String& name, bool* output) const;
+ bool getBoolean(const String& name, bool* output) const;
bool getNumber(const String& name, double* output) const;
bool getString(const String& name, String* output) const;
PassRefPtr<InspectorObject> getObject(const String& name) const;
@@ -208,7 +208,7 @@ public:
virtual bool asArray(RefPtr<InspectorArray>* output);
virtual PassRefPtr<InspectorArray> asArray();
- void pushBool(bool);
+ void pushBoolean(bool);
void pushNumber(double);
void pushString(const String&);
void pushValue(PassRefPtr<InspectorValue>);
@@ -230,7 +230,7 @@ inline InspectorObject::const_iterator InspectorObject::find(const String& name)
return m_data.find(name);
}
-inline void InspectorObject::setBool(const String& name, bool value)
+inline void InspectorObject::setBoolean(const String& name, bool value)
{
setValue(name, InspectorBasicValue::create(value));
}
@@ -263,7 +263,7 @@ inline void InspectorObject::setArray(const String& name, PassRefPtr<InspectorAr
m_order.append(name);
}
-inline void InspectorArray::pushBool(bool value)
+inline void InspectorArray::pushBoolean(bool value)
{
m_data.append(InspectorBasicValue::create(value));
}
diff --git a/WebCore/inspector/ScriptBreakpoint.cpp b/WebCore/inspector/ScriptBreakpoint.cpp
index 24401f1..b7205a7 100644
--- a/WebCore/inspector/ScriptBreakpoint.cpp
+++ b/WebCore/inspector/ScriptBreakpoint.cpp
@@ -47,7 +47,7 @@ void ScriptBreakpoint::sourceBreakpointsFromInspectorObject(PassRefPtr<Inspector
continue;
bool enabled;
RefPtr<InspectorValue> enabledValue = breakpoint->get("enabled");
- if (!enabledValue || !enabledValue->asBool(&enabled))
+ if (!enabledValue || !enabledValue->asBoolean(&enabled))
continue;
String condition;
RefPtr<InspectorValue> conditionValue = breakpoint->get("condition");
@@ -62,7 +62,7 @@ PassRefPtr<InspectorObject> ScriptBreakpoint::inspectorObjectFromSourceBreakpoin
RefPtr<InspectorObject> breakpoints = InspectorObject::create();
for (SourceBreakpoints::const_iterator it = sourceBreakpoints.begin(); it != sourceBreakpoints.end(); ++it) {
RefPtr<InspectorObject> breakpoint = InspectorObject::create();
- breakpoint->setBool("enabled", it->second.enabled);
+ breakpoint->setBoolean("enabled", it->second.enabled);
breakpoint->setString("condition", it->second.condition);
breakpoints->setObject(String::number(it->first), breakpoint);
}
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index e1c2bbb..713d6bc 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -87,7 +87,7 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createTimerInstallData(int ti
RefPtr<InspectorObject> data = InspectorObject::create();
data->setNumber("timerId", timerId);
data->setNumber("timeout", timeout);
- data->setBool("singleShot", singleShot);
+ data->setBoolean("singleShot", singleShot);
return data.release();
}
@@ -134,7 +134,7 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceSendRequestData
data->setNumber("identifier", identifier);
data->setString("url", request.url().string());
data->setString("requestMethod", request.httpMethod());
- data->setBool("isMainResource", isMainResource);
+ data->setBoolean("isMainResource", isMainResource);
return data.release();
}
@@ -152,7 +152,7 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createResourceFinishData(unsi
{
RefPtr<InspectorObject> data = InspectorObject::create();
data->setNumber("identifier", identifier);
- data->setBool("didFail", didFail);
+ data->setBoolean("didFail", didFail);
return data.release();
}
diff --git a/WebCore/inspector/front-end/AuditFormatters.js b/WebCore/inspector/front-end/AuditFormatters.js
new file mode 100755
index 0000000..de277ad
--- /dev/null
+++ b/WebCore/inspector/front-end/AuditFormatters.js
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+WebInspector.applyFormatters = function(value)
+{
+ var formatter;
+ var type = typeof value;
+ var args;
+
+ switch (type) {
+ case "string":
+ case "boolean":
+ case "number":
+ formatter = WebInspector.AuditFormatters.text;
+ args = [ value.toString() ];
+ break;
+
+ case "object":
+ if (value instanceof Array) {
+ formatter = WebInspector.AuditFormatters.concat;
+ args = value;
+ } else if (value.type && value.arguments) {
+ formatter = WebInspector.AuditFormatters[value.type];
+ args = value.arguments;
+ }
+ }
+ if (!formatter)
+ throw "Invalid value or formatter: " + type + JSON.stringify(value);
+
+ return formatter.apply(null, args);
+}
+
+WebInspector.AuditFormatters = {
+ text: function(text)
+ {
+ return document.createTextNode(text);
+ },
+
+ snippet: function(snippetText)
+ {
+ var div = document.createElement("div");
+ div.innerText = snippetText;
+ div.className = "source-code";
+ return div;
+ },
+
+ concat: function()
+ {
+ var parent = document.createElement("span");
+ for (var arg = 0; arg < arguments.length; ++arg)
+ parent.appendChild(WebInspector.applyFormatters(arguments[arg]));
+ return parent;
+ },
+
+ url: function(url, displayText)
+ {
+ return WebInspector.linkifyURLAsNode(url, displayText || url, null, (url in WebInspector.resourceURLMap));
+ }
+};
diff --git a/WebCore/inspector/front-end/AuditLauncherView.js b/WebCore/inspector/front-end/AuditLauncherView.js
index 33d3872..18daee6 100644
--- a/WebCore/inspector/front-end/AuditLauncherView.js
+++ b/WebCore/inspector/front-end/AuditLauncherView.js
@@ -28,10 +28,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-WebInspector.AuditLauncherView = function(categoriesById, runnerCallback)
+WebInspector.AuditLauncherView = function(runnerCallback)
{
WebInspector.View.call(this);
- this._categoriesById = categoriesById;
this._runnerCallback = runnerCallback;
this._categoryIdPrefix = "audit-category-item-";
this._auditRunning = false;
@@ -41,27 +40,16 @@ WebInspector.AuditLauncherView = function(categoriesById, runnerCallback)
this._contentElement = document.createElement("div");
this._contentElement.className = "audit-launcher-view-content";
this.element.appendChild(this._contentElement);
+ this._boundCategoryClickListener = this._categoryClicked.bind(this);
this._resetResourceCount();
- function categorySortFunction(a, b)
- {
- var aTitle = a.displayName || "";
- var bTitle = b.displayName || "";
- return aTitle.localeCompare(bTitle);
- }
- var sortedCategories = [];
- for (var id in this._categoriesById)
- sortedCategories.push(this._categoriesById[id]);
- sortedCategories.sort(categorySortFunction);
+ this._sortedCategories = [];
- if (!sortedCategories.length) {
- this._headerElement = document.createElement("h1");
- this._headerElement.className = "no-audits";
- this._headerElement.textContent = WebInspector.UIString("No audits to run");
- this._contentElement.appendChild(this._headerElement);
- } else
- this._createLauncherUI(sortedCategories);
+ this._headerElement = document.createElement("h1");
+ this._headerElement.className = "no-audits";
+ this._headerElement.textContent = WebInspector.UIString("No audits to run");
+ this._contentElement.appendChild(this._headerElement);
}
WebInspector.AuditLauncherView.prototype = {
@@ -133,6 +121,30 @@ WebInspector.AuditLauncherView.prototype = {
this._resetResourceCount();
},
+ addCategory: function(category)
+ {
+ if (!this._sortedCategories.length)
+ this._createLauncherUI();
+
+ var categoryElement = this._createCategoryElement(category.displayName, category.id);
+ category._checkboxElement = categoryElement.firstChild;
+ if (this._selectAllCheckboxElement.checked) {
+ category._checkboxElement.checked = true;
+ ++this._currentCategoriesCount;
+ }
+
+ function compareCategories(a, b)
+ {
+ var aTitle = a.displayName || "";
+ var bTitle = b.displayName || "";
+ return aTitle.localeCompare(bTitle);
+ }
+ var insertBefore = insertionIndexForObjectInListSortedByFunction(category, this._sortedCategories, compareCategories);
+ this._categoriesElement.insertBefore(categoryElement, this._categoriesElement.children[insertBefore]);
+ this._sortedCategories.splice(insertBefore, 0, category);
+ this._updateButton();
+ },
+
_setAuditRunning: function(auditRunning)
{
if (this._auditRunning === auditRunning)
@@ -146,10 +158,11 @@ WebInspector.AuditLauncherView.prototype = {
{
var catIds = [];
var childNodes = this._categoriesElement.childNodes;
- for (var id in this._categoriesById) {
- if (this._categoriesById[id]._checkboxElement.checked)
- catIds.push(id);
+ for (var category = 0; category < this._sortedCategories.length; ++category) {
+ if (this._sortedCategories[category]._checkboxElement.checked)
+ catIds.push(this._sortedCategories[category].id);
}
+
this._setAuditRunning(true);
this._runnerCallback(catIds, this._auditPresentStateElement.checked, this._setAuditRunning.bind(this, false));
},
@@ -159,14 +172,14 @@ WebInspector.AuditLauncherView.prototype = {
var childNodes = this._categoriesElement.childNodes;
for (var i = 0, length = childNodes.length; i < length; ++i)
childNodes[i].firstChild.checked = checkCategories;
- this._currentCategoriesCount = checkCategories ? this._totalCategoriesCount : 0;
+ this._currentCategoriesCount = checkCategories ? this._sortedCategories.length : 0;
this._updateButton();
},
_categoryClicked: function(event)
{
this._currentCategoriesCount += event.target.checked ? 1 : -1;
- this._selectAllCheckboxElement.checked = this._currentCategoriesCount === this._totalCategoriesCount;
+ this._selectAllCheckboxElement.checked = this._currentCategoriesCount === this._sortedCategories.length;
this._updateButton();
},
@@ -177,16 +190,21 @@ WebInspector.AuditLauncherView.prototype = {
var element = document.createElement("input");
element.type = "checkbox";
+ element.addEventListener("click", this._boundCategoryClickListener, false);
labelElement.appendChild(element);
labelElement.appendChild(document.createTextNode(title));
return labelElement;
},
- _createLauncherUI: function(sortedCategories)
+ _createLauncherUI: function()
{
this._headerElement = document.createElement("h1");
this._headerElement.textContent = WebInspector.UIString("Select audits to run");
+
+ for (var child = 0; child < this._contentElement.children.length; ++child)
+ this._contentElement.removeChild(this._contentElement.children[child]);
+
this._contentElement.appendChild(this._headerElement);
function handleSelectAllClick(event)
@@ -204,16 +222,6 @@ WebInspector.AuditLauncherView.prototype = {
this._categoriesElement.className = "audit-categories-container";
this._contentElement.appendChild(this._categoriesElement);
- var boundCategoryClickListener = this._categoryClicked.bind(this);
-
- for (var i = 0; i < sortedCategories.length; ++i) {
- categoryElement = this._createCategoryElement(sortedCategories[i].displayName, sortedCategories[i].id);
- categoryElement.firstChild.addEventListener("click", boundCategoryClickListener, false);
- sortedCategories[i]._checkboxElement = categoryElement.firstChild;
- this._categoriesElement.appendChild(categoryElement);
- }
-
- this._totalCategoriesCount = this._categoriesElement.childNodes.length;
this._currentCategoriesCount = 0;
var flexibleSpaceElement = document.createElement("div");
diff --git a/WebCore/inspector/front-end/AuditResultView.js b/WebCore/inspector/front-end/AuditResultView.js
index 2f4afbd..2636463 100644
--- a/WebCore/inspector/front-end/AuditResultView.js
+++ b/WebCore/inspector/front-end/AuditResultView.js
@@ -81,15 +81,22 @@ WebInspector.AuditCategoryResultPane = function(categoryResult)
WebInspector.AuditCategoryResultPane.prototype = {
_appendResult: function(parentTreeElement, result)
{
- var title = result.value;
- if (result.violationCount)
- title = String.sprintf("%s (%d)", title, result.violationCount);
+ var title = "";
+
+ if (typeof result.value === "string") {
+ title = result.value;
+ if (result.violationCount)
+ title = String.sprintf("%s (%d)", title, result.violationCount);
+ }
var treeElement = new TreeElement(title, null, !!result.children);
parentTreeElement.appendChild(treeElement);
if (result.className)
treeElement.listItemElement.addStyleClass(result.className);
+ if (typeof result.value !== "string")
+ treeElement.listItemElement.appendChild(WebInspector.applyFormatters(result.value));
+
if (result.children) {
for (var i = 0; i < result.children.length; ++i)
this._appendResult(treeElement, result.children[i]);
diff --git a/WebCore/inspector/front-end/AuditRules.js b/WebCore/inspector/front-end/AuditRules.js
index e28a364..a72de56 100644
--- a/WebCore/inspector/front-end/AuditRules.js
+++ b/WebCore/inspector/front-end/AuditRules.js
@@ -371,7 +371,7 @@ WebInspector.AuditRules.UnusedCssRule.prototype = {
return routineResult;
}
- InspectorBackend.getAllStyles(WebInspector.Callback.wrap(evalCallback));
+ InspectorBackend.getAllStyles(evalCallback);
}
}
@@ -693,7 +693,7 @@ WebInspector.AuditRules.ImageDimensionsRule.prototype = {
return callback(null);
var context = {imagesLeft: imageIds.length, urlToNoDimensionCount: {}};
for (var i = imageIds.length - 1; i >= 0; --i)
- InspectorBackend.getStyles(WebInspector.Callback.wrap(imageStylesReady.bind(this, imageIds[i], context)), imageIds[i], true);
+ InspectorBackend.getStyles(imageIds[i], true, imageStylesReady.bind(this, imageIds[i], context));
}
function pushImageNodes()
diff --git a/WebCore/inspector/front-end/AuditsPanel.js b/WebCore/inspector/front-end/AuditsPanel.js
index bc7f3b3..f6cbed0 100644
--- a/WebCore/inspector/front-end/AuditsPanel.js
+++ b/WebCore/inspector/front-end/AuditsPanel.js
@@ -32,8 +32,6 @@ WebInspector.AuditsPanel = function()
{
WebInspector.Panel.call(this, "audits");
- this._constructCategories();
-
this.createSidebar();
this.auditsTreeElement = new WebInspector.SidebarSectionTreeElement("", {}, true);
this.sidebarTree.appendChild(this.auditsTreeElement);
@@ -54,7 +52,11 @@ WebInspector.AuditsPanel = function()
this.viewsContainerElement.id = "audit-views";
this.element.appendChild(this.viewsContainerElement);
- this._launcherView = new WebInspector.AuditLauncherView(this.categoriesById, this.initiateAudit.bind(this));
+ this._constructCategories();
+
+ this._launcherView = new WebInspector.AuditLauncherView(this.initiateAudit.bind(this));
+ for (id in this.categoriesById)
+ this._launcherView.addCategory(this.categoriesById[id]);
}
WebInspector.AuditsPanel.prototype = {
@@ -104,6 +106,17 @@ WebInspector.AuditsPanel.prototype = {
this._launcherView.resourceFinished(resource);
},
+ addCategory: function(category)
+ {
+ this.categoriesById[category.id] = category;
+ this._launcherView.addCategory(category);
+ },
+
+ getCategory: function(id)
+ {
+ return this.categoriesById[id];
+ },
+
_constructCategories: function()
{
this._auditCategoriesById = {};
@@ -147,7 +160,7 @@ WebInspector.AuditsPanel.prototype = {
var category = categories[i];
var result = new WebInspector.AuditCategoryResult(category);
results.push(result);
- category.runRules(resources, ruleResultReadyCallback.bind(null, result));
+ category.run(resources, ruleResultReadyCallback.bind(null, result));
}
},
@@ -220,7 +233,7 @@ WebInspector.AuditsPanel.prototype = {
{
this.visibleView = this._launcherView;
},
-
+
get visibleView()
{
return this._visibleView;
@@ -311,7 +324,7 @@ WebInspector.AuditCategory.prototype = {
this._rules.push(rule);
},
- runRules: function(resources, callback)
+ run: function(resources, callback)
{
this._ensureInitialized();
for (var i = 0; i < this._rules.length; ++i)
diff --git a/WebCore/inspector/front-end/BreakpointManager.js b/WebCore/inspector/front-end/BreakpointManager.js
index 824bc31..8518618 100644
--- a/WebCore/inspector/front-end/BreakpointManager.js
+++ b/WebCore/inspector/front-end/BreakpointManager.js
@@ -123,8 +123,7 @@ WebInspector.BreakpointManager.prototype = {
this._setBreakpoint(breakpoint.sourceID, breakpoint.url, line, breakpoint.enabled, breakpoint.condition);
}
}
- var callbackId = WebInspector.Callback.wrap(didSetBreakpoint.bind(this));
- InspectorBackend.setBreakpoint(callbackId, breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition);
+ InspectorBackend.setBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.enabled, breakpoint.condition, didSetBreakpoint.bind(this));
}
}
diff --git a/WebCore/inspector/front-end/BreakpointsSidebarPane.js b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
index ccf45b6..3a0860f 100644
--- a/WebCore/inspector/front-end/BreakpointsSidebarPane.js
+++ b/WebCore/inspector/front-end/BreakpointsSidebarPane.js
@@ -191,7 +191,7 @@ WebInspector.DOMBreakpointItem = function(breakpoint)
var link = WebInspector.panels.elements.linkifyNodeReference(this._breakpoint.node);
this._element.appendChild(link);
- var type = WebInspector.DOMBreakpoint.Labels[this._breakpoint.type];
+ var type = WebInspector.DOMBreakpoint.labelForType(this._breakpoint.type);
var typeElement = document.createTextNode(" - " + type);
this._element.appendChild(typeElement);
}
diff --git a/WebCore/inspector/front-end/CSSStyleModel.js b/WebCore/inspector/front-end/CSSStyleModel.js
index 66a20ce..bda4064 100644
--- a/WebCore/inspector/front-end/CSSStyleModel.js
+++ b/WebCore/inspector/front-end/CSSStyleModel.js
@@ -35,12 +35,12 @@ WebInspector.CSSStyleModel = function()
WebInspector.CSSStyleModel.prototype = {
getStylesAsync: function(nodeId, authOnly, userCallback)
{
- InspectorBackend.getStyles(WebInspector.Callback.wrap(userCallback), nodeId, authOnly);
+ InspectorBackend.getStyles(nodeId, authOnly, userCallback);
},
getComputedStyleAsync: function(nodeId, userCallback)
{
- InspectorBackend.getComputedStyle(WebInspector.Callback.wrap(userCallback), nodeId);
+ InspectorBackend.getComputedStyle(nodeId, userCallback);
},
setRuleSelector: function(ruleId, newContent, nodeId, successCallback, failureCallback)
@@ -53,7 +53,7 @@ WebInspector.CSSStyleModel.prototype = {
successCallback(WebInspector.CSSStyleDeclaration.parseRule(newRulePayload), doesAffectSelectedNode);
}
- InspectorBackend.setRuleSelector(WebInspector.Callback.wrap(callback), ruleId, newContent, nodeId);
+ InspectorBackend.setRuleSelector(ruleId, newContent, nodeId, callback);
},
addRule: function(nodeId, newContent, successCallback, failureCallback)
@@ -70,7 +70,7 @@ WebInspector.CSSStyleModel.prototype = {
}
}
- InspectorBackend.addRule(WebInspector.Callback.wrap(callback), newContent, nodeId);
+ InspectorBackend.addRule(newContent, nodeId, callback);
},
toggleStyleEnabled: function(styleId, propertyName, disabled, userCallback)
@@ -86,12 +86,12 @@ WebInspector.CSSStyleModel.prototype = {
userCallback(newStyle);
}
- InspectorBackend.toggleStyleEnabled(WebInspector.Callback.wrap(callback), styleId, propertyName, disabled);
+ InspectorBackend.toggleStyleEnabled(styleId, propertyName, disabled, callback);
},
setCSSText: function(styleId, cssText)
{
- InspectorBackend.setStyleText(WebInspector.Callback.wrap(null), styleId, cssText);
+ InspectorBackend.setStyleText(styleId, cssText);
},
applyStyleText: function(styleId, styleText, propertyName, successCallback, failureCallback)
@@ -106,6 +106,6 @@ WebInspector.CSSStyleModel.prototype = {
}
}
- InspectorBackend.applyStyleText(WebInspector.Callback.wrap(callback), styleId, styleText, propertyName);
+ InspectorBackend.applyStyleText(styleId, styleText, propertyName, callback);
}
}
diff --git a/WebCore/inspector/front-end/DOMAgent.js b/WebCore/inspector/front-end/DOMAgent.js
index 0d79d51..5aaa0d3 100644
--- a/WebCore/inspector/front-end/DOMAgent.js
+++ b/WebCore/inspector/front-end/DOMAgent.js
@@ -72,8 +72,12 @@ WebInspector.DOMNode = function(doc, payload) {
this.publicId = payload.publicId;
this.systemId = payload.systemId;
this.internalSubset = payload.internalSubset;
- } else if (this.nodeType === Node.DOCUMENT_NODE)
+ } else if (this.nodeType === Node.DOCUMENT_NODE) {
this.documentURL = payload.documentURL;
+ } else if (this.nodeType === Node.ATTRIBUTE_NODE) {
+ this.name = payload.name;
+ this.value = payload.value;
+ }
}
WebInspector.DOMNode.prototype = {
@@ -306,26 +310,25 @@ WebInspector.DOMAgent.prototype = {
function mycallback() {
callback(parent.children);
}
- var callId = WebInspector.Callback.wrap(mycallback);
- InspectorBackend.getChildNodes(callId, parent.id);
+ InspectorBackend.getChildNodes(parent.id, mycallback);
},
setAttributeAsync: function(node, name, value, callback)
{
var mycallback = this._didApplyDomChange.bind(this, node, callback);
- InspectorBackend.setAttribute(WebInspector.Callback.wrap(mycallback), node.id, name, value);
+ InspectorBackend.setAttribute(node.id, name, value, mycallback);
},
removeAttributeAsync: function(node, name, callback)
{
var mycallback = this._didApplyDomChange.bind(this, node, callback);
- InspectorBackend.removeAttribute(WebInspector.Callback.wrap(mycallback), node.id, name);
+ InspectorBackend.removeAttribute(node.id, name, mycallback);
},
setTextNodeValueAsync: function(node, text, callback)
{
var mycallback = this._didApplyDomChange.bind(this, node, callback);
- InspectorBackend.setTextNodeValue(WebInspector.Callback.wrap(mycallback), node.id, text);
+ InspectorBackend.setTextNodeValue(node.id, text, mycallback);
},
_didApplyDomChange: function(node, callback, success)
@@ -429,8 +432,7 @@ WebInspector.ApplicationCache.getApplicationCachesAsync = function(callback)
callback(applicationCaches);
}
- var callId = WebInspector.Callback.wrap(mycallback);
- InspectorBackend.getApplicationCaches(callId);
+ InspectorBackend.getApplicationCaches(mycallback);
}
WebInspector.Cookies = {}
@@ -445,8 +447,7 @@ WebInspector.Cookies.getCookiesAsync = function(callback)
callback(cookies, true);
}
- var callId = WebInspector.Callback.wrap(mycallback);
- InspectorBackend.getCookies(callId);
+ InspectorBackend.getCookies(mycallback);
}
WebInspector.Cookies.buildCookiesFromString = function(rawCookieString)
@@ -496,9 +497,7 @@ WebInspector.EventListeners.getEventListenersForNodeAsync = function(node, callb
{
if (!node)
return;
-
- var callId = WebInspector.Callback.wrap(callback);
- InspectorBackend.getEventListenersForNode(callId, node.id);
+ InspectorBackend.getEventListenersForNode(node.id, callback);
}
WebInspector.CSSStyleDeclaration = function(payload)
@@ -697,6 +696,13 @@ WebInspector.DOMBreakpointManager.prototype = {
this.dispatchEventToListeners("dom-breakpoint-added", breakpoint);
},
+ findBreakpoint: function(nodeId, type)
+ {
+ var nodeBreakpoints = this._breakpoints[nodeId];
+ if (nodeBreakpoints && type in nodeBreakpoints)
+ return nodeBreakpoints[type];
+ },
+
removeBreakpointsForNode: function(node)
{
var nodeBreakpoints = this._breakpoints[node.id];
@@ -733,10 +739,27 @@ WebInspector.DOMBreakpoint.Types = {
NodeRemoved: 2
};
-WebInspector.DOMBreakpoint.Labels = {};
-WebInspector.DOMBreakpoint.Labels[WebInspector.DOMBreakpoint.Types.SubtreeModified] = WebInspector.UIString("Subtree Modified");
-WebInspector.DOMBreakpoint.Labels[WebInspector.DOMBreakpoint.Types.AttributeModified] = WebInspector.UIString("Attribute Modified");
-WebInspector.DOMBreakpoint.Labels[WebInspector.DOMBreakpoint.Types.NodeRemoved] = WebInspector.UIString("Node Removed");
+WebInspector.DOMBreakpoint.labelForType = function(type)
+{
+ if (!WebInspector.DOMBreakpoint._labels) {
+ WebInspector.DOMBreakpoint._labels = {};
+ WebInspector.DOMBreakpoint._labels[WebInspector.DOMBreakpoint.Types.SubtreeModified] = WebInspector.UIString("Subtree Modified");
+ WebInspector.DOMBreakpoint._labels[WebInspector.DOMBreakpoint.Types.AttributeModified] = WebInspector.UIString("Attribute Modified");
+ WebInspector.DOMBreakpoint._labels[WebInspector.DOMBreakpoint.Types.NodeRemoved] = WebInspector.UIString("Node Removed");
+ }
+ return WebInspector.DOMBreakpoint._labels[type];
+}
+
+WebInspector.DOMBreakpoint.contextMenuLabelForType = function(type)
+{
+ if (!WebInspector.DOMBreakpoint._contextMenuLabels) {
+ WebInspector.DOMBreakpoint._contextMenuLabels = {};
+ WebInspector.DOMBreakpoint._contextMenuLabels[WebInspector.DOMBreakpoint.Types.SubtreeModified] = WebInspector.UIString("Break on Subtree Modifications");
+ WebInspector.DOMBreakpoint._contextMenuLabels[WebInspector.DOMBreakpoint.Types.AttributeModified] = WebInspector.UIString("Break on Attributes Modifications");
+ WebInspector.DOMBreakpoint._contextMenuLabels[WebInspector.DOMBreakpoint.Types.NodeRemoved] = WebInspector.UIString("Break on Node Removal");
+ }
+ return WebInspector.DOMBreakpoint._contextMenuLabels[type];
+}
WebInspector.DOMBreakpoint.prototype = {
get enabled()
diff --git a/WebCore/inspector/front-end/DOMStorage.js b/WebCore/inspector/front-end/DOMStorage.js
index 5c28e29..37be8f6 100644
--- a/WebCore/inspector/front-end/DOMStorage.js
+++ b/WebCore/inspector/front-end/DOMStorage.js
@@ -56,20 +56,17 @@ WebInspector.DOMStorage.prototype = {
getEntries: function(callback)
{
- var callId = WebInspector.Callback.wrap(callback);
- InspectorBackend.getDOMStorageEntries(callId, this._id);
+ InspectorBackend.getDOMStorageEntries(this._id, callback);
},
setItem: function(key, value, callback)
{
- var callId = WebInspector.Callback.wrap(callback);
- InspectorBackend.setDOMStorageItem(callId, this._id, key, value);
+ InspectorBackend.setDOMStorageItem(this._id, key, value, callback);
},
removeItem: function(key, callback)
{
- var callId = WebInspector.Callback.wrap(callback);
- InspectorBackend.removeDOMStorageItem(callId, this._id, key);
+ InspectorBackend.removeDOMStorageItem(this._id, key, callback);
}
}
diff --git a/WebCore/inspector/front-end/Database.js b/WebCore/inspector/front-end/Database.js
index 45b7a0e..ca3e968 100644
--- a/WebCore/inspector/front-end/Database.js
+++ b/WebCore/inspector/front-end/Database.js
@@ -84,8 +84,7 @@ WebInspector.Database.prototype = {
{
callback(names.sort());
}
- var callId = WebInspector.Callback.wrap(sortingCallback);
- InspectorBackend.getDatabaseTableNames(callId, this._id);
+ InspectorBackend.getDatabaseTableNames(this._id, sortingCallback);
},
executeSql: function(query, onSuccess, onError)
@@ -99,7 +98,7 @@ WebInspector.Database.prototype = {
WebInspector.Database.successCallbacks[transactionId] = onSuccess;
WebInspector.Database.errorCallbacks[transactionId] = onError;
}
- InspectorBackend.executeSQL(WebInspector.Callback.wrap(callback), this._id, query);
+ InspectorBackend.executeSQL(this._id, query, callback);
}
}
diff --git a/WebCore/inspector/front-end/ElementsPanel.js b/WebCore/inspector/front-end/ElementsPanel.js
index f18299a..e1bc637 100644
--- a/WebCore/inspector/front-end/ElementsPanel.js
+++ b/WebCore/inspector/front-end/ElementsPanel.js
@@ -58,7 +58,7 @@ WebInspector.ElementsPanel = function()
if (this._focusedDOMNode) {
InspectorBackend.addInspectedNode(this._focusedDOMNode.id);
- WebInspector.extensionServer.notifyObjectSelected(this.name, "DOMNode");
+ WebInspector.extensionServer.notifyObjectSelected(this.panel.name, "DOMNode");
}
};
@@ -224,10 +224,9 @@ WebInspector.ElementsPanel.prototype = {
selectNode.call(this, node);
}
- if (this._selectedPathOnReset) {
- var callId = WebInspector.Callback.wrap(selectLastSelectedNode.bind(this));
- InspectorBackend.pushNodeByPathToFrontend(callId, this._selectedPathOnReset.join(","));
- } else
+ if (this._selectedPathOnReset)
+ InspectorBackend.pushNodeByPathToFrontend(this._selectedPathOnReset.join(","), selectLastSelectedNode.bind(this));
+ else
selectNode.call(this);
delete this._selectedPathOnReset;
},
diff --git a/WebCore/inspector/front-end/ElementsTreeOutline.js b/WebCore/inspector/front-end/ElementsTreeOutline.js
index 7f48161..ba3b320 100644
--- a/WebCore/inspector/front-end/ElementsTreeOutline.js
+++ b/WebCore/inspector/front-end/ElementsTreeOutline.js
@@ -765,16 +765,16 @@ WebInspector.ElementsTreeElement.prototype = {
if (Preferences.domBreakpointsEnabled) {
// Add debbuging-related actions
contextMenu.appendSeparator();
-
- contextMenu.appendItem(WebInspector.UIString("Stop on Subtree Modifications"),
- WebInspector.domBreakpointManager.setBreakpoint.bind(WebInspector.domBreakpointManager, this.representedObject, WebInspector.DOMBreakpoint.Types.SubtreeModified));
- contextMenu.appendItem(WebInspector.UIString("Stop on Attributes Modifications"),
- WebInspector.domBreakpointManager.setBreakpoint.bind(WebInspector.domBreakpointManager, this.representedObject, WebInspector.DOMBreakpoint.Types.AttributeModified));
- contextMenu.appendItem(WebInspector.UIString("Stop on Node Removal"),
- WebInspector.domBreakpointManager.setBreakpoint.bind(WebInspector.domBreakpointManager, this.representedObject, WebInspector.DOMBreakpoint.Types.NodeRemoved));
-
- contextMenu.appendItem(WebInspector.UIString("Remove Breakpoints"),
- WebInspector.domBreakpointManager.removeBreakpointsForNode.bind(WebInspector.domBreakpointManager, this.representedObject));
+ for (var type in WebInspector.DOMBreakpoint.Types) {
+ var typeId = WebInspector.DOMBreakpoint.Types[type];
+ var label = WebInspector.DOMBreakpoint.contextMenuLabelForType(typeId);
+ var breakpoint = WebInspector.domBreakpointManager.findBreakpoint(this.representedObject.id, typeId);
+ if (!breakpoint)
+ var handler = WebInspector.domBreakpointManager.setBreakpoint.bind(WebInspector.domBreakpointManager, this.representedObject, typeId);
+ else
+ var handler = breakpoint.remove.bind(breakpoint);
+ contextMenu.appendCheckboxItem(label, handler, !!breakpoint);
+ }
}
},
@@ -1125,8 +1125,7 @@ WebInspector.ElementsTreeElement.prototype = {
moveToNextAttributeIfNeeded.call(newTreeItem);
}
- var callId = WebInspector.Callback.wrap(changeTagNameCallback);
- InspectorBackend.changeTagName(callId, this.representedObject.id, newText);
+ InspectorBackend.changeTagName(this.representedObject.id, newText, changeTagNameCallback);
},
_textNodeEditingCommitted: function(element, newText)
@@ -1265,6 +1264,11 @@ WebInspector.ElementsTreeElement.prototype = {
info.title = "Document Fragment";
break;
+ case Node.ATTRIBUTE_NODE:
+ var value = node.value || "\u200B"; // Zero width space to force showing an empty value.
+ info.title = this._attributeHTML(node.name, value);
+ break;
+
case Node.ELEMENT_NODE:
var tagName = this.treeOutline.nodeNameToCorrectCase(node.nodeName).escapeHTML();
if (this._elementCloseTag) {
@@ -1374,8 +1378,7 @@ WebInspector.ElementsTreeElement.prototype = {
parentElement.adjustCollapsedRange(true);
}
- var callId = WebInspector.Callback.wrap(removeNodeCallback);
- InspectorBackend.removeNode(callId, this.representedObject.id);
+ InspectorBackend.removeNode(this.representedObject.id, removeNodeCallback);
},
_editAsHTML: function()
@@ -1402,12 +1405,10 @@ WebInspector.ElementsTreeElement.prototype = {
function commitChange(value)
{
- var setCallId = WebInspector.Callback.wrap(selectNode);
- InspectorBackend.setOuterHTML(setCallId, node.id, value);
+ InspectorBackend.setOuterHTML(node.id, value, selectNode);
}
- var getCallId = WebInspector.Callback.wrap(this._startEditingAsHTML.bind(this, commitChange));
- InspectorBackend.getOuterHTML(getCallId, node.id);
+ InspectorBackend.getOuterHTML(node.id, this._startEditingAsHTML.bind(this, commitChange));
},
_copyHTML: function()
diff --git a/WebCore/inspector/front-end/EventListenersSidebarPane.js b/WebCore/inspector/front-end/EventListenersSidebarPane.js
index 2800d6e..34dea00 100644
--- a/WebCore/inspector/front-end/EventListenersSidebarPane.js
+++ b/WebCore/inspector/front-end/EventListenersSidebarPane.js
@@ -183,7 +183,7 @@ WebInspector.EventListenerBar = function(eventListener, nodeId)
this._setFunctionSubtitle();
this.editable = false;
this.element.className = "event-bar"; /* Changed from "section" */
- this.propertiesElement.className = "event-properties"; /* Changed from "properties" */
+ this.propertiesElement.className = "event-properties source-code"; /* Changed from "properties" */
}
WebInspector.EventListenerBar.prototype = {
@@ -196,7 +196,7 @@ WebInspector.EventListenerBar.prototype = {
properties.push(new WebInspector.RemoteObjectProperty("node", nodeObject));
for (var propertyName in this.eventListener) {
- var value = WebInspector.RemoteObject.fromPrimitiveValue(value);
+ var value = WebInspector.RemoteObject.fromPrimitiveValue(this.eventListener[propertyName]);
properties.push(new WebInspector.RemoteObjectProperty(propertyName, value));
}
this.updateProperties(properties);
diff --git a/WebCore/inspector/front-end/ExtensionAPI.js b/WebCore/inspector/front-end/ExtensionAPI.js
index a89dcf1..64f5482 100644
--- a/WebCore/inspector/front-end/ExtensionAPI.js
+++ b/WebCore/inspector/front-end/ExtensionAPI.js
@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-var injectedExtensionAPI = function(InjectedScriptHost, inspectedWindow, injectedScriptId)
+WebInspector.injectedExtensionAPI = function(InjectedScriptHost, inspectedWindow, injectedScriptId)
{
// Here and below, all constructors are private to API implementation.
@@ -37,19 +37,22 @@ var injectedExtensionAPI = function(InjectedScriptHost, inspectedWindow, injecte
// by Foo consutrctor to re-bind publicly exported members to an instance
// of Foo.
-function EventSinkImpl(type)
+function EventSinkImpl(type, customDispatch)
{
this._type = type;
this._listeners = [];
+ this._customDispatch = customDispatch;
}
EventSinkImpl.prototype = {
addListener: function(callback)
{
+ if (typeof callback != "function")
+ throw new "addListener: callback is not a function";
if (this._listeners.length === 0)
extensionServer.sendRequest({ command: "subscribe", type: this._type });
this._listeners.push(callback);
- extensionServer.registerHandler("notify-" + this._type, bind(this._fire, this));
+ extensionServer.registerHandler("notify-" + this._type, bind(this._dispatch, this));
},
removeListener: function(callback)
@@ -66,26 +69,36 @@ EventSinkImpl.prototype = {
extensionServer.sendRequest({ command: "unsubscribe", type: this._type });
},
- _fire: function(request)
+ _fire: function()
{
var listeners = this._listeners.slice();
for (var i = 0; i < listeners.length; ++i)
- listeners[i].apply(null, request.arguments);
+ listeners[i].apply(null, arguments);
+ },
+
+ _dispatch: function(request)
+ {
+ if (this._customDispatch)
+ this._customDispatch.call(this, request);
+ else
+ this._fire.apply(this, request.arguments);
}
}
-function EventSink(type)
+function EventSink(type, customDispatch)
{
- var impl = new EventSinkImpl(type);
+ var impl = new EventSinkImpl(type, customDispatch);
this.addListener = bind(impl.addListener, impl);
this.removeListener = bind(impl.removeListener, impl);
}
function InspectorExtensionAPI()
{
+ this.audits = new Audits();
this.inspectedWindow = new InspectedWindow();
this.panels = new Panels();
this.resources = new Resources();
+
this.onReset = new EventSink("reset");
}
@@ -125,7 +138,7 @@ function Panels()
{
return panels[name];
}
-
+
for (var i = 0; i < wellKnownPanelNames.length; ++i) {
var name = wellKnownPanelNames[i];
panels[name] = new Panel(name);
@@ -151,7 +164,7 @@ Panels.prototype = {
id: id,
label: label,
url: expandURL(pageURL),
- icon: expandURL(iconURL)
+ icon: expandURL(iconURL)
};
extensionServer.sendRequest(request, callback && bind(callbackWrapper, this));
}
@@ -219,6 +232,124 @@ function ExtensionSidebarPane(id)
this.setExpanded = bind(impl.setExpanded, impl);
}
+function Audits()
+{
+}
+
+Audits.prototype = {
+ addCategory: function(displayName, ruleCount)
+ {
+ var id = "extension-audit-category-" + extensionServer.nextObjectId();
+ extensionServer.sendRequest({ command: "addAuditCategory", id: id, displayName: displayName, ruleCount: ruleCount });
+ return new AuditCategory(id);
+ }
+}
+
+function AuditCategory(id)
+{
+ function customDispatch(request)
+ {
+ var auditResult = new AuditResult(request.arguments[0]);
+ try {
+ this._fire(auditResult);
+ } catch (e) {
+ console.error("Uncaught exception in extension audit event handler: " + e);
+ auditResult.done();
+ }
+ }
+ var impl = new AuditCategoryImpl(id);
+ this.onAuditStarted = new EventSink("audit-started-" + id, customDispatch);
+}
+
+function AuditCategoryImpl(id)
+{
+ this._id = id;
+}
+
+function AuditResult(id)
+{
+ var impl = new AuditResultImpl(id);
+
+ this.addResult = bind(impl.addResult, impl);
+ this.createResult = bind(impl.createResult, impl);
+ this.done = bind(impl.done, impl);
+
+ var formatterTypes = [
+ "url",
+ "snippet",
+ "text"
+ ];
+ for (var i = 0; i < formatterTypes.length; ++i)
+ this[formatterTypes[i]] = bind(impl._nodeFactory, null, formatterTypes[i]);
+}
+
+AuditResult.prototype = {
+ get Severity()
+ {
+ return private.audits.Severity;
+ }
+}
+
+function AuditResultImpl(id)
+{
+ this._id = id;
+}
+
+AuditResultImpl.prototype = {
+ addResult: function(displayName, description, severity, details)
+ {
+ // shorthand for specifying details directly in addResult().
+ if (details && !(details instanceof AuditResultNode))
+ details = details instanceof Array ? this.createNode.apply(this, details) : this.createNode(details);
+
+ var request = {
+ command: "addAuditResult",
+ resultId: this._id,
+ displayName: displayName,
+ description: description,
+ severity: severity,
+ details: details
+ };
+ extensionServer.sendRequest(request);
+ },
+
+ createResult: function()
+ {
+ var node = new AuditResultNode();
+ node.contents = Array.prototype.slice.call(arguments);
+ return node;
+ },
+
+ done: function()
+ {
+ extensionServer.sendRequest({ command: "stopAuditCategoryRun", resultId: this._id });
+ },
+
+ _nodeFactory: function(type)
+ {
+ return {
+ type: type,
+ arguments: Array.prototype.slice.call(arguments, 1)
+ };
+ }
+}
+
+function AuditResultNode(contents)
+{
+ this.contents = contents;
+ this.children = [];
+ this.expanded = false;
+}
+
+AuditResultNode.prototype = {
+ addChild: function()
+ {
+ var node = AuditResultImpl.prototype.createResult.apply(null, arguments);
+ this.children.push(node);
+ return node;
+ }
+};
+
function InspectedWindow()
{
this.onLoaded = new EventSink("inspectedPageLoaded");
@@ -234,7 +365,13 @@ InspectedWindow.prototype = {
evaluate: function(expression, callback)
{
- return extensionServer.sendRequest({ command: "evaluateOnInspectedPage", expression: expression }, callback);
+ function callbackWrapper(result)
+ {
+ if (result && !result.isException)
+ result.value = result.value === "undefined" ? undefined : JSON.parse(result.value);
+ callback(result);
+ }
+ return extensionServer.sendRequest({ command: "evaluateOnInspectedPage", expression: expression }, callback && callbackWrapper);
}
}
diff --git a/WebCore/inspector/front-end/ExtensionAuditCategory.js b/WebCore/inspector/front-end/ExtensionAuditCategory.js
new file mode 100644
index 0000000..5d155d7
--- /dev/null
+++ b/WebCore/inspector/front-end/ExtensionAuditCategory.js
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+
+WebInspector.ExtensionAuditCategory = function(id, displayName, ruleCount)
+{
+ this._id = id;
+ this._displayName = displayName;
+ this._ruleCount = ruleCount;
+}
+
+WebInspector.ExtensionAuditCategory.prototype = {
+ // AuditCategory interface
+ get id()
+ {
+ return this._id;
+ },
+
+ get displayName()
+ {
+ return this._displayName;
+ },
+
+ get ruleCount()
+ {
+ return this._ruleCount;
+ },
+
+ run: function(resources, callback)
+ {
+ new WebInspector.ExtensionAuditCategoryResults(this, callback);
+ }
+}
+
+WebInspector.ExtensionAuditCategoryResults = function(category, callback)
+{
+ this._category = category;
+ this._pendingRules = category.ruleCount;
+ this._ruleCompletionCallback = callback;
+
+ this.id = category.id + "-" + ++WebInspector.ExtensionAuditCategoryResults._lastId;
+ WebInspector.extensionServer.startAuditRun(category, this);
+}
+
+WebInspector.ExtensionAuditCategoryResults.prototype = {
+ get complete()
+ {
+ return !this._pendingRules;
+ },
+
+ cancel: function()
+ {
+ while (!this.complete)
+ this._addResult(null);
+ },
+
+ addResult: function(displayName, description, severity, details)
+ {
+ var result = new WebInspector.AuditRuleResult(displayName);
+ result.addChild(description);
+ result.severity = severity;
+ if (details)
+ this._addNode(result, details);
+ this._addResult(result);
+ },
+
+ _addNode: function(parent, node)
+ {
+ var addedNode = parent.addChild(node.contents, node.expanded);
+ if (node.children) {
+ for (var i = 0; i < node.children.length; ++i)
+ this._addNode(addedNode, node.children[i]);
+ }
+ },
+
+ _addResult: function(result)
+ {
+ this._ruleCompletionCallback(result);
+ this._pendingRules--;
+ if (!this._pendingRules)
+ WebInspector.extensionServer.stopAuditRun(this);
+ }
+}
+
+WebInspector.ExtensionAuditCategoryResults._lastId = 0;
diff --git a/WebCore/inspector/front-end/ExtensionCommon.js b/WebCore/inspector/front-end/ExtensionCommon.js
new file mode 100644
index 0000000..b04c18c
--- /dev/null
+++ b/WebCore/inspector/front-end/ExtensionCommon.js
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+WebInspector.commonExtensionSymbols = function(private)
+{
+
+ if (!private.audits)
+ private.audits = {};
+
+ private.audits.Severity = {
+ Info: "info",
+ Warning: "warning",
+ Severe: "severe"
+ };
+}
+
+WebInspector.extensionAPI = {};
+
+WebInspector.commonExtensionSymbols(WebInspector.extensionAPI);
diff --git a/WebCore/inspector/front-end/ExtensionServer.js b/WebCore/inspector/front-end/ExtensionServer.js
index 95f373f..f410d8c 100644
--- a/WebCore/inspector/front-end/ExtensionServer.js
+++ b/WebCore/inspector/front-end/ExtensionServer.js
@@ -40,11 +40,15 @@ WebInspector.ExtensionServer = function()
this._registerHandler("getResources", this._onGetResources.bind(this));
this._registerHandler("createPanel", this._onCreatePanel.bind(this));
this._registerHandler("createSidebarPane", this._onCreateSidebar.bind(this));
- this._registerHandler("log", this._onLog.bind(this));
+ this._registerHandler("log", this._onLog.bind(this));
this._registerHandler("evaluateOnInspectedPage", this._onEvaluateOnInspectedPage.bind(this));
this._registerHandler("setSidebarHeight", this._onSetSidebarHeight.bind(this));
this._registerHandler("setSidebarExpanded", this._onSetSidebarExpansion.bind(this));
+ this._registerHandler("addAuditCategory", this._onAddAuditCategory.bind(this));
+ this._registerHandler("addAuditResult", this._onAddAuditResult.bind(this));
+ this._registerHandler("stopAuditCategoryRun", this._onStopAuditCategoryRun.bind(this));
+
window.addEventListener("message", this._onWindowMessage.bind(this), false);
}
@@ -84,6 +88,17 @@ WebInspector.ExtensionServer.prototype = {
this._postNotification("reset");
},
+ startAuditRun: function(category, auditRun)
+ {
+ this._clientObjects[auditRun.id] = auditRun;
+ this._postNotification("audit-started-" + category.id, auditRun.id);
+ },
+
+ stopAuditRun: function(auditRun)
+ {
+ delete this._clientObjects[auditRun.id];
+ },
+
_convertResource: function(resource)
{
return {
@@ -100,7 +115,7 @@ WebInspector.ExtensionServer.prototype = {
return;
var message = {
command: "notify-" + type,
- arguments: Array.prototype.slice.call(arguments, 1)
+ arguments: Array.prototype.slice.call(arguments, 1)
};
for (var i = 0; i < subscribers.length; ++i)
subscribers[i].postMessage(message);
@@ -195,7 +210,6 @@ WebInspector.ExtensionServer.prototype = {
_onEvaluateOnInspectedPage: function(message, port)
{
- var escapedMessage = escape(message.expression);
function callback(resultPayload)
{
var resultObject = WebInspector.RemoteObject.fromPayload(resultPayload);
@@ -205,7 +219,10 @@ WebInspector.ExtensionServer.prototype = {
result.value = resultObject.description;
this._dispatchCallback(message.requestId, port, result);
}
- InjectedScriptAccess.getDefault().evaluate("(function() { var a = window.eval(unescape(\"" + escapedMessage + "\")); return JSON.stringify(a); })();", "", callback.bind(this));
+ var evalExpression = "JSON.stringify(eval('" +
+ "with (window.console._commandLineAPI) with (window) {' + unescape('" + escape(message.expression) +
+ "') + '}'));";
+ InjectedScriptAccess.getDefault().evaluate(evalExpression, callback.bind(this));
},
_onRevealAndSelect: function(message)
@@ -248,6 +265,36 @@ WebInspector.ExtensionServer.prototype = {
return response;
},
+ _onAddAuditCategory: function(request)
+ {
+ var category = new WebInspector.ExtensionAuditCategory(request.id, request.displayName, request.ruleCount);
+ if (WebInspector.panels.audits.getCategory(category.id))
+ return this._status.E_EXISTS(category.id);
+ this._clientObjects[request.id] = category;
+ WebInspector.panels.audits.addCategory(category);
+ },
+
+ _onAddAuditResult: function(request)
+ {
+ var auditResult = this._clientObjects[request.resultId];
+ if (!auditResult)
+ return this._status.E_NOTFOUND(request.resultId);
+ try {
+ auditResult.addResult(request.displayName, request.description, request.severity, request.details);
+ } catch (e) {
+ return e;
+ }
+ return this._status.OK();
+ },
+
+ _onStopAuditCategoryRun: function(request)
+ {
+ var auditRun = this._clientObjects[request.resultId];
+ if (!auditRun)
+ return this._status.E_NOTFOUND(request.resultId);
+ auditRun.cancel();
+ },
+
initExtensions: function()
{
InspectorExtensionRegistry.getExtensionsAsync();
@@ -255,7 +302,8 @@ WebInspector.ExtensionServer.prototype = {
_addExtensions: function(extensions)
{
- InspectorFrontendHost.setExtensionAPI("(" + injectedExtensionAPI.toString() + ")"); // See ExtensionAPI.js for details.
+ // See ExtensionAPI.js and ExtensionCommon.js for details.
+ InspectorFrontendHost.setExtensionAPI(this._buildExtensionAPIInjectedScript());
for (var i = 0; i < extensions.length; ++i) {
var extension = extensions[i];
try {
@@ -271,6 +319,15 @@ WebInspector.ExtensionServer.prototype = {
}
},
+ _buildExtensionAPIInjectedScript: function()
+ {
+ return "(function(){ " +
+ "var private = {};" +
+ "(" + WebInspector.commonExtensionSymbols.toString() + ")(private);" +
+ "(" + WebInspector.injectedExtensionAPI.toString() + ").apply(this, arguments);" +
+ "})";
+ },
+
_onWindowMessage: function(event)
{
if (event.data !== "registerExtension")
@@ -300,12 +357,14 @@ WebInspector.ExtensionServer.prototype = {
}
}
-WebInspector.ExtensionServer._statuses =
+WebInspector.ExtensionServer._statuses =
{
OK: "",
- E_NOTFOUND: "Object not found (%s)",
- E_NOTSUPPORTED: "Object does not support requested operation (%s)",
- E_EXISTS: "Object already exists (%s)"
+ E_EXISTS: "Object already exists: %s",
+ E_BADARG: "Invalid argument %s: %s",
+ E_BADARGTYPE: "Invalid type for argument %s: got %s, expected %s",
+ E_NOTFOUND: "Object not found: %s",
+ E_NOTSUPPORTED: "Object does not support requested operation: %s",
}
WebInspector.ExtensionStatus = function()
@@ -319,7 +378,7 @@ WebInspector.ExtensionStatus = function()
status.isError = true;
console.log("Extension server error: " + String.vsprintf(description, details));
}
- return status;
+ return status;
}
for (status in WebInspector.ExtensionServer._statuses)
this[status] = makeStatus.bind(null, status);
diff --git a/WebKit/chromium/src/js/HeapProfilerPanel.js b/WebCore/inspector/front-end/HeapSnapshotView.js
index bcb008f..6bcc0ff 100644
--- a/WebKit/chromium/src/js/HeapProfilerPanel.js
+++ b/WebCore/inspector/front-end/HeapSnapshotView.js
@@ -28,28 +28,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/**
- * @fileoverview Heap profiler panel implementation.
- */
-
-WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) {
- snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number);
- snapshot.typeId = WebInspector.HeapSnapshotProfileType.TypeId;
-
- var snapshots = WebInspector.HeapSnapshotProfileType.snapshots;
- snapshots.push(snapshot);
-
- snapshot.listIndex = snapshots.length - 1;
-
- if (WebInspector.CPUProfile)
- this.addProfileHeader(WebInspector.HeapSnapshotProfileType.TypeId, snapshot);
- else
- this.addProfileHeader(snapshot);
-
- this.dispatchEventToListeners("snapshot added");
-}
-
-
WebInspector.HeapSnapshotView = function(parent, profile)
{
WebInspector.View.call(this);
@@ -57,7 +35,7 @@ WebInspector.HeapSnapshotView = function(parent, profile)
this.element.addStyleClass("heap-snapshot-view");
this.parent = parent;
- this.parent.addEventListener("snapshot added", this._updateBaseOptions, this);
+ this.parent.addEventListener("profile added", this._updateBaseOptions, this);
this.showCountAsPercent = false;
this.showSizeAsPercent = false;
@@ -92,11 +70,14 @@ WebInspector.HeapSnapshotView = function(parent, profile)
this.element.appendChild(summaryContainer);
- var columns = { "cons": { title: WebInspector.UIString("Constructor"), disclosure: true, sortable: true },
- "count": { title: WebInspector.UIString("Count"), width: "54px", sortable: true },
- "size": { title: WebInspector.UIString("Size"), width: "72px", sort: "descending", sortable: true },
- "countDelta": { title: WebInspector.UIString("\xb1 Count"), width: "72px", sortable: true },
- "sizeDelta": { title: WebInspector.UIString("\xb1 Size"), width: "72px", sortable: true } };
+ var columns = {
+ cons: { title: WebInspector.UIString("Constructor"), disclosure: true, sortable: true },
+ count: { title: WebInspector.UIString("Count"), width: "54px", sortable: true },
+ size: { title: WebInspector.UIString("Size"), width: "72px", sort: "descending", sortable: true },
+ // \xb1 is a "plus-minus" sign.
+ countDelta: { title: WebInspector.UIString("\xb1 Count"), width: "72px", sortable: true },
+ sizeDelta: { title: WebInspector.UIString("\xb1 Size"), width: "72px", sortable: true }
+ };
this.dataGrid = new WebInspector.DataGrid(columns);
this.dataGrid.addEventListener("sorting changed", this._sortData, this);
@@ -109,22 +90,36 @@ WebInspector.HeapSnapshotView = function(parent, profile)
this.baseSelectElement.className = "status-bar-item";
this.baseSelectElement.addEventListener("change", this._changeBase.bind(this), false);
this._updateBaseOptions();
- if (this.profile.listIndex > 0)
- this.baseSelectElement.selectedIndex = this.profile.listIndex - 1;
- else
- this.baseSelectElement.selectedIndex = this.profile.listIndex;
- this._resetDataGridList();
this.percentButton = new WebInspector.StatusBarButton("", "percent-time-status-bar-item status-bar-item");
this.percentButton.addEventListener("click", this._percentClicked.bind(this), false);
- this.refresh();
+ this._loadProfile(this.profile, profileCallback.bind(this));
- this._updatePercentButton();
-};
+ function profileCallback(profile)
+ {
+ var list = this._getProfiles();
+ var profileIndex;
+ for (var i = 0; i < list.length; ++i)
+ if (list[i].uid === profile.uid) {
+ profileIndex = i;
+ break;
+ }
+ if (profileIndex > 0)
+ this.baseSelectElement.selectedIndex = profileIndex - 1;
+ else
+ this.baseSelectElement.selectedIndex = profileIndex;
+ this._resetDataGridList(resetCompleted.bind(this));
+ }
-WebInspector.HeapSnapshotView.prototype = {
+ function resetCompleted()
+ {
+ this.refresh();
+ this._updatePercentButton();
+ }
+}
+WebInspector.HeapSnapshotView.prototype = {
get statusBarItems()
{
return [this.baseSelectElement, this.percentButton.element];
@@ -264,7 +259,7 @@ WebInspector.HeapSnapshotView.prototype = {
// The second and subsequent levels of heap snapshot nodes represent retainers,
// so recursive expansion will be infinite, since a graph is being traversed.
// So default to a recursion cap of 2 levels.
- var maxDepth = 2;
+ const maxDepth = 2;
while (current) {
if (matchesQuery(current))
@@ -276,6 +271,7 @@ WebInspector.HeapSnapshotView.prototype = {
finishedCallback(this, this._searchResults.length);
},
+ // FIXME: move these methods to a superclass, inherit both views from it.
jumpToFirstSearchResult: WebInspector.CPUProfileView.prototype.jumpToFirstSearchResult,
jumpToLastSearchResult: WebInspector.CPUProfileView.prototype.jumpToLastSearchResult,
jumpToNextSearchResult: WebInspector.CPUProfileView.prototype.jumpToNextSearchResult,
@@ -294,21 +290,25 @@ WebInspector.HeapSnapshotView.prototype = {
this._updateSummaryGraph();
},
- _changeBase: function() {
- if (this.baseSnapshot === WebInspector.HeapSnapshotProfileType.snapshots[this.baseSelectElement.selectedIndex])
+ _changeBase: function()
+ {
+ if (this.baseSnapshot.uid === this._getProfiles()[this.baseSelectElement.selectedIndex].uid)
return;
- this._resetDataGridList();
- this.refresh();
+ this._resetDataGridList(resetCompleted.bind(this));
- if (!this.currentQuery || !this._searchFinishedCallback || !this._searchResults)
- return;
+ function resetCompleted() {
+ this.refresh();
+
+ if (!this.currentQuery || !this._searchFinishedCallback || !this._searchResults)
+ return;
- // The current search needs to be performed again. First negate out previous match
- // count by calling the search finished callback with a negative number of matches.
- // Then perform the search again with the same query and callback.
- this._searchFinishedCallback(this, -this._searchResults.length);
- this.performSearch(this.currentQuery, this._searchFinishedCallback);
+ // The current search needs to be performed again. First negate out previous match
+ // count by calling the search finished callback with a negative number of matches.
+ // Then perform the search again with the same query and callback.
+ this._searchFinishedCallback(this, -this._searchResults.length);
+ this.performSearch(this.currentQuery, this._searchFinishedCallback);
+ }
},
_createSnapshotDataGridList: function()
@@ -320,6 +320,31 @@ WebInspector.HeapSnapshotView.prototype = {
return this._snapshotDataGridList;
},
+ _getProfiles: function()
+ {
+ return WebInspector.panels.profiles.getProfiles(WebInspector.HeapSnapshotProfileType.TypeId);
+ },
+
+ _loadProfile: function(profile, callback)
+ {
+ if (profile._loaded) {
+ callback(profile);
+ return;
+ }
+
+ InspectorBackend.getProfile(profile.typeId, profile.uid, loadedCallback.bind(this));
+
+ function loadedCallback(loadedSnapshot) {
+ profile.children = loadedSnapshot.head.children;
+ profile.entries = loadedSnapshot.head.entries;
+ profile.lowlevels = loadedSnapshot.head.lowlevels;
+ this._prepareProfile(profile);
+ profile._loaded = true;
+ this.parent.updateProfile(profile);
+ callback(profile);
+ }
+ },
+
_mouseDownInDataGrid: function(event)
{
if (event.detail < 2)
@@ -359,14 +384,53 @@ WebInspector.HeapSnapshotView.prototype = {
this.refreshShowAsPercents();
},
- _resetDataGridList: function()
+ _prepareProfile: function(profile)
{
- this.baseSnapshot = WebInspector.HeapSnapshotProfileType.snapshots[this.baseSelectElement.selectedIndex];
- var lastComparator = WebInspector.HeapSnapshotDataGridList.propertyComparator("size", false);
- if (this.snapshotDataGridList)
- lastComparator = this.snapshotDataGridList.lastComparator;
- this.snapshotDataGridList = this._createSnapshotDataGridList();
- this.snapshotDataGridList.sort(lastComparator, true);
+ for (var profileEntry in profile.entries)
+ profile.entries[profileEntry].retainers = {};
+ profile.clusters = {};
+
+ for (var addr in profile.children) {
+ var retainer = profile.children[addr];
+ var retainerId = retainer.constructorName + ':' + addr;
+ for (var childAddr in retainer) {
+ if (childAddr === 'constructorName') continue;
+ var item = retainer[childAddr];
+ var itemId = item.constructorName + ':' + childAddr;
+ if ((item.constructorName === 'Object' || item.constructorName === 'Array')) {
+ if (!(itemId in profile.clusters))
+ profile.clusters[itemId] = { constructorName: itemId, retainers: {} };
+ mergeRetainers(profile.clusters[itemId], item);
+ }
+ mergeRetainers(profile.entries[item.constructorName], item);
+ }
+ }
+
+ function mergeRetainers(entry, item)
+ {
+ if (!(retainer.constructorName in entry.retainers))
+ entry.retainers[retainer.constructorName] = { constructorName: retainer.constructorName, count: 0, clusters: {} };
+ var retainerEntry = entry.retainers[retainer.constructorName];
+ retainerEntry.count += item.count;
+ if (retainer.constructorName === 'Object' || retainer.constructorName === 'Array')
+ retainerEntry.clusters[retainerId] = true;
+ }
+ },
+
+ _resetDataGridList: function(callback)
+ {
+ this._loadProfile(this._getProfiles()[this.baseSelectElement.selectedIndex], profileLoaded.bind(this));
+
+ function profileLoaded(profile)
+ {
+ this.baseSnapshot = profile;
+ var lastComparator = WebInspector.HeapSnapshotDataGridList.propertyComparator("size", false);
+ if (this.snapshotDataGridList)
+ lastComparator = this.snapshotDataGridList.lastComparator;
+ this.snapshotDataGridList = this._createSnapshotDataGridList();
+ this.snapshotDataGridList.sort(lastComparator, true);
+ callback();
+ }
},
_sortData: function()
@@ -374,11 +438,11 @@ WebInspector.HeapSnapshotView.prototype = {
var sortAscending = this.dataGrid.sortOrder === "ascending";
var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier;
var sortProperty = {
- "cons": ["constructorName", null],
- "count": ["count", null],
- "size": ["size", "count"],
- "countDelta": this.showCountDeltaAsPercent ? ["countDeltaPercent", null] : ["countDelta", null],
- "sizeDelta": this.showSizeDeltaAsPercent ? ["sizeDeltaPercent", "countDeltaPercent"] : ["sizeDelta", "sizeDeltaPercent"]
+ cons: ["cons", null],
+ count: ["count", null],
+ size: ["size", "count"],
+ countDelta: this.showCountDeltaAsPercent ? ["countDeltaPercent", null] : ["countDelta", null],
+ sizeDelta: this.showSizeDeltaAsPercent ? ["sizeDeltaPercent", "countDeltaPercent"] : ["sizeDelta", "sizeDeltaPercent"]
}[sortColumnIdentifier];
this.snapshotDataGridList.sort(WebInspector.HeapSnapshotDataGridList.propertyComparator(sortProperty[0], sortProperty[1], sortAscending));
@@ -388,14 +452,17 @@ WebInspector.HeapSnapshotView.prototype = {
_updateBaseOptions: function()
{
- var list = WebInspector.HeapSnapshotProfileType.snapshots;
+ var list = this._getProfiles();
// We're assuming that snapshots can only be added.
if (this.baseSelectElement.length === list.length)
return;
for (var i = this.baseSelectElement.length, n = list.length; i < n; ++i) {
var baseOption = document.createElement("option");
- baseOption.label = WebInspector.UIString("Compared to %s", list[i].title);
+ var title = list[i].title;
+ if (!title.indexOf(UserInitiatedProfileName))
+ title = WebInspector.UIString("Snapshot %d", title.substring(UserInitiatedProfileName.length + 1));
+ baseOption.label = WebInspector.UIString("Compared to %s", title);
this.baseSelectElement.appendChild(baseOption);
}
},
@@ -425,16 +492,20 @@ WebInspector.HeapSnapshotView.prototype.__proto__ = WebInspector.View.prototype;
WebInspector.HeapSnapshotView.SearchHelper = {
// In comparators, we assume that a value from a node is passed as the first parameter.
- operations: { LESS: function (a, b) { return a !== null && a < b; },
- LESS_OR_EQUAL: function (a, b) { return a !== null && a <= b; },
- EQUAL: function (a, b) { return a !== null && a === b; },
- GREATER_OR_EQUAL: function (a, b) { return a !== null && a >= b; },
- GREATER: function (a, b) { return a !== null && a > b; } },
+ operations: {
+ LESS: function (a, b) { return a !== null && a < b; },
+ LESS_OR_EQUAL: function (a, b) { return a !== null && a <= b; },
+ EQUAL: function (a, b) { return a !== null && a === b; },
+ GREATER_OR_EQUAL: function (a, b) { return a !== null && a >= b; },
+ GREATER: function (a, b) { return a !== null && a > b; }
+ },
- operationParsers: { LESS: /^<(\d+)/,
- LESS_OR_EQUAL: /^<=(\d+)/,
- GREATER_OR_EQUAL: /^>=(\d+)/,
- GREATER: /^>(\d+)/ },
+ operationParsers: {
+ LESS: /^<(\d+)/,
+ LESS_OR_EQUAL: /^<=(\d+)/,
+ GREATER_OR_EQUAL: /^>=(\d+)/,
+ GREATER: /^>(\d+)/
+ },
parseOperationAndNumber: function(query)
{
@@ -466,7 +537,7 @@ WebInspector.HeapSummaryCalculator = function(lowLevelField)
WebInspector.HeapSummaryCalculator.prototype = {
computeSummaryValues: function(lowLevels)
{
- var highLevels = {data: 0, code: 0};
+ var highLevels = { data: 0, code: 0 };
this.total = 0;
for (var item in lowLevels) {
var highItem = this._highFromLow(item);
@@ -476,7 +547,7 @@ WebInspector.HeapSummaryCalculator.prototype = {
this.total += value;
}
}
- var result = {categoryValues: highLevels};
+ var result = { categoryValues: highLevels };
if (!this.showAsPercent)
result.total = this.total;
return result;
@@ -507,13 +578,15 @@ WebInspector.HeapSummaryCountCalculator = function()
}
WebInspector.HeapSummaryCountCalculator.prototype = {
- _highFromLow: function(type) {
+ _highFromLow: function(type)
+ {
if (type === "CODE_TYPE" || type === "SHARED_FUNCTION_INFO_TYPE" || type === "SCRIPT_TYPE") return "code";
if (type === "STRING_TYPE" || type === "HEAP_NUMBER_TYPE" || type.match(/^JS_/)) return "data";
return null;
},
- _valueToString: function(value) {
+ _valueToString: function(value)
+ {
return value.toString();
}
}
@@ -526,9 +599,12 @@ WebInspector.HeapSummarySizeCalculator = function()
}
WebInspector.HeapSummarySizeCalculator.prototype = {
- _highFromLow: function(type) {
- if (type === "CODE_TYPE" || type === "SHARED_FUNCTION_INFO_TYPE" || type === "SCRIPT_TYPE") return "code";
- if (type === "STRING_TYPE" || type === "HEAP_NUMBER_TYPE" || type.match(/^JS_/) || type.match(/_ARRAY_TYPE$/)) return "data";
+ _highFromLow: function(type)
+ {
+ if (type === "CODE_TYPE" || type === "SHARED_FUNCTION_INFO_TYPE" || type === "SCRIPT_TYPE")
+ return "code";
+ if (type === "STRING_TYPE" || type === "HEAP_NUMBER_TYPE" || type.match(/^JS_/) || type.match(/_ARRAY_TYPE$/))
+ return "data";
return null;
},
@@ -537,32 +613,6 @@ WebInspector.HeapSummarySizeCalculator.prototype = {
WebInspector.HeapSummarySizeCalculator.prototype.__proto__ = WebInspector.HeapSummaryCalculator.prototype;
-WebInspector.HeapSnapshotSidebarTreeElement = function(snapshot)
-{
- this.profile = snapshot;
-
- WebInspector.SidebarTreeElement.call(this, "heap-snapshot-sidebar-tree-item", "", "", snapshot, false);
-
- this.refreshTitles();
-};
-
-WebInspector.HeapSnapshotSidebarTreeElement.prototype = {
- get mainTitle()
- {
- if (this._mainTitle)
- return this._mainTitle;
- return this.profile.title;
- },
-
- set mainTitle(x)
- {
- this._mainTitle = x;
- this.refreshTitles();
- }
-};
-
-WebInspector.HeapSnapshotSidebarTreeElement.prototype.__proto__ = WebInspector.ProfileSidebarTreeElement.prototype;
-
WebInspector.HeapSnapshotDataGridNodeWithRetainers = function(owningTree)
{
this.tree = owningTree;
@@ -593,10 +643,12 @@ WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype = {
_populate: function(event)
{
- var self = this;
- this.produceDiff(this.baseRetainers, this.retainers, function(baseItem, snapshotItem) {
- self.appendChild(new WebInspector.HeapSnapshotDataGridRetainerNode(self.snapshotView, baseItem, snapshotItem, self.tree));
- });
+ function appendDiffEntry(baseItem, snapshotItem)
+ {
+ this.appendChild(new WebInspector.HeapSnapshotDataGridRetainerNode(this.snapshotView, baseItem, snapshotItem, this.tree));
+ }
+
+ this.produceDiff(this.baseRetainers, this.retainers, appendDiffEntry.bind(this));
if (this._parent) {
var currentComparator = this._parent.lastComparator;
@@ -641,11 +693,11 @@ WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype = {
if (delta > 0)
return "+";
else
- // Math minus sign, same width as plus.
- return "\u2212";
+ return "\u2212"; // Math minus sign, same width as plus.
},
- showDeltaAsPercent: function(value) {
+ showDeltaAsPercent: function(value)
+ {
if (value === Number.POSITIVE_INFINITY)
return WebInspector.UIString("new");
else if (value === Number.NEGATIVE_INFINITY)
@@ -655,7 +707,8 @@ WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype = {
return WebInspector.UIString("%s%.2f%%", this.signForDelta(value), Math.abs(value));
},
- getTotalCount: function() {
+ getTotalCount: function()
+ {
if (!this._count) {
this._count = 0;
for (var i = 0, n = this.children.length; i < n; ++i)
@@ -664,7 +717,8 @@ WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype = {
return this._count;
},
- getTotalSize: function() {
+ getTotalSize: function()
+ {
if (!this._size) {
this._size = 0;
for (var i = 0, n = this.children.length; i < n; ++i)
@@ -762,8 +816,8 @@ WebInspector.HeapSnapshotDataGridNode = function(snapshotView, baseEntry, snapsh
this.snapshotView = snapshotView;
if (!snapshotEntry)
- snapshotEntry = { cons: baseEntry.cons, count: 0, size: 0, retainers: {} };
- this.constructorName = snapshotEntry.cons;
+ snapshotEntry = { constructorName: baseEntry.constructorName, count: 0, size: 0, retainers: {} };
+ this.constructorName = snapshotEntry.constructorName;
this.count = snapshotEntry.count;
this.size = snapshotEntry.size;
this.retainers = snapshotEntry.retainers;
@@ -808,10 +862,11 @@ WebInspector.HeapSnapshotDataGridList.prototype = {
populateChildren: function(baseEntries, snapshotEntries)
{
- var self = this;
- this.produceDiff(baseEntries, snapshotEntries, function(baseItem, snapshotItem) {
- self.appendChild(new WebInspector.HeapSnapshotDataGridNode(self.snapshotView, baseItem, snapshotItem, self));
- });
+ function appendListEntry(baseItem, snapshotItem)
+ {
+ this.appendChild(new WebInspector.HeapSnapshotDataGridNode(this.snapshotView, baseItem, snapshotItem, this));
+ }
+ this.produceDiff(baseEntries, snapshotEntries, appendListEntry.bind(this));
},
produceDiff: WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.produceDiff,
@@ -844,8 +899,8 @@ WebInspector.HeapSnapshotDataGridRetainerNode = function(snapshotView, baseEntry
this.snapshotView = snapshotView;
if (!snapshotEntry)
- snapshotEntry = { cons: baseEntry.cons, count: 0, clusters: {} };
- this.constructorName = snapshotEntry.cons;
+ snapshotEntry = { constructorName: baseEntry.constructorName, count: 0, clusters: {} };
+ this.constructorName = snapshotEntry.constructorName;
this.count = snapshotEntry.count;
this.retainers = this._calculateRetainers(this.snapshotView.profile, snapshotEntry.clusters);
@@ -872,7 +927,8 @@ WebInspector.HeapSnapshotDataGridRetainerNode.prototype = {
return null;
},
- _calculateRetainers: function(snapshot, clusters) {
+ _calculateRetainers: function(snapshot, clusters)
+ {
var retainers = {};
if (this.isEmptySet(clusters)) {
if (this.constructorName in snapshot.entries)
@@ -895,7 +951,7 @@ WebInspector.HeapSnapshotDataGridRetainerNode.prototype = {
for (var clusterRetainer in clusterRetainers) {
var clusterRetainerEntry = clusterRetainers[clusterRetainer];
if (!(clusterRetainer in retainers))
- retainers[clusterRetainer] = { cons: clusterRetainerEntry.cons, count: 0, clusters: {} };
+ retainers[clusterRetainer] = { constructorName: clusterRetainerEntry.constructorName, count: 0, clusters: {} };
retainers[clusterRetainer].count += clusterRetainerEntry.count;
for (var clusterRetainerCluster in clusterRetainerEntry.clusters)
retainers[clusterRetainer].clusters[clusterRetainerCluster] = true;
@@ -917,8 +973,6 @@ WebInspector.HeapSnapshotProfileType = function()
WebInspector.HeapSnapshotProfileType.TypeId = "HEAP";
-WebInspector.HeapSnapshotProfileType.snapshots = [];
-
WebInspector.HeapSnapshotProfileType.prototype = {
get buttonTooltip()
{
@@ -932,7 +986,7 @@ WebInspector.HeapSnapshotProfileType.prototype = {
buttonClicked: function()
{
- devtools.tools.getProfilerAgent().startProfiling(devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT);
+ InspectorBackend.takeHeapSnapshot();
},
get welcomeMessage()
@@ -942,9 +996,7 @@ WebInspector.HeapSnapshotProfileType.prototype = {
createSidebarTreeElementForProfile: function(profile)
{
- var element = new WebInspector.HeapSnapshotSidebarTreeElement(profile);
- element.small = false;
- return element;
+ return new WebInspector.ProfileSidebarTreeElement(profile, WebInspector.UIString("Snapshot %d"), "heap-snapshot-sidebar-tree-item");
},
createView: function(profile)
@@ -954,13 +1006,3 @@ WebInspector.HeapSnapshotProfileType.prototype = {
}
WebInspector.HeapSnapshotProfileType.prototype.__proto__ = WebInspector.ProfileType.prototype;
-
-
-(function() {
- var originalCreatePanels = WebInspector._createPanels;
- WebInspector._createPanels = function() {
- originalCreatePanels.apply(this, arguments);
- if (WebInspector.panels.profiles)
- WebInspector.panels.profiles.registerProfileType(new WebInspector.HeapSnapshotProfileType());
- }
-})();
diff --git a/WebCore/inspector/front-end/InjectedScriptAccess.js b/WebCore/inspector/front-end/InjectedScriptAccess.js
index ce264dd..cb3c2b8 100644
--- a/WebCore/inspector/front-end/InjectedScriptAccess.js
+++ b/WebCore/inspector/front-end/InjectedScriptAccess.js
@@ -76,9 +76,7 @@ InjectedScriptAccess._installHandler = function(methodName, async)
else
WebInspector.console.addMessage(WebInspector.ConsoleMessage.createTextMessage("Error dispatching: " + methodName));
}
- var callId = WebInspector.Callback.wrap(myCallback);
-
- InspectorBackend.dispatchOnInjectedScript(callId, this._worldId, methodName, argsString);
+ InspectorBackend.dispatchOnInjectedScript(this._worldId, methodName, argsString, myCallback);
};
}
diff --git a/WebCore/inspector/front-end/MetricsSidebarPane.js b/WebCore/inspector/front-end/MetricsSidebarPane.js
index ed5a7ec..18bc240 100644
--- a/WebCore/inspector/front-end/MetricsSidebarPane.js
+++ b/WebCore/inspector/front-end/MetricsSidebarPane.js
@@ -52,14 +52,14 @@ WebInspector.MetricsSidebarPane.prototype = {
var style = WebInspector.CSSStyleDeclaration.parseStyle(stylePayload);
self._update(style);
};
- InspectorBackend.getComputedStyle(WebInspector.Callback.wrap(callback), node.id);
+ InspectorBackend.getComputedStyle(node.id, callback);
var inlineStyleCallback = function(stylePayload) {
if (!stylePayload)
return;
self._inlineStyleId = stylePayload.id;
};
- InspectorBackend.getInlineStyle(WebInspector.Callback.wrap(inlineStyleCallback), node.id);
+ InspectorBackend.getInlineStyle(node.id, inlineStyleCallback);
},
_update: function(style)
@@ -210,7 +210,7 @@ WebInspector.MetricsSidebarPane.prototype = {
self.update();
};
- InspectorBackend.setStyleProperty(WebInspector.Callback.wrap(callback), this._inlineStyleId, context.styleProperty, userInput);
+ InspectorBackend.setStyleProperty(this._inlineStyleId, context.styleProperty, userInput, callback);
}
}
diff --git a/WebCore/inspector/front-end/ObjectPropertiesSection.js b/WebCore/inspector/front-end/ObjectPropertiesSection.js
index aab9546..015039c 100644
--- a/WebCore/inspector/front-end/ObjectPropertiesSection.js
+++ b/WebCore/inspector/front-end/ObjectPropertiesSection.js
@@ -184,6 +184,8 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
this.valueElement.addStyleClass("dimmed");
if (this.property.value.isError())
this.valueElement.addStyleClass("error");
+ if (this.property.value.type)
+ this.valueElement.addStyleClass("console-formatted-" + this.property.value.type);
this.listItemElement.removeChildren();
diff --git a/WebCore/inspector/front-end/Panel.js b/WebCore/inspector/front-end/Panel.js
index 8cbdebb..2a4104f 100644
--- a/WebCore/inspector/front-end/Panel.js
+++ b/WebCore/inspector/front-end/Panel.js
@@ -72,6 +72,11 @@ WebInspector.Panel.prototype = {
return this._toolbarItem;
},
+ get name()
+ {
+ return this._panelName;
+ },
+
show: function()
{
WebInspector.View.prototype.show.call(this);
diff --git a/WebCore/inspector/front-end/ProfileView.js b/WebCore/inspector/front-end/ProfileView.js
index 817f1f5..c325bf7 100644
--- a/WebCore/inspector/front-end/ProfileView.js
+++ b/WebCore/inspector/front-end/ProfileView.js
@@ -94,8 +94,7 @@ WebInspector.CPUProfileView = function(profile)
self._updatePercentButton();
}
- var callId = WebInspector.Callback.wrap(profileCallback);
- InspectorBackend.getProfile(callId, this.profile.uid);
+ InspectorBackend.getProfile(this.profile.typeId, this.profile.uid, profileCallback);
}
WebInspector.CPUProfileView.prototype = {
@@ -611,7 +610,7 @@ WebInspector.CPUProfileType.prototype = {
createSidebarTreeElementForProfile: function(profile)
{
- return new WebInspector.ProfileSidebarTreeElement(profile);
+ return new WebInspector.ProfileSidebarTreeElement(profile, WebInspector.UIString("Profile %d"), "profile-sidebar-tree-item");
},
createView: function(profile)
diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js
index e18274c..2bd76f9 100644
--- a/WebCore/inspector/front-end/ProfilesPanel.js
+++ b/WebCore/inspector/front-end/ProfilesPanel.js
@@ -158,8 +158,7 @@ WebInspector.ProfilesPanel.prototype = {
show: function()
{
WebInspector.Panel.prototype.show.call(this);
- if (!this._profilesWereRequested)
- this._populateProfiles();
+ this._populateProfiles();
},
profilerWasEnabled: function()
@@ -321,6 +320,7 @@ WebInspector.ProfilesPanel.prototype = {
this.welcomeView.hide();
if (!this.visibleView)
this.showProfile(profile);
+ this.dispatchEventToListeners("profile added");
}
},
@@ -345,7 +345,7 @@ WebInspector.ProfilesPanel.prototype = {
sidebarParent.removeChild(profile._profilesTreeElement);
if (!profile.isTemporary)
- InspectorBackend.removeProfile(profile.uid);
+ InspectorBackend.removeProfile(profile.typeId, profile.uid);
// No other item will be selected if there aren't any other profiles, so
// make sure that view gets cleared when the last profile is removed.
@@ -376,6 +376,27 @@ WebInspector.ProfilesPanel.prototype = {
this.profileViewStatusBarItemsContainer.appendChild(statusBarItems[i]);
},
+ getProfiles: function(typeId)
+ {
+ var result = [];
+ var profilesCount = this._profiles.length;
+ for (var i = 0; i < profilesCount; ++i)
+ if (this._profiles[i].typeId === typeId)
+ result.push(this._profiles[i]);
+ return result;
+ },
+
+ updateProfile: function(profile)
+ {
+ var profilesCount = this._profiles.length;
+ for (var i = 0; i < profilesCount; ++i)
+ if (this._profiles[i].typeId === profile.typeId
+ && this._profiles[i].uid === profile.uid) {
+ this._profiles[i] = profile;
+ break;
+ }
+ },
+
showView: function(view)
{
this.showProfile(view.profile);
@@ -510,12 +531,8 @@ WebInspector.ProfilesPanel.prototype = {
_populateProfiles: function()
{
- var sidebarTreeChildrenCount = this.sidebarTree.children.length;
- for (var i = 0; i < sidebarTreeChildrenCount; ++i) {
- var treeElement = this.sidebarTree.children[i];
- if (treeElement.children.length)
- return;
- }
+ if (!this._profilerEnabled || this._profilesWereRequested)
+ return;
function populateCallback(profileHeaders) {
profileHeaders.sort(function(a, b) { return a.uid - b.uid; });
@@ -524,8 +541,7 @@ WebInspector.ProfilesPanel.prototype = {
WebInspector.addProfileHeader(profileHeaders[i]);
}
- var callId = WebInspector.Callback.wrap(populateCallback);
- InspectorBackend.getProfileHeaders(callId);
+ InspectorBackend.getProfileHeaders(populateCallback);
this._profilesWereRequested = true;
},
@@ -541,14 +557,15 @@ WebInspector.ProfilesPanel.prototype = {
WebInspector.ProfilesPanel.prototype.__proto__ = WebInspector.Panel.prototype;
-WebInspector.ProfileSidebarTreeElement = function(profile)
+WebInspector.ProfileSidebarTreeElement = function(profile, titleFormat, className)
{
this.profile = profile;
+ this._titleFormat = titleFormat;
if (this.profile.title.indexOf(UserInitiatedProfileName) === 0)
this._profileNumber = this.profile.title.substring(UserInitiatedProfileName.length + 1);
- WebInspector.SidebarTreeElement.call(this, "profile-sidebar-tree-item", "", "", profile, false);
+ WebInspector.SidebarTreeElement.call(this, className, "", "", profile, false);
this.refreshTitles();
}
@@ -570,7 +587,7 @@ WebInspector.ProfileSidebarTreeElement.prototype = {
if (this._mainTitle)
return this._mainTitle;
if (this.profile.title.indexOf(UserInitiatedProfileName) === 0)
- return WebInspector.UIString("Profile %d", this._profileNumber);
+ return WebInspector.UIString(this._titleFormat, this._profileNumber);
return this.profile.title;
},
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index ff0d1ab..27df5cf 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -883,7 +883,7 @@ WebInspector.ResourcesPanel.prototype.__proto__ = WebInspector.AbstractTimelineP
WebInspector.getResourceContent = function(identifier, callback)
{
- InspectorBackend.getResourceContent(WebInspector.Callback.wrap(callback), identifier);
+ InspectorBackend.getResourceContent(identifier, callback);
}
WebInspector.ResourceTimeCalculator = function(startAtZero)
diff --git a/WebCore/inspector/front-end/ScriptView.js b/WebCore/inspector/front-end/ScriptView.js
index 74dc30a..d878e9b 100644
--- a/WebCore/inspector/front-end/ScriptView.js
+++ b/WebCore/inspector/front-end/ScriptView.js
@@ -56,10 +56,8 @@ WebInspector.ScriptView.prototype = {
if (this.script.source)
this._sourceFrameSetupFinished();
- else {
- var callbackId = WebInspector.Callback.wrap(this._didGetScriptSource.bind(this))
- InspectorBackend.getScriptSource(callbackId, this.script.sourceID);
- }
+ else
+ InspectorBackend.getScriptSource(this.script.sourceID, this._didGetScriptSource.bind(this));
},
_didGetScriptSource: function(source)
diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js
index 7521ea9..75fd6f7 100644
--- a/WebCore/inspector/front-end/ScriptsPanel.js
+++ b/WebCore/inspector/front-end/ScriptsPanel.js
@@ -343,8 +343,7 @@ WebInspector.ScriptsPanel.prototype = {
WebInspector.breakpointManager.setBreakpoint(sourceID, breakpoint.url, newLine, breakpoint.enabled, breakpoint.condition);
}
};
- var callbackId = WebInspector.Callback.wrap(mycallback.bind(this))
- InspectorBackend.editScriptSource(callbackId, sourceID, newContent);
+ InspectorBackend.editScriptSource(sourceID, newContent, mycallback.bind(this));
},
selectedCallFrameId: function()
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index 33a1b91..41d82f9 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -81,10 +81,10 @@ WebInspector.Settings.initialize = function()
WebInspector.sessionSettings.dispatchEventToListeners("loaded");
}
- InspectorBackend.getSettings(WebInspector.Callback.wrap(function(settings) {
+ InspectorBackend.getSettings(function(settings) {
populateApplicationSettings(settings.application);
populateSessionSettings(settings.session);
- }));
+ });
}
WebInspector.Settings.prototype = {
diff --git a/WebCore/inspector/front-end/SourceCSSTokenizer.re2js b/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
index b4d3eef..f4628d2 100644
--- a/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
+++ b/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
@@ -48,7 +48,7 @@ WebInspector.SourceCSSTokenizer = function()
this._valueKeywords = [
"above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",
- "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "arabic-indic", "armenian",
+ "alternate", "always","amharic", "amharic-abegede", "antialiased", "appworkspace", "aqua", "arabic-indic", "armenian", "asterisks",
"auto", "avoid", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "black", "blink",
"block", "block-axis", "blue", "bold", "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button",
"button-bevel", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", "capitalize", "caps-lock-indicator",
@@ -61,7 +61,7 @@ WebInspector.SourceCSSTokenizer = function()
"ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et",
"ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et",
"ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ew-resize", "expanded",
- "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "forwards", "from", "fuchsia", "geometricPrecision",
+ "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes", "forwards", "from", "fuchsia", "geometricPrecision",
"georgian", "gray", "graytext", "green", "grey", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help",
"hidden", "hide", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline",
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index 4901857..b640936 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -4,6 +4,7 @@
<file>AbstractTimelinePanel.js</file>
<file>ApplicationCacheItemsView.js</file>
<file>AuditCategories.js</file>
+ <file>AuditFormatters.js</file>
<file>AuditLauncherView.js</file>
<file>AuditResultView.js</file>
<file>AuditRules.js</file>
@@ -35,11 +36,14 @@
<file>ElementsTreeOutline.js</file>
<file>EventListenersSidebarPane.js</file>
<file>ExtensionAPI.js</file>
+ <file>ExtensionAuditCategory.js</file>
+ <file>ExtensionCommon.js</file>
<file>ExtensionPanel.js</file>
<file>ExtensionRegistryStub.js</file>
<file>ExtensionServer.js</file>
<file>FontView.js</file>
<file>HAREntry.js</file>
+ <file>HeapSnapshotView.js</file>
<file>HelpScreen.js</file>
<file>ImageView.js</file>
<file>InjectedFakeWorker.js</file>
diff --git a/WebCore/inspector/front-end/inspector.css b/WebCore/inspector/front-end/inspector.css
index 4319816..a3ffa44 100644
--- a/WebCore/inspector/front-end/inspector.css
+++ b/WebCore/inspector/front-end/inspector.css
@@ -3910,6 +3910,115 @@ button.enable-toggle-status-bar-item .glyph {
-webkit-mask-image: url(Images/reloadButtonGlyph.png);
}
+/* Heap Snapshot View Styles */
+
+/* FIXME: move to a separate css file */
+.heap-snapshot-sidebar-tree-item .icon {
+ content: url(Images/profileIcon.png);
+}
+
+.heap-snapshot-sidebar-tree-item.small .icon {
+ content: url(Images/profileSmallIcon.png);
+}
+
+.heap-snapshot-view {
+ display: none;
+ overflow: hidden;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+}
+
+.heap-snapshot-view.visible {
+ display: block;
+}
+
+.heap-snapshot-view .data-grid {
+ border: none;
+ max-height: 100%;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 93px;
+}
+
+.heap-snapshot-view .data-grid th.count-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.count-column {
+ text-align: right;
+}
+
+.heap-snapshot-view .data-grid th.size-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.size-column {
+ text-align: right;
+}
+
+.heap-snapshot-view .data-grid th.countDelta-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.countDelta-column {
+ text-align: right;
+}
+
+.heap-snapshot-view .data-grid th.sizeDelta-column {
+ text-align: center;
+}
+
+.heap-snapshot-view .data-grid td.sizeDelta-column {
+ text-align: right;
+}
+
+#heap-snapshot-summary-container {
+ position: absolute;
+ padding-top: 20px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 93px;
+ margin-left: -1px;
+ border-left: 1px solid rgb(102, 102, 102);
+ background-color: rgb(101, 111, 130);
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
+ background-repeat: repeat-x;
+ background-position: top;
+ text-align: center;
+ text-shadow: black 0 1px 1px;
+ white-space: nowrap;
+ color: white;
+ -webkit-background-size: 1px 6px;
+ -webkit-background-origin: padding;
+ -webkit-background-clip: padding;
+}
+
+.heap-snapshot-summary {
+ display: inline-block;
+ width: 50%;
+ min-width: 300px;
+ position: relative;
+}
+
+.heap-snapshot-summary canvas.summary-graph {
+ width: 225px;
+}
+
+.heap-snapshot-summary-label {
+ font-size: 12px;
+ font-weight: bold;
+ position: absolute;
+ top: 1px;
+ width: 50%;
+ left: 25%;
+}
+
.delete-storage-status-bar-item .glyph {
-webkit-mask-image: url(Images/excludeButtonGlyph.png);
}
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index 14e2cdc..3e4b6c1 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -98,6 +98,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="ProfilesPanel.js"></script>
<script type="text/javascript" src="ConsolePanel.js"></script>
<script type="text/javascript" src="ExtensionAPI.js"></script>
+ <script type="text/javascript" src="ExtensionAuditCategory.js"></script>
+ <script type="text/javascript" src="ExtensionCommon.js"></script>
<script type="text/javascript" src="ExtensionServer.js"></script>
<script type="text/javascript" src="ExtensionPanel.js"></script>
<script type="text/javascript" src="AuditsPanel.js"></script>
@@ -105,6 +107,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="AuditLauncherView.js"></script>
<script type="text/javascript" src="AuditRules.js"></script>
<script type="text/javascript" src="AuditCategories.js"></script>
+ <script type="text/javascript" src="AuditFormatters.js"></script>
<script type="text/javascript" src="ResourceView.js"></script>
<script type="text/javascript" src="SourceFrame.js"></script>
<script type="text/javascript" src="DOMSyntaxHighlighter.js"></script>
@@ -125,6 +128,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="BottomUpProfileDataGridTree.js"></script>
<script type="text/javascript" src="TopDownProfileDataGridTree.js"></script>
<script type="text/javascript" src="ProfileView.js"></script>
+ <script type="text/javascript" src="HeapSnapshotView.js"></script>
<script type="text/javascript" src="DOMAgent.js"></script>
<script type="text/javascript" src="InjectedScript.js"></script>
<script type="text/javascript" src="InjectedScriptAccess.js"></script>
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index db89e20..0bff335 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -233,6 +233,8 @@ var WebInspector = {
if (hiddenPanels.indexOf("profiles") === -1) {
this.panels.profiles = new WebInspector.ProfilesPanel();
this.panels.profiles.registerProfileType(new WebInspector.CPUProfileType());
+ if (Preferences.heapProfilerPresent)
+ this.panels.profiles.registerProfileType(new WebInspector.HeapSnapshotProfileType());
}
if (hiddenPanels.indexOf("storage") === -1 && hiddenPanels.indexOf("databases") === -1)
this.panels.storage = new WebInspector.StoragePanel();
@@ -583,7 +585,7 @@ WebInspector.doLoadedDone = function()
InspectorBackend.populateScriptObjects();
// As a DOMAgent method, this needs to happen after the frontend has loaded and the agent is available.
- InspectorBackend.getSupportedCSSProperties(WebInspector.Callback.wrap(WebInspector.CSSCompletions._load));
+ InspectorBackend.getSupportedCSSProperties(WebInspector.CSSCompletions._load);
}
WebInspector.addPanelToolbarIcon = function(toolbarElement, panel, previousToolbarItem)
@@ -632,27 +634,29 @@ WebInspector.dispatch = function(message) {
WebInspector_syncDispatch = function(message)
{
var messageObject = (typeof message === "string") ? JSON.parse(message) : message;
- if (messageObject.type === "response" && !messageObject.success) {
- WebInspector.removeResponseCallbackEntry(messageObject.seq)
- WebInspector.reportProtocolError(messageObject);
- return;
- }
var arguments = [];
if (messageObject.data)
for (var key in messageObject.data)
arguments.push(messageObject.data[key]);
+ if ("seq" in messageObject) { // just a response for some request
+ if (messageObject.success)
+ WebInspector.processResponse(messageObject.seq, arguments);
+ else {
+ WebInspector.removeResponseCallbackEntry(messageObject.seq)
+ WebInspector.reportProtocolError(messageObject);
+ }
+ return;
+ }
+
if (messageObject.type === "event") {
- if (!messageObject.event in WebInspector) {
- console.error("Attempted to dispatch unimplemented WebInspector method: %s", messageObject.event);
+ if (!(messageObject.event in WebInspector)) {
+ console.error("Protocol Error: Attempted to dispatch an unimplemented WebInspector method '%s'", messageObject.event);
return;
}
WebInspector[messageObject.event].apply(WebInspector, arguments);
}
-
- if (messageObject.type === "response")
- WebInspector.processResponse(messageObject.seq, arguments);
}
WebInspector.dispatchMessageFromBackend = function(messageObject)
@@ -662,7 +666,7 @@ WebInspector.dispatchMessageFromBackend = function(messageObject)
WebInspector.reportProtocolError = function(messageObject)
{
- console.error("Error: InspectorBackend." + messageObject.command + " failed.");
+ console.error("Protocol Error: InspectorBackend request with seq = %d failed.", messageObject.seq);
for (var error in messageObject.errors)
console.error(" " + error);
WebInspector.removeResponseCallbackEntry(messageObject.seq);
@@ -1444,6 +1448,7 @@ WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLin
WebInspector.pausedScript = function(callFrames)
{
this.panels.scripts.debuggerPaused(callFrames);
+ InspectorFrontendHost.bringToFront();
}
WebInspector.resumedScript = function()
diff --git a/WebCore/inspector/front-end/utilities.js b/WebCore/inspector/front-end/utilities.js
index 66cf284..e8adff6 100644
--- a/WebCore/inspector/front-end/utilities.js
+++ b/WebCore/inspector/front-end/utilities.js
@@ -732,12 +732,6 @@ Array.convert = function(list)
function insertionIndexForObjectInListSortedByFunction(anObject, aList, aFunction)
{
- // indexOf returns (-lowerBound - 1). Taking (-result - 1) works out to lowerBound.
- return (-indexOfObjectInListSortedByFunction(anObject, aList, aFunction) - 1);
-}
-
-function indexOfObjectInListSortedByFunction(anObject, aList, aFunction)
-{
var first = 0;
var last = aList.length - 1;
var floor = Math.floor;
@@ -760,9 +754,7 @@ function indexOfObjectInListSortedByFunction(anObject, aList, aFunction)
}
}
- // By returning 1 less than the negative lower search bound, we can reuse this function
- // for both indexOf and insertionIndexFor, with some simple arithmetic.
- return (-first - 1);
+ return first;
}
String.sprintf = function(format)
diff --git a/WebCore/loader/CrossOriginAccessControl.cpp b/WebCore/loader/CrossOriginAccessControl.cpp
index 630f2b7..f510704 100644
--- a/WebCore/loader/CrossOriginAccessControl.cpp
+++ b/WebCore/loader/CrossOriginAccessControl.cpp
@@ -71,9 +71,9 @@ bool isSimpleCrossOriginAccessRequest(const String& method, const HTTPHeaderMap&
}
typedef HashSet<String, CaseFoldingHash> HTTPHeaderSet;
-static HTTPHeaderSet* createAllowedCrossOriginResponseHeadersSet()
+static PassOwnPtr<HTTPHeaderSet> createAllowedCrossOriginResponseHeadersSet()
{
- HTTPHeaderSet* headerSet = new HashSet<String, CaseFoldingHash>;
+ OwnPtr<HTTPHeaderSet> headerSet = adoptPtr(new HashSet<String, CaseFoldingHash>);
headerSet->add("cache-control");
headerSet->add("content-language");
@@ -82,12 +82,12 @@ static HTTPHeaderSet* createAllowedCrossOriginResponseHeadersSet()
headerSet->add("last-modified");
headerSet->add("pragma");
- return headerSet;
+ return headerSet.release();
}
bool isOnAccessControlResponseHeaderWhitelist(const String& name)
{
- AtomicallyInitializedStatic(HTTPHeaderSet*, allowedCrossOriginResponseHeaders = createAllowedCrossOriginResponseHeadersSet());
+ AtomicallyInitializedStatic(HTTPHeaderSet*, allowedCrossOriginResponseHeaders = createAllowedCrossOriginResponseHeadersSet().leakPtr());
return allowedCrossOriginResponseHeaders->contains(name);
}
diff --git a/WebCore/loader/DocLoader.cpp b/WebCore/loader/DocLoader.cpp
index d63123e..d04e148 100644
--- a/WebCore/loader/DocLoader.cpp
+++ b/WebCore/loader/DocLoader.cpp
@@ -180,6 +180,7 @@ CachedXSLStyleSheet* DocLoader::requestXSLStyleSheet(const String& url)
#if ENABLE(LINK_PREFETCH)
CachedResource* DocLoader::requestLinkPrefetch(const String& url)
{
+ ASSERT(frame());
return requestResource(CachedResource::LinkPrefetch, url, String());
}
#endif
@@ -473,7 +474,7 @@ void DocLoader::requestPreload(CachedResource::Type type, const String& url, con
resource->increasePreloadCount();
if (!m_preloads)
- m_preloads.set(new ListHashSet<CachedResource*>);
+ m_preloads = adoptPtr(new ListHashSet<CachedResource*>);
m_preloads->add(resource);
#if PRELOAD_DEBUG
diff --git a/WebCore/loader/DocumentLoader.cpp b/WebCore/loader/DocumentLoader.cpp
index 26d66e8..1e18077 100644
--- a/WebCore/loader/DocumentLoader.cpp
+++ b/WebCore/loader/DocumentLoader.cpp
@@ -91,7 +91,7 @@ DocumentLoader::DocumentLoader(const ResourceRequest& req, const SubstituteData&
, m_substituteResourceDeliveryTimer(this, &DocumentLoader::substituteResourceDeliveryTimerFired)
, m_didCreateGlobalHistoryEntry(false)
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- , m_applicationCacheHost(new ApplicationCacheHost(this))
+ , m_applicationCacheHost(adoptPtr(new ApplicationCacheHost(this)))
#endif
{
}
@@ -411,7 +411,7 @@ bool DocumentLoader::isLoadingInAPISense() const
void DocumentLoader::addAllArchiveResources(Archive* archive)
{
if (!m_archiveResourceCollection)
- m_archiveResourceCollection.set(new ArchiveResourceCollection);
+ m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection);
ASSERT(archive);
if (!archive)
@@ -425,7 +425,7 @@ void DocumentLoader::addAllArchiveResources(Archive* archive)
void DocumentLoader::addArchiveResource(PassRefPtr<ArchiveResource> resource)
{
if (!m_archiveResourceCollection)
- m_archiveResourceCollection.set(new ArchiveResourceCollection);
+ m_archiveResourceCollection = adoptPtr(new ArchiveResourceCollection);
ASSERT(resource);
if (!resource)
diff --git a/WebCore/loader/DocumentThreadableLoader.cpp b/WebCore/loader/DocumentThreadableLoader.cpp
index 16f114d..a792144 100644
--- a/WebCore/loader/DocumentThreadableLoader.cpp
+++ b/WebCore/loader/DocumentThreadableLoader.cpp
@@ -83,7 +83,7 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document* document, Threadabl
ASSERT(m_options.crossOriginRequestPolicy == UseAccessControl);
- OwnPtr<ResourceRequest> crossOriginRequest(new ResourceRequest(request));
+ OwnPtr<ResourceRequest> crossOriginRequest = adoptPtr(new ResourceRequest(request));
crossOriginRequest->removeCredentials();
crossOriginRequest->setAllowCookies(m_options.allowCredentials);
@@ -195,7 +195,7 @@ void DocumentThreadableLoader::didReceiveResponse(SubresourceLoader* loader, con
return;
}
- OwnPtr<CrossOriginPreflightResultCacheItem> preflightResult(new CrossOriginPreflightResultCacheItem(m_options.allowCredentials));
+ OwnPtr<CrossOriginPreflightResultCacheItem> preflightResult = adoptPtr(new CrossOriginPreflightResultCacheItem(m_options.allowCredentials));
if (!preflightResult->parse(response, accessControlErrorDescription)
|| !preflightResult->allowsCrossOriginMethod(m_actualRequest->httpMethod(), accessControlErrorDescription)
|| !preflightResult->allowsCrossOriginHeaders(m_actualRequest->httpHeaderFields(), accessControlErrorDescription)) {
diff --git a/WebCore/loader/DocumentWriter.cpp b/WebCore/loader/DocumentWriter.cpp
index d99f340..cd82d6e 100644
--- a/WebCore/loader/DocumentWriter.cpp
+++ b/WebCore/loader/DocumentWriter.cpp
@@ -72,7 +72,7 @@ void DocumentWriter::replaceDocument(const String& source)
if (!source.isNull()) {
if (!m_receivedData) {
m_receivedData = true;
- m_frame->document()->setParseMode(Document::Strict);
+ m_frame->document()->setCompatibilityMode(Document::NoQuirksMode);
}
// FIXME: This should call DocumentParser::appendBytes instead of append
@@ -179,7 +179,7 @@ TextResourceDecoder* DocumentWriter::createDecoderIfNeeded()
return m_decoder.get();
}
-void DocumentWriter::reportDataRecieved()
+void DocumentWriter::reportDataReceived()
{
ASSERT(m_decoder);
if (!m_receivedData) {
diff --git a/WebCore/loader/DocumentWriter.h b/WebCore/loader/DocumentWriter.h
index b1007ef..531a632 100644
--- a/WebCore/loader/DocumentWriter.h
+++ b/WebCore/loader/DocumentWriter.h
@@ -69,7 +69,7 @@ public:
// Exposed for DoucmentParser::appendBytes
TextResourceDecoder* createDecoderIfNeeded();
- void reportDataRecieved();
+ void reportDataReceived();
private:
PassRefPtr<Document> createDocument(const KURL&);
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 0d30713..32722d6 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -46,10 +46,6 @@
#include "ResourceError.h"
#include "SearchPopupMenu.h"
-#if USE(GLES2_RENDERING)
-#include "GLES2Context.h"
-#endif
-
/*
This file holds empty Client stubs for use by WebCore.
Viewless element needs to create a dummy Page->Frame->FrameView tree for use in parsing or executing JavaScript.
@@ -203,11 +199,6 @@ public:
virtual void scheduleCompositingLayerSync() {};
#endif
-#if USE(GLES2_RENDERING)
- virtual PassOwnPtr<GLES2Context> getOnscreenGLES2Context() { return 0; }
- virtual PassOwnPtr<GLES2Context> getOffscreenGLES2Context() { return 0; }
-#endif
-
#if PLATFORM(WIN)
virtual void setLastSetCursorToCurrentCursor() { }
#endif
@@ -477,6 +468,10 @@ public:
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
virtual void checkTextOfParagraph(const UChar*, int, uint64_t, Vector<TextCheckingResult>&) { };
#endif
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ virtual void showCorrectionPanel(const FloatRect&, const String&, const String&, Editor*) { }
+ virtual void dismissCorrectionPanel(bool) { }
+#endif
virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) { }
virtual void updateSpellingUIWithMisspelledWord(const String&) { }
virtual void showSpellingUI(bool) { }
diff --git a/WebCore/loader/FormSubmission.cpp b/WebCore/loader/FormSubmission.cpp
index 22e89d7..98a545e 100644
--- a/WebCore/loader/FormSubmission.cpp
+++ b/WebCore/loader/FormSubmission.cpp
@@ -162,10 +162,10 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A
String boundary;
if (isMultiPartForm) {
- formData = FormData::createMultiPart(domFormData->items(), domFormData->encoding(), document);
+ formData = FormData::createMultiPart(*(static_cast<FormDataList*>(domFormData.get())), domFormData->encoding(), document);
boundary = formData->boundary().data();
} else {
- formData = FormData::create(domFormData->items(), domFormData->encoding());
+ formData = FormData::create(*(static_cast<FormDataList*>(domFormData.get())), domFormData->encoding());
if (attributes.method() == PostMethod && isMailtoForm) {
// Convert the form data into a string that we put into the URL.
appendMailtoPostFormDataToURL(actionURL, *formData, encodingType);
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index dc2c68c..496cac9 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -166,11 +166,6 @@ static int numRequests(Document* document)
return document->docLoader()->requestCount();
}
-static inline bool canReferToParentFrameEncoding(const Frame* frame, const Frame* parentFrame)
-{
- return parentFrame && parentFrame->document()->securityOrigin()->canAccess(frame->document()->securityOrigin());
-}
-
// This is not in the FrameLoader class to emphasize that it does not depend on
// private FrameLoader data, and to avoid increasing the number of public functions
// with access to private data. Since only this .cpp file needs it, making it
@@ -841,6 +836,10 @@ void FrameLoader::checkCompleted()
if (numRequests(m_frame->document()))
return;
+ // Still waiting for elements that don't go through a FrameLoader?
+ if (m_frame->document()->isDelayingLoadEvent())
+ return;
+
// OK, completed.
m_isComplete = true;
@@ -889,7 +888,7 @@ void FrameLoader::scheduleCheckLoadComplete()
void FrameLoader::checkCallImplicitClose()
{
- if (m_didCallImplicitClose || m_frame->document()->parsing())
+ if (m_didCallImplicitClose || m_frame->document()->parsing() || m_frame->document()->isDelayingLoadEvent())
return;
if (!allChildrenAreComplete())
@@ -1187,10 +1186,8 @@ void FrameLoader::loadInSameDocument(const KURL& url, SerializedScriptValue* sta
m_client->dispatchDidNavigateWithinPage();
- if (stateObject) {
- m_frame->document()->statePopped(stateObject);
- m_client->dispatchDidPopStateWithinPage();
- }
+ m_frame->document()->statePopped(stateObject ? stateObject : SerializedScriptValue::nullValue());
+ m_client->dispatchDidPopStateWithinPage();
if (hashChange) {
m_frame->document()->enqueueHashchangeEvent(oldURL, url);
@@ -1968,7 +1965,8 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
history()->updateForBackForwardNavigation();
- if (history()->currentItem())
+ // For cached pages, CachedFrame::restore will take care of firing the popstate event with the history item's state object
+ if (history()->currentItem() && !cachedPage)
m_pendingStateObject = history()->currentItem()->stateObject();
// Create a document view for this document, or used the cached view.
@@ -2182,6 +2180,10 @@ void FrameLoader::finishedLoading()
dl->setPrimaryLoadComplete(true);
m_client->dispatchDidLoadMainResource(dl.get());
checkLoadComplete();
+
+ DOMWindow* window = m_frame->existingDOMWindow();
+ if (window && window->printDeferred())
+ window->print();
}
bool FrameLoader::isHostedByObjectElement() const
@@ -2530,6 +2532,7 @@ void FrameLoader::closeAndRemoveChild(Frame* child)
child->setView(0);
if (child->ownerElement() && child->page())
child->page()->decrementFrameCount();
+ // FIXME: The page isn't being destroyed, so it's not right to call a function named pageDestroyed().
child->pageDestroyed();
m_frame->tree()->removeChild(child);
@@ -2618,6 +2621,7 @@ void FrameLoader::detachFromParent()
parent->loader()->scheduleCheckCompleted();
} else {
m_frame->setView(0);
+ // FIXME: The page isn't being destroyed, so it's not right to call a function named pageDestroyed().
m_frame->pageDestroyed();
}
}
@@ -2670,17 +2674,19 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
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) {
- request.setCachePolicy(ReloadIgnoringCacheData);
- request.setHTTPHeaderField("Cache-Control", "no-cache");
- request.setHTTPHeaderField("Pragma", "no-cache");
- } else if (request.isConditional())
+ } else if (loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFromOrigin || request.isConditional())
request.setCachePolicy(ReloadIgnoringCacheData);
else if (isBackForwardLoadType(loadType) && m_stateMachine.committedFirstRealDocumentLoad() && !request.url().protocolIs("https"))
request.setCachePolicy(ReturnCacheDataElseLoad);
+
+ if (request.cachePolicy() == ReloadIgnoringCacheData) {
+ if (loadType == FrameLoadTypeReload)
+ request.setHTTPHeaderField("Cache-Control", "max-age=0");
+ else if (loadType == FrameLoadTypeReloadFromOrigin) {
+ request.setHTTPHeaderField("Cache-Control", "no-cache");
+ request.setHTTPHeaderField("Pragma", "no-cache");
+ }
+ }
if (mainResource)
request.setHTTPAccept(defaultAcceptHeader);
@@ -3260,11 +3266,11 @@ void FrameLoader::navigateToDifferentDocument(HistoryItem* item, FrameLoadType l
void FrameLoader::loadItem(HistoryItem* item, FrameLoadType loadType)
{
// We do same-document navigation in the following cases:
- // - The HistoryItem corresponds to the same document.
+ // - The HistoryItem corresponds to the same document (or documents in the case of frames).
// - The HistoryItem is not the same as the current item.
HistoryItem* currentItem = history()->currentItem();
bool sameDocumentNavigation = currentItem && item != currentItem
- && item->documentSequenceNumber() == currentItem->documentSequenceNumber();
+ && item->hasSameDocuments(currentItem);
#if ENABLE(WML)
// All WML decks should go through the real load mechanism, not the scroll-to-anchor code
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index 144faa5..32a6a91 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -558,9 +558,10 @@ void HistoryController::recursiveGoToItem(HistoryItem* item, HistoryItem* fromIt
// to match.
// Note: If item and fromItem are the same, then we need to create a new
// document.
- if (item != fromItem && item->itemSequenceNumber() == fromItem->itemSequenceNumber()
- && ((m_frame->tree()->name().isEmpty() && item->target().isEmpty()) || m_frame->tree()->name() == item->target())
- && childFramesMatchItem(item))
+ if (item != fromItem
+ && item->itemSequenceNumber() == fromItem->itemSequenceNumber()
+ && currentFramesMatchItem(item)
+ && fromItem->hasSameFrames(item))
{
// This content is good, so leave it alone and look for children that need reloading
// Save form state (works from currentItem, since prevItem is nil)
@@ -585,7 +586,7 @@ void HistoryController::recursiveGoToItem(HistoryItem* item, HistoryItem* fromIt
for (int i = 0; i < size; ++i) {
String childFrameName = childItems[i]->target();
HistoryItem* fromChildItem = fromItem->childItemWithTarget(childFrameName);
- ASSERT(fromChildItem || fromItem->isTargetItem());
+ ASSERT(fromChildItem);
Frame* childFrame = m_frame->tree()->child(childFrameName);
ASSERT(childFrame);
childFrame->loader()->history()->recursiveGoToItem(childItems[i].get(), fromChildItem, type);
@@ -595,10 +596,12 @@ void HistoryController::recursiveGoToItem(HistoryItem* item, HistoryItem* fromIt
}
}
-// helper method that determines whether the subframes described by the item's subitems
-// match our own current frameset
-bool HistoryController::childFramesMatchItem(HistoryItem* item) const
+// Helper method that determines whether the current frame tree matches given history item's.
+bool HistoryController::currentFramesMatchItem(HistoryItem* item) const
{
+ if ((!m_frame->tree()->name().isEmpty() || !item->target().isEmpty()) && m_frame->tree()->name() != item->target())
+ return false;
+
const HistoryItemVector& childItems = item->children();
if (childItems.size() != m_frame->tree()->childCount())
return false;
@@ -609,7 +612,6 @@ bool HistoryController::childFramesMatchItem(HistoryItem* item) const
return false;
}
- // Found matches for all item targets
return true;
}
@@ -655,12 +657,6 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
m_currentItem->setStateObject(stateObject);
m_currentItem->setURLString(urlString);
- // Create a null state object for the previous HistoryItem so that we will
- // generate a popstate event when navigating back to it.
- // FIXME: http://webkit.org/b/41372 implies that we shouldn't need this.
- if (!m_previousItem->stateObject())
- m_previousItem->setStateObject(SerializedScriptValue::create());
-
page->backForwardList()->addItem(topItem.release());
}
diff --git a/WebCore/loader/HistoryController.h b/WebCore/loader/HistoryController.h
index 19902f8..487fdc9 100644
--- a/WebCore/loader/HistoryController.h
+++ b/WebCore/loader/HistoryController.h
@@ -86,7 +86,7 @@ private:
PassRefPtr<HistoryItem> createItemTree(Frame* targetFrame, bool clipAtTarget);
void recursiveGoToItem(HistoryItem*, HistoryItem*, FrameLoadType);
- bool childFramesMatchItem(HistoryItem*) const;
+ bool currentFramesMatchItem(HistoryItem*) const;
void updateBackForwardListClippedAtTarget(bool doClip);
Frame* m_frame;
diff --git a/WebCore/loader/ImageDocument.cpp b/WebCore/loader/ImageDocument.cpp
index a1a9f80..702ed9d 100644
--- a/WebCore/loader/ImageDocument.cpp
+++ b/WebCore/loader/ImageDocument.cpp
@@ -177,7 +177,8 @@ ImageDocument::ImageDocument(Frame* frame, const KURL& url)
, m_didShrinkImage(false)
, m_shouldShrinkImage(shouldShrinkToFit())
{
- setParseMode(Compat);
+ setCompatibilityMode(QuirksMode);
+ lockCompatibilityMode();
}
PassRefPtr<DocumentParser> ImageDocument::createParser()
diff --git a/WebCore/loader/ImageLoader.cpp b/WebCore/loader/ImageLoader.cpp
index d169d3e..242bf94 100644
--- a/WebCore/loader/ImageLoader.cpp
+++ b/WebCore/loader/ImageLoader.cpp
@@ -31,6 +31,13 @@
#include "HTMLObjectElement.h"
#include "RenderImage.h"
+#if ENABLE(SVG)
+#include "RenderSVGImage.h"
+#endif
+#if ENABLE(VIDEO)
+#include "RenderVideo.h"
+#endif
+
#if !ASSERT_DISABLED
// ImageLoader objects are allocated as members of other objects, so generic pointer check would always fail.
namespace WTF {
@@ -130,11 +137,8 @@ void ImageLoader::setImage(CachedImage* newImage)
oldImage->removeClient(this);
}
- if (RenderObject* renderer = m_element->renderer()) {
- if (!renderer->isImage())
- return;
- toRenderImage(renderer)->resetAnimation();
- }
+ if (RenderImageResource* imageResource = renderImageResource())
+ imageResource->resetAnimation();
}
void ImageLoader::updateFromElement()
@@ -195,11 +199,8 @@ void ImageLoader::updateFromElement()
oldImage->removeClient(this);
}
- if (RenderObject* renderer = m_element->renderer()) {
- if (!renderer->isImage())
- return;
- toRenderImage(renderer)->resetAnimation();
- }
+ if (RenderImageResource* imageResource = renderImageResource())
+ imageResource->resetAnimation();
}
void ImageLoader::updateFromElementIgnoringPreviousError()
@@ -223,20 +224,42 @@ void ImageLoader::notifyFinished(CachedResource*)
loadEventSender().dispatchEventSoon(this);
}
+RenderImageResource* ImageLoader::renderImageResource()
+{
+ RenderObject* renderer = m_element->renderer();
+
+ if (!renderer)
+ return 0;
+
+ if (renderer->isImage())
+ return toRenderImage(renderer)->imageResource();
+
+#if ENABLE(SVG)
+ if (renderer->isSVGImage())
+ return toRenderSVGImage(renderer)->imageResource();
+#endif
+
+#if ENABLE(VIDEO)
+ if (renderer->isVideo())
+ return toRenderVideo(renderer)->imageResource();
+#endif
+
+ return 0;
+}
+
void ImageLoader::updateRenderer()
{
- if (RenderObject* renderer = m_element->renderer()) {
- if (!renderer->isImage() && !renderer->isVideo())
- return;
- RenderImage* imageRenderer = toRenderImage(renderer);
-
- // Only update the renderer if it doesn't have an image or if what we have
- // is a complete image. This prevents flickering in the case where a dynamic
- // change is happening between two images.
- CachedImage* cachedImage = imageRenderer->cachedImage();
- if (m_image != cachedImage && (m_imageComplete || !cachedImage))
- imageRenderer->setCachedImage(m_image.get());
- }
+ RenderImageResource* imageResource = renderImageResource();
+
+ if (!imageResource)
+ return;
+
+ // Only update the renderer if it doesn't have an image or if what we have
+ // is a complete image. This prevents flickering in the case where a dynamic
+ // change is happening between two images.
+ CachedImage* cachedImage = imageResource->cachedImage();
+ if (m_image != cachedImage && (m_imageComplete || !cachedImage))
+ imageResource->setCachedImage(m_image.get());
}
void ImageLoader::dispatchPendingBeforeLoadEvent()
diff --git a/WebCore/loader/ImageLoader.h b/WebCore/loader/ImageLoader.h
index 02ddce8..9bf7624 100644
--- a/WebCore/loader/ImageLoader.h
+++ b/WebCore/loader/ImageLoader.h
@@ -31,6 +31,7 @@ namespace WebCore {
class Element;
class ImageLoadEventSender;
+class RenderImageResource;
class ImageLoader : public CachedResourceClient {
public:
@@ -72,6 +73,7 @@ private:
void dispatchPendingBeforeLoadEvent();
void dispatchPendingLoadEvent();
+ RenderImageResource* renderImageResource();
void updateRenderer();
Element* m_element;
diff --git a/WebCore/loader/MediaDocument.cpp b/WebCore/loader/MediaDocument.cpp
index 7e28d02..77c3d1f 100644
--- a/WebCore/loader/MediaDocument.cpp
+++ b/WebCore/loader/MediaDocument.cpp
@@ -71,6 +71,9 @@ void MediaDocumentParser::createDocumentStructure()
ExceptionCode ec;
RefPtr<Element> rootElement = document()->createElement(htmlTag, false);
document()->appendChild(rootElement, ec);
+
+ if (document()->frame() && document()->frame()->loader())
+ document()->frame()->loader()->dispatchDocumentElementAvailable();
RefPtr<Element> body = document()->createElement(bodyTag, false);
body->setAttribute(styleAttr, "background-color: rgb(38,38,38);");
@@ -110,7 +113,8 @@ MediaDocument::MediaDocument(Frame* frame, const KURL& url)
: HTMLDocument(frame, url)
, m_replaceMediaElementTimer(this, &MediaDocument::replaceMediaElementTimerFired)
{
- setParseMode(Compat);
+ setCompatibilityMode(QuirksMode);
+ lockCompatibilityMode();
}
MediaDocument::~MediaDocument()
diff --git a/WebCore/loader/PingLoader.cpp b/WebCore/loader/PingLoader.cpp
index d2c6410..60c6f30 100644
--- a/WebCore/loader/PingLoader.cpp
+++ b/WebCore/loader/PingLoader.cpp
@@ -53,7 +53,7 @@ void PingLoader::loadImage(Frame* frame, const KURL& url)
if (!SecurityOrigin::shouldHideReferrer(request.url(), frame->loader()->outgoingReferrer()))
request.setHTTPReferrer(frame->loader()->outgoingReferrer());
frame->loader()->addExtraFieldsToSubresourceRequest(request);
- OwnPtr<PingLoader> pingLoader(new PingLoader(frame, request));
+ OwnPtr<PingLoader> pingLoader = adoptPtr(new PingLoader(frame, request));
// Leak the ping loader, since it will kill itself as soon as it receives a response.
PingLoader* leakedPingLoader = pingLoader.leakPtr();
diff --git a/WebCore/loader/PluginDocument.cpp b/WebCore/loader/PluginDocument.cpp
index 54e686c..ad11dfb 100644
--- a/WebCore/loader/PluginDocument.cpp
+++ b/WebCore/loader/PluginDocument.cpp
@@ -84,6 +84,9 @@ void PluginDocumentParser::createDocumentStructure()
RefPtr<Element> rootElement = document()->createElement(htmlTag, false);
document()->appendChild(rootElement, ec);
+ if (document()->frame() && document()->frame()->loader())
+ document()->frame()->loader()->dispatchDocumentElementAvailable();
+
RefPtr<Element> body = document()->createElement(bodyTag, false);
body->setAttribute(marginwidthAttr, "0");
body->setAttribute(marginheightAttr, "0");
@@ -121,7 +124,7 @@ void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, int, bool)
document()->updateLayout();
- if (RenderWidget* renderer = toRenderWidget(m_embedElement->renderer())) {
+ if (RenderPart* renderer = m_embedElement->renderPart()) {
frame->loader()->client()->redirectDataToPlugin(renderer->widget());
frame->loader()->activeDocumentLoader()->mainResourceLoader()->setShouldBufferData(false);
}
@@ -132,7 +135,8 @@ void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, int, bool)
PluginDocument::PluginDocument(Frame* frame, const KURL& url)
: HTMLDocument(frame, url)
{
- setParseMode(Compat);
+ setCompatibilityMode(QuirksMode);
+ lockCompatibilityMode();
}
PassRefPtr<DocumentParser> PluginDocument::createParser()
diff --git a/WebCore/loader/ProgressTracker.cpp b/WebCore/loader/ProgressTracker.cpp
index 88231c8..7f61cd1 100644
--- a/WebCore/loader/ProgressTracker.cpp
+++ b/WebCore/loader/ProgressTracker.cpp
@@ -169,7 +169,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const Resource
item->bytesReceived = 0;
item->estimatedLength = estimatedLength;
} else
- m_progressItems.set(identifier, new ProgressItem(estimatedLength));
+ m_progressItems.set(identifier, adoptPtr(new ProgressItem(estimatedLength)).leakPtr());
}
void ProgressTracker::incrementProgress(unsigned long identifier, const char*, int length)
diff --git a/WebCore/loader/RedirectScheduler.cpp b/WebCore/loader/RedirectScheduler.cpp
index 26d7787..461baf7 100644
--- a/WebCore/loader/RedirectScheduler.cpp
+++ b/WebCore/loader/RedirectScheduler.cpp
@@ -250,7 +250,7 @@ void RedirectScheduler::scheduleRedirect(double delay, const String& url)
// We want a new back/forward list item if the refresh timeout is > 1 second.
if (!m_redirect || delay <= m_redirect->delay())
- schedule(new ScheduledRedirect(delay, url, true, delay <= 1, false));
+ schedule(adoptPtr(new ScheduledRedirect(delay, url, true, delay <= 1, false)));
}
bool RedirectScheduler::mustLockBackForwardList(Frame* targetFrame, bool wasUserGesture)
@@ -294,7 +294,7 @@ void RedirectScheduler::scheduleLocationChange(const String& url, const String&
// This may happen when a frame changes the location of another frame.
bool duringLoad = !loader->stateMachine()->committedFirstRealDocumentLoad();
- schedule(new ScheduledLocationChange(url, referrer, lockHistory, lockBackForwardList, wasUserGesture, duringLoad));
+ schedule(adoptPtr(new ScheduledLocationChange(url, referrer, lockHistory, lockBackForwardList, wasUserGesture, duringLoad)));
}
void RedirectScheduler::scheduleFormSubmission(PassRefPtr<FormSubmission> submission)
@@ -314,7 +314,7 @@ void RedirectScheduler::scheduleFormSubmission(PassRefPtr<FormSubmission> submis
bool lockBackForwardList = mustLockBackForwardList(m_frame, UserGestureIndicator::processingUserGesture()) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());
- schedule(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad));
+ schedule(adoptPtr(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad)));
}
void RedirectScheduler::scheduleRefresh(bool wasUserGesture)
@@ -325,7 +325,7 @@ void RedirectScheduler::scheduleRefresh(bool wasUserGesture)
if (url.isEmpty())
return;
- schedule(new ScheduledRefresh(url.string(), m_frame->loader()->outgoingReferrer(), wasUserGesture));
+ schedule(adoptPtr(new ScheduledRefresh(url.string(), m_frame->loader()->outgoingReferrer(), wasUserGesture)));
}
void RedirectScheduler::scheduleHistoryNavigation(int steps)
@@ -341,18 +341,8 @@ void RedirectScheduler::scheduleHistoryNavigation(int steps)
return;
}
-#if !ENABLE(HISTORY_ALWAYS_ASYNC)
- // If the specified entry and the current entry have the same document (or documents, in there are frames), this is either a
- // state object traversal or a fragment traversal (or both) and should be performed synchronously.
- HistoryItem* currentEntry = m_frame->loader()->history()->currentItem();
- if (currentEntry != specifiedEntry && currentEntry->hasSameDocuments(specifiedEntry)) {
- m_frame->loader()->history()->goToItem(specifiedEntry, FrameLoadTypeIndexedBackForward);
- return;
- }
-#endif
-
// In all other cases, schedule the history traversal to occur asynchronously.
- schedule(new ScheduledHistoryNavigation(steps));
+ schedule(adoptPtr(new ScheduledHistoryNavigation(steps)));
}
void RedirectScheduler::timerFired(Timer<RedirectScheduler>*)
diff --git a/WebCore/loader/SinkDocument.cpp b/WebCore/loader/SinkDocument.cpp
index 262d318..47535dc 100644
--- a/WebCore/loader/SinkDocument.cpp
+++ b/WebCore/loader/SinkDocument.cpp
@@ -50,7 +50,8 @@ private:
SinkDocument::SinkDocument(Frame* frame, const KURL& url)
: HTMLDocument(frame, url)
{
- setParseMode(Compat);
+ setCompatibilityMode(QuirksMode);
+ lockCompatibilityMode();
}
PassRefPtr<DocumentParser> SinkDocument::createParser()
diff --git a/WebCore/loader/SubframeLoader.cpp b/WebCore/loader/SubframeLoader.cpp
index f56ebf1..ceafb88 100644
--- a/WebCore/loader/SubframeLoader.cpp
+++ b/WebCore/loader/SubframeLoader.cpp
@@ -38,9 +38,8 @@
#include "HTMLAppletElement.h"
#include "HTMLFrameElementBase.h"
#include "HTMLNames.h"
-#include "HTMLPlugInElement.h"
+#include "HTMLPlugInImageElement.h"
#include "MIMETypeRegistry.h"
-#include "Node.h"
#include "Page.h"
#include "PluginData.h"
#include "RenderEmbeddedObject.h"
@@ -63,16 +62,6 @@ SubframeLoader::SubframeLoader(Frame* frame)
{
}
-static HTMLPlugInElement* toPlugInElement(Node* node)
-{
- if (!node)
- return 0;
-
- ASSERT(node->hasTagName(objectTag) || node->hasTagName(embedTag) || node->hasTagName(appletTag));
-
- return static_cast<HTMLPlugInElement*>(node);
-}
-
void SubframeLoader::clear()
{
m_containsPlugins = false;
@@ -99,7 +88,7 @@ bool SubframeLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const Str
return true;
}
-bool SubframeLoader::requestObject(RenderEmbeddedObject* renderer, const String& url, const AtomicString& frameName,
+bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName,
const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
{
if (url.isEmpty() && mimeType.isEmpty())
@@ -110,6 +99,12 @@ bool SubframeLoader::requestObject(RenderEmbeddedObject* renderer, const String&
return false;
}
+ // FIXME: None of this code should use renderers!
+ RenderEmbeddedObject* renderer = ownerElement->renderEmbeddedObject();
+ ASSERT(renderer);
+ if (!renderer)
+ return false;
+
KURL completedURL;
if (!url.isEmpty())
completedURL = completeURL(url);
@@ -126,19 +121,19 @@ bool SubframeLoader::requestObject(RenderEmbeddedObject* renderer, const String&
return false;
if (m_frame->document() && m_frame->document()->securityOrigin()->isSandboxed(SandboxPlugins))
return false;
- return loadPlugin(renderer, completedURL, mimeType, paramNames, paramValues, useFallback);
- }
- ASSERT(renderer->node()->hasTagName(objectTag) || renderer->node()->hasTagName(embedTag));
- HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(renderer->node());
+ ASSERT(ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag));
+ HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(ownerElement);
+
+ return loadPlugin(pluginElement, completedURL, mimeType, paramNames, paramValues, useFallback);
+ }
// If the plug-in element already contains a subframe, loadOrRedirectSubframe will re-use it. Otherwise,
// it will create a new frame and set it as the RenderPart's widget, causing what was previously
// in the widget to be torn down.
- return loadOrRedirectSubframe(element, completedURL, frameName, true, true);
+ return loadOrRedirectSubframe(ownerElement, completedURL, frameName, true, true);
}
-
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const KURL& url,
const Vector<String>& paramNames, const Vector<String>& paramValues)
@@ -252,7 +247,7 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
marginHeight = o->getMarginHeight();
}
- if (!SecurityOrigin::canLoad(url, referrer, 0)) {
+ if (!SecurityOrigin::canLoad(url, String(), ownerElement->document())) {
FrameLoader::reportLocalLoadFailed(m_frame, url.string());
return 0;
}
@@ -304,7 +299,6 @@ bool SubframeLoader::allowPlugins(ReasonForCallingAllowPlugins reason)
return allowed;
}
-
bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
{
if (m_frame->loader()->client()->shouldUsePluginDocument(mimeType)) {
@@ -327,37 +321,46 @@ bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bo
useFallback = objectType == ObjectContentNone && hasFallback;
return objectType == ObjectContentNone || objectType == ObjectContentNetscapePlugin || objectType == ObjectContentOtherPlugin;
}
-
-bool SubframeLoader::loadPlugin(RenderEmbeddedObject* renderer, const KURL& url, const String& mimeType,
+
+Document* SubframeLoader::document() const
+{
+ return m_frame->document();
+}
+
+bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType,
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
{
- RefPtr<Widget> widget;
+ RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
- if (renderer && !useFallback) {
- HTMLPlugInElement* element = toPlugInElement(renderer->node());
+ // FIXME: This code should not depend on renderer!
+ if (!renderer || useFallback)
+ return false;
- if (!SecurityOrigin::canLoad(url, String(), m_frame->document())) {
- FrameLoader::reportLocalLoadFailed(m_frame, url.string());
- return false;
- }
+ if (!SecurityOrigin::canLoad(url, String(), document())) {
+ FrameLoader::reportLocalLoadFailed(m_frame, url.string());
+ return false;
+ }
- m_frame->loader()->checkIfRunInsecureContent(m_frame->document()->securityOrigin(), url);
+ FrameLoader* frameLoader = m_frame->loader();
+ frameLoader->checkIfRunInsecureContent(document()->securityOrigin(), url);
- widget = m_frame->loader()->client()->createPlugin(IntSize(renderer->contentWidth(), renderer->contentHeight()),
- element, url, paramNames, paramValues, mimeType,
- m_frame->document()->isPluginDocument() && !m_containsPlugins);
- if (widget) {
- renderer->setWidget(widget);
- m_containsPlugins = true;
+ IntSize contentSize(renderer->contentWidth(), renderer->contentHeight());
+ bool loadManually = document()->isPluginDocument() && !m_containsPlugins;
+ RefPtr<Widget> widget = frameLoader->client()->createPlugin(contentSize,
+ pluginElement, url, paramNames, paramValues, mimeType, loadManually);
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- renderer->node()->setNeedsStyleRecalc(SyntheticStyleChange);
-#endif
- } else
- renderer->setShowsMissingPluginIndicator();
+ if (!widget) {
+ renderer->setShowsMissingPluginIndicator();
+ return false;
}
- return widget;
+ renderer->setWidget(widget);
+ m_containsPlugins = true;
+
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ pluginElement->setNeedsStyleRecalc(SyntheticStyleChange);
+#endif
+ return true;
}
KURL SubframeLoader::completeURL(const String& url) const
diff --git a/WebCore/loader/SubframeLoader.h b/WebCore/loader/SubframeLoader.h
index d42ef2c..6c3baf8 100644
--- a/WebCore/loader/SubframeLoader.h
+++ b/WebCore/loader/SubframeLoader.h
@@ -40,16 +40,17 @@
namespace WebCore {
+class Document;
class Frame;
class FrameLoaderClient;
class HTMLAppletElement;
class HTMLFrameOwnerElement;
+class HTMLPlugInImageElement;
class IntSize;
class KURL;
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
class Node;
#endif
-class RenderEmbeddedObject;
class Widget;
// This is a slight misnomer. It handles the higher level logic of loading both subframes and plugins.
@@ -60,10 +61,12 @@ public:
void clear();
bool requestFrame(HTMLFrameOwnerElement*, const String& url, const AtomicString& frameName, bool lockHistory = true, bool lockBackForwardList = true);
- bool requestObject(RenderEmbeddedObject*, const String& url, const AtomicString& frameName,
+ bool requestObject(HTMLPlugInImageElement*, const String& url, const AtomicString& frameName,
const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues);
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+ // FIXME: This should take Element* instead of Node*, or better yet the
+ // specific type of Element which this code depends on.
PassRefPtr<Widget> loadMediaPlayerProxyPlugin(Node*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
#endif
@@ -76,11 +79,13 @@ public:
private:
Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer);
- bool loadPlugin(RenderEmbeddedObject*, const KURL&, const String& mimeType,
+ bool loadPlugin(HTMLPlugInImageElement*, const KURL&, const String& mimeType,
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback, bool& useFallback);
+ Document* document() const;
+
bool m_containsPlugins;
Frame* m_frame;
diff --git a/WebCore/loader/TextDocument.cpp b/WebCore/loader/TextDocument.cpp
index 5e2b774..4b09a9e 100644
--- a/WebCore/loader/TextDocument.cpp
+++ b/WebCore/loader/TextDocument.cpp
@@ -202,6 +202,8 @@ bool TextDocumentParser::finishWasCalled()
TextDocument::TextDocument(Frame* frame, const KURL& url)
: HTMLDocument(frame, url)
{
+ setCompatibilityMode(QuirksMode);
+ lockCompatibilityMode();
}
PassRefPtr<DocumentParser> TextDocument::createParser()
diff --git a/WebCore/loader/WorkerThreadableLoader.cpp b/WebCore/loader/WorkerThreadableLoader.cpp
index 4789a05..4d18c28 100644
--- a/WebCore/loader/WorkerThreadableLoader.cpp
+++ b/WebCore/loader/WorkerThreadableLoader.cpp
@@ -193,7 +193,7 @@ static void workerContextDidReceiveData(ScriptExecutionContext* context, RefPtr<
void WorkerThreadableLoader::MainThreadBridge::didReceiveData(const char* data, int lengthReceived)
{
- OwnPtr<Vector<char> > vector(new Vector<char>(lengthReceived)); // needs to be an OwnPtr for usage with createCallbackTask.
+ OwnPtr<Vector<char> > vector = adoptPtr(new Vector<char>(lengthReceived)); // needs to be an OwnPtr for usage with createCallbackTask.
memcpy(vector->data(), data, lengthReceived);
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidReceiveData, m_workerClientWrapper, vector.release()), m_taskMode);
}
diff --git a/WebCore/loader/archive/ArchiveResource.cpp b/WebCore/loader/archive/ArchiveResource.cpp
index 691f66a..7dedc93 100644
--- a/WebCore/loader/archive/ArchiveResource.cpp
+++ b/WebCore/loader/archive/ArchiveResource.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 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
@@ -33,31 +33,8 @@
namespace WebCore {
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
-{
- return data ? adoptRef(new ArchiveResource(data, url, response)) : 0;
-}
-
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName)
-{
- return data ? adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName)) : 0;
-}
-
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& resourceResponse)
-{
- return data ? adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, resourceResponse)) : 0;
-}
-
-ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
+inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
: SubstituteResource(url, response, data)
- , m_mimeType(response.mimeType())
- , m_textEncoding(response.textEncodingName())
- , m_shouldIgnoreWhenUnarchiving(false)
-{
-}
-
-ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName)
- : SubstituteResource(url, ResourceResponse(url, mimeType, data ? data->size() : 0, textEncoding, String()), data)
, m_mimeType(mimeType)
, m_textEncoding(textEncoding)
, m_frameName(frameName)
@@ -65,13 +42,21 @@ ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url,
{
}
-ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
- : SubstituteResource(url, response.isNull() ? ResourceResponse(url, mimeType, data ? data->size() : 0, textEncoding, String()) : response, data)
- , m_mimeType(mimeType)
- , m_textEncoding(textEncoding)
- , m_frameName(frameName)
- , m_shouldIgnoreWhenUnarchiving(false)
+PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
+{
+ if (!data)
+ return 0;
+ if (response.isNull()) {
+ unsigned dataSize = data->size();
+ return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName,
+ ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
+ }
+ return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
+}
+
+PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const KURL& url, const ResourceResponse& response)
{
+ return create(data, url, response.mimeType(), response.textEncodingName(), String(), response);
}
}
diff --git a/WebCore/loader/archive/ArchiveResource.h b/WebCore/loader/archive/ArchiveResource.h
index d975e04..97d6e32 100644
--- a/WebCore/loader/archive/ArchiveResource.h
+++ b/WebCore/loader/archive/ArchiveResource.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 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
@@ -31,32 +31,29 @@
#include "SubstituteResource.h"
-#include "PlatformString.h"
-
namespace WebCore {
class ArchiveResource : public SubstituteResource {
public:
static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const KURL&, const ResourceResponse&);
- static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const KURL&, const String& mimeType, const String& textEncoding, const String& frameName);
- static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const KURL&, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse&);
-
+ static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const KURL&,
+ const String& mimeType, const String& textEncoding, const String& frameName,
+ const ResourceResponse& = ResourceResponse());
+
const String& mimeType() const { return m_mimeType; }
const String& textEncoding() const { return m_textEncoding; }
const String& frameName() const { return m_frameName; }
-
+
void ignoreWhenUnarchiving() { m_shouldIgnoreWhenUnarchiving = true; }
bool shouldIgnoreWhenUnarchiving() const { return m_shouldIgnoreWhenUnarchiving; }
private:
- ArchiveResource(PassRefPtr<SharedBuffer>, const KURL&, const ResourceResponse&);
- ArchiveResource(PassRefPtr<SharedBuffer>, const KURL&, const String& mimeType, const String& textEncoding, const String& frameName);
ArchiveResource(PassRefPtr<SharedBuffer>, const KURL&, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse&);
-
+
String m_mimeType;
String m_textEncoding;
String m_frameName;
-
+
bool m_shouldIgnoreWhenUnarchiving;
};
diff --git a/WebCore/loader/archive/cf/LegacyWebArchive.cpp b/WebCore/loader/archive/cf/LegacyWebArchive.cpp
index 3a144c2..ea0ce74 100644
--- a/WebCore/loader/archive/cf/LegacyWebArchive.cpp
+++ b/WebCore/loader/archive/cf/LegacyWebArchive.cpp
@@ -233,7 +233,7 @@ PassRefPtr<ArchiveResource> LegacyWebArchive::createResource(CFDictionaryRef dic
response = createResourceResponseFromPropertyListData(resourceResponseData, resourceResponseVersion);
}
- return ArchiveResource::create(SharedBuffer::create(CFDataGetBytePtr(resourceData), CFDataGetLength(resourceData)), KURL(ParsedURLString, url), mimeType, textEncoding, frameName, response);
+ return ArchiveResource::create(SharedBuffer::wrapCFData(resourceData), KURL(KURL(), url), mimeType, textEncoding, frameName, response);
}
PassRefPtr<LegacyWebArchive> LegacyWebArchive::create()
diff --git a/WebCore/loader/icon/IconDatabase.cpp b/WebCore/loader/icon/IconDatabase.cpp
index f708622..130b442 100644
--- a/WebCore/loader/icon/IconDatabase.cpp
+++ b/WebCore/loader/icon/IconDatabase.cpp
@@ -1846,7 +1846,7 @@ inline void readySQLiteStatement(OwnPtr<SQLiteStatement>& statement, SQLiteDatab
statement.set(0);
}
if (!statement) {
- statement.set(new SQLiteStatement(db, str));
+ statement = adoptPtr(new SQLiteStatement(db, str));
if (statement->prepare() != SQLResultOk)
LOG_ERROR("Preparing statement %s failed", str.ascii().data());
}
diff --git a/WebCore/loader/icon/IconLoader.cpp b/WebCore/loader/icon/IconLoader.cpp
index 6e2762f..877c80e 100644
--- a/WebCore/loader/icon/IconLoader.cpp
+++ b/WebCore/loader/icon/IconLoader.cpp
@@ -51,7 +51,7 @@ IconLoader::IconLoader(Frame* frame)
PassOwnPtr<IconLoader> IconLoader::create(Frame* frame)
{
- return new IconLoader(frame);
+ return adoptPtr(new IconLoader(frame));
}
IconLoader::~IconLoader()
diff --git a/WebCore/manual-tests/print-before-load.html b/WebCore/manual-tests/print-before-load.html
new file mode 100644
index 0000000..edec30b
--- /dev/null
+++ b/WebCore/manual-tests/print-before-load.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Print Test Page</title>
+<body>
+
+<script language="JavaScript" type="text/javascript">
+window.print();
+</script>
+
+This webpage should pop up a print dialog. If you print from that dialog, you
+should see this output on paper.
+
+</body>
+</html>
+
diff --git a/WebCore/mathml/RenderMathMLRoot.cpp b/WebCore/mathml/RenderMathMLRoot.cpp
index 4ed8c19..da303c9 100644
--- a/WebCore/mathml/RenderMathMLRoot.cpp
+++ b/WebCore/mathml/RenderMathMLRoot.cpp
@@ -99,7 +99,10 @@ void RenderMathMLRoot::paint(PaintInfo& info, int tx, int ty)
if (info.context->paintingDisabled())
return;
-
+
+ if (!firstChild() || !lastChild())
+ return;
+
tx += x();
ty += y();
@@ -203,11 +206,15 @@ void RenderMathMLRoot::paint(PaintInfo& info, int tx, int ty)
void RenderMathMLRoot::layout()
{
RenderBlock::layout();
-
+
+ if (!firstChild() || !lastChild())
+ return;
+
int maxHeight = toRenderBoxModelObject(lastChild())->offsetHeight();
RenderObject* current = lastChild()->firstChild();
- current->style()->setVerticalAlign(BASELINE);
+ if (current)
+ current->style()->setVerticalAlign(BASELINE);
if (!maxHeight)
maxHeight = style()->fontSize();
@@ -228,6 +235,8 @@ void RenderMathMLRoot::layout()
// Positioning of the index
RenderBoxModelObject* indexBox = toRenderBoxModelObject(firstChild()->firstChild());
+ if (!indexBox)
+ return;
int indexShift = indexBox->offsetWidth() + topStartShift;
int radicalHeight = static_cast<int>((1 - gRadicalTopLeftPointYPos) * maxHeight);
diff --git a/WebCore/mathml/RenderMathMLSubSup.cpp b/WebCore/mathml/RenderMathMLSubSup.cpp
index 52ac0e3..4cda36f 100644
--- a/WebCore/mathml/RenderMathMLSubSup.cpp
+++ b/WebCore/mathml/RenderMathMLSubSup.cpp
@@ -162,7 +162,7 @@ void RenderMathMLSubSup::layout()
maxHeight = height;
current = current->nextSibling();
}
- int heightDiff = (m_scripts->offsetHeight() - maxHeight) / 2;
+ int heightDiff = m_scripts ? (m_scripts->offsetHeight() - maxHeight) / 2 : 0;
if (heightDiff < 0)
heightDiff = 0;
base->style()->setMarginTop(Length(heightDiff, Fixed));
diff --git a/WebCore/notifications/Notification.h b/WebCore/notifications/Notification.h
index 35f9cb8..f14a302 100644
--- a/WebCore/notifications/Notification.h
+++ b/WebCore/notifications/Notification.h
@@ -83,6 +83,7 @@ namespace WebCore {
DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
using RefCounted<Notification>::ref;
using RefCounted<Notification>::deref;
diff --git a/WebCore/notifications/Notification.idl b/WebCore/notifications/Notification.idl
index 5ca84a5..66a1229 100644
--- a/WebCore/notifications/Notification.idl
+++ b/WebCore/notifications/Notification.idl
@@ -41,6 +41,7 @@ module threads {
attribute EventListener ondisplay;
attribute EventListener onerror;
attribute EventListener onclose;
+ attribute EventListener onclick;
attribute DOMString dir;
attribute DOMString replaceId;
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index eb2372d..224c8dc 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -68,10 +68,6 @@ namespace WebCore {
class GraphicsLayer;
#endif
-#if USE(GLES2_RENDERING)
- class GLES2Context;
-#endif
-
#if ENABLE(NOTIFICATIONS)
class NotificationPresenter;
#endif
@@ -234,16 +230,16 @@ namespace WebCore {
virtual bool allowsAcceleratedCompositing() const { return true; }
#endif
-#if USE(GLES2_RENDERING)
- // 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
-
virtual bool supportsFullscreenForNode(const Node*) { return false; }
virtual void enterFullscreenForNode(Node*) { }
virtual void exitFullscreenForNode(Node*) { }
+#if ENABLE(FULLSCREEN_API)
+ virtual bool supportsFullScreenForElement(const Element*) { return false; }
+ virtual void enterFullScreenForElement(Element*) { }
+ virtual void exitFullScreenForElement(Element*) { }
+#endif
+
#if ENABLE(TILED_BACKING_STORE)
virtual IntRect visibleRectForTiledBackingStore() const { return IntRect(); }
#endif
diff --git a/WebCore/page/DOMSelection.cpp b/WebCore/page/DOMSelection.cpp
index 106dd13..6c25103 100644
--- a/WebCore/page/DOMSelection.cpp
+++ b/WebCore/page/DOMSelection.cpp
@@ -214,21 +214,33 @@ void DOMSelection::collapse(Node* node, int offset, ExceptionCode& ec)
m_frame->selection()->moveTo(VisiblePosition(node, offset, DOWNSTREAM));
}
-void DOMSelection::collapseToEnd()
+void DOMSelection::collapseToEnd(ExceptionCode& ec)
{
if (!m_frame)
return;
const VisibleSelection& selection = m_frame->selection()->selection();
+
+ if (selection.isNone()) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+
m_frame->selection()->moveTo(VisiblePosition(selection.end(), DOWNSTREAM));
}
-void DOMSelection::collapseToStart()
+void DOMSelection::collapseToStart(ExceptionCode& ec)
{
if (!m_frame)
return;
const VisibleSelection& selection = m_frame->selection()->selection();
+
+ if (selection.isNone()) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+
m_frame->selection()->moveTo(VisiblePosition(selection.start(), DOWNSTREAM));
}
diff --git a/WebCore/page/DOMSelection.h b/WebCore/page/DOMSelection.h
index b0421c7..b5fd197 100644
--- a/WebCore/page/DOMSelection.h
+++ b/WebCore/page/DOMSelection.h
@@ -74,8 +74,8 @@ namespace WebCore {
bool isCollapsed() const;
int rangeCount() const;
void collapse(Node*, int offset, ExceptionCode&);
- void collapseToEnd();
- void collapseToStart();
+ void collapseToEnd(ExceptionCode&);
+ void collapseToStart(ExceptionCode&);
void extend(Node*, int offset, ExceptionCode&);
PassRefPtr<Range> getRangeAt(int, ExceptionCode&);
void removeAllRanges();
diff --git a/WebCore/page/DOMSelection.idl b/WebCore/page/DOMSelection.idl
index 4d0c942..ee82823 100644
--- a/WebCore/page/DOMSelection.idl
+++ b/WebCore/page/DOMSelection.idl
@@ -42,8 +42,10 @@ module window {
void collapse(in Node node, in long index)
raises(DOMException);
- void collapseToEnd();
- void collapseToStart();
+ void collapseToEnd()
+ raises(DOMException);
+ void collapseToStart()
+ raises(DOMException);
void deleteFromDocument();
boolean containsNode(in Node node, in boolean allowPartial);
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 86708de..a3d8090 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -63,6 +63,7 @@
#include "IDBKeyRange.h"
#include "InspectorController.h"
#include "InspectorTimelineAgent.h"
+#include "KURL.h"
#include "Location.h"
#include "StyleMedia.h"
#include "MessageEvent.h"
@@ -87,6 +88,15 @@
#include <wtf/MathExtras.h>
#include <wtf/text/CString.h>
+#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystem.h"
+#include "DOMFileSystem.h"
+#include "ErrorCallback.h"
+#include "FileError.h"
+#include "FileSystemCallback.h"
+#include "LocalFileSystem.h"
+#endif
+
using std::min;
using std::max;
@@ -379,7 +389,8 @@ bool DOMWindow::canShowModalDialogNow(const Frame* frame)
}
DOMWindow::DOMWindow(Frame* frame)
- : m_frame(frame)
+ : m_printDeferred(false),
+ m_frame(frame)
{
}
@@ -719,6 +730,35 @@ IDBKeyRange* DOMWindow::iDBKeyRange() const
}
#endif
+#if ENABLE(FILE_SYSTEM)
+void DOMWindow::requestFileSystem(int type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ Document* document = this->document();
+ if (!document)
+ return;
+
+ if (!m_localFileSystem) {
+ // FIXME: See if access is allowed.
+
+ Page* page = document->page();
+ if (!page) {
+ DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(INVALID_STATE_ERR));
+ return;
+ }
+
+ // FIXME: Get the quota settings as well.
+ String path = page->settings()->fileSystemRootPath();
+ m_localFileSystem = LocalFileSystem::create(path);
+ }
+
+ m_localFileSystem->requestFileSystem(document, static_cast<AsyncFileSystem::Type>(type), size, successCallback, errorCallback);
+}
+
+COMPILE_ASSERT(int(DOMWindow::TEMPORARY) == int(AsyncFileSystem::Temporary), enum_mismatch);
+COMPILE_ASSERT(int(DOMWindow::PERSISTENT) == int(AsyncFileSystem::Persistent), enum_mismatch);
+
+#endif
+
void DOMWindow::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, const String& targetOrigin, DOMWindow* source, ExceptionCode& ec)
{
MessagePortArray ports;
@@ -861,6 +901,11 @@ void DOMWindow::print()
if (!page)
return;
+ if (m_frame->loader()->isLoading()) {
+ m_printDeferred = true;
+ return;
+ }
+ m_printDeferred = false;
page->chrome()->print(m_frame);
}
@@ -1581,4 +1626,16 @@ EventTargetData* DOMWindow::ensureEventTargetData()
return &m_eventTargetData;
}
+#if ENABLE(BLOB)
+String DOMWindow::createBlobURL(Blob* blob)
+{
+ return scriptExecutionContext()->createPublicBlobURL(blob).string();
+}
+
+void DOMWindow::revokeBlobURL(const String& blobURLString)
+{
+ scriptExecutionContext()->revokePublicBlobURL(KURL(ParsedURLString, blobURLString));
+}
+#endif
+
} // namespace WebCore
diff --git a/WebCore/page/DOMWindow.h b/WebCore/page/DOMWindow.h
index 8d57dcc..894aa08 100644
--- a/WebCore/page/DOMWindow.h
+++ b/WebCore/page/DOMWindow.h
@@ -40,6 +40,7 @@ namespace WebCore {
class BarInfo;
class BeforeUnloadEvent;
+ class Blob;
class CSSRuleList;
class CSSStyleDeclaration;
class Console;
@@ -48,14 +49,17 @@ namespace WebCore {
class DatabaseCallback;
class Document;
class Element;
+ class ErrorCallback;
class Event;
class EventListener;
+ class FileSystemCallback;
class FloatRect;
class Frame;
class History;
class IDBFactory;
class IDBKeyRange;
class InspectorTimelineAgent;
+ class LocalFileSystem;
class Location;
class StyleMedia;
class Navigator;
@@ -90,6 +94,7 @@ namespace WebCore {
virtual DOMWindow* toDOMWindow() { return this; }
virtual ScriptExecutionContext* scriptExecutionContext() const;
+ bool printDeferred() const { return m_printDeferred; }
Frame* frame() const { return m_frame; }
void disconnectFrame();
@@ -236,6 +241,15 @@ namespace WebCore {
IDBKeyRange* iDBKeyRange() const;
#endif
+#if ENABLE(FILE_SYSTEM)
+ // They are placed here and in all capital letters to enforce compile-time enum checking.
+ enum FileSystemType {
+ TEMPORARY,
+ PERSISTENT,
+ };
+ void requestFileSystem(int type, long long size, PassRefPtr<FileSystemCallback>, PassRefPtr<ErrorCallback>);
+#endif
+
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
// FIXME: remove this when we update the ObjC bindings (bug #28774).
void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
@@ -381,6 +395,10 @@ namespace WebCore {
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
DOMApplicationCache* optionalApplicationCache() const { return m_applicationCache.get(); }
#endif
+#if ENABLE(BLOB)
+ String createBlobURL(Blob*);
+ void revokeBlobURL(const String&);
+#endif
using RefCounted<DOMWindow>::ref;
using RefCounted<DOMWindow>::deref;
@@ -397,6 +415,7 @@ namespace WebCore {
RefPtr<SecurityOrigin> m_securityOrigin;
KURL m_url;
+ bool m_printDeferred;
Frame* m_frame;
mutable RefPtr<Screen> m_screen;
mutable RefPtr<DOMSelection> m_selection;
@@ -428,6 +447,9 @@ namespace WebCore {
mutable RefPtr<IDBFactory> m_idbFactory;
mutable RefPtr<IDBKeyRange> m_idbKeyRange;
#endif
+#if ENABLE(FILE_SYSTEM)
+ RefPtr<LocalFileSystem> m_localFileSystem;
+#endif
EventTargetData m_eventTargetData;
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index cabe68a..35b847c 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -176,6 +176,11 @@ module window {
readonly attribute [EnabledAtRuntime] IDBFactory indexedDB;
readonly attribute [EnabledAtRuntime] IDBKeyRange IDBKeyRange;
#endif
+#if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM
+ const unsigned short TEMPORARY = 0;
+ const unsigned short PERSISTENT = 1;
+ [EnabledAtRuntime] void requestFileSystem(in unsigned short type, in long long size, in [Callback, Optional] FileSystemCallback successCallback, in [Callback, Optional] ErrorCallback errorCallback);
+#endif
#if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
// This is the interface orientation in degrees. Some examples are:
@@ -465,9 +470,7 @@ module window {
attribute [Conditional=3D_CANVAS,EnabledAtRuntime] WebGLRenderingContextConstructor WebGLRenderingContext;
attribute TextMetricsConstructor TextMetrics;
-#if !defined(V8_BINDING) || !V8_BINDING
attribute DOMStringMapConstructor DOMStringMap;
-#endif
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] ArrayBufferConstructor ArrayBuffer; // Usable with new operator
attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int8ArrayConstructor Int8Array; // Usable with new operator
@@ -744,6 +747,11 @@ module window {
attribute [Conditional=BLOB] BlobBuilderConstructor BlobBuilder;
+#if defined(ENABLE_BLOB) && ENABLE_BLOB
+ DOMString createBlobURL(in Blob blob);
+ void revokeBlobURL(in DOMString blobURL);
+#endif
+
#endif // defined(LANGUAGE_JAVASCRIPT)
#if defined(V8_BINDING) && V8_BINDING
diff --git a/WebCore/page/EditorClient.h b/WebCore/page/EditorClient.h
index 93e27ff..4a192d7 100644
--- a/WebCore/page/EditorClient.h
+++ b/WebCore/page/EditorClient.h
@@ -28,6 +28,7 @@
#define EditorClient_h
#include "EditorInsertAction.h"
+#include "FloatRect.h"
#include "PlatformString.h"
#include "TextAffinity.h"
#include <wtf/Forward.h>
@@ -51,6 +52,7 @@ namespace WebCore {
class CSSStyleDeclaration;
class EditCommand;
+class Editor;
class Element;
class Frame;
class HTMLElement;
@@ -177,6 +179,12 @@ public:
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
virtual void checkTextOfParagraph(const UChar* text, int length, uint64_t checkingTypes, Vector<TextCheckingResult>& results) = 0;
#endif
+
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ virtual void showCorrectionPanel(const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacmentString, Editor*) = 0;
+ virtual void dismissCorrectionPanel(bool correctionAccepted) = 0;
+#endif
+
virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail& detail) = 0;
virtual void updateSpellingUIWithMisspelledWord(const String&) = 0;
virtual void showSpellingUI(bool show) = 0;
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 6263a4b..72cbe23 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -69,6 +69,7 @@
#include "Scrollbar.h"
#include "SelectionController.h"
#include "Settings.h"
+#include "StyleCachedImage.h"
#include "TextEvent.h"
#include "TextIterator.h"
#include "UserGestureIndicator.h"
@@ -1083,10 +1084,13 @@ Cursor EventHandler::selectCursor(const MouseEventWithHitTestResults& event, Scr
if (style && style->cursors()) {
const CursorList* cursors = style->cursors();
for (unsigned i = 0; i < cursors->size(); ++i) {
- const CachedImage* cimage = (*cursors)[i].image();
- IntPoint hotSpot = (*cursors)[i].hotSpot();
+ const CachedImage* cimage = 0;
+ StyleImage* image = (*cursors)[i].image();
+ if (image->isCachedImage())
+ cimage = static_cast<StyleCachedImage*>(image)->cachedImage();
if (!cimage)
continue;
+ IntPoint hotSpot = (*cursors)[i].hotSpot();
// Limit the size of cursors so that they cannot be used to cover UI elements in chrome.
IntSize size = cimage->image()->size();
if (size.width() > 128 || size.height() > 128)
diff --git a/WebCore/page/FocusController.cpp b/WebCore/page/FocusController.cpp
index 2c2c447..a87d6a6 100644
--- a/WebCore/page/FocusController.cpp
+++ b/WebCore/page/FocusController.cpp
@@ -623,8 +623,11 @@ bool FocusController::setFocusedNode(Node* node, PassRefPtr<Frame> newFocusedFra
// Setting the focused node can result in losing our last reft to node when JS event handlers fire.
RefPtr<Node> protect = node;
- if (newDocument)
- newDocument->setFocusedNode(node);
+ if (newDocument) {
+ bool successfullyFocused = newDocument->setFocusedNode(node);
+ if (!successfullyFocused)
+ return false;
+ }
if (newDocument->focusedNode() == node)
m_page->editorClient()->setInputMethodState(node->shouldUseInputMethod());
@@ -641,7 +644,7 @@ void FocusController::setActive(bool active)
if (FrameView* view = m_page->mainFrame()->view()) {
if (!view->platformWidget()) {
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
view->updateControlTints();
}
}
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index c23368a..09cb8c3 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -150,7 +150,6 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
#endif
, m_highlightTextMatches(false)
, m_inViewSourceMode(false)
- , m_needsReapplyStyles(false)
, m_isDisconnected(false)
, m_excludeFromTextSearch(false)
{
@@ -627,47 +626,13 @@ void Frame::setPrinting(bool printing, const FloatSize& pageSize, float maximumS
m_doc->setPrinting(printing);
view()->adjustMediaTypeForPrinting(printing);
- m_doc->updateStyleSelector();
+ m_doc->styleSelectorChanged(RecalcStyleImmediately);
view()->forceLayoutForPagination(pageSize, maximumShrinkRatio, shouldAdjustViewSize);
for (Frame* child = tree()->firstChild(); child; child = child->tree()->nextSibling())
child->setPrinting(printing, pageSize, maximumShrinkRatio, shouldAdjustViewSize);
}
-void Frame::setNeedsReapplyStyles()
-{
- // When the frame is not showing web content, it doesn't make sense to apply styles.
- // If we tried, we'd end up doing things with the document, but the document, if one
- // exists, is not currently shown and should be in the page cache.
- if (!m_loader.client()->hasHTMLView())
- return;
-
- if (m_needsReapplyStyles)
- return;
-
- m_needsReapplyStyles = true;
-
- // FrameView's "layout" timer includes reapplyStyles, so despite its
- // name, it's what we want to call here.
- if (view())
- view()->scheduleRelayout();
-}
-
-void Frame::reapplyStyles()
-{
- m_needsReapplyStyles = false;
-
- // FIXME: This call doesn't really make sense in a function called reapplyStyles.
- // We should probably eventually move it into its own function.
- m_doc->docLoader()->setAutoLoadImages(m_page && m_page->settings()->loadsImagesAutomatically());
-
- // FIXME: It's not entirely clear why the following is needed.
- // The document automatically does this as required when you set the style sheet.
- // But we had problems when this code was removed. Details are in
- // <http://bugs.webkit.org/show_bug.cgi?id=8079>.
- m_doc->updateStyleSelector();
-}
-
void Frame::injectUserScripts(UserScriptInjectionTime injectionTime)
{
if (!m_page)
@@ -774,24 +739,6 @@ void Frame::computeAndSetTypingStyle(CSSStyleDeclaration *style, EditAction edit
m_typingStyle = mutableStyle.release();
}
-String Frame::selectionStartStylePropertyValue(int stylePropertyID) const
-{
- Node *nodeToRemove;
- RefPtr<CSSStyleDeclaration> selectionStyle = selectionComputedStyle(nodeToRemove);
- if (!selectionStyle)
- return String();
-
- String value = selectionStyle->getPropertyValue(stylePropertyID);
-
- if (nodeToRemove) {
- ExceptionCode ec = 0;
- nodeToRemove->remove(ec);
- ASSERT(!ec);
- }
-
- return value;
-}
-
PassRefPtr<CSSComputedStyleDeclaration> Frame::selectionComputedStyle(Node*& nodeToRemove) const
{
nodeToRemove = 0;
@@ -1262,7 +1209,7 @@ bool Frame::findString(const String& target, bool forward, bool caseFlag, bool w
return true;
}
-unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsigned limit)
+unsigned Frame::countMatchesForText(const String& target, bool caseFlag, unsigned limit, bool markMatches)
{
if (target.isEmpty())
return 0;
@@ -1285,7 +1232,8 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig
// Only treat the result as a match if it is visible
if (editor()->insideVisibleArea(resultRange.get())) {
++matchCount;
- document()->markers()->addMarker(resultRange.get(), DocumentMarker::TextMatch);
+ if (markMatches)
+ document()->markers()->addMarker(resultRange.get(), DocumentMarker::TextMatch);
}
// Stop looking if we hit the specified limit. A limit of 0 means no limit.
@@ -1303,16 +1251,16 @@ unsigned Frame::markAllMatchesForText(const String& target, bool caseFlag, unsig
searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), exception);
} while (true);
- // Do a "fake" paint in order to execute the code that computes the rendered rect for
- // each text match.
- Document* doc = document();
- if (m_view && contentRenderer()) {
- doc->updateLayout(); // Ensure layout is up to date.
- IntRect visibleRect = m_view->visibleContentRect();
- if (!visibleRect.isEmpty()) {
- GraphicsContext context((PlatformGraphicsContext*)0);
- context.setPaintingDisabled(true);
- m_view->paintContents(&context, visibleRect);
+ if (markMatches) {
+ // Do a "fake" paint in order to execute the code that computes the rendered rect for each text match.
+ if (m_view && contentRenderer()) {
+ document()->updateLayout(); // Ensure layout is up to date.
+ IntRect visibleRect = m_view->visibleContentRect();
+ if (!visibleRect.isEmpty()) {
+ GraphicsContext context((PlatformGraphicsContext*)0);
+ context.setPaintingDisabled(true);
+ m_view->paintContents(&context, visibleRect);
+ }
}
}
@@ -1470,8 +1418,10 @@ void Frame::respondToChangedSelection(const VisibleSelection& oldSelection, bool
// This only erases markers that are in the first unit (word or sentence) of the selection.
// Perhaps peculiar, but it matches AppKit.
- if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange())
+ if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange()) {
document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::Spelling);
+ document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::Replacement);
+ }
if (RefPtr<Range> sentenceRange = newSelectedSentence.toNormalizedRange())
document()->markers()->removeMarkers(sentenceRange.get(), DocumentMarker::Grammar);
}
@@ -1572,7 +1522,7 @@ void Frame::tiledBackingStorePaintBegin()
{
if (!m_view)
return;
- m_view->layoutIfNeededRecursive();
+ m_view->updateLayoutAndStyleIfNeededRecursive();
m_view->flushDeferredRepaints();
}
diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h
index 36803f8..eb3cdba 100644
--- a/WebCore/page/Frame.h
+++ b/WebCore/page/Frame.h
@@ -164,10 +164,6 @@ namespace WebCore {
void clearTimers();
static void clearTimers(FrameView*, Document*);
- void setNeedsReapplyStyles();
- bool needsReapplyStyles() const;
- void reapplyStyles();
-
String documentTypeString() const;
// This method -- and the corresponding list of former DOM windows --
@@ -197,7 +193,6 @@ namespace WebCore {
void setMark(const VisibleSelection&);
void computeAndSetTypingStyle(CSSStyleDeclaration* , EditAction = EditActionUnspecified);
- String selectionStartStylePropertyValue(int stylePropertyID) const;
void applyEditingStyleToBodyElement() const;
void applyEditingStyleToElement(Element*) const;
@@ -208,7 +203,7 @@ namespace WebCore {
RenderStyle* styleForSelectionStart(Node*& nodeToRemove) const;
- unsigned markAllMatchesForText(const String&, bool caseFlag, unsigned limit);
+ unsigned countMatchesForText(const String&, bool caseFlag, unsigned limit, bool markMatches);
bool markedTextMatchesAreHighlighted() const;
void setMarkedTextMatchesAreHighlighted(bool flag);
@@ -329,7 +324,6 @@ namespace WebCore {
bool m_highlightTextMatches;
bool m_inViewSourceMode;
- bool m_needsReapplyStyles;
bool m_isDisconnected;
bool m_excludeFromTextSearch;
@@ -398,11 +392,6 @@ namespace WebCore {
m_mark = s;
}
- inline bool Frame::needsReapplyStyles() const
- {
- return m_needsReapplyStyles;
- }
-
inline CSSMutableStyleDeclaration* Frame::typingStyle() const
{
return m_typingStyle.get();
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index f8a9418..ac9341f 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -137,6 +137,8 @@ FrameView::FrameView(Frame* frame)
, m_fixedObjectCount(0)
, m_layoutTimer(this, &FrameView::layoutTimerFired)
, m_layoutRoot(0)
+ , m_hasPendingPostLayoutTasks(false)
+ , m_inSynchronousPostLayout(false)
, m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
, m_isTransparent(false)
, m_baseBackgroundColor(Color::white)
@@ -173,7 +175,7 @@ PassRefPtr<FrameView> FrameView::create(Frame* frame, const IntSize& initialSize
FrameView::~FrameView()
{
- if (m_postLayoutTasksTimer.isActive()) {
+ if (m_hasPendingPostLayoutTasks) {
m_postLayoutTasksTimer.stop();
m_scheduledEvents.clear();
m_enqueueEvents = 0;
@@ -213,6 +215,8 @@ void FrameView::reset()
m_doFullRepaint = true;
m_layoutSchedulingEnabled = true;
m_inLayout = false;
+ m_inSynchronousPostLayout = false;
+ m_hasPendingPostLayoutTasks = false;
m_layoutCount = 0;
m_nestedLayoutCount = 0;
m_postLayoutTasksTimer.stop();
@@ -528,8 +532,11 @@ bool FrameView::hasCompositedContent() const
void FrameView::enterCompositingMode()
{
#if USE(ACCELERATED_COMPOSITING)
- if (RenderView* view = m_frame->contentRenderer())
+ if (RenderView* view = m_frame->contentRenderer()) {
view->compositor()->enableCompositingMode();
+ if (!needsLayout())
+ view->compositor()->scheduleCompositingLayerUpdate();
+ }
#endif
}
@@ -647,24 +654,23 @@ void FrameView::layout(bool allowSubtree)
m_layoutSchedulingEnabled = false;
- if (!m_nestedLayoutCount && m_postLayoutTasksTimer.isActive()) {
+ if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_hasPendingPostLayoutTasks) {
// This is a new top-level layout. If there are any remaining tasks from the previous
// layout, finish them now.
+ m_inSynchronousPostLayout = true;
m_postLayoutTasksTimer.stop();
performPostLayoutTasks();
+ m_inSynchronousPostLayout = false;
}
// Viewport-dependent media queries may cause us to need completely different style information.
// Check that here.
if (document->styleSelector()->affectedByViewportChange())
- document->updateStyleSelector();
+ document->styleSelectorChanged(RecalcStyleImmediately);
// Always ensure our style info is up-to-date. This can happen in situations where
// the layout beats any sort of style recalc update that needs to occur.
- if (m_frame->needsReapplyStyles())
- m_frame->reapplyStyles();
- else if (document->childNeedsStyleRecalc())
- document->recalcStyle();
+ document->updateStyleIfNeeded();
bool subtree = m_layoutRoot;
@@ -841,17 +847,25 @@ void FrameView::layout(bool allowSubtree)
updateOverflowStatus(layoutWidth() < contentsWidth(),
layoutHeight() < contentsHeight());
- if (!m_postLayoutTasksTimer.isActive()) {
- // Calls resumeScheduledEvents()
- performPostLayoutTasks();
+ if (!m_hasPendingPostLayoutTasks) {
+ if (!m_inSynchronousPostLayout) {
+ m_inSynchronousPostLayout = true;
+ // Calls resumeScheduledEvents()
+ performPostLayoutTasks();
+ m_inSynchronousPostLayout = false;
+ }
- if (!m_postLayoutTasksTimer.isActive() && needsLayout()) {
- // Post-layout widget updates or an event handler made us need layout again.
- // Lay out again, but this time defer widget updates and event dispatch until after
- // we return.
+ if (!m_hasPendingPostLayoutTasks && (needsLayout() || m_inSynchronousPostLayout)) {
+ // If we need layout or are already in a synchronous call to postLayoutTasks(),
+ // defer widget updates and event dispatch until after we return. postLayoutTasks()
+ // can make us need to update again, and we can get stuck in a nasty cycle unless
+ // we call it through the timer here.
+ m_hasPendingPostLayoutTasks = true;
m_postLayoutTasksTimer.startOneShot(0);
- pauseScheduledEvents();
- layout();
+ if (needsLayout()) {
+ pauseScheduledEvents();
+ layout();
+ }
}
} else {
resumeScheduledEvents();
@@ -1468,12 +1482,9 @@ bool FrameView::needsLayout() const
if (!m_frame)
return false;
RenderView* root = m_frame->contentRenderer();
- Document* document = m_frame->document();
return layoutPending()
|| (root && root->needsLayout())
|| m_layoutRoot
- || (document && document->childNeedsStyleRecalc()) // can occur when using WebKit ObjC interface
- || m_frame->needsReapplyStyles()
|| (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred);
}
@@ -1490,6 +1501,8 @@ void FrameView::setNeedsLayout()
void FrameView::unscheduleRelayout()
{
+ m_postLayoutTasksTimer.stop();
+
if (!m_layoutTimer.isActive())
return;
@@ -1633,6 +1646,8 @@ bool FrameView::updateWidgets()
void FrameView::performPostLayoutTasks()
{
+ m_hasPendingPostLayoutTasks = false;
+
if (m_firstLayoutCallbackPending) {
m_firstLayoutCallbackPending = false;
m_frame->loader()->didFirstLayout();
@@ -1965,7 +1980,7 @@ void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
RenderView* contentRenderer = frame()->contentRenderer();
if (!contentRenderer) {
- LOG_ERROR("called Frame::paint with nil renderer");
+ LOG_ERROR("called FrameView::paint with nil renderer");
return;
}
@@ -2036,7 +2051,7 @@ void FrameView::setNodeToDraw(Node* node)
m_nodeToDraw = node;
}
-void FrameView::layoutIfNeededRecursive()
+void FrameView::updateLayoutAndStyleIfNeededRecursive()
{
// We have to crawl our entire tree looking for any FrameViews that need
// layout and make sure they are up to date.
@@ -2047,6 +2062,8 @@ void FrameView::layoutIfNeededRecursive()
// region but then become included later by the second frame adding rects to the dirty region
// when it lays out.
+ m_frame->document()->updateStyleIfNeeded();
+
if (needsLayout())
layout();
@@ -2055,10 +2072,10 @@ void FrameView::layoutIfNeededRecursive()
for (HashSet<RefPtr<Widget> >::const_iterator current = viewChildren->begin(); current != end; ++current) {
Widget* widget = (*current).get();
if (widget->isFrameView())
- static_cast<FrameView*>(widget)->layoutIfNeededRecursive();
+ static_cast<FrameView*>(widget)->updateLayoutAndStyleIfNeededRecursive();
}
- // layoutIfNeededRecursive is called when we need to make sure layout is up-to-date before
+ // updateLayoutAndStyleIfNeededRecursive is called when we need to make sure style and layout are up-to-date before
// painting, so we need to flush out any deferred repaints too.
flushDeferredRepaints();
}
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index 47dff43..463020a 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -193,7 +193,7 @@ public:
static double currentPaintTimeStamp() { return sCurrentPaintTimeStamp; } // returns 0 if not painting
- void layoutIfNeededRecursive();
+ void updateLayoutAndStyleIfNeededRecursive();
void flushDeferredRepaints();
void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
@@ -319,6 +319,8 @@ private:
bool m_layoutSchedulingEnabled;
bool m_inLayout;
+ bool m_hasPendingPostLayoutTasks;
+ bool m_inSynchronousPostLayout;
int m_layoutCount;
unsigned m_nestedLayoutCount;
Timer<FrameView> m_postLayoutTasksTimer;
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index b8abb54..b9eea6a 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -277,7 +277,7 @@ void Page::setViewMode(ViewMode viewMode)
m_mainFrame->view()->forceLayout();
if (m_mainFrame->document())
- m_mainFrame->document()->updateStyleSelector();
+ m_mainFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
}
void Page::setMainFrame(PassRefPtr<Frame> mainFrame)
@@ -424,14 +424,14 @@ void Page::initGroup()
m_group = m_singlePageGroup.get();
}
-void Page::setNeedsReapplyStyles()
+void Page::scheduleForcedStyleRecalcForAllPages()
{
if (!allPages)
return;
HashSet<Page*>::iterator end = allPages->end();
for (HashSet<Page*>::iterator it = allPages->begin(); it != end; ++it)
for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->setNeedsReapplyStyles();
+ frame->document()->scheduleForcedStyleRecalc();
}
void Page::refreshPlugins(bool reload)
@@ -544,7 +544,7 @@ unsigned int Page::markAllMatchesForText(const String& target, TextCaseSensitivi
Frame* frame = mainFrame();
do {
frame->setMarkedTextMatchesAreHighlighted(shouldHighlight);
- matches += frame->markAllMatchesForText(target, caseSensitivity == TextCaseSensitive, (limit == 0) ? 0 : (limit - matches));
+ matches += frame->countMatchesForText(target, caseSensitivity == TextCaseSensitive, (limit == 0) ? 0 : (limit - matches), true);
frame = incrementFrame(frame, true, false);
} while (frame);
@@ -657,7 +657,7 @@ void Page::userStyleSheetLocationChanged()
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) {
if (frame->document())
- frame->document()->clearPageUserSheet();
+ frame->document()->updatePageUserSheet();
}
}
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index d9e9255..8f01faa 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -91,7 +91,7 @@ namespace WebCore {
class Page : public Noncopyable {
public:
- static void setNeedsReapplyStyles();
+ static void scheduleForcedStyleRecalcForAllPages();
// It is up to the platform to ensure that non-null clients are provided where required.
struct PageClients {
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index aecd550..4c9403b 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -363,7 +363,7 @@ void PageGroup::resetUserStyleCacheInAllFrames()
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();
+ frame->document()->updatePageGroupUserSheets();
}
#endif
}
diff --git a/WebCore/page/SecurityOrigin.cpp b/WebCore/page/SecurityOrigin.cpp
index 5b51501..6edf32a 100644
--- a/WebCore/page/SecurityOrigin.cpp
+++ b/WebCore/page/SecurityOrigin.cpp
@@ -236,7 +236,13 @@ bool SecurityOrigin::canRequest(const KURL& url) const
return false;
RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url);
- if (targetOrigin->isUnique())
+
+ bool doUniqueOriginCheck = true;
+#if ENABLE(BLOB)
+ // For blob scheme, we want to ignore this check.
+ doUniqueOriginCheck = !url.protocolIs("blob");
+#endif
+ if (doUniqueOriginCheck && targetOrigin->isUnique())
return false;
// We call isSameSchemeHostPort here instead of canAccess because we want
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index a7ca533..47e764c 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -28,6 +28,7 @@
#include "BackForwardList.h"
#include "Database.h"
+#include "DocLoader.h"
#include "Frame.h"
#include "FrameTree.h"
#include "FrameView.h"
@@ -41,10 +42,16 @@ using namespace std;
namespace WebCore {
-static void setNeedsReapplyStylesInAllFrames(Page* page)
+static void setNeedsRecalcStyleInAllFrames(Page* page)
{
for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->setNeedsReapplyStyles();
+ frame->document()->styleSelectorChanged(DeferRecalcStyle);
+}
+
+static void setLoadsImagesAutomaticallyInAllFrames(Page* page)
+{
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
+ frame->document()->docLoader()->setAutoLoadImages(page->settings()->loadsImagesAutomatically());
}
#if USE(SAFARI_THEME)
@@ -121,7 +128,7 @@ Settings::Settings(Page* page)
, m_inApplicationChromeMode(false)
, m_offlineWebApplicationCacheEnabled(false)
, m_shouldPaintCustomScrollbars(false)
- , m_enforceCSSMIMETypeInStrictMode(true)
+ , m_enforceCSSMIMETypeInNoQuirksMode(true)
, m_usesEncodingDetector(false)
, m_allowScriptsToCloseWindows(false)
, m_editingBehaviorType(
@@ -146,6 +153,9 @@ Settings::Settings(Page* page)
, m_tiledBackingStoreEnabled(false)
, m_paginateDuringLayoutEnabled(false)
, m_dnsPrefetchingEnabled(true)
+#if ENABLE(FULLSCREEN_API)
+ , m_fullScreenAPIEnabled(false)
+#endif
, m_memoryInfoEnabled(false)
, m_interactiveFormValidation(false)
#ifdef ANDROID_PLUGINS
@@ -167,7 +177,7 @@ void Settings::setStandardFontFamily(const AtomicString& standardFontFamily)
return;
m_standardFontFamily = standardFontFamily;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setFixedFontFamily(const AtomicString& fixedFontFamily)
@@ -176,7 +186,7 @@ void Settings::setFixedFontFamily(const AtomicString& fixedFontFamily)
return;
m_fixedFontFamily = fixedFontFamily;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setSerifFontFamily(const AtomicString& serifFontFamily)
@@ -185,7 +195,7 @@ void Settings::setSerifFontFamily(const AtomicString& serifFontFamily)
return;
m_serifFontFamily = serifFontFamily;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setSansSerifFontFamily(const AtomicString& sansSerifFontFamily)
@@ -194,7 +204,7 @@ void Settings::setSansSerifFontFamily(const AtomicString& sansSerifFontFamily)
return;
m_sansSerifFontFamily = sansSerifFontFamily;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setCursiveFontFamily(const AtomicString& cursiveFontFamily)
@@ -203,7 +213,7 @@ void Settings::setCursiveFontFamily(const AtomicString& cursiveFontFamily)
return;
m_cursiveFontFamily = cursiveFontFamily;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setFantasyFontFamily(const AtomicString& fantasyFontFamily)
@@ -212,7 +222,7 @@ void Settings::setFantasyFontFamily(const AtomicString& fantasyFontFamily)
return;
m_fantasyFontFamily = fantasyFontFamily;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setMinimumFontSize(int minimumFontSize)
@@ -221,7 +231,7 @@ void Settings::setMinimumFontSize(int minimumFontSize)
return;
m_minimumFontSize = minimumFontSize;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setMinimumLogicalFontSize(int minimumLogicalFontSize)
@@ -230,7 +240,7 @@ void Settings::setMinimumLogicalFontSize(int minimumLogicalFontSize)
return;
m_minimumLogicalFontSize = minimumLogicalFontSize;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setDefaultFontSize(int defaultFontSize)
@@ -239,7 +249,7 @@ void Settings::setDefaultFontSize(int defaultFontSize)
return;
m_defaultFontSize = defaultFontSize;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setDefaultFixedFontSize(int defaultFontSize)
@@ -248,7 +258,7 @@ void Settings::setDefaultFixedFontSize(int defaultFontSize)
return;
m_defaultFixedFontSize = defaultFontSize;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
#ifdef ANDROID_BLOCK_NETWORK_IMAGE
@@ -261,6 +271,7 @@ void Settings::setBlockNetworkImage(bool blockNetworkImage)
void Settings::setLoadsImagesAutomatically(bool loadsImagesAutomatically)
{
m_loadsImagesAutomatically = loadsImagesAutomatically;
+ setLoadsImagesAutomaticallyInAllFrames(m_page);
}
void Settings::setJavaScriptEnabled(bool isJavaScriptEnabled)
@@ -365,7 +376,7 @@ void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
return;
m_textAreasAreResizable = textAreasAreResizable;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setEditableLinkBehavior(EditableLinkBehavior editableLinkBehavior)
@@ -638,7 +649,7 @@ void Settings::setAuthorAndUserStylesEnabled(bool authorAndUserStylesEnabled)
return;
m_authorAndUserStylesEnabled = authorAndUserStylesEnabled;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setFontRenderingMode(FontRenderingMode mode)
@@ -646,7 +657,7 @@ void Settings::setFontRenderingMode(FontRenderingMode mode)
if (fontRenderingMode() == mode)
return;
m_fontRenderingMode = mode;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
FontRenderingMode Settings::fontRenderingMode() const
@@ -679,6 +690,11 @@ void Settings::setLocalStorageDatabasePath(const String& path)
m_localStorageDatabasePath = path;
}
+void Settings::setFileSystemRootPath(const String& path)
+{
+ m_fileSystemRootPath = path;
+}
+
void Settings::setApplicationChromeMode(bool mode)
{
m_inApplicationChromeMode = mode;
@@ -700,12 +716,12 @@ void Settings::setZoomMode(ZoomMode mode)
return;
m_zoomMode = mode;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
-void Settings::setEnforceCSSMIMETypeInStrictMode(bool enforceCSSMIMETypeInStrictMode)
+void Settings::setEnforceCSSMIMETypeInNoQuirksMode(bool enforceCSSMIMETypeInNoQuirksMode)
{
- m_enforceCSSMIMETypeInStrictMode = enforceCSSMIMETypeInStrictMode;
+ m_enforceCSSMIMETypeInNoQuirksMode = enforceCSSMIMETypeInNoQuirksMode;
}
#if USE(SAFARI_THEME)
@@ -751,7 +767,7 @@ void Settings::setAcceleratedCompositingEnabled(bool enabled)
return;
m_acceleratedCompositingEnabled = enabled;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setShowDebugBorders(bool enabled)
@@ -760,7 +776,7 @@ void Settings::setShowDebugBorders(bool enabled)
return;
m_showDebugBorders = enabled;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setShowRepaintCounter(bool enabled)
@@ -769,7 +785,7 @@ void Settings::setShowRepaintCounter(bool enabled)
return;
m_showRepaintCounter = enabled;
- setNeedsReapplyStylesInAllFrames(m_page);
+ setNeedsRecalcStyleInAllFrames(m_page);
}
void Settings::setExperimentalNotificationsEnabled(bool enabled)
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index 0048598..b95c62d 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -307,7 +307,10 @@ namespace WebCore {
void setLocalStorageDatabasePath(const String&);
const String& localStorageDatabasePath() const { return m_localStorageDatabasePath; }
-
+
+ void setFileSystemRootPath(const String&);
+ const String& fileSystemRootPath() const { return m_fileSystemRootPath; }
+
void setApplicationChromeMode(bool);
bool inApplicationChromeMode() const { return m_inApplicationChromeMode; }
@@ -320,8 +323,8 @@ namespace WebCore {
void setZoomMode(ZoomMode);
ZoomMode zoomMode() const { return m_zoomMode; }
- void setEnforceCSSMIMETypeInStrictMode(bool);
- bool enforceCSSMIMETypeInStrictMode() { return m_enforceCSSMIMETypeInStrictMode; }
+ void setEnforceCSSMIMETypeInNoQuirksMode(bool);
+ bool enforceCSSMIMETypeInNoQuirksMode() { return m_enforceCSSMIMETypeInNoQuirksMode; }
void setMaximumDecodedImageSize(size_t size) { m_maximumDecodedImageSize = size; }
size_t maximumDecodedImageSize() const { return m_maximumDecodedImageSize; }
@@ -379,6 +382,11 @@ namespace WebCore {
void setPaginateDuringLayoutEnabled(bool flag) { m_paginateDuringLayoutEnabled = flag; }
bool paginateDuringLayoutEnabled() const { return m_paginateDuringLayoutEnabled; }
+#if ENABLE(FULLSCREEN_API)
+ void setFullScreenEnabled(bool flag) { m_fullScreenAPIEnabled = flag; }
+ bool fullScreenEnabled() const { return m_fullScreenAPIEnabled; }
+#endif
+
void setMemoryInfoEnabled(bool flag) { m_memoryInfoEnabled = flag; }
bool memoryInfoEnabled() const { return m_memoryInfoEnabled; }
@@ -391,10 +399,11 @@ namespace WebCore {
private:
Page* m_page;
-
+
String m_defaultTextEncodingName;
String m_ftpDirectoryTemplatePath;
String m_localStorageDatabasePath;
+ String m_fileSystemRootPath;
KURL m_userStyleSheetLocation;
AtomicString m_standardFontFamily;
AtomicString m_fixedFontFamily;
@@ -492,7 +501,7 @@ namespace WebCore {
bool m_inApplicationChromeMode : 1;
bool m_offlineWebApplicationCacheEnabled : 1;
bool m_shouldPaintCustomScrollbars : 1;
- bool m_enforceCSSMIMETypeInStrictMode : 1;
+ bool m_enforceCSSMIMETypeInNoQuirksMode : 1;
bool m_usesEncodingDetector : 1;
bool m_allowScriptsToCloseWindows : 1;
unsigned m_editingBehaviorType : 1;
@@ -508,12 +517,19 @@ namespace WebCore {
bool m_tiledBackingStoreEnabled : 1;
bool m_paginateDuringLayoutEnabled : 1;
bool m_dnsPrefetchingEnabled : 1;
+#if ENABLE(FULLSCREEN_API)
+ bool m_fullScreenAPIEnabled : 1;
+#endif
bool m_memoryInfoEnabled: 1;
bool m_interactiveFormValidation: 1;
+<<<<<<< HEAD
#ifdef ANDROID_PLUGINS
bool m_pluginsOnDemand : 1;
#endif
+=======
+
+>>>>>>> webkit.org at r66666
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
#endif
diff --git a/WebCore/page/XSSAuditor.cpp b/WebCore/page/XSSAuditor.cpp
index fb0e1c0..0e6cc65 100644
--- a/WebCore/page/XSSAuditor.cpp
+++ b/WebCore/page/XSSAuditor.cpp
@@ -277,19 +277,18 @@ String XSSAuditor::decodeHTMLEntities(const String& string, bool leaveUndecodabl
if (leaveUndecodableEntitiesUntouched)
sourceShadow = source;
bool notEnoughCharacters = false;
- unsigned entity = consumeHTMLEntity(source, notEnoughCharacters);
+ Vector<UChar, 16> decodedEntity;
+ bool success = consumeHTMLEntity(source, decodedEntity, notEnoughCharacters);
// We ignore notEnoughCharacters because we might as well use this loop
// to copy the remaining characters into |result|.
-
- if (entity > 0xFFFF) {
- result.append(U16_LEAD(entity));
- result.append(U16_TRAIL(entity));
- } else if (entity && (!leaveUndecodableEntitiesUntouched || entity != 0xFFFD)){
- result.append(entity);
- } else {
+ if (!success || (!leaveUndecodableEntitiesUntouched && decodedEntity.size() == 1 && decodedEntity[0] == 0xFFFD)) {
result.append('&');
if (leaveUndecodableEntitiesUntouched)
source = sourceShadow;
+ } else {
+ Vector<UChar>::const_iterator iter = decodedEntity.begin();
+ for (; iter != decodedEntity.end(); ++iter)
+ result.append(*iter);
}
}
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp
index 4f304e2..d4926ea 100644
--- a/WebCore/page/animation/AnimationBase.cpp
+++ b/WebCore/page/animation/AnimationBase.cpp
@@ -644,10 +644,10 @@ void AnimationBase::ensurePropertyMap()
gPropertyWrappers->append(new PropertyWrapper<Length>(CSSPropertyWebkitTransformOriginX, &RenderStyle::transformOriginX, &RenderStyle::setTransformOriginX));
gPropertyWrappers->append(new PropertyWrapper<Length>(CSSPropertyWebkitTransformOriginY, &RenderStyle::transformOriginY, &RenderStyle::setTransformOriginY));
gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyWebkitTransformOriginZ, &RenderStyle::transformOriginZ, &RenderStyle::setTransformOriginZ));
- gPropertyWrappers->append(new PropertyWrapper<const IntSize&>(CSSPropertyBorderTopLeftRadius, &RenderStyle::borderTopLeftRadius, &RenderStyle::setBorderTopLeftRadius));
- gPropertyWrappers->append(new PropertyWrapper<const IntSize&>(CSSPropertyBorderTopRightRadius, &RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius));
- gPropertyWrappers->append(new PropertyWrapper<const IntSize&>(CSSPropertyBorderBottomLeftRadius, &RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius));
- gPropertyWrappers->append(new PropertyWrapper<const IntSize&>(CSSPropertyBorderBottomRightRadius, &RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius));
+ gPropertyWrappers->append(new PropertyWrapper<const LengthSize&>(CSSPropertyBorderTopLeftRadius, &RenderStyle::borderTopLeftRadius, &RenderStyle::setBorderTopLeftRadius));
+ gPropertyWrappers->append(new PropertyWrapper<const LengthSize&>(CSSPropertyBorderTopRightRadius, &RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius));
+ gPropertyWrappers->append(new PropertyWrapper<const LengthSize&>(CSSPropertyBorderBottomLeftRadius, &RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius));
+ gPropertyWrappers->append(new PropertyWrapper<const LengthSize&>(CSSPropertyBorderBottomRightRadius, &RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius));
gPropertyWrappers->append(new PropertyWrapper<EVisibility>(CSSPropertyVisibility, &RenderStyle::visibility, &RenderStyle::setVisibility));
gPropertyWrappers->append(new PropertyWrapper<float>(CSSPropertyZoom, &RenderStyle::zoom, &RenderStyle::setZoom));
@@ -1114,7 +1114,7 @@ void AnimationBase::updateStateMachine(AnimStateInput input, double param)
} else {
bool started = startAnimation(beginAnimationUpdateTime() - m_startTime);
m_compAnim->animationController()->addToStartTimeResponseWaitList(this, started);
- m_isAccelerated = !started;
+ m_isAccelerated = started;
}
}
break;
@@ -1242,7 +1242,7 @@ double AnimationBase::progress(double scale, double offset, const TimingFunction
int integralTime = static_cast<int>(fractionalTime);
fractionalTime -= integralTime;
- if (m_animation->direction() && (integralTime & 1))
+ if ((m_animation->direction() == Animation::AnimationDirectionAlternate) && (integralTime & 1))
fractionalTime = 1 - fractionalTime;
if (scale != 1 || offset)
diff --git a/WebCore/page/animation/KeyframeAnimation.cpp b/WebCore/page/animation/KeyframeAnimation.cpp
index 2f2cfc0..01ec2f1 100644
--- a/WebCore/page/animation/KeyframeAnimation.cpp
+++ b/WebCore/page/animation/KeyframeAnimation.cpp
@@ -62,41 +62,67 @@ KeyframeAnimation::~KeyframeAnimation()
endAnimation();
}
-void KeyframeAnimation::getKeyframeAnimationInterval(const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& prog) const
+void KeyframeAnimation::fetchIntervalEndpointsForProperty(int property, const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& prog) const
{
// Find the first key
double elapsedTime = getElapsedTime();
- double t = m_animation->duration() ? (elapsedTime / m_animation->duration()) : 1;
+ double fractionalTime = m_animation->duration() ? (elapsedTime / m_animation->duration()) : 1;
- ASSERT(t >= 0);
- if (t < 0)
- t = 0;
+ ASSERT(fractionalTime >= 0);
+ if (fractionalTime < 0)
+ fractionalTime = 0;
- int i = static_cast<int>(t);
- t -= i;
- if (m_animation->direction() && (i & 1))
- t = 1 - t;
+ // FIXME: share this code with AnimationBase::progress().
+ int iteration = static_cast<int>(fractionalTime);
+ fractionalTime -= iteration;
+
+ bool reversing = (m_animation->direction() == Animation::AnimationDirectionAlternate) && (iteration & 1);
+ if (reversing)
+ fractionalTime = 1 - fractionalTime;
- double scale = 1;
- double offset = 0;
- Vector<KeyframeValue>::const_iterator endKeyframes = m_keyframes.endKeyframes();
- for (Vector<KeyframeValue>::const_iterator it = m_keyframes.beginKeyframes(); it != endKeyframes; ++it) {
- if (t < it->key()) {
- // The first key should always be 0, so we should never succeed on the first key
- if (!fromStyle)
- break;
- scale = 1.0 / (it->key() - offset);
- toStyle = it->style();
+ size_t numKeyframes = m_keyframes.size();
+ if (!numKeyframes)
+ return;
+
+ ASSERT(!m_keyframes[0].key());
+ ASSERT(m_keyframes[m_keyframes.size() - 1].key() == 1);
+
+ int prevIndex = -1;
+ int nextIndex = -1;
+
+ // FIXME: with a lot of keys, this linear search will be slow. We could binary search.
+ for (size_t i = 0; i < numKeyframes; ++i) {
+ const KeyframeValue& currKeyFrame = m_keyframes[i];
+
+ if (!currKeyFrame.containsProperty(property))
+ continue;
+
+ if (fractionalTime < currKeyFrame.key()) {
+ nextIndex = i;
break;
}
-
- offset = it->key();
- fromStyle = it->style();
+
+ prevIndex = i;
}
- if (!fromStyle || !toStyle)
- return;
+ double scale = 1;
+ double offset = 0;
+
+ if (prevIndex == -1)
+ prevIndex = 0;
+
+ if (nextIndex == -1)
+ nextIndex = m_keyframes.size() - 1;
+
+ const KeyframeValue& prevKeyframe = m_keyframes[prevIndex];
+ const KeyframeValue& nextKeyframe = m_keyframes[nextIndex];
+
+ fromStyle = prevKeyframe.style();
+ toStyle = nextKeyframe.style();
+
+ offset = prevKeyframe.key();
+ scale = 1.0 / (nextKeyframe.key() - prevKeyframe.key());
const TimingFunction* timingFunction = 0;
if (fromStyle->animations() && fromStyle->animations()->size() > 0) {
@@ -131,18 +157,9 @@ void KeyframeAnimation::animate(CompositeAnimation*, RenderObject*, const Render
// through to the style blend so that we get the fromStyle.
if (waitingToStart() && m_animation->delay() > 0 && !m_animation->fillsBackwards())
return;
-
- // FIXME: we need to be more efficient about determining which keyframes we are animating between.
- // We should cache the last pair or something.
- // Get the from/to styles and progress between
- const RenderStyle* fromStyle = 0;
- const RenderStyle* toStyle = 0;
- double progress;
- getKeyframeAnimationInterval(fromStyle, toStyle, progress);
-
- // If either style is 0 we have an invalid case, just stop the animation.
- if (!fromStyle || !toStyle) {
+ // If we have no keyframes, don't animate.
+ if (!m_keyframes.size()) {
updateStateMachine(AnimationStateInputEndAnimation, -1);
return;
}
@@ -152,9 +169,19 @@ void KeyframeAnimation::animate(CompositeAnimation*, RenderObject*, const Render
if (!animatedStyle)
animatedStyle = RenderStyle::clone(targetStyle);
+ // FIXME: we need to be more efficient about determining which keyframes we are animating between.
+ // We should cache the last pair or something.
HashSet<int>::const_iterator endProperties = m_keyframes.endProperties();
for (HashSet<int>::const_iterator it = m_keyframes.beginProperties(); it != endProperties; ++it) {
- bool needsAnim = blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress);
+ int property = *it;
+
+ // Get the from/to styles and progress between
+ const RenderStyle* fromStyle = 0;
+ const RenderStyle* toStyle = 0;
+ double progress;
+ fetchIntervalEndpointsForProperty(property, fromStyle, toStyle, progress);
+
+ bool needsAnim = blendProperties(this, property, animatedStyle.get(), fromStyle, toStyle, progress);
if (needsAnim)
setAnimating();
else {
@@ -175,26 +202,29 @@ void KeyframeAnimation::getAnimatedStyle(RefPtr<RenderStyle>& animatedStyle)
if (waitingToStart() && m_animation->delay() > 0 && !m_animation->fillsBackwards())
return;
- // Get the from/to styles and progress between
- const RenderStyle* fromStyle = 0;
- const RenderStyle* toStyle = 0;
- double progress;
- getKeyframeAnimationInterval(fromStyle, toStyle, progress);
-
- // If either style is 0 we have an invalid case
- if (!fromStyle || !toStyle)
+ if (!m_keyframes.size())
return;
if (!animatedStyle)
animatedStyle = RenderStyle::clone(m_object->style());
HashSet<int>::const_iterator endProperties = m_keyframes.endProperties();
- for (HashSet<int>::const_iterator it = m_keyframes.beginProperties(); it != endProperties; ++it)
- blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress);
+ for (HashSet<int>::const_iterator it = m_keyframes.beginProperties(); it != endProperties; ++it) {
+ int property = *it;
+
+ // Get the from/to styles and progress between
+ const RenderStyle* fromStyle = 0;
+ const RenderStyle* toStyle = 0;
+ double progress;
+ fetchIntervalEndpointsForProperty(property, fromStyle, toStyle, progress);
+
+ blendProperties(this, property, animatedStyle.get(), fromStyle, toStyle, progress);
+ }
}
bool KeyframeAnimation::hasAnimationForProperty(int property) const
{
+ // FIXME: why not just m_keyframes.containsProperty()?
HashSet<int>::const_iterator end = m_keyframes.endProperties();
for (HashSet<int>::const_iterator it = m_keyframes.beginProperties(); it != end; ++it) {
if (*it == property)
@@ -346,27 +376,27 @@ void KeyframeAnimation::validateTransformFunctionList()
if (m_keyframes.size() < 2 || !m_keyframes.containsProperty(CSSPropertyWebkitTransform))
return;
- Vector<KeyframeValue>::const_iterator end = m_keyframes.endKeyframes();
-
// Empty transforms match anything, so find the first non-empty entry as the reference
- size_t firstIndex = 0;
- Vector<KeyframeValue>::const_iterator firstIt = end;
-
- for (Vector<KeyframeValue>::const_iterator it = m_keyframes.beginKeyframes(); it != end; ++it, ++firstIndex) {
- if (it->style()->transform().operations().size() > 0) {
- firstIt = it;
+ size_t numKeyframes = m_keyframes.size();
+ size_t firstNonEmptyTransformKeyframeIndex = numKeyframes;
+
+ for (size_t i = 0; i < numKeyframes; ++i) {
+ const KeyframeValue& currentKeyframe = m_keyframes[i];
+ if (currentKeyframe.style()->transform().operations().size()) {
+ firstNonEmptyTransformKeyframeIndex = i;
break;
}
}
- if (firstIt == end)
+ if (firstNonEmptyTransformKeyframeIndex == numKeyframes)
return;
- const TransformOperations* firstVal = &firstIt->style()->transform();
+ const TransformOperations* firstVal = &m_keyframes[firstNonEmptyTransformKeyframeIndex].style()->transform();
// See if the keyframes are valid
- for (Vector<KeyframeValue>::const_iterator it = firstIt+1; it != end; ++it) {
- const TransformOperations* val = &it->style()->transform();
+ for (size_t i = firstNonEmptyTransformKeyframeIndex + 1; i < numKeyframes; ++i) {
+ const KeyframeValue& currentKeyframe = m_keyframes[i];
+ const TransformOperations* val = &currentKeyframe.style()->transform();
// A null transform matches anything
if (val->operations().isEmpty())
diff --git a/WebCore/page/animation/KeyframeAnimation.h b/WebCore/page/animation/KeyframeAnimation.h
index fab0ae8..a187f35 100644
--- a/WebCore/page/animation/KeyframeAnimation.h
+++ b/WebCore/page/animation/KeyframeAnimation.h
@@ -82,8 +82,8 @@ private:
KeyframeAnimation(const Animation* animation, RenderObject*, int index, CompositeAnimation*, RenderStyle* unanimatedStyle);
virtual ~KeyframeAnimation();
- // Get the styles surrounding the current animation time and the progress between them
- void getKeyframeAnimationInterval(const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& progress) const;
+ // Get the styles for the given property surrounding the current animation time and the progress between them.
+ void fetchIntervalEndpointsForProperty(int property, const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& progress) const;
// The keyframes that we are blending.
KeyframeList m_keyframes;
diff --git a/WebCore/page/chromium/ChromeClientChromium.h b/WebCore/page/chromium/ChromeClientChromium.h
index e897c15..7765472 100644
--- a/WebCore/page/chromium/ChromeClientChromium.h
+++ b/WebCore/page/chromium/ChromeClientChromium.h
@@ -55,6 +55,9 @@ public:
// Notifies embedder that the state of an accessibility object has changed.
virtual void didChangeAccessibilityObjectState(AccessibilityObject*) = 0;
+
+ // Notified embedder that the children of an accessibility object has changed.
+ virtual void didChangeAccessibilityObjectChildren(AccessibilityObject*) = 0;
};
} // namespace WebCore
diff --git a/WebCore/page/efl/EventHandlerEfl.cpp b/WebCore/page/efl/EventHandlerEfl.cpp
index df5c276..acf4343 100644
--- a/WebCore/page/efl/EventHandlerEfl.cpp
+++ b/WebCore/page/efl/EventHandlerEfl.cpp
@@ -110,7 +110,7 @@ bool EventHandler::passWheelEventToWidget(PlatformWheelEvent& event, Widget* wid
PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
{
- return new ClipboardEfl(ClipboardWritable, true);
+ return ClipboardEfl::create(ClipboardWritable, true);
}
bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
diff --git a/WebCore/storage/DOMFileSystem.cpp b/WebCore/platform/AsyncFileSystem.cpp
index c3dbd34..b4fcd0d 100644
--- a/WebCore/storage/DOMFileSystem.cpp
+++ b/WebCore/platform/AsyncFileSystem.cpp
@@ -29,23 +29,46 @@
*/
#include "config.h"
-#include "DOMFileSystem.h"
+#include "AsyncFileSystem.h"
#if ENABLE(FILE_SYSTEM)
-#include "DirectoryEntry.h"
+#include "AsyncFileSystemCallbacks.h"
+#include "FileSystem.h"
namespace WebCore {
-DOMFileSystem::DOMFileSystem(const String& name, const String& rootPath)
- : m_rootPath(rootPath)
- , m_name(name)
+PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(const String&)
{
+ // FIXME: return default AsyncFileSystem implementation.
+ return 0;
}
-PassRefPtr<DirectoryEntry> DOMFileSystem::root()
+// Default implementation.
+void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- return DirectoryEntry::create(this, "/");
+ String typeString = (type == Persistent) ? "Persistent" : "Temporary";
+
+ String name = storageIdentifier;
+ name += ":";
+ name += typeString;
+
+ String rootPath = basePath;
+ rootPath.append(PlatformFilePathSeparator);
+ rootPath += storageIdentifier;
+ rootPath.append(PlatformFilePathSeparator);
+ rootPath += typeString;
+ rootPath.append(PlatformFilePathSeparator);
+
+ callbacks->didOpenFileSystem(name, AsyncFileSystem::create(rootPath));
+}
+
+// Default implementation.
+String AsyncFileSystem::virtualToPlatformPath(const String& path) const
+{
+ ASSERT(!m_platformRootPath.isEmpty());
+ String virtualPath = path;
+ return m_platformRootPath + virtualPath.replace('/', PlatformFilePathSeparator);
}
} // namespace
diff --git a/WebCore/platform/AsyncFileSystem.h b/WebCore/platform/AsyncFileSystem.h
new file mode 100644
index 0000000..601f0ea
--- /dev/null
+++ b/WebCore/platform/AsyncFileSystem.h
@@ -0,0 +1,126 @@
+/*
+ * 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 AsyncFileSystem_h
+#define AsyncFileSystem_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "PlatformString.h"
+#include "Timer.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class AsyncFileSystem;
+class AsyncFileSystemCallbacks;
+
+// This class provides async interface for platform-specific file system implementation. Note that all the methods take platform paths.
+class AsyncFileSystem : public Noncopyable {
+public:
+ virtual ~AsyncFileSystem() { }
+
+ // FileSystem type
+ enum Type {
+ Temporary,
+ Persistent,
+ };
+
+ virtual void stop() { }
+ virtual bool hasPendingActivity() { return false; }
+
+ // Creates and returns a new platform-specific AsyncFileSystem instance if the platform has its own implementation.
+ static PassOwnPtr<AsyncFileSystem> create(const String& rootPath);
+
+ // Opens a new file system.
+ static void openFileSystem(const String& basePath, const String& storageIdentifier, Type, PassOwnPtr<AsyncFileSystemCallbacks>);
+
+ // Moves a file or directory from srcPath to destPath.
+ // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Copies a file or directory from srcPath to destPath.
+ // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Deletes a file or directory at a given path.
+ // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Retrieves the metadata information of the file or directory at a given path.
+ // AsyncFileSystemCallbacks::didReadMetadata() is called when the operation is completed successfully.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Creates a file at a given path. If exclusive flag is true, it fails if the path already exists.
+ // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Creates a directory at a given path. If exclusive flag is true, it fails if the path already exists.
+ // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Checks if a file exists at a given path.
+ // AsyncFileSystemCallbacks::didSucceed() is called if the file exists.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Checks if a directory exists at a given path.
+ // AsyncFileSystemCallbacks::didSucceed() is called if the directory exists.
+ // AsyncFileSystemCallbacks::didFail() is called otherwise.
+ virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Reads directory entries of a given directory at path.
+ // AsyncFileSystemCallbacks::didReadDirectoryEntry() is called when each directory entry is called. AsyncFileSystemCallbacks::didReadDirectoryEntries() is called after a chunk of directory entries have been read.
+ // AsyncFileSystemCallbacks::didFail() is when there is an error.
+ virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0;
+
+ // Converts a given absolute virtual path to a platform path that starts with the platform root path of this file system.
+ virtual String virtualToPlatformPath(const String& path) const;
+
+protected:
+ AsyncFileSystem(const String& platformRootPath)
+ : m_platformRootPath(platformRootPath)
+ {
+ }
+
+ String m_platformRootPath;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // AsyncFileSystem_h
diff --git a/WebCore/platform/AsyncFileSystemCallbacks.h b/WebCore/platform/AsyncFileSystemCallbacks.h
new file mode 100644
index 0000000..0547fad
--- /dev/null
+++ b/WebCore/platform/AsyncFileSystemCallbacks.h
@@ -0,0 +1,69 @@
+/*
+ * 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 AsyncFileSystemCallbacks_h
+#define AsyncFileSystemCallbacks_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "PlatformString.h"
+
+namespace WebCore {
+
+class AsyncFileSystem;
+
+class AsyncFileSystemCallbacks : public Noncopyable {
+public:
+ // Called when a requested operation is completed successfully.
+ virtual void didSucceed() = 0;
+
+ // Called when a requested file system is opened.
+ virtual void didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem>) = 0;
+
+ // Called when a file metadata is read successfully.
+ virtual void didReadMetadata(double modificationTime) = 0;
+
+ // Called when a directory entry is read.
+ virtual void didReadDirectoryEntry(const String& name, bool isDirectory) = 0;
+
+ // Called after a chunk of directory entries have been read (i.e. indicates it's good time to call back to the application). If hasMore is true there can be more chunks.
+ virtual void didReadDirectoryEntries(bool hasMore) = 0;
+
+ // Called when there was an error.
+ virtual void didFail(int code) = 0;
+
+ virtual ~AsyncFileSystemCallbacks() { }
+};
+
+} // namespace
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // AsyncFileSystemCallbacks_h
diff --git a/WebCore/platform/BlobItem.cpp b/WebCore/platform/BlobItem.cpp
deleted file mode 100644
index 591516d..0000000
--- a/WebCore/platform/BlobItem.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "BlobItem.h"
-
-#include "FileSystem.h"
-#include "UUID.h"
-#include <wtf/Assertions.h>
-
-namespace WebCore {
-
-#if ENABLE(BLOB)
-static const double invalidModificationTime = 0;
-
-static double getFileSnapshotModificationTime(const String& path)
-{
- // FIXME: synchronized file call
- time_t modificationTime;
- if (getFileModificationTime(path, modificationTime))
- return static_cast<double>(modificationTime);
- return invalidModificationTime;
-}
-#endif // ENABLE(BLOB)
-
-// DataBlobItem ----------------------------------------------------------------
-
-#if ENABLE(BLOB)
-PassRefPtr<BlobItem> DataBlobItem::slice(long long start, long long length)
-{
- ASSERT(start >= 0 && length >= 0);
- ASSERT(static_cast<unsigned long long>(start) < size());
- if (!start && size() <= static_cast<unsigned long long>(length))
- return this;
- if (static_cast<unsigned long long>(start + length) > size())
- length = size() - start;
- return DataRangeBlobItem::create(this, start, length);
-}
-#endif
-
-// FileBlobItem ----------------------------------------------------------------
-
-PassRefPtr<BlobItem> FileBlobItem::create(const String& path)
-{
- return adoptRef(static_cast<BlobItem*>(new FileBlobItem(path)));
-}
-
-FileBlobItem::FileBlobItem(const String& path)
- : m_path(path)
- , m_fileName(pathGetFileName(m_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
- long long size;
- if (!getFileSize(m_path, size))
- return 0;
- return static_cast<unsigned long long>(size);
-}
-
-#if ENABLE(BLOB)
-PassRefPtr<BlobItem> FileBlobItem::slice(long long start, long long length)
-{
- ASSERT(start >= 0 && length >= 0);
- long long fileSize = size();
- ASSERT(start < fileSize);
- if (!start && fileSize <= length)
- return this;
- if (start + length > fileSize)
- length = fileSize - start;
- const FileRangeBlobItem* fileRangeItem = toFileRangeBlobItem();
- double modificationTime = fileRangeItem ? fileRangeItem->snapshotModificationTime() : getFileSnapshotModificationTime(path());
- return FileRangeBlobItem::create(path(), start, length, modificationTime);
-}
-#endif // ENABLE(BLOB)
-
-// StringBlobItem --------------------------------------------------------------
-
-PassRefPtr<BlobItem> StringBlobItem::create(const CString& text)
-{
- return adoptRef(static_cast<BlobItem*>(new StringBlobItem(text)));
-}
-
-StringBlobItem::StringBlobItem(const CString& text)
- : m_data(text)
-{
-}
-
-// ByteArrayBlobItem ----------------------------------------------------------
-
-PassRefPtr<BlobItem> ByteArrayBlobItem::create(const char* data, size_t size)
-{
- return adoptRef(static_cast<BlobItem*>(new ByteArrayBlobItem(data, size)));
-}
-
-ByteArrayBlobItem::ByteArrayBlobItem(const char* data, size_t size)
-{
- m_bytesArray.append(data, size);
-}
-
-#if ENABLE(BLOB)
-
-// DataRangeBlobItem -----------------------------------------------------------
-
-PassRefPtr<BlobItem> DataRangeBlobItem::create(PassRefPtr<DataBlobItem> item, long long start, long long length)
-{
- return adoptRef(static_cast<BlobItem*>(new DataRangeBlobItem(item, start, length)));
-}
-
-DataRangeBlobItem::DataRangeBlobItem(PassRefPtr<DataBlobItem> item, long long start, long long length)
- : m_length(length)
-{
- const DataRangeBlobItem* rangeItem = item->toDataRangeBlobItem();
- if (rangeItem) {
- m_item = rangeItem->m_item;
- m_start = start + rangeItem->m_start;
- ASSERT(!m_item->toDataRangeBlobItem());
- ASSERT(static_cast<unsigned long long>(m_start + m_length) <= m_item->size());
- } else {
- m_item = item;
- m_start = start;
- }
-}
-
-const char* DataRangeBlobItem::data() const
-{
- return m_item->data() + m_start;
-}
-
-// FileRangeBlobItem -----------------------------------------------------------
-
-PassRefPtr<BlobItem> FileRangeBlobItem::create(const String& path, long long start, long long length, double snapshotModificationTime)
-{
- return adoptRef(static_cast<BlobItem*>(new FileRangeBlobItem(path, start, length, snapshotModificationTime)));
-}
-
-FileRangeBlobItem::FileRangeBlobItem(const String& path, long long start, long long length, double modificationTime)
- : FileBlobItem(path)
- , m_start(start)
- , m_length(length)
- , m_snapshotModificationTime(modificationTime)
-{
- m_uniqueName = "Blob" + createCanonicalUUIDString();
- m_uniqueName.replace("-", ""); // For safty, remove '-' from the filename snce some servers may not like it.
-}
-
-#endif // ENABLE(BLOB)
-
-} // namespace WebCore
diff --git a/WebCore/platform/BlobItem.h b/WebCore/platform/BlobItem.h
deleted file mode 100644
index 42ece92..0000000
--- a/WebCore/platform/BlobItem.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BlobItem_h
-#define BlobItem_h
-
-#include "PlatformString.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/CString.h>
-
-namespace WebCore {
-
-class ByteArrayBlobItem;
-class DataBlobItem;
-class DataRangeBlobItem;
-class FileBlobItem;
-class FileRangeBlobItem;
-class StringBlobItem;
-
-// A base interface for all arbitrary-data-object component items.
-// The BlobItem and its subclasses are structured like the following:
-// BlobItem
-// |
-// +-------> DataBlobItem
-// | |
-// | +---------> StringBlobItem
-// | +---------> ByteArrayBlobItem
-// | +---------> DataRangeBlobItem
-// |
-// +-------> FileBlobItem
-// |
-// +---------> FileRangeBlobItem
-//
-class BlobItem : public RefCounted<BlobItem> {
-public:
- virtual ~BlobItem() { }
- virtual unsigned long long size() const = 0;
-
- virtual const DataBlobItem* toDataBlobItem() const { return 0; }
- virtual const StringBlobItem* toStringBlobItem() const { return 0; }
- virtual const ByteArrayBlobItem* toByteArrayBlobItem() const { return 0; }
- virtual const FileBlobItem* toFileBlobItem() const { return 0; }
-#if ENABLE(BLOB)
- virtual const DataRangeBlobItem* toDataRangeBlobItem() const { return 0; }
- virtual const FileRangeBlobItem* toFileRangeBlobItem() const { return 0; }
-
- // Note: no external methods except for Blob::slice should call this.
- virtual PassRefPtr<BlobItem> slice(long long start, long long length) = 0;
-#endif // ENABLE(BLOB)
-
-protected:
- BlobItem() { }
-};
-
-typedef Vector<RefPtr<BlobItem> > BlobItemList;
-
-class DataBlobItem : public BlobItem {
-public:
- virtual const char* data() const = 0;
-
- // BlobItem methods.
- virtual const DataBlobItem* toDataBlobItem() const { return this; }
-#if ENABLE(BLOB)
- virtual PassRefPtr<BlobItem> slice(long long start, long long length);
-#endif // ENABLE(BLOB)
-};
-
-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;
- virtual const FileBlobItem* toFileBlobItem() const { return this; }
-#if ENABLE(BLOB)
- virtual PassRefPtr<BlobItem> slice(long long start, long long length);
-#endif // ENABLE(BLOB)
-
-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 CString&);
- const CString& cstr() const { return m_data; }
-
- // BlobItem methods.
- virtual unsigned long long size() const { return m_data.length(); }
- virtual const StringBlobItem* toStringBlobItem() const { return this; }
-
- // DataBlobItem methods.
- virtual const char* data() const { return m_data.data(); }
-
-private:
- StringBlobItem(const CString&);
- CString m_data;
-};
-
-class ByteArrayBlobItem : public DataBlobItem {
-public:
- static PassRefPtr<BlobItem> create(const char* data, size_t size);
-
- // BlobItem methods.
- virtual unsigned long long size() const { return m_bytesArray.size(); }
- virtual const ByteArrayBlobItem* toByteArrayBlobItem() const { return this; }
-
- // DataBlobItem methods.
- virtual const char* data() const { return m_bytesArray.data(); }
-
-private:
- ByteArrayBlobItem(const char* data, size_t size);
- Vector<char> m_bytesArray;
-};
-
-#if ENABLE(BLOB)
-
-// BlobItem class for sliced data (string or bytes-array).
-class DataRangeBlobItem : public DataBlobItem {
-public:
- static PassRefPtr<BlobItem> create(PassRefPtr<DataBlobItem>, long long start, long long length);
-
- // BlobItem methods.
- virtual unsigned long long size() const { return m_length; }
- virtual const DataRangeBlobItem* toDataRangeBlobItem() const { return this; }
-
- // DataBlobItem methods.
- virtual const char* data() const;
-
-private:
- DataRangeBlobItem(PassRefPtr<DataBlobItem>, long long start, long long length);
- RefPtr<DataBlobItem> m_item;
- long long m_start;
- long long m_length;
-};
-
-class FileRangeBlobItem : public FileBlobItem {
-public:
- static PassRefPtr<BlobItem> create(const String& path, long long start, long long length, double snapshotModificationTime);
- long long start() const { return m_start; }
- double snapshotModificationTime() const { return m_snapshotModificationTime; }
-
- // BlobItem methods.
- virtual unsigned long long size() const { return m_length; }
- virtual const FileRangeBlobItem* toFileRangeBlobItem() const { return this; }
-
- // FileBlobItem methods.
- virtual const String& name() const { return m_uniqueName; }
-
-private:
- FileRangeBlobItem(const String& path, long long start, long long length, double snapshotModificationTime);
- long long m_start;
- long long m_length;
- String m_uniqueName;
-
- double m_snapshotModificationTime;
-};
-
-#endif // ENABLE(BLOB)
-
-} // namespace WebCore
-
-#endif // BlobItem_h
diff --git a/WebCore/platform/FileSystem.h b/WebCore/platform/FileSystem.h
index ec75a21..e3916cf 100644
--- a/WebCore/platform/FileSystem.h
+++ b/WebCore/platform/FileSystem.h
@@ -138,6 +138,12 @@ enum FileSeekOrigin {
SeekFromEnd
};
+#if OS(WINDOWS)
+static const char PlatformFilePathSeparator = '\\';
+#else
+static const char PlatformFilePathSeparator = '/';
+#endif
+
bool fileExists(const String&);
bool deleteFile(const String&);
bool deleteEmptyDirectory(const String&);
diff --git a/WebCore/platform/Length.h b/WebCore/platform/Length.h
index a3b1eda..7dd875e 100644
--- a/WebCore/platform/Length.h
+++ b/WebCore/platform/Length.h
@@ -30,6 +30,8 @@ namespace WebCore {
const int undefinedLength = -1;
const int percentScaleFactor = 128;
+const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
+const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
enum LengthType { Auto, Relative, Percent, Fixed, Static, Intrinsic, MinIntrinsic };
diff --git a/WebCore/platform/MIMETypeRegistry.cpp b/WebCore/platform/MIMETypeRegistry.cpp
index b489d3b..5c20e08 100644
--- a/WebCore/platform/MIMETypeRegistry.cpp
+++ b/WebCore/platform/MIMETypeRegistry.cpp
@@ -279,6 +279,10 @@ static MediaMIMETypeMap& mediaMIMETypeMap()
{ "video/annodex", "axv" },
{ "audio/speex", "spx" },
+ // WebM
+ { "video/webm", "webm" },
+ { "audio/webm", "webm" },
+
// MPEG
{ "audio/mpeg", "m1a" },
{ "audio/mpeg", "m2a" },
diff --git a/WebCore/platform/PurgeableBuffer.h b/WebCore/platform/PurgeableBuffer.h
index 3caf482..32341c2 100644
--- a/WebCore/platform/PurgeableBuffer.h
+++ b/WebCore/platform/PurgeableBuffer.h
@@ -63,7 +63,7 @@ namespace WebCore {
mutable State m_state;
};
-#if !OS(DARWIN) || defined(BUILDING_ON_TIGER) || PLATFORM(QT) || PLATFORM(GTK)
+#if !ENABLE(PURGEABLE_MEMORY)
inline PassOwnPtr<PurgeableBuffer> PurgeableBuffer::create(const char*, size_t) { return PassOwnPtr<PurgeableBuffer>(); }
inline PurgeableBuffer::~PurgeableBuffer() { }
inline const char* PurgeableBuffer::data() const { return 0; }
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index 927a9fc..854fef5 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -699,7 +699,7 @@ void ScrollView::wheelEvent(PlatformWheelEvent& e)
if (e.granularity() == ScrollByPageWheelEvent) {
ASSERT(deltaX == 0);
bool negative = deltaY < 0;
- deltaY = max(max<int>(visibleHeight() * Scrollbar::minFractionToStepWhenPaging(), visibleHeight() - Scrollbar::maxOverlapBetweenPages()), 1);
+ deltaY = max(max(static_cast<float>(visibleHeight()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(visibleHeight() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
if (negative)
deltaY = -deltaY;
}
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 6853969..5624d70 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -57,7 +57,7 @@ class ScrollView : public Widget, public ScrollbarClient {
public:
~ScrollView();
- // ScrollbarClient function. FrameView overrides the other two.
+ // ScrollbarClient function. FrameView overrides the others.
virtual void valueChanged(Scrollbar*);
// The window thats hosts the ScrollView. The ScrollView will communicate scrolls and repaints to the
diff --git a/WebCore/platform/Scrollbar.cpp b/WebCore/platform/Scrollbar.cpp
index 119a9dc..ff8f66f 100644
--- a/WebCore/platform/Scrollbar.cpp
+++ b/WebCore/platform/Scrollbar.cpp
@@ -142,24 +142,20 @@ bool Scrollbar::scroll(ScrollDirection direction, ScrollGranularity granularity,
}
#endif
+ // Ignore perpendicular scrolls.
+ if ((m_orientation == HorizontalScrollbar) ? (direction == ScrollUp || direction == ScrollDown) : (direction == ScrollLeft || direction == ScrollRight))
+ return false;
float step = 0;
- if ((direction == ScrollUp && m_orientation == VerticalScrollbar) || (direction == ScrollLeft && m_orientation == HorizontalScrollbar))
- step = -1;
- else if ((direction == ScrollDown && m_orientation == VerticalScrollbar) || (direction == ScrollRight && m_orientation == HorizontalScrollbar))
- step = 1;
-
- if (granularity == ScrollByLine)
- step *= m_lineStep;
- else if (granularity == ScrollByPage)
- step *= m_pageStep;
- else if (granularity == ScrollByDocument)
- step *= m_totalSize;
- else if (granularity == ScrollByPixel)
- step *= m_pixelStep;
-
- float newPos = m_currentPos + step * multiplier;
- float maxPos = m_totalSize - m_visibleSize;
- return setCurrentPos(max(min(newPos, maxPos), 0.0f));
+ switch (granularity) {
+ case ScrollByLine: step = m_lineStep; break;
+ case ScrollByPage: step = m_pageStep; break;
+ case ScrollByDocument: step = m_totalSize; break;
+ case ScrollByPixel: step = m_pixelStep; break;
+ }
+ if (direction == ScrollUp || direction == ScrollLeft)
+ multiplier = -multiplier;
+
+ return setCurrentPos(max(min(m_currentPos + (step * multiplier), static_cast<float>(m_totalSize - m_visibleSize)), 0.0f));
}
void Scrollbar::updateThumb()
diff --git a/WebCore/platform/Scrollbar.h b/WebCore/platform/Scrollbar.h
index 6b3cd0d..f8ef96d 100644
--- a/WebCore/platform/Scrollbar.h
+++ b/WebCore/platform/Scrollbar.h
@@ -79,7 +79,7 @@ public:
void setProportion(int visibleSize, int totalSize);
void setPressedPos(int p) { m_pressedPos = p; }
- bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1.0f);
+ bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
virtual void paint(GraphicsContext*, const IntRect& damageRect);
@@ -124,9 +124,6 @@ public:
virtual IntPoint convertToContainingView(const IntPoint&) const;
virtual IntPoint convertFromContainingView(const IntPoint&) const;
-private:
- virtual bool isScrollbar() const { return true; }
-
protected:
Scrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0);
@@ -142,7 +139,6 @@ protected:
ScrollGranularity pressedPartScrollGranularity();
void moveThumb(int pos);
- bool setCurrentPos(float pos);
ScrollbarClient* m_client;
ScrollbarOrientation m_orientation;
@@ -167,6 +163,11 @@ protected:
bool m_overlapsResizer;
bool m_suppressInvalidation;
+
+private:
+ virtual bool isScrollbar() const { return true; }
+
+ bool setCurrentPos(float pos);
};
}
diff --git a/WebCore/platform/ScrollbarClient.h b/WebCore/platform/ScrollbarClient.h
index 6efe72e..fa94ecc 100644
--- a/WebCore/platform/ScrollbarClient.h
+++ b/WebCore/platform/ScrollbarClient.h
@@ -34,7 +34,7 @@ namespace WebCore {
class ScrollbarClient {
public:
- virtual ~ScrollbarClient() {}
+ virtual ~ScrollbarClient() { }
virtual void valueChanged(Scrollbar*) = 0;
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) = 0;
diff --git a/WebCore/platform/ThemeTypes.h b/WebCore/platform/ThemeTypes.h
index d82aa73..3567004 100644
--- a/WebCore/platform/ThemeTypes.h
+++ b/WebCore/platform/ThemeTypes.h
@@ -51,7 +51,7 @@ enum ControlPart {
MediaFullscreenButtonPart, MediaMuteButtonPart, MediaPlayButtonPart, MediaSeekBackButtonPart,
MediaSeekForwardButtonPart, MediaRewindButtonPart, MediaReturnToRealtimeButtonPart, MediaToggleClosedCaptionsButtonPart,
MediaSliderPart, MediaSliderThumbPart, MediaVolumeSliderContainerPart, MediaVolumeSliderPart, MediaVolumeSliderThumbPart,
- MediaVolumeSliderMuteButtonPart, MediaControlsBackgroundPart, MediaCurrentTimePart, MediaTimeRemainingPart,
+ MediaVolumeSliderMuteButtonPart, MediaControlsBackgroundPart, MediaControlsFullscreenBackgroundPart, MediaCurrentTimePart, MediaTimeRemainingPart,
MenulistPart, MenulistButtonPart, MenulistTextPart, MenulistTextFieldPart, MeterPart, OuterSpinButtonPart, ProgressBarPart, ProgressBarValuePart,
SliderHorizontalPart, SliderVerticalPart, SliderThumbHorizontalPart,
SliderThumbVerticalPart, CaretPart, SearchFieldPart, SearchFieldDecorationPart,
diff --git a/WebCore/platform/TreeShared.h b/WebCore/platform/TreeShared.h
index 6e60656..9d9ac1f 100644
--- a/WebCore/platform/TreeShared.h
+++ b/WebCore/platform/TreeShared.h
@@ -34,11 +34,11 @@ template<typename T> void adopted(TreeShared<T>*);
template<typename T> class TreeShared : public Noncopyable {
public:
- TreeShared(int initialRefCount = 1)
- : m_refCount(initialRefCount)
+ TreeShared()
+ : m_refCount(1)
, m_parent(0)
#ifndef NDEBUG
- , m_adoptionIsRequired(initialRefCount == 1)
+ , m_adoptionIsRequired(true)
#endif
{
ASSERT(isMainThread());
diff --git a/WebCore/platform/audio/Cone.cpp b/WebCore/platform/audio/Cone.cpp
new file mode 100644
index 0000000..91813ab
--- /dev/null
+++ b/WebCore/platform/audio/Cone.cpp
@@ -0,0 +1,84 @@
+/*
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "Cone.h"
+
+namespace WebCore {
+
+ConeEffect::ConeEffect()
+ : m_innerAngle(360.0)
+ , m_outerAngle(360.0)
+ , m_outerGain(0.0)
+{
+}
+
+double ConeEffect::gain(Vector3 sourcePosition, Vector3 sourceOrientation, Vector3 listenerPosition)
+{
+ if (sourceOrientation.isZero() || ((m_innerAngle == 360.0) && (m_outerAngle == 360.0)))
+ return 1.0; // no cone specified - unity gain
+
+ // Normalized source-listener vector
+ Vector3 sourceToListener = listenerPosition - sourcePosition;
+ sourceToListener.normalize();
+
+ Vector3 normalizedSourceOrientation = sourceOrientation;
+ normalizedSourceOrientation.normalize();
+
+ // Angle between the source orientation vector and the source-listener vector
+ double dotProduct = dot(sourceToListener, normalizedSourceOrientation);
+ double angle = 180.0 * acos(dotProduct) / M_PI;
+ double absAngle = fabs(angle);
+
+ // Divide by 2.0 here since API is entire angle (not half-angle)
+ double absInnerAngle = fabs(m_innerAngle) / 2.0;
+ double absOuterAngle = fabs(m_outerAngle) / 2.0;
+ double gain = 1.0;
+
+ if (absAngle <= absInnerAngle)
+ // No attenuation
+ gain = 1.0;
+ else if (absAngle >= absOuterAngle)
+ // Max attenuation
+ gain = m_outerGain;
+ else {
+ // Between inner and outer cones
+ // inner -> outer, x goes from 0 -> 1
+ double x = (absAngle - absInnerAngle) / (absOuterAngle - absInnerAngle);
+ gain = (1.0 - x) + m_outerGain * x;
+ }
+
+ return gain;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/Cone.h b/WebCore/platform/audio/Cone.h
new file mode 100644
index 0000000..9936f28
--- /dev/null
+++ b/WebCore/platform/audio/Cone.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:
+ *
+ * 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.
+ */
+
+#ifndef Cone_h
+#define Cone_h
+
+#include <wtf/Vector3.h>
+
+namespace WebCore {
+
+// Cone gain is defined according to the OpenAL specification
+
+class ConeEffect {
+public:
+ ConeEffect();
+
+ // Returns scalar gain for the given source/listener positions/orientations
+ double gain(Vector3 sourcePosition, Vector3 sourceOrientation, Vector3 listenerPosition);
+
+ // Angles in degrees
+ void setInnerAngle(double innerAngle) { m_innerAngle = innerAngle; }
+ double innerAngle() const { return m_innerAngle; }
+
+ void setOuterAngle(double outerAngle) { m_outerAngle = outerAngle; }
+ double outerAngle() const { return m_outerAngle; }
+
+ void setOuterGain(double outerGain) { m_outerGain = outerGain; }
+ double outerGain() const { return m_outerGain; }
+
+protected:
+ double m_innerAngle;
+ double m_outerAngle;
+ double m_outerGain;
+};
+
+} // namespace WebCore
+
+#endif // Cone_h
diff --git a/WebCore/platform/audio/FFTConvolver.cpp b/WebCore/platform/audio/FFTConvolver.cpp
new file mode 100644
index 0000000..b0211fd
--- /dev/null
+++ b/WebCore/platform/audio/FFTConvolver.cpp
@@ -0,0 +1,108 @@
+/*
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "FFTConvolver.h"
+
+#include "Accelerate.h"
+
+namespace WebCore {
+
+FFTConvolver::FFTConvolver(size_t fftSize)
+ : m_frame(fftSize)
+ , m_readWriteIndex(0)
+ , m_inputBuffer(fftSize) // 2nd half of buffer is always zeroed
+ , m_outputBuffer(fftSize)
+ , m_lastOverlapBuffer(fftSize / 2)
+{
+}
+
+void FFTConvolver::process(FFTFrame* fftKernel, float* sourceP, float* destP, size_t framesToProcess)
+{
+ // FIXME: make so framesToProcess is not required to fit evenly into fftSize/2
+
+ // Copy samples to input buffer (note contraint above!)
+ float* inputP = m_inputBuffer.data();
+
+ // Sanity check
+ bool isCopyGood1 = sourceP && inputP && m_readWriteIndex + framesToProcess <= m_inputBuffer.size();
+ ASSERT(isCopyGood1);
+ if (!isCopyGood1)
+ return;
+
+ memcpy(inputP + m_readWriteIndex, sourceP, sizeof(float) * framesToProcess);
+
+ // Copy samples from output buffer
+ float* outputP = m_outputBuffer.data();
+
+ // Sanity check
+ bool isCopyGood2 = destP && outputP && m_readWriteIndex + framesToProcess <= m_outputBuffer.size();
+ ASSERT(isCopyGood2);
+ if (!isCopyGood2)
+ return;
+
+ memcpy(destP, outputP + m_readWriteIndex, sizeof(float) * framesToProcess);
+ m_readWriteIndex += framesToProcess;
+
+
+ // Check if it's time to perform the next FFT
+ size_t halfSize = fftSize() / 2;
+ if (m_readWriteIndex == halfSize) {
+ // The input buffer is now filled (get frequency-domain version)
+ m_frame.doFFT(m_inputBuffer.data());
+ m_frame.multiply(*fftKernel);
+ m_frame.doInverseFFT(m_outputBuffer.data());
+
+ // Overlap-add 1st half from previous time
+ vadd(m_outputBuffer.data(), 1, m_lastOverlapBuffer.data(), 1, m_outputBuffer.data(), 1, halfSize);
+
+ // Finally, save 2nd half of result
+ bool isCopyGood3 = m_outputBuffer.size() == 2 * halfSize && m_lastOverlapBuffer.size() == halfSize;
+ ASSERT(isCopyGood3);
+ if (!isCopyGood3)
+ return;
+
+ memcpy(m_lastOverlapBuffer.data(), m_outputBuffer.data() + halfSize, sizeof(float) * halfSize);
+
+ // Reset index back to start for next time
+ m_readWriteIndex = 0;
+ }
+}
+
+void FFTConvolver::reset()
+{
+ m_lastOverlapBuffer.zero();
+ m_readWriteIndex = 0;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/FFTConvolver.h b/WebCore/platform/audio/FFTConvolver.h
new file mode 100644
index 0000000..0eec7c1
--- /dev/null
+++ b/WebCore/platform/audio/FFTConvolver.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:
+ *
+ * 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.
+ */
+
+#ifndef FFTConvolver_h
+#define FFTConvolver_h
+
+#include "AudioFloatArray.h"
+#include "FFTFrame.h"
+
+namespace WebCore {
+
+class FFTConvolver {
+public:
+ // fftSize must be a power of two
+ FFTConvolver(size_t fftSize);
+
+ // For now, with multiple calls to Process(), framesToProcess MUST add up EXACTLY to fftSize / 2
+ //
+ // FIXME: Later, we can do more sophisticated buffering to relax this requirement...
+ //
+ // The input to output latency is equal to fftSize / 2
+ //
+ // Processing in-place is allowed...
+ void process(FFTFrame* fftKernel, float* sourceP, float* destP, size_t framesToProcess);
+
+ void reset();
+
+ size_t fftSize() const { return m_frame.fftSize(); }
+
+private:
+ FFTFrame m_frame;
+
+ // Buffer input until we get fftSize / 2 samples then do an FFT
+ size_t m_readWriteIndex;
+ AudioFloatArray m_inputBuffer;
+
+ // Stores output which we read a little at a time
+ AudioFloatArray m_outputBuffer;
+
+ // Saves the 2nd half of the FFT buffer, so we can do an overlap-add with the 1st half of the next one
+ AudioFloatArray m_lastOverlapBuffer;
+};
+
+} // namespace WebCore
+
+#endif // FFTConvolver_h
diff --git a/WebCore/platform/audio/Reverb.cpp b/WebCore/platform/audio/Reverb.cpp
new file mode 100644
index 0000000..886a553
--- /dev/null
+++ b/WebCore/platform/audio/Reverb.cpp
@@ -0,0 +1,227 @@
+/*
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "Reverb.h"
+
+#include "AudioBus.h"
+#include "AudioFileReader.h"
+#include "ReverbConvolver.h"
+#include <math.h>
+#include <wtf/MathExtras.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+#if OS(DARWIN)
+using namespace std;
+#endif
+
+namespace WebCore {
+
+// Empirical gain calibration tested across many impulse responses to ensure perceived volume is same as dry (unprocessed) signal
+const double GainCalibration = -58.0;
+
+// A minimum power value to when normalizing a silent (or very quiet) impulse response
+const double MinPower = 0.000125;
+
+static double calculateNormalizationScale(AudioBus* response)
+{
+ // Normalize by RMS power
+ size_t numberOfChannels = response->numberOfChannels();
+ size_t frameSize = response->frameSize();
+
+ double power = 0.0;
+
+ for (size_t i = 0; i < numberOfChannels; ++i) {
+ int n = frameSize;
+ float* p = response->channel(i)->data();
+
+ while (n--) {
+ float sample = *p++;
+ power += sample * sample;
+ }
+ }
+
+ power = sqrt(power / (numberOfChannels * frameSize));
+
+ // Protect against accidental overload
+ if (isinf(power) || isnan(power) || power < MinPower)
+ power = MinPower;
+
+ double scale = 1.0 / power;
+
+ scale *= pow(10.0, GainCalibration * 0.05); // calibrate to make perceived volume same as unprocessed
+
+ // True-stereo compensation
+ if (response->numberOfChannels() == 4)
+ scale *= 0.5;
+
+ return scale;
+}
+
+Reverb::Reverb(AudioBus* impulseResponse, size_t renderSliceSize, size_t maxFFTSize, size_t numberOfChannels, bool useBackgroundThreads)
+{
+ double scale = calculateNormalizationScale(impulseResponse);
+ if (scale)
+ impulseResponse->scale(scale);
+
+ initialize(impulseResponse, renderSliceSize, maxFFTSize, numberOfChannels, useBackgroundThreads);
+
+ // Undo scaling since this shouldn't be a destructive operation on impulseResponse
+ if (scale)
+ impulseResponse->scale(1.0 / scale);
+}
+
+void Reverb::initialize(AudioBus* impulseResponseBuffer, size_t renderSliceSize, size_t maxFFTSize, size_t numberOfChannels, bool useBackgroundThreads)
+{
+ m_impulseResponseLength = impulseResponseBuffer->frameSize();
+
+ // The reverb can handle a mono impulse response and still do stereo processing
+ size_t numResponseChannels = impulseResponseBuffer->numberOfChannels();
+ m_convolvers.reserveCapacity(numberOfChannels);
+
+ int convolverRenderPhase = 0;
+ for (size_t i = 0; i < numResponseChannels; ++i) {
+ AudioChannel* channel = impulseResponseBuffer->channel(i);
+
+ ReverbConvolver* convolver = new ReverbConvolver(channel, renderSliceSize, maxFFTSize, convolverRenderPhase, useBackgroundThreads);
+ m_convolvers.append(convolver);
+
+ convolverRenderPhase += renderSliceSize;
+ }
+
+ // For "True" stereo processing we allocate a temporary buffer to avoid repeatedly allocating it in the process() method.
+ // It can be bad to allocate memory in a real-time thread.
+ if (numResponseChannels == 4)
+ m_tempBuffer = new AudioBus(2, MaxFrameSize);
+}
+
+void Reverb::process(AudioBus* sourceBus, AudioBus* destinationBus, size_t framesToProcess)
+{
+ // Do a fairly comprehensive sanity check.
+ // If these conditions are satisfied, all of the source and destination pointers will be valid for the various matrixing cases.
+ bool isSafeToProcess = sourceBus && destinationBus && sourceBus->numberOfChannels() > 0 && destinationBus->numberOfChannels() > 0
+ && framesToProcess <= MaxFrameSize && framesToProcess <= sourceBus->frameSize() && framesToProcess <= destinationBus->frameSize();
+
+ ASSERT(isSafeToProcess);
+ if (!isSafeToProcess)
+ return;
+
+ // For now only handle mono or stereo output
+ if (destinationBus->numberOfChannels() > 2) {
+ destinationBus->zero();
+ return;
+ }
+
+ AudioChannel* destinationChannelL = destinationBus->channel(0);
+ AudioChannel* sourceChannelL = sourceBus->channel(0);
+
+ // Handle input -> output matrixing...
+ size_t numInputChannels = sourceBus->numberOfChannels();
+ size_t numOutputChannels = destinationBus->numberOfChannels();
+ size_t numReverbChannels = m_convolvers.size();
+
+ if (numInputChannels == 2 && numReverbChannels == 2 && numOutputChannels == 2) {
+ // 2 -> 2 -> 2
+ AudioChannel* sourceChannelR = sourceBus->channel(1);
+ AudioChannel* destinationChannelR = destinationBus->channel(1);
+ m_convolvers[0]->process(sourceChannelL, destinationChannelL, framesToProcess);
+ m_convolvers[1]->process(sourceChannelR, destinationChannelR, framesToProcess);
+ } else if (numInputChannels == 1 && numOutputChannels == 2 && numReverbChannels == 2) {
+ // 1 -> 2 -> 2
+ for (int i = 0; i < 2; ++i) {
+ AudioChannel* destinationChannel = destinationBus->channel(i);
+ m_convolvers[i]->process(sourceChannelL, destinationChannel, framesToProcess);
+ }
+ } else if (numInputChannels == 1 && numReverbChannels == 1 && numOutputChannels == 2) {
+ // 1 -> 1 -> 2
+ m_convolvers[0]->process(sourceChannelL, destinationChannelL, framesToProcess);
+
+ // simply copy L -> R
+ AudioChannel* destinationChannelR = destinationBus->channel(1);
+ bool isCopySafe = destinationChannelL->data() && destinationChannelR->data() && destinationChannelL->frameSize() >= framesToProcess && destinationChannelR->frameSize() >= framesToProcess;
+ ASSERT(isCopySafe);
+ if (!isCopySafe)
+ return;
+ memcpy(destinationChannelR->data(), destinationChannelL->data(), sizeof(float) * framesToProcess);
+ } else if (numInputChannels == 1 && numReverbChannels == 1 && numOutputChannels == 1) {
+ // 1 -> 1 -> 1
+ m_convolvers[0]->process(sourceChannelL, destinationChannelL, framesToProcess);
+ } else if (numInputChannels == 2 && numReverbChannels == 4 && numOutputChannels == 2) {
+ // 2 -> 4 -> 2 ("True" stereo)
+ AudioChannel* sourceChannelR = sourceBus->channel(1);
+ AudioChannel* destinationChannelR = destinationBus->channel(1);
+
+ AudioChannel* tempChannelL = m_tempBuffer->channel(0);
+ AudioChannel* tempChannelR = m_tempBuffer->channel(1);
+
+ // Process left virtual source
+ m_convolvers[0]->process(sourceChannelL, destinationChannelL, framesToProcess);
+ m_convolvers[1]->process(sourceChannelL, destinationChannelR, framesToProcess);
+
+ // Process right virtual source
+ m_convolvers[2]->process(sourceChannelR, tempChannelL, framesToProcess);
+ m_convolvers[3]->process(sourceChannelR, tempChannelR, framesToProcess);
+
+ destinationBus->sumFrom(*m_tempBuffer);
+ } else if (numInputChannels == 1 && numReverbChannels == 4 && numOutputChannels == 2) {
+ // 1 -> 4 -> 2 (Processing mono with "True" stereo impulse response)
+ // This is an inefficient use of a four-channel impulse response, but we should handle the case.
+ AudioChannel* destinationChannelR = destinationBus->channel(1);
+
+ AudioChannel* tempChannelL = m_tempBuffer->channel(0);
+ AudioChannel* tempChannelR = m_tempBuffer->channel(1);
+
+ // Process left virtual source
+ m_convolvers[0]->process(sourceChannelL, destinationChannelL, framesToProcess);
+ m_convolvers[1]->process(sourceChannelL, destinationChannelR, framesToProcess);
+
+ // Process right virtual source
+ m_convolvers[2]->process(sourceChannelL, tempChannelL, framesToProcess);
+ m_convolvers[3]->process(sourceChannelL, tempChannelR, framesToProcess);
+
+ destinationBus->sumFrom(*m_tempBuffer);
+ } else {
+ // Handle gracefully any unexpected / unsupported matrixing
+ // FIXME: add code for 5.1 support...
+ destinationBus->zero();
+ }
+}
+
+void Reverb::reset()
+{
+ for (size_t i = 0; i < m_convolvers.size(); ++i)
+ m_convolvers[i]->reset();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/Reverb.h b/WebCore/platform/audio/Reverb.h
new file mode 100644
index 0000000..26f5f8e
--- /dev/null
+++ b/WebCore/platform/audio/Reverb.h
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+#ifndef Reverb_h
+#define Reverb_h
+
+#include "ReverbConvolver.h"
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class AudioBus;
+
+// Multi-channel convolution reverb with channel matrixing - one or more ReverbConvolver objects are used internally.
+
+class Reverb {
+public:
+ enum { MaxFrameSize = 256 };
+
+ // renderSliceSize is a rendering hint, so the FFTs can be optimized to not all occur at the same time (very bad when rendering on a real-time thread).
+ Reverb(AudioBus* impulseResponseBuffer, size_t renderSliceSize, size_t maxFFTSize, size_t numberOfChannels, bool useBackgroundThreads);
+
+ void process(AudioBus* sourceBus, AudioBus* destinationBus, size_t framesToProcess);
+ void reset();
+
+ unsigned impulseResponseLength() const { return m_impulseResponseLength; }
+
+private:
+ void initialize(AudioBus* impulseResponseBuffer, size_t renderSliceSize, size_t maxFFTSize, size_t numberOfChannels, bool useBackgroundThreads);
+
+ size_t m_impulseResponseLength;
+
+ Vector<OwnPtr<ReverbConvolver> > m_convolvers;
+
+ // For "True" stereo processing
+ OwnPtr<AudioBus> m_tempBuffer;
+};
+
+} // namespace WebCore
+
+#endif // Reverb_h
diff --git a/WebCore/platform/audio/ReverbAccumulationBuffer.cpp b/WebCore/platform/audio/ReverbAccumulationBuffer.cpp
new file mode 100644
index 0000000..7b1c63b
--- /dev/null
+++ b/WebCore/platform/audio/ReverbAccumulationBuffer.cpp
@@ -0,0 +1,117 @@
+/*
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "ReverbAccumulationBuffer.h"
+
+#include "Accelerate.h"
+
+namespace WebCore {
+
+ReverbAccumulationBuffer::ReverbAccumulationBuffer(size_t length)
+ : m_buffer(length)
+ , m_readIndex(0)
+ , m_readTimeFrame(0)
+{
+}
+
+void ReverbAccumulationBuffer::readAndClear(float* destination, size_t numberOfFrames)
+{
+ size_t bufferLength = m_buffer.size();
+ bool isCopySafe = m_readIndex <= bufferLength && numberOfFrames <= bufferLength;
+
+ ASSERT(isCopySafe);
+ if (!isCopySafe)
+ return;
+
+ size_t framesAvailable = bufferLength - m_readIndex;
+ size_t numberOfFrames1 = std::min(numberOfFrames, framesAvailable);
+ size_t numberOfFrames2 = numberOfFrames - numberOfFrames1;
+
+ float* source = m_buffer.data();
+ memcpy(destination, source + m_readIndex, sizeof(float) * numberOfFrames1);
+ memset(source + m_readIndex, 0, sizeof(float) * numberOfFrames1);
+
+ // Handle wrap-around if necessary
+ if (numberOfFrames2 > 0) {
+ memcpy(destination + numberOfFrames1, source, sizeof(float) * numberOfFrames2);
+ memset(source, 0, sizeof(float) * numberOfFrames2);
+ }
+
+ m_readIndex = (m_readIndex + numberOfFrames) % bufferLength;
+ m_readTimeFrame += numberOfFrames;
+}
+
+void ReverbAccumulationBuffer::updateReadIndex(int* readIndex, size_t numberOfFrames) const
+{
+ // Update caller's readIndex
+ *readIndex = (*readIndex + numberOfFrames) % m_buffer.size();
+}
+
+int ReverbAccumulationBuffer::accumulate(float* source, size_t numberOfFrames, int* readIndex, size_t delayFrames)
+{
+ size_t bufferLength = m_buffer.size();
+
+ size_t writeIndex = (*readIndex + delayFrames) % bufferLength;
+
+ // Update caller's readIndex
+ *readIndex = (*readIndex + numberOfFrames) % bufferLength;
+
+ size_t framesAvailable = bufferLength - writeIndex;
+ size_t numberOfFrames1 = std::min(numberOfFrames, framesAvailable);
+ size_t numberOfFrames2 = numberOfFrames - numberOfFrames1;
+
+ float* destination = m_buffer.data();
+
+ bool isSafe = writeIndex <= bufferLength && numberOfFrames1 + writeIndex <= bufferLength && numberOfFrames2 <= bufferLength;
+ ASSERT(isSafe);
+ if (!isSafe)
+ return 0;
+
+ vadd(source, 1, destination + writeIndex, 1, destination + writeIndex, 1, numberOfFrames1);
+
+ // Handle wrap-around if necessary
+ if (numberOfFrames2 > 0)
+ vadd(source + numberOfFrames1, 1, destination, 1, destination, 1, numberOfFrames2);
+
+ return writeIndex;
+}
+
+void ReverbAccumulationBuffer::reset()
+{
+ m_buffer.zero();
+ m_readIndex = 0;
+ m_readTimeFrame = 0;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/ReverbAccumulationBuffer.h b/WebCore/platform/audio/ReverbAccumulationBuffer.h
new file mode 100644
index 0000000..44a0773
--- /dev/null
+++ b/WebCore/platform/audio/ReverbAccumulationBuffer.h
@@ -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:
+ *
+ * 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.
+ */
+
+#ifndef ReverbAccumulationBuffer_h
+#define ReverbAccumulationBuffer_h
+
+#include "AudioFloatArray.h"
+
+namespace WebCore {
+
+// ReverbAccumulationBuffer is a circular delay buffer with one client reading from it and multiple clients
+// writing/accumulating to it at different delay offsets from the read position. The read operation will zero the memory
+// just read from the buffer, so it will be ready for accumulation the next time around.
+class ReverbAccumulationBuffer {
+public:
+ ReverbAccumulationBuffer(size_t length);
+
+ // This will read from, then clear-out numberOfFrames
+ void readAndClear(float* destination, size_t numberOfFrames);
+
+ // Each ReverbConvolverStage will accumulate its output at the appropriate delay from the read position.
+ // We need to pass in and update readIndex here, since each ReverbConvolverStage may be running in
+ // a different thread than the realtime thread calling ReadAndClear() and maintaining m_readIndex
+ // Returns the writeIndex where the accumulation took place
+ int accumulate(float* source, size_t numberOfFrames, int* readIndex, size_t delayFrames);
+
+ size_t readIndex() const { return m_readIndex; }
+ void updateReadIndex(int* readIndex, size_t numberOfFrames) const;
+
+ size_t readTimeFrame() const { return m_readTimeFrame; }
+
+ void reset();
+
+private:
+ AudioFloatArray m_buffer;
+ size_t m_readIndex;
+ size_t m_readTimeFrame; // for debugging (frame on continuous timeline)
+};
+
+} // namespace WebCore
+
+#endif // ReverbAccumulationBuffer_h
diff --git a/WebCore/platform/audio/ReverbConvolver.cpp b/WebCore/platform/audio/ReverbConvolver.cpp
new file mode 100644
index 0000000..719e586
--- /dev/null
+++ b/WebCore/platform/audio/ReverbConvolver.cpp
@@ -0,0 +1,228 @@
+/*
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "ReverbConvolver.h"
+
+#include "Accelerate.h"
+#include "AudioBus.h"
+
+namespace WebCore {
+
+const int InputBufferSize = 8 * 16384;
+
+// We only process the leading portion of the impulse response in the real-time thread. We don't exceed this length.
+// It turns out then, that the background thread has about 278msec of scheduling slop.
+// Empirically, this has been found to be a good compromise between giving enough time for scheduling slop,
+// while still minimizing the amount of processing done in the primary (high-priority) thread.
+// This was found to be a good value on Mac OS X, and may work well on other platforms as well, assuming
+// the very rough scheduling latencies are similar on these time-scales. Of course, this code may need to be
+// tuned for individual platforms if this assumption is found to be incorrect.
+const size_t RealtimeFrameLimit = 8192 + 4096; // ~278msec @ 44.1KHz
+
+const size_t MinFFTSize = 256;
+const size_t MaxRealtimeFFTSize = 2048;
+
+static void* backgroundThreadEntry(void* threadData)
+{
+ ReverbConvolver* reverbConvolver = static_cast<ReverbConvolver*>(threadData);
+ reverbConvolver->backgroundThreadEntry();
+ return 0;
+}
+
+ReverbConvolver::ReverbConvolver(AudioChannel* impulseResponse, size_t renderSliceSize, size_t maxFFTSize, size_t convolverRenderPhase, bool useBackgroundThreads)
+ : m_impulseResponseLength(impulseResponse->frameSize())
+ , m_accumulationBuffer(impulseResponse->frameSize() + renderSliceSize)
+ , m_inputBuffer(InputBufferSize)
+ , m_renderSliceSize(renderSliceSize)
+ , m_minFFTSize(MinFFTSize) // First stage will have this size - successive stages will double in size each time
+ , m_maxFFTSize(maxFFTSize) // until we hit m_maxFFTSize
+ , m_useBackgroundThreads(useBackgroundThreads)
+ , m_backgroundThread(0)
+ , m_wantsToExit(false)
+ , m_moreInputBuffered(false)
+{
+ // If we are using background threads then don't exceed this FFT size for the
+ // stages which run in the real-time thread. This avoids having only one or two
+ // large stages (size 16384 or so) at the end which take a lot of time every several
+ // processing slices. This way we amortize the cost over more processing slices.
+ m_maxRealtimeFFTSize = MaxRealtimeFFTSize;
+
+ // For the moment, a good way to know if we have real-time constraint is to check if we're using background threads.
+ // Otherwise, assume we're being run from a command-line tool.
+ bool hasRealtimeConstraint = useBackgroundThreads;
+
+ float* response = impulseResponse->data();
+ size_t totalResponseLength = impulseResponse->frameSize();
+
+ // Because we're not using direct-convolution in the leading portion, the reverb has an overall latency of half the first-stage FFT size
+ size_t reverbTotalLatency = m_minFFTSize / 2;
+
+ size_t stageOffset = 0;
+ int i = 0;
+ size_t fftSize = m_minFFTSize;
+ while (stageOffset < totalResponseLength) {
+ size_t stageSize = fftSize / 2;
+
+ // For the last stage, it's possible that stageOffset is such that we're straddling the end
+ // of the impulse response buffer (if we use stageSize), so reduce the last stage's length...
+ if (stageSize + stageOffset > totalResponseLength)
+ stageSize = totalResponseLength - stageOffset;
+
+ // This "staggers" the time when each FFT happens so they don't all happen at the same time
+ int renderPhase = convolverRenderPhase + i * renderSliceSize;
+
+ OwnPtr<ReverbConvolverStage> stage(new ReverbConvolverStage(response, totalResponseLength, reverbTotalLatency, stageOffset, stageSize, fftSize, renderPhase, renderSliceSize, &m_accumulationBuffer));
+
+ bool isBackgroundStage = false;
+
+ if (this->useBackgroundThreads() && stageOffset > RealtimeFrameLimit) {
+ m_backgroundStages.append(stage.release());
+ isBackgroundStage = true;
+ } else
+ m_stages.append(stage.release());
+
+ stageOffset += stageSize;
+ ++i;
+
+ // Figure out next FFT size
+ fftSize *= 2;
+ if (hasRealtimeConstraint && !isBackgroundStage && fftSize > m_maxRealtimeFFTSize)
+ fftSize = m_maxRealtimeFFTSize;
+ if (fftSize > m_maxFFTSize)
+ fftSize = m_maxFFTSize;
+ }
+
+ // Start up background thread
+ // FIXME: would be better to up the thread priority here. It doesn't need to be real-time, but higher than the default...
+ if (this->useBackgroundThreads() && m_backgroundStages.size() > 0)
+ m_backgroundThread = createThread(WebCore::backgroundThreadEntry, this, "convolution background thread");
+}
+
+ReverbConvolver::~ReverbConvolver()
+{
+ // Wait for background thread to stop
+ if (useBackgroundThreads() && m_backgroundThread) {
+ m_wantsToExit = true;
+
+ // Wake up thread so it can return
+ {
+ MutexLocker locker(m_backgroundThreadLock);
+ m_moreInputBuffered = true;
+ m_backgroundThreadCondition.signal();
+ }
+
+ waitForThreadCompletion(m_backgroundThread, 0);
+ }
+}
+
+void ReverbConvolver::backgroundThreadEntry()
+{
+ while (!m_wantsToExit) {
+ // Wait for realtime thread to give us more input
+ m_moreInputBuffered = false;
+ {
+ MutexLocker locker(m_backgroundThreadLock);
+ while (!m_moreInputBuffered && !m_wantsToExit)
+ m_backgroundThreadCondition.wait(m_backgroundThreadLock);
+ }
+
+ // Process all of the stages until their read indices reach the input buffer's write index
+ int writeIndex = m_inputBuffer.writeIndex();
+
+ // Even though it doesn't seem like every stage needs to maintain its own version of readIndex
+ // we do this in case we want to run in more than one background thread.
+ int readIndex;
+
+ while ((readIndex = m_backgroundStages[0]->inputReadIndex()) != writeIndex) { // FIXME: do better to detect buffer overrun...
+ // The ReverbConvolverStages need to process in amounts which evenly divide half the FFT size
+ const int SliceSize = MinFFTSize / 2;
+
+ // Accumulate contributions from each stage
+ for (size_t i = 0; i < m_backgroundStages.size(); ++i)
+ m_backgroundStages[i]->processInBackground(this, SliceSize);
+ }
+ }
+}
+
+void ReverbConvolver::process(AudioChannel* sourceChannel, AudioChannel* destinationChannel, size_t framesToProcess)
+{
+ bool isSafe = sourceChannel && destinationChannel && sourceChannel->frameSize() >= framesToProcess && destinationChannel->frameSize() >= framesToProcess;
+ ASSERT(isSafe);
+ if (!isSafe)
+ return;
+
+ float* source = sourceChannel->data();
+ float* destination = destinationChannel->data();
+ bool isDataSafe = source && destination;
+ ASSERT(isDataSafe);
+ if (!isDataSafe)
+ return;
+
+ // Feed input buffer (read by all threads)
+ m_inputBuffer.write(source, framesToProcess);
+
+ // Accumulate contributions from each stage
+ for (size_t i = 0; i < m_stages.size(); ++i)
+ m_stages[i]->process(source, framesToProcess);
+
+ // Finally read from accumulation buffer
+ m_accumulationBuffer.readAndClear(destination, framesToProcess);
+
+ // Now that we've buffered more input, wake up our background thread.
+
+ // Not using a MutexLocker looks strange, but we use a tryLock() instead because this is run on the real-time
+ // thread where it is a disaster for the lock to be contended (causes audio glitching). It's OK if we fail to
+ // signal from time to time, since we'll get to it the next time we're called. We're called repeatedly
+ // and frequently (around every 3ms). The background thread is processing well into the future and has a considerable amount of
+ // leeway here...
+ if (m_backgroundThreadLock.tryLock()) {
+ m_moreInputBuffered = true;
+ m_backgroundThreadCondition.signal();
+ m_backgroundThreadLock.unlock();
+ }
+}
+
+void ReverbConvolver::reset()
+{
+ for (size_t i = 0; i < m_stages.size(); ++i)
+ m_stages[i]->reset();
+
+ for (size_t i = 0; i < m_backgroundStages.size(); ++i)
+ m_backgroundStages[i]->reset();
+
+ m_accumulationBuffer.reset();
+ m_inputBuffer.reset();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/ReverbConvolver.h b/WebCore/platform/audio/ReverbConvolver.h
new file mode 100644
index 0000000..34f77d3
--- /dev/null
+++ b/WebCore/platform/audio/ReverbConvolver.h
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+#ifndef ReverbConvolver_h
+#define ReverbConvolver_h
+
+#include "AudioFloatArray.h"
+#include "FFTConvolver.h"
+#include "ReverbAccumulationBuffer.h"
+#include "ReverbConvolverStage.h"
+#include "ReverbInputBuffer.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/Threading.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class AudioChannel;
+
+class ReverbConvolver {
+public:
+ // maxFFTSize can be adjusted (from say 2048 to 32768) depending on how much precision is necessary.
+ // For certain tweaky de-convolving applications the phase errors add up quickly and lead to non-sensical results with
+ // larger FFT sizes and single-precision floats. In these cases 2048 is a good size.
+ // If not doing multi-threaded convolution, then should not go > 8192.
+ ReverbConvolver(AudioChannel* impulseResponse, size_t renderSliceSize, size_t maxFFTSize, size_t convolverRenderPhase, bool useBackgroundThreads);
+ ~ReverbConvolver();
+
+ void process(AudioChannel* sourceChannel, AudioChannel* destinationChannel, size_t framesToProcess);
+ void reset();
+
+ size_t impulseResponseLength() const { return m_impulseResponseLength; }
+
+ ReverbInputBuffer* inputBuffer() { return &m_inputBuffer; }
+
+ bool useBackgroundThreads() const { return m_useBackgroundThreads; }
+ void backgroundThreadEntry();
+
+private:
+ Vector<OwnPtr<ReverbConvolverStage> > m_stages;
+ Vector<OwnPtr<ReverbConvolverStage> > m_backgroundStages;
+ size_t m_impulseResponseLength;
+
+ ReverbAccumulationBuffer m_accumulationBuffer;
+
+ // One or more background threads read from this input buffer which is fed from the realtime thread.
+ ReverbInputBuffer m_inputBuffer;
+
+ // We're given a rendering hint, so the FFTs can be optimized to not all occur at the same time
+ // (very bad when rendering on a real-time thread).
+ size_t m_renderSliceSize;
+
+ // First stage will be of size m_minFFTSize. Each next stage will be twice as big until we hit m_maxFFTSize.
+ size_t m_minFFTSize;
+ size_t m_maxFFTSize;
+
+ // But don't exceed this size in the real-time thread (if we're doing background processing).
+ size_t m_maxRealtimeFFTSize;
+
+ // Background thread and synchronization
+ bool m_useBackgroundThreads;
+ ThreadIdentifier m_backgroundThread;
+ bool m_wantsToExit;
+ bool m_moreInputBuffered;
+ mutable Mutex m_backgroundThreadLock;
+ mutable ThreadCondition m_backgroundThreadCondition;
+};
+
+} // namespace WebCore
+
+#endif // ReverbConvolver_h
diff --git a/WebCore/platform/audio/ReverbConvolverStage.cpp b/WebCore/platform/audio/ReverbConvolverStage.cpp
new file mode 100644
index 0000000..8606502
--- /dev/null
+++ b/WebCore/platform/audio/ReverbConvolverStage.cpp
@@ -0,0 +1,163 @@
+/*
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "ReverbConvolverStage.h"
+
+#include "Accelerate.h"
+#include "ReverbAccumulationBuffer.h"
+#include "ReverbConvolver.h"
+#include "ReverbInputBuffer.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+ReverbConvolverStage::ReverbConvolverStage(float* impulseResponse, size_t responseLength, size_t reverbTotalLatency, size_t stageOffset, size_t stageLength,
+ size_t fftSize, size_t renderPhase, size_t renderSliceSize, ReverbAccumulationBuffer* accumulationBuffer)
+ : m_fftKernel(fftSize)
+ , m_accumulationBuffer(accumulationBuffer)
+ , m_accumulationReadIndex(0)
+ , m_inputReadIndex(0)
+ , m_impulseResponseLength(responseLength)
+{
+ ASSERT(impulseResponse);
+ ASSERT(accumulationBuffer);
+
+ m_fftKernel.doPaddedFFT(impulseResponse + stageOffset, stageLength);
+ m_convolver = new FFTConvolver(fftSize);
+ m_temporaryBuffer.allocate(renderSliceSize);
+
+ // The convolution stage at offset stageOffset needs to have a corresponding delay to cancel out the offset.
+ size_t totalDelay = stageOffset + reverbTotalLatency;
+
+ // But, the FFT convolution itself incurs fftSize / 2 latency, so subtract this out...
+ size_t halfSize = fftSize / 2;
+ ASSERT(totalDelay >= halfSize);
+ if (totalDelay >= halfSize)
+ totalDelay -= halfSize;
+
+ // We divide up the total delay, into pre and post delay sections so that we can schedule at exactly the moment when the FFT will happen.
+ // This is coordinated with the other stages, so they don't all do their FFTs at the same time...
+ int maxPreDelayLength = std::min(halfSize, totalDelay);
+ m_preDelayLength = totalDelay > 0 ? renderPhase % maxPreDelayLength : 0;
+ if (m_preDelayLength > totalDelay)
+ m_preDelayLength = 0;
+
+ m_postDelayLength = totalDelay - m_preDelayLength;
+ m_preReadWriteIndex = 0;
+ m_framesProcessed = 0; // total frames processed so far
+
+ m_preDelayBuffer.allocate(m_preDelayLength < fftSize ? fftSize : m_preDelayLength);
+}
+
+void ReverbConvolverStage::processInBackground(ReverbConvolver* convolver, size_t framesToProcess)
+{
+ ReverbInputBuffer* inputBuffer = convolver->inputBuffer();
+ float* source = inputBuffer->directReadFrom(&m_inputReadIndex, framesToProcess);
+ process(source, framesToProcess);
+}
+
+void ReverbConvolverStage::process(float* source, size_t framesToProcess)
+{
+ ASSERT(source);
+ if (!source)
+ return;
+
+ // Deal with pre-delay stream : note special handling of zero delay.
+
+ float* preDelayedSource;
+ float* temporaryBuffer;
+ bool isTemporaryBufferSafe = false;
+ if (m_preDelayLength > 0) {
+ // Handles both the read case (call to process() ) and the write case (memcpy() )
+ bool isPreDelaySafe = m_preReadWriteIndex + framesToProcess <= m_preDelayBuffer.size();
+ ASSERT(isPreDelaySafe);
+ if (!isPreDelaySafe)
+ return;
+
+ isTemporaryBufferSafe = framesToProcess <= m_temporaryBuffer.size();
+
+ preDelayedSource = m_preDelayBuffer.data() + m_preReadWriteIndex;
+ temporaryBuffer = m_temporaryBuffer.data();
+ } else {
+ // Zero delay
+ preDelayedSource = source;
+ temporaryBuffer = m_preDelayBuffer.data();
+
+ isTemporaryBufferSafe = framesToProcess <= m_preDelayBuffer.size();
+ }
+
+ ASSERT(isTemporaryBufferSafe);
+ if (!isTemporaryBufferSafe)
+ return;
+
+ int writeIndex = 0;
+
+ if (m_framesProcessed < m_preDelayLength) {
+ // For the first m_preDelayLength frames don't process the convolver, instead simply buffer in the pre-delay.
+ // But while buffering the pre-delay, we still need to update our index.
+ m_accumulationBuffer->updateReadIndex(&m_accumulationReadIndex, framesToProcess);
+ } else {
+ // Now, run the convolution (into the delay buffer).
+ // An expensive FFT will happen every fftSize / 2 frames.
+ // We process in-place here...
+ m_convolver->process(&m_fftKernel, preDelayedSource, temporaryBuffer, framesToProcess);
+
+ // Now accumulate into reverb's accumulation buffer.
+ writeIndex = m_accumulationBuffer->accumulate(temporaryBuffer, framesToProcess, &m_accumulationReadIndex, m_postDelayLength);
+ }
+
+ // Finally copy input to pre-delay.
+ if (m_preDelayLength > 0) {
+ memcpy(preDelayedSource, source, sizeof(float) * framesToProcess);
+ m_preReadWriteIndex += framesToProcess;
+
+ ASSERT(m_preReadWriteIndex <= m_preDelayLength);
+ if (m_preReadWriteIndex >= m_preDelayLength)
+ m_preReadWriteIndex = 0;
+ }
+
+ m_framesProcessed += framesToProcess;
+}
+
+void ReverbConvolverStage::reset()
+{
+ m_convolver->reset();
+ m_preDelayBuffer.zero();
+ m_accumulationReadIndex = 0;
+ m_inputReadIndex = 0;
+ m_framesProcessed = 0;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/ReverbConvolverStage.h b/WebCore/platform/audio/ReverbConvolverStage.h
new file mode 100644
index 0000000..88351af
--- /dev/null
+++ b/WebCore/platform/audio/ReverbConvolverStage.h
@@ -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:
+ *
+ * 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.
+ */
+
+#ifndef ReverbConvolverStage_h
+#define ReverbConvolverStage_h
+
+#include "AudioFloatArray.h"
+#include "FFTFrame.h"
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+
+class ReverbAccumulationBuffer;
+class ReverbConvolver;
+class FFTConvolver;
+
+// A ReverbConvolverStage represents the convolution associated with a sub-section of a large impulse response.
+// It incorporates a delay line to account for the offset of the sub-section within the larger impulse response.
+class ReverbConvolverStage {
+public:
+ // renderPhase is useful to know so that we can manipulate the pre versus post delay so that stages will perform
+ // their heavy work (FFT processing) on different slices to balance the load in a real-time thread.
+ ReverbConvolverStage(float* impulseResponse, size_t responseLength, size_t reverbTotalLatency, size_t stageOffset, size_t stageLength,
+ size_t fftSize, size_t renderPhase, size_t renderSliceSize, ReverbAccumulationBuffer* accumulationBuffer);
+
+ // WARNING: framesToProcess must be such that it evenly divides the delay buffer size (stage_offset).
+ void process(float* source, size_t framesToProcess);
+
+ void processInBackground(ReverbConvolver* convolver, size_t framesToProcess);
+
+ void reset();
+
+ // Useful for background processing
+ int inputReadIndex() const { return m_inputReadIndex; }
+
+private:
+ FFTFrame m_fftKernel;
+ OwnPtr<FFTConvolver> m_convolver;
+
+ AudioFloatArray m_preDelayBuffer;
+
+ ReverbAccumulationBuffer* m_accumulationBuffer;
+ int m_accumulationReadIndex;
+ int m_inputReadIndex;
+
+ size_t m_preDelayLength;
+ size_t m_postDelayLength;
+ size_t m_preReadWriteIndex;
+ size_t m_framesProcessed;
+
+ AudioFloatArray m_temporaryBuffer;
+
+ size_t m_impulseResponseLength;
+};
+
+} // namespace WebCore
+
+#endif // ReverbConvolverStage_h
diff --git a/WebCore/platform/audio/ReverbInputBuffer.cpp b/WebCore/platform/audio/ReverbInputBuffer.cpp
new file mode 100644
index 0000000..f270f6f
--- /dev/null
+++ b/WebCore/platform/audio/ReverbInputBuffer.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:
+ *
+ * 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"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "ReverbInputBuffer.h"
+
+namespace WebCore {
+
+ReverbInputBuffer::ReverbInputBuffer(size_t length)
+ : m_buffer(length)
+ , m_writeIndex(0)
+{
+}
+
+void ReverbInputBuffer::write(float* sourceP, size_t numberOfFrames)
+{
+ size_t bufferLength = m_buffer.size();
+ bool isCopySafe = m_writeIndex + numberOfFrames <= bufferLength;
+ ASSERT(isCopySafe);
+ if (!isCopySafe)
+ return;
+
+ memcpy(m_buffer.data() + m_writeIndex, sourceP, sizeof(float) * numberOfFrames);
+
+ m_writeIndex += numberOfFrames;
+ ASSERT(m_writeIndex <= bufferLength);
+
+ if (m_writeIndex >= bufferLength)
+ m_writeIndex = 0;
+}
+
+float* ReverbInputBuffer::directReadFrom(int* readIndex, size_t numberOfFrames)
+{
+ size_t bufferLength = m_buffer.size();
+ bool isPointerGood = readIndex && *readIndex >= 0 && *readIndex + numberOfFrames <= bufferLength;
+ ASSERT(isPointerGood);
+ if (!isPointerGood) {
+ // Should never happen in practice but return pointer to start of buffer (avoid crash)
+ if (readIndex)
+ *readIndex = 0;
+ return m_buffer.data();
+ }
+
+ float* sourceP = m_buffer.data();
+ float* p = sourceP + *readIndex;
+
+ // Update readIndex
+ *readIndex = (*readIndex + numberOfFrames) % bufferLength;
+
+ return p;
+}
+
+void ReverbInputBuffer::reset()
+{
+ m_buffer.zero();
+ m_writeIndex = 0;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/platform/audio/ReverbInputBuffer.h b/WebCore/platform/audio/ReverbInputBuffer.h
new file mode 100644
index 0000000..aa9cf41
--- /dev/null
+++ b/WebCore/platform/audio/ReverbInputBuffer.h
@@ -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:
+ *
+ * 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.
+ */
+
+#ifndef ReverbInputBuffer_h
+#define ReverbInputBuffer_h
+
+#include "AudioFloatArray.h"
+
+namespace WebCore {
+
+// ReverbInputBuffer is used to buffer input samples for deferred processing by the background threads.
+class ReverbInputBuffer {
+public:
+ ReverbInputBuffer(size_t length);
+
+ // The realtime audio thread keeps writing samples here.
+ // The assumption is that the buffer's length is evenly divisible by numberOfFrames (for nearly all cases this will be fine).
+ // FIXME: remove numberOfFrames restriction...
+ void write(float* sourceP, size_t numberOfFrames);
+
+ // Background threads can call this to check if there's anything to read...
+ size_t writeIndex() const { return m_writeIndex; }
+
+ // The individual background threads read here (and hope that they can keep up with the buffer writing).
+ // readIndex is updated with the next readIndex to read from...
+ // The assumption is that the buffer's length is evenly divisible by numberOfFrames.
+ // FIXME: remove numberOfFrames restriction...
+ float* directReadFrom(int* readIndex, size_t numberOfFrames);
+
+ void reset();
+
+private:
+ AudioFloatArray m_buffer;
+ size_t m_writeIndex;
+};
+
+} // namespace WebCore
+
+#endif // ReverbInputBuffer_h
diff --git a/WebCore/platform/brew/SharedBufferBrew.cpp b/WebCore/platform/brew/SharedBufferBrew.cpp
new file mode 100644
index 0000000..597825c
--- /dev/null
+++ b/WebCore/platform/brew/SharedBufferBrew.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2010 Company 100, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SharedBuffer.h"
+
+#include "FileSystem.h"
+#include "ShellBrew.h"
+
+#include <AEEAppGen.h>
+#include <AEEFile.h>
+#include <AEEStdLib.h>
+
+#include <wtf/OwnPtr.h>
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& filePath)
+{
+ if (filePath.isEmpty())
+ return 0;
+
+ long long fileSize;
+ if (!fileExists(filePath) || !getFileSize(filePath, fileSize))
+ return 0;
+
+ RefPtr<SharedBuffer> result = create();
+ result->m_buffer.grow(fileSize);
+
+ OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
+
+ CString filename = fileSystemRepresentation(filePath);
+ OwnPtr<IFile> file(IFILEMGR_OpenFile(fileMgr.get(), filename.data(), _OFM_READ));
+
+ if (!file) {
+ LOG_ERROR("Failed to open file %s to create shared buffer, errno(%i)", filePath.ascii().data(), IFILEMGR_GetLastError(fileMgr.get()));
+ return 0;
+ }
+
+ size_t totalBytesRead = 0;
+ int32 bytesRead;
+ while ((bytesRead = IFILE_Read(file.get(), result->m_buffer.data() + totalBytesRead, fileSize - totalBytesRead)) > 0)
+ totalBytesRead += bytesRead;
+
+ if (totalBytesRead != fileSize) {
+ LOG_ERROR("Failed to fully read contents of file %s - errno(%i)", filePath.ascii().data(), IFILEMGR_GetLastError(fileMgr.get()));
+ return 0;
+ }
+
+ return result.release();
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/chromium/ChromiumBridge.h b/WebCore/platform/chromium/ChromiumBridge.h
index 35ace89..bc86de2 100644
--- a/WebCore/platform/chromium/ChromiumBridge.h
+++ b/WebCore/platform/chromium/ChromiumBridge.h
@@ -102,7 +102,7 @@ namespace WebCore {
static void clipboardWritePlainText(const String&);
static void clipboardWriteURL(const KURL&, const String&);
static void clipboardWriteImage(NativeImagePtr, const KURL&, const String&);
- static void clipboardWriteData(ClipboardData*);
+ static void clipboardWriteData(const String& type, const String& data, const String& metadata);
// Interface for handling copy and paste, drag and drop, and selection copy.
static HashSet<String> clipboardReadAvailableTypes(PasteboardPrivate::ClipboardBuffer, bool* containsFilenames);
diff --git a/WebCore/platform/chromium/ClipboardMimeTypes.cpp b/WebCore/platform/chromium/ClipboardMimeTypes.cpp
new file mode 100644
index 0000000..b95744f8
--- /dev/null
+++ b/WebCore/platform/chromium/ClipboardMimeTypes.cpp
@@ -0,0 +1,40 @@
+/*
+ * 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 "ClipboardMimeTypes.h"
+
+namespace WebCore {
+
+const char textPlainType[] = "text/plain";
+const char textHtmlType[] = "text/html";
+const char textUriListType[] = "text/uri-list";
+
+} // namespace WebCore
diff --git a/WebCore/platform/chromium/ClipboardMimeTypes.h b/WebCore/platform/chromium/ClipboardMimeTypes.h
new file mode 100644
index 0000000..d7468f2
--- /dev/null
+++ b/WebCore/platform/chromium/ClipboardMimeTypes.h
@@ -0,0 +1,42 @@
+/*
+ * 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 ClipboardMimeTypes_h
+#define ClipboardMimeTypes_h
+
+namespace WebCore {
+
+extern const char textPlainType[];
+extern const char textHtmlType[];
+extern const char textUriListType[];
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/platform/chromium/ReadableDataObject.cpp b/WebCore/platform/chromium/ReadableDataObject.cpp
new file mode 100644
index 0000000..1a333bb
--- /dev/null
+++ b/WebCore/platform/chromium/ReadableDataObject.cpp
@@ -0,0 +1,120 @@
+/*
+ * 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 "ReadableDataObject.h"
+
+#include "ChromiumBridge.h"
+#include "ClipboardMimeTypes.h"
+
+namespace WebCore {
+
+static PasteboardPrivate::ClipboardBuffer clipboardBuffer(bool isForDragging)
+{
+ return isForDragging ? PasteboardPrivate::DragBuffer : PasteboardPrivate::StandardBuffer;
+}
+
+PassRefPtr<ReadableDataObject> ReadableDataObject::create(bool isForDragging)
+{
+ return adoptRef(new ReadableDataObject(isForDragging));
+}
+
+ReadableDataObject::ReadableDataObject(bool isForDragging)
+ : m_isForDragging(isForDragging)
+ , m_containsFilenames(false)
+ , m_isTypeCacheInitialized(false)
+{
+}
+
+bool ReadableDataObject::hasData() const
+{
+ ensureTypeCacheInitialized();
+ return !m_types.isEmpty() || m_containsFilenames;
+}
+
+HashSet<String> ReadableDataObject::types() const
+{
+ ensureTypeCacheInitialized();
+ return m_types;
+}
+
+String ReadableDataObject::getData(const String& type, bool& succeeded) const
+{
+ String data;
+ String ignoredMetadata;
+ succeeded = ChromiumBridge::clipboardReadData(
+ clipboardBuffer(m_isForDragging), type, data, ignoredMetadata);
+ return data;
+}
+
+String ReadableDataObject::getURL(String* title) const
+{
+ String url;
+ String ignoredTitle;
+ if (!title)
+ title = &ignoredTitle;
+ ChromiumBridge::clipboardReadData(
+ clipboardBuffer(m_isForDragging), textUriListType, url, *title);
+ return url;
+}
+
+String ReadableDataObject::getHTML(String* baseURL) const
+{
+ String html;
+ String ignoredBaseURL;
+ if (!baseURL)
+ baseURL = &ignoredBaseURL;
+ ChromiumBridge::clipboardReadData(
+ clipboardBuffer(m_isForDragging), textHtmlType, html, *baseURL);
+ return html;
+}
+
+bool ReadableDataObject::hasFilenames() const
+{
+ ensureTypeCacheInitialized();
+ return m_containsFilenames;
+}
+
+Vector<String> ReadableDataObject::filenames() const
+{
+ return ChromiumBridge::clipboardReadFilenames(clipboardBuffer(m_isForDragging));
+}
+
+void ReadableDataObject::ensureTypeCacheInitialized() const
+{
+ if (m_isTypeCacheInitialized)
+ return;
+
+ m_types = ChromiumBridge::clipboardReadAvailableTypes(
+ clipboardBuffer(m_isForDragging), &m_containsFilenames);
+ m_isTypeCacheInitialized = true;
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/chromium/ReadableDataObject.h b/WebCore/platform/chromium/ReadableDataObject.h
new file mode 100644
index 0000000..60f6d45
--- /dev/null
+++ b/WebCore/platform/chromium/ReadableDataObject.h
@@ -0,0 +1,76 @@
+/*
+ * 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 ReadableDataObject_h
+#define ReadableDataObject_h
+
+#include "PlatformString.h"
+#include <wtf/HashSet.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebCore {
+
+// Used for one way communication of drag/drop and copy/paste data from the
+// browser to the renderer.
+class ReadableDataObject : public RefCounted<ReadableDataObject> {
+public:
+ static PassRefPtr<ReadableDataObject> create(bool isForDragging);
+
+ virtual bool hasData() const;
+ virtual HashSet<String> types() const;
+ virtual String getData(const String& type, bool& succeeded) const;
+
+ virtual String getURL(String* title) const;
+ virtual String getHTML(String* baseURL) const;
+
+ virtual bool hasFilenames() const;
+ virtual Vector<String> filenames() const;
+
+private:
+ explicit ReadableDataObject(bool isForDragging);
+
+ // This isn't always const... but most of the time it is.
+ void ensureTypeCacheInitialized() const;
+
+
+ bool m_isForDragging;
+
+ // To avoid making a lot of IPC calls for each drag event, we cache some
+ // values in the renderer.
+ mutable HashSet<String> m_types;
+ mutable bool m_containsFilenames;
+ mutable bool m_isTypeCacheInitialized;
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/platform/chromium/WritableDataObject.cpp b/WebCore/platform/chromium/WritableDataObject.cpp
new file mode 100644
index 0000000..6e7c283
--- /dev/null
+++ b/WebCore/platform/chromium/WritableDataObject.cpp
@@ -0,0 +1,152 @@
+/*
+ * 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 "WritableDataObject.h"
+
+#include "ChromiumBridge.h"
+#include "ClipboardMimeTypes.h"
+
+namespace WebCore {
+
+PassRefPtr<WritableDataObject> WritableDataObject::create(bool isForDragging)
+{
+ return adoptRef(new WritableDataObject(isForDragging));
+}
+
+WritableDataObject::WritableDataObject(bool isForDragging)
+ : m_isForDragging(isForDragging)
+{
+}
+
+void WritableDataObject::clearData(const String& type)
+{
+ m_dataMap.remove(type);
+ if (type == textUriListType)
+ m_urlTitle = "";
+ else if (type == textHtmlType)
+ m_htmlBaseURL = KURL();
+}
+
+void WritableDataObject::clearAllExceptFiles()
+{
+ // FIXME: The spec does not provide a way to populate FileList currently. In
+ // fact, the spec explicitly states that dragging files can only happen from
+ // outside a browsing context.
+ clearAll();
+}
+
+void WritableDataObject::clearAll()
+{
+ m_dataMap.clear();
+ m_urlTitle = "";
+ m_htmlBaseURL = KURL();
+ m_fileContentFilename = "";
+ if (m_fileContent)
+ m_fileContent->clear();
+ m_fileExtension = "";
+}
+
+bool WritableDataObject::setData(const String& type, const String& data)
+{
+ if (!m_isForDragging) {
+ ChromiumBridge::clipboardWriteData(type, data, "");
+ return true;
+ }
+ m_dataMap.set(type, data);
+ if (type == textUriListType)
+ m_urlTitle = "";
+ else if (type == textHtmlType)
+ m_htmlBaseURL = KURL();
+ return true;
+}
+
+void WritableDataObject::setURL(const String& url, const String& title)
+{
+ setData(textUriListType, url);
+ m_urlTitle = title;
+}
+
+void WritableDataObject::setHTML(const String& html, const KURL& baseURL)
+{
+ setData(textHtmlType, html);
+ m_htmlBaseURL = baseURL;
+}
+
+// Accessors used when transferring drag data from the renderer to the
+// browser.
+HashMap<String, String> WritableDataObject::dataMap() const
+{
+ return m_dataMap;
+}
+
+String WritableDataObject::urlTitle() const
+{
+ return m_urlTitle;
+}
+
+KURL WritableDataObject::htmlBaseURL() const
+{
+ return m_htmlBaseURL;
+}
+
+// Used for transferring file data from the renderer to the browser.
+String WritableDataObject::fileExtension() const
+{
+ return m_fileExtension;
+}
+
+String WritableDataObject::fileContentFilename() const
+{
+ return m_fileContentFilename;
+}
+
+PassRefPtr<SharedBuffer> WritableDataObject::fileContent() const
+{
+ return m_fileContent;
+}
+
+void WritableDataObject::setFileExtension(const String& fileExtension)
+{
+ m_fileExtension = fileExtension;
+}
+
+void WritableDataObject::setFileContentFilename(const String& fileContentFilename)
+{
+ m_fileContentFilename = fileContentFilename;
+}
+
+void WritableDataObject::setFileContent(PassRefPtr<SharedBuffer> fileContent)
+{
+ m_fileContent = fileContent;
+}
+
+
+} // namespace WebCore
diff --git a/WebCore/platform/chromium/WritableDataObject.h b/WebCore/platform/chromium/WritableDataObject.h
new file mode 100644
index 0000000..71e2e26
--- /dev/null
+++ b/WebCore/platform/chromium/WritableDataObject.h
@@ -0,0 +1,87 @@
+/*
+ * 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 WritableDataObject_h
+#define WritableDataObject_h
+
+#include "KURL.h"
+#include "PlatformString.h"
+#include "SharedBuffer.h"
+#include <wtf/HashMap.h>
+#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/StringHash.h>
+
+namespace WebCore {
+
+// Used for one way communication of drag/drop and copy/paste data from the
+// renderer to the browser. This is intenteded to be used in dragstart/copy/cut
+// events. Due to shortcomings, writes to the pasteboard cannot be performed
+// atomically.
+class WritableDataObject : public RefCounted<WritableDataObject> {
+public:
+ static PassRefPtr<WritableDataObject> create(bool isForDragging);
+
+ virtual void clearData(const String& type);
+ virtual void clearAllExceptFiles();
+ virtual void clearAll();
+ virtual bool setData(const String& type, const String& data);
+
+ virtual void setURL(const String& url, const String& title);
+ virtual void setHTML(const String& html, const KURL& baseURL);
+
+ // Used for transferring drag data from the renderer to the browser.
+ virtual HashMap<String, String> dataMap() const;
+ virtual String urlTitle() const;
+ virtual KURL htmlBaseURL() const;
+
+ virtual String fileExtension() const;
+ virtual String fileContentFilename() const;
+ virtual PassRefPtr<SharedBuffer> fileContent() const;
+ virtual void setFileExtension(const String&);
+ virtual void setFileContentFilename(const String&);
+ virtual void setFileContent(PassRefPtr<SharedBuffer>);
+
+private:
+ explicit WritableDataObject(bool isForDragging);
+
+ bool m_isForDragging;
+
+ HashMap<String, String> m_dataMap;
+ String m_urlTitle;
+ KURL m_htmlBaseURL;
+ String m_fileExtension;
+ String m_fileContentFilename;
+ RefPtr<SharedBuffer> m_fileContent;
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/WebCore/platform/efl/ClipboardEfl.cpp b/WebCore/platform/efl/ClipboardEfl.cpp
index caff813..6fc80dc 100644
--- a/WebCore/platform/efl/ClipboardEfl.cpp
+++ b/WebCore/platform/efl/ClipboardEfl.cpp
@@ -29,7 +29,7 @@
namespace WebCore {
PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy, Frame*)
{
- return new ClipboardEfl(policy, false);
+ return ClipboardEfl::create(policy, false);
}
PassRefPtr<Clipboard> Clipboard::create(ClipboardAccessPolicy, DragData*, Frame*)
diff --git a/WebCore/platform/efl/ClipboardEfl.h b/WebCore/platform/efl/ClipboardEfl.h
index d5b17c0..5db2fed 100644
--- a/WebCore/platform/efl/ClipboardEfl.h
+++ b/WebCore/platform/efl/ClipboardEfl.h
@@ -28,7 +28,10 @@ class CachedImage;
class ClipboardEfl : public Clipboard {
public:
- ClipboardEfl(ClipboardAccessPolicy, bool);
+ static PassRefPtr<ClipboardEfl> create(ClipboardAccessPolicy policy, bool forDragging = false)
+ {
+ return adoptRef(new ClipboardEfl(policy, forDragging));
+ }
~ClipboardEfl();
void clearData(const String&);
@@ -53,6 +56,9 @@ public:
virtual bool hasData();
virtual void writePlainText(const WTF::String&);
+
+private:
+ ClipboardEfl(ClipboardAccessPolicy, bool);
};
}
diff --git a/WebCore/platform/efl/ScrollbarEfl.cpp b/WebCore/platform/efl/ScrollbarEfl.cpp
index 1030ebd..e413260 100644
--- a/WebCore/platform/efl/ScrollbarEfl.cpp
+++ b/WebCore/platform/efl/ScrollbarEfl.cpp
@@ -125,7 +125,7 @@ void ScrollbarEfl::setParent(ScrollView* view)
int err = edje_object_load_error_get(o);
const char* errmsg = edje_load_error_str(err);
EINA_LOG_ERR("Could not load theme '%s' from file '%s': #%d '%s'",
- theme.utf8().data(), group, err, errmsg);
+ group, theme.utf8().data(), err, errmsg);
return;
}
diff --git a/WebCore/platform/graphics/FloatPoint.cpp b/WebCore/platform/graphics/FloatPoint.cpp
index cf3d548..7e85b52 100644
--- a/WebCore/platform/graphics/FloatPoint.cpp
+++ b/WebCore/platform/graphics/FloatPoint.cpp
@@ -30,6 +30,7 @@
#include "TransformationMatrix.h"
#include "FloatConversion.h"
#include "IntPoint.h"
+#include <math.h>
namespace WebCore {
@@ -37,6 +38,21 @@ FloatPoint::FloatPoint(const IntPoint& p) : m_x(p.x()), m_y(p.y())
{
}
+void FloatPoint::normalize()
+{
+ float tempLength = length();
+
+ if (tempLength) {
+ m_x /= tempLength;
+ m_y /= tempLength;
+ }
+}
+
+float FloatPoint::length() const
+{
+ return sqrtf(lengthSquared());
+}
+
FloatPoint FloatPoint::matrixTransform(const AffineTransform& transform) const
{
double newX, newY;
diff --git a/WebCore/platform/graphics/FloatPoint.h b/WebCore/platform/graphics/FloatPoint.h
index 5018f1d..73a1bac 100644
--- a/WebCore/platform/graphics/FloatPoint.h
+++ b/WebCore/platform/graphics/FloatPoint.h
@@ -80,6 +80,11 @@ public:
void setX(float x) { m_x = x; }
void setY(float y) { m_y = y; }
+ void set(float x, float y)
+ {
+ m_x = x;
+ m_y = y;
+ }
void move(float dx, float dy)
{
m_x += dx;
@@ -91,6 +96,19 @@ public:
m_y *= sy;
}
+ void normalize();
+
+ float dot(const FloatPoint& a) const
+ {
+ return m_x * a.x() + m_y * a.y();
+ }
+
+ float length() const;
+ float lengthSquared() const
+ {
+ return m_x * m_x + m_y * m_y;
+ }
+
#if PLATFORM(CG)
FloatPoint(const CGPoint&);
operator CGPoint() const;
@@ -173,6 +191,12 @@ inline bool operator!=(const FloatPoint& a, const FloatPoint& b)
return a.x() != b.x() || a.y() != b.y();
}
+inline float operator*(const FloatPoint& a, const FloatPoint& b)
+{
+ // dot product
+ return a.dot(b);
+}
+
inline IntPoint roundedIntPoint(const FloatPoint& p)
{
return IntPoint(static_cast<int>(roundf(p.x())), static_cast<int>(roundf(p.y())));
diff --git a/WebCore/platform/graphics/FloatPoint3D.cpp b/WebCore/platform/graphics/FloatPoint3D.cpp
index 3d37eea..bb05e7f 100644
--- a/WebCore/platform/graphics/FloatPoint3D.cpp
+++ b/WebCore/platform/graphics/FloatPoint3D.cpp
@@ -21,21 +21,27 @@
#include "config.h"
-#include <math.h>
#include "FloatPoint3D.h"
+#include <math.h>
+
namespace WebCore {
void FloatPoint3D::normalize()
{
- float length = sqrtf(m_x * m_x + m_y * m_y + m_z * m_z);
+ float tempLength = length();
- if (length != 0) {
- m_x /= length;
- m_y /= length;
- m_z /= length;
+ if (tempLength) {
+ m_x /= tempLength;
+ m_y /= tempLength;
+ m_z /= tempLength;
}
}
+float FloatPoint3D::length() const
+{
+ return sqrtf(lengthSquared());
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/graphics/FloatPoint3D.h b/WebCore/platform/graphics/FloatPoint3D.h
index d10e3c1..9ee548d 100644
--- a/WebCore/platform/graphics/FloatPoint3D.h
+++ b/WebCore/platform/graphics/FloatPoint3D.h
@@ -65,15 +65,85 @@ public:
float z() const { return m_z; }
void setZ(float z) { m_z = z; }
+ void set(float x, float y, float z)
+ {
+ m_x = x;
+ m_y = y;
+ m_z = z;
+ }
+ void move(float dx, float dy, float dz)
+ {
+ m_x += dx;
+ m_y += dy;
+ m_z += dz;
+ }
+ void scale(float sx, float sy, float sz)
+ {
+ m_x *= sx;
+ m_y *= sy;
+ m_z *= sz;
+ }
void normalize();
+ float dot(const FloatPoint3D& a) const
+ {
+ return m_x * a.x() + m_y * a.y() + m_z * a.z();
+ }
+
+ // Sets this FloatPoint3D to the cross product of the passed two.
+ // It is safe for "this" to be the same as either or both of the
+ // arguments.
+ void cross(const FloatPoint3D& a, const FloatPoint3D& b)
+ {
+ float x = a.y() * b.z() - a.z() * b.y();
+ float y = a.z() * b.x() - a.x() * b.z();
+ float z = a.x() * b.y() - a.y() * b.x();
+ m_x = x;
+ m_y = y;
+ m_z = z;
+ }
+
+ // Convenience function returning "this cross point" as a
+ // stack-allocated result.
+ FloatPoint3D cross(const FloatPoint3D& point) const
+ {
+ FloatPoint3D result;
+ result.cross(*this, point);
+ return result;
+ }
+
+ float length() const;
+ float lengthSquared() const { return this->dot(*this); }
+
private:
float m_x;
float m_y;
float m_z;
};
+inline FloatPoint3D& operator +=(FloatPoint3D& a, const FloatPoint3D& b)
+{
+ a.move(b.x(), b.y(), b.z());
+ return a;
+}
+
+inline FloatPoint3D& operator -=(FloatPoint3D& a, const FloatPoint3D& b)
+{
+ a.move(-b.x(), -b.y(), -b.z());
+ return a;
+}
+
+inline FloatPoint3D operator+(const FloatPoint3D& a, const FloatPoint3D& b)
+{
+ return FloatPoint3D(a.x() + b.x(), a.y() + b.y(), a.z() + b.z());
+}
+
+inline FloatPoint3D operator-(const FloatPoint3D& a, const FloatPoint3D& b)
+{
+ return FloatPoint3D(a.x() - b.x(), a.y() - b.y(), a.z() - b.z());
+}
+
inline bool operator==(const FloatPoint3D& a, const FloatPoint3D& b)
{
return a.x() == b.x() && a.y() == b.y() && a.z() == b.z();
@@ -87,7 +157,7 @@ inline bool operator!=(const FloatPoint3D& a, const FloatPoint3D& b)
inline float operator*(const FloatPoint3D& a, const FloatPoint3D& b)
{
// dot product
- return a.x() * b.x() + a.y() * b.y() + a.z() * b.z();
+ return a.dot(b);
}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/FloatRect.cpp b/WebCore/platform/graphics/FloatRect.cpp
index 6dfa808..0d8a24e 100644
--- a/WebCore/platform/graphics/FloatRect.cpp
+++ b/WebCore/platform/graphics/FloatRect.cpp
@@ -76,10 +76,7 @@ void FloatRect::intersect(const FloatRect& other)
b = 0;
}
- m_location.setX(l);
- m_location.setY(t);
- m_size.setWidth(r - l);
- m_size.setHeight(b - t);
+ setLocationAndSizeFromEdges(l, t, r, b);
}
void FloatRect::unite(const FloatRect& other)
@@ -97,10 +94,7 @@ void FloatRect::unite(const FloatRect& other)
float r = max(right(), other.right());
float b = max(bottom(), other.bottom());
- m_location.setX(l);
- m_location.setY(t);
- m_size.setWidth(r - l);
- m_size.setHeight(b - t);
+ setLocationAndSizeFromEdges(l, t, r, b);
}
void FloatRect::scale(float sx, float sy)
@@ -111,6 +105,65 @@ void FloatRect::scale(float sx, float sy)
m_size.setHeight(height() * sy);
}
+void FloatRect::fitToPoints(const FloatPoint& p0, const FloatPoint& p1)
+{
+ float left = min(p0.x(), p1.x());
+ float top = min(p0.y(), p1.y());
+ float right = max(p0.x(), p1.x());
+ float bottom = max(p0.y(), p1.y());
+
+ setLocationAndSizeFromEdges(left, top, right, bottom);
+}
+
+namespace {
+// Helpers for 3- and 4-way max and min.
+
+template <typename T>
+T min3(const T& v1, const T& v2, const T& v3)
+{
+ return min(min(v1, v2), v3);
+}
+
+template <typename T>
+T max3(const T& v1, const T& v2, const T& v3)
+{
+ return max(max(v1, v2), v3);
+}
+
+template <typename T>
+T min4(const T& v1, const T& v2, const T& v3, const T& v4)
+{
+ return min(min(v1, v2), min(v3, v4));
+}
+
+template <typename T>
+T max4(const T& v1, const T& v2, const T& v3, const T& v4)
+{
+ return max(max(v1, v2), max(v3, v4));
+}
+
+} // anonymous namespace
+
+void FloatRect::fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2)
+{
+ float left = min3(p0.x(), p1.x(), p2.x());
+ float top = min3(p0.y(), p1.y(), p2.y());
+ float right = max3(p0.x(), p1.x(), p2.x());
+ float bottom = max3(p0.y(), p1.y(), p2.y());
+
+ setLocationAndSizeFromEdges(left, top, right, bottom);
+}
+
+void FloatRect::fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2, const FloatPoint& p3)
+{
+ float left = min4(p0.x(), p1.x(), p2.x(), p3.x());
+ float top = min4(p0.y(), p1.y(), p2.y(), p3.y());
+ float right = max4(p0.x(), p1.x(), p2.x(), p3.x());
+ float bottom = max4(p0.y(), p1.y(), p2.y(), p3.y());
+
+ setLocationAndSizeFromEdges(left, top, right, bottom);
+}
+
static inline int safeFloatToInt(float x)
{
static const int s_intMax = std::numeric_limits<int>::max();
diff --git a/WebCore/platform/graphics/FloatRect.h b/WebCore/platform/graphics/FloatRect.h
index 2b23576..e387927 100644
--- a/WebCore/platform/graphics/FloatRect.h
+++ b/WebCore/platform/graphics/FloatRect.h
@@ -96,7 +96,9 @@ public:
bool isEmpty() const { return m_size.isEmpty(); }
+ float left() const { return x(); }
float right() const { return x() + width(); }
+ float top() const { return y(); }
float bottom() const { return y() + height(); }
FloatPoint center() const { return FloatPoint(x() + width() / 2, y() + height() / 2); }
@@ -129,6 +131,11 @@ public:
void scale(float s) { scale(s, s); }
void scale(float sx, float sy);
+ // Re-initializes this rectangle to fit the sets of passed points.
+ void fitToPoints(const FloatPoint& p0, const FloatPoint& p1);
+ void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2);
+ void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2, const FloatPoint& p3);
+
#if PLATFORM(CG)
FloatRect(const CGRect&);
operator CGRect() const;
@@ -168,6 +175,13 @@ public:
private:
FloatPoint m_location;
FloatSize m_size;
+
+ void setLocationAndSizeFromEdges(float left, float top, float right, float bottom)
+ {
+ m_location.set(left, top);
+ m_size.setWidth(right - left);
+ m_size.setHeight(bottom - top);
+ }
};
inline FloatRect intersection(const FloatRect& a, const FloatRect& b)
diff --git a/WebCore/platform/graphics/FloatSize.cpp b/WebCore/platform/graphics/FloatSize.cpp
index 86fa4c0..c199297 100644
--- a/WebCore/platform/graphics/FloatSize.cpp
+++ b/WebCore/platform/graphics/FloatSize.cpp
@@ -29,6 +29,7 @@
#include "FloatConversion.h"
#include "IntSize.h"
+#include <math.h>
namespace WebCore {
@@ -36,6 +37,11 @@ FloatSize::FloatSize(const IntSize& size) : m_width(size.width()), m_height(size
{
}
+float FloatSize::diagonalLength() const
+{
+ return sqrtf(diagonalLengthSquared());
+}
+
FloatSize FloatSize::narrowPrecision(double width, double height)
{
return FloatSize(narrowPrecisionToFloat(width), narrowPrecisionToFloat(height));
diff --git a/WebCore/platform/graphics/FloatSize.h b/WebCore/platform/graphics/FloatSize.h
index ff3d4de..160fc9a 100644
--- a/WebCore/platform/graphics/FloatSize.h
+++ b/WebCore/platform/graphics/FloatSize.h
@@ -83,6 +83,12 @@ public:
m_height < other.m_height ? m_height : other.m_height);
}
+ float diagonalLength() const;
+ float diagonalLengthSquared() const
+ {
+ return m_width * m_width + m_height * m_height;
+ }
+
#if PLATFORM(CG) || (PLATFORM(WX) && OS(DARWIN))
explicit FloatSize(const CGSize&); // don't do this implicitly since it's lossy
operator CGSize() const;
diff --git a/WebCore/platform/graphics/GraphicsContext.cpp b/WebCore/platform/graphics/GraphicsContext.cpp
index bb4f858..94f3424 100644
--- a/WebCore/platform/graphics/GraphicsContext.cpp
+++ b/WebCore/platform/graphics/GraphicsContext.cpp
@@ -130,29 +130,29 @@ void GraphicsContext::setStrokeColor(const Color& color, ColorSpace colorSpace)
setPlatformStrokeColor(color, colorSpace);
}
-void GraphicsContext::setShadow(const FloatSize& size, float blur, const Color& color, ColorSpace colorSpace)
+void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color& color, ColorSpace colorSpace)
{
- m_common->state.shadowSize = size;
+ m_common->state.shadowOffset = offset;
m_common->state.shadowBlur = blur;
m_common->state.shadowColor = color;
- setPlatformShadow(size, blur, color, colorSpace);
+ setPlatformShadow(offset, blur, color, colorSpace);
}
void GraphicsContext::clearShadow()
{
- m_common->state.shadowSize = IntSize();
+ m_common->state.shadowOffset = FloatSize();
m_common->state.shadowBlur = 0;
m_common->state.shadowColor = Color();
clearPlatformShadow();
}
-bool GraphicsContext::getShadow(FloatSize& size, float& blur, Color& color) const
+bool GraphicsContext::getShadow(FloatSize& offset, float& blur, Color& color) const
{
- size = m_common->state.shadowSize;
+ offset = m_common->state.shadowOffset;
blur = m_common->state.shadowBlur;
color = m_common->state.shadowColor;
- return color.isValid() && color.alpha() && (blur || size.width() || size.height());
+ return color.isValid() && color.alpha() && (blur || offset.width() || offset.height());
}
float GraphicsContext::strokeThickness() const
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 1056d81..c5440f3 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -40,6 +40,7 @@
#if PLATFORM(CG)
typedef struct CGContext PlatformGraphicsContext;
#elif PLATFORM(CAIRO)
+#include "PlatformRefPtrCairo.h"
typedef struct _cairo PlatformGraphicsContext;
#elif PLATFORM(OPENVG)
namespace WebCore {
@@ -306,7 +307,12 @@ namespace WebCore {
FloatRect roundToDevicePixels(const FloatRect&);
void drawLineForText(const IntPoint&, int width, bool printing);
- void drawLineForMisspellingOrBadGrammar(const IntPoint&, int width, bool grammar);
+ enum TextCheckingLineStyle {
+ TextCheckingSpellingLineStyle,
+ TextCheckingGrammarLineStyle,
+ TextCheckingReplacementLineStyle
+ };
+ void drawLineForTextChecking(const IntPoint&, int width, TextCheckingLineStyle);
bool paintingDisabled() const;
void setPaintingDisabled(bool);
@@ -332,8 +338,11 @@ namespace WebCore {
void setAlpha(float);
#if PLATFORM(CAIRO)
float getAlpha();
- void createPlatformShadow(PassOwnPtr<ImageBuffer> buffer, const Color& shadowColor, const FloatRect& shadowRect, float radius);
- static void calculateShadowBufferDimensions(IntSize& shadowBufferSize, FloatRect& shadowRect, float& radius, const FloatRect& sourceRect, const FloatSize& shadowSize, float shadowBlur);
+ void applyPlatformShadow(PassOwnPtr<ImageBuffer> buffer, const Color& shadowColor, const FloatRect& shadowRect, float radius);
+ PlatformRefPtr<cairo_surface_t> createShadowMask(PassOwnPtr<ImageBuffer>, const FloatRect&, float radius);
+
+ static void calculateShadowBufferDimensions(IntSize& shadowBufferSize, FloatRect& shadowRect, float& radius, const FloatRect& sourceRect, const FloatSize& shadowOffset, float shadowBlur);
+ void drawTiledShadow(const IntRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, ColorSpace colorSpace);
#endif
void setCompositeOperation(CompositeOperator);
diff --git a/WebCore/platform/graphics/GraphicsContextPrivate.h b/WebCore/platform/graphics/GraphicsContextPrivate.h
index 6bf465b..903c7e3 100644
--- a/WebCore/platform/graphics/GraphicsContextPrivate.h
+++ b/WebCore/platform/graphics/GraphicsContextPrivate.h
@@ -72,7 +72,7 @@ namespace WebCore {
bool paintingDisabled;
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index 87060a4..a5db85f 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -564,17 +564,10 @@ MediaPlayer::SupportsType MediaPlayer::supportsType(ContentType contentType)
String type = contentType.type().lower();
String typeCodecs = contentType.parameter(codecs());
- // 4.8.10.3 MIME types - In the absence of a specification to the contrary, the MIME type "application/octet-stream"
- // when used with parameters, e.g. "application/octet-stream;codecs=theora", is a type that the user agent knows
- // it cannot render.
- if (type == applicationOctetStream()) {
- if (!typeCodecs.isEmpty())
- return IsNotSupported;
-
- // The MIME type "application/octet-stream" with no parameters is never a type that the user agent knows it
- // cannot render.
- return MayBeSupported;
- }
+ // 4.8.10.3 MIME types - The canPlayType(type) method must return the empty string if type is a type that the
+ // user agent knows it cannot render or is the type "application/octet-stream"
+ if (type == applicationOctetStream())
+ return IsNotSupported;
MediaPlayerFactory* engine = chooseBestEngineForTypeAndCodecs(type, typeCodecs);
if (!engine)
diff --git a/WebCore/platform/graphics/PathTraversalState.cpp b/WebCore/platform/graphics/PathTraversalState.cpp
index d202649..ecdcb1b 100644
--- a/WebCore/platform/graphics/PathTraversalState.cpp
+++ b/WebCore/platform/graphics/PathTraversalState.cpp
@@ -160,7 +160,7 @@ PathTraversalState::PathTraversalState(PathTraversalAction action)
float PathTraversalState::closeSubpath()
{
float distance = distanceLine(m_current, m_start);
- m_start = m_control1 = m_control2 = m_current;
+ m_current = m_control1 = m_control2 = m_start;
return distance;
}
diff --git a/WebCore/platform/graphics/cairo/FontCairo.cpp b/WebCore/platform/graphics/cairo/FontCairo.cpp
index f6d8f3d..cd5d362 100644
--- a/WebCore/platform/graphics/cairo/FontCairo.cpp
+++ b/WebCore/platform/graphics/cairo/FontCairo.cpp
@@ -70,11 +70,11 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
}
// Text shadow, inspired by FontMac
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur = 0;
Color shadowColor;
bool hasShadow = context->textDrawingMode() & cTextFill
- && context->getShadow(shadowSize, shadowBlur, shadowColor);
+ && context->getShadow(shadowOffset, shadowBlur, shadowColor);
// TODO: Blur support
if (hasShadow) {
@@ -95,7 +95,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
IntSize shadowBufferSize;
FloatRect shadowRect;
float radius = 0;
- context->calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, rect, shadowSize, shadowBlur);
+ context->calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, rect, shadowOffset, shadowBlur);
// Draw shadow into a new ImageBuffer
OwnPtr<ImageBuffer> shadowBuffer = ImageBuffer::create(shadowBufferSize);
@@ -113,9 +113,9 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
cairo_restore(shadowCr);
}
cairo_translate(cr, 0.0, -extents.height);
- context->createPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
+ context->applyPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
#else
- cairo_translate(cr, shadowSize.width(), shadowSize.height());
+ cairo_translate(cr, shadowOffset.width(), shadowOffset.height());
cairo_show_glyphs(cr, glyphs, numGlyphs);
if (font->syntheticBoldOffset()) {
cairo_save(cr);
@@ -195,7 +195,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
// Re-enable the platform shadow we disabled earlier
if (hasShadow)
- context->setShadow(shadowSize, shadowBlur, shadowColor, DeviceColorSpace);
+ context->setShadow(shadowOffset, shadowBlur, shadowColor, DeviceColorSpace);
cairo_restore(cr);
}
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index 3a667ac..19cc518 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -44,6 +44,7 @@
#include "NotImplemented.h"
#include "Path.h"
#include "Pattern.h"
+#include "PlatformRefPtrCairo.h"
#include "SimpleFontData.h"
#include "SourceGraphic.h"
@@ -175,7 +176,7 @@ static void addConvexPolygonToContext(cairo_t* context, size_t numPoints, const
cairo_close_path(context);
}
-void GraphicsContext::calculateShadowBufferDimensions(IntSize& shadowBufferSize, FloatRect& shadowRect, float& radius, const FloatRect& sourceRect, const FloatSize& shadowSize, float shadowBlur)
+void GraphicsContext::calculateShadowBufferDimensions(IntSize& shadowBufferSize, FloatRect& shadowRect, float& radius, const FloatRect& sourceRect, const FloatSize& shadowOffset, float shadowBlur)
{
#if ENABLE(FILTERS)
// limit radius to 128
@@ -185,17 +186,17 @@ void GraphicsContext::calculateShadowBufferDimensions(IntSize& shadowBufferSize,
// determine dimensions of shadow rect
shadowRect = FloatRect(sourceRect.location(), shadowBufferSize);
- shadowRect.move(shadowSize.width() - radius, shadowSize.height() - radius);
+ shadowRect.move(shadowOffset.width() - radius, shadowOffset.height() - radius);
#endif
}
static inline void drawPathShadow(GraphicsContext* context, GraphicsContextPrivate* gcp, bool fillShadow, bool strokeShadow)
{
#if ENABLE(FILTERS)
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (!context->getShadow(shadowSize, shadowBlur, shadowColor))
+ if (!context->getShadow(shadowOffset, shadowBlur, shadowColor))
return;
// Calculate filter values to create appropriate shadow.
@@ -211,7 +212,7 @@ static inline void drawPathShadow(GraphicsContext* context, GraphicsContextPriva
IntSize shadowBufferSize;
FloatRect shadowRect;
float radius = 0;
- GraphicsContext::calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, rect, shadowSize, shadowBlur);
+ GraphicsContext::calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, rect, shadowOffset, shadowBlur);
// Create suitably-sized ImageBuffer to hold the shadow.
OwnPtr<ImageBuffer> shadowBuffer = ImageBuffer::create(shadowBufferSize);
@@ -228,7 +229,7 @@ static inline void drawPathShadow(GraphicsContext* context, GraphicsContextPriva
if (strokeShadow)
setPlatformStroke(context, shadowContext, gcp);
- context->createPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
+ context->applyPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
#endif
}
@@ -623,24 +624,38 @@ void GraphicsContext::fillRect(const FloatRect& rect)
static void drawBorderlessRectShadow(GraphicsContext* context, const FloatRect& rect, const Color& rectColor)
{
#if ENABLE(FILTERS)
- FloatSize shadowSize;
+ AffineTransform transform = context->getCTM();
+ // drawTiledShadow still does not work with rotations.
+ if ((transform.isIdentityOrTranslationOrFlipped())) {
+ cairo_t* cr = context->platformContext();
+ cairo_save(cr);
+ appendWebCorePathToCairoContext(cr, Path::createRectangle(rect));
+ FloatSize corner;
+ IntRect shadowRect(rect);
+ context->drawTiledShadow(shadowRect, corner, corner, corner, corner, DeviceColorSpace);
+ cairo_restore(cr);
+
+ return;
+ }
+
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (!context->getShadow(shadowSize, shadowBlur, shadowColor))
+ if (!context->getShadow(shadowOffset, shadowBlur, shadowColor))
return;
IntSize shadowBufferSize;
FloatRect shadowRect;
float radius = 0;
- GraphicsContext::calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, rect, shadowSize, shadowBlur);
+ GraphicsContext::calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, rect, shadowOffset, shadowBlur);
// Draw shadow into a new ImageBuffer
OwnPtr<ImageBuffer> shadowBuffer = ImageBuffer::create(shadowBufferSize);
GraphicsContext* shadowContext = shadowBuffer->context();
shadowContext->fillRect(FloatRect(FloatPoint(radius, radius), rect.size()), rectColor, DeviceColorSpace);
- context->createPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
+ context->applyPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
#endif
}
@@ -759,7 +774,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
#include "DrawErrorUnderline.h"
#endif
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& origin, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint& origin, int width, TextCheckingLineStyle style)
{
if (paintingDisabled())
return;
@@ -767,12 +782,17 @@ void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& origin,
cairo_t* cr = m_data->cr;
cairo_save(cr);
- // Convention is green for grammar, red for spelling
- // These need to become configurable
- if (grammar)
- cairo_set_source_rgb(cr, 0, 1, 0);
- else
+ switch (style) {
+ case TextCheckingSpellingLineStyle:
cairo_set_source_rgb(cr, 1, 0, 0);
+ break;
+ case TextCheckingGrammarLineStyle:
+ cairo_set_source_rgb(cr, 0, 1, 0);
+ break;
+ default:
+ cairo_restore(cr);
+ return;
+ }
#if PLATFORM(GTK)
// We ignore most of the provided constants in favour of the platform style
@@ -917,24 +937,29 @@ void GraphicsContext::setPlatformShadow(FloatSize const& size, float, Color cons
if (m_common->state.shadowsIgnoreTransforms) {
// Meaning that this graphics context is associated with a CanvasRenderingContext
// We flip the height since CG and HTML5 Canvas have opposite Y axis
- m_common->state.shadowSize = FloatSize(size.width(), -size.height());
+ m_common->state.shadowOffset = FloatSize(size.width(), -size.height());
}
}
-void GraphicsContext::createPlatformShadow(PassOwnPtr<ImageBuffer> buffer, const Color& shadowColor, const FloatRect& shadowRect, float radius)
+void GraphicsContext::applyPlatformShadow(PassOwnPtr<ImageBuffer> buffer, const Color& shadowColor, const FloatRect& shadowRect, float radius)
{
#if ENABLE(FILTERS)
- cairo_t* cr = m_data->cr;
+ setColor(m_data->cr, shadowColor);
+ PlatformRefPtr<cairo_surface_t> shadowMask(createShadowMask(buffer, shadowRect, radius));
+ cairo_mask_surface(m_data->cr, shadowMask.get(), shadowRect.x(), shadowRect.y());
+#endif
+}
- // calculate the standard deviation
- float sd = FEGaussianBlur::calculateStdDeviation(radius);
+PlatformRefPtr<cairo_surface_t> GraphicsContext::createShadowMask(PassOwnPtr<ImageBuffer> buffer, const FloatRect& shadowRect, float radius)
+{
+#if ENABLE(FILTERS)
+ if (!radius)
+ return buffer->m_data.m_surface;
- // draw the shadow without blurring, if radius is zero
- if (!radius || !sd) {
- setColor(cr, shadowColor);
- cairo_mask_surface(cr, buffer->m_data.m_surface, shadowRect.x(), shadowRect.y());
- return;
- }
+ FloatPoint blurRadius = FloatPoint(radius, radius);
+ float sd = FEGaussianBlur::calculateStdDeviation(radius);
+ if (!sd)
+ return buffer->m_data.m_surface;
// create filter
RefPtr<Filter> filter = ImageBufferFilter::create();
@@ -945,14 +970,11 @@ void GraphicsContext::createPlatformShadow(PassOwnPtr<ImageBuffer> buffer, const
RefPtr<FilterEffect> blur = FEGaussianBlur::create(source.get(), sd, sd);
blur->setScaledSubRegion(FloatRect(FloatPoint(), shadowRect.size()));
blur->apply(filter.get());
-
- // Mask the filter with the shadow color and draw it to the context.
- // Masking makes it possible to just blur the alpha channel.
- setColor(cr, shadowColor);
- cairo_mask_surface(cr, blur->resultImage()->m_data.m_surface, shadowRect.x(), shadowRect.y());
+ return blur->resultImage()->m_data.m_surface;
#endif
}
+
void GraphicsContext::clearPlatformShadow()
{
notImplemented();
@@ -1218,6 +1240,200 @@ void GraphicsContext::clipOutEllipseInRect(const IntRect& r)
clipOut(p);
}
+static inline FloatPoint getPhase(const FloatRect& dest, const FloatRect& tile)
+{
+ FloatPoint phase = dest.location();
+ phase.move(-tile.x(), -tile.y());
+
+ return phase;
+}
+
+/*
+ This function uses tiling to improve the performance of the shadow
+ drawing of rounded rectangles. The code basically does the following
+ steps:
+
+ 1. Calculate the minimum rectangle size required to create the
+ tiles
+
+ 2. If that size is smaller than the real rectangle render the new
+ small rectangle and its shadow in a new surface, in other case
+ render the shadow of the real rectangle in the destination
+ surface.
+
+ 3. Calculate the sizes and positions of the tiles and their
+ destinations and use drawPattern to render the final shadow. The
+ code divides the rendering in 8 tiles:
+
+ 1 | 2 | 3
+ -----------
+ 4 | | 5
+ -----------
+ 6 | 7 | 8
+
+ The corners are directly copied from the small rectangle to the
+ real one and the side tiles are 1 pixel width, we use them as
+
+ tiles to cover the destination side. The corner tiles are bigger
+ than just the side of the rounded corner, we need to increase it
+ because the modifications caused by the corner over the blur
+ effect. We fill the central part with solid color to complete the
+ shadow.
+ */
+void GraphicsContext::drawTiledShadow(const IntRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, ColorSpace colorSpace)
+{
+#if ENABLE(FILTERS)
+ FloatSize shadowSize;
+ float shadowBlur;
+ Color shadowColor;
+ if (!getShadow(shadowSize, shadowBlur, shadowColor))
+ return;
+
+ // Calculate filter values to create appropriate shadow.
+ cairo_t* cr = m_data->cr;
+
+ IntSize shadowBufferSize;
+ FloatRect shadowRect;
+ float blurRadius = 0;
+ GraphicsContext::calculateShadowBufferDimensions(shadowBufferSize, shadowRect, blurRadius, rect, shadowSize, shadowBlur);
+
+ // Size of the tiling side.
+ int sideTileWidth = 1;
+ float radiusTwice = blurRadius * 2;
+
+ // Find the extra space needed from the curve of the corners.
+ int extraWidthFromCornerRadii = radiusTwice + max(topLeftRadius.width(), bottomLeftRadius.width()) +
+ radiusTwice + max(topRightRadius.width(), bottomRightRadius.width());
+ int extraHeightFromCornerRadii = radiusTwice + max(topLeftRadius.height(), topRightRadius.height()) +
+ radiusTwice + max(bottomLeftRadius.height(), bottomRightRadius.height());
+
+ // The length of a side of the buffer is the enough space for four blur radii,
+ // the radii of the corners, and then 1 pixel to draw the side tiles.
+ IntSize smallBufferSize = IntSize(sideTileWidth + extraWidthFromCornerRadii,
+ sideTileWidth + extraHeightFromCornerRadii);
+
+ if ((smallBufferSize.width() > shadowBufferSize.width()) || (smallBufferSize.height() > shadowBufferSize.height()) || (blurRadius <= 0)) {
+ // Create suitably-sized ImageBuffer to hold the shadow.
+ OwnPtr<ImageBuffer> shadowBuffer = ImageBuffer::create(shadowBufferSize);
+ if (!shadowBuffer)
+ return;
+
+ // Draw shadow into a new ImageBuffer.
+ cairo_t* shadowContext = shadowBuffer->context()->platformContext();
+ copyContextProperties(cr, shadowContext);
+ cairo_translate(shadowContext, -rect.x() + blurRadius, -rect.y() + blurRadius);
+ cairo_new_path(shadowContext);
+ cairo_path_t* path = cairo_copy_path(cr);
+ cairo_append_path(shadowContext, path);
+ cairo_path_destroy(path);
+
+ setPlatformFill(this, shadowContext, m_common);
+
+ applyPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, blurRadius);
+
+ return;
+ }
+
+ OwnPtr<ImageBuffer> smallBuffer = ImageBuffer::create(smallBufferSize);
+ if (!smallBuffer)
+ return;
+
+ IntRect smallRect = IntRect(blurRadius, blurRadius, smallBufferSize.width() - radiusTwice, smallBufferSize.height() - radiusTwice);
+
+ // Draw shadow into a new ImageBuffer.
+ cairo_t* smallBufferContext = smallBuffer->context()->platformContext();
+ copyContextProperties(cr, smallBufferContext);
+ appendWebCorePathToCairoContext(smallBuffer->context()->platformContext(), Path::createRoundedRectangle(smallRect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius));
+ setPlatformFill(this, smallBufferContext, m_common);
+
+ OwnPtr<ImageBuffer> shadowBuffer = ImageBuffer::create(smallBufferSize);
+ if (!shadowBuffer)
+ return;
+
+ smallRect.setSize(smallBufferSize);
+
+ PlatformRefPtr<cairo_surface_t> shadowMask(createShadowMask(smallBuffer.release(), smallRect, blurRadius));
+
+ cairo_t* shadowContext = shadowBuffer->context()->platformContext();
+ setColor(shadowContext, shadowColor);
+ cairo_mask_surface(shadowContext, shadowMask.get(), 0, 0);
+
+ // Fill the internal part of the shadow.
+ shadowRect.inflate(-radiusTwice);
+ if (!shadowRect.isEmpty()) {
+ cairo_save(cr);
+ appendWebCorePathToCairoContext(cr, Path::createRoundedRectangle(shadowRect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius));
+ setColor(cr, shadowColor);
+ cairo_fill(cr);
+ cairo_restore(cr);
+ }
+ shadowRect.inflate(radiusTwice);
+
+ // Draw top side.
+ FloatRect tileRect = FloatRect(radiusTwice + topLeftRadius.width(), 0, sideTileWidth, radiusTwice);
+ FloatRect destRect = tileRect;
+ destRect.move(shadowRect.x(), shadowRect.y());
+ destRect.setWidth(shadowRect.width() - topLeftRadius.width() - topRightRadius.width() - blurRadius * 4);
+ FloatPoint phase = getPhase(destRect, tileRect);
+ AffineTransform patternTransform;
+ patternTransform.makeIdentity();
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the bottom side.
+ tileRect = FloatRect(radiusTwice + bottomLeftRadius.width(), smallBufferSize.height() - radiusTwice, sideTileWidth, radiusTwice);
+ destRect = tileRect;
+ destRect.move(shadowRect.x(), shadowRect.y() + radiusTwice + rect.height() - smallBufferSize.height());
+ destRect.setWidth(shadowRect.width() - bottomLeftRadius.width() - bottomRightRadius.width() - blurRadius * 4);
+ phase = getPhase(destRect, tileRect);
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the right side.
+ tileRect = FloatRect(smallBufferSize.width() - radiusTwice, radiusTwice + topRightRadius.height(), radiusTwice, sideTileWidth);
+ destRect = tileRect;
+ destRect.move(shadowRect.x() + radiusTwice + rect.width() - smallBufferSize.width(), shadowRect.y());
+ destRect.setHeight(shadowRect.height() - topRightRadius.height() - bottomRightRadius.height() - blurRadius * 4);
+ phase = getPhase(destRect, tileRect);
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the left side.
+ tileRect = FloatRect(0, radiusTwice + topLeftRadius.height(), radiusTwice, sideTileWidth);
+ destRect = tileRect;
+ destRect.move(shadowRect.x(), shadowRect.y());
+ destRect.setHeight(shadowRect.height() - topLeftRadius.height() - bottomLeftRadius.height() - blurRadius * 4);
+ phase = FloatPoint(destRect.x() - tileRect.x(), destRect.y() - tileRect.y());
+ shadowBuffer->drawPattern(this, tileRect, patternTransform,
+ phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the top left corner.
+ tileRect = FloatRect(0, 0, radiusTwice + topLeftRadius.width(), radiusTwice + topLeftRadius.height());
+ destRect = tileRect;
+ destRect.move(shadowRect.x(), shadowRect.y());
+ phase = getPhase(destRect, tileRect);
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the top right corner.
+ tileRect = FloatRect(smallBufferSize.width() - radiusTwice - topRightRadius.width(), 0, radiusTwice + topRightRadius.width(), radiusTwice + topRightRadius.height());
+ destRect = tileRect;
+ destRect.move(shadowRect.x() + rect.width() - smallBufferSize.width() + radiusTwice, shadowRect.y());
+ phase = getPhase(destRect, tileRect);
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the bottom right corner.
+ tileRect = FloatRect(smallBufferSize.width() - radiusTwice - bottomRightRadius.width(), smallBufferSize.height() - radiusTwice - bottomRightRadius.height(), radiusTwice + bottomRightRadius.width(), radiusTwice + bottomRightRadius.height());
+ destRect = tileRect;
+ destRect.move(shadowRect.x() + rect.width() - smallBufferSize.width() + radiusTwice, shadowRect.y() + rect.height() - smallBufferSize.height() + radiusTwice);
+ phase = getPhase(destRect, tileRect);
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+
+ // Draw the bottom left corner.
+ tileRect = FloatRect(0, smallBufferSize.height() - radiusTwice - bottomLeftRadius.height(), radiusTwice + bottomLeftRadius.width(), radiusTwice + bottomLeftRadius.height());
+ destRect = tileRect;
+ destRect.move(shadowRect.x(), shadowRect.y() + rect.height() - smallBufferSize.height() + radiusTwice);
+ phase = getPhase(destRect, tileRect);
+ shadowBuffer->drawPattern(this, tileRect, patternTransform, phase, colorSpace, CompositeSourceOver, destRect);
+#endif
+}
+
void GraphicsContext::fillRoundedRect(const IntRect& r, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace)
{
if (paintingDisabled())
@@ -1227,7 +1443,12 @@ void GraphicsContext::fillRoundedRect(const IntRect& r, const IntSize& topLeft,
cairo_save(cr);
appendWebCorePathToCairoContext(cr, Path::createRoundedRectangle(r, topLeft, topRight, bottomLeft, bottomRight));
setColor(cr, color);
- drawPathShadow(this, m_common, true, false);
+ AffineTransform transform = this->getCTM();
+ // drawTiledShadow still does not work with rotations.
+ if (transform.isIdentityOrTranslationOrFlipped())
+ drawTiledShadow(r, topLeft, topRight, bottomLeft, bottomRight, colorSpace);
+ else
+ drawPathShadow(this, m_common, true, false);
cairo_fill(cr);
cairo_restore(cr);
}
diff --git a/WebCore/platform/graphics/cairo/ImageCairo.cpp b/WebCore/platform/graphics/cairo/ImageCairo.cpp
index d9eb5e6..904e819 100644
--- a/WebCore/platform/graphics/cairo/ImageCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageCairo.cpp
@@ -135,14 +135,14 @@ void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const Flo
// Draw the shadow
#if ENABLE(FILTERS)
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (context->getShadow(shadowSize, shadowBlur, shadowColor)) {
+ if (context->getShadow(shadowOffset, shadowBlur, shadowColor)) {
IntSize shadowBufferSize;
FloatRect shadowRect;
float radius = 0;
- context->calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, dstRect, shadowSize, shadowBlur);
+ context->calculateShadowBufferDimensions(shadowBufferSize, shadowRect, radius, dstRect, shadowOffset, shadowBlur);
shadowColor = colorWithOverrideAlpha(shadowColor.rgb(), (shadowColor.alpha() * context->getAlpha()) / 255.f);
//draw shadow into a new ImageBuffer
@@ -153,7 +153,7 @@ void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const Flo
cairo_rectangle(shadowContext, 0, 0, dstRect.width(), dstRect.height());
cairo_fill(shadowContext);
- context->createPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
+ context->applyPlatformShadow(shadowBuffer.release(), shadowColor, shadowRect, radius);
}
#endif
diff --git a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
index df14f9d..c4008cc 100644
--- a/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp
@@ -34,6 +34,7 @@
#include <CoreGraphics/CGBitmapContext.h>
#include <CoreGraphics/CGContext.h>
+#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGImage.h>
#include <wtf/RetainPtr.h>
@@ -48,62 +49,108 @@ bool GraphicsContext3D::getImageData(Image* image,
{
if (!image)
return false;
- CGImageRef cgImage = image->nativeImageForCurrentFrame();
+ CGImageRef cgImage;
+ RetainPtr<CGImageRef> decodedImage;
+ if (image->data()) {
+ ImageSource decoder(false);
+ decoder.setData(image->data(), true);
+ if (!decoder.frameCount())
+ return false;
+ decodedImage = decoder.createFrameAtIndex(0);
+ cgImage = decodedImage.get();
+ } else
+ cgImage = image->nativeImageForCurrentFrame();
if (!cgImage)
return false;
- int width = CGImageGetWidth(cgImage);
- int height = CGImageGetHeight(cgImage);
- // FIXME: we should get rid of this temporary copy where possible.
- int tempRowBytes = width * 4;
- Vector<uint8_t> tempVector;
- tempVector.resize(height * tempRowBytes);
- // Try to reuse the color space from the image to preserve its colors.
- // Some images use a color space (such as indexed) unsupported by the bitmap context.
- CGColorSpaceRef colorSpace = CGImageGetColorSpace(cgImage);
- bool releaseColorSpace = false;
- CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace);
- switch (colorSpaceModel) {
- case kCGColorSpaceModelMonochrome:
- case kCGColorSpaceModelRGB:
- case kCGColorSpaceModelCMYK:
- case kCGColorSpaceModelLab:
- case kCGColorSpaceModelDeviceN:
+ size_t width = CGImageGetWidth(cgImage);
+ size_t height = CGImageGetHeight(cgImage);
+ if (!width || !height || CGImageGetBitsPerComponent(cgImage) != 8)
+ return false;
+ size_t componentsPerPixel = CGImageGetBitsPerPixel(cgImage) / 8;
+ SourceDataFormat srcDataFormat = kSourceFormatRGBA8;
+ AlphaOp neededAlphaOp = kAlphaDoNothing;
+ switch (CGImageGetAlphaInfo(cgImage)) {
+ case kCGImageAlphaPremultipliedFirst:
+ case kCGImageAlphaFirst:
+ case kCGImageAlphaNoneSkipFirst:
+ return false;
+ case kCGImageAlphaPremultipliedLast:
+ // This is a special case for texImage2D with HTMLCanvasElement input,
+ // in which case image->data() should be null.
+ ASSERT(!image->data());
+ if (!premultiplyAlpha)
+ neededAlphaOp = kAlphaDoUnmultiply;
+ switch (componentsPerPixel) {
+ case 2:
+ srcDataFormat = kSourceFormatRA8;
+ break;
+ case 4:
+ srcDataFormat = kSourceFormatRGBA8;
+ break;
+ default:
+ return false;
+ }
break;
- default:
- colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGBLinear);
- releaseColorSpace = true;
+ case kCGImageAlphaLast:
+ if (premultiplyAlpha)
+ neededAlphaOp = kAlphaDoPremultiply;
+ switch (componentsPerPixel) {
+ case 1:
+ srcDataFormat = kSourceFormatA8;
+ break;
+ case 2:
+ srcDataFormat = kSourceFormatRA8;
+ break;
+ case 4:
+ srcDataFormat = kSourceFormatRGBA8;
+ break;
+ default:
+ return false;
+ }
break;
- }
- CGContextRef tempContext = CGBitmapContextCreate(tempVector.data(),
- width, height, 8, tempRowBytes,
- colorSpace,
- // FIXME: change this!
- kCGImageAlphaPremultipliedLast);
- if (releaseColorSpace)
- CGColorSpaceRelease(colorSpace);
- if (!tempContext)
+ case kCGImageAlphaNoneSkipLast:
+ switch (componentsPerPixel) {
+ case 2:
+ srcDataFormat = kSourceFormatRA8;
+ break;
+ case 4:
+ srcDataFormat = kSourceFormatRGBA8;
+ break;
+ default:
+ return false;
+ }
+ case kCGImageAlphaNone:
+ switch (componentsPerPixel) {
+ case 1:
+ srcDataFormat = kSourceFormatR8;
+ break;
+ case 3:
+ srcDataFormat = kSourceFormatRGB8;
+ break;
+ default:
+ return false;
+ }
+ break;
+ default:
return false;
- CGContextSetBlendMode(tempContext, kCGBlendModeCopy);
- CGContextDrawImage(tempContext,
- CGRectMake(0, 0, static_cast<CGFloat>(width), static_cast<CGFloat>(height)),
- cgImage);
- CGContextRelease(tempContext);
- // Pack the pixel data into the output vector.
- unsigned long componentsPerPixel, bytesPerComponent;
- if (!computeFormatAndTypeParameters(format, type, &componentsPerPixel, &bytesPerComponent))
+ }
+ RetainPtr<CFDataRef> pixelData;
+ pixelData.adoptCF(CGDataProviderCopyData(CGImageGetDataProvider(cgImage)));
+ if (!pixelData)
return false;
- int rowBytes = width * componentsPerPixel * bytesPerComponent;
- outputVector.resize(height * rowBytes);
- CGImageAlphaInfo info = CGImageGetAlphaInfo(cgImage);
- bool hasAlphaChannel = (info != kCGImageAlphaNone
- && info != kCGImageAlphaNoneSkipLast
- && info != kCGImageAlphaNoneSkipFirst);
- AlphaOp neededAlphaOp = kAlphaDoNothing;
- if (!premultiplyAlpha && hasAlphaChannel)
- // FIXME: must fetch the image data before the premultiplication step.
- neededAlphaOp = kAlphaDoUnmultiply;
- return packPixels(tempVector.data(), kSourceFormatRGBA8, width, height, 0,
- format, type, neededAlphaOp, outputVector.data());
+ const UInt8* rgba = CFDataGetBytePtr(pixelData.get());
+ outputVector.resize(width * height * 4);
+ unsigned int srcUnpackAlignment = 0;
+ size_t bytesPerRow = CGImageGetBytesPerRow(cgImage);
+ unsigned int padding = bytesPerRow - componentsPerPixel * width;
+ if (padding) {
+ srcUnpackAlignment = padding + 1;
+ while (bytesPerRow % srcUnpackAlignment)
+ ++srcUnpackAlignment;
+ }
+ bool rt = packPixels(rgba, srcDataFormat, width, height, srcUnpackAlignment,
+ format, type, neededAlphaOp, outputVector.data());
+ return rt;
}
void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, int imageWidth, int imageHeight, int canvasWidth, int canvasHeight, CGContextRef context)
diff --git a/WebCore/platform/graphics/chromium/CrossProcessFontLoading.h b/WebCore/platform/graphics/chromium/CrossProcessFontLoading.h
new file mode 100644
index 0000000..e1fb740
--- /dev/null
+++ b/WebCore/platform/graphics/chromium/CrossProcessFontLoading.h
@@ -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.
+ */
+
+#ifndef CrossProcessFontLoading_h
+#define CrossProcessFontLoading_h
+
+#import <wtf/RefCounted.h>
+#import <wtf/RetainPtr.h>
+
+typedef struct CGFont* CGFontRef;
+typedef UInt32 ATSFontContainerRef;
+typedef UInt32 ATSFontRef;
+
+namespace WebCore {
+
+// MemoryActivatedFont encapsulates a font loaded from another process and
+// activated from memory.
+//
+// Responsibilities:
+// * Holder for the CGFontRef & ATSFontRef belonging to the activated font.
+// * Responsible for unloading the font container when done.
+//
+// Memory Management:
+// The class is reference counted, with each instance of FontPlatformData that
+// uses this class holding a reference to it.
+// Entries are kept track of internally in a hash to allow quick lookup
+// of existing instances for reuse:
+// - fontCacheBySrcFontContainerRef() - key is the ATSFontContainerRef
+// corresponding to the *original in-process NSFont* whose loading was blocked
+// by the sandbox.
+// This is needed to allow lookup of a pre-existing MemoryActivatedFont when
+// creating a new FontPlatformData object.
+//
+// Assumptions:
+// This code assumes that an ATSFontRef is a unique identifier tied to an
+// activated font. i.e. After we activate a font, its ATSFontRef doesn't
+// change.
+// It also assumes that the ATSFoncontainerRef for two in-memory NSFonts that
+// correspond to the same on-disk font file are always the same and don't change
+// with time.
+//
+// Flushing caches:
+// When the system notifies us of a system font cache flush, all FontDataCache
+// objects are destroyed. This should in turn dereference all
+// MemoryActivatedFonts and thus unload all in-memory fonts.
+class MemoryActivatedFont : public RefCounted<MemoryActivatedFont> {
+public:
+ // Use to create a new object, see docs on constructor below.
+ static PassRefPtr<MemoryActivatedFont> create(ATSFontContainerRef srcFontContainerRef, ATSFontContainerRef container);
+ ~MemoryActivatedFont();
+
+ // Get cached CGFontRef corresponding to the in-memory font.
+ CGFontRef cgFont() { return m_cgFont.get(); }
+
+ // Get cached ATSFontRef corresponding to the in-memory font.
+ ATSFontRef atsFontRef() { return m_atsFontRef; }
+
+private:
+ // srcFontRef - ATSFontRef belonging to the NSFont object that failed to
+ // load in-process.
+ // container - a font container corresponding to an identical font that
+ // we loaded cross-process.
+ MemoryActivatedFont(ATSFontContainerRef srcFontContainerRef, ATSFontContainerRef container);
+
+ ATSFontContainerRef m_fontContainer;
+ WTF::RetainPtr<CGFontRef> m_cgFont;
+ ATSFontRef m_atsFontRef;
+ ATSFontContainerRef m_srcFontContainerRef;
+};
+
+} // namespace WebCore
+
+#endif // CrossProcessFontLoading_h
diff --git a/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm b/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm
new file mode 100644
index 0000000..a7ec03a
--- /dev/null
+++ b/WebCore/platform/graphics/chromium/CrossProcessFontLoading.mm
@@ -0,0 +1,217 @@
+/*
+ * This file is part of the internal font implementation.
+ *
+ * Copyright (c) 2010 Google 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
+ * 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.
+ *
+ */
+
+// This file provides additional functionality to the Mac FontPlatformData class
+// defined in WebCore/platform/cocoa/FontPlatformDataCocoa.mm .
+// Because we want to support loading fonts between processes in the face of
+// font loading being blocked by the sandbox, we need a mechnasim to both
+// do the loading of in-memory fonts and keep track of them.
+
+#import "config.h"
+#import "CrossProcessFontLoading.h"
+
+#import "../graphics/cocoa/FontPlatformData.h"
+#import "ChromiumBridge.h"
+#import <AppKit/NSFont.h>
+#import <wtf/HashMap.h>
+
+namespace WebCore {
+
+namespace {
+
+typedef HashMap<ATSFontContainerRef, MemoryActivatedFont*> FontContainerRefMemoryFontHash;
+
+// On 10.5, font loading is not blocked by the sandbox and thus there is no
+// need for the cross-process font loading mechanim.
+// On system versions >=10.6 cross-process font loading is required.
+bool OutOfProcessFontLoadingEnabled()
+{
+ static SInt32 systemVersion = 0;
+ if (!systemVersion) {
+ if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
+ return false;
+ }
+
+ return systemVersion >= 0x1060;
+}
+
+FontContainerRefMemoryFontHash& fontCacheBySrcFontContainerRef()
+{
+ DEFINE_STATIC_LOCAL(FontContainerRefMemoryFontHash, srcFontRefCache, ());
+ return srcFontRefCache;
+}
+
+ATSFontContainerRef fontContainerRefFromNSFont(NSFont* srcFont)
+{
+ ATSFontRef fontRef = CTFontGetPlatformFont(toCTFontRef(srcFont), 0);
+ if (!fontRef)
+ return kATSFontContainerRefUnspecified;
+ ATSFontContainerRef fontContainer = kATSFontContainerRefUnspecified;
+ if (ATSFontGetContainer(fontRef, 0, &fontContainer) != noErr)
+ return kATSFontContainerRefUnspecified;
+ return fontContainer;
+}
+
+// The only way we can tell that an in-process font has failed to load
+// is if CTFontCopyGraphicsFont() returns the LastResort font.
+bool isLastResortFont(CGFontRef cgFont)
+{
+ NSString* fontName = (NSString*)CGFontCopyPostScriptName(cgFont);
+ return [fontName isEqualToString:@"LastResort"];
+}
+
+// Given an in-process font which has failed to load, return a
+// MemoryActivatedFont* corresponding to an in-memory representation of the
+// same font loaded from the browser process.
+// On failure this function returns a PassRefPtr pointing to 0.
+PassRefPtr<MemoryActivatedFont> loadFontFromBrowserProcess(NSFont* nsFont)
+{
+ ATSFontContainerRef container;
+ // Send cross-process request to load font.
+ if (!ChromiumBridge::loadFont(nsFont, &container))
+ return 0;
+
+ ATSFontContainerRef srcFontContainerRef = fontContainerRefFromNSFont(nsFont);
+ if (!srcFontContainerRef) {
+ ATSFontDeactivate(container, 0, kATSOptionFlagsDefault);
+ return 0;
+ }
+
+ PassRefPtr<MemoryActivatedFont> font = adoptRef(fontCacheBySrcFontContainerRef().get(srcFontContainerRef));
+ if (font.get())
+ return font;
+
+ return MemoryActivatedFont::create(srcFontContainerRef, container);
+}
+
+} // namespace
+
+PassRefPtr<MemoryActivatedFont> MemoryActivatedFont::create(ATSFontContainerRef srcFontContainerRef, ATSFontContainerRef container)
+{
+ MemoryActivatedFont* font = new MemoryActivatedFont(srcFontContainerRef, container);
+ if (!font->cgFont()) // Object construction failed.
+ {
+ delete font;
+ return 0;
+ }
+ return adoptRef(font);
+}
+
+MemoryActivatedFont::MemoryActivatedFont(ATSFontContainerRef srcFontContainerRef, ATSFontContainerRef container)
+ : m_fontContainer(container)
+ , m_atsFontRef(kATSFontRefUnspecified)
+ , m_srcFontContainerRef(srcFontContainerRef)
+{
+ if (!container)
+ return;
+
+ // Count the number of fonts in the container.
+ ItemCount fontCount = 0;
+ OSStatus err = ATSFontFindFromContainer(container, kATSOptionFlagsDefault, 0, 0, &fontCount);
+ if (err != noErr || fontCount < 1)
+ return;
+
+ // For now always assume that we want the first font in the container.
+ ATSFontFindFromContainer(container, kATSOptionFlagsDefault, 1, &m_atsFontRef, 0);
+
+ if (!m_atsFontRef)
+ return;
+
+ // Cache CGFont representation of the font.
+ m_cgFont.adoptCF(CGFontCreateWithPlatformFont(&m_atsFontRef));
+
+ if (!m_cgFont.get())
+ return;
+
+ // Add ourselves to cache.
+ fontCacheBySrcFontContainerRef().add(m_srcFontContainerRef, this);
+}
+
+// Destructor - Unload font container from memory and remove ourselves
+// from cache.
+MemoryActivatedFont::~MemoryActivatedFont()
+{
+ if (m_cgFont.get()) {
+ // First remove ourselves from the caches.
+ ASSERT(fontCacheBySrcFontContainerRef().contains(m_srcFontContainerRef));
+
+ fontCacheBySrcFontContainerRef().remove(m_srcFontContainerRef);
+
+ // Make sure the CGFont is destroyed before its font container.
+ m_cgFont.releaseRef();
+ }
+
+ if (m_fontContainer != kATSFontContainerRefUnspecified)
+ ATSFontDeactivate(m_fontContainer, 0, kATSOptionFlagsDefault);
+}
+
+// Given an NSFont, try to load a representation of that font into the cgFont
+// parameter. If loading is blocked by the sandbox, the font may be loaded
+// cross-process.
+// If sandbox loading also fails, a fallback font is loaded.
+//
+// Considerations:
+// * cgFont must be CFRelease()ed by the caller when done.
+//
+// Parameters:
+// * nsFont - The font we wish to load.
+// * fontSize - point size of the font we wish to load.
+// * outNSFont - The font that was actually loaded, may be different from nsFont
+// if a fallback font was used.
+// * cgFont - on output this contains the CGFontRef corresponding to the NSFont
+// that was picked in the end. The caller is responsible for calling
+// CFRelease() on this parameter when done with it.
+// * fontID - on output, the ID corresponding to nsFont.
+void FontPlatformData::loadFont(NSFont* nsFont, float fontSize, NSFont*& outNSFont, CGFontRef& cgFont, ATSUFontID& fontID)
+{
+ outNSFont = nsFont;
+ cgFont = CTFontCopyGraphicsFont(toCTFontRef(outNSFont), 0);
+ MemoryActivatedFont* memFont = 0;
+ if (OutOfProcessFontLoadingEnabled() && outNSFont && cgFont && isLastResortFont(cgFont)) {
+ // Release old CGFontRef since it points at the LastResort font which we don't want.
+ CFRelease(cgFont);
+ cgFont = 0;
+
+ // Font loading was blocked by the Sandbox.
+ m_inMemoryFont = loadFontFromBrowserProcess(outNSFont);
+ if (m_inMemoryFont.get()) {
+ cgFont = m_inMemoryFont->cgFont();
+
+ // Need to add an extra retain so output semantics of this function
+ // are consistent.
+ CFRetain(cgFont);
+ } else {
+ // If we still can't load the font, then return Times,
+ // rather than the LastResort font.
+ outNSFont = [NSFont fontWithName:@"Times" size:fontSize];
+ cgFont = CTFontCopyGraphicsFont(toCTFontRef(outNSFont), 0);
+ }
+ }
+
+ if (memFont) {
+ fontID = m_inMemoryFont->atsFontRef();
+ } else {
+ fontID = CTFontGetPlatformFont(toCTFontRef(outNSFont), 0);
+ }
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/graphics/chromium/FontChromiumWin.cpp b/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
index 5b8bad3..78b7517 100644
--- a/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
+++ b/WebCore/platform/graphics/chromium/FontChromiumWin.cpp
@@ -273,10 +273,10 @@ bool TransparencyAwareGlyphPainter::drawGlyphs(int numGlyphs,
// If there is a non-blur shadow and both the fill color and shadow color
// are opaque, handle without skia.
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (m_graphicsContext->getShadow(shadowSize, shadowBlur, shadowColor)) {
+ if (m_graphicsContext->getShadow(shadowOffset, shadowBlur, shadowColor)) {
// If there is a shadow and this code is reached, windowsCanHandleDrawTextShadow()
// will have already returned true during the ctor initiatization of m_useGDI
ASSERT(shadowColor.alpha() == 255);
@@ -285,7 +285,7 @@ bool TransparencyAwareGlyphPainter::drawGlyphs(int numGlyphs,
COLORREF textColor = skia::SkColorToCOLORREF(SkColorSetARGB(255, shadowColor.red(), shadowColor.green(), shadowColor.blue()));
COLORREF savedTextColor = GetTextColor(m_hdc);
SetTextColor(m_hdc, textColor);
- ExtTextOut(m_hdc, x + shadowSize.width(), y + shadowSize.height(), ETO_GLYPH_INDEX, 0, reinterpret_cast<const wchar_t*>(&glyphs[0]), numGlyphs, &advances[0]);
+ ExtTextOut(m_hdc, x + shadowOffset.width(), y + shadowOffset.height(), ETO_GLYPH_INDEX, 0, reinterpret_cast<const wchar_t*>(&glyphs[0]), numGlyphs, &advances[0]);
SetTextColor(m_hdc, savedTextColor);
}
@@ -483,15 +483,15 @@ void Font::drawComplexText(GraphicsContext* graphicsContext,
// If there is a non-blur shadow and both the fill color and shadow color
// are opaque, handle without skia.
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (graphicsContext->getShadow(shadowSize, shadowBlur, shadowColor) && windowsCanHandleDrawTextShadow(graphicsContext)) {
+ if (graphicsContext->getShadow(shadowOffset, shadowBlur, shadowColor) && windowsCanHandleDrawTextShadow(graphicsContext)) {
COLORREF textColor = skia::SkColorToCOLORREF(SkColorSetARGB(255, shadowColor.red(), shadowColor.green(), shadowColor.blue()));
COLORREF savedTextColor = GetTextColor(hdc);
SetTextColor(hdc, textColor);
- state.draw(graphicsContext, hdc, static_cast<int>(point.x()) + shadowSize.width(),
- static_cast<int>(point.y() - ascent()) + shadowSize.height(), from, to);
+ state.draw(graphicsContext, hdc, static_cast<int>(point.x()) + shadowOffset.width(),
+ static_cast<int>(point.y() - ascent()) + shadowOffset.height(), from, to);
SetTextColor(hdc, savedTextColor);
}
diff --git a/WebCore/platform/graphics/chromium/FontPlatformDataChromiumMac.mm b/WebCore/platform/graphics/chromium/FontPlatformDataChromiumMac.mm
deleted file mode 100644
index ad7ebba..0000000
--- a/WebCore/platform/graphics/chromium/FontPlatformDataChromiumMac.mm
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * This file is part of the internal font implementation.
- *
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
- * Copyright (c) 2010 Google 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
- * 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.
- *
- */
-
-// This file is a clone of platform/graphics/mac/FontPlatformDataMac.mm.
-// Because we want to support loading fonts between processes in the face of
-// font loading being blocked by the sandbox, we must maintain a fork.
-// Please maintain this file by performing parallel changes to it.
-//
-// The only changes from FontPlatformDataMac should be:
-// - The functions at the top of this file for loading and caching fonts
-// cross-process.
-// - Changes to FontPlatformData::FontPlatformData(NSFont,bool,bool)
-// - Changes to FontPlatformData::setFont()
-// - Changes to FontPlatformData::~FontPlatformData()
-// - Calls to refMemoryFont() in FontPlatformData::operator= and copy
-// constructor.
-//
-// All changes are marked with "Start/End Chromium Change"
-//
-// For all other differences, if it was introduced in this file, then the
-// maintainer forgot to include it in the list; otherwise it is an update that
-// should have been applied to this file but was not.
-
-
-// Start Chromium Change
-#import "config.h"
-#import "../graphics/mac/FontPlatformData.h"
-
-#import "ChromiumBridge.h"
-#import "PlatformString.h"
-#import "WebCoreSystemInterface.h"
-#import <AppKit/NSFont.h>
-#import <wtf/HashMap.h>
-#import <wtf/RefCounted.h>
-#import <wtf/RetainPtr.h>
-#import <wtf/Vector.h>
-
-namespace WebCore {
-
-namespace {
-
-class MemoryActivatedFont;
-typedef HashMap<ATSFontRef, MemoryActivatedFont*> FontRefMemoryFontHash;
-typedef HashMap<ATSFontContainerRef, MemoryActivatedFont*> FontContainerRefMemoryFontHash;
-
-// On 10.5, font loading is not blocked by the sandbox and thus there is no
-// need for the cross-process font loading mechanim.
-// On system versions >=10.6 cross-process font loading is required.
-bool OutOfProcessFontLoadingEnabled()
-{
- static SInt32 systemVersion = 0;
- if (!systemVersion) {
- if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
- return false;
- }
-
- return systemVersion >= 0x1060;
-}
-
-FontContainerRefMemoryFontHash& fontCacheBySrcFontContainerRef()
-{
- DEFINE_STATIC_LOCAL(FontContainerRefMemoryFontHash, srcFontRefCache, ());
- return srcFontRefCache;
-}
-
-FontRefMemoryFontHash& fontCacheByActualFontRef()
-{
- DEFINE_STATIC_LOCAL(FontRefMemoryFontHash, realFontRefCache, ());
- return realFontRefCache;
-}
-
-ATSFontContainerRef fontContainerRefFromNSFont(NSFont* srcFont)
-{
- ATSFontRef fontRef = CTFontGetPlatformFont(toCTFontRef(srcFont), 0);
- if (!fontRef)
- return kATSFontContainerRefUnspecified;
- ATSFontContainerRef fontContainer = kATSFontContainerRefUnspecified;
- if (ATSFontGetContainer(fontRef, 0, &fontContainer) != noErr)
- return kATSFontContainerRefUnspecified;
- return fontContainer;
-}
-
-// MemoryActivatedFont encapsulates a font loaded from another process and
-// activated from memory.
-//
-// Responsibilities:
-// * Holder for the CGFontRef & ATSFontRef belonging to the activated font.
-// * Responsible for unloading the font container when done.
-//
-// Memory Management:
-// The class is reference counted, with each instance of FontPlatformData that
-// uses this class holding a reference to it.
-// Entries in 2 hashes are maintained internally to allow quick lookup
-// of existing instances for reuse:
-// - fontCacheBySrcFontContainerRef() - key is the ATSFontContainerRef
-// corresponding to the *original in-process NSFont* whose loading was blocked
-// by the sandbox.
-// This is needed to allow lookup of a pre-existing MemoryActivatedFont when
-// creating a new FontPlatformData object.
-// - fontCacheByActualFontRef() - key is the ATSFontRef corresponding to the
-// *new in-memory font* that we got from the browser process.
-// This is needed so that a FontPlatformData object can refer back to the
-// MemoryActivatedFont it's using. Currently this is only needed to release
-// the font on FontPlatformData destruction.
-//
-// Assumptions:
-// This code assumes that an ATSFontRef is a unique identifier tied to an
-// activated font. i.e. After we activate a font, its ATSFontRef doesn't
-// change.
-// It also assumes that the ATSFoncontainerRef for two in-memory NSFonts that
-// correspond to the same on-disk font file are always the same and don't change
-// with time.
-//
-// Flushing caches:
-// When the system notifies us of a system font cache flush, all FontDataCache
-// objects are destroyed. This should in turn dereference all
-// MemoryActivatedFonts and thus unload all in-memory fonts.
-class MemoryActivatedFont : public RefCounted<MemoryActivatedFont> {
-public:
- // srcFontRef - ATSFontRef belonging to the NSFont object that failed to
- // load in-process.
- // container - a font container corresponding to an identical font that
- // we loaded cross-process.
- MemoryActivatedFont(ATSFontContainerRef srcFontContainerRef, ATSFontContainerRef container)
- : m_fontContainer(container)
- , m_atsFontRef(kATSFontRefUnspecified)
- , m_srcFontContainerRef(srcFontContainerRef)
- {
- if (!container)
- return;
-
- // Count the number of fonts in the container.
- ItemCount fontCount = 0;
- OSStatus err = ATSFontFindFromContainer(container, kATSOptionFlagsDefault, 0, 0, &fontCount);
- if (err != noErr || fontCount < 1)
- return;
-
- // For now always assume that we want the first font in the container.
- ATSFontFindFromContainer(container, kATSOptionFlagsDefault, 1, &m_atsFontRef, 0);
-
- if (!m_atsFontRef)
- return;
-
- // Cache CGFont representation of the font.
- m_cgFont.adoptCF(CGFontCreateWithPlatformFont(&m_atsFontRef));
-
- if (!m_cgFont.get())
- return;
-
- // Add ourselves to caches.
- fontCacheBySrcFontContainerRef().add(m_srcFontContainerRef, this);
- fontCacheByActualFontRef().add(m_atsFontRef, this);
- }
-
- // Get cached CGFontRef corresponding to the in-memory font.
- CGFontRef cgFont()
- {
- return m_cgFont.get();
- }
-
- // Get cached ATSFontRef corresponding to the in-memory font.
- ATSFontRef atsFontRef()
- {
- return m_atsFontRef;
- }
-
- // Destructor - Unload font container from memory and remove ourselves
- // from hashes.
- ~MemoryActivatedFont()
- {
- if (m_cgFont.get()) { // Object construction succeeded.
- // First remove ourselves from the caches.
- ASSERT(fontCacheBySrcFontContainerRef().contains(m_srcFontContainerRef));
- ASSERT(fontCacheByActualFontRef().contains(m_atsFontRef));
-
- fontCacheBySrcFontContainerRef().remove(m_srcFontContainerRef);
- fontCacheByActualFontRef().remove(m_atsFontRef);
-
- // Make sure the CGFont is destroyed before its font container.
- m_cgFont.releaseRef();
- }
-
- if (m_fontContainer != kATSFontContainerRefUnspecified)
- ATSFontDeactivate(m_fontContainer, 0, kATSOptionFlagsDefault);
- }
-
-private:
- ATSFontContainerRef m_fontContainer;
- WTF::RetainPtr<CGFontRef> m_cgFont;
- ATSFontRef m_atsFontRef;
- ATSFontContainerRef m_srcFontContainerRef;
-};
-
-// The only way we can tell that an in-process font has failed to load
-// is if CTFontCopyGraphicsFont() returns the LastResort font.
-bool isLastResortFont(CGFontRef cgFont)
-{
- NSString* fontName = (NSString*)CGFontCopyPostScriptName(cgFont);
- return [fontName isEqualToString:@"LastResort"];
-}
-
-// Given an in-process font which has failed to load, return a
-// MemoryActivatedFont* corresponding to an in-memory representation of the
-// same font loaded from the browser process.
-// The caller is responsbile for calling derefMemoryFont() on the ATSFontRef
-// of the returned font.
-// On failure this function returns 0, in which case the caller doesn't need
-// to perform any additional cleanup.
-MemoryActivatedFont* loadFontFromBrowserProcess(NSFont* nsFont)
-{
- ATSFontContainerRef container;
- // Send cross-process request to load font.
- if (!ChromiumBridge::loadFont(nsFont, &container))
- return 0;
-
- ATSFontContainerRef srcFontContainerRef = fontContainerRefFromNSFont(nsFont);
- if (!srcFontContainerRef) {
- ATSFontDeactivate(container, 0, kATSOptionFlagsDefault);
- return 0;
- }
-
- MemoryActivatedFont* font = fontCacheBySrcFontContainerRef().get(srcFontContainerRef);
- if (!font) {
- font = new MemoryActivatedFont(srcFontContainerRef, container);
- if (!font->cgFont()) {
- delete font;
- return 0;
- }
- } else {
- font->ref();
- }
-
- return font;
-}
-
-// deref() the MemoryActivatedFont corresponding to the given ATSFontRef. If no
-// corresponding MemoryActivatedFont object exists, no action is performed.
-void derefMemoryFont(ATSFontRef fontRef)
-{
- if (fontRef == kATSFontRefUnspecified)
- return;
- MemoryActivatedFont* font = fontCacheByActualFontRef().get(fontRef);
- if (font)
- font->deref();
-}
-
-// ref() the MemoryActivatedFont corresponding to the given ATSFontRef. If no
-// corresponding MemoryActivatedFont object exists, no action is performed.
-void refMemoryFont(ATSFontRef fontRef)
-{
- if (fontRef == kATSFontRefUnspecified)
- return;
- MemoryActivatedFont* font = fontCacheByActualFontRef().get(fontRef);
- if (font)
- font->ref();
-}
-
-// Given an NSFont, try to load a representation of that font into the cgFont
-// parameter. If loading is blocked by the sandbox, the font may be loaded
-// cross-process.
-// If sandbox loading also fails, a fallback font is loaded.
-//
-// Considerations:
-// * cgFont must be CFReleas()ed by the caller when done.
-//
-// Parameters:
-// * nsFont - The font we wish to load.
-// * fontSize - point size of the font we wish to load.
-// * outNSFont - The font that was actually loaded, may be different from nsFont
-// if a fallback font was used.
-// * cgFont - on output this contains the CGFontRef corresponding to the NSFont
-// that was picked in the end. The caller is responsible for calling
-// CFRelease() on this parameter when done with it.
-// * fontID - on output, the ID corresponding to nsFont.
-void loadFont(NSFont* nsFont, float fontSize, NSFont*& outNSFont, CGFontRef& cgFont, ATSUFontID& fontID)
-{
- outNSFont = nsFont;
- cgFont = CTFontCopyGraphicsFont(toCTFontRef(outNSFont), 0);
- MemoryActivatedFont* memFont = 0;
- if (OutOfProcessFontLoadingEnabled() && outNSFont && cgFont && isLastResortFont(cgFont)) {
- // Release old CGFontRef since it points at the LastResort font which we don't want.
- CFRelease(cgFont);
- cgFont = 0;
-
- // Font loading was blocked by the Sandbox.
- memFont = loadFontFromBrowserProcess(outNSFont);
- if (memFont) {
- cgFont = memFont->cgFont();
-
- // Need to add an extra retain so output semantics of this function
- // are consistent.
- CFRetain(cgFont);
- } else {
- // If we still can't load the font, then return Times,
- // rather than the LastResort font.
- outNSFont = [NSFont fontWithName:@"Times" size:fontSize];
- cgFont = CTFontCopyGraphicsFont(toCTFontRef(outNSFont), 0);
- }
- }
-
- if (memFont) {
- fontID = memFont->atsFontRef();
- } else {
- fontID = CTFontGetPlatformFont(toCTFontRef(outNSFont), 0);
- }
-}
-
-} // namespace
-// End Chromium Change
-
-FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool syntheticOblique)
- : m_syntheticBold(syntheticBold)
- , m_syntheticOblique(syntheticOblique)
- , m_font(nsFont)
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- , m_isColorBitmapFont(CTFontGetSymbolicTraits(toCTFontRef(nsFont)) & kCTFontColorGlyphsTrait)
-#else
- , m_isColorBitmapFont(false)
-#endif
-{
-// Start Chromium Change
- m_size = nsFont ? [nsFont pointSize] : 0.0f;
- CGFontRef cgFont = 0;
- NSFont* loadedFont = 0;
- loadFont(nsFont, m_size, loadedFont, cgFont, m_atsuFontID);
- m_font = loadedFont;
- if (m_font)
- CFRetain(m_font);
- m_cgFont.adoptCF(cgFont);
-// End Chromium Change
-}
-
-FontPlatformData::FontPlatformData(const FontPlatformData& f)
-{
- m_font = f.m_font && f.m_font != reinterpret_cast<NSFont *>(-1) ? const_cast<NSFont *>(static_cast<const NSFont *>(CFRetain(f.m_font))) : f.m_font;
-
- m_syntheticBold = f.m_syntheticBold;
- m_syntheticOblique = f.m_syntheticOblique;
- m_size = f.m_size;
- m_cgFont = f.m_cgFont;
- m_atsuFontID = f.m_atsuFontID;
- m_isColorBitmapFont = f.m_isColorBitmapFont;
- // Start Chromium Change
- refMemoryFont(m_atsuFontID);
- // End Chromium Change
-}
-
-FontPlatformData::~FontPlatformData()
-{
- if (m_font && m_font != reinterpret_cast<NSFont *>(-1))
- CFRelease(m_font);
-
- // Start Chromium Change
- derefMemoryFont(m_atsuFontID);
- // End Chromium Change
-}
-
-const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& f)
-{
- m_syntheticBold = f.m_syntheticBold;
- m_syntheticOblique = f.m_syntheticOblique;
- m_size = f.m_size;
- m_cgFont = f.m_cgFont;
- m_atsuFontID = f.m_atsuFontID;
- if (m_font == f.m_font)
- return *this;
- if (f.m_font && f.m_font != reinterpret_cast<NSFont *>(-1))
- CFRetain(f.m_font);
- if (m_font && m_font != reinterpret_cast<NSFont *>(-1))
- CFRelease(m_font);
- m_font = f.m_font;
- m_isColorBitmapFont = f.m_isColorBitmapFont;
- // Start Chromium Change
- refMemoryFont(m_atsuFontID);
- // End Chromium Change
- return *this;
-}
-
-void FontPlatformData::setFont(NSFont *font)
-{
- if (m_font == font)
- return;
- if (font)
- CFRetain(font);
- if (m_font && m_font != reinterpret_cast<NSFont *>(-1))
- CFRelease(m_font);
- m_font = font;
- m_size = font ? [font pointSize] : 0.0f;
-
- // Start Chromium Change
- CGFontRef cgFont = 0;
- NSFont* loadedFont = 0;
- loadFont(m_font, m_size, loadedFont, cgFont, m_atsuFontID);
-
- // If loadFont replaced m_font with a fallback font, then release the
- // previous font to counter the retain above. Then retain the new font.
- if (loadedFont != m_font) {
- CFRelease(m_font);
- m_font = loadedFont;
- CFRetain(m_font);
- }
- m_cgFont.adoptCF(cgFont);
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- m_isColorBitmapFont = CTFontGetSymbolicTraits(toCTFontRef(m_font)) & kCTFontColorGlyphsTrait;
-#endif
- // End Chromium Change
-}
-
-bool FontPlatformData::roundsGlyphAdvances() const
-{
- return [m_font renderingMode] == NSFontAntialiasedIntegerAdvancementsRenderingMode;
-}
-
-bool FontPlatformData::allowsLigatures() const
-{
- return ![[m_font coveredCharacterSet] characterIsMember:'a'];
-}
-
-#if USE(CORE_TEXT)
-CTFontRef FontPlatformData::ctFont() const
-{
- if (m_font)
- return toCTFontRef(m_font);
- if (!m_CTFont)
- m_CTFont.adoptCF(CTFontCreateWithGraphicsFont(m_cgFont.get(), m_size, 0, 0));
- return m_CTFont.get();
-}
-#endif // USE(CORE_TEXT)
-
-#ifndef NDEBUG
-String FontPlatformData::description() const
-{
- RetainPtr<CFStringRef> cgFontDescription(AdoptCF, CFCopyDescription(cgFont()));
- return String(cgFontDescription.get()) + " " + String::number(m_size) + (m_syntheticBold ? " synthetic bold" : "") + (m_syntheticOblique ? " synthetic oblique" : "");
-}
-#endif
-
-} // namespace WebCore
diff --git a/WebCore/platform/graphics/chromium/GLES2Canvas.cpp b/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
index c0cb87c..82d4c0b 100644
--- a/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
+++ b/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
@@ -30,15 +30,15 @@
#include "config.h"
-#if USE(GLES2_RENDERING)
-
#include "GLES2Canvas.h"
#include "FloatRect.h"
-#include "GLES2Texture.h"
#include "GraphicsContext3D.h"
#include "IntRect.h"
#include "PlatformString.h"
+#include "SolidFillShader.h"
+#include "TexShader.h"
+#include "Texture.h"
#define _USE_MATH_DEFINES
#include <math.h>
@@ -48,19 +48,6 @@
namespace WebCore {
-static inline void affineTo3x3(const AffineTransform& transform, float mat[9])
-{
- mat[0] = transform.a();
- mat[1] = transform.b();
- mat[2] = 0.0f;
- mat[3] = transform.c();
- mat[4] = transform.d();
- mat[5] = 0.0f;
- mat[6] = transform.e();
- mat[7] = transform.f();
- mat[8] = 1.0f;
-}
-
struct GLES2Canvas::State {
State()
: m_fillColor(0, 0, 0, 255)
@@ -76,18 +63,10 @@ struct GLES2Canvas::State {
GLES2Canvas::GLES2Canvas(GraphicsContext3D* context, const IntSize& size)
: m_context(context)
- , m_quadVertices(0)
- , m_simpleProgram(0)
- , m_texProgram(0)
- , m_simpleMatrixLocation(-1)
- , m_simpleColorLocation(-1)
- , m_simplePositionLocation(-1)
- , m_texMatrixLocation(-1)
- , m_texTexMatrixLocation(-1)
- , m_texSamplerLocation(-1)
- , m_texAlphaLocation(-1)
- , m_texPositionLocation(-1)
, m_state(0)
+ , m_quadVertices(0)
+ , m_solidFillShader(SolidFillShader::create(context))
+ , m_texShader(TexShader::create(context))
{
m_flipMatrix.translate(-1.0f, 1.0f);
m_flipMatrix.scale(2.0f / size.width(), -2.0f / size.height());
@@ -105,8 +84,6 @@ GLES2Canvas::GLES2Canvas(GraphicsContext3D* context, const IntSize& size)
GLES2Canvas::~GLES2Canvas()
{
- m_context->deleteProgram(m_simpleProgram);
- m_context->deleteProgram(m_texProgram);
m_context->deleteBuffer(m_quadVertices);
}
@@ -131,23 +108,11 @@ void GLES2Canvas::fillRect(const FloatRect& rect, const Color& color, ColorSpace
m_context->bindBuffer(GraphicsContext3D::ARRAY_BUFFER, getQuadVertices());
- m_context->useProgram(getSimpleProgram());
-
- float rgba[4];
- color.getRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
- m_context->uniform4f(m_simpleColorLocation, rgba[0] * rgba[3], rgba[1] * rgba[3], rgba[2] * rgba[3], rgba[3]);
-
AffineTransform matrix(m_flipMatrix);
matrix.multLeft(m_state->m_ctm);
matrix.translate(rect.x(), rect.y());
matrix.scale(rect.width(), rect.height());
- float mat[9];
- affineTo3x3(matrix, mat);
- m_context->uniformMatrix3fv(m_simpleMatrixLocation, false /*transpose*/, mat, 1 /*count*/);
-
- m_context->vertexAttribPointer(m_simplePositionLocation, 3, GraphicsContext3D::FLOAT, false, 0, 0);
-
- m_context->enableVertexAttribArray(m_simplePositionLocation);
+ m_solidFillShader->use(matrix, color);
m_context->drawArrays(GraphicsContext3D::TRIANGLE_STRIP, 0, 4);
}
@@ -200,49 +165,35 @@ void GLES2Canvas::restore()
m_state = &m_stateStack.last();
}
-void GLES2Canvas::drawTexturedRect(GLES2Texture* texture, const FloatRect& srcRect, const FloatRect& dstRect, ColorSpace colorSpace, CompositeOperator compositeOp)
+void GLES2Canvas::drawTexturedRect(Texture* texture, const FloatRect& srcRect, const FloatRect& dstRect, ColorSpace colorSpace, CompositeOperator compositeOp)
{
drawTexturedRect(texture, srcRect, dstRect, m_state->m_ctm, m_state->m_alpha, colorSpace, compositeOp);
}
-void GLES2Canvas::drawTexturedRect(GLES2Texture* texture, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform& transform, float alpha, ColorSpace colorSpace, CompositeOperator compositeOp)
+void GLES2Canvas::drawTexturedRect(Texture* texture, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform& transform, float alpha, ColorSpace colorSpace, CompositeOperator compositeOp)
{
applyCompositeOperator(compositeOp);
m_context->bindBuffer(GraphicsContext3D::ARRAY_BUFFER, getQuadVertices());
checkGLError("glBindBuffer");
- m_context->useProgram(getTexProgram());
- checkGLError("glUseProgram");
-
- m_context->activeTexture(GraphicsContext3D::TEXTURE0);
-
- m_context->uniform1i(m_texSamplerLocation, 0);
- checkGLError("glUniform1i");
-
- m_context->uniform1f(m_texAlphaLocation, alpha);
- checkGLError("glUniform1f for alpha");
-
- m_context->vertexAttribPointer(m_texPositionLocation, 3, GraphicsContext3D::FLOAT, false, 0, 0);
-
- m_context->enableVertexAttribArray(m_texPositionLocation);
-
const TilingData& tiles = texture->tiles();
IntRect tileIdxRect = tiles.overlappedTileIndices(srcRect);
for (int y = tileIdxRect.y(); y <= tileIdxRect.bottom(); y++) {
for (int x = tileIdxRect.x(); x <= tileIdxRect.right(); x++)
- drawTexturedRectTile(texture, tiles.tileIndex(x, y), srcRect, dstRect, transform);
+ drawTexturedRectTile(texture, tiles.tileIndex(x, y), srcRect, dstRect, transform, alpha);
}
}
-void GLES2Canvas::drawTexturedRectTile(GLES2Texture* texture, int tile, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform& transform)
+void GLES2Canvas::drawTexturedRectTile(Texture* texture, int tile, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform& transform, float alpha)
{
if (dstRect.isEmpty())
return;
const TilingData& tiles = texture->tiles();
+ m_context->activeTexture(GraphicsContext3D::TEXTURE0);
texture->bindTile(tile);
FloatRect srcRectClippedInTileSpace;
@@ -255,19 +206,13 @@ void GLES2Canvas::drawTexturedRectTile(GLES2Texture* texture, int tile, const Fl
matrix.multLeft(transform);
matrix.translate(dstRectIntersected.x(), dstRectIntersected.y());
matrix.scale(dstRectIntersected.width(), dstRectIntersected.height());
- float mat[9];
- affineTo3x3(matrix, mat);
- m_context->uniformMatrix3fv(m_texMatrixLocation, false /*transpose*/, mat, 1 /*count*/);
- checkGLError("glUniformMatrix3fv");
AffineTransform texMatrix;
texMatrix.scale(1.0f / tileBoundsWithBorder.width(), 1.0f / tileBoundsWithBorder.height());
texMatrix.translate(srcRectClippedInTileSpace.x(), srcRectClippedInTileSpace.y());
texMatrix.scale(srcRectClippedInTileSpace.width(), srcRectClippedInTileSpace.height());
- float texMat[9];
- affineTo3x3(texMatrix, texMat);
- m_context->uniformMatrix3fv(m_texTexMatrixLocation, false /*transpose*/, texMat, 1 /*count*/);
- checkGLError("glUniformMatrix3fv");
+
+ m_texShader->use(matrix, texMatrix, 0, alpha);
m_context->drawArrays(GraphicsContext3D::TRIANGLE_STRIP, 0, 4);
checkGLError("glDrawArrays");
@@ -354,131 +299,21 @@ unsigned GLES2Canvas::getQuadVertices()
return m_quadVertices;
}
-
-static unsigned loadShader(GraphicsContext3D* context, unsigned type, const char* shaderSource)
+Texture* GLES2Canvas::createTexture(NativeImagePtr ptr, Texture::Format format, int width, int height)
{
- unsigned shader = context->createShader(type);
- if (!shader)
- return 0;
-
- String shaderSourceStr(shaderSource);
- context->shaderSource(shader, shaderSourceStr);
- context->compileShader(shader);
- int compileStatus;
- context->getShaderiv(shader, GraphicsContext3D::COMPILE_STATUS, &compileStatus);
- if (!compileStatus) {
- String infoLog = context->getShaderInfoLog(shader);
- LOG_ERROR(infoLog.utf8().data());
- context->deleteShader(shader);
- return 0;
- }
- return shader;
-}
-
-unsigned GLES2Canvas::getSimpleProgram()
-{
- if (!m_simpleProgram) {
- unsigned vertexShader = loadShader(m_context, GraphicsContext3D::VERTEX_SHADER,
- "uniform mat3 matrix;\n"
- "uniform vec4 color;\n"
- "attribute vec3 position;\n"
- "void main() {\n"
- " gl_Position = vec4(matrix * position, 1.0);\n"
- "}\n");
- if (!vertexShader)
- return 0;
- unsigned fragmentShader = loadShader(m_context, GraphicsContext3D::FRAGMENT_SHADER,
- "precision mediump float;\n"
- "uniform mat3 matrix;\n"
- "uniform vec4 color;\n"
- "void main() {\n"
- " gl_FragColor = color;\n"
- "}\n");
- if (!fragmentShader)
- return 0;
- m_simpleProgram = m_context->createProgram();
- if (!m_simpleProgram)
- return 0;
- m_context->attachShader(m_simpleProgram, vertexShader);
- m_context->attachShader(m_simpleProgram, fragmentShader);
- m_context->linkProgram(m_simpleProgram);
- int linkStatus;
- m_context->getProgramiv(m_simpleProgram, GraphicsContext3D::LINK_STATUS, &linkStatus);
- if (!linkStatus) {
- m_context->deleteProgram(m_simpleProgram);
- m_simpleProgram = 0;
- }
- m_context->deleteShader(vertexShader);
- m_context->deleteShader(fragmentShader);
- m_simplePositionLocation = m_context->getAttribLocation(m_simpleProgram, "position");
- m_simpleMatrixLocation = m_context->getUniformLocation(m_simpleProgram, "matrix");
- m_simpleColorLocation = m_context->getUniformLocation(m_simpleProgram, "color");
- }
- return m_simpleProgram;
-}
-
-unsigned GLES2Canvas::getTexProgram()
-{
- if (!m_texProgram) {
- unsigned vertexShader = loadShader(m_context, GraphicsContext3D::VERTEX_SHADER,
- "uniform mat3 matrix;\n"
- "uniform mat3 texMatrix;\n"
- "attribute vec3 position;\n"
- "varying vec3 texCoord;\n"
- "void main() {\n"
- " texCoord = texMatrix * position;\n"
- " gl_Position = vec4(matrix * position, 1.0);\n"
- "}\n");
- if (!vertexShader)
- return 0;
- unsigned fragmentShader = loadShader(m_context, GraphicsContext3D::FRAGMENT_SHADER,
- "precision mediump float;\n"
- "uniform sampler2D sampler;\n"
- "uniform float alpha;\n"
- "varying vec3 texCoord;\n"
- "void main() {\n"
- " gl_FragColor = texture2D(sampler, texCoord.xy)* vec4(alpha);\n"
- "}\n");
- if (!fragmentShader)
- return 0;
- m_texProgram = m_context->createProgram();
- if (!m_texProgram)
- return 0;
- m_context->attachShader(m_texProgram, vertexShader);
- m_context->attachShader(m_texProgram, fragmentShader);
- m_context->linkProgram(m_texProgram);
- int linkStatus;
- m_context->getProgramiv(m_texProgram, GraphicsContext3D::LINK_STATUS, &linkStatus);
- if (!linkStatus) {
- m_context->deleteProgram(m_texProgram);
- m_texProgram = 0;
- }
- m_context->deleteShader(vertexShader);
- m_context->deleteShader(fragmentShader);
- m_texMatrixLocation = m_context->getUniformLocation(m_texProgram, "matrix");
- m_texSamplerLocation = m_context->getUniformLocation(m_texProgram, "sampler");
- m_texTexMatrixLocation = m_context->getUniformLocation(m_texProgram, "texMatrix");
- m_texPositionLocation = m_context->getAttribLocation(m_texProgram, "position");
- m_texAlphaLocation = m_context->getUniformLocation(m_texProgram, "alpha");
- }
- return m_texProgram;
-}
-
-GLES2Texture* GLES2Canvas::createTexture(NativeImagePtr ptr, GLES2Texture::Format format, int width, int height)
-{
- PassRefPtr<GLES2Texture> texture = m_textures.get(ptr);
+ PassRefPtr<Texture> texture = m_textures.get(ptr);
if (texture)
return texture.get();
- texture = GLES2Texture::create(m_context, format, width, height);
- GLES2Texture* t = texture.get();
+ texture = Texture::create(m_context, format, width, height);
+ Texture* t = texture.get();
m_textures.set(ptr, texture);
return t;
}
-GLES2Texture* GLES2Canvas::getTexture(NativeImagePtr ptr)
+Texture* GLES2Canvas::getTexture(NativeImagePtr ptr)
{
- PassRefPtr<GLES2Texture> texture = m_textures.get(ptr);
+ PassRefPtr<Texture> texture = m_textures.get(ptr);
return texture ? texture.get() : 0;
}
@@ -515,4 +350,3 @@ void GLES2Canvas::checkGLError(const char* header)
}
-#endif
diff --git a/WebCore/platform/graphics/chromium/GLES2Canvas.h b/WebCore/platform/graphics/chromium/GLES2Canvas.h
index d00510a..f49ac8b 100644
--- a/WebCore/platform/graphics/chromium/GLES2Canvas.h
+++ b/WebCore/platform/graphics/chromium/GLES2Canvas.h
@@ -31,14 +31,12 @@
#ifndef GLES2Canvas_h
#define GLES2Canvas_h
-#if USE(GLES2_RENDERING)
-
#include "AffineTransform.h"
#include "Color.h"
#include "ColorSpace.h"
-#include "GLES2Texture.h"
#include "GraphicsTypes.h"
#include "ImageSource.h"
+#include "Texture.h"
#include <wtf/HashMap.h>
#include <wtf/Noncopyable.h>
@@ -49,8 +47,10 @@ namespace WebCore {
class Color;
class FloatRect;
class GraphicsContext3D;
+class SolidFillShader;
+class TexShader;
-typedef HashMap<NativeImagePtr, RefPtr<GLES2Texture> > TextureHashMap;
+typedef HashMap<NativeImagePtr, RefPtr<Texture> > TextureHashMap;
class GLES2Canvas : public Noncopyable {
public:
@@ -74,35 +74,25 @@ public:
// non-standard functions
// These are not standard GraphicsContext functions, and should be pushed
// down into a PlatformContextGLES2 at some point.
- void drawTexturedRect(GLES2Texture*, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform&, float alpha, ColorSpace, CompositeOperator);
- void drawTexturedRect(GLES2Texture*, const FloatRect& srcRect, const FloatRect& dstRect, ColorSpace, CompositeOperator);
+ void drawTexturedRect(Texture*, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform&, float alpha, ColorSpace, CompositeOperator);
+ void drawTexturedRect(Texture*, const FloatRect& srcRect, const FloatRect& dstRect, ColorSpace, CompositeOperator);
GraphicsContext3D* context() { return m_context; }
- GLES2Texture* createTexture(NativeImagePtr, GLES2Texture::Format, int width, int height);
- GLES2Texture* getTexture(NativeImagePtr);
+ Texture* createTexture(NativeImagePtr, Texture::Format, int width, int height);
+ Texture* getTexture(NativeImagePtr);
private:
- void drawTexturedRectTile(GLES2Texture* texture, int tile, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform&);
+ void drawTexturedRectTile(Texture* texture, int tile, const FloatRect& srcRect, const FloatRect& dstRect, const AffineTransform&, float alpha);
void applyCompositeOperator(CompositeOperator);
void checkGLError(const char* header);
unsigned getQuadVertices();
- unsigned getSimpleProgram();
- unsigned getTexProgram();
GraphicsContext3D* m_context;
struct State;
WTF::Vector<State> m_stateStack;
State* m_state;
unsigned m_quadVertices;
- unsigned m_simpleProgram;
- unsigned m_texProgram;
- int m_simpleMatrixLocation;
- int m_simpleColorLocation;
- int m_simplePositionLocation;
- int m_texMatrixLocation;
- int m_texTexMatrixLocation;
- int m_texSamplerLocation;
- int m_texAlphaLocation;
- int m_texPositionLocation;
+ OwnPtr<SolidFillShader> m_solidFillShader;
+ OwnPtr<TexShader> m_texShader;
AffineTransform m_flipMatrix;
TextureHashMap m_textures;
CompositeOperator m_lastCompositeOp; // This is the one last set, not necessarily the one in the state stack.
@@ -110,6 +100,4 @@ private:
}
-#endif
-
#endif // GLES2Canvas_h
diff --git a/WebCore/platform/graphics/chromium/LayerChromium.cpp b/WebCore/platform/graphics/chromium/LayerChromium.cpp
index 3553878..6519f1f 100644
--- a/WebCore/platform/graphics/chromium/LayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerChromium.cpp
@@ -109,7 +109,7 @@ LayerChromium::SharedValues::SharedValues()
"uniform vec4 color; \n"
"void main() \n"
"{ \n"
- " gl_FragColor = color; \n"
+ " gl_FragColor = vec4(color.xyz * color.w, color.w);\n"
"} \n";
m_borderShaderProgram = createShaderProgram(borderVertexShaderString, borderFragmentShaderString);
@@ -431,6 +431,37 @@ void LayerChromium::drawDebugBorder()
GLC(glDrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_SHORT, (void*)(6 * sizeof(unsigned short))));
}
+const FloatRect LayerChromium::getDrawRect() const
+{
+ // Form the matrix used by the shader to map the corners of the layer's
+ // bounds into the view space.
+ TransformationMatrix renderMatrix = drawTransform();
+ renderMatrix.scale3d(bounds().width(), bounds().height(), 1);
+
+ FloatRect layerRect(-0.5, -0.5, 1, 1);
+ FloatRect mappedRect = renderMatrix.mapRect(layerRect);
+ return mappedRect;
+}
+
+// Draws the layer with a single colored shader. This method is used to do
+// quick draws into the stencil buffer.
+void LayerChromium::drawAsMask()
+{
+ ASSERT(layerRenderer());
+ const SharedValues* sv = layerRenderer()->layerSharedValues();
+ ASSERT(sv && sv->initialized());
+ layerRenderer()->useShader(sv->borderShaderProgram());
+
+ // We reuse the border shader here as all we need a single colored shader pass.
+ // The color specified here is only for debug puproses as typically when we call this
+ // method, writes to the color channels are disabled.
+ GLC(glUniform4f(sv->borderShaderColorLocation(), 0, 1 , 0, 0.7));
+
+ drawTexturedQuad(layerRenderer()->projectionMatrix(), drawTransform(),
+ bounds().width(), bounds().height(), drawOpacity(),
+ sv->borderShaderMatrixLocation(), -1);
+}
+
// static
void LayerChromium::prepareForDraw(const SharedValues* sv)
{
diff --git a/WebCore/platform/graphics/chromium/LayerChromium.h b/WebCore/platform/graphics/chromium/LayerChromium.h
index 0d0d362..ba15088 100644
--- a/WebCore/platform/graphics/chromium/LayerChromium.h
+++ b/WebCore/platform/graphics/chromium/LayerChromium.h
@@ -151,6 +151,9 @@ public:
bool contentsDirty() { return m_contentsDirty; }
+ // Returns the rect containtaining this layer in the current view's coordinate system.
+ const FloatRect getDrawRect() const;
+
// These methods typically need to be overwritten by derived classes.
virtual bool drawsContent() { return false; }
virtual void updateContents() { };
@@ -158,6 +161,9 @@ public:
void drawDebugBorder();
+ // Draws the layer without a texture. This is used for stencil operations.
+ void drawAsMask();
+
// Stores values that are shared between instances of this class that are
// associated with the same LayerRendererChromium (and hence the same GL
// context).
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
index cf23871..50338d2 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
@@ -183,9 +183,11 @@ void LayerRendererChromium::drawLayers(const IntRect& updateRect, const IntRect&
// Bind the common vertex attributes used for drawing all the layers.
LayerChromium::prepareForDraw(layerSharedValues());
+ // FIXME: These calls can be made once, when the compositor context is initialized.
GLC(glDisable(GL_DEPTH_TEST));
GLC(glDisable(GL_CULL_FACE));
GLC(glDepthFunc(GL_LEQUAL));
+ GLC(glClearStencil(0));
if (m_scrollPosition == IntPoint(-1, -1))
m_scrollPosition = scrollPosition;
@@ -299,14 +301,23 @@ void LayerRendererChromium::drawLayers(const IntRect& updateRect, const IntRect&
for (i = 0; i < sublayers.size(); i++)
updateLayersRecursive(sublayers[i].get(), matrix, opacity);
+ m_rootVisibleRect = visibleRect;
+
// Enable scissoring to avoid rendering composited layers over the scrollbars.
GLC(glEnable(GL_SCISSOR_TEST));
- GLC(glScissor(0, visibleRect.height() - contentRect.height(), contentRect.width(), contentRect.height()));
+ FloatRect scissorRect(contentRect);
+ // The scissorRect should not include the scroll offset.
+ scissorRect.move(-m_scrollPosition.x(), -m_scrollPosition.y());
+ scissorToRect(scissorRect);
+
+ // Clear the stencil buffer to 0.
+ GLC(glClear(GL_STENCIL_BUFFER_BIT));
+ // Disable writes to the stencil buffer.
+ GLC(glStencilMask(0));
// Traverse the layer tree one more time to draw the layers.
- m_visibleRect = visibleRect;
for (i = 0; i < sublayers.size(); i++)
- drawLayersRecursive(sublayers[i].get());
+ drawLayersRecursive(sublayers[i].get(), scissorRect);
GLC(glDisable(GL_SCISSOR_TEST));
@@ -419,13 +430,35 @@ void LayerRendererChromium::updateLayersRecursive(LayerChromium* layer, const Tr
layer->setLayerRenderer(this);
}
+// Does a quick draw of the given layer into the stencil buffer. If decrement
+// is true then it decrements the current stencil values otherwise it increments them.
+void LayerRendererChromium::drawLayerIntoStencilBuffer(LayerChromium* layer, bool decrement)
+{
+ // Enable writes to the stencil buffer and increment the stencil values
+ // by one for every pixel under the current layer.
+ GLC(glStencilMask(0xff));
+ GLC(glStencilFunc(GL_ALWAYS, 1, 0xff));
+ GLenum stencilOp = (decrement ? GL_DECR : GL_INCR);
+ GLC(glStencilOp(stencilOp, stencilOp, stencilOp));
+
+ GLC(glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE));
+
+ layer->drawAsMask();
+
+ // Disable writes to the stencil buffer.
+ GLC(glStencilMask(0));
+ GLC(glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE));
+}
+
// Recursively walk the layer tree and draw the layers.
-void LayerRendererChromium::drawLayersRecursive(LayerChromium* layer)
+void LayerRendererChromium::drawLayersRecursive(LayerChromium* layer, const FloatRect& scissorRect)
{
static bool depthTestEnabledForSubtree = false;
+ static int currentStencilValue = 0;
// Check if the layer falls within the visible bounds of the page.
- bool layerVisible = isLayerVisible(layer, layer->drawTransform(), m_visibleRect);
+ FloatRect layerRect = layer->getDrawRect();
+ bool isLayerVisible = scissorRect.intersects(layerRect);
// Enable depth testing for this layer and all its descendants if preserves3D is set.
bool mustClearDepth = false;
@@ -439,9 +472,50 @@ void LayerRendererChromium::drawLayersRecursive(LayerChromium* layer)
}
}
- if (layerVisible)
+ if (isLayerVisible)
drawLayer(layer);
+ // FIXME: We should check here if the layer has descendants that draw content
+ // before we setup for clipping.
+ FloatRect currentScissorRect = scissorRect;
+ bool mustResetScissorRect = false;
+ bool didStencilDraw = false;
+ if (layer->masksToBounds()) {
+ // If the layer isn't rotated then we can use scissoring otherwise we need
+ // to clip using the stencil buffer.
+ if (layer->drawTransform().isIdentityOrTranslation()) {
+ currentScissorRect.intersect(layerRect);
+ if (currentScissorRect != scissorRect) {
+ scissorToRect(currentScissorRect);
+ mustResetScissorRect = true;
+ }
+ } else if (currentStencilValue < ((1 << m_numStencilBits) - 1)) {
+ // Clipping using the stencil buffer works as follows: When we encounter
+ // a clipping layer we increment the stencil buffer values for all the pixels
+ // the layer touches. As a result 1's will be stored in the stencil buffer for pixels under
+ // the first clipping layer found in a traversal, 2's for pixels in the intersection
+ // of two nested clipping layers, etc. When the sublayers of a clipping layer are drawn
+ // we turn on stencil testing to render only pixels that have the correct stencil
+ // value (one that matches the value of currentStencilValue). As the recursion unravels,
+ // we decrement the stencil buffer values for each clipping layer. When the entire layer tree
+ // is rendered, the stencil values should be all back to zero. An 8 bit stencil buffer
+ // will allow us up to 255 nested clipping layers which is hopefully enough.
+ if (!currentStencilValue)
+ GLC(glEnable(GL_STENCIL_TEST));
+
+ drawLayerIntoStencilBuffer(layer, false);
+
+ currentStencilValue++;
+ didStencilDraw = true;
+ }
+ }
+ // Sublayers will render only if the value in the stencil buffer is equal to
+ // currentStencilValue.
+ if (didStencilDraw) {
+ // The sublayers will render only if the stencil test passes.
+ GLC(glStencilFunc(GL_EQUAL, currentStencilValue, 0xff));
+ }
+
// If we're using depth testing then we need to sort the children in Z to
// get the transparency to work properly.
if (depthTestEnabledForSubtree) {
@@ -456,11 +530,27 @@ void LayerRendererChromium::drawLayersRecursive(LayerChromium* layer)
std::stable_sort(sublayerList.begin(), sublayerList.end(), compareLayerZ);
for (i = 0; i < sublayerList.size(); i++)
- drawLayersRecursive(sublayerList[i]);
+ drawLayersRecursive(sublayerList[i], currentScissorRect);
} else {
const Vector<RefPtr<LayerChromium> >& sublayers = layer->getSublayers();
for (size_t i = 0; i < sublayers.size(); i++)
- drawLayersRecursive(sublayers[i].get());
+ drawLayersRecursive(sublayers[i].get(), currentScissorRect);
+ }
+
+ if (didStencilDraw) {
+ // Draw into the stencil buffer subtracting 1 for every pixel hit
+ // effectively removing this mask
+ drawLayerIntoStencilBuffer(layer, true);
+ currentStencilValue--;
+ if (!currentStencilValue) {
+ // Disable stencil testing.
+ GLC(glDisable(GL_STENCIL_TEST));
+ GLC(glStencilFunc(GL_ALWAYS, 0, 0xff));
+ }
+ }
+
+ if (mustResetScissorRect) {
+ scissorToRect(scissorRect);
}
if (mustClearDepth) {
@@ -494,6 +584,15 @@ void LayerRendererChromium::drawLayer(LayerChromium* layer)
layer->drawDebugBorder();
}
+// Sets the scissor region to the given rectangle. The coordinate system for the
+// scissorRect has its origin at the top left corner of the current visible rect.
+void LayerRendererChromium::scissorToRect(const FloatRect& scissorRect)
+{
+ // Compute the lower left corner of the scissor rect.
+ float bottom = std::max((float)m_rootVisibleRect.height() - scissorRect.bottom(), 0.f);
+ GLC(glScissor(scissorRect.x(), bottom, scissorRect.width(), scissorRect.height()));
+}
+
bool LayerRendererChromium::makeContextCurrent()
{
return m_gles2Context->makeCurrent();
@@ -565,6 +664,9 @@ bool LayerRendererChromium::initializeSharedObjects()
// Get the max texture size supported by the system.
GLC(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_maxTextureSize));
+ // Get the number of bits available in the stencil buffer.
+ GLC(glGetIntegerv(GL_STENCIL_BITS, &m_numStencilBits));
+
m_layerSharedValues = adoptPtr(new LayerChromium::SharedValues());
m_contentLayerSharedValues = adoptPtr(new ContentLayerChromium::SharedValues());
m_canvasLayerSharedValues = adoptPtr(new CanvasLayerChromium::SharedValues());
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.h b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
index 24bbe65..8f44afe 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.h
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
@@ -93,12 +93,16 @@ public:
private:
void updateLayersRecursive(LayerChromium* layer, const TransformationMatrix& parentMatrix, float opacity);
- void drawLayersRecursive(LayerChromium*);
+ void drawLayersRecursive(LayerChromium*, const FloatRect& scissorRect);
void drawLayer(LayerChromium*);
bool isLayerVisible(LayerChromium*, const TransformationMatrix&, const IntRect& visibleRect);
+ void drawLayerIntoStencilBuffer(LayerChromium*, bool decrement);
+
+ void scissorToRect(const FloatRect&);
+
bool makeContextCurrent();
bool initializeSharedObjects();
@@ -135,10 +139,12 @@ private:
IntSize m_rootLayerCanvasSize;
- IntRect m_visibleRect;
+ IntRect m_rootVisibleRect;
int m_maxTextureSize;
+ int m_numStencilBits;
+
// Store values that are shared between instances of each layer type
// associated with this instance of the compositor. Since there can be
// multiple instances of the compositor running in the same renderer process
diff --git a/WebCore/platform/graphics/mac/FontPlatformData.h b/WebCore/platform/graphics/cocoa/FontPlatformData.h
index dc876a8..034e23b 100644
--- a/WebCore/platform/graphics/mac/FontPlatformData.h
+++ b/WebCore/platform/graphics/cocoa/FontPlatformData.h
@@ -42,7 +42,13 @@ typedef const struct __CTFont* CTFontRef;
#include <wtf/Forward.h>
#include <wtf/RetainPtr.h>
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+#include "CrossProcessFontLoading.h"
+#endif
+
+
typedef UInt32 ATSUFontID;
+typedef UInt32 ATSFontRef;
namespace WebCore {
@@ -133,6 +139,15 @@ class FontPlatformData {
private:
static NSFont *hashTableDeletedFontValue() { return reinterpret_cast<NSFont *>(-1); }
+
+ // Load various data about the font specified by |nsFont| with the size fontSize into the following output paramters:
+ // Note: Callers should always take into account that for the Chromium port, |outNSFont| isn't necessarily the same
+ // font as |nsFont|. This because the sandbox may block loading of the original font.
+ // * outNSFont - The font that was actually loaded, for the Chromium port this may be different than nsFont.
+ // The caller is responsible for calling CFRelease() on this parameter when done with it.
+ // * cgFont - CGFontRef representing the input font at the specified point size.
+ // * fontID - ID of loaded font.
+ void loadFont(NSFont* nsFont, float fontSize, NSFont*& outNSFont, CGFontRef& cgFont, ATSUFontID& fontID);
NSFont *m_font;
@@ -147,8 +162,12 @@ private:
#endif
bool m_isColorBitmapFont;
+
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ RefPtr<MemoryActivatedFont> m_inMemoryFont;
+#endif
};
-}
+} // namespace WebCore
#endif
diff --git a/WebCore/platform/graphics/mac/FontPlatformDataMac.mm b/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
index d905b62..bd49dcc 100644
--- a/WebCore/platform/graphics/mac/FontPlatformDataMac.mm
+++ b/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
@@ -2,6 +2,7 @@
* This file is part of the internal font implementation.
*
* Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (c) 2010 Google 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
@@ -29,11 +30,27 @@
namespace WebCore {
+#if PLATFORM(MAC)
+void FontPlatformData::loadFont(NSFont* nsFont, float, NSFont*& outNSFont, CGFontRef& cgFont, ATSUFontID& fontID)
+{
+ outNSFont = nsFont;
+#ifndef BUILDING_ON_TIGER
+ cgFont = CTFontCopyGraphicsFont(toCTFontRef(nsFont), 0);
+ fontID = CTFontGetPlatformFont(toCTFontRef(nsFont), 0);
+#else
+ cgFont = wkGetCGFontFromNSFont(nsFont);
+ fontID = wkGetNSFontATSUFontId(nsFont);
+#endif
+}
+#endif // PLATFORM(MAC)
+
FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool syntheticOblique)
: m_syntheticBold(syntheticBold)
, m_syntheticOblique(syntheticOblique)
, m_font(nsFont)
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ // FIXME: Chromium: The following code isn't correct for the Chromium port since the sandbox might
+ // have blocked font loading, in which case we'll only have the real loaded font file after the call to loadFont().
, m_isColorBitmapFont(CTFontGetSymbolicTraits(toCTFontRef(nsFont)) & kCTFontColorGlyphsTrait)
#else
, m_isColorBitmapFont(false)
@@ -41,14 +58,18 @@ FontPlatformData::FontPlatformData(NSFont *nsFont, bool syntheticBold, bool synt
{
ASSERT_ARG(nsFont, nsFont);
- CFRetain(nsFont);
m_size = [nsFont pointSize];
+
+ CGFontRef cgFont = 0;
+ loadFont(nsFont, m_size, m_font, cgFont, m_atsuFontID);
+
+ if (m_font)
+ CFRetain(m_font);
+
#ifndef BUILDING_ON_TIGER
- m_cgFont.adoptCF(CTFontCopyGraphicsFont(toCTFontRef(nsFont), 0));
- m_atsuFontID = CTFontGetPlatformFont(toCTFontRef(nsFont), 0);
+ m_cgFont.adoptCF(cgFont);
#else
- m_cgFont = wkGetCGFontFromNSFont(nsFont);
- m_atsuFontID = wkGetNSFontATSUFontId(nsFont);
+ m_cgFont = cgFont;
#endif
}
@@ -65,6 +86,9 @@ FontPlatformData::FontPlatformData(const FontPlatformData& f)
#if USE(CORE_TEXT)
m_CTFont = f.m_CTFont;
#endif
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ m_inMemoryFont = f.m_inMemoryFont;
+#endif
}
FontPlatformData:: ~FontPlatformData()
@@ -91,6 +115,9 @@ const FontPlatformData& FontPlatformData::operator=(const FontPlatformData& f)
#if USE(CORE_TEXT)
m_CTFont = f.m_CTFont;
#endif
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ m_inMemoryFont = f.m_inMemoryFont;
+#endif
return *this;
}
@@ -107,15 +134,28 @@ void FontPlatformData::setFont(NSFont *font)
CFRelease(m_font);
m_font = font;
m_size = [font pointSize];
+
+ CGFontRef cgFont = 0;
+ NSFont* loadedFont = 0;
+ loadFont(m_font, m_size, loadedFont, cgFont, m_atsuFontID);
+
+#if PLATFORM(CHROMIUM) && OS(DARWIN)
+ // If loadFont replaced m_font with a fallback font, then release the
+ // previous font to counter the retain above. Then retain the new font.
+ if (loadedFont != m_font) {
+ CFRelease(m_font);
+ CFRetain(loadedFont);
+ m_font = loadedFont;
+ }
+#endif
+
#ifndef BUILDING_ON_TIGER
- m_cgFont.adoptCF(CTFontCopyGraphicsFont(toCTFontRef(font), 0));
- m_atsuFontID = CTFontGetPlatformFont(toCTFontRef(font), 0);
+ m_cgFont.adoptCF(cgFont);
#else
- m_cgFont = wkGetCGFontFromNSFont(font);
- m_atsuFontID = wkGetNSFontATSUFontId(font);
+ m_cgFont = cgFont;
#endif
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- m_isColorBitmapFont = CTFontGetSymbolicTraits(toCTFontRef(font)) & kCTFontColorGlyphsTrait;
+ m_isColorBitmapFont = CTFontGetSymbolicTraits(toCTFontRef(m_font)) & kCTFontColorGlyphsTrait;
#endif
#if USE(CORE_TEXT)
m_CTFont = 0;
diff --git a/WebCore/platform/graphics/gpu/Shader.cpp b/WebCore/platform/graphics/gpu/Shader.cpp
new file mode 100644
index 0000000..59c50a7
--- /dev/null
+++ b/WebCore/platform/graphics/gpu/Shader.cpp
@@ -0,0 +1,111 @@
+/*
+ * 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 "Shader.h"
+
+#include "AffineTransform.h"
+#include "GraphicsContext3D.h"
+
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+// static
+void Shader::affineTo3x3(const AffineTransform& transform, float mat[9])
+{
+ mat[0] = transform.a();
+ mat[1] = transform.b();
+ mat[2] = 0.0f;
+ mat[3] = transform.c();
+ mat[4] = transform.d();
+ mat[5] = 0.0f;
+ mat[6] = transform.e();
+ mat[7] = transform.f();
+ mat[8] = 1.0f;
+}
+
+// static
+unsigned Shader::loadShader(GraphicsContext3D* context, unsigned type, const char* shaderSource)
+{
+ unsigned shader = context->createShader(type);
+ if (!shader)
+ return 0;
+
+ String shaderSourceStr(shaderSource);
+ context->shaderSource(shader, shaderSourceStr);
+ context->compileShader(shader);
+ int compileStatus;
+ context->getShaderiv(shader, GraphicsContext3D::COMPILE_STATUS, &compileStatus);
+ if (!compileStatus) {
+ String infoLog = context->getShaderInfoLog(shader);
+ LOG_ERROR("%s", infoLog.utf8().data());
+ context->deleteShader(shader);
+ return 0;
+ }
+ return shader;
+}
+
+// static
+unsigned Shader::loadProgram(GraphicsContext3D* context, const char* vertexShaderSource, const char* fragmentShaderSource)
+{
+ unsigned vertexShader = loadShader(context, GraphicsContext3D::VERTEX_SHADER, vertexShaderSource);
+ if (!vertexShader)
+ return 0;
+ unsigned fragmentShader = loadShader(context, GraphicsContext3D::FRAGMENT_SHADER, fragmentShaderSource);
+ if (!fragmentShader)
+ return 0;
+ unsigned program = context->createProgram();
+ if (!program)
+ return 0;
+ context->attachShader(program, vertexShader);
+ context->attachShader(program, fragmentShader);
+ context->linkProgram(program);
+ int linkStatus;
+ context->getProgramiv(program, GraphicsContext3D::LINK_STATUS, &linkStatus);
+ if (!linkStatus)
+ context->deleteProgram(program);
+ context->deleteShader(vertexShader);
+ context->deleteShader(fragmentShader);
+ return program;
+}
+
+Shader::Shader(GraphicsContext3D* context, unsigned program)
+ : m_context(context)
+ , m_program(program)
+{
+}
+
+Shader::~Shader()
+{
+ m_context->deleteProgram(m_program);
+}
+
+}
diff --git a/WebCore/platform/graphics/gpu/Shader.h b/WebCore/platform/graphics/gpu/Shader.h
new file mode 100644
index 0000000..e5bd8de
--- /dev/null
+++ b/WebCore/platform/graphics/gpu/Shader.h
@@ -0,0 +1,58 @@
+/*
+ * 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 Shader_h
+#define Shader_h
+
+#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class AffineTransform;
+class GraphicsContext3D;
+class Color;
+
+class Shader : public Noncopyable {
+protected:
+ Shader(GraphicsContext3D*, unsigned program);
+ ~Shader();
+
+ static void affineTo3x3(const AffineTransform&, float mat[9]);
+ static unsigned loadShader(GraphicsContext3D*, unsigned type, const char* shaderSource);
+ static unsigned loadProgram(GraphicsContext3D*, const char* vertexShaderSource, const char* fragmentShaderSource);
+
+ GraphicsContext3D* m_context;
+ unsigned m_program;
+};
+
+}
+
+#endif // Shader_h
diff --git a/WebCore/platform/graphics/gpu/SolidFillShader.cpp b/WebCore/platform/graphics/gpu/SolidFillShader.cpp
new file mode 100644
index 0000000..bbc4792
--- /dev/null
+++ b/WebCore/platform/graphics/gpu/SolidFillShader.cpp
@@ -0,0 +1,86 @@
+/*
+ * 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 "SolidFillShader.h"
+
+#include "Color.h"
+#include "GraphicsContext3D.h"
+
+namespace WebCore {
+
+SolidFillShader::SolidFillShader(GraphicsContext3D* context, unsigned program)
+ : Shader(context, program)
+{
+ m_matrixLocation = context->getUniformLocation(program, "matrix");
+ m_colorLocation = context->getUniformLocation(program, "color");
+ m_positionLocation = context->getAttribLocation(program, "position");
+}
+
+PassOwnPtr<SolidFillShader> SolidFillShader::create(GraphicsContext3D* context)
+{
+ static const char* vertexShaderSource =
+ "uniform mat3 matrix;\n"
+ "uniform vec4 color;\n"
+ "attribute vec3 position;\n"
+ "void main() {\n"
+ " gl_Position = vec4(matrix * position, 1.0);\n"
+ "}\n";
+ static const char* fragmentShaderSource =
+ "precision mediump float;\n"
+ "uniform mat3 matrix;\n"
+ "uniform vec4 color;\n"
+ "void main() {\n"
+ " gl_FragColor = color;\n"
+ "}\n";
+ unsigned program = loadProgram(context, vertexShaderSource, fragmentShaderSource);
+ if (!program)
+ return 0;
+ return new SolidFillShader(context, program);
+}
+
+void SolidFillShader::use(const AffineTransform& transform, const Color& color)
+{
+ m_context->useProgram(m_program);
+
+ float rgba[4];
+ color.getRGBA(rgba[0], rgba[1], rgba[2], rgba[3]);
+ m_context->uniform4f(m_colorLocation, rgba[0] * rgba[3], rgba[1] * rgba[3], rgba[2] * rgba[3], rgba[3]);
+
+ float matrix[9];
+ affineTo3x3(transform, matrix);
+ m_context->uniformMatrix3fv(m_matrixLocation, false /*transpose*/, matrix, 1 /*count*/);
+
+ m_context->vertexAttribPointer(m_positionLocation, 3, GraphicsContext3D::FLOAT, false, 0, 0);
+
+ m_context->enableVertexAttribArray(m_positionLocation);
+}
+
+}
diff --git a/WebCore/platform/graphics/gpu/SolidFillShader.h b/WebCore/platform/graphics/gpu/SolidFillShader.h
new file mode 100644
index 0000000..1071e73
--- /dev/null
+++ b/WebCore/platform/graphics/gpu/SolidFillShader.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 SolidFillShader_h
+#define SolidFillShader_h
+
+#include "Shader.h"
+
+namespace WebCore {
+
+class SolidFillShader : public Shader {
+public:
+ static PassOwnPtr<SolidFillShader> create(GraphicsContext3D* context);
+ void use(const AffineTransform& transform, const Color& color);
+
+private:
+ SolidFillShader(GraphicsContext3D* context, unsigned program);
+
+ int m_matrixLocation;
+ int m_colorLocation;
+ int m_positionLocation;
+};
+
+}
+
+#endif // SolidFillShader_h
diff --git a/WebCore/platform/graphics/gpu/TexShader.cpp b/WebCore/platform/graphics/gpu/TexShader.cpp
new file mode 100644
index 0000000..ba3ecdd
--- /dev/null
+++ b/WebCore/platform/graphics/gpu/TexShader.cpp
@@ -0,0 +1,93 @@
+/*
+ * 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 "TexShader.h"
+
+#include "GraphicsContext3D.h"
+
+namespace WebCore {
+
+TexShader::TexShader(GraphicsContext3D* context, unsigned program)
+ : Shader(context, program)
+{
+ m_matrixLocation = context->getUniformLocation(program, "matrix");
+ m_texMatrixLocation = context->getUniformLocation(program, "texMatrix");
+ m_alphaLocation = context->getUniformLocation(program, "alpha");
+ m_positionLocation = context->getAttribLocation(program, "position");
+ m_samplerLocation = context->getUniformLocation(program, "sampler");
+}
+
+PassOwnPtr<TexShader> TexShader::create(GraphicsContext3D* context)
+{
+ static const char* vertexShaderSource =
+ "uniform mat3 matrix;\n"
+ "uniform mat3 texMatrix;\n"
+ "attribute vec3 position;\n"
+ "varying vec3 texCoord;\n"
+ "void main() {\n"
+ " texCoord = texMatrix * position;\n"
+ " gl_Position = vec4(matrix * position, 1.0);\n"
+ "}\n";
+ static const char* fragmentShaderSource =
+ "precision mediump float;\n"
+ "uniform sampler2D sampler;\n"
+ "uniform float alpha;\n"
+ "varying vec3 texCoord;\n"
+ "void main() {\n"
+ " gl_FragColor = texture2D(sampler, texCoord.xy)* vec4(alpha);\n"
+ "}\n";
+ unsigned program = loadProgram(context, vertexShaderSource, fragmentShaderSource);
+ if (!program)
+ return 0;
+ return new TexShader(context, program);
+}
+
+void TexShader::use(const AffineTransform& transform, const AffineTransform& texTransform, int sampler, float alpha)
+{
+ m_context->useProgram(m_program);
+ float matrix[9];
+ affineTo3x3(transform, matrix);
+ m_context->uniformMatrix3fv(m_matrixLocation, false /*transpose*/, matrix, 1 /*count*/);
+
+ float texMatrix[9];
+ affineTo3x3(texTransform, texMatrix);
+ m_context->uniformMatrix3fv(m_texMatrixLocation, false /*transpose*/, texMatrix, 1 /*count*/);
+
+ m_context->uniform1i(m_samplerLocation, sampler);
+ m_context->uniform1f(m_alphaLocation, alpha);
+
+ m_context->vertexAttribPointer(m_positionLocation, 3, GraphicsContext3D::FLOAT, false, 0, 0);
+
+ m_context->enableVertexAttribArray(m_positionLocation);
+
+}
+
+}
diff --git a/WebCore/platform/graphics/gpu/TexShader.h b/WebCore/platform/graphics/gpu/TexShader.h
new file mode 100644
index 0000000..535997d
--- /dev/null
+++ b/WebCore/platform/graphics/gpu/TexShader.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.
+ */
+
+#ifndef TexShader_h
+#define TexShader_h
+
+#include "Shader.h"
+
+namespace WebCore {
+
+class TexShader : public Shader {
+public:
+ static PassOwnPtr<TexShader> create(GraphicsContext3D* context);
+ void use(const AffineTransform& transform, const AffineTransform& texTransform, int sampler, float alpha);
+
+private:
+ TexShader(GraphicsContext3D* context, unsigned program);
+
+ int m_matrixLocation;
+ int m_texMatrixLocation;
+ int m_samplerLocation;
+ int m_alphaLocation;
+ int m_positionLocation;
+};
+
+}
+
+#endif // TexShader_h
diff --git a/WebCore/platform/graphics/chromium/GLES2Texture.cpp b/WebCore/platform/graphics/gpu/Texture.cpp
index ae230db..557603c 100644
--- a/WebCore/platform/graphics/chromium/GLES2Texture.cpp
+++ b/WebCore/platform/graphics/gpu/Texture.cpp
@@ -30,9 +30,7 @@
#include "config.h"
-#if USE(GLES2_RENDERING)
-
-#include "GLES2Texture.h"
+#include "Texture.h"
#include "GraphicsContext3D.h"
#include "IntRect.h"
@@ -41,7 +39,7 @@
namespace WebCore {
-GLES2Texture::GLES2Texture(GraphicsContext3D* context, PassOwnPtr<Vector<unsigned int> > tileTextureIds, Format format, int width, int height, int maxTextureSize)
+Texture::Texture(GraphicsContext3D* context, PassOwnPtr<Vector<unsigned int> > tileTextureIds, Format format, int width, int height, int maxTextureSize)
: m_context(context)
, m_format(format)
, m_tiles(maxTextureSize, width, height, true)
@@ -49,21 +47,21 @@ GLES2Texture::GLES2Texture(GraphicsContext3D* context, PassOwnPtr<Vector<unsigne
{
}
-GLES2Texture::~GLES2Texture()
+Texture::~Texture()
{
for (unsigned int i = 0; i < m_tileTextureIds->size(); i++)
m_context->deleteTexture(m_tileTextureIds->at(i));
}
-static void convertFormat(GraphicsContext3D* context, GLES2Texture::Format format, unsigned int* glFormat, unsigned int* glType, bool* swizzle)
+static void convertFormat(GraphicsContext3D* context, Texture::Format format, unsigned int* glFormat, unsigned int* glType, bool* swizzle)
{
*swizzle = false;
switch (format) {
- case GLES2Texture::RGBA8:
+ case Texture::RGBA8:
*glFormat = GraphicsContext3D::RGBA;
*glType = GraphicsContext3D::UNSIGNED_BYTE;
break;
- case GLES2Texture::BGRA8:
+ case Texture::BGRA8:
if (context->supportsBGRA()) {
*glFormat = GraphicsContext3D::BGRA_EXT;
*glType = GraphicsContext3D::UNSIGNED_BYTE;
@@ -79,7 +77,7 @@ static void convertFormat(GraphicsContext3D* context, GLES2Texture::Format forma
}
}
-PassRefPtr<GLES2Texture> GLES2Texture::create(GraphicsContext3D* context, Format format, int width, int height)
+PassRefPtr<Texture> Texture::create(GraphicsContext3D* context, Format format, int width, int height)
{
int maxTextureSize = 0;
context->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &maxTextureSize);
@@ -101,7 +99,8 @@ PassRefPtr<GLES2Texture> GLES2Texture::create(GraphicsContext3D* context, Format
IntRect tileBoundsWithBorder = tiling.tileBoundsWithBorder(i);
- unsigned int glFormat, glType;
+ unsigned int glFormat = 0;
+ unsigned int glType = 0;
bool swizzle;
convertFormat(context, format, &glFormat, &glType, &swizzle);
context->bindTexture(GraphicsContext3D::TEXTURE_2D, textureId);
@@ -110,7 +109,7 @@ PassRefPtr<GLES2Texture> GLES2Texture::create(GraphicsContext3D* context, Format
tileBoundsWithBorder.height(),
0, glFormat, glType, 0);
}
- return adoptRef(new GLES2Texture(context, textureIds.leakPtr(), format, width, height, maxTextureSize));
+ return adoptRef(new Texture(context, textureIds.leakPtr(), format, width, height, maxTextureSize));
}
template <bool swizzle>
@@ -135,10 +134,11 @@ static uint32_t* copySubRect(uint32_t* src, int srcX, int srcY, uint32_t* dst, i
return dst;
}
-void GLES2Texture::load(void* pixels)
+void Texture::load(void* pixels)
{
uint32_t* pixels32 = static_cast<uint32_t*>(pixels);
- unsigned int glFormat, glType;
+ unsigned int glFormat = 0;
+ unsigned int glType = 0;
bool swizzle;
convertFormat(m_context, m_format, &glFormat, &glType, &swizzle);
if (swizzle) {
@@ -168,7 +168,7 @@ void GLES2Texture::load(void* pixels)
}
}
-void GLES2Texture::bindTile(int tile)
+void Texture::bindTile(int tile)
{
m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_tileTextureIds->at(tile));
m_context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);
@@ -178,5 +178,3 @@ void GLES2Texture::bindTile(int tile)
}
}
-
-#endif
diff --git a/WebCore/platform/graphics/chromium/GLES2Texture.h b/WebCore/platform/graphics/gpu/Texture.h
index 43a4955..7e4a72b 100644
--- a/WebCore/platform/graphics/chromium/GLES2Texture.h
+++ b/WebCore/platform/graphics/gpu/Texture.h
@@ -28,10 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef GLES2Texture_h
-#define GLES2Texture_h
-
-#if USE(GLES2_RENDERING)
+#ifndef Texture_h
+#define Texture_h
#include "RefCounted.h"
#include "RefPtr.h"
@@ -43,17 +41,17 @@
namespace WebCore {
class GraphicsContext3D;
-class GLES2Texture : public RefCounted<GLES2Texture> {
+class Texture : public RefCounted<Texture> {
public:
- ~GLES2Texture();
+ ~Texture();
enum Format { RGBA8, BGRA8 };
- static PassRefPtr<GLES2Texture> create(GraphicsContext3D*, Format, int width, int height);
+ static PassRefPtr<Texture> create(GraphicsContext3D*, Format, int width, int height);
void bindTile(int tile);
void load(void* pixels);
Format format() const { return m_format; }
const TilingData& tiles() const { return m_tiles; }
private:
- GLES2Texture(GraphicsContext3D*, PassOwnPtr<Vector<unsigned int> > tileTextureIds, Format format, int width, int height, int maxTextureSize);
+ Texture(GraphicsContext3D*, PassOwnPtr<Vector<unsigned int> > tileTextureIds, Format format, int width, int height, int maxTextureSize);
GraphicsContext3D* m_context;
Format m_format;
TilingData m_tiles;
@@ -62,6 +60,4 @@ private:
}
-#endif
-
-#endif // GLES2Texture_h
+#endif // Texture_h
diff --git a/WebCore/platform/graphics/chromium/TilingData.cpp b/WebCore/platform/graphics/gpu/TilingData.cpp
index 4da242b..4da242b 100755..100644
--- a/WebCore/platform/graphics/chromium/TilingData.cpp
+++ b/WebCore/platform/graphics/gpu/TilingData.cpp
diff --git a/WebCore/platform/graphics/chromium/TilingData.h b/WebCore/platform/graphics/gpu/TilingData.h
index f12e66e..f12e66e 100755..100644
--- a/WebCore/platform/graphics/chromium/TilingData.h
+++ b/WebCore/platform/graphics/gpu/TilingData.h
diff --git a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
index 96a639b..e1efdd4 100644
--- a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
+++ b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
@@ -115,13 +115,17 @@ bool GStreamerGWorld::enterFullscreen()
GstQuery* query = gst_query_new_segment(GST_FORMAT_TIME);
gboolean queryResult = gst_element_query(m_pipeline, query);
- // See https://bugzilla.gnome.org/show_bug.cgi?id=620490.
#if GST_CHECK_VERSION(0, 10, 30)
if (!queryResult) {
gst_query_unref(query);
gst_object_unref(GST_OBJECT(srcPad));
return true;
}
+#else
+ // GStreamer < 0.10.30 doesn't set the query result correctly, so
+ // just ignore it to avoid a compilation warning.
+ // See https://bugzilla.gnome.org/show_bug.cgi?id=620490.
+ (void) queryResult;
#endif
GstFormat format;
diff --git a/WebCore/platform/graphics/gstreamer/ImageGStreamer.h b/WebCore/platform/graphics/gstreamer/ImageGStreamer.h
index 3d6d74a..9288df9 100644
--- a/WebCore/platform/graphics/gstreamer/ImageGStreamer.h
+++ b/WebCore/platform/graphics/gstreamer/ImageGStreamer.h
@@ -51,7 +51,6 @@ class ImageGStreamer : public RefCounted<ImageGStreamer> {
#if PLATFORM(CAIRO)
ImageGStreamer(GstBuffer*&, IntSize, cairo_format_t&);
- cairo_surface_t* m_surface;
#endif
#if PLATFORM(MAC)
diff --git a/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp b/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp
index 6f975a4..aeaee19 100644
--- a/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp
+++ b/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp
@@ -49,13 +49,12 @@ PassRefPtr<ImageGStreamer> ImageGStreamer::createImage(GstBuffer* buffer)
ImageGStreamer::ImageGStreamer(GstBuffer*& buffer, IntSize size, cairo_format_t& cairoFormat)
: m_image(0)
- , m_surface(0)
{
- m_surface = cairo_image_surface_create_for_data(GST_BUFFER_DATA(buffer), cairoFormat,
+ cairo_surface_t* surface = cairo_image_surface_create_for_data(GST_BUFFER_DATA(buffer), cairoFormat,
size.width(), size.height(),
cairo_format_stride_for_width(cairoFormat, size.width()));
- ASSERT(cairo_surface_status(m_surface) == CAIRO_STATUS_SUCCESS);
- m_image = BitmapImage::create(m_surface);
+ ASSERT(cairo_surface_status(surface) == CAIRO_STATUS_SUCCESS);
+ m_image = BitmapImage::create(surface);
}
ImageGStreamer::~ImageGStreamer()
@@ -64,9 +63,4 @@ ImageGStreamer::~ImageGStreamer()
m_image.clear();
m_image = 0;
-
- if (m_surface && cairo_surface_get_reference_count(m_surface))
- cairo_surface_destroy(m_surface);
-
- m_surface = 0;
}
diff --git a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index d9d2d97..5628eb3 100644
--- a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -1239,6 +1239,7 @@ static HashSet<String> mimeTypeCache()
for (GList* iterator = factories; iterator; iterator = iterator->next) {
GstTypeFindFactory* factory = GST_TYPE_FIND_FACTORY(iterator->data);
GstCaps* caps = gst_type_find_factory_get_caps(factory);
+ gchar** extensions;
if (!caps)
continue;
@@ -1316,6 +1317,16 @@ static HashSet<String> mimeTypeCache()
g_strfreev(mimetype);
}
+
+ // As a last resort try some special cases depending
+ // on the file extensions registered with the typefind
+ // factory.
+ if (!cached && (extensions = gst_type_find_factory_get_extensions(factory))) {
+ for (int index = 0; extensions[index]; index++) {
+ if (g_str_equal(extensions[index], "m4v"))
+ cache.add(String("video/x-m4v"));
+ }
+ }
}
}
diff --git a/WebCore/platform/graphics/gstreamer/PlatformVideoWindow.h b/WebCore/platform/graphics/gstreamer/PlatformVideoWindow.h
index 83dc5dd..8d99f05 100644
--- a/WebCore/platform/graphics/gstreamer/PlatformVideoWindow.h
+++ b/WebCore/platform/graphics/gstreamer/PlatformVideoWindow.h
@@ -22,14 +22,10 @@
#if ENABLE(VIDEO)
+#include "Widget.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-#if PLATFORM(GTK)
-#include <gtk/gtk.h>
-typedef GtkWidget PlatformWindowType;
-#endif
-
namespace WebCore {
class PlatformVideoWindow : public RefCounted<PlatformVideoWindow> {
@@ -39,13 +35,13 @@ class PlatformVideoWindow : public RefCounted<PlatformVideoWindow> {
PlatformVideoWindow();
~PlatformVideoWindow();
- PlatformWindowType* window() const { return m_window; }
- gulong videoWindowId() const { return m_videoWindowId; }
+ PlatformWidget window() const { return m_window; }
+ unsigned long videoWindowId() const { return m_videoWindowId; }
private:
- gulong m_videoWindowId;
- PlatformWindowType* m_videoWindow;
- PlatformWindowType* m_window;
+ unsigned long m_videoWindowId;
+ PlatformWidget m_videoWindow;
+ PlatformWidget m_window;
};
}
diff --git a/WebCore/platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp b/WebCore/platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
new file mode 100644
index 0000000..5c0e6ea
--- /dev/null
+++ b/WebCore/platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp
@@ -0,0 +1,35 @@
+/*
+ * 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 "PlatformVideoWindow.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+PlatformVideoWindow::PlatformVideoWindow()
+{
+ notImplemented();
+}
+
+PlatformVideoWindow::~PlatformVideoWindow()
+{
+ notImplemented();
+}
diff --git a/WebCore/platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp b/WebCore/platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp
index 185f535..c5f835c 100644
--- a/WebCore/platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp
+++ b/WebCore/platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "PlatformVideoWindow.h"
+#include <gtk/gtk.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> // for GDK_WINDOW_XID
#endif
diff --git a/WebCore/platform/graphics/gtk/CairoUtilities.h b/WebCore/platform/graphics/gtk/CairoUtilities.h
index 89eb458..594abc0 100644
--- a/WebCore/platform/graphics/gtk/CairoUtilities.h
+++ b/WebCore/platform/graphics/gtk/CairoUtilities.h
@@ -26,8 +26,6 @@
#ifndef CairoUtilities_h
#define CairoUtilities_h
-typedef struct _cairo_surface cairo_surface_t;
-typedef struct _GdkPixbuf GdkPixbuf;
GdkPixbuf* cairoImageSurfaceToGdkPixbuf(cairo_surface_t* surface);
#endif // CairoUtilities_h
diff --git a/WebCore/platform/graphics/gtk/FontGtk.cpp b/WebCore/platform/graphics/gtk/FontGtk.cpp
index 92f8816..489bad7 100644
--- a/WebCore/platform/graphics/gtk/FontGtk.cpp
+++ b/WebCore/platform/graphics/gtk/FontGtk.cpp
@@ -241,11 +241,11 @@ void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const F
float red, green, blue, alpha;
// Text shadow, inspired by FontMac
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur = 0;
Color shadowColor;
bool hasShadow = context->textDrawingMode() == cTextFill &&
- context->getShadow(shadowSize, shadowBlur, shadowColor);
+ context->getShadow(shadowOffset, shadowBlur, shadowColor);
// TODO: Blur support
if (hasShadow) {
@@ -257,7 +257,7 @@ void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const F
shadowFillColor.getRGBA(red, green, blue, alpha);
cairo_set_source_rgba(cr, red, green, blue, alpha);
- cairo_translate(cr, shadowSize.width(), shadowSize.height());
+ cairo_translate(cr, shadowOffset.width(), shadowOffset.height());
if (partialRegion) {
gdk_cairo_region(cr, partialRegion);
@@ -290,7 +290,7 @@ void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const F
// Re-enable the platform shadow we disabled earlier
if (hasShadow)
- context->setShadow(shadowSize, shadowBlur, shadowColor, DeviceColorSpace);
+ context->setShadow(shadowOffset, shadowBlur, shadowColor, DeviceColorSpace);
// Pango sometimes leaves behind paths we don't want
cairo_new_path(cr);
diff --git a/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp b/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
index 6561c11..252abd7 100644
--- a/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
@@ -248,7 +248,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
drawLine(origin, endPoint);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint&, int width, TextCheckingLineStyle)
{
if (paintingDisabled())
return;
diff --git a/WebCore/platform/graphics/mac/FontMac.mm b/WebCore/platform/graphics/mac/FontMac.mm
index db77402..33a930b 100644
--- a/WebCore/platform/graphics/mac/FontMac.mm
+++ b/WebCore/platform/graphics/mac/FontMac.mm
@@ -135,11 +135,11 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
CGContextSetFontSize(cgContext, platformData.m_size);
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
ColorSpace fillColorSpace = context->fillColorSpace();
- context->getShadow(shadowSize, shadowBlur, shadowColor);
+ context->getShadow(shadowOffset, shadowBlur, shadowColor);
bool hasSimpleShadow = context->textDrawingMode() == cTextFill && shadowColor.isValid() && !shadowBlur && !platformData.isColorBitmapFont();
if (hasSimpleShadow) {
@@ -148,10 +148,10 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
Color fillColor = context->fillColor();
Color shadowFillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), shadowColor.alpha() * fillColor.alpha() / 255);
context->setFillColor(shadowFillColor, fillColorSpace);
- CGContextSetTextPosition(cgContext, point.x() + shadowSize.width(), point.y() + shadowSize.height());
+ CGContextSetTextPosition(cgContext, point.x() + shadowOffset.width(), point.y() + shadowOffset.height());
showGlyphsWithAdvances(platformData, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
if (font->syntheticBoldOffset()) {
- CGContextSetTextPosition(cgContext, point.x() + shadowSize.width() + font->syntheticBoldOffset(), point.y() + shadowSize.height());
+ CGContextSetTextPosition(cgContext, point.x() + shadowOffset.width() + font->syntheticBoldOffset(), point.y() + shadowOffset.height());
showGlyphsWithAdvances(platformData, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
}
context->setFillColor(fillColor, fillColorSpace);
@@ -165,7 +165,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
}
if (hasSimpleShadow)
- context->setShadow(shadowSize, shadowBlur, shadowColor, fillColorSpace);
+ context->setShadow(shadowOffset, shadowBlur, shadowColor, fillColorSpace);
if (originalShouldUseFontSmoothing != newShouldUseFontSmoothing)
CGContextSetShouldSmoothFonts(cgContext, originalShouldUseFontSmoothing);
diff --git a/WebCore/platform/graphics/mac/GraphicsContextMac.mm b/WebCore/platform/graphics/mac/GraphicsContextMac.mm
index 5f111f6..f3301d8 100644
--- a/WebCore/platform/graphics/mac/GraphicsContextMac.mm
+++ b/WebCore/platform/graphics/mac/GraphicsContextMac.mm
@@ -119,7 +119,7 @@ static NSColor* createPatternColor(NSString* name, NSColor* defaultColor, bool&
}
// WebKit on Mac is a standard platform component, so it must use the standard platform artwork for underline.
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& point, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint& point, int width, TextCheckingLineStyle style)
{
if (paintingDisabled())
return;
@@ -127,23 +127,41 @@ void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& point,
// These are the same for misspelling or bad grammar.
int patternHeight = cMisspellingLineThickness;
int patternWidth = cMisspellingLinePatternWidth;
-
+
bool usingDot;
NSColor *patternColor;
- if (grammar) {
- // Constants for grammar pattern color.
- static bool usingDotForGrammar = false;
- DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, grammarPatternColor, (createPatternColor(@"GrammarDot", [NSColor greenColor], usingDotForGrammar)));
-
- usingDot = usingDotForGrammar;
- patternColor = grammarPatternColor.get();
- } else {
- // Constants for spelling pattern color.
- static bool usingDotForSpelling = false;
- DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@"SpellingDot", [NSColor redColor], usingDotForSpelling)));
-
- usingDot = usingDotForSpelling;
- patternColor = spellingPatternColor.get();
+ switch (style) {
+ case TextCheckingSpellingLineStyle:
+ {
+ // Constants for spelling pattern color.
+ static bool usingDotForSpelling = false;
+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@"SpellingDot", [NSColor redColor], usingDotForSpelling)));
+ usingDot = usingDotForSpelling;
+ patternColor = spellingPatternColor.get();
+ break;
+ }
+ case TextCheckingGrammarLineStyle:
+ {
+ // Constants for grammar pattern color.
+ static bool usingDotForGrammar = false;
+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, grammarPatternColor, (createPatternColor(@"GrammarDot", [NSColor greenColor], usingDotForGrammar)));
+ usingDot = usingDotForGrammar;
+ patternColor = grammarPatternColor.get();
+ break;
+ }
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ case TextCheckingReplacementLineStyle:
+ {
+ // Constants for spelling pattern color.
+ static bool usingDotForSpelling = false;
+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (createPatternColor(@"CorrectionDot", [NSColor blueColor], usingDotForSpelling)));
+ usingDot = usingDotForSpelling;
+ patternColor = spellingPatternColor.get();
+ break;
+ }
+#endif
+ default:
+ return;
}
// Make sure to draw only complete dots.
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index 435e56e..7b0e7af 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -82,6 +82,7 @@ SOFT_LINK_POINTER(QTKit, QTMediaTypeSound, NSString *)
SOFT_LINK_POINTER(QTKit, QTMediaTypeText, NSString *)
SOFT_LINK_POINTER(QTKit, QTMediaTypeVideo, NSString *)
SOFT_LINK_POINTER(QTKit, QTMovieAskUnresolvedDataRefsAttribute, NSString *)
+SOFT_LINK_POINTER(QTKit, QTMovieLoopsAttribute, NSString *)
SOFT_LINK_POINTER(QTKit, QTMovieDataSizeAttribute, NSString *)
SOFT_LINK_POINTER(QTKit, QTMovieDidEndNotification, NSString *)
SOFT_LINK_POINTER(QTKit, QTMovieHasVideoAttribute, NSString *)
@@ -118,6 +119,7 @@ SOFT_LINK_POINTER(QTKit, QTMovieApertureModeAttribute, NSString *)
#define QTMediaTypeText getQTMediaTypeText()
#define QTMediaTypeVideo getQTMediaTypeVideo()
#define QTMovieAskUnresolvedDataRefsAttribute getQTMovieAskUnresolvedDataRefsAttribute()
+#define QTMovieLoopsAttribute getQTMovieLoopsAttribute()
#define QTMovieDataSizeAttribute getQTMovieDataSizeAttribute()
#define QTMovieDidEndNotification getQTMovieDidEndNotification()
#define QTMovieHasVideoAttribute getQTMovieHasVideoAttribute()
@@ -153,6 +155,10 @@ enum {
};
#endif
+@interface FakeQTMovieView : NSObject
+- (WebCoreMovieObserver *)delegate;
+@end
+
using namespace WebCore;
using namespace std;
@@ -243,6 +249,7 @@ void MediaPlayerPrivate::createQTMovie(const String& url)
[NSNumber numberWithBool:YES], QTMoviePreventExternalURLLinksAttribute,
[NSNumber numberWithBool:YES], QTSecurityPolicyNoCrossSiteAttribute,
[NSNumber numberWithBool:NO], QTMovieAskUnresolvedDataRefsAttribute,
+ [NSNumber numberWithBool:NO], QTMovieLoopsAttribute,
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
[NSNumber numberWithBool:YES], @"QTMovieOpenForPlaybackAttribute",
#endif
@@ -254,8 +261,41 @@ void MediaPlayerPrivate::createQTMovie(const String& url)
createQTMovie(cocoaURL, movieAttributes);
}
+static void disableComponentsOnce()
+{
+ static bool sComponentsDisabled = false;
+ if (sComponentsDisabled)
+ return;
+ sComponentsDisabled = true;
+
+ // eat/PDF and grip/PDF components must be disabled twice since they are registered twice
+ // with different flags. However, there is currently a bug in 64-bit QTKit (<rdar://problem/8378237>)
+ // which causes subsequent disable component requests of exactly the same type to be ignored if
+ // QTKitServer has not yet started. As a result, we must pass in exactly the flags we want to
+ // disable per component. As a failsafe, if in the future these flags change, we will disable the
+ // PDF components for a third time with a wildcard flags field:
+ uint32_t componentsToDisable[11][5] = {
+ {'eat ', 'TEXT', 'text', 0, 0},
+ {'eat ', 'TXT ', 'text', 0, 0},
+ {'eat ', 'utxt', 'text', 0, 0},
+ {'eat ', 'TEXT', 'tx3g', 0, 0},
+ {'eat ', 'PDF ', 'vide', 0x44802, 0},
+ {'eat ', 'PDF ', 'vide', 0x45802, 0},
+ {'eat ', 'PDF ', 'vide', 0, 0},
+ {'grip', 'PDF ', 'appl', 0x844a00, 0},
+ {'grip', 'PDF ', 'appl', 0x845a00, 0},
+ {'grip', 'PDF ', 'appl', 0, 0},
+ {'imdc', 'pdf ', 'appl', 0, 0},
+ };
+
+ for (size_t i = 0; i < sizeof(componentsToDisable)/sizeof(componentsToDisable[0]); ++i)
+ wkQTMovieDisableComponent(componentsToDisable[i]);
+}
+
void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes)
{
+ disableComponentsOnce();
+
[[NSNotificationCenter defaultCenter] removeObserver:m_objcObserver.get()];
bool recreating = false;
@@ -315,11 +355,12 @@ void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes
static void mainThreadSetNeedsDisplay(id self, SEL)
{
- id movieView = [self superview];
- ASSERT(!movieView || [movieView isKindOfClass:[QTMovieView class]]);
- if (!movieView || ![movieView isKindOfClass:[QTMovieView class]])
+ id view = [self superview];
+ ASSERT(!view || [view isKindOfClass:[QTMovieView class]]);
+ if (!view || ![view isKindOfClass:[QTMovieView class]])
return;
+ FakeQTMovieView *movieView = static_cast<FakeQTMovieView *>(view);
WebCoreMovieObserver* delegate = [movieView delegate];
ASSERT(!delegate || [delegate isKindOfClass:[WebCoreMovieObserver class]]);
if (!delegate || ![delegate isKindOfClass:[WebCoreMovieObserver class]])
@@ -1382,6 +1423,7 @@ void MediaPlayerPrivate::disableUnsupportedTracks()
allowedTrackTypes->add("sdsm"); // MPEG-4 scene description stream
allowedTrackTypes->add("tmcd"); // timecode
allowedTrackTypes->add("tc64"); // timcode-64
+ allowedTrackTypes->add("tmet"); // timed metadata
}
NSArray *tracks = [m_qtMovie.get() tracks];
diff --git a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
index 126ef2d..94fcc5e 100644
--- a/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
+++ b/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
@@ -101,11 +101,11 @@ static NSString *webFallbackFontFamily(void)
}
#if !ERROR_DISABLED
-#ifdef __LP64__
+#if defined(__LP64__) || (!defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD))
static NSString* pathFromFont(NSFont*)
{
- // FMGetATSFontRefFromFont is not available in 64-bit. As pathFromFont is only used for debugging
- // purposes, returning nil is acceptable.
+ // FMGetATSFontRefFromFont is not available. As pathFromFont is only used for debugging purposes,
+ // returning nil is acceptable.
return nil;
}
#else
diff --git a/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp b/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
index 0faf3ce..37fd8ad 100644
--- a/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
+++ b/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
@@ -273,7 +273,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
UNUSED_PARAM(printing);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& origin, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint& origin, int width, TextCheckingLineStyle style)
{
if (paintingDisabled())
return;
@@ -281,7 +281,7 @@ void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& origin,
notImplemented();
UNUSED_PARAM(origin);
UNUSED_PARAM(width);
- UNUSED_PARAM(grammar);
+ UNUSED_PARAM(style);
}
FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 41c9759..c9c74dd 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -845,7 +845,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool)
drawLine(origin, endPoint);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int, bool)
+void GraphicsContext::drawLineForTextChecking(const IntPoint&, int, TextCheckingLineStyle)
{
if (paintingDisabled())
return;
@@ -889,7 +889,7 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, float blur, const
if (m_common->state.shadowsIgnoreTransforms) {
// Meaning that this graphics context is associated with a CanvasRenderingContext
// We flip the height since CG and HTML5 Canvas have opposite Y axis
- m_common->state.shadowSize = FloatSize(size.width(), -size.height());
+ m_common->state.shadowOffset = FloatSize(size.width(), -size.height());
m_data->shadow = ContextShadow(color, blur, size.width(), -size.height());
} else {
m_data->shadow = ContextShadow(color, blur, size.width(), size.height());
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index e0ac574..c0cfae4 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -190,12 +190,12 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
QPainter::CompositionMode lastCompositionMode = painter->compositionMode();
painter->setCompositionMode(compositionMode);
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (ctxt->getShadow(shadowSize, shadowBlur, shadowColor)) {
+ if (ctxt->getShadow(shadowOffset, shadowBlur, shadowColor)) {
FloatRect shadowImageRect(normalizedDst);
- shadowImageRect.move(shadowSize.width(), shadowSize.height());
+ shadowImageRect.move(shadowOffset.width(), shadowOffset.height());
QImage shadowImage(QSize(static_cast<int>(normalizedSrc.width()), static_cast<int>(normalizedSrc.height())), QImage::Format_ARGB32_Premultiplied);
QPainter p(&shadowImage);
diff --git a/WebCore/platform/graphics/qt/StillImageQt.cpp b/WebCore/platform/graphics/qt/StillImageQt.cpp
index 9c6acab..3038356 100644
--- a/WebCore/platform/graphics/qt/StillImageQt.cpp
+++ b/WebCore/platform/graphics/qt/StillImageQt.cpp
@@ -76,12 +76,12 @@ void StillImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
ctxt->setCompositeOperation(op);
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- if (ctxt->getShadow(shadowSize, shadowBlur, shadowColor)) {
+ if (ctxt->getShadow(shadowOffset, shadowBlur, shadowColor)) {
FloatRect shadowImageRect(normalizedDst);
- shadowImageRect.move(shadowSize.width(), shadowSize.height());
+ shadowImageRect.move(shadowOffset.width(), shadowOffset.height());
QImage shadowImage(QSize(static_cast<int>(normalizedSrc.width()), static_cast<int>(normalizedSrc.height())), QImage::Format_ARGB32_Premultiplied);
QPainter p(&shadowImage);
diff --git a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
index 61039f2..c503307 100644
--- a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
@@ -44,28 +44,40 @@ bool GraphicsContext3D::getImageData(Image* image,
bool premultiplyAlpha,
Vector<uint8_t>& outputVector)
{
- if (!image || !image->data())
+ if (!image)
return false;
- ImageSource decoder(false);
- decoder.setData(image->data(), true);
- if (!decoder.frameCount() || !decoder.frameIsCompleteAtIndex(0))
- return false;
- bool hasAlpha = decoder.frameHasAlphaAtIndex(0);
- OwnPtr<NativeImageSkia> pixels(decoder.createFrameAtIndex(0));
- if (!pixels.get() || !pixels->isDataComplete() || !pixels->width() || !pixels->height())
- return false;
- SkBitmap::Config skiaConfig = pixels->config();
- if (skiaConfig != SkBitmap::kARGB_8888_Config)
+ OwnPtr<NativeImageSkia> pixels;
+ NativeImageSkia* skiaImage = 0;
+ AlphaOp neededAlphaOp = kAlphaDoNothing;
+ if (image->data()) {
+ ImageSource decoder(false);
+ decoder.setData(image->data(), true);
+ if (!decoder.frameCount() || !decoder.frameIsCompleteAtIndex(0))
+ return false;
+ bool hasAlpha = decoder.frameHasAlphaAtIndex(0);
+ pixels = decoder.createFrameAtIndex(0);
+ if (!pixels.get() || !pixels->isDataComplete() || !pixels->width() || !pixels->height())
+ return false;
+ SkBitmap::Config skiaConfig = pixels->config();
+ if (skiaConfig != SkBitmap::kARGB_8888_Config)
+ return false;
+ skiaImage = pixels.get();
+ if (hasAlpha && premultiplyAlpha)
+ neededAlphaOp = kAlphaDoPremultiply;
+ } else {
+ // This is a special case for texImage2D with HTMLCanvasElement input.
+ skiaImage = image->nativeImageForCurrentFrame();
+ if (!premultiplyAlpha)
+ neededAlphaOp = kAlphaDoUnmultiply;
+ }
+ if (!skiaImage)
return false;
- SkBitmap& skiaImageRef = *pixels;
+ SkBitmap& skiaImageRef = *skiaImage;
SkAutoLockPixels lock(skiaImageRef);
- ASSERT(pixels->rowBytes() == pixels->width() * 4);
- outputVector.resize(pixels->rowBytes() * pixels->height());
- AlphaOp neededAlphaOp = kAlphaDoNothing;
- if (hasAlpha && premultiplyAlpha)
- neededAlphaOp = kAlphaDoPremultiply;
- return packPixels(reinterpret_cast<const uint8_t*>(pixels->getPixels()),
- kSourceFormatBGRA8, pixels->width(), pixels->height(), 0,
+ ASSERT(skiaImage->rowBytes() == skiaImage->width() * 4);
+ outputVector.resize(skiaImage->rowBytes() * skiaImage->height());
+ return packPixels(reinterpret_cast<const uint8_t*>(skiaImage->getPixels()),
+ kSourceFormatBGRA8, skiaImage->width(), skiaImage->height(), 0,
format, type, neededAlphaOp, outputVector.data());
}
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index 1b20e26..1c80d49 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -34,6 +34,7 @@
#include "AffineTransform.h"
#include "Color.h"
#include "FloatRect.h"
+#include "GLES2Canvas.h"
#include "Gradient.h"
#include "GraphicsContextPlatformPrivate.h"
#include "GraphicsContextPrivate.h"
@@ -55,10 +56,6 @@
#include <wtf/MathExtras.h>
#include <wtf/UnusedParam.h>
-#if USE(GLES2_RENDERING)
-#include "GLES2Canvas.h"
-#endif
-
using namespace std;
namespace WebCore {
@@ -248,10 +245,8 @@ void GraphicsContext::savePlatformState()
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->save();
-#endif
// Save our private State.
platformContext()->save();
@@ -262,10 +257,8 @@ void GraphicsContext::restorePlatformState()
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->restore();
-#endif
// Restore our private State.
platformContext()->restore();
@@ -345,13 +338,11 @@ void GraphicsContext::clearRect(const FloatRect& rect)
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU()) {
platformContext()->prepareForHardwareDraw();
platformContext()->gpuCanvas()->clearRect(rect);
return;
}
-#endif
platformContext()->prepareForSoftwareDraw();
@@ -459,10 +450,8 @@ void GraphicsContext::concatCTM(const AffineTransform& affine)
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->concatCTM(affine);
-#endif
platformContext()->canvas()->concat(affine);
}
@@ -626,9 +615,7 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
platformContext()->canvas()->drawPoints(SkCanvas::kLines_PointMode, 2, pts, paint);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& pt,
- int width,
- bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint& pt, int width, TextCheckingLineStyle style)
{
if (paintingDisabled())
return;
@@ -780,13 +767,11 @@ void GraphicsContext::fillRect(const FloatRect& rect)
ClipRectToCanvas(*platformContext()->canvas(), r, &r);
}
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU() && !m_common->state.fillPattern && !m_common->state.fillGradient && !platformContext()->getDrawLooper()) {
platformContext()->prepareForHardwareDraw();
platformContext()->gpuCanvas()->fillRect(rect);
return;
}
-#endif
platformContext()->save();
@@ -804,13 +789,11 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorS
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU() && !m_common->state.fillPattern && !m_common->state.fillGradient) {
platformContext()->prepareForHardwareDraw();
platformContext()->gpuCanvas()->fillRect(rect, color, colorSpace);
return;
}
-#endif
platformContext()->prepareForSoftwareDraw();
@@ -932,10 +915,8 @@ void GraphicsContext::scale(const FloatSize& size)
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->scale(size);
-#endif
platformContext()->canvas()->scale(WebCoreFloatToSkScalar(size.width()),
WebCoreFloatToSkScalar(size.height()));
@@ -945,10 +926,10 @@ void GraphicsContext::setAlpha(float alpha)
{
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
+
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->setAlpha(alpha);
-#endif
+
platformContext()->setAlpha(alpha);
}
@@ -956,10 +937,10 @@ void GraphicsContext::setCompositeOperation(CompositeOperator op)
{
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
+
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->setCompositeOperation(op);
-#endif
+
platformContext()->setXfermodeMode(WebCoreCompositeToSkiaComposite(op));
}
@@ -1046,10 +1027,9 @@ void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorS
{
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
+
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->setFillColor(color, colorSpace);
-#endif
platformContext()->setFillColor(color.rgb());
}
@@ -1241,10 +1221,8 @@ void GraphicsContext::rotate(float angleInRadians)
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->rotate(angleInRadians);
-#endif
platformContext()->canvas()->rotate(WebCoreFloatToSkScalar(
angleInRadians * (180.0f / 3.14159265f)));
@@ -1255,10 +1233,8 @@ void GraphicsContext::translate(float w, float h)
if (paintingDisabled())
return;
-#if USE(GLES2_RENDERING)
if (platformContext()->useGPU())
platformContext()->gpuCanvas()->translate(w, h);
-#endif
platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w),
WebCoreFloatToSkScalar(h));
@@ -1266,19 +1242,12 @@ void GraphicsContext::translate(float w, float h)
void GraphicsContext::setGraphicsContext3D(GraphicsContext3D* context3D, const IntSize& size)
{
-#if USE(GLES2_RENDERING)
platformContext()->setGraphicsContext3D(context3D, size);
-#else
- UNUSED_PARAM(context3D);
- UNUSED_PARAM(size);
-#endif
}
void GraphicsContext::syncSoftwareCanvas()
{
-#if USE(GLES2_RENDERING)
platformContext()->syncSoftwareCanvas();
-#endif
}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 1ff87cc..aed289f 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -36,22 +36,20 @@
#include "ChromiumBridge.h"
#include "FloatConversion.h"
#include "FloatRect.h"
+#include "GLES2Canvas.h"
+#include "GLES2Context.h"
#include "GraphicsContext.h"
#include "Logging.h"
#include "NativeImageSkia.h"
#include "PlatformContextSkia.h"
#include "PlatformString.h"
-#include "SkiaUtils.h"
+#include "SkPixelRef.h"
#include "SkRect.h"
#include "SkShader.h"
+#include "SkiaUtils.h"
#include "skia/ext/image_operations.h"
#include "skia/ext/platform_canvas.h"
-#if USE(GLES2_RENDERING)
-#include "GLES2Canvas.h"
-#include "GLES2Context.h"
-#include "SkPixelRef.h"
-#endif
namespace WebCore {
@@ -409,23 +407,21 @@ void Image::drawPattern(GraphicsContext* context,
context->platformContext()->paintSkPaint(destRect, paint);
}
-#if USE(GLES2_RENDERING)
static void drawBitmapGLES2(GraphicsContext* ctxt, NativeImageSkia* bitmap, const FloatRect& srcRect, const FloatRect& dstRect, ColorSpace styleColorSpace, CompositeOperator compositeOp)
{
ctxt->platformContext()->prepareForHardwareDraw();
GLES2Canvas* gpuCanvas = ctxt->platformContext()->gpuCanvas();
- GLES2Texture* texture = gpuCanvas->getTexture(bitmap);
+ Texture* texture = gpuCanvas->getTexture(bitmap);
if (!texture) {
ASSERT(bitmap->config() == SkBitmap::kARGB_8888_Config);
ASSERT(bitmap->rowBytes() == bitmap->width() * 4);
- texture = gpuCanvas->createTexture(bitmap, GLES2Texture::BGRA8, bitmap->width(), bitmap->height());
+ texture = gpuCanvas->createTexture(bitmap, Texture::BGRA8, bitmap->width(), bitmap->height());
SkAutoLockPixels lock(*bitmap);
ASSERT(bitmap->getPixels());
texture->load(bitmap->getPixels());
}
gpuCanvas->drawTexturedRect(texture, srcRect, dstRect, styleColorSpace, compositeOp);
}
-#endif
// ================================================
// BitmapImage Class
@@ -472,12 +468,11 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect,
if (normSrcRect.isEmpty() || normDstRect.isEmpty())
return; // Nothing to draw.
-#if USE(GLES2_RENDERING)
if (ctxt->platformContext()->useGPU()) {
drawBitmapGLES2(ctxt, bm, normSrcRect, normDstRect, colorSpace, compositeOp);
return;
}
-#endif
+
ctxt->platformContext()->prepareForSoftwareDraw();
paintSkBitmap(ctxt->platformContext(),
@@ -501,12 +496,10 @@ void BitmapImageSingleFrameSkia::draw(GraphicsContext* ctxt,
if (normSrcRect.isEmpty() || normDstRect.isEmpty())
return; // Nothing to draw.
-#if USE(GLES2_RENDERING)
if (ctxt->platformContext()->useGPU()) {
drawBitmapGLES2(ctxt, &m_nativeImage, srcRect, dstRect, styleColorSpace, compositeOp);
return;
}
-#endif
ctxt->platformContext()->prepareForSoftwareDraw();
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index b9de0a2..3b1d015 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -34,11 +34,13 @@
#include "AffineTransform.h"
#include "CanvasLayerChromium.h"
+#include "GLES2Canvas.h"
#include "GraphicsContext.h"
+#include "GraphicsContext3D.h"
#include "ImageBuffer.h"
#include "NativeImageSkia.h"
-#include "PlatformContextSkia.h"
#include "SkiaUtils.h"
+#include "Texture.h"
#include "TilingData.h"
#include "skia/ext/image_operations.h"
@@ -46,14 +48,8 @@
#include "SkBitmap.h"
#include "SkColorPriv.h"
-#include "SkShader.h"
#include "SkDashPathEffect.h"
-
-#if USE(GLES2_RENDERING)
-#include "GraphicsContext3D.h"
-#include "GLES2Canvas.h"
-#include "GLES2Texture.h"
-#endif
+#include "SkShader.h"
#include <wtf/MathExtras.h>
#include <wtf/OwnArrayPtr.h>
@@ -210,11 +206,9 @@ PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
#if OS(WINDOWS)
, m_drawingToImageBuffer(false)
#endif
-#if USE(GLES2_RENDERING)
, m_useGPU(false)
, m_gpuCanvas(0)
, m_backingStoreState(None)
-#endif
{
m_stateStack.append(State());
m_state = &m_stateStack.last();
@@ -222,7 +216,7 @@ PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
PlatformContextSkia::~PlatformContextSkia()
{
-#if USE(GLES2_RENDERING) && USE(ACCELERATED_COMPOSITING)
+#if USE(ACCELERATED_COMPOSITING)
if (m_gpuCanvas) {
CanvasLayerChromium* layer = static_cast<CanvasLayerChromium*>(m_gpuCanvas->context()->platformLayer());
layer->setPrepareTextureCallback(0);
@@ -684,7 +678,6 @@ void PlatformContextSkia::applyAntiAliasedClipPaths(WTF::Vector<SkPath>& paths)
m_canvas->restore();
}
-#if USE(GLES2_RENDERING)
#if USE(ACCELERATED_COMPOSITING)
class PrepareTextureCallbackImpl : public CanvasLayerChromium::PrepareTextureCallback {
public:
@@ -793,7 +786,7 @@ void PlatformContextSkia::uploadSoftwareToHardware(CompositeOperator op) const
SkAutoLockPixels lock(bitmap);
GraphicsContext3D* context = m_gpuCanvas->context();
if (!m_uploadTexture || m_uploadTexture->tiles().totalSizeX() < bitmap.width() || m_uploadTexture->tiles().totalSizeY() < bitmap.height())
- m_uploadTexture = GLES2Texture::create(context, GLES2Texture::BGRA8, bitmap.width(), bitmap.height());
+ m_uploadTexture = Texture::create(context, Texture::BGRA8, bitmap.width(), bitmap.height());
m_uploadTexture->load(bitmap.getPixels());
IntRect rect(0, 0, bitmap.width(), bitmap.height());
AffineTransform identity;
@@ -823,5 +816,4 @@ void PlatformContextSkia::readbackHardwareToSoftware() const
}
}
-#endif
} // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.h b/WebCore/platform/graphics/skia/PlatformContextSkia.h
index 6c84797..82edc16 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.h
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.h
@@ -35,22 +35,20 @@
#include "Noncopyable.h"
#include "SkDashPathEffect.h"
-#include "SkDrawLooper.h"
#include "SkDeque.h"
-#include "skia/ext/platform_canvas.h"
+#include "SkDrawLooper.h"
#include "SkPaint.h"
#include "SkPath.h"
+#include "skia/ext/platform_canvas.h"
#include <wtf/Vector.h>
namespace WebCore {
-#if USE(GLES2_RENDERING)
enum CompositeOperator;
class GLES2Canvas;
-class GLES2Texture;
+class Texture;
class GraphicsContext3D;
-#endif
// This class holds the platform-specific state for GraphicsContext. We put
// most of our Skia wrappers on this class. In theory, a lot of this stuff could
@@ -182,24 +180,16 @@ public:
void setImageResamplingHint(const IntSize& srcSize, const FloatSize& dstSize);
void clearImageResamplingHint();
bool hasImageResamplingHint() const;
-#if USE(GLES2_RENDERING)
bool useGPU() { return m_useGPU; }
void setGraphicsContext3D(GraphicsContext3D*, const IntSize&);
GLES2Canvas* gpuCanvas() const { return m_gpuCanvas.get(); }
-#endif
-#if USE(GLES2_RENDERING)
// Call these before making a call that manipulates the underlying
// skia::PlatformCanvas or WebCore::GLES2Canvas
void prepareForSoftwareDraw() const;
void prepareForHardwareDraw() const;
// Call to force the skia::PlatformCanvas to contain all rendering results.
void syncSoftwareCanvas() const;
-#else
- void prepareForSoftwareDraw() const {}
- void prepareForHardwareDraw() const {}
- void syncSoftwareCanvas() const {}
-#endif
private:
#if OS(LINUX) || OS(WINDOWS)
@@ -209,10 +199,8 @@ private:
#endif
void applyAntiAliasedClipPaths(WTF::Vector<SkPath>& paths);
-#if USE(GLES2_RENDERING)
void uploadSoftwareToHardware(CompositeOperator) const;
void readbackHardwareToSoftware() const;
-#endif
// Defines drawing style.
struct State;
@@ -237,12 +225,10 @@ private:
#if OS(WINDOWS)
bool m_drawingToImageBuffer;
#endif
-#if USE(GLES2_RENDERING)
bool m_useGPU;
OwnPtr<GLES2Canvas> m_gpuCanvas;
mutable enum { None, Software, Mixed, Hardware } m_backingStoreState;
- mutable RefPtr<GLES2Texture> m_uploadTexture;
-#endif
+ mutable RefPtr<Texture> m_uploadTexture;
};
}
diff --git a/WebCore/platform/graphics/skia/SkiaFontWin.cpp b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
index 44003bb..9edb775 100644
--- a/WebCore/platform/graphics/skia/SkiaFontWin.cpp
+++ b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
@@ -222,11 +222,11 @@ void SkiaWinOutlineCache::removePathsForFont(HFONT hfont)
bool windowsCanHandleDrawTextShadow(GraphicsContext *context)
{
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- bool hasShadow = context->getShadow(shadowSize, shadowBlur, shadowColor);
+ bool hasShadow = context->getShadow(shadowOffset, shadowBlur, shadowColor);
return (hasShadow && (shadowBlur == 0) && (shadowColor.alpha() == 255) && (context->fillColor().alpha() == 255));
}
diff --git a/WebCore/platform/graphics/win/FontCGWin.cpp b/WebCore/platform/graphics/win/FontCGWin.cpp
index 34f9b07..c6437f2 100644
--- a/WebCore/platform/graphics/win/FontCGWin.cpp
+++ b/WebCore/platform/graphics/win/FontCGWin.cpp
@@ -140,11 +140,11 @@ static void drawGDIGlyphs(GraphicsContext* graphicsContext, const SimpleFontData
drawIntoBitmap = fillColor.alpha() != 255 || graphicsContext->inTransparencyLayer();
if (!drawIntoBitmap) {
- FloatSize size;
+ FloatSize offset;
float blur;
Color color;
- graphicsContext->getShadow(size, blur, color);
- drawIntoBitmap = !size.isEmpty() || blur;
+ graphicsContext->getShadow(offset, blur, color);
+ drawIntoBitmap = offset.width() || offset.height() || blur;
}
}
@@ -349,10 +349,10 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* fo
CGContextSetFontSize(cgContext, platformData.size());
wkSetCGContextFontRenderingStyle(cgContext, font->isSystemFont(), false, font->platformData().useGDI());
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur;
Color shadowColor;
- graphicsContext->getShadow(shadowSize, shadowBlur, shadowColor);
+ graphicsContext->getShadow(shadowOffset, shadowBlur, shadowColor);
bool hasSimpleShadow = graphicsContext->textDrawingMode() == cTextFill && shadowColor.isValid() && !shadowBlur;
if (hasSimpleShadow) {
@@ -361,10 +361,10 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* fo
Color fillColor = graphicsContext->fillColor();
Color shadowFillColor(shadowColor.red(), shadowColor.green(), shadowColor.blue(), shadowColor.alpha() * fillColor.alpha() / 255);
graphicsContext->setFillColor(shadowFillColor, DeviceColorSpace);
- CGContextSetTextPosition(cgContext, point.x() + translation.width() + shadowSize.width(), point.y() + translation.height() + shadowSize.height());
+ CGContextSetTextPosition(cgContext, point.x() + translation.width() + shadowOffset.width(), point.y() + translation.height() + shadowOffset.height());
CGContextShowGlyphsWithAdvances(cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
if (font->syntheticBoldOffset()) {
- CGContextSetTextPosition(cgContext, point.x() + translation.width() + shadowSize.width() + font->syntheticBoldOffset(), point.y() + translation.height() + shadowSize.height());
+ CGContextSetTextPosition(cgContext, point.x() + translation.width() + shadowOffset.width() + font->syntheticBoldOffset(), point.y() + translation.height() + shadowOffset.height());
CGContextShowGlyphsWithAdvances(cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
}
graphicsContext->setFillColor(fillColor, DeviceColorSpace);
@@ -378,7 +378,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const SimpleFontData* fo
}
if (hasSimpleShadow)
- graphicsContext->setShadow(shadowSize, shadowBlur, shadowColor, DeviceColorSpace);
+ graphicsContext->setShadow(shadowOffset, shadowBlur, shadowColor, DeviceColorSpace);
wkRestoreFontSmoothingStyle(cgContext, oldFontSmoothingStyle);
}
diff --git a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
index 84c4ce0..7b65e96 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
@@ -176,11 +176,14 @@ static const Color& grammarPatternColor() {
return grammarColor;
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& point, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint& point, int width, TextCheckingLineStyle style)
{
if (paintingDisabled())
return;
+ if (style != TextCheckingSpellingLineStyle && style != TextCheckingGrammarLineStyle)
+ return;
+
// These are the same for misspelling or bad grammar
const int patternHeight = 3; // 3 rows
ASSERT(cMisspellingLineThickness == patternHeight);
@@ -201,7 +204,7 @@ void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& point,
CGContextRef context = platformContext();
CGContextSaveGState(context);
- const Color& patternColor = grammar ? grammarPatternColor() : spellingPatternColor();
+ const Color& patternColor = style == TextCheckingGrammarLineStyle ? grammarPatternColor() : spellingPatternColor();
setCGStrokeColor(context, patternColor);
wkSetPatternPhaseInUserSpace(context, point);
diff --git a/WebCore/platform/graphics/win/QTMovie.cpp b/WebCore/platform/graphics/win/QTMovie.cpp
index 032b446..cc1349a 100644
--- a/WebCore/platform/graphics/win/QTMovie.cpp
+++ b/WebCore/platform/graphics/win/QTMovie.cpp
@@ -240,6 +240,9 @@ void QTMoviePrivate::createMovieController()
m_movieController = NewMovieController(m_movie, &bounds, flags);
if (!m_movieController)
return;
+
+ // Disable automatic looping.
+ MCDoAction(m_movieController, mcActionSetLooping, 0);
}
void QTMoviePrivate::cacheMovieScale()
diff --git a/WebCore/platform/graphics/wince/FontPlatformData.h b/WebCore/platform/graphics/wince/FontPlatformData.h
index 0b973b8..4a174f0 100644
--- a/WebCore/platform/graphics/wince/FontPlatformData.h
+++ b/WebCore/platform/graphics/wince/FontPlatformData.h
@@ -26,9 +26,9 @@
#define FontPlatformData_h
#include "FontDescription.h"
-#include "StringImpl.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
+#include <wtf/text/StringImpl.h>
typedef struct tagTEXTMETRICW TEXTMETRIC;
typedef struct tagLOGFONTW LOGFONT;
diff --git a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
index e4466c8..990a31d 100644
--- a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
+++ b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
@@ -1062,7 +1062,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
setStrokeStyle(oldStyle);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint&, int width, TextCheckingLineStyle style)
{
notImplemented();
}
@@ -1260,15 +1260,15 @@ void GraphicsContext::fillRoundedRect(const IntRect& fillRect, const IntSize& to
if (!m_data->m_dc)
return;
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur = 0;
Color shadowColor;
- getShadow(shadowSize, shadowBlur, shadowColor);
+ getShadow(shadowOffset, shadowBlur, shadowColor);
IntRect dstRect = fillRect;
- dstRect.move(stableRound(shadowSize.width()), stableRound(shadowSize.height()));
+ dstRect.move(stableRound(shadowOffset.width()), stableRound(shadowOffset.height()));
dstRect.inflate(stableRound(shadowBlur));
dstRect = m_data->mapRect(dstRect);
@@ -1548,11 +1548,6 @@ AffineTransform GraphicsContext::getCTM() const
return m_data->m_transform;
}
-void GraphicsContext::clipToImageBuffer(const FloatRect&, const ImageBuffer*)
-{
- notImplemented();
-}
-
void GraphicsContext::fillRect(const FloatRect& rect)
{
savePlatformState();
@@ -1687,17 +1682,17 @@ void GraphicsContext::drawText(const SimpleFontData* fontData, const GlyphBuffer
return;
}
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur = 0;
Color shadowColor;
bool hasShadow = textDrawingMode() == cTextFill
- && getShadow(shadowSize, shadowBlur, shadowColor)
+ && getShadow(shadowOffset, shadowBlur, shadowColor)
&& shadowColor.alpha();
COLORREF shadowRGBColor;
FloatPoint trShadowPoint;
if (hasShadow) {
shadowRGBColor = RGB(shadowColor.red(), shadowColor.green(), shadowColor.blue());
- trShadowPoint = m_data->mapPoint(startPoint + shadowSize);
+ trShadowPoint = m_data->mapPoint(startPoint + shadowOffset);
}
HGDIOBJ hOldFont = SelectObject(m_data->m_dc, hFont);
diff --git a/WebCore/platform/graphics/wince/ImageBufferWince.cpp b/WebCore/platform/graphics/wince/ImageBufferWince.cpp
index 1a25f4f..10e502d 100644
--- a/WebCore/platform/graphics/wince/ImageBufferWince.cpp
+++ b/WebCore/platform/graphics/wince/ImageBufferWince.cpp
@@ -95,12 +95,33 @@ GraphicsContext* ImageBuffer::context() const
return m_context.get();
}
-Image* ImageBuffer::image() const
+bool ImageBuffer::drawsUsingCopy() const
{
- if (!m_image)
- m_image = adoptRef(new BufferedImage(&m_data));
+ return true;
+}
+
+PassRefPtr<Image> ImageBuffer::copyImage() const
+{
+ return adoptRef(new BufferedImage(&m_data));
+}
+
+void ImageBuffer::clip(GraphicsContext*, const FloatRect&) const
+{
+ notImplemented();
+}
+
+void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
+ CompositeOperator op , bool useLowQualityScale)
+{
+ RefPtr<Image> imageCopy = copyImage();
+ context->drawImage(imageCopy.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
+}
- return m_image.get();
+void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
+ const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
+{
+ RefPtr<Image> imageCopy = copyImage();
+ imageCopy->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
}
template <bool premultiplied> PassRefPtr<ImageData>
diff --git a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
index 2428e7e..a39404a 100644
--- a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
+++ b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
@@ -357,14 +357,18 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
m_data->context->DrawLine(origin.x(), origin.y(), endPoint.x(), endPoint.y());
}
-
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& origin, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint& origin, int width, TextCheckingLineStyle style)
{
- if (grammar)
- m_data->context->SetPen(wxPen(*wxGREEN, 2, wxLONG_DASH));
- else
+ switch (style) {
+ case TextCheckingSpellingLineStyle:
m_data->context->SetPen(wxPen(*wxRED, 2, wxLONG_DASH));
-
+ break;
+ case TextCheckingGrammarLineStyle:
+ m_data->context->SetPen(wxPen(*wxGREEN, 2, wxLONG_DASH));
+ break;
+ default:
+ return;
+ }
m_data->context->DrawLine(origin.x(), origin.y(), origin.x() + width, origin.y());
}
diff --git a/WebCore/platform/gtk/ClipboardGtk.h b/WebCore/platform/gtk/ClipboardGtk.h
index 8b8ee38..f0af318 100644
--- a/WebCore/platform/gtk/ClipboardGtk.h
+++ b/WebCore/platform/gtk/ClipboardGtk.h
@@ -31,8 +31,6 @@
#include "Clipboard.h"
#include "DataObjectGtk.h"
-typedef struct _GtkClipboard GtkClipboard;
-
namespace WebCore {
class CachedImage;
class Frame;
diff --git a/WebCore/platform/gtk/DataObjectGtk.h b/WebCore/platform/gtk/DataObjectGtk.h
index 6f7149c..e6095da 100644
--- a/WebCore/platform/gtk/DataObjectGtk.h
+++ b/WebCore/platform/gtk/DataObjectGtk.h
@@ -27,10 +27,6 @@
#include <wtf/text/CString.h>
#include <wtf/text/StringHash.h>
-typedef struct _GdkPixbuf GdkPixbuf;
-typedef struct _GdkDragContext GdkDragContext;
-typedef struct _GtkClipboard GtkClipboard;
-
namespace WebCore {
class DataObjectGtk : public RefCounted<DataObjectGtk> {
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp
index 7ad2a39..6f3fa19 100644
--- a/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -187,8 +187,7 @@ String pathGetFileName(const String& pathName)
String directoryName(const String& path)
{
/* No null checking needed */
- GOwnPtr<char> tmpFilename(const_cast<char*>(fileSystemRepresentation(path).data()));
- GOwnPtr<char> dirname(g_path_get_dirname(tmpFilename.get()));
+ GOwnPtr<char> dirname(g_path_get_dirname(fileSystemRepresentation(path).data()));
return String::fromUTF8(dirname.get());
}
diff --git a/WebCore/platform/gtk/GOwnPtrGtk.h b/WebCore/platform/gtk/GOwnPtrGtk.h
index 8341661..c5d9cdc 100644
--- a/WebCore/platform/gtk/GOwnPtrGtk.h
+++ b/WebCore/platform/gtk/GOwnPtrGtk.h
@@ -22,9 +22,6 @@
#include "GOwnPtr.h"
-typedef union _GdkEvent GdkEvent;
-typedef struct _GtkIconInfo GtkIconInfo;
-
namespace WTF {
template <> void freeOwnedGPtr<GdkEvent>(GdkEvent*);
diff --git a/WebCore/platform/gtk/GRefPtrGtk.h b/WebCore/platform/gtk/GRefPtrGtk.h
index ea1b089..5e6ab78 100644
--- a/WebCore/platform/gtk/GRefPtrGtk.h
+++ b/WebCore/platform/gtk/GRefPtrGtk.h
@@ -23,9 +23,6 @@
#include "GRefPtr.h"
-typedef struct _GtkTargetList GtkTargetList;
-typedef struct _GdkCursor GdkCursor;
-
namespace WTF {
template <> GtkTargetList* refPlatformPtr(GtkTargetList* ptr);
diff --git a/WebCore/platform/gtk/GtkVersioning.cpp b/WebCore/platform/gtk/GtkVersioning.c
index e7734a8..7dd601e 100644
--- a/WebCore/platform/gtk/GtkVersioning.cpp
+++ b/WebCore/platform/gtk/GtkVersioning.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Collabora Ltd.
+ * Copyright (C) 2010 Igalia, S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -17,7 +18,6 @@
* Boston, MA 02110-1301, USA.
*/
-#include "config.h"
#include "GtkVersioning.h"
#include <gtk/gtk.h>
@@ -48,3 +48,22 @@ void gtk_adjustment_configure(GtkAdjustment* adjustment, gdouble value, gdouble
gtk_adjustment_value_changed(adjustment);
}
#endif
+
+GdkDevice *getDefaultGDKPointerDevice(GdkWindow* window)
+{
+#ifndef GTK_API_VERSION_2
+ GdkDeviceManager *manager = gdk_display_get_device_manager(gdk_drawable_get_display(window));
+ return gdk_device_manager_get_client_pointer(manager);
+#else
+ return gdk_device_get_core_pointer();
+#endif // GTK_API_VERSION_2
+}
+
+#if !GTK_CHECK_VERSION(2, 17, 3)
+static void gdk_window_get_root_coords(GdkWindow* window, gint x, gint y, gint* rootX, gint* rootY)
+{
+ gdk_window_get_root_origin(window, rootX, rootY);
+ *rootX = *rootX + x;
+ *rootY = *rootY + y;
+}
+#endif
diff --git a/WebCore/platform/gtk/GtkVersioning.h b/WebCore/platform/gtk/GtkVersioning.h
index 34e6081..eac3cb5 100644
--- a/WebCore/platform/gtk/GtkVersioning.h
+++ b/WebCore/platform/gtk/GtkVersioning.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Collabora Ltd.
+ * Copyright (C) 2010 Igalia, S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,6 +23,8 @@
#include <gtk/gtk.h>
+G_BEGIN_DECLS
+
// Macros to avoid deprecation checking churn
#if !GTK_CHECK_VERSION(2, 21, 2)
#define gdk_visual_get_depth(visual) (visual)->depth
@@ -51,6 +54,10 @@
#define gtk_widget_set_allocation(widget, alloc) ((widget)->allocation = *(alloc))
#endif // GTK_CHECK_VERSION(2, 18, 0)
+#if !GTK_CHECK_VERSION(2, 17, 3)
+static void gdk_window_get_root_coords(GdkWindow* window, gint x, gint y, gint* rootX, gint* rootY);
+#endif //GTK_CHECK_VERSION(2, 17, 3)
+
#if !GTK_CHECK_VERSION(2, 14, 0)
#define gtk_widget_get_window(widget) (widget)->window
#define gtk_adjustment_get_value(adj) (adj)->value
@@ -67,4 +74,8 @@ void gtk_adjustment_configure(GtkAdjustment* adjustment, gdouble value, gdouble
void gtk_adjustment_set_value(GtkAdjustment* adjusment, gdouble value);
#endif // GTK_CHECK_VERSION(2, 14, 0)
+GdkDevice* getDefaultGDKPointerDevice(GdkWindow* window);
+
+G_END_DECLS
+
#endif // GtkVersioning_h
diff --git a/WebCore/platform/gtk/PasteboardHelper.h b/WebCore/platform/gtk/PasteboardHelper.h
index 33be1a8..bb1b580 100644
--- a/WebCore/platform/gtk/PasteboardHelper.h
+++ b/WebCore/platform/gtk/PasteboardHelper.h
@@ -32,13 +32,6 @@
#include "Frame.h"
-typedef struct _GtkClipboard GtkClipboard;
-typedef struct _GtkTargetList GtkTargetList;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkSelectionData GtkSelectionData;
-typedef struct _GdkDragContext GdkDragContext;
-typedef struct _GdkAtom* GdkAtom;
-
namespace WebCore {
class DataObjectGtk;
diff --git a/WebCore/platform/gtk/PopupMenuGtk.h b/WebCore/platform/gtk/PopupMenuGtk.h
index d63e6d9..8848e06 100644
--- a/WebCore/platform/gtk/PopupMenuGtk.h
+++ b/WebCore/platform/gtk/PopupMenuGtk.h
@@ -29,10 +29,6 @@
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
-typedef struct _GtkMenu GtkMenu;
-typedef struct _GtkMenuItem GtkMenuItem;
-typedef struct _GtkWidget GtkWidget;
-
namespace WebCore {
class FrameView;
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index 5019f35..9329179 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -34,8 +34,11 @@
#include "HTMLNames.h"
#include "MediaControlElements.h"
#include "NotImplemented.h"
+#include "PlatformMouseEvent.h"
#include "RenderBox.h"
#include "RenderObject.h"
+#include "Scrollbar.h"
+#include "TimeRanges.h"
#include "UserAgentStyleSheets.h"
#include "gtkdrawing.h"
#include <gdk/gdk.h>
@@ -281,55 +284,24 @@ static void adjustMozillaStyle(const RenderThemeGtk* theme, RenderStyle* style,
style->setPaddingBottom(Length(ypadding + bottom, Fixed));
}
-static void setMozillaState(const RenderTheme* theme, GtkThemeWidgetType type, RenderObject* o, GtkWidgetState* state)
-{
- state->active = theme->isPressed(o);
- state->focused = theme->isFocused(o);
- state->inHover = theme->isHovered(o);
- // FIXME: Disabled does not always give the correct appearance for ReadOnly
- state->disabled = !theme->isEnabled(o) || theme->isReadOnlyControl(o);
- state->isDefault = false;
- state->canDefault = false;
-
-
- // FIXME: The depressed value should probably apply for other theme parts too.
- // It must be used for range thumbs, because otherwise when the thumb is pressed,
- // the rendering is incorrect.
- if (type == MOZ_GTK_SCALE_THUMB_HORIZONTAL || type == MOZ_GTK_SCALE_THUMB_VERTICAL)
- state->depressed = theme->isPressed(o);
- else
- state->depressed = false;
-}
-
-static bool paintMozillaGtkWidget(const RenderThemeGtk* theme, GtkThemeWidgetType type, RenderObject* o, const PaintInfo& i, const IntRect& rect)
+bool RenderThemeGtk::paintMozillaGtkWidget(GtkThemeWidgetType type, GraphicsContext* context, const IntRect& rect, GtkWidgetState* widgetState, int flags, GtkTextDirection textDirection)
{
// Painting is disabled so just claim to have succeeded
- if (i.context->paintingDisabled())
+ if (context->paintingDisabled())
return false;
- GtkWidgetState widgetState;
- setMozillaState(theme, type, o, &widgetState);
-
- // We might want to make setting flags the caller's job at some point rather than doing it here.
- int flags = 0;
- if (type == MOZ_GTK_BUTTON)
- flags = GTK_RELIEF_NORMAL;
- else if (type == MOZ_GTK_CHECKBUTTON || type == MOZ_GTK_RADIOBUTTON)
- flags = theme->isChecked(o);
-
- PlatformRefPtr<GdkDrawable> drawable(i.context->gdkDrawable());
+ PlatformRefPtr<GdkDrawable> drawable(context->gdkDrawable());
GdkRectangle paintRect, clipRect;
if (drawable) {
- AffineTransform ctm = i.context->getCTM();
+ AffineTransform ctm = context->getCTM();
IntPoint pos = ctm.mapPoint(rect.location());
paintRect = IntRect(pos.x(), pos.y(), rect.width(), rect.height());
// Intersect the cairo rectangle with the target widget region. This will
// prevent the theme drawing code from drawing into regions that cairo will
// clip anyway.
- cairo_t* cr = i.context->platformContext();
double clipX1, clipX2, clipY1, clipY2;
- cairo_clip_extents(cr, &clipX1, &clipY1, &clipX2, &clipY2);
+ cairo_clip_extents(context->platformContext(), &clipX1, &clipY1, &clipX2, &clipY2);
IntPoint clipPos = ctm.mapPoint(IntPoint(clipX1, clipY1));
clipRect.width = clipX2 - clipX1;
@@ -346,13 +318,13 @@ static bool paintMozillaGtkWidget(const RenderThemeGtk* theme, GtkThemeWidgetTyp
paintRect = clipRect = IntRect(0, 0, rect.width(), rect.height());
}
- moz_gtk_use_theme_parts(theme->partsForDrawable(drawable.get()));
- bool success = moz_gtk_widget_paint(type, drawable.get(), &paintRect, &clipRect, &widgetState, flags, gtkTextDirection(o->style()->direction())) == MOZ_GTK_SUCCESS;
+ moz_gtk_use_theme_parts(partsForDrawable(drawable.get()));
+ bool success = moz_gtk_widget_paint(type, drawable.get(), &paintRect, &clipRect, widgetState, flags, textDirection) == MOZ_GTK_SUCCESS;
// If the drawing was successful and we rendered onto a pixmap, copy the
// results back to the original GraphicsContext.
- if (success && !i.context->gdkDrawable()) {
- cairo_t* cairoContext = i.context->platformContext();
+ if (success && !context->gdkDrawable()) {
+ cairo_t* cairoContext = context->platformContext();
cairo_save(cairoContext);
gdk_cairo_set_source_pixmap(cairoContext, drawable.get(), rect.x(), rect.y());
cairo_paint(cairoContext);
@@ -362,6 +334,34 @@ static bool paintMozillaGtkWidget(const RenderThemeGtk* theme, GtkThemeWidgetTyp
return !success;
}
+bool RenderThemeGtk::paintRenderObject(GtkThemeWidgetType type, RenderObject* renderObject, GraphicsContext* context, const IntRect& rect, int flags)
+{
+ // Painting is disabled so just claim to have succeeded
+ if (context->paintingDisabled())
+ return false;
+
+ GtkWidgetState widgetState;
+ widgetState.active = isPressed(renderObject);
+ widgetState.focused = isFocused(renderObject);
+ widgetState.inHover = isHovered(renderObject);
+
+ // FIXME: Disabled does not always give the correct appearance for ReadOnly
+ widgetState.disabled = !isEnabled(renderObject) || isReadOnlyControl(renderObject);
+ widgetState.isDefault = false;
+ widgetState.canDefault = false;
+
+ // FIXME: The depressed value should probably apply for other theme parts too.
+ // It must be used for range thumbs, because otherwise when the thumb is pressed,
+ // the rendering is incorrect.
+ if (type == MOZ_GTK_SCALE_THUMB_HORIZONTAL || type == MOZ_GTK_SCALE_THUMB_VERTICAL)
+ widgetState.depressed = isPressed(renderObject);
+ else
+ widgetState.depressed = false;
+
+ GtkTextDirection textDirection = gtkTextDirection(renderObject->style()->direction());
+ return paintMozillaGtkWidget(type, context, rect, &widgetState, flags, textDirection);
+}
+
static void setButtonPadding(RenderStyle* style)
{
// FIXME: This looks incorrect.
@@ -411,7 +411,7 @@ void RenderThemeGtk::setCheckboxSize(RenderStyle* style) const
bool RenderThemeGtk::paintCheckbox(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
- return paintMozillaGtkWidget(this, MOZ_GTK_CHECKBUTTON, o, i, rect);
+ return paintRenderObject(MOZ_GTK_CHECKBUTTON, o, i.context, rect, isChecked(o));
}
void RenderThemeGtk::setRadioSize(RenderStyle* style) const
@@ -421,7 +421,7 @@ void RenderThemeGtk::setRadioSize(RenderStyle* style) const
bool RenderThemeGtk::paintRadio(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
- return paintMozillaGtkWidget(this, MOZ_GTK_RADIOBUTTON, o, i, rect);
+ return paintRenderObject(MOZ_GTK_RADIOBUTTON, o, i.context, rect, isChecked(o));
}
void RenderThemeGtk::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
@@ -442,7 +442,7 @@ void RenderThemeGtk::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle*
bool RenderThemeGtk::paintButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
- return paintMozillaGtkWidget(this, MOZ_GTK_BUTTON, o, i, rect);
+ return paintRenderObject(MOZ_GTK_BUTTON, o, i.context, rect, GTK_RELIEF_NORMAL);
}
void RenderThemeGtk::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
@@ -456,7 +456,7 @@ void RenderThemeGtk::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle
bool RenderThemeGtk::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
- return paintMozillaGtkWidget(this, MOZ_GTK_DROPDOWN, o, i, rect);
+ return paintRenderObject(MOZ_GTK_DROPDOWN, o, i.context, rect);
}
void RenderThemeGtk::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -470,7 +470,7 @@ void RenderThemeGtk::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyl
bool RenderThemeGtk::paintTextField(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
- return paintMozillaGtkWidget(this, MOZ_GTK_ENTRY, o, i, rect);
+ return paintRenderObject(MOZ_GTK_ENTRY, o, i.context, rect);
}
bool RenderThemeGtk::paintTextArea(RenderObject* o, const PaintInfo& i, const IntRect& r)
@@ -550,7 +550,7 @@ bool RenderThemeGtk::paintSliderTrack(RenderObject* object, const PaintInfo& inf
if (part == SliderVerticalPart)
gtkPart = MOZ_GTK_SCALE_VERTICAL;
- return paintMozillaGtkWidget(this, gtkPart, object, info, rect);
+ return paintRenderObject(gtkPart, object, info.context, rect);
}
void RenderThemeGtk::adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
@@ -567,7 +567,7 @@ bool RenderThemeGtk::paintSliderThumb(RenderObject* object, const PaintInfo& inf
if (part == SliderThumbVerticalPart)
gtkPart = MOZ_GTK_SCALE_THUMB_VERTICAL;
- return paintMozillaGtkWidget(this, gtkPart, object, info, rect);
+ return paintRenderObject(gtkPart, object, info.context, rect);
}
void RenderThemeGtk::adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
@@ -732,6 +732,11 @@ GtkWidget* RenderThemeGtk::gtkTreeView() const
return m_gtkTreeView;
}
+GtkWidget* RenderThemeGtk::gtkScrollbar()
+{
+ return moz_gtk_get_scrollbar_widget();
+}
+
void RenderThemeGtk::platformColorsDidChange()
{
#if ENABLE(VIDEO)
@@ -806,33 +811,48 @@ bool RenderThemeGtk::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pai
return false;
// Draw the buffered ranges. This code is highly inspired from
- // Chrome.
- // FIXME: Draw multiple ranges if there are multiple buffered
- // ranges. The current implementation of the player is always
- // buffering a single range anyway.
- IntRect bufferedRect = r;
- bufferedRect.inflate(-style->borderLeftWidth());
- bufferedRect.setWidth((bufferedRect.width() * mediaElement->percentLoaded()));
-
- // Don't bother drawing an empty area.
- if (bufferedRect.isEmpty())
- return false;
-
- IntPoint sliderTopLeft = bufferedRect.location();
- IntPoint sliderTopRight = sliderTopLeft;
- sliderTopRight.move(0, bufferedRect.height());
-
- RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderTopRight);
- Color startColor = m_panelColor;
- gradient->addColorStop(0.0, startColor);
- gradient->addColorStop(1.0, Color(startColor.red() / 2, startColor.green() / 2, startColor.blue() / 2, startColor.alpha()));
+ // Chrome for the gradient code.
+ float mediaDuration = mediaElement->duration();
+ RefPtr<TimeRanges> timeRanges = mediaElement->buffered();
+ IntRect trackRect = r;
+ int totalWidth = trackRect.width();
+ trackRect.inflate(-style->borderLeftWidth());
context->save();
context->setStrokeStyle(NoStroke);
- context->setFillGradient(gradient);
- context->fillRect(bufferedRect);
- context->restore();
+ for (unsigned index = 0; index < timeRanges->length(); ++index) {
+ ExceptionCode ignoredException;
+ float start = timeRanges->start(index, ignoredException);
+ float end = timeRanges->end(index, ignoredException);
+ int width = ((end - start) * totalWidth) / mediaDuration;
+ IntRect rangeRect;
+ if (!index) {
+ rangeRect = trackRect;
+ rangeRect.setWidth(width);
+ } else {
+ rangeRect.setLocation(IntPoint((start * totalWidth) / mediaDuration, trackRect.y()));
+ rangeRect.setSize(IntSize(width, trackRect.height()));
+ }
+
+ // Don't bother drawing empty range.
+ if (rangeRect.isEmpty())
+ continue;
+
+ IntPoint sliderTopLeft = rangeRect.location();
+ IntPoint sliderTopRight = sliderTopLeft;
+ sliderTopRight.move(0, rangeRect.height());
+
+ RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderTopRight);
+ Color startColor = m_panelColor;
+ gradient->addColorStop(0.0, startColor);
+ gradient->addColorStop(1.0, Color(startColor.red() / 2, startColor.green() / 2, startColor.blue() / 2, startColor.alpha()));
+
+ context->setFillGradient(gradient);
+ context->fillRect(rangeRect);
+ }
+
+ context->restore();
return false;
}
@@ -873,7 +893,7 @@ bool RenderThemeGtk::paintProgressBar(RenderObject* renderObject, const PaintInf
if (!progressBarWidget)
return true;
- if (paintMozillaGtkWidget(this, MOZ_GTK_PROGRESSBAR, renderObject, paintInfo, rect))
+ if (paintRenderObject(MOZ_GTK_PROGRESSBAR, renderObject, paintInfo.context, rect))
return true;
IntRect chunkRect(rect);
@@ -888,7 +908,7 @@ bool RenderThemeGtk::paintProgressBar(RenderObject* renderObject, const PaintInf
else
chunkRect.setX(chunkRect.x() + style->xthickness);
- return paintMozillaGtkWidget(this, MOZ_GTK_PROGRESS_CHUNK, renderObject, paintInfo, chunkRect);
+ return paintRenderObject(MOZ_GTK_PROGRESS_CHUNK, renderObject, paintInfo.context, chunkRect);
}
#endif
diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h
index b9c076d..4e24c97 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/WebCore/platform/gtk/RenderThemeGtk.h
@@ -29,21 +29,9 @@
#define RenderThemeGtk_h
#include "GRefPtr.h"
+#include "gtkdrawing.h"
#include "RenderTheme.h"
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkStyle GtkStyle;
-typedef struct _GtkContainer GtkContainer;
-#ifdef GTK_API_VERSION_2
-typedef struct _GdkRectangle GdkRectangle;
-#else
-typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
-typedef cairo_rectangle_int_t GdkRectangle;
-#endif
-typedef struct _GdkDrawable GdkDrawable;
-typedef struct _GtkBorder GtkBorder;
-typedef struct _GtkThemeParts GtkThemeParts;
-
namespace WebCore {
class RenderThemeGtk : public RenderTheme {
@@ -95,7 +83,9 @@ public:
virtual String extraMediaControlsStyleSheet();
#endif
- GtkThemeParts* partsForDrawable(GdkDrawable*) const;
+ bool paintMozillaGtkWidget(GtkThemeWidgetType, GraphicsContext*, const IntRect&, GtkWidgetState*, int flags, GtkTextDirection = GTK_TEXT_DIR_NONE);
+
+ GtkWidget* gtkScrollbar();
protected:
virtual bool paintCheckbox(RenderObject* o, const PaintInfo& i, const IntRect& r);
@@ -167,6 +157,9 @@ private:
*/
GtkContainer* gtkContainer() const;
+ bool paintRenderObject(GtkThemeWidgetType, RenderObject*, GraphicsContext*, const IntRect& rect, int flags = 0);
+ GtkThemeParts* partsForDrawable(GdkDrawable*) const;
+
mutable GtkWidget* m_gtkWindow;
mutable GtkContainer* m_gtkContainer;
mutable GtkWidget* m_gtkButton;
diff --git a/WebCore/platform/gtk/ScrollbarGtk.h b/WebCore/platform/gtk/ScrollbarGtk.h
index e02bb50..1a078c9 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.h
+++ b/WebCore/platform/gtk/ScrollbarGtk.h
@@ -29,8 +29,6 @@
#include "Scrollbar.h"
#include <wtf/PassRefPtr.h>
-typedef struct _GtkAdjustment GtkAdjustment;
-
namespace WebCore {
class ScrollbarGtk : public Scrollbar {
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
index fee2c70..b6efe54 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.cpp
@@ -26,30 +26,339 @@
#include "config.h"
#include "ScrollbarThemeGtk.h"
+#include "PlatformMouseEvent.h"
+#include "RenderThemeGtk.h"
+#include "ScrollView.h"
+#include "Scrollbar.h"
#include "gtkdrawing.h"
#include <gtk/gtk.h>
namespace WebCore {
+static HashSet<Scrollbar*>* gScrollbars;
+static void gtkStyleSetCallback(GtkWidget*, GtkStyle*, ScrollbarThemeGtk*);
+
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
static ScrollbarThemeGtk theme;
return &theme;
}
+ScrollbarThemeGtk::ScrollbarThemeGtk()
+{
+ updateThemeProperties();
+ g_signal_connect(static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->gtkScrollbar(),
+ "style-set", G_CALLBACK(gtkStyleSetCallback), this);
+}
+
ScrollbarThemeGtk::~ScrollbarThemeGtk()
{
}
-int ScrollbarThemeGtk::scrollbarThickness(ScrollbarControlSize controlSize)
+void ScrollbarThemeGtk::registerScrollbar(Scrollbar* scrollbar)
+{
+ if (!gScrollbars)
+ gScrollbars = new HashSet<Scrollbar*>;
+ gScrollbars->add(scrollbar);
+}
+
+void ScrollbarThemeGtk::unregisterScrollbar(Scrollbar* scrollbar)
+{
+ gScrollbars->remove(scrollbar);
+ if (gScrollbars->isEmpty()) {
+ delete gScrollbars;
+ gScrollbars = 0;
+ }
+}
+
+void ScrollbarThemeGtk::updateThemeProperties()
+{
+ MozGtkScrollbarMetrics metrics;
+ moz_gtk_get_scrollbar_metrics(&metrics);
+
+ m_thumbFatness = metrics.slider_width;
+ m_troughBorderWidth = metrics.trough_border;
+ m_stepperSize = metrics.stepper_size;
+ m_stepperSpacing = metrics.stepper_spacing;
+ m_minThumbLength = metrics.min_slider_size;
+ m_troughUnderSteppers = metrics.trough_under_steppers;
+
+ if (!gScrollbars)
+ return;
+
+ // Update the thickness of every interior frame scrollbar widget. The
+ // platform-independent scrollbar them code isn't yet smart enough to get
+ // this information when it paints.
+ HashSet<Scrollbar*>::iterator end = gScrollbars->end();
+ for (HashSet<Scrollbar*>::iterator it = gScrollbars->begin(); it != end; ++it) {
+ Scrollbar* scrollbar = (*it);
+
+ // Top-level scrollbar i.e. scrollbars who have a parent ScrollView
+ // with no parent are native, and thus do not need to be resized.
+ if (!scrollbar->parent() || !scrollbar->parent()->parent())
+ return;
+
+ int thickness = scrollbarThickness(scrollbar->controlSize());
+ if (scrollbar->orientation() == HorizontalScrollbar)
+ scrollbar->setFrameRect(IntRect(0, scrollbar->parent()->height() - thickness, scrollbar->width(), thickness));
+ else
+ scrollbar->setFrameRect(IntRect(scrollbar->parent()->width() - thickness, 0, thickness, scrollbar->height()));
+ }
+}
+
+static void gtkStyleSetCallback(GtkWidget* widget, GtkStyle* previous, ScrollbarThemeGtk* scrollbarTheme)
+{
+ scrollbarTheme->updateThemeProperties();
+}
+
+bool ScrollbarThemeGtk::hasThumb(Scrollbar* scrollbar)
+{
+ // This method is just called as a paint-time optimization to see if
+ // painting the thumb can be skipped. We don't have to be exact here.
+ return thumbLength(scrollbar) > 0;
+}
+
+IntRect ScrollbarThemeGtk::backButtonRect(Scrollbar* scrollbar, ScrollbarPart part, bool)
+{
+ // We do not support multiple steppers per end yet.
+ if (part == BackButtonEndPart)
+ return IntRect();
+
+ IntSize size = buttonSize(scrollbar);
+ return IntRect(scrollbar->x() + m_troughBorderWidth, scrollbar->y() + m_troughBorderWidth, size.width(), size.height());
+}
+
+IntRect ScrollbarThemeGtk::forwardButtonRect(Scrollbar* scrollbar, ScrollbarPart part, bool)
+{
+ // We do not support multiple steppers per end yet.
+ if (part == ForwardButtonStartPart)
+ return IntRect();
+
+ IntSize size = buttonSize(scrollbar);
+ int x, y;
+ if (scrollbar->orientation() == HorizontalScrollbar) {
+ x = scrollbar->x() + scrollbar->width() - size.width() - m_troughBorderWidth;
+ y = scrollbar->y() + m_troughBorderWidth;
+ } else {
+ x = scrollbar->x() + m_troughBorderWidth;
+ y = scrollbar->y() + scrollbar->height() - size.height() - m_troughBorderWidth;
+ }
+ return IntRect(x, y, size.width(), size.height());
+}
+
+IntRect ScrollbarThemeGtk::trackRect(Scrollbar* scrollbar, bool)
+{
+ // The padding along the thumb movement axis (from outside to in)
+ // is the size of trough border plus the size of the stepper (button)
+ // plus the size of stepper spacing (the space between the stepper and
+ // the place where the thumb stops). There is often no stepper spacing.
+ int movementAxisPadding = m_troughBorderWidth + m_stepperSize + m_stepperSpacing;
+
+ // The fatness of the scrollbar on the non-movement axis.
+ int thickness = scrollbarThickness(scrollbar->controlSize());
+
+ if (scrollbar->orientation() == HorizontalScrollbar) {
+ // Once the scrollbar becomes smaller than the natural size of the
+ // two buttons, the track disappears.
+ if (scrollbar->width() < 2 * thickness)
+ return IntRect();
+ return IntRect(scrollbar->x() + movementAxisPadding, scrollbar->y(), scrollbar->width() - (2 * movementAxisPadding), thickness);
+ }
+
+ if (scrollbar->height() < 2 * thickness)
+ return IntRect();
+ return IntRect(scrollbar->x(), scrollbar->y() + movementAxisPadding, thickness, scrollbar->height() - (2 * movementAxisPadding));
+}
+
+void ScrollbarThemeGtk::paintTrackBackground(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect)
+{
+ GtkWidgetState state;
+ state.focused = FALSE;
+ state.isDefault = FALSE;
+ state.canDefault = FALSE;
+ state.disabled = FALSE;
+ state.active = FALSE;
+ state.inHover = FALSE;
+
+ // Paint the track background. If the trough-under-steppers property is true, this
+ // should be the full size of the scrollbar, but if is false, it should only be the
+ // track rect.
+ IntRect fullScrollbarRect = rect;
+ if (m_troughUnderSteppers)
+ fullScrollbarRect = IntRect(scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
+
+ GtkThemeWidgetType type = scrollbar->orientation() == VerticalScrollbar ? MOZ_GTK_SCROLLBAR_TRACK_VERTICAL : MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL;
+ static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->paintMozillaGtkWidget(type, context, fullScrollbarRect, &state, 0);
+}
+
+void ScrollbarThemeGtk::paintScrollbarBackground(GraphicsContext* context, Scrollbar* scrollbar)
+{
+ GtkWidgetState state;
+ state.focused = FALSE;
+ state.isDefault = FALSE;
+ state.canDefault = FALSE;
+ state.disabled = FALSE;
+ state.active = TRUE;
+ state.inHover = FALSE;
+
+ IntRect fullScrollbarRect = IntRect(scrollbar->x(), scrollbar->y(), scrollbar->width(), scrollbar->height());
+ static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->paintMozillaGtkWidget(MOZ_GTK_SCROLLED_WINDOW, context, fullScrollbarRect, &state, 0);
+}
+
+void ScrollbarThemeGtk::paintThumb(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect)
+{
+ GtkWidgetState state;
+ state.focused = FALSE;
+ state.isDefault = FALSE;
+ state.canDefault = FALSE;
+ state.disabled = FALSE;
+ state.active = scrollbar->pressedPart() == ThumbPart;
+ state.inHover = scrollbar->hoveredPart() == ThumbPart;
+ state.maxpos = scrollbar->maximum();
+ state.curpos = scrollbar->currentPos();
+
+ GtkThemeWidgetType type = scrollbar->orientation() == VerticalScrollbar ? MOZ_GTK_SCROLLBAR_THUMB_VERTICAL : MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL;
+ static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->paintMozillaGtkWidget(type, context, rect, &state, 0);
+}
+
+IntRect ScrollbarThemeGtk::thumbRect(Scrollbar* scrollbar, const IntRect& unconstrainedTrackRect)
+{
+ IntRect trackRect = constrainTrackRectToTrackPieces(scrollbar, unconstrainedTrackRect);
+ int thumbPos = thumbPosition(scrollbar);
+ if (scrollbar->orientation() == HorizontalScrollbar)
+ return IntRect(trackRect.x() + thumbPos, trackRect.y() + (trackRect.height() - m_thumbFatness) / 2, thumbLength(scrollbar), m_thumbFatness);
+
+ // VerticalScrollbar
+ return IntRect(trackRect.x() + (trackRect.width() - m_thumbFatness) / 2, trackRect.y() + thumbPos, m_thumbFatness, thumbLength(scrollbar));
+}
+
+bool ScrollbarThemeGtk::paint(Scrollbar* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect)
{
- static int size;
- if (!size) {
- MozGtkScrollbarMetrics metrics;
- moz_gtk_get_scrollbar_metrics(&metrics);
- size = metrics.slider_width;
+ // Create the ScrollbarControlPartMask based on the damageRect
+ ScrollbarControlPartMask scrollMask = NoPart;
+
+ IntRect backButtonStartPaintRect;
+ IntRect backButtonEndPaintRect;
+ IntRect forwardButtonStartPaintRect;
+ IntRect forwardButtonEndPaintRect;
+ if (hasButtons(scrollbar)) {
+ backButtonStartPaintRect = backButtonRect(scrollbar, BackButtonStartPart, true);
+ if (damageRect.intersects(backButtonStartPaintRect))
+ scrollMask |= BackButtonStartPart;
+ backButtonEndPaintRect = backButtonRect(scrollbar, BackButtonEndPart, true);
+ if (damageRect.intersects(backButtonEndPaintRect))
+ scrollMask |= BackButtonEndPart;
+ forwardButtonStartPaintRect = forwardButtonRect(scrollbar, ForwardButtonStartPart, true);
+ if (damageRect.intersects(forwardButtonStartPaintRect))
+ scrollMask |= ForwardButtonStartPart;
+ forwardButtonEndPaintRect = forwardButtonRect(scrollbar, ForwardButtonEndPart, true);
+ if (damageRect.intersects(forwardButtonEndPaintRect))
+ scrollMask |= ForwardButtonEndPart;
+ }
+
+ IntRect trackPaintRect = trackRect(scrollbar, true);
+ if (damageRect.intersects(trackPaintRect))
+ scrollMask |= TrackBGPart;
+
+ if (m_troughUnderSteppers && (scrollMask & BackButtonStartPart
+ || scrollMask & BackButtonEndPart
+ || scrollMask & ForwardButtonStartPart
+ || scrollMask & ForwardButtonEndPart))
+ scrollMask |= TrackBGPart;
+
+ bool thumbPresent = hasThumb(scrollbar);
+ IntRect currentThumbRect;
+ if (thumbPresent) {
+ IntRect track = trackRect(scrollbar, false);
+ currentThumbRect = thumbRect(scrollbar, track);
+ if (damageRect.intersects(currentThumbRect))
+ scrollMask |= ThumbPart;
}
- return size;
+
+ // Paint the scrollbar background (only used by custom CSS scrollbars).
+ paintScrollbarBackground(graphicsContext, scrollbar);
+
+ if (scrollMask & TrackBGPart)
+ paintTrackBackground(graphicsContext, scrollbar, trackPaintRect);
+
+ // Paint the back and forward buttons.
+ if (scrollMask & BackButtonStartPart)
+ paintButton(graphicsContext, scrollbar, backButtonStartPaintRect, BackButtonStartPart);
+ if (scrollMask & BackButtonEndPart)
+ paintButton(graphicsContext, scrollbar, backButtonEndPaintRect, BackButtonEndPart);
+ if (scrollMask & ForwardButtonStartPart)
+ paintButton(graphicsContext, scrollbar, forwardButtonStartPaintRect, ForwardButtonStartPart);
+ if (scrollMask & ForwardButtonEndPart)
+ paintButton(graphicsContext, scrollbar, forwardButtonEndPaintRect, ForwardButtonEndPart);
+
+ // Paint the thumb.
+ if (scrollMask & ThumbPart)
+ paintThumb(graphicsContext, scrollbar, currentThumbRect);
+
+ return true;
+}
+
+void ScrollbarThemeGtk::paintButton(GraphicsContext* context, Scrollbar* scrollbar, const IntRect& rect, ScrollbarPart part)
+{
+ int flags = 0;
+ if (scrollbar->orientation() == VerticalScrollbar)
+ flags |= MOZ_GTK_STEPPER_VERTICAL;
+
+ if (part == ForwardButtonEndPart) {
+ flags |= MOZ_GTK_STEPPER_DOWN;
+ flags |= MOZ_GTK_STEPPER_BOTTOM;
+ }
+
+ GtkWidgetState state;
+ state.focused = TRUE;
+ state.isDefault = TRUE;
+ state.canDefault = TRUE;
+
+ if ((BackButtonStartPart == part && scrollbar->currentPos())
+ || (ForwardButtonEndPart == part && scrollbar->currentPos() != scrollbar->maximum())) {
+ state.disabled = FALSE;
+ state.active = part == scrollbar->pressedPart();
+ state.inHover = part == scrollbar->hoveredPart();
+ } else {
+ state.disabled = TRUE;
+ state.active = FALSE;
+ state.inHover = FALSE;
+ }
+
+ static_cast<RenderThemeGtk*>(RenderTheme::defaultTheme().get())->paintMozillaGtkWidget(MOZ_GTK_SCROLLBAR_BUTTON, context, rect, &state, flags);
+}
+
+void ScrollbarThemeGtk::paintScrollCorner(ScrollView* view, GraphicsContext* context, const IntRect& cornerRect)
+{
+ // ScrollbarThemeComposite::paintScrollCorner incorrectly assumes that the
+ // ScrollView is a FrameView (see FramelessScrollView), so we cannot let
+ // that code run. For FrameView's this is correct since we don't do custom
+ // scrollbar corner rendering, which ScrollbarThemeComposite supports.
+ ScrollbarTheme::paintScrollCorner(view, context, cornerRect);
+}
+
+bool ScrollbarThemeGtk::shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent& event)
+{
+ return (event.shiftKey() && event.button() == LeftButton) || (event.button() == MiddleButton);
+}
+
+int ScrollbarThemeGtk::scrollbarThickness(ScrollbarControlSize)
+{
+ return m_thumbFatness + (m_troughBorderWidth * 2);
+}
+
+IntSize ScrollbarThemeGtk::buttonSize(Scrollbar* scrollbar)
+{
+ if (scrollbar->orientation() == VerticalScrollbar)
+ return IntSize(m_thumbFatness, m_stepperSize);
+
+ // HorizontalScrollbar
+ return IntSize(m_stepperSize, m_thumbFatness);
+}
+
+int ScrollbarThemeGtk::minimumThumbLength(Scrollbar* scrollbar)
+{
+ return m_minThumbLength;
}
}
diff --git a/WebCore/platform/gtk/ScrollbarThemeGtk.h b/WebCore/platform/gtk/ScrollbarThemeGtk.h
index 618da35..eff2fee 100644
--- a/WebCore/platform/gtk/ScrollbarThemeGtk.h
+++ b/WebCore/platform/gtk/ScrollbarThemeGtk.h
@@ -26,20 +26,48 @@
#ifndef ScrollbarThemeGtk_h
#define ScrollbarThemeGtk_h
-#include "ScrollbarTheme.h"
-
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkStyle GtkStyle;
-typedef struct _GtkContainer GtkContainer;
-typedef struct _GtkBorder GtkBorder;
+#include "ScrollbarThemeComposite.h"
namespace WebCore {
-class ScrollbarThemeGtk : public ScrollbarTheme {
+class Scrollbar;
+
+class ScrollbarThemeGtk : public ScrollbarThemeComposite {
public:
+ ScrollbarThemeGtk();
virtual ~ScrollbarThemeGtk();
- virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
+ virtual bool hasButtons(Scrollbar*) { return true; }
+ virtual bool hasThumb(Scrollbar*);
+ virtual IntRect backButtonRect(Scrollbar*, ScrollbarPart, bool);
+ virtual IntRect forwardButtonRect(Scrollbar*, ScrollbarPart, bool);
+ virtual IntRect trackRect(Scrollbar*, bool);
+ IntRect thumbRect(Scrollbar*, const IntRect& unconstrainedTrackRect);
+ bool paint(Scrollbar*, GraphicsContext*, const IntRect& damageRect);
+ void paintScrollbarBackground(GraphicsContext*, Scrollbar*);
+ void paintTrackBackground(GraphicsContext*, Scrollbar*, const IntRect&);
+ void paintThumb(GraphicsContext*, Scrollbar*, const IntRect&);
+ virtual void paintButton(GraphicsContext*, Scrollbar*, const IntRect&, ScrollbarPart);
+ virtual void paintScrollCorner(ScrollView*, GraphicsContext*, const IntRect&);
+ virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&);
+ virtual int scrollbarThickness(ScrollbarControlSize);
+ virtual IntSize buttonSize(Scrollbar*);
+ virtual int minimumThumbLength(Scrollbar*);
+
+ // TODO: These are the default GTK+ values. At some point we should pull these from the theme itself.
+ virtual double initialAutoscrollTimerDelay() { return 0.20; }
+ virtual double autoscrollTimerDelay() { return 0.02; }
+ void updateThemeProperties();
+ void registerScrollbar(Scrollbar*);
+ void unregisterScrollbar(Scrollbar*);
+
+protected:
+ int m_thumbFatness;
+ int m_troughBorderWidth;
+ int m_stepperSize;
+ int m_stepperSpacing;
+ int m_minThumbLength;
+ bool m_troughUnderSteppers;
};
}
diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c
index 349bde0..b33fb1f 100644
--- a/WebCore/platform/gtk/gtk2drawing.c
+++ b/WebCore/platform/gtk/gtk2drawing.c
@@ -46,10 +46,7 @@
#include <gdk/gdkprivate.h>
#include "gtkdrawing.h"
-
-#include "Assertions.h"
#include "GtkVersioning.h"
-
#include <math.h>
#include <string.h>
diff --git a/WebCore/platform/mac/PopupMenuMac.h b/WebCore/platform/mac/PopupMenuMac.h
index e969fff..8e21913 100644
--- a/WebCore/platform/mac/PopupMenuMac.h
+++ b/WebCore/platform/mac/PopupMenuMac.h
@@ -26,7 +26,11 @@
#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
+#ifdef __OBJC__
+@class NSPopUpButtonCell;
+#else
class NSPopUpButtonCell;
+#endif
namespace WebCore {
diff --git a/WebCore/platform/mac/PurgeableBufferMac.cpp b/WebCore/platform/mac/PurgeableBufferMac.cpp
index ce00494..54de4ed 100644
--- a/WebCore/platform/mac/PurgeableBufferMac.cpp
+++ b/WebCore/platform/mac/PurgeableBufferMac.cpp
@@ -25,7 +25,7 @@
#include "config.h"
-#ifndef BUILDING_ON_TIGER
+#if ENABLE(PURGEABLE_MEMORY)
#include "PurgeableBuffer.h"
diff --git a/WebCore/platform/mac/WebCoreSystemInterface.h b/WebCore/platform/mac/WebCoreSystemInterface.h
index 1f14311..0cc7fd5 100644
--- a/WebCore/platform/mac/WebCoreSystemInterface.h
+++ b/WebCore/platform/mac/WebCoreSystemInterface.h
@@ -121,6 +121,7 @@ extern BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
extern void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
extern unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void);
extern int (*wkQTMovieDataRate)(QTMovie*);
+extern void (*wkQTMovieDisableComponent)(uint32_t[5]);
extern float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
extern NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
extern float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
diff --git a/WebCore/platform/mac/WebCoreSystemInterface.mm b/WebCore/platform/mac/WebCoreSystemInterface.mm
index 2a06f15..309a8fb 100644
--- a/WebCore/platform/mac/WebCoreSystemInterface.mm
+++ b/WebCore/platform/mac/WebCoreSystemInterface.mm
@@ -56,6 +56,7 @@ void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* cont
void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void);
int (*wkQTMovieDataRate)(QTMovie*);
+void (*wkQTMovieDisableComponent)(uint32_t[5]);
float (*wkQTMovieMaxTimeLoaded)(QTMovie*);
NSString *(*wkQTMovieMaxTimeLoadedChangeNotification)(void);
float (*wkQTMovieMaxTimeSeekable)(QTMovie*);
diff --git a/WebCore/platform/network/BlobRegistryImpl.cpp b/WebCore/platform/network/BlobRegistryImpl.cpp
index ee872e6..c5beb64 100644
--- a/WebCore/platform/network/BlobRegistryImpl.cpp
+++ b/WebCore/platform/network/BlobRegistryImpl.cpp
@@ -30,8 +30,11 @@
#include "config.h"
+#if ENABLE(BLOB)
+
#include "BlobRegistryImpl.h"
+#include "BlobResourceHandle.h"
#include "ResourceError.h"
#include "ResourceHandle.h"
#include "ResourceLoader.h"
@@ -60,22 +63,21 @@ bool BlobRegistryImpl::shouldLoadResource(const ResourceRequest& request) const
return true;
}
-PassRefPtr<ResourceHandle> BlobRegistryImpl::createResourceHandle(const ResourceRequest& request, ResourceHandleClient*)
+PassRefPtr<ResourceHandle> BlobRegistryImpl::createResourceHandle(const ResourceRequest& request, ResourceHandleClient* client)
{
if (!shouldLoadResource(request))
return 0;
- // FIXME: To be implemented.
- return 0;
+ return BlobResourceHandle::create(m_blobs.get(request.url().string()), request, client);
}
-bool BlobRegistryImpl::loadResourceSynchronously(const ResourceRequest& request, ResourceError&, ResourceResponse&, Vector<char>&)
+bool BlobRegistryImpl::loadResourceSynchronously(const ResourceRequest& request, ResourceError& error, ResourceResponse& response, Vector<char>& data)
{
if (!shouldLoadResource(request))
return false;
- // FIXME: To be implemented.
- return false;
+ BlobResourceHandle::loadResourceSynchronously(m_blobs.get(request.url().string()), request, error, response, data);
+ return true;
}
void BlobRegistryImpl::appendStorageItems(BlobStorageData* blobStorageData, const BlobDataItemList& items)
@@ -175,3 +177,5 @@ PassRefPtr<BlobStorageData> BlobRegistryImpl::getBlobDataFromURL(const KURL& url
}
} // namespace WebCore
+
+#endif // ENABLE(BLOB)
diff --git a/WebCore/platform/network/BlobResourceHandle.cpp b/WebCore/platform/network/BlobResourceHandle.cpp
index 63335f6..8767b55 100644
--- a/WebCore/platform/network/BlobResourceHandle.cpp
+++ b/WebCore/platform/network/BlobResourceHandle.cpp
@@ -159,7 +159,8 @@ BlobResourceHandle::BlobResourceHandle(PassRefPtr<BlobStorageData> blobData, con
, m_fileOpened(false)
{
if (m_async) {
- m_asyncStream = adoptRef(client->createAsyncFileStream(this));
+ // We need to take a ref.
+ m_asyncStream = client->createAsyncFileStream(this);
callOnMainThread(delayedStart, this);
} else
m_stream = FileStream::create();
diff --git a/WebCore/platform/network/BlobResourceHandle.h b/WebCore/platform/network/BlobResourceHandle.h
index b2a0854..63e8578 100644
--- a/WebCore/platform/network/BlobResourceHandle.h
+++ b/WebCore/platform/network/BlobResourceHandle.h
@@ -42,11 +42,11 @@
namespace WebCore {
class AsyncFileStream;
-class BlobDataItem;
class BlobStorageData;
class FileStream;
class ResourceHandleClient;
class ResourceRequest;
+struct BlobDataItem;
class BlobResourceHandle : public FileStreamClient, public ResourceHandle {
public:
diff --git a/WebCore/platform/network/FormData.cpp b/WebCore/platform/network/FormData.cpp
index 4f2b365..786f1b6 100644
--- a/WebCore/platform/network/FormData.cpp
+++ b/WebCore/platform/network/FormData.cpp
@@ -22,23 +22,21 @@
#include "FormData.h"
-#include "BlobItem.h"
+#include "BlobData.h"
+#include "BlobURL.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
+#include "File.h"
#include "FileSystem.h"
#include "FormDataBuilder.h"
+#include "FormDataList.h"
#include "MIMETypeRegistry.h"
#include "Page.h"
#include "TextEncoding.h"
namespace WebCore {
-#if ENABLE(BLOB)
-const long long FormDataElement::toEndOfFile = -1;
-const double FormDataElement::doNotCheckFileChange = 0;
-#endif
-
inline FormData::FormData()
: m_identifier(0)
, m_hasGeneratedFiles(false)
@@ -99,17 +97,17 @@ PassRefPtr<FormData> FormData::create(const Vector<char>& vector)
return result.release();
}
-PassRefPtr<FormData> FormData::create(const BlobItemList& items, const TextEncoding& encoding)
+PassRefPtr<FormData> FormData::create(const FormDataList& list, const TextEncoding& encoding)
{
RefPtr<FormData> result = create();
- result->appendKeyValuePairItems(items, encoding, false, 0);
+ result->appendKeyValuePairItems(list, encoding, false, 0);
return result.release();
}
-PassRefPtr<FormData> FormData::createMultiPart(const BlobItemList& items, const TextEncoding& encoding, Document* document)
+PassRefPtr<FormData> FormData::createMultiPart(const FormDataList& list, const TextEncoding& encoding, Document* document)
{
RefPtr<FormData> result = create();
- result->appendKeyValuePairItems(items, encoding, true, document);
+ result->appendKeyValuePairItems(list, encoding, true, document);
return result.release();
}
@@ -162,44 +160,12 @@ void FormData::appendData(const void* data, size_t size)
void FormData::appendFile(const String& filename, bool shouldGenerateFile)
{
#if ENABLE(BLOB)
- m_elements.append(FormDataElement(filename, 0, FormDataElement::toEndOfFile, FormDataElement::doNotCheckFileChange, shouldGenerateFile));
+ m_elements.append(FormDataElement(filename, 0, BlobDataItem::toEndOfFile, BlobDataItem::doNotCheckFileChange, shouldGenerateFile));
#else
m_elements.append(FormDataElement(filename, shouldGenerateFile));
#endif
}
-void FormData::appendItems(const BlobItemList& items)
-{
- for (BlobItemList::const_iterator iter(items.begin()); iter != items.end(); ++iter)
- appendItem(iter->get(), false);
-}
-
-void FormData::appendItem(const BlobItem* item, bool shouldGenerateFile)
-{
- const DataBlobItem* dataItem = item->toDataBlobItem();
- if (dataItem) {
- appendData(dataItem->data(), static_cast<size_t>(dataItem->size()));
- return;
- }
-
- const FileBlobItem* fileItem = item->toFileBlobItem();
- ASSERT(fileItem);
- if (fileItem->path().isEmpty()) {
- // If the path is empty do not add the item.
- return;
- }
-
-#if ENABLE(BLOB)
- const FileRangeBlobItem* fileRangeItem = item->toFileRangeBlobItem();
- if (fileRangeItem) {
- appendFileRange(fileItem->path(), fileRangeItem->start(), fileRangeItem->size(), fileRangeItem->snapshotModificationTime(), shouldGenerateFile);
- return;
- }
-#endif
-
- appendFile(fileItem->path(), shouldGenerateFile);
-}
-
#if ENABLE(BLOB)
void FormData::appendFileRange(const String& filename, long long start, long long length, double expectedModificationTime, bool shouldGenerateFile)
{
@@ -212,80 +178,82 @@ void FormData::appendBlob(const KURL& blobURL)
}
#endif
-void FormData::appendKeyValuePairItems(const BlobItemList& items, const TextEncoding& encoding, bool isMultiPartForm, Document* document)
+void FormData::appendKeyValuePairItems(const FormDataList& list, const TextEncoding& encoding, bool isMultiPartForm, Document* document)
{
if (isMultiPartForm)
m_boundary = FormDataBuilder::generateUniqueBoundaryString();
Vector<char> encodedData;
+ const Vector<FormDataList::Item>& items = list.items();
size_t formDataListSize = items.size();
ASSERT(!(formDataListSize % 2));
for (size_t i = 0; i < formDataListSize; i += 2) {
- const StringBlobItem* key = items[i]->toStringBlobItem();
- const BlobItem* value = items[i + 1].get();
- ASSERT(key);
+ const FormDataList::Item& key = items[i];
+ const FormDataList::Item& value = items[i + 1];
if (isMultiPartForm) {
Vector<char> header;
- FormDataBuilder::beginMultiPartHeader(header, m_boundary.data(), key->cstr());
+ FormDataBuilder::beginMultiPartHeader(header, m_boundary.data(), key.data());
bool shouldGenerateFile = false;
- // If the current type is FILE, then we also need to include the filename
- 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();
+ // If the current type is blob, then we also need to include the filename
+ if (value.blob()) {
+ String name;
+ if (value.blob()->isFile()) {
+ // For file blob, use the filename (or relative path if it is present) as the name.
+ File* file = static_cast<File*>(value.blob());
+#if ENABLE(DIRECTORY_UPLOAD)
+ name = file->webkitRelativePath().isEmpty() ? file->name() : file->webkitRelativePath();
#else
- String fileName = fileItem->name();
-#endif
+ name = file->name();
+#endif
- // Let the application specify a filename if it's going to generate a replacement file for the upload.
- if (!path.isEmpty()) {
+ // Let the application specify a filename if it's going to generate a replacement file for the upload.
if (Page* page = document->page()) {
String generatedFileName;
- shouldGenerateFile = page->chrome()->client()->shouldReplaceWithGeneratedFileForUpload(path, generatedFileName);
+ shouldGenerateFile = page->chrome()->client()->shouldReplaceWithGeneratedFileForUpload(file->path(), generatedFileName);
if (shouldGenerateFile)
- fileName = generatedFileName;
+ name = generatedFileName;
}
+ } else {
+ // For non-file blob, use the identifier part of the URL as the name.
+ name = "Blob" + BlobURL::getIdentifier(value.blob()->url());
+ name = name.replace("-", ""); // For safety, remove '-' from the filename since some servers may not like it.
}
// We have to include the filename=".." part in the header, even if the filename is empty
- FormDataBuilder::addFilenameToMultiPartHeader(header, encoding, fileName);
+ FormDataBuilder::addFilenameToMultiPartHeader(header, encoding, name);
- // If the item is sliced from a file, do not add the content type.
-#if ENABLE(BLOB)
- if (!fileName.isEmpty() && !value->toFileRangeBlobItem()) {
-#else
- if (!fileName.isEmpty()) {
-#endif
- // FIXME: The MIMETypeRegistry function's name makes it sound like it takes a path,
- // not just a basename. But filename is not the path. But note that it's not safe to
- // just use path instead since in the generated-file case it will not reflect the
- // MIME type of the generated file.
- String mimeType = MIMETypeRegistry::getMIMETypeForPath(fileName);
- if (!mimeType.isEmpty())
- FormDataBuilder::addContentTypeToMultiPartHeader(header, mimeType.latin1());
- }
+ // Add the content type if it is available.
+ if (value.blob()->type().isEmpty())
+ FormDataBuilder::addContentTypeToMultiPartHeader(header, value.blob()->type().latin1());
}
FormDataBuilder::finishMultiPartHeader(header);
// Append body
appendData(header.data(), header.size());
- appendItem(value, shouldGenerateFile);
+ if (value.blob()) {
+ if (value.blob()->isFile()) {
+ // Do not add the file if the path is empty.
+ if (!static_cast<File*>(value.blob())->path().isEmpty())
+ appendFile(static_cast<File*>(value.blob())->path(), shouldGenerateFile);
+ }
+#if ENABLE(BLOB)
+ else
+ appendBlob(value.blob()->url());
+#endif
+ } else
+ appendData(value.data().data(), value.data().length());
appendData("\r\n", 2);
} else {
// Omit the name "isindex" if it's the first form data element.
// FIXME: Why is this a good rule? Is this obsolete now?
- const StringBlobItem* stringValue = value->toStringBlobItem();
- if (!stringValue)
- continue;
- if (encodedData.isEmpty() && key->cstr() == "isindex")
- FormDataBuilder::encodeStringAsFormData(encodedData, stringValue->cstr());
+ if (encodedData.isEmpty() && key.data() == "isindex")
+ FormDataBuilder::encodeStringAsFormData(encodedData, value.data());
else
- FormDataBuilder::addKeyValuePairAsFormData(encodedData, key->cstr(), stringValue->cstr());
+ FormDataBuilder::addKeyValuePairAsFormData(encodedData, key.data(), value.data());
}
}
diff --git a/WebCore/platform/network/FormData.h b/WebCore/platform/network/FormData.h
index d7faa89..22ceb25 100644
--- a/WebCore/platform/network/FormData.h
+++ b/WebCore/platform/network/FormData.h
@@ -28,10 +28,9 @@
namespace WebCore {
-class BlobItem;
class Document;
+class FormDataList;
class TextEncoding;
-typedef Vector<RefPtr<BlobItem> > BlobItemList;
class FormDataElement {
public:
@@ -62,11 +61,6 @@ public:
#endif
String m_generatedFilename;
bool m_shouldGenerateFile;
-
-#if ENABLE(BLOB)
- static const long long toEndOfFile;
- static const double doNotCheckFileChange;
-#endif
};
inline bool operator==(const FormDataElement& a, const FormDataElement& b)
@@ -101,15 +95,14 @@ public:
static PassRefPtr<FormData> create(const void*, size_t);
static PassRefPtr<FormData> create(const CString&);
static PassRefPtr<FormData> create(const Vector<char>&);
- static PassRefPtr<FormData> create(const BlobItemList&, const TextEncoding&);
- static PassRefPtr<FormData> createMultiPart(const BlobItemList&, const TextEncoding&, Document*);
+ static PassRefPtr<FormData> create(const FormDataList&, const TextEncoding&);
+ static PassRefPtr<FormData> createMultiPart(const FormDataList&, const TextEncoding&, Document*);
PassRefPtr<FormData> copy() const;
PassRefPtr<FormData> deepCopy() const;
~FormData();
void appendData(const void* data, size_t);
- void appendItems(const BlobItemList&);
- void appendFile(const String& filename, bool shouldGenerateFile = false);
+ void appendFile(const String& filePath, bool shouldGenerateFile = false);
#if ENABLE(BLOB)
void appendFileRange(const String& filename, long long start, long long length, double expectedModificationTime, bool shouldGenerateFile = false);
void appendBlob(const KURL& blobURL);
@@ -137,8 +130,7 @@ private:
FormData();
FormData(const FormData&);
- void appendItem(const BlobItem*, bool shouldGenerateFile);
- void appendKeyValuePairItems(const BlobItemList&, const TextEncoding&, bool isMultiPartForm, Document*);
+ void appendKeyValuePairItems(const FormDataList&, const TextEncoding&, bool isMultiPartForm, Document*);
Vector<FormDataElement> m_elements;
diff --git a/WebCore/platform/network/mac/FormDataStreamMac.mm b/WebCore/platform/network/mac/FormDataStreamMac.mm
index c7bd2e7..ed98356 100644
--- a/WebCore/platform/network/mac/FormDataStreamMac.mm
+++ b/WebCore/platform/network/mac/FormDataStreamMac.mm
@@ -31,6 +31,7 @@
#import "config.h"
#import "FormDataStreamMac.h"
+#import "BlobRegistryImpl.h"
#import "FileSystem.h"
#import "FormData.h"
#import "ResourceHandle.h"
@@ -141,7 +142,7 @@ static void closeCurrentStream(FormStreamFields *form)
CFRelease(form->currentStream);
form->currentStream = NULL;
#if ENABLE(BLOB)
- form->currentStreamRangeLength = FormDataElement::toEndOfFile;
+ form->currentStreamRangeLength = BlobDataItem::toEndOfFile;
#endif
}
if (form->currentData) {
@@ -169,7 +170,7 @@ static bool advanceCurrentStream(FormStreamFields* form)
} else {
#if ENABLE(BLOB)
// Check if the file has been changed or not if required.
- if (nextInput.m_expectedFileModificationTime != FormDataElement::doNotCheckFileChange) {
+ if (nextInput.m_expectedFileModificationTime != BlobDataItem::doNotCheckFileChange) {
time_t fileModificationTime;
if (!getFileModificationTime(nextInput.m_filename, fileModificationTime) || fileModificationTime != static_cast<time_t>(nextInput.m_expectedFileModificationTime))
return false;
@@ -225,7 +226,7 @@ static void* formCreate(CFReadStreamRef stream, void* context)
FormStreamFields* newInfo = new FormStreamFields;
newInfo->currentStream = NULL;
#if ENABLE(BLOB)
- newInfo->currentStreamRangeLength = FormDataElement::toEndOfFile;
+ newInfo->currentStreamRangeLength = BlobDataItem::toEndOfFile;
#endif
newInfo->currentData = 0;
newInfo->formStream = stream; // Don't retain. That would create a reference cycle.
@@ -273,7 +274,7 @@ static CFIndex formRead(CFReadStreamRef stream, UInt8* buffer, CFIndex bufferLen
while (form->currentStream) {
CFIndex bytesToRead = bufferLength;
#if ENABLE(BLOB)
- if (form->currentStreamRangeLength != FormDataElement::toEndOfFile && form->currentStreamRangeLength < bytesToRead)
+ if (form->currentStreamRangeLength != BlobDataItem::toEndOfFile && form->currentStreamRangeLength < bytesToRead)
bytesToRead = static_cast<CFIndex>(form->currentStreamRangeLength);
#endif
CFIndex bytesRead = CFReadStreamRead(form->currentStream, buffer, bytesToRead);
@@ -286,7 +287,7 @@ static CFIndex formRead(CFReadStreamRef stream, UInt8* buffer, CFIndex bufferLen
*atEOF = FALSE;
form->bytesSent += bytesRead;
#if ENABLE(BLOB)
- if (form->currentStreamRangeLength != FormDataElement::toEndOfFile)
+ if (form->currentStreamRangeLength != BlobDataItem::toEndOfFile)
form->currentStreamRangeLength -= bytesRead;
#endif
@@ -394,6 +395,49 @@ void setHTTPBody(NSMutableURLRequest *request, PassRefPtr<FormData> formData)
}
}
+#if ENABLE(BLOB)
+ // Check if there is a blob in the form data.
+ bool hasBlob = false;
+ for (size_t i = 0; i < count; ++i) {
+ const FormDataElement& element = formData->elements()[i];
+ if (element.m_type == FormDataElement::encodedBlob) {
+ hasBlob = true;
+ break;
+ }
+ }
+
+ // If yes, we have to resolve all the blob references and regenerate the form data with only data and file types.
+ if (hasBlob) {
+ RefPtr<FormData> newFormData = FormData::create();
+ newFormData->setAlwaysStream(formData->alwaysStream());
+ newFormData->setIdentifier(formData->identifier());
+ for (size_t i = 0; i < count; ++i) {
+ const FormDataElement& element = formData->elements()[i];
+ if (element.m_type == FormDataElement::data)
+ newFormData->appendData(element.m_data.data(), element.m_data.size());
+ else if (element.m_type == FormDataElement::encodedFile)
+ newFormData->appendFile(element.m_filename, element.m_shouldGenerateFile);
+ else {
+ ASSERT(element.m_type == FormDataElement::encodedBlob);
+ RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(KURL(ParsedURLString, element.m_blobURL));
+ if (blobData) {
+ for (size_t j = 0; j < blobData->items().size(); ++j) {
+ const BlobDataItem& blobItem = blobData->items()[j];
+ if (blobItem.type == BlobDataItem::Data) {
+ newFormData->appendData(blobItem.data.data() + static_cast<int>(blobItem.offset), static_cast<int>(blobItem.length));
+ } else {
+ ASSERT(blobItem.type == BlobDataItem::File);
+ newFormData->appendFileRange(blobItem.path, blobItem.offset, blobItem.length, blobItem.expectedModificationTime);
+ }
+ }
+ }
+ }
+ }
+ formData = newFormData;
+ count = formData->elements().size();
+ }
+#endif
+
// Precompute the content length so NSURLConnection doesn't use chunked mode.
long long length = 0;
for (size_t i = 0; i < count; ++i) {
@@ -403,7 +447,7 @@ void setHTTPBody(NSMutableURLRequest *request, PassRefPtr<FormData> formData)
else {
#if ENABLE(BLOB)
// If we're sending the file range, use the existing range length for now. We will detect if the file has been changed right before we read the file and abort the operation if necessary.
- if (element.m_fileLength != FormDataElement::toEndOfFile) {
+ if (element.m_fileLength != BlobDataItem::toEndOfFile) {
length += element.m_fileLength;
continue;
}
diff --git a/WebCore/platform/qt/FileSystemQt.cpp b/WebCore/platform/qt/FileSystemQt.cpp
index 96c2093..b384091 100644
--- a/WebCore/platform/qt/FileSystemQt.cpp
+++ b/WebCore/platform/qt/FileSystemQt.cpp
@@ -128,6 +128,33 @@ CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
return CString();
}
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+PlatformFileHandle openFile(const String& path, FileOpenMode mode)
+{
+ QIODevice::OpenMode platformMode;
+
+ if (mode == OpenForRead)
+ platformMode = QIODevice::ReadOnly;
+ else if (mode == OpenForWrite)
+ platformMode = (QIODevice::WriteOnly | QIODevice::Truncate);
+ else
+ return invalidPlatformFileHandle;
+
+ QFile* file = new QFile(path);
+ if (file->open(platformMode))
+ return file;
+
+ return invalidPlatformFileHandle;
+}
+
+int readFromFile(PlatformFileHandle handle, char* data, int length)
+{
+ if (handle && handle->exists() && handle->isReadable())
+ return handle->read(data, length);
+ return 0;
+}
+#endif
+
void closeFile(PlatformFileHandle& handle)
{
if (handle) {
diff --git a/WebCore/platform/qt/ScrollbarQt.cpp b/WebCore/platform/qt/ScrollbarQt.cpp
index 70aa5db..85dc107 100644
--- a/WebCore/platform/qt/ScrollbarQt.cpp
+++ b/WebCore/platform/qt/ScrollbarQt.cpp
@@ -72,9 +72,7 @@ bool Scrollbar::contextMenu(const PlatformMouseEvent& event)
const QPoint globalPos = QPoint(event.globalX(), event.globalY());
QAction* actionSelected = menu.exec(globalPos);
- if (!actionSelected)
- { /* Do nothing */ }
- else if (actionSelected == actScrollHere) {
+ if (actionSelected == actScrollHere) {
const QPoint pos = convertFromContainingWindow(event.pos());
moveThumb(horizontal ? pos.x() : pos.y());
} else if (actionSelected == actScrollTop)
@@ -82,13 +80,13 @@ bool Scrollbar::contextMenu(const PlatformMouseEvent& event)
else if (actionSelected == actScrollBottom)
setValue(maximum());
else if (actionSelected == actPageUp)
- scroll(horizontal ? ScrollLeft: ScrollUp, ScrollByPage, 1);
+ scroll(horizontal ? ScrollLeft: ScrollUp, ScrollByPage);
else if (actionSelected == actPageDown)
- scroll(horizontal ? ScrollRight : ScrollDown, ScrollByPage, 1);
+ scroll(horizontal ? ScrollRight : ScrollDown, ScrollByPage);
else if (actionSelected == actScrollUp)
- scroll(horizontal ? ScrollLeft : ScrollUp, ScrollByLine, 1);
+ scroll(horizontal ? ScrollLeft : ScrollUp, ScrollByLine);
else if (actionSelected == actScrollDown)
- scroll(horizontal ? ScrollRight : ScrollDown, ScrollByLine, 1);
+ scroll(horizontal ? ScrollRight : ScrollDown, ScrollByLine);
#endif // QT_NO_CONTEXTMENU
return true;
}
diff --git a/WebCore/platform/win/PasteboardWin.cpp b/WebCore/platform/win/PasteboardWin.cpp
index 03ecd36..c065f04 100644
--- a/WebCore/platform/win/PasteboardWin.cpp
+++ b/WebCore/platform/win/PasteboardWin.cpp
@@ -230,14 +230,7 @@ void Pasteboard::writeImage(Node* node, const KURL&, const String&)
HGDIOBJ oldSource = SelectObject(sourceDC, coreBitmap);
image->getHBITMAP(coreBitmap);
-#if !defined(NO_ALPHABLEND)
- BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA};
- AlphaBlend(compatibleDC, 0, 0, image->width(), image->height(),
- sourceDC, 0, 0, image->width(), image->height(), bf);
-#else
- StretchBlt(compatibleDC, 0, 0, image->width(), image->height(),
- sourceDC, 0, 0, image->width(), image->height(), SRCCOPY);
-#endif
+ BitBlt(compatibleDC, 0, 0, image->width(), image->height(), sourceDC, 0, 0, SRCCOPY);
SelectObject(sourceDC, oldSource);
DeleteObject(coreBitmap);
diff --git a/WebCore/platform/win/ScrollbarThemeWin.cpp b/WebCore/platform/win/ScrollbarThemeWin.cpp
index 2ee3512..a8d374a 100644
--- a/WebCore/platform/win/ScrollbarThemeWin.cpp
+++ b/WebCore/platform/win/ScrollbarThemeWin.cpp
@@ -288,7 +288,10 @@ void ScrollbarThemeWin::paintButton(GraphicsContext* context, Scrollbar* scrollb
(scrollbar->hoveredPart() == ForwardButtonEndPart && !start)) {
if (scrollbar->pressedPart() == scrollbar->hoveredPart()) {
xpState += TS_ACTIVE;
- classicState |= DFCS_PUSHED | DFCS_FLAT;
+ classicState |= DFCS_PUSHED;
+#if !OS(WINCE)
+ classicState |= DFCS_FLAT;
+#endif
} else
xpState += TS_HOVER;
} else {
diff --git a/WebCore/platform/win/SoftLinking.h b/WebCore/platform/win/SoftLinking.h
index a82fe35..b67cc81 100644
--- a/WebCore/platform/win/SoftLinking.h
+++ b/WebCore/platform/win/SoftLinking.h
@@ -39,6 +39,12 @@
return library; \
}
+#if OS(WINCE)
+#define SOFT_LINK_GETPROCADDRESS GetProcAddressA
+#else
+#define SOFT_LINK_GETPROCADDRESS GetProcAddress
+#endif
+
#define SOFT_LINK_LIBRARY(lib) SOFT_LINK_LIBRARY_HELPER(lib, L".dll")
#define SOFT_LINK_DEBUG_LIBRARY(lib) SOFT_LINK_LIBRARY_HELPER(lib, L"_debug.dll")
@@ -48,7 +54,7 @@
\
static resultType callingConvention init##functionName parameterDeclarations \
{ \
- softLink##functionName = reinterpret_cast<resultType (callingConvention*) parameterDeclarations>(GetProcAddress(library##Library(), #functionName)); \
+ softLink##functionName = reinterpret_cast<resultType (callingConvention*) parameterDeclarations>(SOFT_LINK_GETPROCADDRESS(library##Library(), #functionName)); \
ASSERT(softLink##functionName); \
return softLink##functionName parameterNames; \
}\
@@ -69,7 +75,7 @@
return ptr; \
initialized = true; \
\
- ptr = reinterpret_cast<functionName##PtrType>(GetProcAddress(library##Library(), #functionName)); \
+ ptr = reinterpret_cast<functionName##PtrType>(SOFT_LINK_GETPROCADDRESS(library##Library(), #functionName)); \
return ptr; \
}\
diff --git a/WebCore/platform/win/SystemInfo.cpp b/WebCore/platform/win/SystemInfo.cpp
index f010769..f2fe62b 100644
--- a/WebCore/platform/win/SystemInfo.cpp
+++ b/WebCore/platform/win/SystemInfo.cpp
@@ -32,6 +32,9 @@ namespace WebCore {
bool isRunningOnVistaOrLater()
{
+#if OS(WINCE)
+ return false;
+#else
static bool isVistaOrLater;
static bool initialized;
@@ -47,6 +50,7 @@ bool isRunningOnVistaOrLater()
isVistaOrLater = vi.dwMajorVersion >= 6;
return isVistaOrLater;
+#endif
}
} // namespace WebCore
diff --git a/WebCore/plugins/PluginDatabase.cpp b/WebCore/plugins/PluginDatabase.cpp
index 88297ac..77c84eb 100644
--- a/WebCore/plugins/PluginDatabase.cpp
+++ b/WebCore/plugins/PluginDatabase.cpp
@@ -30,6 +30,9 @@
#include "Frame.h"
#include "KURL.h"
#include "PluginPackage.h"
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+#include "FileSystem.h"
+#endif
#include <stdlib.h>
#if PLATFORM(ANDROID)
@@ -41,7 +44,22 @@ namespace WebCore {
typedef HashMap<String, RefPtr<PluginPackage> > PluginPackageByNameMap;
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+static const size_t maximumPersistentPluginMetadataCacheSize = 32768;
+
+static bool gPersistentPluginMetadataCacheIsEnabled;
+
+String& persistentPluginMetadataCachePath()
+{
+ DEFINE_STATIC_LOCAL(String, cachePath, ());
+ return cachePath;
+}
+#endif
+
PluginDatabase::PluginDatabase()
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ : m_persistentMetadataCacheIsLoaded(false)
+#endif
{
}
@@ -79,6 +97,10 @@ void PluginDatabase::addExtraPluginDirectory(const String& directory)
bool PluginDatabase::refresh()
{
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ if (!m_persistentMetadataCacheIsLoaded)
+ loadPersistentMetadataCache();
+#endif
bool pluginSetChanged = false;
if (!m_plugins.isEmpty()) {
@@ -131,6 +153,10 @@ bool PluginDatabase::refresh()
if (!pluginSetChanged)
return false;
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ updatePersistentMetadataCache();
+#endif
+
m_registeredMIMETypes.clear();
// Register plug-in MIME types
@@ -187,8 +213,13 @@ PluginPackage* PluginDatabase::pluginForMIMEType(const String& mimeType)
if (!plugin->isEnabled())
continue;
- if (plugin->mimeToDescriptions().contains(key))
+ if (plugin->mimeToDescriptions().contains(key)) {
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ if (!plugin->ensurePluginLoaded())
+ continue;
+#endif
pluginChoices.append(plugin);
+ }
}
if (pluginChoices.isEmpty())
@@ -227,6 +258,10 @@ String PluginDatabase::MIMETypeForExtension(const String& extension) const
if (preferredPlugin && PluginPackage::equal(*plugin, *preferredPlugin))
return mimeType;
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ if (!plugin->ensurePluginLoaded())
+ continue;
+#endif
pluginChoices.append(plugin);
mimeTypeForPlugin.add(plugin, mimeType);
foundMapping = true;
@@ -320,6 +355,9 @@ void PluginDatabase::clear()
m_pluginPathsWithTimes.clear();
m_registeredMIMETypes.clear();
m_preferredPlugins.clear();
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ m_persistentMetadataCacheIsLoaded = false;
+#endif
}
#if (!OS(WINCE)) && (!OS(SYMBIAN)) && (!OS(WINDOWS) || !ENABLE(NETSCAPE_PLUGIN_API))
@@ -437,4 +475,200 @@ void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const
#endif // !OS(SYMBIAN) && !OS(WINDOWS)
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+
+static void fillBufferWithContentsOfFile(PlatformFileHandle file, Vector<char>& buffer)
+{
+ size_t bufferSize = 0;
+ size_t bufferCapacity = 1024;
+ buffer.resize(bufferCapacity);
+
+ do {
+ bufferSize += readFromFile(file, buffer.data() + bufferSize, bufferCapacity - bufferSize);
+ if (bufferSize == bufferCapacity) {
+ if (bufferCapacity < maximumPersistentPluginMetadataCacheSize) {
+ bufferCapacity *= 2;
+ buffer.resize(bufferCapacity);
+ } else {
+ buffer.clear();
+ return;
+ }
+ } else
+ break;
+ } while (true);
+
+ buffer.shrink(bufferSize);
+}
+
+static bool readUTF8String(String& resultString, char*& start, const char* end)
+{
+ if (start >= end)
+ return false;
+
+ int len = strlen(start);
+ resultString = String::fromUTF8(start, len);
+ start += len + 1;
+
+ return true;
+}
+
+static bool readTime(time_t& resultTime, char*& start, const char* end)
+{
+ if (start + sizeof(time_t) >= end)
+ return false;
+
+ resultTime = *reinterpret_cast<time_t*>(start);
+ start += sizeof(time_t);
+
+ return true;
+}
+
+static const char schemaVersion = '1';
+static const char persistentPluginMetadataCacheFilename[] = "PluginMetadataCache.bin";
+
+void PluginDatabase::loadPersistentMetadataCache()
+{
+ if (!isPersistentMetadataCacheEnabled() || persistentMetadataCachePath().isEmpty())
+ return;
+
+ PlatformFileHandle file;
+ String absoluteCachePath = pathByAppendingComponent(persistentMetadataCachePath(), persistentPluginMetadataCacheFilename);
+ file = openFile(absoluteCachePath, OpenForRead);
+
+ if (!isHandleValid(file))
+ return;
+
+ // Mark cache as loaded regardless of success or failure. If
+ // there's error in the cache, we won't try to load it anymore.
+ m_persistentMetadataCacheIsLoaded = true;
+
+ Vector<char> fileContents;
+ fillBufferWithContentsOfFile(file, fileContents);
+ closeFile(file);
+
+ if (fileContents.size() < 2 || fileContents.first() != schemaVersion || fileContents.last() != '\0') {
+ LOG_ERROR("Unable to read plugin metadata cache: corrupt schema");
+ deleteFile(absoluteCachePath);
+ return;
+ }
+
+ char* bufferPos = fileContents.data() + 1;
+ char* end = fileContents.data() + fileContents.size();
+
+ PluginSet cachedPlugins;
+ HashMap<String, time_t> cachedPluginPathsWithTimes;
+ HashMap<String, RefPtr<PluginPackage> > cachedPluginsByPath;
+
+ while (bufferPos < end) {
+ String path;
+ time_t lastModified;
+ String name;
+ String desc;
+ String mimeDesc;
+ if (!(readUTF8String(path, bufferPos, end)
+ && readTime(lastModified, bufferPos, end)
+ && readUTF8String(name, bufferPos, end)
+ && readUTF8String(desc, bufferPos, end)
+ && readUTF8String(mimeDesc, bufferPos, end))) {
+ LOG_ERROR("Unable to read plugin metadata cache: corrupt data");
+ deleteFile(absoluteCachePath);
+ return;
+ }
+
+ // Skip metadata that points to plugins from directories that
+ // are not part of plugin directory list anymore.
+ String pluginDirectoryName = directoryName(path);
+ if (m_pluginDirectories.find(pluginDirectoryName) == WTF::notFound)
+ continue;
+
+ RefPtr<PluginPackage> package = PluginPackage::createPackageFromCache(path, lastModified, name, desc, mimeDesc);
+
+ if (package && cachedPlugins.add(package).second) {
+ cachedPluginPathsWithTimes.add(package->path(), package->lastModified());
+ cachedPluginsByPath.add(package->path(), package);
+ }
+ }
+
+ m_plugins.swap(cachedPlugins);
+ m_pluginsByPath.swap(cachedPluginsByPath);
+ m_pluginPathsWithTimes.swap(cachedPluginPathsWithTimes);
+}
+
+static bool writeUTF8String(PlatformFileHandle file, const String& string)
+{
+ CString utf8String = string.utf8();
+ int length = utf8String.length() + 1;
+ return writeToFile(file, utf8String.data(), length) == length;
+}
+
+static bool writeTime(PlatformFileHandle file, const time_t& time)
+{
+ return writeToFile(file, reinterpret_cast<const char*>(&time), sizeof(time_t)) == sizeof(time_t);
+}
+
+void PluginDatabase::updatePersistentMetadataCache()
+{
+ if (!isPersistentMetadataCacheEnabled() || persistentMetadataCachePath().isEmpty())
+ return;
+
+ makeAllDirectories(persistentMetadataCachePath());
+ String absoluteCachePath = pathByAppendingComponent(persistentMetadataCachePath(), persistentPluginMetadataCacheFilename);
+ deleteFile(absoluteCachePath);
+
+ if (m_plugins.isEmpty())
+ return;
+
+ PlatformFileHandle file;
+ file = openFile(absoluteCachePath, OpenForWrite);
+
+ if (!isHandleValid(file)) {
+ LOG_ERROR("Unable to open plugin metadata cache for saving");
+ return;
+ }
+
+ char localSchemaVersion = schemaVersion;
+ if (writeToFile(file, &localSchemaVersion, 1) != 1) {
+ LOG_ERROR("Unable to write plugin metadata cache schema");
+ closeFile(file);
+ deleteFile(absoluteCachePath);
+ return;
+ }
+
+ PluginSet::const_iterator end = m_plugins.end();
+ for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
+ if (!(writeUTF8String(file, (*it)->path())
+ && writeTime(file, (*it)->lastModified())
+ && writeUTF8String(file, (*it)->name())
+ && writeUTF8String(file, (*it)->description())
+ && writeUTF8String(file, (*it)->fullMIMEDescription()))) {
+ LOG_ERROR("Unable to write plugin metadata to cache");
+ closeFile(file);
+ deleteFile(absoluteCachePath);
+ return;
+ }
+ }
+
+ closeFile(file);
+}
+
+bool PluginDatabase::isPersistentMetadataCacheEnabled()
+{
+ return gPersistentPluginMetadataCacheIsEnabled;
+}
+
+void PluginDatabase::setPersistentMetadataCacheEnabled(bool isEnabled)
+{
+ gPersistentPluginMetadataCacheIsEnabled = isEnabled;
+}
+
+String PluginDatabase::persistentMetadataCachePath()
+{
+ return WebCore::persistentPluginMetadataCachePath();
+}
+
+void PluginDatabase::setPersistentMetadataCachePath(const String& persistentMetadataCachePath)
+{
+ WebCore::persistentPluginMetadataCachePath() = persistentMetadataCachePath;
+}
+#endif
}
diff --git a/WebCore/plugins/PluginDatabase.h b/WebCore/plugins/PluginDatabase.h
index 287857e..b1e1525 100644
--- a/WebCore/plugins/PluginDatabase.h
+++ b/WebCore/plugins/PluginDatabase.h
@@ -84,6 +84,12 @@ namespace WebCore {
Vector<String> pluginDirectories() const { return m_pluginDirectories; }
String MIMETypeForExtension(const String& extension) const;
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ static bool isPersistentMetadataCacheEnabled();
+ static void setPersistentMetadataCacheEnabled(bool isEnabled);
+ static String persistentMetadataCachePath();
+ static void setPersistentMetadataCachePath(const String& persistentMetadataCachePath);
+#endif
private:
void getPluginPathsInDirectories(HashSet<String>&) const;
@@ -92,6 +98,10 @@ namespace WebCore {
// Returns whether the plugin was actually added or not (it won't be added if it's a duplicate of an existing plugin).
bool add(PassRefPtr<PluginPackage>);
void remove(PluginPackage*);
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ void loadPersistentMetadataCache();
+ void updatePersistentMetadataCache();
+#endif
Vector<String> m_pluginDirectories;
HashSet<String> m_registeredMIMETypes;
@@ -105,6 +115,9 @@ namespace WebCore {
friend class ::android::WebSettings;
#endif
HashMap<String, RefPtr<PluginPackage> > m_preferredPlugins;
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ bool m_persistentMetadataCacheIsLoaded;
+#endif
};
} // namespace WebCore
diff --git a/WebCore/plugins/PluginPackage.cpp b/WebCore/plugins/PluginPackage.cpp
index 48c44f0..168d45a 100644
--- a/WebCore/plugins/PluginPackage.cpp
+++ b/WebCore/plugins/PluginPackage.cpp
@@ -114,6 +114,9 @@ PluginPackage::PluginPackage(const String& path, const time_t& lastModified)
, m_module(0)
, m_lastModified(lastModified)
, m_freeLibraryTimer(this, &PluginPackage::freeLibraryTimerFired)
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ , m_infoIsFromCache(true)
+#endif
{
m_fileName = pathGetFileName(m_path);
m_parentDirectory = m_path.left(m_path.length() - m_fileName.length() - 1);
@@ -168,6 +171,19 @@ PassRefPtr<PluginPackage> PluginPackage::createPackage(const String& path, const
return package.release();
}
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+PassRefPtr<PluginPackage> PluginPackage::createPackageFromCache(const String& path, const time_t& lastModified, const String& name, const String& description, const String& mimeDescription)
+{
+ RefPtr<PluginPackage> package = adoptRef(new PluginPackage(path, lastModified));
+ package->m_name = name;
+ package->m_description = description;
+ package->determineModuleVersionFromDescription();
+ package->setMIMEDescription(mimeDescription);
+ package->m_infoIsFromCache = true;
+ return package.release();
+}
+#endif
+
#if defined(XP_UNIX)
void PluginPackage::determineQuirks(const String& mimeType)
{
@@ -349,4 +365,20 @@ int PluginPackage::compareFileVersion(const PlatformModuleVersion& compareVersio
return 0;
}
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+bool PluginPackage::ensurePluginLoaded()
+{
+ if (!m_infoIsFromCache)
+ return m_isLoaded;
+
+ m_quirks = PluginQuirkSet();
+ m_name = String();
+ m_description = String();
+ m_fullMIMEDescription = String();
+ m_moduleVersion = 0;
+
+ return fetchInfo();
+}
+#endif
+
}
diff --git a/WebCore/plugins/PluginPackage.h b/WebCore/plugins/PluginPackage.h
index 92a9c52..f4d1dac 100644
--- a/WebCore/plugins/PluginPackage.h
+++ b/WebCore/plugins/PluginPackage.h
@@ -49,6 +49,9 @@ namespace WebCore {
public:
~PluginPackage();
static PassRefPtr<PluginPackage> createPackage(const String& path, const time_t& lastModified);
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ static PassRefPtr<PluginPackage> createPackageFromCache(const String& path, const time_t& lastModified, const String& name, const String& description, const String& mimeDescription);
+#endif
const String& name() const { return m_name; }
const String& description() const { return m_description; }
@@ -80,6 +83,11 @@ namespace WebCore {
NPInterface* npInterface() const { return m_npInterface; }
#endif // OS(SYMBIAN)
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ bool ensurePluginLoaded();
+ void setMIMEDescription(const String& mimeDescription);
+ String fullMIMEDescription() const { return m_fullMIMEDescription;}
+#endif
private:
PluginPackage(const String& path, const time_t& lastModified);
@@ -121,6 +129,10 @@ namespace WebCore {
Timer<PluginPackage> m_freeLibraryTimer;
PluginQuirkSet m_quirks;
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ String m_fullMIMEDescription;
+ bool m_infoIsFromCache;
+#endif
};
struct PluginPackageHash {
diff --git a/WebCore/plugins/PluginViewNone.cpp b/WebCore/plugins/PluginViewNone.cpp
index ab8f620..9aeaf3b 100644
--- a/WebCore/plugins/PluginViewNone.cpp
+++ b/WebCore/plugins/PluginViewNone.cpp
@@ -141,7 +141,7 @@ void PluginView::handleFocusOutEvent()
// ports using PluginView, but until then, if new functions like this are
// added, please make sure they have the proper platform #ifs so that changes
// do not break ports who compile both this file and PluginView.cpp.
-#if PLATFORM(MAC) || PLATFORM(CHROMIUM) || PLATFORM(EFL) || (OS(WINCE) && !PLATFORM(QT)) || (PLATFORM(QT) && !OS(WINCE))
+#if PLATFORM(MAC) || PLATFORM(CHROMIUM) || PLATFORM(EFL) || (OS(WINCE) && !PLATFORM(QT)) || (PLATFORM(QT) && !OS(WINCE)) || PLATFORM(BREWMP)
#if ENABLE(NETSCAPE_PLUGIN_API)
void PluginView::keepAlive(NPP)
{
diff --git a/WebCore/plugins/gtk/PluginPackageGtk.cpp b/WebCore/plugins/gtk/PluginPackageGtk.cpp
index 97553a1..d0218fb 100644
--- a/WebCore/plugins/gtk/PluginPackageGtk.cpp
+++ b/WebCore/plugins/gtk/PluginPackageGtk.cpp
@@ -113,9 +113,9 @@ bool PluginPackage::load()
GOwnPtr<gchar> finalPath(g_strdup(m_path.utf8().data()));
while (g_file_test(finalPath.get(), G_FILE_TEST_IS_SYMLINK)) {
GOwnPtr<GFile> file(g_file_new_for_path(finalPath.get()));
+ GOwnPtr<GFile> dir(g_file_get_parent(file.get()));
GOwnPtr<gchar> linkPath(g_file_read_link(finalPath.get(), 0));
-
- GOwnPtr<GFile> resolvedFile(g_file_resolve_relative_path(file.get(), linkPath.get()));
+ GOwnPtr<GFile> resolvedFile(g_file_resolve_relative_path(dir.get(), linkPath.get()));
finalPath.set(g_file_get_path(resolvedFile.get()));
}
diff --git a/WebCore/plugins/qt/PluginPackageQt.cpp b/WebCore/plugins/qt/PluginPackageQt.cpp
index d92fffe..e7058c7 100644
--- a/WebCore/plugins/qt/PluginPackageQt.cpp
+++ b/WebCore/plugins/qt/PluginPackageQt.cpp
@@ -60,9 +60,19 @@ bool PluginPackage::fetchInfo()
m_description = buf;
determineModuleVersionFromDescription();
- String s = gm();
+ String mimeDescription = gm();
+ setMIMEDescription(mimeDescription);
+ m_infoIsFromCache = false;
+
+ return true;
+}
+
+void PluginPackage::setMIMEDescription(const String& mimeDescription)
+{
+ m_fullMIMEDescription = mimeDescription;
+
Vector<String> types;
- s.split(UChar(';'), false, types);
+ mimeDescription.split(UChar(';'), false, types);
for (unsigned i = 0; i < types.size(); ++i) {
Vector<String> mime;
types[i].split(UChar(':'), true, mime);
@@ -76,8 +86,6 @@ bool PluginPackage::fetchInfo()
m_mimeToDescriptions.add(mime[0], mime[2]);
}
}
-
- return true;
}
static NPError staticPluginQuirkRequiresGtkToolKit_NPN_GetValue(NPP instance, NPNVariable variable, void* value)
@@ -187,4 +195,5 @@ uint16_t PluginPackage::NPVersion() const
{
return NP_VERSION_MINOR;
}
+
}
diff --git a/WebCore/plugins/qt/PluginViewQt.cpp b/WebCore/plugins/qt/PluginViewQt.cpp
index 5c681b8..f60885d 100644
--- a/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/WebCore/plugins/qt/PluginViewQt.cpp
@@ -154,6 +154,13 @@ void PluginView::setFocus(bool focused)
} else {
Widget::setFocus(focused);
}
+ if (!m_isWindowed) {
+ XEvent npEvent;
+ initXEvent(&npEvent);
+ npEvent.type = (focused) ? 9 : 10; // ints as Qt unsets FocusIn and FocusOut
+ if (!dispatchNPEvent(npEvent))
+ LOG(Events, "PluginView::setFocus(%d): Focus event not accepted", focused);
+ }
}
void PluginView::show()
@@ -374,6 +381,17 @@ void setXKeyEventSpecificFields(XEvent* xEvent, KeyboardEvent* event)
xEvent->xkey.time = event->timeStamp();
xEvent->xkey.state = qKeyEvent->nativeModifiers();
xEvent->xkey.keycode = qKeyEvent->nativeScanCode();
+
+ // We may not have a nativeScanCode() if the key event is from DRT's eventsender. In that
+ // case just populate the XEvent's keycode with the Qt platform-independent keycode. The only
+ // place this keycode will be used is in webkit_test_plugin_handle_event().
+ if (QWebPagePrivate::drtRun && !xEvent->xkey.keycode) {
+ if (!qKeyEvent->text().isEmpty())
+ xEvent->xkey.keycode = int(qKeyEvent->text().at(0).unicode() + qKeyEvent->modifiers());
+ else if (qKeyEvent->key() && (qKeyEvent->key() != Qt::Key_unknown))
+ xEvent->xkey.keycode = int(qKeyEvent->key() + qKeyEvent->modifiers());
+ }
+
xEvent->xkey.same_screen = true;
// NOTE: As the XEvents sent to the plug-in are synthesized and there is not a native window
@@ -578,19 +596,24 @@ void PluginView::setNPWindowIfNeeded()
m_npWindow.x = m_windowRect.x();
m_npWindow.y = m_windowRect.y();
-
- m_npWindow.clipRect.left = max(0, m_clipRect.x());
- m_npWindow.clipRect.top = max(0, m_clipRect.y());
- m_npWindow.clipRect.right = m_clipRect.x() + m_clipRect.width();
- m_npWindow.clipRect.bottom = m_clipRect.y() + m_clipRect.height();
} else {
m_npWindow.x = 0;
m_npWindow.y = 0;
+ }
+ // If the width or height are null, set the clipRect to null, indicating that
+ // the plugin is not visible/scrolled out.
+ if (!m_clipRect.width() || !m_clipRect.height()) {
m_npWindow.clipRect.left = 0;
- m_npWindow.clipRect.top = 0;
m_npWindow.clipRect.right = 0;
+ m_npWindow.clipRect.top = 0;
m_npWindow.clipRect.bottom = 0;
+ } else {
+ // Clipping rectangle of the plug-in; the origin is the top left corner of the drawable or window.
+ m_npWindow.clipRect.left = m_npWindow.x + m_clipRect.x();
+ m_npWindow.clipRect.top = m_npWindow.y + m_clipRect.y();
+ m_npWindow.clipRect.right = m_npWindow.x + m_clipRect.x() + m_clipRect.width();
+ m_npWindow.clipRect.bottom = m_npWindow.y + m_clipRect.y() + m_clipRect.height();
}
if (m_plugin->quirks().contains(PluginQuirkDontCallSetWindowMoreThanOnce)) {
@@ -755,7 +778,7 @@ static Display *getPluginDisplay()
// support gdk based plugins (like flash) that use a different X connection.
// The code below has the same effect as this one:
// Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
- QLibrary library("libgdk-x11-2.0.so.0");
+ QLibrary library("libgdk-x11-2.0", 0);
if (!library.load())
return 0;
diff --git a/WebCore/plugins/win/PluginDatabaseWin.cpp b/WebCore/plugins/win/PluginDatabaseWin.cpp
index 5d86117..6cbcdc8 100644
--- a/WebCore/plugins/win/PluginDatabaseWin.cpp
+++ b/WebCore/plugins/win/PluginDatabaseWin.cpp
@@ -332,6 +332,56 @@ static inline void addAdobeAcrobatPluginDirectory(Vector<String>& directories)
RegCloseKey(key);
}
+static inline void addJavaPluginDirectory(Vector<String>& directories)
+{
+ HKEY key;
+ HRESULT result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\JavaSoft\\Java Plug-in"), 0, KEY_READ, &key);
+ if (result != ERROR_SUCCESS)
+ return;
+
+ WCHAR name[128];
+ FILETIME lastModified;
+
+ Vector<int> latestJavaVersion;
+ String latestJavaVersionString;
+
+ // Enumerate subkeys
+ for (int i = 0;; i++) {
+ DWORD nameLen = sizeof(name) / sizeof(WCHAR);
+ result = RegEnumKeyExW(key, i, name, &nameLen, 0, 0, 0, &lastModified);
+
+ if (result != ERROR_SUCCESS)
+ break;
+
+ Vector<int> javaVersion = parseVersionString(String(name, nameLen));
+ if (compareVersions(javaVersion, latestJavaVersion)) {
+ latestJavaVersion = javaVersion;
+ latestJavaVersionString = String(name, nameLen);
+ }
+ }
+
+ if (!latestJavaVersionString.isEmpty()) {
+ DWORD type;
+ WCHAR javaInstallPathStr[_MAX_PATH];
+ DWORD javaInstallPathSize = sizeof(javaInstallPathStr);
+ DWORD useNewPluginValue;
+ DWORD useNewPluginSize;
+
+ String javaPluginKeyPath = "Software\\JavaSoft\\Java Plug-in\\" + latestJavaVersionString;
+ result = SHGetValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination(), TEXT("UseNewJavaPlugin"), &type, (LPVOID)&useNewPluginValue, &useNewPluginSize);
+
+ if (result == ERROR_SUCCESS && useNewPluginValue == 1) {
+ result = SHGetValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination(), TEXT("JavaHome"), &type, (LPBYTE)javaInstallPathStr, &javaInstallPathSize);
+ if (result == ERROR_SUCCESS) {
+ String javaPluginDirectory = String(javaInstallPathStr, javaInstallPathSize / sizeof(WCHAR) - 1) + "\\bin\\new_plugin";
+ directories.append(javaPluginDirectory);
+ }
+ }
+ }
+
+ RegCloseKey(key);
+}
+
static inline String safariPluginsDirectory()
{
WCHAR moduleFileNameStr[_MAX_PATH];
@@ -385,6 +435,9 @@ Vector<String> PluginDatabase::defaultPluginDirectories()
addMozillaPluginDirectories(directories);
addWindowsMediaPlayerPluginDirectory(directories);
addMacromediaPluginDirectories(directories);
+#if PLATFORM(QT)
+ addJavaPluginDirectory(directories);
+#endif
return directories;
}
diff --git a/WebCore/rendering/AutoTableLayout.cpp b/WebCore/rendering/AutoTableLayout.cpp
index ea8b416..d9233a2 100644
--- a/WebCore/rendering/AutoTableLayout.cpp
+++ b/WebCore/rendering/AutoTableLayout.cpp
@@ -140,7 +140,7 @@ void AutoTableLayout::recalcColumn(int effCol)
// Nav/IE weirdness
if (l.width.isFixed()) {
- if (m_table->style()->htmlHacks() && l.maxWidth > l.width.value() && fixedContributor != maxContributor) {
+ if (m_table->document()->inQuirksMode() && l.maxWidth > l.width.value() && fixedContributor != maxContributor) {
l.width = Length();
fixedContributor = 0;
}
diff --git a/WebCore/rendering/FixedTableLayout.cpp b/WebCore/rendering/FixedTableLayout.cpp
index 4d6b88c..b5ff971 100644
--- a/WebCore/rendering/FixedTableLayout.cpp
+++ b/WebCore/rendering/FixedTableLayout.cpp
@@ -223,7 +223,7 @@ void FixedTableLayout::calcPrefWidths(int& minWidth, int& maxWidth)
// In this example, the two inner tables should be as large as the outer table.
// We can achieve this effect by making the maxwidth of fixed tables with percentage
// widths be infinite.
- if (m_table->style()->htmlHacks() && m_table->style()->width().isPercent()
+ if (m_table->document()->inQuirksMode() && m_table->style()->width().isPercent()
&& maxWidth < TABLE_MAX_WIDTH)
maxWidth = TABLE_MAX_WIDTH;
}
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index dfe7561..a71b796 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -761,8 +761,8 @@ void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
int h = height();
// Constrain our background/border painting to the line top and bottom if necessary.
- bool strictMode = renderer()->document()->inStrictMode();
- if (!hasTextChildren() && !strictMode) {
+ bool noQuirksMode = renderer()->document()->inNoQuirksMode();
+ if (!hasTextChildren() && !noQuirksMode) {
RootInlineBox* rootBox = root();
int bottom = min(rootBox->lineBottom(), y + h);
y = max(rootBox->lineTop(), y);
@@ -837,8 +837,8 @@ void InlineFlowBox::paintMask(PaintInfo& paintInfo, int tx, int ty)
int h = height();
// Constrain our background/border painting to the line top and bottom if necessary.
- bool strictMode = renderer()->document()->inStrictMode();
- if (!hasTextChildren() && !strictMode) {
+ bool noQuirksMode = renderer()->document()->inNoQuirksMode();
+ if (!hasTextChildren() && !noQuirksMode) {
RootInlineBox* rootBox = root();
int bottom = min(rootBox->lineBottom(), y + h);
y = max(rootBox->lineTop(), y);
@@ -922,7 +922,7 @@ void InlineFlowBox::paintTextDecorations(PaintInfo& paintInfo, int tx, int ty, b
{
// Paint text decorations like underlines/overlines. We only do this if we aren't in quirks mode (i.e., in
// almost-strict mode or strict mode).
- if (renderer()->style()->htmlHacks() || !paintInfo.shouldPaintWithinRoot(renderer()) ||
+ if (renderer()->document()->inQuirksMode() || !paintInfo.shouldPaintWithinRoot(renderer()) ||
renderer()->style()->visibility() != VISIBLE)
return;
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index cb4fdb8..c74fe1e 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -547,7 +547,7 @@ void InlineTextBox::paint(PaintInfo& paintInfo, int tx, int ty)
}
// Paint decorations
- if (d != TDNONE && paintInfo.phase != PaintPhaseSelection && styleToUse->htmlHacks()) {
+ if (d != TDNONE && paintInfo.phase != PaintPhaseSelection && renderer()->document()->inQuirksMode()) {
context->setStrokeColor(styleToUse->visitedDependentColor(CSSPropertyColor), styleToUse->colorSpace());
paintDecoration(context, tx, ty, d, textShadow);
}
@@ -768,6 +768,21 @@ void InlineTextBox::paintDecoration(GraphicsContext* context, int tx, int ty, in
context->clearShadow();
}
+static GraphicsContext::TextCheckingLineStyle textCheckingLineStyleForMarkerType(DocumentMarker::MarkerType markerType)
+{
+ switch (markerType) {
+ case DocumentMarker::Spelling:
+ return GraphicsContext::TextCheckingSpellingLineStyle;
+ case DocumentMarker::Grammar:
+ return GraphicsContext::TextCheckingGrammarLineStyle;
+ case DocumentMarker::Replacement:
+ return GraphicsContext::TextCheckingReplacementLineStyle;
+ default:
+ ASSERT_NOT_REACHED();
+ return GraphicsContext::TextCheckingSpellingLineStyle;
+ }
+}
+
void InlineTextBox::paintSpellingOrGrammarMarker(GraphicsContext* pt, int tx, int ty, const DocumentMarker& marker, RenderStyle* style, const Font& font, bool grammar)
{
// Never print spelling/grammar markers (5327887)
@@ -831,7 +846,7 @@ void InlineTextBox::paintSpellingOrGrammarMarker(GraphicsContext* pt, int tx, in
// In larger fonts, though, place the underline up near the baseline to prevent a big gap.
underlineOffset = baseline + 2;
}
- pt->drawLineForMisspellingOrBadGrammar(IntPoint(tx + m_x + start, ty + m_y + underlineOffset), width, grammar);
+ pt->drawLineForTextChecking(IntPoint(tx + m_x + start, ty + m_y + underlineOffset), width, textCheckingLineStyleForMarkerType(marker.type));
}
void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, int tx, int ty, const DocumentMarker& marker, RenderStyle* style, const Font& font)
@@ -898,10 +913,10 @@ void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, int tx, int ty, Re
case DocumentMarker::Grammar:
case DocumentMarker::Spelling:
case DocumentMarker::Replacement:
+ case DocumentMarker::RejectedCorrection:
if (background)
continue;
break;
-
case DocumentMarker::TextMatch:
if (!background)
continue;
@@ -933,6 +948,9 @@ void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, int tx, int ty, Re
break;
case DocumentMarker::Replacement:
computeRectForReplacementMarker(tx, ty, marker, style, font);
+ paintSpellingOrGrammarMarker(pt, tx, ty, marker, style, font, false);
+ break;
+ case DocumentMarker::RejectedCorrection:
break;
default:
ASSERT_NOT_REACHED();
diff --git a/WebCore/rendering/MediaControlElements.cpp b/WebCore/rendering/MediaControlElements.cpp
index 3fb712f..aaeb3e2 100644
--- a/WebCore/rendering/MediaControlElements.cpp
+++ b/WebCore/rendering/MediaControlElements.cpp
@@ -42,6 +42,7 @@
#include "RenderMedia.h"
#include "RenderSlider.h"
#include "RenderTheme.h"
+#include "Settings.h"
namespace WebCore {
@@ -780,7 +781,20 @@ PassRefPtr<MediaControlFullscreenButtonElement> MediaControlFullscreenButtonElem
void MediaControlFullscreenButtonElement::defaultEventHandler(Event* event)
{
if (event->type() == eventNames().clickEvent) {
- mediaElement()->enterFullscreen();
+#if ENABLE(FULLSCREEN_API)
+ // Only use the new full screen API if the fullScreenEnabled setting has
+ // been explicitly enabled. Otherwise, use the old fullscreen API. This
+ // allows apps which embed a WebView to retain the existing full screen
+ // video implementation without requiring them to implement their own full
+ // screen behavior.
+ if (document()->settings() && document()->settings()->fullScreenEnabled()) {
+ if (document()->webkitFullScreen() && document()->webkitCurrentFullScreenElement() == mediaElement())
+ document()->webkitCancelFullScreen();
+ else
+ mediaElement()->webkitRequestFullScreen(0);
+ } else
+#endif
+ mediaElement()->enterFullscreen();
event->setDefaultHandled();
}
HTMLInputElement::defaultEventHandler(event);
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 28d7914..d66336d 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -1042,7 +1042,7 @@ bool RenderBlock::isSelfCollapsingBlock() const
return false;
bool hasAutoHeight = style()->height().isAuto();
- if (style()->height().isPercent() && !style()->htmlHacks()) {
+ if (style()->height().isPercent() && !document()->inQuirksMode()) {
hasAutoHeight = true;
for (RenderBlock* cb = containingBlock(); !cb->isRenderView(); cb = cb->containingBlock()) {
if (cb->style()->height().isFixed() || cb->isTableCell())
@@ -1478,7 +1478,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
// This child is collapsing with the top of the
// block. If it has larger margin values, then we need to update
// our own maximal values.
- if (!style()->htmlHacks() || !marginInfo.quirkContainer() || !topQuirk)
+ if (!document()->inQuirksMode() || !marginInfo.quirkContainer() || !topQuirk)
setMaxTopMargins(max(posTop, maxTopPosMargin()), max(negTop, maxTopNegMargin()));
// The minute any of the margins involved isn't a quirk, don't
@@ -1530,7 +1530,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
}
else if (!marginInfo.atTopOfBlock() ||
(!marginInfo.canCollapseTopWithChildren()
- && (!style()->htmlHacks() || !marginInfo.quirkContainer() || !marginInfo.topQuirk()))) {
+ && (!document()->inQuirksMode() || !marginInfo.quirkContainer() || !marginInfo.topQuirk()))) {
// We're collapsing with a previous sibling's margins and not
// with the top of the block.
setHeight(height() + max(marginInfo.posMargin(), posTop) - max(marginInfo.negMargin(), negTop));
@@ -1683,7 +1683,7 @@ void RenderBlock::handleBottomOfBlock(int top, int bottom, MarginInfo& marginInf
// If we can't collapse with children then go ahead and add in the bottom margin.
if (!marginInfo.canCollapseWithBottom() && !marginInfo.canCollapseWithTop()
- && (!style()->htmlHacks() || !marginInfo.quirkContainer() || !marginInfo.bottomQuirk()))
+ && (!document()->inQuirksMode() || !marginInfo.quirkContainer() || !marginInfo.bottomQuirk()))
setHeight(height() + marginInfo.margin());
// Now add in our bottom border/padding.
@@ -2120,8 +2120,12 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
PaintInfo info(paintInfo);
info.phase = newPhase;
info.updatePaintingRootForChildren(this);
+
+ RenderView* renderView = view();
+ bool usePrintRect = !renderView->printRect().isEmpty() && !document()->settings()->paginateDuringLayoutEnabled();
+
bool checkPageBreaks = document()->paginated() && !document()->settings()->paginateDuringLayoutEnabled();
- bool checkColumnBreaks = !checkPageBreaks && !view()->printRect().isEmpty() && !document()->settings()->paginateDuringLayoutEnabled();
+ bool checkColumnBreaks = !checkPageBreaks && usePrintRect;
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
// Check for page-break-before: always, and if it's set, break and bail.
@@ -2133,6 +2137,17 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
return;
}
+ if (!child->isFloating() && child->isReplaced() && usePrintRect && child->height() <= renderView->printRect().height()) {
+ // Paginate block-level replaced elements.
+ if (ty + child->y() + child->height() > renderView->printRect().bottom()) {
+ if (ty + child->y() < renderView->truncatedAt())
+ renderView->setBestTruncatedAt(ty + child->y(), child);
+ // If we were able to truncate, don't paint.
+ if (ty + child->y() >= renderView->truncatedAt())
+ break;
+ }
+ }
+
if (!child->hasSelfPaintingLayer() && !child->isFloating())
child->paint(info, tx, ty);
@@ -3529,7 +3544,7 @@ void RenderBlock::clearFloats()
int RenderBlock::addOverhangingFloats(RenderBlock* child, int xoff, int yoff, bool makeChildPaintOtherFloats)
{
// Prevent floats from being added to the canvas by the root element, e.g., <html>.
- if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot())
+ if (child->hasOverflowClip() || !child->containsFloats() || child->isRoot() || child->hasColumns())
return 0;
int lowestFloatBottom = 0;
@@ -4593,7 +4608,7 @@ void RenderBlock::calcInlinePrefWidths()
// Firefox and Opera will allow a table cell to grow to fit an image inside it under
// very specific cirucumstances (in order to match common WinIE renderings).
// Not supporting the quirk has caused us to mis-render some real sites. (See Bugzilla 10517.)
- bool allowImagesToBreak = !style()->htmlHacks() || !isTableCell() || !style()->width().isIntrinsicOrAuto();
+ bool allowImagesToBreak = !document()->inQuirksMode() || !isTableCell() || !style()->width().isIntrinsicOrAuto();
bool autoWrap, oldAutoWrap;
autoWrap = oldAutoWrap = style()->autoWrap();
@@ -4922,7 +4937,7 @@ void RenderBlock::calcBlockPrefWidths()
// of 100px because of the table.
// We can achieve this effect by making the maxwidth of blocks that contain tables
// with percentage widths be infinite (as long as they are not inside a table cell).
- if (style()->htmlHacks() && child->style()->width().isPercent() &&
+ if (document()->inQuirksMode() && child->style()->width().isPercent() &&
!isTableCell() && child->isTable() && m_maxPrefWidth < BLOCK_MAX_WIDTH) {
RenderBlock* cb = containingBlock();
while (!cb->isRenderView() && !cb->isTableCell())
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index 7cb1597..d703fb2 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -194,7 +194,7 @@ static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo
// We only treat a box as text for a <br> if we are on a line by ourself or in strict mode
// (Note the use of strict mode. In "almost strict" mode, we don't treat the box for <br> as text.)
if (obj->isBR())
- textBox->setIsText(isOnlyRun || obj->document()->inStrictMode());
+ textBox->setIsText(isOnlyRun || obj->document()->inNoQuirksMode());
return textBox;
}
@@ -1518,7 +1518,7 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
// Firefox and Opera will allow a table cell to grow to fit an image inside it under
// very specific circumstances (in order to match common WinIE renderings).
// Not supporting the quirk has caused us to mis-render some real sites. (See Bugzilla 10517.)
- bool allowImagesToBreak = !style()->htmlHacks() || !isTableCell() || !style()->width().isIntrinsicOrAuto();
+ bool allowImagesToBreak = !document()->inQuirksMode() || !isTableCell() || !style()->width().isIntrinsicOrAuto();
EWhiteSpace currWS = style()->whiteSpace();
EWhiteSpace lastWS = currWS;
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index d614081..e107c4f 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -1619,7 +1619,7 @@ int RenderBox::calcPercentageHeight(const Length& height)
int result = -1;
bool skippedAutoHeightContainingBlock = false;
RenderBlock* cb = containingBlock();
- if (style()->htmlHacks()) {
+ if (document()->inQuirksMode()) {
// In quirks mode, blocks with auto height are skipped, and we keep looking for an enclosing
// block that may have a specified height and then use it. In strict mode, this violates the
// specification, which states that percentage heights just revert to auto if the containing
@@ -1668,7 +1668,7 @@ int RenderBox::calcPercentageHeight(const Length& height)
result = cb->calcPercentageHeight(cb->style()->height());
if (result != -1)
result = cb->calcContentBoxHeight(result);
- } else if (cb->isRenderView() || (cb->isBody() && style()->htmlHacks()) || isPositionedWithSpecifiedHeight) {
+ } else if (cb->isRenderView() || (cb->isBody() && document()->inQuirksMode()) || isPositionedWithSpecifiedHeight) {
// Don't allow this to affect the block' height() member variable, since this
// can get called while the block is still laying out its kids.
int oldHeight = cb->height();
@@ -1901,7 +1901,7 @@ void RenderBox::calcAbsoluteHorizontal()
// To match WinIE, in quirks mode use the parent's 'direction' property
// instead of the the container block's.
- TextDirection containerDirection = (style()->htmlHacks()) ? parent()->style()->direction() : containerBlock->style()->direction();
+ TextDirection containerDirection = (document()->inQuirksMode()) ? parent()->style()->direction() : containerBlock->style()->direction();
const int bordersPlusPadding = borderAndPaddingWidth();
const Length marginLeft = style()->marginLeft();
@@ -2437,7 +2437,7 @@ void RenderBox::calcAbsoluteHorizontalReplaced()
// To match WinIE, in quirks mode use the parent's 'direction' property
// instead of the the container block's.
- TextDirection containerDirection = (style()->htmlHacks()) ? parent()->style()->direction() : containerBlock->style()->direction();
+ TextDirection containerDirection = (document()->inQuirksMode()) ? parent()->style()->direction() : containerBlock->style()->direction();
// Variables to solve.
Length left = style()->left();
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index e02f77a..8f1e9c3 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -217,7 +217,7 @@ public:
bool stretchesToViewHeight() const
{
- return style()->htmlHacks() && style()->height().isAuto() && !isFloatingOrPositioned() && (isRoot() || isBody());
+ return document()->inQuirksMode() && style()->height().isAuto() && !isFloatingOrPositioned() && (isRoot() || isBody());
}
virtual IntSize intrinsicSize() const { return IntSize(); }
@@ -246,7 +246,7 @@ public:
virtual int verticalScrollbarWidth() const;
int horizontalScrollbarHeight() const;
- virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1.0f, Node** stopNode = 0);
+ virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
bool canBeScrolledAndHasScrollableArea() const;
virtual bool canBeProgramaticallyScrolled(bool) const;
virtual void autoscroll();
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index 78618d1..0fbc9f2 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -337,10 +337,25 @@ int RenderBoxModelObject::relativePositionOffsetX() const
int RenderBoxModelObject::relativePositionOffsetY() const
{
- if (!style()->top().isAuto())
- return style()->top().calcValue(containingBlock()->availableHeight());
- else if (!style()->bottom().isAuto())
- return -style()->bottom().calcValue(containingBlock()->availableHeight());
+ RenderBlock* containingBlock = this->containingBlock();
+
+ // If the containing block of a relatively positioned element does not
+ // specify a height, a percentage top or bottom offset should be resolved as
+ // auto. An exception to this is if the containing block has the WinIE quirk
+ // where <html> and <body> assume the size of the viewport. In this case,
+ // calculate the percent offset based on this height.
+ // See <https://bugs.webkit.org/show_bug.cgi?id=26396>.
+ if (!style()->top().isAuto()
+ && (!containingBlock->style()->height().isAuto()
+ || !style()->top().isPercent()
+ || containingBlock->stretchesToViewHeight()))
+ return style()->top().calcValue(containingBlock->availableHeight());
+
+ if (!style()->bottom().isAuto()
+ && (!containingBlock->style()->height().isAuto()
+ || !style()->bottom().isPercent()
+ || containingBlock->stretchesToViewHeight()))
+ return -style()->bottom().calcValue(containingBlock->availableHeight());
return 0;
}
diff --git a/WebCore/rendering/RenderEmbeddedObject.cpp b/WebCore/rendering/RenderEmbeddedObject.cpp
index 55b230b..b1b253a 100644
--- a/WebCore/rendering/RenderEmbeddedObject.cpp
+++ b/WebCore/rendering/RenderEmbeddedObject.cpp
@@ -102,6 +102,7 @@ bool RenderEmbeddedObject::allowsAcceleratedCompositing() const
}
#endif
+// FIXME: This belongs in HTMLPluginElement.cpp to be shared by HTMLObjectElement and HTMLEmbedElement.
static bool isURLAllowed(Document* doc, const String& url)
{
if (doc->frame()->page()->frameCount() >= Page::maxNumberOfFrames)
@@ -123,6 +124,7 @@ static bool isURLAllowed(Document* doc, const String& url)
typedef HashMap<String, String, CaseFoldingHash> ClassIdToTypeMap;
+// FIXME: This belongs in HTMLObjectElement.cpp
static ClassIdToTypeMap* createClassIdToTypeMap()
{
ClassIdToTypeMap* map = new ClassIdToTypeMap;
@@ -135,6 +137,7 @@ static ClassIdToTypeMap* createClassIdToTypeMap()
return map;
}
+// FIXME: This belongs in HTMLObjectElement.cpp
static String serviceTypeForClassId(const String& classId)
{
// Return early if classId is empty (since we won't do anything below).
@@ -146,6 +149,7 @@ static String serviceTypeForClassId(const String& classId)
return map->get(classId);
}
+// FIXME: This belongs in HTMLObjectElement.cpp
static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramValues)
{
// Some plugins don't understand the "data" attribute of the OBJECT tag (i.e. Real and WMP
@@ -164,190 +168,205 @@ static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramV
}
}
-void RenderEmbeddedObject::updateWidget(bool onlyCreateNonNetscapePlugins)
+// FIXME: This belongs in some loader header?
+static bool isNetscapePlugin(Frame* frame, const String& url, const String& serviceType)
{
- if (!m_replacementText.isNull() || !node()) // Check the node in case destroy() has been called.
- return;
-
- String url;
- String serviceType;
- Vector<String> paramNames;
- Vector<String> paramValues;
- Frame* frame = frameView()->frame();
-
- // The calls to SubframeLoader::requestObject within this function can result in a plug-in being initialized.
- // This can run cause arbitrary JavaScript to run and may result in this RenderObject being detached from
- // the render tree and destroyed, causing a crash like <rdar://problem/6954546>. By extending our lifetime
- // artifically to ensure that we remain alive for the duration of plug-in initialization.
- RenderWidgetProtector protector(this);
+ KURL completedURL;
+ if (!url.isEmpty())
+ completedURL = frame->loader()->completeURL(url);
- if (node()->hasTagName(objectTag)) {
- HTMLObjectElement* objectElement = static_cast<HTMLObjectElement*>(node());
+ if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
+ return true;
+ return false;
+}
- objectElement->setNeedWidgetUpdate(false);
- if (!objectElement->isFinishedParsingChildren())
- return;
+// FIXME: This belongs on HTMLObjectElement.
+static bool hasFallbackContent(HTMLObjectElement* objectElement)
+{
+ for (Node* child = objectElement->firstChild(); child; child = child->nextSibling()) {
+ if ((!child->isTextNode() && !child->hasTagName(paramTag)) // Discount <param>
+ || (child->isTextNode() && !static_cast<Text*>(child)->containsOnlyWhitespace()))
+ return true;
+ }
+ return false;
+}
- // Check for a child EMBED tag.
- HTMLEmbedElement* embed = 0;
- for (Node* child = objectElement->firstChild(); child; ) {
- if (child->hasTagName(embedTag)) {
- embed = static_cast<HTMLEmbedElement*>(child);
- break;
+// FIXME: This belongs on HTMLObjectElement.
+static void parametersFromObject(HTMLObjectElement* objectElement, Vector<String>& paramNames, Vector<String>& paramValues, String& url, String& serviceType)
+{
+ HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames;
+
+ // Scan the PARAM children and store their name/value pairs.
+ // Get the URL and type from the params if we don't already have them.
+ Node* child = objectElement->firstChild();
+ while (child) {
+ if (child->hasTagName(paramTag)) {
+ HTMLParamElement* p = static_cast<HTMLParamElement*>(child);
+ String name = p->name();
+ if (url.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))
+ url = deprecatedParseURL(p->value());
+ // FIXME: serviceType calculation does not belong in this function.
+ if (serviceType.isEmpty() && equalIgnoringCase(name, "type")) {
+ serviceType = p->value();
+ size_t pos = serviceType.find(";");
+ if (pos != notFound)
+ serviceType = serviceType.left(pos);
}
-
- if (child->hasTagName(objectTag))
- child = child->nextSibling(); // Don't descend into nested OBJECT tags
- else
- child = child->traverseNextNode(objectElement); // Otherwise descend (EMBEDs may be inside COMMENT tags)
- }
-
- // Use the attributes from the EMBED tag instead of the OBJECT tag including WIDTH and HEIGHT.
- HTMLElement* embedOrObject;
- if (embed) {
- embedOrObject = embed;
- url = embed->url();
- serviceType = embed->serviceType();
- } else
- embedOrObject = objectElement;
-
- // If there was no URL or type defined in EMBED, try the OBJECT tag.
- if (url.isEmpty())
- url = objectElement->url();
- if (serviceType.isEmpty())
- serviceType = objectElement->serviceType();
-
- HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames;
-
- // Scan the PARAM children.
- // Get the URL and type from the params if we don't already have them.
- // Get the attributes from the params if there is no EMBED tag.
- Node* child = objectElement->firstChild();
- while (child && (url.isEmpty() || serviceType.isEmpty() || !embed)) {
- if (child->hasTagName(paramTag)) {
- HTMLParamElement* p = static_cast<HTMLParamElement*>(child);
- String name = p->name();
- if (url.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))
- url = p->value();
- if (serviceType.isEmpty() && equalIgnoringCase(name, "type")) {
- serviceType = p->value();
- size_t pos = serviceType.find(";");
- if (pos != notFound)
- serviceType = serviceType.left(pos);
- }
- if (!embed && !name.isEmpty()) {
- uniqueParamNames.add(name.impl());
- paramNames.append(p->name());
- paramValues.append(p->value());
- }
+ if (!name.isEmpty()) {
+ uniqueParamNames.add(name.impl());
+ paramNames.append(p->name());
+ paramValues.append(p->value());
}
- child = child->nextSibling();
}
+ child = child->nextSibling();
+ }
- // When OBJECT is used for an applet via Sun's Java plugin, the CODEBASE attribute in the tag
- // points to the Java plugin itself (an ActiveX component) while the actual applet CODEBASE is
- // in a PARAM tag. See <http://java.sun.com/products/plugin/1.2/docs/tags.html>. This means
- // we have to explicitly suppress the tag's CODEBASE attribute if there is none in a PARAM,
- // else our Java plugin will misinterpret it. [4004531]
- String codebase;
- if (!embed && MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) {
- codebase = "codebase";
- uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM already
- }
-
- // Turn the attributes of either the EMBED tag or OBJECT tag into arrays, but don't override PARAM values.
- NamedNodeMap* attributes = embedOrObject->attributes();
- if (attributes) {
- for (unsigned i = 0; i < attributes->length(); ++i) {
- Attribute* it = attributes->attributeItem(i);
- const AtomicString& name = it->name().localName();
- if (embed || !uniqueParamNames.contains(name.impl())) {
- paramNames.append(name.string());
- paramValues.append(it->value().string());
- }
+ // When OBJECT is used for an applet via Sun's Java plugin, the CODEBASE attribute in the tag
+ // points to the Java plugin itself (an ActiveX component) while the actual applet CODEBASE is
+ // in a PARAM tag. See <http://java.sun.com/products/plugin/1.2/docs/tags.html>. This means
+ // we have to explicitly suppress the tag's CODEBASE attribute if there is none in a PARAM,
+ // else our Java plugin will misinterpret it. [4004531]
+ String codebase;
+ if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) {
+ codebase = "codebase";
+ uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM already
+ }
+
+ // Turn the attributes of the <object> element into arrays, but don't override <param> values.
+ NamedNodeMap* attributes = objectElement->attributes();
+ if (attributes) {
+ for (unsigned i = 0; i < attributes->length(); ++i) {
+ Attribute* it = attributes->attributeItem(i);
+ const AtomicString& name = it->name().localName();
+ if (!uniqueParamNames.contains(name.impl())) {
+ paramNames.append(name.string());
+ paramValues.append(it->value().string());
}
}
+ }
- mapDataParamToSrc(&paramNames, &paramValues);
+ mapDataParamToSrc(&paramNames, &paramValues);
- // If we still don't have a type, try to map from a specific CLASSID to a type.
- if (serviceType.isEmpty())
- serviceType = serviceTypeForClassId(objectElement->classId());
+ // If we still don't have a type, try to map from a specific CLASSID to a type.
+ if (serviceType.isEmpty())
+ serviceType = serviceTypeForClassId(objectElement->classId());
+}
- if (!isURLAllowed(document(), url))
- return;
+// FIXME: This belongs on HTMLObjectElement, HTMLPluginElement or HTMLFrameOwnerElement.
+static void updateWidgetForObjectElement(HTMLObjectElement* objectElement, bool onlyCreateNonNetscapePlugins)
+{
+ objectElement->setNeedsWidgetUpdate(false);
+ if (!objectElement->isFinishedParsingChildren())
+ return;
- // Find out if we support fallback content.
- m_hasFallbackContent = false;
- for (Node* child = objectElement->firstChild(); child && !m_hasFallbackContent; child = child->nextSibling()) {
- if ((!child->isTextNode() && !child->hasTagName(embedTag) && !child->hasTagName(paramTag)) // Discount <embed> and <param>
- || (child->isTextNode() && !static_cast<Text*>(child)->containsOnlyWhitespace()))
- m_hasFallbackContent = true;
- }
+ Frame* frame = objectElement->document()->frame();
+ String url = objectElement->url();
+ String serviceType = objectElement->serviceType();
- if (onlyCreateNonNetscapePlugins) {
- KURL completedURL;
- if (!url.isEmpty())
- completedURL = frame->loader()->completeURL(url);
+ Vector<String> paramNames;
+ Vector<String> paramValues;
+ parametersFromObject(objectElement, paramNames, paramValues, url, serviceType);
- if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
- return;
- }
+ if (!isURLAllowed(objectElement->document(), url))
+ return;
- bool beforeLoadAllowedLoad = objectElement->dispatchBeforeLoadEvent(url);
-
- // beforeload events can modify the DOM, potentially causing
- // RenderWidget::destroy() to be called. Ensure we haven't been
- // destroyed before continuing.
- if (!node())
- return;
-
- bool success = beforeLoadAllowedLoad && frame->loader()->subframeLoader()->requestObject(this, url, objectElement->getAttribute(nameAttr), serviceType, paramNames, paramValues);
-
- if (!success && m_hasFallbackContent)
- objectElement->renderFallbackContent();
+ bool fallbackContent = hasFallbackContent(objectElement);
+ objectElement->renderEmbeddedObject()->setHasFallbackContent(fallbackContent);
- } else if (node()->hasTagName(embedTag)) {
- HTMLEmbedElement* embedElement = static_cast<HTMLEmbedElement*>(node());
- embedElement->setNeedWidgetUpdate(false);
- url = embedElement->url();
- serviceType = embedElement->serviceType();
+ if (onlyCreateNonNetscapePlugins && isNetscapePlugin(frame, url, serviceType))
+ return;
- if (url.isEmpty() && serviceType.isEmpty())
- return;
- if (!isURLAllowed(document(), url))
- return;
+ bool beforeLoadAllowedLoad = objectElement->dispatchBeforeLoadEvent(url);
- // add all attributes set on the embed object
- NamedNodeMap* attributes = embedElement->attributes();
- if (attributes) {
- for (unsigned i = 0; i < attributes->length(); ++i) {
- Attribute* it = attributes->attributeItem(i);
- paramNames.append(it->name().localName().string());
- paramValues.append(it->value().string());
- }
- }
+ // beforeload events can modify the DOM, potentially causing
+ // RenderWidget::destroy() to be called. Ensure we haven't been
+ // destroyed before continuing.
+ // FIXME: Should this render fallback content?
+ if (!objectElement->renderer())
+ return;
+
+ bool success = beforeLoadAllowedLoad && frame->loader()->subframeLoader()->requestObject(objectElement, url, objectElement->getAttribute(nameAttr), serviceType, paramNames, paramValues);
- if (onlyCreateNonNetscapePlugins) {
- KURL completedURL;
- if (!url.isEmpty())
- completedURL = frame->loader()->completeURL(url);
+ if (!success && fallbackContent)
+ objectElement->renderFallbackContent();
+}
- if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)
- return;
+// FIXME: This belongs on HTMLEmbedElement.
+static void parametersFromEmbed(HTMLEmbedElement* embedElement, Vector<String>& paramNames, Vector<String>& paramValues)
+{
+ NamedNodeMap* attributes = embedElement->attributes();
+ if (attributes) {
+ for (unsigned i = 0; i < attributes->length(); ++i) {
+ Attribute* it = attributes->attributeItem(i);
+ paramNames.append(it->name().localName().string());
+ paramValues.append(it->value().string());
}
+ }
+}
+
+// FIXME: This belongs on HTMLEmbedElement, HTMLPluginElement or HTMLFrameOwnerElement.
+static void updateWidgetForEmbedElement(HTMLEmbedElement* embedElement, bool onlyCreateNonNetscapePlugins)
+{
+ Frame* frame = embedElement->document()->frame();
+ String url = embedElement->url();
+ String serviceType = embedElement->serviceType();
- if (embedElement->dispatchBeforeLoadEvent(url))
- frame->loader()->subframeLoader()->requestObject(this, url, embedElement->getAttribute(nameAttr), serviceType, paramNames, paramValues);
+ embedElement->setNeedsWidgetUpdate(false);
+
+ if (url.isEmpty() && serviceType.isEmpty())
+ return;
+ if (!isURLAllowed(embedElement->document(), url))
+ return;
+
+ Vector<String> paramNames;
+ Vector<String> paramValues;
+ parametersFromEmbed(embedElement, paramNames, paramValues);
+
+ if (onlyCreateNonNetscapePlugins && isNetscapePlugin(frame, url, serviceType))
+ return;
+
+ if (embedElement->dispatchBeforeLoadEvent(url)) {
+ // FIXME: beforeLoad could have detached the renderer! Just like in the <object> case above.
+ frame->loader()->subframeLoader()->requestObject(embedElement, url, embedElement->getAttribute(nameAttr), serviceType, paramNames, paramValues);
+ }
+}
+
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+// FIXME: This belongs on HTMLMediaElement.
+static void updateWidgetForMediaElement(HTMLMediaElement* mediaElement, bool ignored)
+{
+ Vector<String> paramNames;
+ Vector<String> paramValues;
+ KURL kurl;
+
+ mediaElement->getPluginProxyParams(kurl, paramNames, paramValues);
+ mediaElement->setNeedWidgetUpdate(false);
+ frame->loader()->subframeLoader()->loadMediaPlayerProxyPlugin(mediaElement, kurl, paramNames, paramValues);
+}
+#endif
+
+void RenderEmbeddedObject::updateWidget(bool onlyCreateNonNetscapePlugins)
+{
+ if (!m_replacementText.isNull() || !node()) // Check the node in case destroy() has been called.
+ return;
+
+ // The calls to SubframeLoader::requestObject within this function can result in a plug-in being initialized.
+ // This can run cause arbitrary JavaScript to run and may result in this RenderObject being detached from
+ // the render tree and destroyed, causing a crash like <rdar://problem/6954546>. By extending our lifetime
+ // artifically to ensure that we remain alive for the duration of plug-in initialization.
+ RenderWidgetProtector protector(this);
+
+ if (node()->hasTagName(objectTag)) {
+ HTMLObjectElement* objectElement = static_cast<HTMLObjectElement*>(node());
+ updateWidgetForObjectElement(objectElement, onlyCreateNonNetscapePlugins);
+ } else if (node()->hasTagName(embedTag)) {
+ HTMLEmbedElement* embedElement = static_cast<HTMLEmbedElement*>(node());
+ updateWidgetForEmbedElement(embedElement, onlyCreateNonNetscapePlugins);
}
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
else if (node()->hasTagName(videoTag) || node()->hasTagName(audioTag)) {
HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(node());
- KURL kurl;
-
- mediaElement->getPluginProxyParams(kurl, paramNames, paramValues);
- mediaElement->setNeedWidgetUpdate(false);
- frame->loader()->subframeLoader()->loadMediaPlayerProxyPlugin(node(), kurl, paramNames, paramValues);
+ updateWidgetForMediaElement(mediaElement, onlyCreateNonNetscapePlugins);
}
#endif
}
diff --git a/WebCore/rendering/RenderEmbeddedObject.h b/WebCore/rendering/RenderEmbeddedObject.h
index 0944094..6376f93 100644
--- a/WebCore/rendering/RenderEmbeddedObject.h
+++ b/WebCore/rendering/RenderEmbeddedObject.h
@@ -41,7 +41,9 @@ public:
void setShowsCrashedPluginIndicator();
bool showsMissingPluginIndicator() const { return m_showsMissingPluginIndicator; }
+ // FIXME: This belongs on HTMLObjectElement.
bool hasFallbackContent() const { return m_hasFallbackContent; }
+ void setHasFallbackContent(bool hasFallbackContent) { m_hasFallbackContent = hasFallbackContent; }
void handleMissingPluginIndicatorEvent(Event*);
@@ -68,7 +70,7 @@ private:
bool getReplacementTextGeometry(int tx, int ty, FloatRect& contentRect, Path&, FloatRect& replacementTextRect, Font&, TextRun&, float& textWidth);
String m_replacementText;
- bool m_hasFallbackContent;
+ bool m_hasFallbackContent; // FIXME: This belongs on HTMLObjectElement.
bool m_showsMissingPluginIndicator;
bool m_missingPluginIndicatorIsPressed;
bool m_mouseDownWasInMissingPluginIndicator;
diff --git a/WebCore/rendering/RenderForeignObject.cpp b/WebCore/rendering/RenderForeignObject.cpp
index 50c1a42..bfcb940 100644
--- a/WebCore/rendering/RenderForeignObject.cpp
+++ b/WebCore/rendering/RenderForeignObject.cpp
@@ -102,14 +102,20 @@ void RenderForeignObject::layout()
LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node());
+ bool updateCachedBoundariesInParents = false;
if (m_needsTransformUpdate) {
m_localTransform = foreign->animatedLocalTransform();
m_needsTransformUpdate = false;
+ updateCachedBoundariesInParents = true;
}
+ FloatRect oldViewport = m_viewport;
+
// Cache viewport boundaries
FloatPoint viewportLocation(foreign->x().value(foreign), foreign->y().value(foreign));
m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width().value(foreign), foreign->height().value(foreign)));
+ if (!updateCachedBoundariesInParents)
+ updateCachedBoundariesInParents = oldViewport != m_viewport;
// Set box origin to the foreignObject x/y translation, so positioned objects in XHTML content get correct
// positions. A regular RenderBoxModelObject would pull this information from RenderStyle - in SVG those
@@ -122,6 +128,10 @@ void RenderForeignObject::layout()
RenderBlock::layout();
ASSERT(!needsLayout());
+ // If our bounds changed, notify the parents.
+ if (updateCachedBoundariesInParents)
+ RenderSVGBlock::setNeedsBoundariesUpdate();
+
// Invalidate all resources of this client if our layout changed.
if (layoutChanged)
SVGResourcesCache::clientLayoutChanged(this);
diff --git a/WebCore/rendering/RenderImage.cpp b/WebCore/rendering/RenderImage.cpp
index f34b691..316b1cf 100644
--- a/WebCore/rendering/RenderImage.cpp
+++ b/WebCore/rendering/RenderImage.cpp
@@ -61,7 +61,6 @@ using namespace HTMLNames;
RenderImage::RenderImage(Node* node)
: RenderReplaced(node, IntSize(0, 0))
- , m_cachedImage(0)
{
updateAltText();
@@ -70,22 +69,15 @@ RenderImage::RenderImage(Node* node)
RenderImage::~RenderImage()
{
- if (m_cachedImage)
- m_cachedImage->removeClient(this);
+ ASSERT(m_imageResource);
+ m_imageResource->shutdown();
}
-void RenderImage::setCachedImage(CachedImage* newImage)
+void RenderImage::setImageResource(PassOwnPtr<RenderImageResource> imageResource)
{
- if (m_cachedImage == newImage)
- return;
- if (m_cachedImage)
- m_cachedImage->removeClient(this);
- m_cachedImage = newImage;
- if (m_cachedImage) {
- m_cachedImage->addClient(this);
- if (m_cachedImage->errorOccurred())
- imageChanged(m_cachedImage.get());
- }
+ ASSERT(!m_imageResource);
+ m_imageResource = imageResource;
+ m_imageResource->initialize(this);
}
// If we'll be displaying either alt text or an image, add some padding.
@@ -139,22 +131,22 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
if (hasBoxDecorations() || hasMask())
RenderReplaced::imageChanged(newImage, rect);
-
- if (newImage != imagePtr() || !newImage)
+
+ if (newImage != m_imageResource->imagePtr() || !newImage)
return;
bool imageSizeChanged = false;
// Set image dimensions, taking into account the size of the alt text.
- if (errorOccurred())
- imageSizeChanged = setImageSizeForAltText(m_cachedImage.get());
-
+ if (m_imageResource->errorOccurred())
+ imageSizeChanged = setImageSizeForAltText(m_imageResource->cachedImage());
+
bool shouldRepaint = true;
// Image dimensions have been changed, see what needs to be done
- if (imageSize(style()->effectiveZoom()) != intrinsicSize() || imageSizeChanged) {
- if (!errorOccurred())
- setIntrinsicSize(imageSize(style()->effectiveZoom()));
+ if (m_imageResource->imageSize(style()->effectiveZoom()) != intrinsicSize() || imageSizeChanged) {
+ if (!m_imageResource->errorOccurred())
+ setIntrinsicSize(m_imageResource->imageSize(style()->effectiveZoom()));
// In the case of generated image content using :before/:after, we might not be in the
// render tree yet. In that case, we don't need to worry about check for layout, since we'll get a
@@ -184,7 +176,7 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
if (rect) {
// The image changed rect is in source image coordinates (pre-zooming),
// so map from the bounds of the image to the contentsBox.
- repaintRect = enclosingIntRect(mapRect(*rect, FloatRect(FloatPoint(), imageSize(1.0f)), contentBoxRect()));
+ repaintRect = enclosingIntRect(mapRect(*rect, FloatRect(FloatPoint(), m_imageResource->imageSize(1.0f)), contentBoxRect()));
// Guard against too-large changed rects.
repaintRect.intersect(contentBoxRect());
} else
@@ -207,7 +199,7 @@ void RenderImage::notifyFinished(CachedResource* newImage)
return;
#if USE(ACCELERATED_COMPOSITING)
- if ((newImage == m_cachedImage) && hasLayer()) {
+ if (newImage == m_imageResource->cachedImage() && hasLayer()) {
// tell any potential compositing layers
// that the image is done and they can reference it directly.
layer()->rendererContentChanged();
@@ -216,15 +208,6 @@ void RenderImage::notifyFinished(CachedResource* newImage)
UNUSED_PARAM(newImage);
#endif
}
-
-void RenderImage::resetAnimation()
-{
- if (m_cachedImage) {
- image()->resetAnimation();
- if (!needsLayout())
- repaint();
- }
-}
void RenderImage::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
{
@@ -240,7 +223,7 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
GraphicsContext* context = paintInfo.context;
- if (!hasImage() || errorOccurred()) {
+ if (!m_imageResource->hasImage() || m_imageResource->errorOccurred()) {
if (paintInfo.phase == PaintPhaseSelection)
return;
@@ -265,17 +248,19 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
int usableWidth = cWidth - 2;
int usableHeight = cHeight - 2;
- if (errorOccurred() && !image()->isNull() && (usableWidth >= image()->width()) && (usableHeight >= image()->height())) {
+ Image* image = m_imageResource->image();
+
+ if (m_imageResource->errorOccurred() && !image->isNull() && usableWidth >= image->width() && usableHeight >= image->height()) {
// Center the error image, accounting for border and padding.
- int centerX = (usableWidth - image()->width()) / 2;
+ int centerX = (usableWidth - image->width()) / 2;
if (centerX < 0)
centerX = 0;
- int centerY = (usableHeight - image()->height()) / 2;
+ int centerY = (usableHeight - image->height()) / 2;
if (centerY < 0)
centerY = 0;
imageX = leftBorder + leftPad + centerX + 1;
imageY = topBorder + topPad + centerY + 1;
- context->drawImage(image(), style()->colorSpace(), IntPoint(tx + imageX, ty + imageY));
+ context->drawImage(image, style()->colorSpace(), IntPoint(tx + imageX, ty + imageY));
errorPictureDrawn = true;
}
@@ -298,8 +283,8 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
context->drawText(style()->font(), textRun, IntPoint(ax, ay + ascent));
}
}
- } else if (hasImage() && cWidth > 0 && cHeight > 0) {
- Image* img = image(cWidth, cHeight);
+ } else if (m_imageResource->hasImage() && cWidth > 0 && cHeight > 0) {
+ Image* img = m_imageResource->image(cWidth, cHeight);
if (!img || img->isNull())
return;
@@ -361,22 +346,22 @@ void RenderImage::paintFocusRings(PaintInfo& paintInfo, const RenderStyle* style
void RenderImage::paintIntoRect(GraphicsContext* context, const IntRect& rect)
{
- if (!hasImage() || errorOccurred() || rect.width() <= 0 || rect.height() <= 0)
+ if (!m_imageResource->hasImage() || m_imageResource->errorOccurred() || rect.width() <= 0 || rect.height() <= 0)
return;
- Image* img = image(rect.width(), rect.height());
+ Image* img = m_imageResource->image(rect.width(), rect.height());
if (!img || img->isNull())
return;
HTMLImageElement* imageElt = (node() && node()->hasTagName(imgTag)) ? static_cast<HTMLImageElement*>(node()) : 0;
CompositeOperator compositeOperator = imageElt ? imageElt->compositeOperator() : CompositeSourceOver;
- bool useLowQualityScaling = shouldPaintAtLowQuality(context, this->image(), rect.size());
- context->drawImage(image(rect.width(), rect.height()), style()->colorSpace(), rect, compositeOperator, useLowQualityScaling);
+ bool useLowQualityScaling = shouldPaintAtLowQuality(context, m_imageResource->image(), rect.size());
+ context->drawImage(m_imageResource->image(rect.width(), rect.height()), style()->colorSpace(), rect, compositeOperator, useLowQualityScaling);
}
int RenderImage::minimumReplacedHeight() const
{
- return errorOccurred() ? intrinsicSize().height() : 0;
+ return m_imageResource->errorOccurred() ? intrinsicSize().height() : 0;
}
HTMLMapElement* RenderImage::imageMap() const
@@ -459,18 +444,18 @@ bool RenderImage::isHeightSpecified() const
int RenderImage::calcReplacedWidth(bool includeMaxWidth) const
{
- if (imageHasRelativeWidth())
+ if (m_imageResource->imageHasRelativeWidth())
if (RenderObject* cb = isPositioned() ? container() : containingBlock()) {
if (cb->isBox())
- setImageContainerSize(IntSize(toRenderBox(cb)->availableWidth(), toRenderBox(cb)->availableHeight()));
+ m_imageResource->setImageContainerSize(IntSize(toRenderBox(cb)->availableWidth(), toRenderBox(cb)->availableHeight()));
}
int width;
if (isWidthSpecified())
width = calcReplacedWidthUsing(style()->width());
- else if (usesImageContainerSize())
- width = imageSize(style()->effectiveZoom()).width();
- else if (imageHasRelativeWidth())
+ else if (m_imageResource->usesImageContainerSize())
+ width = m_imageResource->imageSize(style()->effectiveZoom()).width();
+ else if (m_imageResource->imageHasRelativeWidth())
width = 0; // If the image is relatively-sized, set the width to 0 until there is a set container size.
else
width = calcAspectRatioWidth();
@@ -497,9 +482,9 @@ int RenderImage::calcReplacedHeight() const
int height;
if (isHeightSpecified())
height = calcReplacedHeightUsing(style()->height());
- else if (usesImageContainerSize())
- height = imageSize(style()->effectiveZoom()).height();
- else if (imageHasRelativeHeight())
+ else if (m_imageResource->usesImageContainerSize())
+ height = m_imageResource->imageSize(style()->effectiveZoom()).height();
+ else if (m_imageResource->imageHasRelativeHeight())
height = 0; // If the image is relatively-sized, set the height to 0 until there is a set container size.
else
height = calcAspectRatioHeight();
@@ -536,7 +521,7 @@ int RenderImage::calcAspectRatioWidth() const
IntSize size = intrinsicSize();
if (!size.height())
return 0;
- if (!hasImage() || errorOccurred())
+ if (!m_imageResource->hasImage() || m_imageResource->errorOccurred())
return size.width(); // Don't bother scaling.
return RenderReplaced::calcReplacedHeight() * size.width() / size.height();
}
@@ -546,7 +531,7 @@ int RenderImage::calcAspectRatioHeight() const
IntSize size = intrinsicSize();
if (!size.width())
return 0;
- if (!hasImage() || errorOccurred())
+ if (!m_imageResource->hasImage() || m_imageResource->errorOccurred())
return size.height(); // Don't bother scaling.
return RenderReplaced::calcReplacedWidth() * size.height() / size.width();
}
@@ -571,9 +556,4 @@ void RenderImage::calcPrefWidths()
setPrefWidthsDirty(false);
}
-Image* RenderImage::nullImage()
-{
- return Image::nullImage();
-}
-
} // namespace WebCore
diff --git a/WebCore/rendering/RenderImage.h b/WebCore/rendering/RenderImage.h
index b89a652..2b88c32 100644
--- a/WebCore/rendering/RenderImage.h
+++ b/WebCore/rendering/RenderImage.h
@@ -25,6 +25,7 @@
#ifndef RenderImage_h
#define RenderImage_h
+#include "RenderImageResource.h"
#include "RenderReplaced.h"
namespace WebCore {
@@ -36,25 +37,21 @@ public:
RenderImage(Node*);
virtual ~RenderImage();
+ void setImageResource(PassOwnPtr<RenderImageResource>);
+
+ RenderImageResource* imageResource() { return m_imageResource.get(); }
+ const RenderImageResource* imageResource() const { return m_imageResource.get(); }
+ CachedImage* cachedImage() const { return m_imageResource->cachedImage(); }
+
bool setImageSizeForAltText(CachedImage* newImage = 0);
void updateAltText();
- void setCachedImage(CachedImage*);
- CachedImage* cachedImage() const { return m_cachedImage.get(); }
-
HTMLMapElement* imageMap() const;
- void resetAnimation();
-
- virtual bool hasImage() const { return m_cachedImage; }
-
void highQualityRepaintTimerFired(Timer<RenderImage>*);
protected:
- virtual Image* image(int /* width */ = 0, int /* height */ = 0) { return m_cachedImage ? m_cachedImage->image() : nullImage(); }
- virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->errorOccurred(); }
-
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
virtual void paintIntoRect(GraphicsContext*, const IntRect&);
@@ -64,14 +61,14 @@ protected:
bool isWidthSpecified() const;
bool isHeightSpecified() const;
- virtual void intrinsicSizeChanged() { imageChanged(imagePtr()); }
+ virtual void intrinsicSizeChanged() { imageChanged(m_imageResource->imagePtr()); }
private:
virtual const char* renderName() const { return "RenderImage"; }
virtual bool isImage() const { return true; }
virtual bool isRenderImage() const { return true; }
-
+
virtual void paintReplaced(PaintInfo&, int tx, int ty);
virtual int minimumReplacedHeight() const;
@@ -84,37 +81,25 @@ private:
virtual void calcPrefWidths();
- virtual bool usesImageContainerSize() const { return m_cachedImage ? m_cachedImage->usesImageContainerSize() : false; }
- virtual void setImageContainerSize(const IntSize& size) const { if (m_cachedImage) m_cachedImage->setImageContainerSize(size); }
- virtual bool imageHasRelativeWidth() const { return m_cachedImage ? m_cachedImage->imageHasRelativeWidth() : false; }
- virtual bool imageHasRelativeHeight() const { return m_cachedImage ? m_cachedImage->imageHasRelativeHeight() : false; }
- virtual IntSize imageSize(float multiplier) const { return m_cachedImage ? m_cachedImage->imageSize(multiplier) : IntSize(); }
- virtual WrappedImagePtr imagePtr() const { return m_cachedImage.get(); }
-
int calcAspectRatioWidth() const;
int calcAspectRatioHeight() const;
-protected:
- // The image we are rendering.
- CachedResourceHandle<CachedImage> m_cachedImage;
-
private:
// Text to display as long as the image isn't available.
String m_altText;
+ OwnPtr<RenderImageResource> m_imageResource;
- static Image* nullImage();
-
friend class RenderImageScaleObserver;
};
inline RenderImage* toRenderImage(RenderObject* object)
-{
+{
ASSERT(!object || object->isRenderImage());
return static_cast<RenderImage*>(object);
}
inline const RenderImage* toRenderImage(const RenderObject* object)
-{
+{
ASSERT(!object || object->isRenderImage());
return static_cast<const RenderImage*>(object);
}
diff --git a/WebCore/rendering/RenderImageGeneratedContent.cpp b/WebCore/rendering/RenderImageGeneratedContent.cpp
deleted file mode 100644
index 29d0508..0000000
--- a/WebCore/rendering/RenderImageGeneratedContent.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RenderImageGeneratedContent.h"
-
-#include "RenderBlock.h"
-#include "RenderStyle.h"
-#include "StyleCachedImage.h"
-
-namespace WebCore {
-
-RenderImageGeneratedContent::RenderImageGeneratedContent(Node* n)
-: RenderImage(n)
-{}
-
-RenderImageGeneratedContent::~RenderImageGeneratedContent()
-{
- m_cachedImage = 0;
- m_styleImage->removeClient(this);
-}
-
-void RenderImageGeneratedContent::setStyleImage(StyleImage* image)
-{
- if (image->isCachedImage())
- m_cachedImage = static_cast<StyleCachedImage*>(image)->cachedImage();
- m_styleImage = image;
- m_styleImage->addClient(this);
-}
-
-}
diff --git a/WebCore/rendering/RenderImageGeneratedContent.h b/WebCore/rendering/RenderImageGeneratedContent.h
deleted file mode 100644
index 9f8330d..0000000
--- a/WebCore/rendering/RenderImageGeneratedContent.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Computer, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RenderImageGeneratedContent_h
-#define RenderImageGeneratedContent_h
-
-#include "RenderImage.h"
-#include "StyleImage.h"
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class StyleImage;
-
-class RenderImageGeneratedContent : public RenderImage {
-public:
- RenderImageGeneratedContent(Node*);
- virtual ~RenderImageGeneratedContent();
-
- void setStyleImage(StyleImage*);
-
- virtual bool hasImage() const { return true; }
-
-protected:
- virtual Image* image(int w = 0, int h = 0) { return m_styleImage->image(this, IntSize(w, h)); }
- virtual bool errorOccurred() const { return m_styleImage->errorOccurred(); }
- virtual bool usesImageContainerSize() const { return m_styleImage->usesImageContainerSize(); }
- virtual void setImageContainerSize(const IntSize& size) const { m_styleImage->setImageContainerSize(size); }
- virtual bool imageHasRelativeWidth() const { return m_styleImage->imageHasRelativeWidth(); }
- virtual bool imageHasRelativeHeight() const { return m_styleImage->imageHasRelativeHeight(); }
- virtual IntSize imageSize(float multiplier) const { return m_styleImage->imageSize(this, multiplier); }
-
- // |m_styleImage| can be 0 if we get a callback for a background image from RenderObject::setStyle.
- virtual WrappedImagePtr imagePtr() const { return m_styleImage ? m_styleImage->data() : 0; }
-
-private:
- RefPtr<StyleImage> m_styleImage;
-};
-
-} // namespace WebCore
-
-#endif // RenderImageGeneratedContent_h
diff --git a/WebCore/rendering/RenderImageResource.cpp b/WebCore/rendering/RenderImageResource.cpp
new file mode 100644
index 0000000..ea3ed2f
--- /dev/null
+++ b/WebCore/rendering/RenderImageResource.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 1999 Lars Knoll <knoll@kde.org>
+ * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org>
+ * Copyright (C) 2000 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * 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 "RenderImageResource.h"
+
+#include "RenderImageResourceStyleImage.h"
+#include "RenderObject.h"
+
+namespace WebCore {
+
+RenderImageResource::RenderImageResource()
+ : m_renderer(0)
+ , m_cachedImage(0)
+{
+}
+
+RenderImageResource::~RenderImageResource()
+{
+}
+
+void RenderImageResource::initialize(RenderObject* renderer)
+{
+ ASSERT(!m_renderer);
+ ASSERT(renderer);
+ m_renderer = renderer;
+}
+
+void RenderImageResource::shutdown()
+{
+ ASSERT(m_renderer);
+
+ if (m_cachedImage)
+ m_cachedImage->removeClient(m_renderer);
+}
+
+void RenderImageResource::setCachedImage(CachedImage* newImage)
+{
+ ASSERT(m_renderer);
+
+ if (m_cachedImage == newImage)
+ return;
+
+ if (m_cachedImage)
+ m_cachedImage->removeClient(m_renderer);
+ m_cachedImage = newImage;
+ if (m_cachedImage) {
+ m_cachedImage->addClient(m_renderer);
+ if (m_cachedImage->errorOccurred())
+ m_renderer->imageChanged(m_cachedImage.get());
+ }
+}
+
+void RenderImageResource::resetAnimation()
+{
+ ASSERT(m_renderer);
+
+ if (!m_cachedImage)
+ return;
+
+ image()->resetAnimation();
+
+ if (!m_renderer->needsLayout())
+ m_renderer->repaint();
+}
+
+void RenderImageResource::setImageContainerSize(const IntSize& size) const
+{
+ ASSERT(m_renderer);
+
+ if (!m_cachedImage)
+ return;
+
+ m_cachedImage->setImageContainerSize(size);
+}
+
+Image* RenderImageResource::nullImage()
+{
+ return Image::nullImage();
+}
+
+} // namespace WebCore
diff --git a/WebCore/rendering/RenderImageResource.h b/WebCore/rendering/RenderImageResource.h
new file mode 100644
index 0000000..2346712
--- /dev/null
+++ b/WebCore/rendering/RenderImageResource.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 1999 Lars Knoll <knoll@kde.org>
+ * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org>
+ * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * 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 RenderImageResource_h
+#define RenderImageResource_h
+
+#include "CachedImage.h"
+#include "CachedResourceHandle.h"
+#include "StyleImage.h"
+#include <wtf/Noncopyable.h>
+
+namespace WebCore {
+
+class RenderObject;
+
+class RenderImageResource : public Noncopyable {
+public:
+ virtual ~RenderImageResource();
+
+ static PassOwnPtr<RenderImageResource> create()
+ {
+ return adoptPtr(new RenderImageResource);
+ }
+
+ virtual void initialize(RenderObject*);
+ virtual void shutdown();
+
+ void setCachedImage(CachedImage*);
+ CachedImage* cachedImage() const { return m_cachedImage.get(); }
+ virtual bool hasImage() const { return m_cachedImage; }
+
+ void resetAnimation();
+
+ virtual Image* image(int /* width */ = 0, int /* height */ = 0) { return m_cachedImage ? m_cachedImage->image() : nullImage(); }
+ virtual bool errorOccurred() const { return m_cachedImage && m_cachedImage->errorOccurred(); }
+
+ virtual void setImageContainerSize(const IntSize& size) const;
+ virtual bool usesImageContainerSize() const { return m_cachedImage ? m_cachedImage->usesImageContainerSize() : false; }
+ virtual bool imageHasRelativeWidth() const { return m_cachedImage ? m_cachedImage->imageHasRelativeWidth() : false; }
+ virtual bool imageHasRelativeHeight() const { return m_cachedImage ? m_cachedImage->imageHasRelativeHeight() : false; }
+
+ virtual IntSize imageSize(float multiplier) const { return m_cachedImage ? m_cachedImage->imageSize(multiplier) : IntSize(); }
+
+ virtual WrappedImagePtr imagePtr() const { return m_cachedImage.get(); }
+
+protected:
+ RenderImageResource();
+ RenderObject* m_renderer;
+ CachedResourceHandle<CachedImage> m_cachedImage;
+
+private:
+ static Image* nullImage();
+};
+
+} // namespace WebCore
+
+#endif // RenderImage_h
diff --git a/WebCore/rendering/RenderImageResourceStyleImage.cpp b/WebCore/rendering/RenderImageResourceStyleImage.cpp
new file mode 100644
index 0000000..7f41984
--- /dev/null
+++ b/WebCore/rendering/RenderImageResourceStyleImage.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 1999 Lars Knoll <knoll@kde.org>
+ * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org>
+ * Copyright (C) 2000 Dirk Mueller <mueller@kde.org>
+ * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * 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 "RenderImageResourceStyleImage.h"
+
+#include "RenderObject.h"
+#include "StyleCachedImage.h"
+
+namespace WebCore {
+
+RenderImageResourceStyleImage::RenderImageResourceStyleImage(StyleImage* styleImage)
+ : m_styleImage(styleImage)
+{
+ ASSERT(m_styleImage);
+}
+
+RenderImageResourceStyleImage::~RenderImageResourceStyleImage()
+{
+}
+
+void RenderImageResourceStyleImage::initialize(RenderObject* renderer)
+{
+ RenderImageResource::initialize(renderer);
+
+ if (m_styleImage->isCachedImage())
+ m_cachedImage = static_cast<StyleCachedImage*>(m_styleImage.get())->cachedImage();
+
+ m_styleImage->addClient(m_renderer);
+}
+
+void RenderImageResourceStyleImage::shutdown()
+{
+ ASSERT(m_renderer);
+ m_styleImage->removeClient(m_renderer);
+ m_cachedImage = 0;
+}
+
+} // namespace WebCore
diff --git a/WebCore/rendering/RenderImageResourceStyleImage.h b/WebCore/rendering/RenderImageResourceStyleImage.h
new file mode 100644
index 0000000..d91aaa8
--- /dev/null
+++ b/WebCore/rendering/RenderImageResourceStyleImage.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 1999 Lars Knoll <knoll@kde.org>
+ * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org>
+ * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com>
+ * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
+ * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * 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 RenderImageResourceStyleImage_h
+#define RenderImageResourceStyleImage_h
+
+#include "RenderImageResource.h"
+#include "StyleImage.h"
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class RenderObject;
+
+class RenderImageResourceStyleImage : public RenderImageResource {
+public:
+ virtual ~RenderImageResourceStyleImage();
+
+ static PassOwnPtr<RenderImageResource> create(StyleImage* styleImage)
+ {
+ return adoptPtr(new RenderImageResourceStyleImage(styleImage));
+ }
+ virtual void initialize(RenderObject*);
+ virtual void shutdown();
+
+ virtual bool hasImage() const { return true; }
+ virtual Image* image(int width = 0, int height = 0) { return m_styleImage->image(m_renderer, IntSize(width, height)); }
+ virtual bool errorOccurred() const { return m_styleImage->errorOccurred(); }
+
+ virtual void setImageContainerSize(const IntSize& size) const { m_styleImage->setImageContainerSize(size); }
+ virtual bool usesImageContainerSize() const { return m_styleImage->usesImageContainerSize(); }
+ virtual bool imageHasRelativeWidth() const { return m_styleImage->imageHasRelativeWidth(); }
+ virtual bool imageHasRelativeHeight() const { return m_styleImage->imageHasRelativeHeight(); }
+
+ virtual IntSize imageSize(float multiplier) const { return m_styleImage->imageSize(m_renderer, multiplier); }
+
+ virtual WrappedImagePtr imagePtr() const { return m_styleImage->data(); }
+
+private:
+ RenderImageResourceStyleImage(StyleImage*);
+ RefPtr<StyleImage> m_styleImage;
+};
+
+} // namespace WebCore
+
+#endif // RenderImageStyleImage_h
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 347fa32..331750c 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2268,12 +2268,10 @@ bool RenderLayer::scroll(ScrollDirection direction, ScrollGranularity granularit
bool didVerticalScroll = false;
if (m_hBar) {
- if (granularity == ScrollByDocument) {
- // Special-case for the ScrollByDocument granularity. A document scroll can only be up
- // or down and in both cases the horizontal bar goes all the way to the left.
- didHorizontalScroll = m_hBar->scroll(ScrollLeft, ScrollByDocument, multiplier);
- } else
- didHorizontalScroll = m_hBar->scroll(direction, granularity, multiplier);
+ // Special-case for the ScrollByDocument granularity. A document scroll
+ // can only be up or down and in both cases the horizontal bar goes all
+ // the way to the left.
+ didHorizontalScroll = m_hBar->scroll((granularity == ScrollByDocument) ? ScrollLeft : direction, granularity, multiplier);
}
if (m_vBar)
diff --git a/WebCore/rendering/RenderLayer.h b/WebCore/rendering/RenderLayer.h
index 17521ad..3f0ac7c 100644
--- a/WebCore/rendering/RenderLayer.h
+++ b/WebCore/rendering/RenderLayer.h
@@ -277,7 +277,7 @@ public:
void updateScrollInfoAfterLayout();
- bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1.0f);
+ bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
void autoscroll();
void resize(const PlatformMouseEvent&, const IntSize&);
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index 23645d5..449466d 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -1163,9 +1163,11 @@ bool RenderLayerBacking::startAnimation(double timeOffset, const Animation* anim
KeyframeValueList transformVector(AnimatedPropertyWebkitTransform);
KeyframeValueList opacityVector(AnimatedPropertyOpacity);
- for (Vector<KeyframeValue>::const_iterator it = keyframes.beginKeyframes(); it != keyframes.endKeyframes(); ++it) {
- const RenderStyle* keyframeStyle = it->style();
- float key = it->key();
+ size_t numKeyframes = keyframes.size();
+ for (size_t i = 0; i < numKeyframes; ++i) {
+ const KeyframeValue& currentKeyframe = keyframes[i];
+ const RenderStyle* keyframeStyle = currentKeyframe.style();
+ float key = currentKeyframe.key();
if (!keyframeStyle)
continue;
@@ -1173,10 +1175,10 @@ bool RenderLayerBacking::startAnimation(double timeOffset, const Animation* anim
// get timing function
const TimingFunction* tf = keyframeStyle->hasAnimations() ? &((*keyframeStyle->animations()).animation(0)->timingFunction()) : 0;
- if (hasTransform)
+ if (currentKeyframe.containsProperty(AnimatedPropertyWebkitTransform))
transformVector.insert(new TransformAnimationValue(key, &(keyframeStyle->transform()), tf));
- if (hasOpacity)
+ if (currentKeyframe.containsProperty(AnimatedPropertyOpacity))
opacityVector.insert(new FloatAnimationValue(key, keyframeStyle->opacity(), tf));
}
diff --git a/WebCore/rendering/RenderLayerCompositor.h b/WebCore/rendering/RenderLayerCompositor.h
index 917d610..86c061b 100644
--- a/WebCore/rendering/RenderLayerCompositor.h
+++ b/WebCore/rendering/RenderLayerCompositor.h
@@ -155,6 +155,7 @@ public:
// their parent document.
bool shouldPropagateCompositingToEnclosingIFrame() const;
+ // FIXME: This should be a RenderIFrame*
HTMLFrameOwnerElement* enclosingIFrameElement() const;
static RenderLayerCompositor* iframeContentsCompositor(RenderIFrame*);
diff --git a/WebCore/rendering/RenderListBox.h b/WebCore/rendering/RenderListBox.h
index aafb87e..36cb87a 100644
--- a/WebCore/rendering/RenderListBox.h
+++ b/WebCore/rendering/RenderListBox.h
@@ -68,7 +68,7 @@ private:
virtual bool isPointInOverflowControl(HitTestResult&, int x, int y, int tx, int ty);
- virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1.0f, Node** stopNode = 0);
+ virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
virtual void calcPrefWidths();
virtual int baselinePosition(bool firstLine, bool isRootLineBox) const;
diff --git a/WebCore/rendering/RenderListItem.cpp b/WebCore/rendering/RenderListItem.cpp
index f861467..2366a34 100644
--- a/WebCore/rendering/RenderListItem.cpp
+++ b/WebCore/rendering/RenderListItem.cpp
@@ -150,6 +150,7 @@ static RenderObject* getParentOfFirstLineBox(RenderBlock* curr, RenderObject* ma
if (!firstChild)
return 0;
+ bool inQuirksMode = curr->document()->inQuirksMode();
for (RenderObject* currChild = firstChild; currChild; currChild = currChild->nextSibling()) {
if (currChild == marker)
continue;
@@ -163,7 +164,7 @@ static RenderObject* getParentOfFirstLineBox(RenderBlock* curr, RenderObject* ma
if (currChild->isTable() || !currChild->isRenderBlock())
break;
- if (curr->isListItem() && currChild->style()->htmlHacks() && currChild->node() &&
+ if (curr->isListItem() && inQuirksMode && currChild->node() &&
(currChild->node()->hasTagName(ulTag)|| currChild->node()->hasTagName(olTag)))
break;
diff --git a/WebCore/rendering/RenderListMarker.cpp b/WebCore/rendering/RenderListMarker.cpp
index 6ff1709..7b33c3d 100644
--- a/WebCore/rendering/RenderListMarker.cpp
+++ b/WebCore/rendering/RenderListMarker.cpp
@@ -79,7 +79,7 @@ static String toRoman(int number, bool upper)
return String(&letters[lettersSize - length], length);
}
-static inline String toAlphabeticOrNumeric(int number, const UChar* sequence, int sequenceSize, SequenceType type)
+static inline String toAlphabeticOrNumeric(int number, const UChar* sequence, unsigned sequenceSize, SequenceType type)
{
ASSERT(sequenceSize >= 2);
@@ -115,12 +115,28 @@ static inline String toAlphabeticOrNumeric(int number, const UChar* sequence, in
return String(&letters[lettersSize - length], length);
}
-static String toAlphabetic(int number, const UChar* alphabet, int alphabetSize)
+static String toSymbolic(int number, const UChar* symbols, unsigned symbolsSize)
+{
+ ASSERT(number > 0);
+ ASSERT(symbolsSize >= 1);
+ unsigned numberShadow = number;
+ --numberShadow;
+
+ // The asterisks list-style-type is the worst case; we show |numberShadow| asterisks.
+ Vector<UChar> letters;
+ letters.append(symbols[numberShadow % symbolsSize]);
+ unsigned numSymbols = numberShadow / symbolsSize;
+ while (numSymbols--)
+ letters.append(symbols[numberShadow % symbolsSize]);
+ return String::adopt(letters);
+}
+
+static String toAlphabetic(int number, const UChar* alphabet, unsigned alphabetSize)
{
return toAlphabeticOrNumeric(number, alphabet, alphabetSize, AlphabeticSequence);
}
-static String toNumeric(int number, const UChar* numerals, int numeralsSize)
+static String toNumeric(int number, const UChar* numerals, unsigned numeralsSize)
{
return toAlphabeticOrNumeric(number, numerals, numeralsSize, NumericSequence);
}
@@ -135,6 +151,11 @@ template <size_t size> static inline String toNumeric(int number, const UChar(&a
return toNumeric(number, alphabet, size);
}
+template <size_t size> static inline String toSymbolic(int number, const UChar(&alphabet)[size])
+{
+ return toSymbolic(number, alphabet, size);
+}
+
static int toHebrewUnder1000(int number, UChar letters[5])
{
// FIXME: CSS3 mentions various refinements not implemented here.
@@ -419,6 +440,7 @@ static EListStyleType effectiveListMarkerType(EListStyleType type, int value)
case Afar:
case Amharic:
case AmharicAbegede:
+ case Asterisks:
case CjkEarthlyBranch:
case CjkHeavenlyStem:
case Ethiopic:
@@ -437,6 +459,7 @@ static EListStyleType effectiveListMarkerType(EListStyleType type, int value)
case EthiopicHalehameTiEr:
case EthiopicHalehameTiEt:
case EthiopicHalehameTig:
+ case Footnotes:
case Hangul:
case HangulConsonant:
case Hiragana:
@@ -475,9 +498,11 @@ static UChar listMarkerSuffix(EListStyleType type, int value)
// Note, the following switch statement has been explicitly
// grouped by list-style-type suffix.
switch (effectiveType) {
- case NoneListStyle:
- case Disc:
+ case Asterisks:
case Circle:
+ case Disc:
+ case Footnotes:
+ case NoneListStyle:
case Square:
ASSERT_NOT_REACHED();
return ' ';
@@ -570,12 +595,24 @@ String listMarkerText(EListStyleType type, int value)
case NoneListStyle:
return "";
+ case Asterisks: {
+ static const UChar asterisksSymbols[1] = {
+ 0x002A
+ };
+ return toSymbolic(value, asterisksSymbols);
+ }
// We use the same characters for text security.
// See RenderText::setInternalString.
case Circle:
return String(&whiteBullet, 1);
case Disc:
return String(&bullet, 1);
+ case Footnotes: {
+ static const UChar footnotesSymbols[4] = {
+ 0x002A, 0x2051, 0x2020, 0x2021
+ };
+ return toSymbolic(value, footnotesSymbols);
+ }
case Square:
// The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE
// instead, but I think this looks better.
@@ -1110,6 +1147,10 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
EListStyleType type = style()->listStyleType();
switch (type) {
+ case Asterisks:
+ case Footnotes:
+ context->drawText(style()->font(), TextRun(m_text), marker.location());
+ return;
case Disc:
context->drawEllipse(marker);
return;
@@ -1291,6 +1332,11 @@ void RenderListMarker::calcPrefWidths()
switch (type) {
case NoneListStyle:
break;
+ case Asterisks:
+ case Footnotes:
+ m_text = listMarkerText(type, m_listItem->value());
+ width = font.width(m_text); // no suffix for these types
+ break;
case Circle:
case Disc:
case Square:
@@ -1489,6 +1535,11 @@ IntRect RenderListMarker::getRelativeMarkerRect()
EListStyleType type = style()->listStyleType();
switch (type) {
+ case Asterisks:
+ case Footnotes: {
+ const Font& font = style()->font();
+ return IntRect(x(), y() + font.ascent(), font.width(m_text), font.height());
+ }
case Disc:
case Circle:
case Square: {
diff --git a/WebCore/rendering/RenderMedia.cpp b/WebCore/rendering/RenderMedia.cpp
index d7b4a99..a589a2d 100644
--- a/WebCore/rendering/RenderMedia.cpp
+++ b/WebCore/rendering/RenderMedia.cpp
@@ -57,6 +57,7 @@ RenderMedia::RenderMedia(HTMLMediaElement* video)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
+ setImageResource(RenderImageResource::create());
}
RenderMedia::RenderMedia(HTMLMediaElement* video, const IntSize& intrinsicSize)
@@ -69,6 +70,7 @@ RenderMedia::RenderMedia(HTMLMediaElement* video, const IntSize& intrinsicSize)
, m_opacityAnimationFrom(0)
, m_opacityAnimationTo(1.0f)
{
+ setImageResource(RenderImageResource::create());
setIntrinsicSize(intrinsicSize);
}
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index 78da758..9ee97b4 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -41,7 +41,8 @@
#include "RenderArena.h"
#include "RenderCounter.h"
#include "RenderFlexibleBox.h"
-#include "RenderImageGeneratedContent.h"
+#include "RenderImage.h"
+#include "RenderImageResourceStyleImage.h"
#include "RenderInline.h"
#include "RenderLayer.h"
#include "RenderListItem.h"
@@ -110,10 +111,12 @@ RenderObject* RenderObject::createObject(Node* node, RenderStyle* style)
// Otherwise acts as if we didn't support this feature.
const ContentData* contentData = style->contentData();
if (contentData && !contentData->next() && contentData->isImage() && doc != node) {
- RenderImageGeneratedContent* image = new (arena) RenderImageGeneratedContent(node);
+ RenderImage* image = new (arena) RenderImage(node);
image->setStyle(style);
if (StyleImage* styleImage = contentData->image())
- image->setStyleImage(styleImage);
+ image->setImageResource(RenderImageResourceStyleImage::create(styleImage));
+ else
+ image->setImageResource(RenderImageResource::create());
return image;
}
@@ -1425,7 +1428,8 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
style()->getBoxShadowHorizontalExtent(shadowLeft, shadowRight);
int borderRight = isBox() ? toRenderBox(this)->borderRight() : 0;
- int borderWidth = max(-outlineStyle->outlineOffset(), max(borderRight, max(style()->borderTopRightRadius().width(), style()->borderBottomRightRadius().width()))) + max(ow, shadowRight);
+ int boxWidth = isBox() ? toRenderBox(this)->width() : 0;
+ int borderWidth = max(-outlineStyle->outlineOffset(), max(borderRight, max(style()->borderTopRightRadius().width().calcValue(boxWidth), style()->borderBottomRightRadius().width().calcValue(boxWidth)))) + max(ow, shadowRight);
IntRect rightRect(newOutlineBox.x() + min(newOutlineBox.width(), oldOutlineBox.width()) - borderWidth,
newOutlineBox.y(),
width + borderWidth,
@@ -1443,7 +1447,8 @@ bool RenderObject::repaintAfterLayoutIfNeeded(RenderBoxModelObject* repaintConta
style()->getBoxShadowVerticalExtent(shadowTop, shadowBottom);
int borderBottom = isBox() ? toRenderBox(this)->borderBottom() : 0;
- int borderHeight = max(-outlineStyle->outlineOffset(), max(borderBottom, max(style()->borderBottomLeftRadius().height(), style()->borderBottomRightRadius().height()))) + max(ow, shadowBottom);
+ int boxHeight = isBox() ? toRenderBox(this)->height() : 0;
+ int borderHeight = max(-outlineStyle->outlineOffset(), max(borderBottom, max(style()->borderBottomLeftRadius().height().calcValue(boxHeight), style()->borderBottomRightRadius().height().calcValue(boxHeight)))) + max(ow, shadowBottom);
IntRect bottomRect(newOutlineBox.x(),
min(newOutlineBox.bottom(), oldOutlineBox.bottom()) - borderHeight,
max(newOutlineBox.width(), oldOutlineBox.width()),
@@ -2556,27 +2561,11 @@ void RenderObject::adjustRectForOutlineAndShadow(IntRect& rect) const
{
int outlineSize = outlineStyleForRepaint()->outlineSize();
if (const ShadowData* boxShadow = style()->boxShadow()) {
- int shadowLeft = 0;
- int shadowRight = 0;
- int shadowTop = 0;
- int shadowBottom = 0;
-
- do {
- if (boxShadow->style() == Normal) {
- shadowLeft = min(boxShadow->x() - boxShadow->blur() - boxShadow->spread() - outlineSize, shadowLeft);
- shadowRight = max(boxShadow->x() + boxShadow->blur() + boxShadow->spread() + outlineSize, shadowRight);
- shadowTop = min(boxShadow->y() - boxShadow->blur() - boxShadow->spread() - outlineSize, shadowTop);
- shadowBottom = max(boxShadow->y() + boxShadow->blur() + boxShadow->spread() + outlineSize, shadowBottom);
- }
-
- boxShadow = boxShadow->next();
- } while (boxShadow);
+ boxShadow->adjustRectForShadow(rect, outlineSize);
+ return;
+ }
- rect.move(shadowLeft, shadowTop);
- rect.setWidth(rect.width() - shadowLeft + shadowRight);
- rect.setHeight(rect.height() - shadowTop + shadowBottom);
- } else
- rect.inflate(outlineSize);
+ rect.inflate(outlineSize);
}
AnimationController* RenderObject::animation() const
@@ -2708,6 +2697,12 @@ RenderSVGResourceContainer* RenderObject::toRenderSVGResourceContainer()
return 0;
}
+void RenderObject::setNeedsBoundariesUpdate()
+{
+ if (RenderObject* renderer = parent())
+ renderer->setNeedsBoundariesUpdate();
+}
+
FloatRect RenderObject::objectBoundingBox() const
{
ASSERT_NOT_REACHED();
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index d2046cf..9fbaf91 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -327,7 +327,7 @@ public:
// Unfortunately we don't have such a class yet, because it's not possible for all renderers
// to inherit from RenderSVGObject -> RenderObject (some need RenderBlock inheritance for instance)
virtual void setNeedsTransformUpdate() { }
- virtual void setNeedsBoundariesUpdate() { }
+ virtual void setNeedsBoundariesUpdate();
// Per SVG 1.1 objectBoundingBox ignores clipping, masking, filter effects, opacity and stroke-width.
// This is used for all computation of objectBoundingBox relative units and by SVGLocateable::getBBox().
@@ -383,14 +383,7 @@ public:
bool hasBoxDecorations() const { return m_paintBackground; }
bool mustRepaintBackgroundOrBorder() const;
- bool hasBackground() const
- {
- Color color = style()->visitedDependentColor(CSSPropertyBackgroundColor);
- if (color.isValid() && color.alpha() > 0)
- return true;
- return style()->hasBackgroundImage();
- }
-
+ bool hasBackground() const { return style()->hasBackground(); }
bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needsPositionedMovementLayout; }
bool selfNeedsLayout() const { return m_needsLayout; }
bool needsPositionedMovementLayout() const { return m_needsPositionedMovementLayout; }
diff --git a/WebCore/rendering/RenderObjectChildList.cpp b/WebCore/rendering/RenderObjectChildList.cpp
index 68e392c..96ec800 100644
--- a/WebCore/rendering/RenderObjectChildList.cpp
+++ b/WebCore/rendering/RenderObjectChildList.cpp
@@ -30,7 +30,8 @@
#include "AXObjectCache.h"
#include "RenderBlock.h"
#include "RenderCounter.h"
-#include "RenderImageGeneratedContent.h"
+#include "RenderImage.h"
+#include "RenderImageResourceStyleImage.h"
#include "RenderInline.h"
#include "RenderLayer.h"
#include "RenderListItem.h"
@@ -97,6 +98,11 @@ RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render
if (oldChild->isPositioned() && owner->childrenInline())
owner->dirtyLinesFromChangedChild(oldChild);
+
+#if ENABLE(SVG)
+ // Update cached boundaries in SVG renderers, if a child is removed.
+ owner->setNeedsBoundariesUpdate();
+#endif
}
// If oldChild is the start or end of the selection, then clear the selection to
@@ -430,12 +436,14 @@ void RenderObjectChildList::updateBeforeAfterContent(RenderObject* owner, Pseudo
renderer->setStyle(pseudoElementStyle);
break;
case CONTENT_OBJECT: {
- RenderImageGeneratedContent* image = new (owner->renderArena()) RenderImageGeneratedContent(owner->document()); // anonymous object
+ RenderImage* image = new (owner->renderArena()) RenderImage(owner->document()); // anonymous object
RefPtr<RenderStyle> style = RenderStyle::create();
style->inheritFrom(pseudoElementStyle);
image->setStyle(style.release());
if (StyleImage* styleImage = content->image())
- image->setStyleImage(styleImage);
+ image->setImageResource(RenderImageResourceStyleImage::create(styleImage));
+ else
+ image->setImageResource(RenderImageResource::create());
renderer = image;
break;
}
diff --git a/WebCore/rendering/RenderPath.cpp b/WebCore/rendering/RenderPath.cpp
index 86a12c8..0f31df1 100644
--- a/WebCore/rendering/RenderPath.cpp
+++ b/WebCore/rendering/RenderPath.cpp
@@ -101,28 +101,39 @@ void RenderPath::layout()
LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(node());
+ bool updateCachedBoundariesInParents = false;
+
bool needsPathUpdate = m_needsPathUpdate;
if (needsPathUpdate) {
m_path = element->toPathData();
m_needsPathUpdate = false;
+ updateCachedBoundariesInParents = true;
}
if (m_needsTransformUpdate) {
m_localTransform = element->animatedLocalTransform();
m_needsTransformUpdate = false;
+ updateCachedBoundariesInParents = true;
}
+ if (m_needsBoundariesUpdate)
+ updateCachedBoundariesInParents = true;
+
// Invalidate all resources of this client if our layout changed.
if (m_everHadLayout && selfNeedsLayout())
SVGResourcesCache::clientLayoutChanged(this);
// At this point LayoutRepainter already grabbed the old bounds,
- // recalculate them now so repaintAfterLayout() uses the new bounds
+ // recalculate them now so repaintAfterLayout() uses the new bounds.
if (needsPathUpdate || m_needsBoundariesUpdate) {
updateCachedBoundaries();
m_needsBoundariesUpdate = false;
}
+ // If our bounds changed, notify the parents.
+ if (updateCachedBoundariesInParents)
+ RenderSVGModelObject::setNeedsBoundariesUpdate();
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
@@ -172,8 +183,7 @@ void RenderPath::paint(PaintInfo& paintInfo, int, int)
return;
FloatRect boundingBox = repaintRectInLocalCoordinates();
- FloatRect nonLocalBoundingBox = m_localTransform.mapRect(boundingBox);
- if (!nonLocalBoundingBox.intersects(paintInfo.rect))
+ if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo))
return;
PaintInfo childPaintInfo(paintInfo);
@@ -270,13 +280,6 @@ FloatRect RenderPath::calculateMarkerBoundsIfNeeded()
return m_markerLayoutInfo.calculateBoundaries(markerStart, markerMid, markerEnd, svgStyle->strokeWidth().value(svgElement), m_path);
}
-void RenderPath::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
-{
- if (diff == StyleDifferenceLayout)
- setNeedsBoundariesUpdate();
- RenderSVGModelObject::styleWillChange(diff, newStyle);
-}
-
void RenderPath::updateCachedBoundaries()
{
if (m_path.isEmpty()) {
diff --git a/WebCore/rendering/RenderPath.h b/WebCore/rendering/RenderPath.h
index 1bdac07..1d35a01 100644
--- a/WebCore/rendering/RenderPath.h
+++ b/WebCore/rendering/RenderPath.h
@@ -41,8 +41,8 @@ public:
RenderPath(SVGStyledTransformableElement*);
const Path& path() const { return m_path; }
- void setNeedsBoundariesUpdate() { m_needsBoundariesUpdate = true; }
void setNeedsPathUpdate() { m_needsPathUpdate = true; }
+ virtual void setNeedsBoundariesUpdate() { m_needsBoundariesUpdate = true; }
virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; }
private:
@@ -63,7 +63,6 @@ private:
virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
- virtual void styleWillChange(StyleDifference, const RenderStyle*);
FloatRect calculateMarkerBoundsIfNeeded();
void updateCachedBoundaries();
diff --git a/WebCore/rendering/RenderRuby.cpp b/WebCore/rendering/RenderRuby.cpp
index 4ab9d73..2f543d5 100644
--- a/WebCore/rendering/RenderRuby.cpp
+++ b/WebCore/rendering/RenderRuby.cpp
@@ -75,24 +75,19 @@ bool RenderRubyAsInline::isChildAllowed(RenderObject* child, RenderStyle*) const
void RenderRubyAsInline::addChild(RenderObject* child, RenderObject* beforeChild)
{
- // Note: ':after' content is handled implicitely below
+ // Note: ':after' content is handled implicitly below
- // if child is a ruby run, just add it normally
if (child->isRubyRun()) {
RenderInline::addChild(child, beforeChild);
return;
}
- if (beforeChild && !isAfterContent(beforeChild)) {
- // insert child into run
- ASSERT(!beforeChild->isRubyRun());
- RenderRubyRun* run = findRubyRunParent(beforeChild);
- ASSERT(run); // beforeChild should always have a run as parent
- if (run) {
+ if (beforeChild && !isAfterContent(beforeChild) && !beforeChild->isRubyRun()) {
+ if (RenderRubyRun* run = findRubyRunParent(beforeChild)) {
run->addChild(child, beforeChild);
return;
}
- ASSERT(false); // beforeChild should always have a run as parent!
+ ASSERT_NOT_REACHED(); // beforeChild should always have a run as parent!
// Emergency fallback: fall through and just append.
}
diff --git a/WebCore/rendering/RenderSVGBlock.cpp b/WebCore/rendering/RenderSVGBlock.cpp
index d6022b5..b2d727a 100644
--- a/WebCore/rendering/RenderSVGBlock.cpp
+++ b/WebCore/rendering/RenderSVGBlock.cpp
@@ -81,6 +81,13 @@ void RenderSVGBlock::destroy()
RenderBlock::destroy();
}
+void RenderSVGBlock::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderBlock::styleWillChange(diff, newStyle);
+}
+
void RenderSVGBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBlock::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGBlock.h b/WebCore/rendering/RenderSVGBlock.h
index c4337cc..c1379da 100644
--- a/WebCore/rendering/RenderSVGBlock.h
+++ b/WebCore/rendering/RenderSVGBlock.h
@@ -40,6 +40,7 @@ private:
virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
};
diff --git a/WebCore/rendering/RenderSVGContainer.cpp b/WebCore/rendering/RenderSVGContainer.cpp
index bab07a4..8c99270 100644
--- a/WebCore/rendering/RenderSVGContainer.cpp
+++ b/WebCore/rendering/RenderSVGContainer.cpp
@@ -39,6 +39,7 @@ namespace WebCore {
RenderSVGContainer::RenderSVGContainer(SVGStyledElement* node)
: RenderSVGModelObject(node)
, m_drawsContents(true)
+ , m_needsBoundariesUpdate(true)
{
}
@@ -55,7 +56,7 @@ void RenderSVGContainer::layout()
LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
// Allow RenderSVGTransformableContainer to update its transform.
- calculateLocalTransform();
+ bool updatedTransform = calculateLocalTransform();
SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
@@ -63,6 +64,16 @@ void RenderSVGContainer::layout()
if (m_everHadLayout && selfNeedsLayout())
SVGResourcesCache::clientLayoutChanged(this);
+ // At this point LayoutRepainter already grabbed the old bounds,
+ // recalculate them now so repaintAfterLayout() uses the new bounds.
+ if (m_needsBoundariesUpdate || updatedTransform) {
+ updateCachedBoundaries();
+ m_needsBoundariesUpdate = false;
+
+ // If our bounds changed, notify the parents.
+ RenderSVGModelObject::setNeedsBoundariesUpdate();
+ }
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
@@ -86,6 +97,10 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int, int)
if (!firstChild() && !selfWillPaint())
return;
+ FloatRect repaintRect = repaintRectInLocalCoordinates();
+ if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(repaintRect, localToParentTransform(), paintInfo))
+ return;
+
PaintInfo childPaintInfo(paintInfo);
childPaintInfo.context->save();
@@ -115,7 +130,7 @@ void RenderSVGContainer::paint(PaintInfo& paintInfo, int, int)
// FIXME: This means our focus ring won't share our rotation like it should.
// We should instead disable our clip during PaintPhaseOutline
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth() && style()->visibility() == VISIBLE) {
- IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRectInLocalCoordinates()));
+ IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRect));
paintOutline(paintInfo.context, paintRectInParent.x(), paintRectInParent.y(), paintRectInParent.width(), paintRectInParent.height());
}
}
@@ -128,21 +143,14 @@ void RenderSVGContainer::addFocusRingRects(Vector<IntRect>& rects, int, int)
rects.append(paintRectInParent);
}
-FloatRect RenderSVGContainer::objectBoundingBox() const
+void RenderSVGContainer::updateCachedBoundaries()
{
- return SVGRenderSupport::computeContainerBoundingBox(this, SVGRenderSupport::ObjectBoundingBox);
-}
+ m_objectBoundingBox = FloatRect();
+ m_strokeBoundingBox = FloatRect();
+ m_repaintBoundingBox = FloatRect();
-FloatRect RenderSVGContainer::strokeBoundingBox() const
-{
- return SVGRenderSupport::computeContainerBoundingBox(this, SVGRenderSupport::StrokeBoundingBox);
-}
-
-FloatRect RenderSVGContainer::repaintRectInLocalCoordinates() const
-{
- FloatRect repaintRect = SVGRenderSupport::computeContainerBoundingBox(this, SVGRenderSupport::RepaintBoundingBox);
- SVGRenderSupport::intersectRepaintRectWithResources(this, repaintRect);
- return repaintRect;
+ SVGRenderSupport::computeContainerBoundingBoxes(this, m_objectBoundingBox, m_strokeBoundingBox, m_repaintBoundingBox);
+ SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingBox);
}
bool RenderSVGContainer::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
diff --git a/WebCore/rendering/RenderSVGContainer.h b/WebCore/rendering/RenderSVGContainer.h
index 0a122cd..b0c952f 100644
--- a/WebCore/rendering/RenderSVGContainer.h
+++ b/WebCore/rendering/RenderSVGContainer.h
@@ -43,6 +43,7 @@ public:
bool drawsContents() const { return m_drawsContents; }
virtual void paint(PaintInfo&, int parentX, int parentY);
+ virtual void setNeedsBoundariesUpdate() { m_needsBoundariesUpdate = true; }
protected:
virtual RenderObjectChildList* virtualChildren() { return children(); }
@@ -55,14 +56,14 @@ protected:
virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
- virtual FloatRect objectBoundingBox() const;
- virtual FloatRect strokeBoundingBox() const;
- virtual FloatRect repaintRectInLocalCoordinates() const;
+ virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; }
+ virtual FloatRect strokeBoundingBox() const { return m_strokeBoundingBox; }
+ virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
// Allow RenderSVGTransformableContainer to hook in at the right time in layout()
- virtual void calculateLocalTransform() { }
+ virtual bool calculateLocalTransform() { return false; }
// Allow RenderSVGViewportContainer to hook in at the right times in layout(), paint() and nodeAtFloatPoint()
virtual void calcViewport() { }
@@ -70,10 +71,15 @@ protected:
virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; }
bool selfWillPaint();
+ void updateCachedBoundaries();
private:
RenderObjectChildList m_children;
+ FloatRect m_objectBoundingBox;
+ FloatRect m_strokeBoundingBox;
+ FloatRect m_repaintBoundingBox;
bool m_drawsContents : 1;
+ bool m_needsBoundariesUpdate : 1;
};
inline RenderSVGContainer* toRenderSVGContainer(RenderObject* object)
diff --git a/WebCore/rendering/RenderSVGGradientStop.h b/WebCore/rendering/RenderSVGGradientStop.h
index 45da7b4..f06a9a5 100644
--- a/WebCore/rendering/RenderSVGGradientStop.h
+++ b/WebCore/rendering/RenderSVGGradientStop.h
@@ -46,6 +46,7 @@ public:
// https://bugs.webkit.org/show_bug.cgi?id=20400
virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject*) { return IntRect(); }
virtual FloatRect objectBoundingBox() const { return FloatRect(); }
+ virtual FloatRect strokeBoundingBox() const { return FloatRect(); }
virtual FloatRect repaintRectInLocalCoordinates() const { return FloatRect(); }
protected:
diff --git a/WebCore/rendering/RenderSVGHiddenContainer.cpp b/WebCore/rendering/RenderSVGHiddenContainer.cpp
index 0af4236..ee1d214 100644
--- a/WebCore/rendering/RenderSVGHiddenContainer.cpp
+++ b/WebCore/rendering/RenderSVGHiddenContainer.cpp
@@ -47,11 +47,6 @@ void RenderSVGHiddenContainer::paint(PaintInfo&, int, int)
// This subtree does not paint.
}
-IntRect RenderSVGHiddenContainer::clippedOverflowRectForRepaint(RenderBoxModelObject* /*repaintContainer*/)
-{
- return IntRect();
-}
-
void RenderSVGHiddenContainer::absoluteQuads(Vector<FloatQuad>&)
{
// This subtree does not take up space or paint
@@ -62,16 +57,6 @@ bool RenderSVGHiddenContainer::nodeAtFloatPoint(const HitTestRequest&, HitTestRe
return false;
}
-FloatRect RenderSVGHiddenContainer::objectBoundingBox() const
-{
- return FloatRect();
-}
-
-FloatRect RenderSVGHiddenContainer::repaintRectInLocalCoordinates() const
-{
- return FloatRect();
-}
-
}
#endif // ENABLE(SVG)
diff --git a/WebCore/rendering/RenderSVGHiddenContainer.h b/WebCore/rendering/RenderSVGHiddenContainer.h
index e0daac1..97800d4 100644
--- a/WebCore/rendering/RenderSVGHiddenContainer.h
+++ b/WebCore/rendering/RenderSVGHiddenContainer.h
@@ -47,12 +47,9 @@ namespace WebCore {
virtual void paint(PaintInfo&, int parentX, int parentY);
- virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
+ virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject*) { return IntRect(); }
virtual void absoluteQuads(Vector<FloatQuad>&);
- virtual FloatRect objectBoundingBox() const;
- virtual FloatRect repaintRectInLocalCoordinates() const;
-
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
};
}
diff --git a/WebCore/rendering/RenderSVGImage.cpp b/WebCore/rendering/RenderSVGImage.cpp
index 893a4ea..0056fa3 100644
--- a/WebCore/rendering/RenderSVGImage.cpp
+++ b/WebCore/rendering/RenderSVGImage.cpp
@@ -5,6 +5,7 @@
Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org>
Copyright (C) 2009, Google, Inc.
Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
+ Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -32,6 +33,7 @@
#include "FloatQuad.h"
#include "GraphicsContext.h"
#include "PointerEventsHitRules.h"
+#include "RenderImageResource.h"
#include "RenderLayer.h"
#include "RenderSVGResourceContainer.h"
#include "RenderSVGResourceFilter.h"
@@ -44,9 +46,16 @@
namespace WebCore {
RenderSVGImage::RenderSVGImage(SVGImageElement* impl)
- : RenderImage(impl)
+ : RenderSVGModelObject(impl)
, m_needsTransformUpdate(true)
+ , m_imageResource(RenderImageResource::create())
{
+ m_imageResource->initialize(this);
+}
+
+RenderSVGImage::~RenderSVGImage()
+{
+ m_imageResource->shutdown();
}
void RenderSVGImage::layout()
@@ -56,75 +65,72 @@ void RenderSVGImage::layout()
LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
SVGImageElement* image = static_cast<SVGImageElement*>(node());
+ bool updateCachedBoundariesInParents = false;
if (m_needsTransformUpdate) {
m_localTransform = image->animatedLocalTransform();
m_needsTransformUpdate = false;
+ updateCachedBoundariesInParents = true;
}
- // minimum height
- setHeight(errorOccurred() ? intrinsicSize().height() : 0);
-
- calcWidth();
- calcHeight();
-
// FIXME: Optimize caching the repaint rects.
+ FloatRect oldBoundaries = m_localBounds;
m_localBounds = FloatRect(image->x().value(image), image->y().value(image), image->width().value(image), image->height().value(image));
m_cachedLocalRepaintRect = FloatRect();
+ if (!updateCachedBoundariesInParents)
+ updateCachedBoundariesInParents = oldBoundaries != m_localBounds;
+
// Invalidate all resources of this client if our layout changed.
if (m_everHadLayout && selfNeedsLayout())
SVGResourcesCache::clientLayoutChanged(this);
+ // If our bounds changed, notify the parents.
+ if (updateCachedBoundariesInParents)
+ RenderSVGModelObject::setNeedsBoundariesUpdate();
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
void RenderSVGImage::paint(PaintInfo& paintInfo, int, int)
{
- if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN)
+ if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || !m_imageResource->hasImage())
return;
- paintInfo.context->save();
- paintInfo.context->concatCTM(localToParentTransform());
-
- if (paintInfo.phase == PaintPhaseForeground) {
- PaintInfo savedInfo(paintInfo);
+ FloatRect boundingBox = repaintRectInLocalCoordinates();
+ if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo))
+ return;
- if (SVGRenderSupport::prepareToRenderSVGContent(this, paintInfo)) {
- FloatRect destRect = m_localBounds;
- FloatRect srcRect(0, 0, image()->width(), image()->height());
+ PaintInfo childPaintInfo(paintInfo);
+ bool drawsOutline = style()->outlineWidth() && (childPaintInfo.phase == PaintPhaseOutline || childPaintInfo.phase == PaintPhaseSelfOutline);
+ if (drawsOutline || childPaintInfo.phase == PaintPhaseForeground) {
+ childPaintInfo.context->save();
+ childPaintInfo.applyTransform(m_localTransform);
- SVGImageElement* imageElt = static_cast<SVGImageElement*>(node());
- if (imageElt->preserveAspectRatio().align() != SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_NONE)
- imageElt->preserveAspectRatio().transformRect(destRect, srcRect);
+ if (childPaintInfo.phase == PaintPhaseForeground) {
+ PaintInfo savedInfo(childPaintInfo);
- paintInfo.context->drawImage(image(), DeviceColorSpace, destRect, srcRect);
- }
- SVGRenderSupport::finishRenderSVGContent(this, paintInfo, savedInfo.context);
- }
+ if (SVGRenderSupport::prepareToRenderSVGContent(this, childPaintInfo)) {
+ Image* image = m_imageResource->image();
+ FloatRect destRect = m_localBounds;
+ FloatRect srcRect(0, 0, image->width(), image->height());
- if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth())
- paintOutline(paintInfo.context, 0, 0, width(), height());
+ SVGImageElement* imageElement = static_cast<SVGImageElement*>(node());
+ if (imageElement->preserveAspectRatio().align() != SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_NONE)
+ imageElement->preserveAspectRatio().transformRect(destRect, srcRect);
- paintInfo.context->restore();
-}
-
-void RenderSVGImage::destroy()
-{
- SVGResourcesCache::clientDestroyed(this);
- RenderImage::destroy();
-}
+ childPaintInfo.context->drawImage(image, DeviceColorSpace, destRect, srcRect);
+ }
-void RenderSVGImage::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
-{
- RenderImage::styleDidChange(diff, oldStyle);
- SVGResourcesCache::clientStyleChanged(this, diff, style());
-}
+ SVGRenderSupport::finishRenderSVGContent(this, childPaintInfo, savedInfo.context);
+ }
-void RenderSVGImage::updateFromElement()
-{
- RenderImage::updateFromElement();
- SVGResourcesCache::clientUpdatedFromElement(this, style());
+ if (drawsOutline)
+ paintOutline(childPaintInfo.context, static_cast<int>(boundingBox.x()), static_cast<int>(boundingBox.y()),
+ static_cast<int>(boundingBox.width()), static_cast<int>(boundingBox.height()));
+
+ childPaintInfo.context->restore();
+ }
}
bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
@@ -152,12 +158,6 @@ bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest& request, HitTestResu
return false;
}
-bool RenderSVGImage::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction)
-{
- ASSERT_NOT_REACHED();
- return false;
-}
-
FloatRect RenderSVGImage::repaintRectInLocalCoordinates() const
{
// If we already have a cached repaint rect, return that
@@ -170,10 +170,8 @@ FloatRect RenderSVGImage::repaintRectInLocalCoordinates() const
return m_cachedLocalRepaintRect;
}
-void RenderSVGImage::imageChanged(WrappedImagePtr image, const IntRect* rect)
+void RenderSVGImage::imageChanged(WrappedImagePtr, const IntRect*)
{
- RenderImage::imageChanged(image, rect);
-
// The image resource defaults to nullImage until the resource arrives.
// This empty image may be cached by SVG resources which must be invalidated.
if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this))
@@ -185,21 +183,6 @@ void RenderSVGImage::imageChanged(WrappedImagePtr image, const IntRect* rect)
repaint();
}
-IntRect RenderSVGImage::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer)
-{
- return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContainer);
-}
-
-void RenderSVGImage::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
-{
- SVGRenderSupport::computeRectForRepaint(this, repaintContainer, repaintRect, fixed);
-}
-
-void RenderSVGImage::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const
-{
- SVGRenderSupport::mapLocalToContainer(this, repaintContainer, fixed, useTransforms, transformState);
-}
-
void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, int, int)
{
// this is called from paint() after the localTransform has already been applied
@@ -208,17 +191,6 @@ void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, int, int)
rects.append(contentRect);
}
-void RenderSVGImage::absoluteRects(Vector<IntRect>&, int, int)
-{
- // This code path should never be taken for SVG, as we're assuming useTransforms=true everywhere, absoluteQuads should be used.
- ASSERT_NOT_REACHED();
-}
-
-void RenderSVGImage::absoluteQuads(Vector<FloatQuad>& quads)
-{
- quads.append(localToAbsoluteQuad(strokeBoundingBox()));
-}
-
-}
+} // namespace WebCore
#endif // ENABLE(SVG)
diff --git a/WebCore/rendering/RenderSVGImage.h b/WebCore/rendering/RenderSVGImage.h
index 38e3a13..da94568 100644
--- a/WebCore/rendering/RenderSVGImage.h
+++ b/WebCore/rendering/RenderSVGImage.h
@@ -3,6 +3,7 @@
Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
Copyright (C) 2007 Rob Buis <buis@kde.org>
Copyright (C) 2009 Google, Inc.
+ Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -26,20 +27,25 @@
#if ENABLE(SVG)
#include "AffineTransform.h"
#include "FloatRect.h"
-#include "RenderImage.h"
+#include "RenderSVGModelObject.h"
#include "SVGPreserveAspectRatio.h"
#include "SVGRenderSupport.h"
namespace WebCore {
+class RenderImageResource;
class SVGImageElement;
-class RenderSVGImage : public RenderImage {
+class RenderSVGImage : public RenderSVGModelObject {
public:
RenderSVGImage(SVGImageElement*);
+ virtual ~RenderSVGImage();
virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; }
+ RenderImageResource* imageResource() { return m_imageResource.get(); }
+ const RenderImageResource* imageResource() const { return m_imageResource.get(); }
+
private:
virtual const char* renderName() const { return "RenderSVGImage"; }
virtual bool isSVGImage() const { return true; }
@@ -50,28 +56,16 @@ private:
virtual FloatRect strokeBoundingBox() const { return m_localBounds; }
virtual FloatRect repaintRectInLocalCoordinates() const;
- virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
- virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
-
- virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
-
- virtual void absoluteRects(Vector<IntRect>&, int tx, int ty);
- virtual void absoluteQuads(Vector<FloatQuad>&);
virtual void addFocusRingRects(Vector<IntRect>&, int tx, int ty);
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
-
+
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
- virtual void destroy();
- virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
- virtual void updateFromElement();
-
virtual bool requiresLayer() const { return false; }
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
- virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
virtual AffineTransform localTransform() const { return m_localTransform; }
@@ -79,6 +73,7 @@ private:
AffineTransform m_localTransform;
FloatRect m_localBounds;
mutable FloatRect m_cachedLocalRepaintRect;
+ OwnPtr<RenderImageResource> m_imageResource;
};
inline RenderSVGImage* toRenderSVGImage(RenderObject* object)
diff --git a/WebCore/rendering/RenderSVGInline.cpp b/WebCore/rendering/RenderSVGInline.cpp
index 93e6a06..bc6bc12 100644
--- a/WebCore/rendering/RenderSVGInline.cpp
+++ b/WebCore/rendering/RenderSVGInline.cpp
@@ -99,6 +99,13 @@ void RenderSVGInline::destroy()
RenderInline::destroy();
}
+void RenderSVGInline::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderInline::styleWillChange(diff, newStyle);
+}
+
void RenderSVGInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderInline::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGInline.h b/WebCore/rendering/RenderSVGInline.h
index 56d911f..fb38f1b 100644
--- a/WebCore/rendering/RenderSVGInline.h
+++ b/WebCore/rendering/RenderSVGInline.h
@@ -56,6 +56,7 @@ private:
virtual InlineFlowBox* createInlineFlowBox();
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
};
diff --git a/WebCore/rendering/RenderSVGModelObject.cpp b/WebCore/rendering/RenderSVGModelObject.cpp
index 5a19749..28760a0 100644
--- a/WebCore/rendering/RenderSVGModelObject.cpp
+++ b/WebCore/rendering/RenderSVGModelObject.cpp
@@ -87,6 +87,13 @@ void RenderSVGModelObject::destroy()
RenderObject::destroy();
}
+void RenderSVGModelObject::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderObject::styleWillChange(diff, newStyle);
+}
+
void RenderSVGModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderObject::styleDidChange(diff, oldStyle);
diff --git a/WebCore/rendering/RenderSVGModelObject.h b/WebCore/rendering/RenderSVGModelObject.h
index 35c4dc3..9de217c 100644
--- a/WebCore/rendering/RenderSVGModelObject.h
+++ b/WebCore/rendering/RenderSVGModelObject.h
@@ -39,7 +39,7 @@
namespace WebCore {
// Most renderers in the SVG rendering tree will inherit from this class
-// but not all. (e.g. RenderSVGForeignObject, RenderSVGBlock, RenderSVGImage) thus methods
+// but not all. (e.g. RenderSVGForeignObject, RenderSVGBlock) thus methods
// required by SVG renders need to be declared on RenderObject, but shared
// logic can go in this class or in SVGRenderSupport.
@@ -61,6 +61,7 @@ public:
virtual void destroy();
virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
diff --git a/WebCore/rendering/RenderSVGResourceFilter.cpp b/WebCore/rendering/RenderSVGResourceFilter.cpp
index 09e83f4..982375e 100644
--- a/WebCore/rendering/RenderSVGResourceFilter.cpp
+++ b/WebCore/rendering/RenderSVGResourceFilter.cpp
@@ -262,16 +262,17 @@ void RenderSVGResourceFilter::postApplyResource(RenderObject* object, GraphicsCo
if (!filterData->builded) {
filterData->filter->setSourceImage(filterData->sourceGraphicBuffer.release());
lastEffect->apply(filterData->filter.get());
+#if !PLATFORM(CG)
+ ImageBuffer* resultImage = lastEffect->resultImage();
+ if (resultImage)
+ resultImage->transformColorSpace(LinearRGB, DeviceRGB);
+#endif
filterData->builded = true;
}
ImageBuffer* resultImage = lastEffect->resultImage();
- if (resultImage) {
-#if !PLATFORM(CG)
- resultImage->transformColorSpace(LinearRGB, DeviceRGB);
-#endif
+ if (resultImage)
context->drawImageBuffer(resultImage, object->style()->colorSpace(), lastEffect->subRegion());
- }
}
filterData->sourceGraphicBuffer.clear();
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index b66a870..3fd439c 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -48,6 +48,7 @@ namespace WebCore {
RenderSVGRoot::RenderSVGRoot(SVGStyledElement* node)
: RenderBox(node)
, m_isLayoutSizeChanged(false)
+ , m_needsBoundariesOrTransformUpdate(true)
{
setReplaced(true);
}
@@ -124,6 +125,13 @@ void RenderSVGRoot::layout()
SVGRenderSupport::layoutChildren(this, needsLayout);
m_isLayoutSizeChanged = false;
+ // At this point LayoutRepainter already grabbed the old bounds,
+ // recalculate them now so repaintAfterLayout() uses the new bounds.
+ if (m_needsBoundariesOrTransformUpdate) {
+ updateCachedBoundaries();
+ m_needsBoundariesOrTransformUpdate = false;
+ }
+
repainter.repaintAfterLayout();
view()->enableLayoutState();
@@ -196,6 +204,13 @@ void RenderSVGRoot::destroy()
RenderBox::destroy();
}
+void RenderSVGRoot::styleWillChange(StyleDifference diff, const RenderStyle* newStyle)
+{
+ if (diff == StyleDifferenceLayout)
+ setNeedsBoundariesUpdate();
+ RenderBox::styleWillChange(diff, newStyle);
+}
+
void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBox::styleDidChange(diff, oldStyle);
@@ -267,24 +282,6 @@ const AffineTransform& RenderSVGRoot::localToParentTransform() const
return m_localToParentTransform;
}
-FloatRect RenderSVGRoot::objectBoundingBox() const
-{
- return SVGRenderSupport::computeContainerBoundingBox(this, SVGRenderSupport::ObjectBoundingBox);
-}
-
-FloatRect RenderSVGRoot::strokeBoundingBox() const
-{
- return SVGRenderSupport::computeContainerBoundingBox(this, SVGRenderSupport::StrokeBoundingBox);
-}
-
-FloatRect RenderSVGRoot::repaintRectInLocalCoordinates() const
-{
- FloatRect repaintRect = SVGRenderSupport::computeContainerBoundingBox(this, SVGRenderSupport::RepaintBoundingBox);
- style()->svgStyle()->inflateForShadow(repaintRect);
- repaintRect.inflate(borderAndPaddingWidth());
- return repaintRect;
-}
-
IntRect RenderSVGRoot::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer)
{
return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContainer);
@@ -299,7 +296,10 @@ void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer
// Apply initial viewport clip - not affected by overflow settings
repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize)));
- style()->svgStyle()->inflateForShadow(repaintRect);
+ const SVGRenderStyle* svgStyle = style()->svgStyle();
+ if (const ShadowData* shadow = svgStyle->shadow())
+ shadow->adjustRectForShadow(repaintRect);
+
RenderBox::computeRectForRepaint(repaintContainer, repaintRect, fixed);
}
@@ -313,6 +313,17 @@ void RenderSVGRoot::mapLocalToContainer(RenderBoxModelObject* repaintContainer,
RenderBox::mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState);
}
+void RenderSVGRoot::updateCachedBoundaries()
+{
+ m_objectBoundingBox = FloatRect();
+ m_strokeBoundingBox = FloatRect();
+ m_repaintBoundingBox = FloatRect();
+
+ SVGRenderSupport::computeContainerBoundingBoxes(this, m_objectBoundingBox, m_strokeBoundingBox, m_repaintBoundingBox);
+ SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingBox);
+ m_repaintBoundingBox.inflate(borderAndPaddingWidth());
+}
+
bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
{
IntPoint pointInContainer(_x, _y);
diff --git a/WebCore/rendering/RenderSVGRoot.h b/WebCore/rendering/RenderSVGRoot.h
index b90113c..63a7b3f 100644
--- a/WebCore/rendering/RenderSVGRoot.h
+++ b/WebCore/rendering/RenderSVGRoot.h
@@ -41,6 +41,8 @@ public:
RenderObjectChildList* children() { return &m_children; }
bool isLayoutSizeChanged() const { return m_isLayoutSizeChanged; }
+ virtual void setNeedsBoundariesUpdate() { m_needsBoundariesOrTransformUpdate = true; }
+ virtual void setNeedsTransformUpdate() { m_needsBoundariesOrTransformUpdate = true; }
private:
virtual RenderObjectChildList* virtualChildren() { return children(); }
@@ -58,6 +60,7 @@ private:
virtual void paint(PaintInfo&, int parentX, int parentY);
virtual void destroy();
+ virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual void updateFromElement();
@@ -66,9 +69,9 @@ private:
bool fillContains(const FloatPoint&) const;
bool strokeContains(const FloatPoint&) const;
- virtual FloatRect objectBoundingBox() const;
- virtual FloatRect strokeBoundingBox() const;
- virtual FloatRect repaintRectInLocalCoordinates() const;
+ virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; }
+ virtual FloatRect strokeBoundingBox() const { return m_strokeBoundingBox; }
+ virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
@@ -80,6 +83,7 @@ private:
void calcViewport();
bool selfWillPaint();
+ void updateCachedBoundaries();
IntSize parentOriginToBorderBox() const;
IntSize borderOriginToContentBox() const;
@@ -88,8 +92,12 @@ private:
RenderObjectChildList m_children;
FloatSize m_viewportSize;
+ FloatRect m_objectBoundingBox;
+ FloatRect m_strokeBoundingBox;
+ FloatRect m_repaintBoundingBox;
mutable AffineTransform m_localToParentTransform;
bool m_isLayoutSizeChanged : 1;
+ bool m_needsBoundariesOrTransformUpdate : 1;
};
inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object)
diff --git a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
index 888dd57..d3064c6 100644
--- a/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
+++ b/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp
@@ -53,7 +53,7 @@ void RenderSVGShadowTreeRootContainer::updateFromElement()
SVGUseElement* useElement = static_cast<SVGUseElement*>(node());
if (!m_shadowRoot) {
ASSERT(!m_recreateTree);
- m_shadowRoot = new SVGShadowTreeRootElement(document(), useElement);
+ m_shadowRoot = SVGShadowTreeRootElement::create(document(), useElement);
useElement->buildPendingResource();
}
diff --git a/WebCore/rendering/RenderSVGText.cpp b/WebCore/rendering/RenderSVGText.cpp
index 20c8a7c..80b8a91 100644
--- a/WebCore/rendering/RenderSVGText.cpp
+++ b/WebCore/rendering/RenderSVGText.cpp
@@ -75,10 +75,12 @@ void RenderSVGText::layout()
ASSERT(needsLayout());
LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
+ bool updateCachedBoundariesInParents = false;
if (m_needsTransformUpdate) {
SVGTextElement* text = static_cast<SVGTextElement*>(node());
m_localTransform = text->animatedLocalTransform();
m_needsTransformUpdate = false;
+ updateCachedBoundariesInParents = true;
}
// Reduced version of RenderBlock::layoutBlock(), which only takes care of SVG text.
@@ -95,13 +97,22 @@ void RenderSVGText::layout()
if (!firstChild())
setChildrenInline(true);
+ // FIXME: We need to find a way to only layout the child boxes, if needed.
+ FloatRect oldBoundaries = objectBoundingBox();
ASSERT(childrenInline());
forceLayoutInlineChildren();
+ if (!updateCachedBoundariesInParents)
+ updateCachedBoundariesInParents = oldBoundaries != objectBoundingBox();
+
// Invalidate all resources of this client if our layout changed.
if (m_everHadLayout && selfNeedsLayout())
SVGResourcesCache::clientLayoutChanged(this);
+ // If our bounds changed, notify the parents.
+ if (updateCachedBoundariesInParents)
+ RenderSVGBlock::setNeedsBoundariesUpdate();
+
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
@@ -178,6 +189,9 @@ FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
FloatRect repaintRect = strokeBoundingBox();
SVGRenderSupport::intersectRepaintRectWithResources(this, repaintRect);
+ if (const ShadowData* textShadow = style()->textShadow())
+ textShadow->adjustRectForShadow(repaintRect);
+
return repaintRect;
}
diff --git a/WebCore/rendering/RenderSVGTransformableContainer.cpp b/WebCore/rendering/RenderSVGTransformableContainer.cpp
index 94b9eea..c7d2029 100644
--- a/WebCore/rendering/RenderSVGTransformableContainer.cpp
+++ b/WebCore/rendering/RenderSVGTransformableContainer.cpp
@@ -35,7 +35,7 @@ RenderSVGTransformableContainer::RenderSVGTransformableContainer(SVGStyledTransf
{
}
-void RenderSVGTransformableContainer::calculateLocalTransform()
+bool RenderSVGTransformableContainer::calculateLocalTransform()
{
SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(node());
@@ -46,17 +46,18 @@ void RenderSVGTransformableContainer::calculateLocalTransform()
}
if (!element->hasTagName(SVGNames::gTag) || !static_cast<SVGGElement*>(element)->isShadowTreeContainerElement())
- return;
+ return needsUpdate;
FloatSize translation = static_cast<SVGShadowTreeContainerElement*>(element)->containerTranslation();
if (translation.width() == 0 && translation.height() == 0)
- return;
+ return needsUpdate;
// FIXME: Could optimize this case for use to avoid refetching the animatedLocalTransform() here, if only the containerTranslation() changed.
if (!needsUpdate)
m_localTransform = element->animatedLocalTransform();
m_localTransform.translate(translation.width(), translation.height());
+ return true;
}
}
diff --git a/WebCore/rendering/RenderSVGTransformableContainer.h b/WebCore/rendering/RenderSVGTransformableContainer.h
index e6de054..b63b91c 100644
--- a/WebCore/rendering/RenderSVGTransformableContainer.h
+++ b/WebCore/rendering/RenderSVGTransformableContainer.h
@@ -35,7 +35,7 @@ namespace WebCore {
virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; }
private:
- virtual void calculateLocalTransform();
+ virtual bool calculateLocalTransform();
virtual AffineTransform localTransform() const { return m_localTransform; }
bool m_needsTransformUpdate : 1;
diff --git a/WebCore/rendering/RenderSVGViewportContainer.cpp b/WebCore/rendering/RenderSVGViewportContainer.cpp
index f314bde..ccf67fa 100644
--- a/WebCore/rendering/RenderSVGViewportContainer.cpp
+++ b/WebCore/rendering/RenderSVGViewportContainer.cpp
@@ -48,10 +48,15 @@ void RenderSVGViewportContainer::calcViewport()
SVGElement* element = static_cast<SVGElement*>(node());
if (element->hasTagName(SVGNames::svgTag)) {
SVGSVGElement* svg = static_cast<SVGSVGElement*>(element);
+
+ FloatRect oldViewport = m_viewport;
m_viewport = FloatRect(svg->x().value(svg)
, svg->y().value(svg)
, svg->width().value(svg)
, svg->height().value(svg));
+
+ if (oldViewport != m_viewport)
+ setNeedsBoundariesUpdate();
}
}
diff --git a/WebCore/rendering/RenderScrollbar.cpp b/WebCore/rendering/RenderScrollbar.cpp
index 7378056..e7a70a4 100644
--- a/WebCore/rendering/RenderScrollbar.cpp
+++ b/WebCore/rendering/RenderScrollbar.cpp
@@ -27,6 +27,7 @@
#include "RenderScrollbar.h"
#include "Frame.h"
+#include "FrameView.h"
#include "RenderPart.h"
#include "RenderScrollbarPart.h"
#include "RenderScrollbarTheme.h"
@@ -150,6 +151,14 @@ PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p
RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(pseudoId, owningRenderer()->style());
s_styleResolvePart = NoPart;
s_styleResolveScrollbar = 0;
+
+ // Scrollbars for root frames should always have background color
+ // unless explicitly specified as transparent. So we force it.
+ // This is because WebKit assumes scrollbar to be always painted and missing background
+ // causes visual artifact like non-repainted dirty region.
+ if (result && m_owningFrame && m_owningFrame->view() && !m_owningFrame->view()->isTransparent() && !result->hasBackground())
+ result->setBackgroundColor(Color::white);
+
return result;
}
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index f9f0f56..48f3920 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -392,7 +392,7 @@ void RenderTable::layout()
toRenderTableSection(child)->layoutRows(child == m_firstBody ? max(0, th - calculatedHeight) : 0);
}
- if (!m_firstBody && th > calculatedHeight && !style()->htmlHacks()) {
+ if (!m_firstBody && th > calculatedHeight && !document()->inQuirksMode()) {
// Completely empty tables (with no sections or anything) should at least honor specified height
// in strict mode.
setHeight(height() + th);
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index 8cb54c0..a9052ce 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -386,7 +386,7 @@ int RenderTableSection::calcRowHeight()
// Explicit heights use the border box in quirks mode. In strict mode do the right
// thing and actually add in the border and padding.
ch = cell->style()->height().calcValue(0) +
- (cell->style()->htmlHacks() ? 0 : (adjustedPaddingTop + adjustedPaddingBottom +
+ (document()->inQuirksMode() ? 0 : (adjustedPaddingTop + adjustedPaddingBottom +
cell->borderTop() + cell->borderBottom()));
ch = max(ch, adjustedHeight);
diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp
index 9098bab..e66e4ed 100644
--- a/WebCore/rendering/RenderTextControl.cpp
+++ b/WebCore/rendering/RenderTextControl.cpp
@@ -355,26 +355,22 @@ String RenderTextControl::textWithHardLineBreaks()
{
if (!m_innerText)
return "";
- Node* firstChild = m_innerText->firstChild();
- if (!firstChild)
- return "";
- RenderObject* renderer = firstChild->renderer();
+ RenderBlock* renderer = toRenderBlock(m_innerText->renderer());
if (!renderer)
return "";
- InlineBox* box = renderer->isText() ? toRenderText(renderer)->firstTextBox() : toRenderBox(renderer)->inlineBoxWrapper();
- if (!box)
- return "";
-
Node* breakNode;
unsigned breakOffset;
- RootInlineBox* line = box->root();
+ RootInlineBox* line = renderer->firstRootBox();
+ if (!line)
+ return "";
+
getNextSoftBreak(line, breakNode, breakOffset);
Vector<UChar> result;
- for (Node* n = firstChild; n; n = n->traverseNextNode(m_innerText.get())) {
+ for (Node* n = m_innerText->firstChild(); n; n = n->traverseNextNode(m_innerText.get())) {
if (n->hasTagName(brTag))
result.append(&newlineCharacter, 1);
else if (n->isTextNode()) {
diff --git a/WebCore/rendering/RenderTextControlSingleLine.h b/WebCore/rendering/RenderTextControlSingleLine.h
index e57e37e..0deb063 100644
--- a/WebCore/rendering/RenderTextControlSingleLine.h
+++ b/WebCore/rendering/RenderTextControlSingleLine.h
@@ -82,7 +82,7 @@ private:
virtual int scrollHeight() const;
virtual void setScrollLeft(int);
virtual void setScrollTop(int);
- virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1.0f, Node** stopNode = 0);
+ virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
int textBlockWidth() const;
virtual float getAvgCharWidth(AtomicString family);
diff --git a/WebCore/rendering/RenderTheme.cpp b/WebCore/rendering/RenderTheme.cpp
index 5d00f5a..522bd4d 100644
--- a/WebCore/rendering/RenderTheme.cpp
+++ b/WebCore/rendering/RenderTheme.cpp
@@ -1043,7 +1043,7 @@ void RenderTheme::platformColorsDidChange()
m_activeListBoxSelectionBackgroundColor = Color();
m_inactiveListBoxSelectionForegroundColor = Color();
- Page::setNeedsReapplyStyles();
+ Page::scheduleForcedStyleRecalcForAllPages();
}
Color RenderTheme::systemColor(int cssValueId) const
diff --git a/WebCore/rendering/RenderVideo.cpp b/WebCore/rendering/RenderVideo.cpp
index 0f444b2..3f4e2bf 100644
--- a/WebCore/rendering/RenderVideo.cpp
+++ b/WebCore/rendering/RenderVideo.cpp
@@ -110,7 +110,7 @@ IntSize RenderVideo::calculateIntrinsicSize()
if (player() && video->readyState() >= HTMLVideoElement::HAVE_METADATA)
return player()->naturalSize();
- if (video->shouldDisplayPosterImage() && !m_cachedImageSize.isEmpty() && !errorOccurred())
+ if (video->shouldDisplayPosterImage() && !m_cachedImageSize.isEmpty() && !imageResource()->errorOccurred())
return m_cachedImageSize;
// When the natural size of the video is unavailable, we use the provided
diff --git a/WebCore/rendering/RootInlineBox.cpp b/WebCore/rendering/RootInlineBox.cpp
index bec288c..e8f24b5 100644
--- a/WebCore/rendering/RootInlineBox.cpp
+++ b/WebCore/rendering/RootInlineBox.cpp
@@ -215,14 +215,10 @@ int RootInlineBox::verticallyAlignBoxes(int heightOfBlock, GlyphOverflowAndFallb
int maxAscent = 0;
int maxDescent = 0;
- // Figure out if we're in strict mode. Note that we can't simply use !style()->htmlHacks(),
- // because that would match almost strict mode as well.
- RenderObject* curr = renderer();
- while (curr && !curr->node())
- curr = curr->container();
- bool strictMode = (curr && curr->document()->inStrictMode());
+ // Figure out if we're in no-quirks mode.
+ bool noQuirksMode = renderer()->document()->inNoQuirksMode();
- computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, strictMode, textBoxDataMap);
+ computeLogicalBoxHeights(maxPositionTop, maxPositionBottom, maxAscent, maxDescent, noQuirksMode, textBoxDataMap);
if (maxAscent + maxDescent < max(maxPositionTop, maxPositionBottom))
adjustMaxAscentAndDescent(maxAscent, maxDescent, maxPositionTop, maxPositionBottom);
@@ -230,8 +226,8 @@ int RootInlineBox::verticallyAlignBoxes(int heightOfBlock, GlyphOverflowAndFallb
int maxHeight = maxAscent + maxDescent;
int lineTop = heightOfBlock;
int lineBottom = heightOfBlock;
- placeBoxesVertically(heightOfBlock, maxHeight, maxAscent, strictMode, lineTop, lineBottom);
- computeVerticalOverflow(lineTop, lineBottom, strictMode, textBoxDataMap);
+ placeBoxesVertically(heightOfBlock, maxHeight, maxAscent, noQuirksMode, lineTop, lineBottom);
+ computeVerticalOverflow(lineTop, lineBottom, noQuirksMode, textBoxDataMap);
setLineTopBottomPositions(lineTop, lineBottom);
heightOfBlock += maxHeight;
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index 12d6d77..644ff70 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -61,7 +61,9 @@ IntRect SVGRenderSupport::clippedOverflowRectForRepaint(RenderObject* object, Re
void SVGRenderSupport::computeRectForRepaint(RenderObject* object, RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
{
- object->style()->svgStyle()->inflateForShadow(repaintRect);
+ const SVGRenderStyle* svgStyle = object->style()->svgStyle();
+ if (const ShadowData* shadow = svgStyle->shadow())
+ shadow->adjustRectForShadow(repaintRect);
// Translate to coords in our parent renderer, and then call computeRectForRepaint on our parent
repaintRect = object->localToParentTransform().mapRect(repaintRect);
@@ -86,24 +88,22 @@ bool SVGRenderSupport::prepareToRenderSVGContent(RenderObject* object, PaintInfo
const SVGRenderStyle* svgStyle = style->svgStyle();
ASSERT(svgStyle);
- FloatRect repaintRect;
-
// Setup transparency layers before setting up SVG resources!
float opacity = style->opacity();
- if (opacity < 1) {
- repaintRect = object->repaintRectInLocalCoordinates();
- paintInfo.context->clip(repaintRect);
- paintInfo.context->beginTransparencyLayer(opacity);
- }
+ const ShadowData* shadow = svgStyle->shadow();
+ if (opacity < 1 || shadow) {
+ FloatRect repaintRect = object->repaintRectInLocalCoordinates();
- if (const ShadowData* shadow = svgStyle->shadow()) {
- // Eventually compute repaint rect, if not done so far.
- if (opacity >= 1)
- repaintRect = object->repaintRectInLocalCoordinates();
+ if (opacity < 1) {
+ paintInfo.context->clip(repaintRect);
+ paintInfo.context->beginTransparencyLayer(opacity);
+ }
- paintInfo.context->clip(repaintRect);
- paintInfo.context->setShadow(IntSize(shadow->x(), shadow->y()), shadow->blur(), shadow->color(), style->colorSpace());
- paintInfo.context->beginTransparencyLayer(1);
+ if (shadow) {
+ paintInfo.context->clip(repaintRect);
+ paintInfo.context->setShadow(IntSize(shadow->x(), shadow->y()), shadow->blur(), shadow->color(), style->colorSpace());
+ paintInfo.context->beginTransparencyLayer(1);
+ }
}
SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object);
@@ -154,39 +154,38 @@ void SVGRenderSupport::finishRenderSVGContent(RenderObject* object, PaintInfo& p
}
#endif
- float opacity = style->opacity();
- if (opacity < 1)
+ if (style->opacity() < 1)
paintInfo.context->endTransparencyLayer();
- // This needs to be done separately from opacity, because if both properties are set,
- // then the transparency layers are nested.
if (svgStyle->shadow())
paintInfo.context->endTransparencyLayer();
}
-FloatRect SVGRenderSupport::computeContainerBoundingBox(const RenderObject* container, ContainerBoundingBoxMode mode)
+void SVGRenderSupport::computeContainerBoundingBoxes(const RenderObject* container, FloatRect& objectBoundingBox, FloatRect& strokeBoundingBox, FloatRect& repaintBoundingBox)
{
- FloatRect boundingBox;
-
for (RenderObject* current = container->firstChild(); current; current = current->nextSibling()) {
- FloatRect childBoundingBox;
-
- switch (mode) {
- case ObjectBoundingBox:
- childBoundingBox = current->objectBoundingBox();
- break;
- case StrokeBoundingBox:
- childBoundingBox = current->strokeBoundingBox();
- break;
- case RepaintBoundingBox:
- childBoundingBox = current->repaintRectInLocalCoordinates();
- break;
+ if (current->isSVGHiddenContainer())
+ continue;
+
+ const AffineTransform& transform = current->localToParentTransform();
+ if (transform.isIdentity()) {
+ objectBoundingBox.unite(current->objectBoundingBox());
+ strokeBoundingBox.unite(current->strokeBoundingBox());
+ repaintBoundingBox.unite(current->repaintRectInLocalCoordinates());
+ } else {
+ objectBoundingBox.unite(transform.mapRect(current->objectBoundingBox()));
+ strokeBoundingBox.unite(transform.mapRect(current->strokeBoundingBox()));
+ repaintBoundingBox.unite(transform.mapRect(current->repaintRectInLocalCoordinates()));
}
-
- boundingBox.unite(current->localToParentTransform().mapRect(childBoundingBox));
}
+}
+
+bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo& paintInfo)
+{
+ if (localTransform.isIdentity())
+ return localRepaintRect.intersects(paintInfo.rect);
- return boundingBox;
+ return localTransform.mapRect(localRepaintRect).intersects(paintInfo.rect);
}
const RenderSVGRoot* SVGRenderSupport::findTreeRootObject(const RenderObject* start)
@@ -281,7 +280,8 @@ void SVGRenderSupport::intersectRepaintRectWithResources(const RenderObject* obj
RenderObject* renderer = const_cast<RenderObject*>(object);
SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
if (!resources) {
- svgStyle->inflateForShadow(repaintRect);
+ if (const ShadowData* shadow = svgStyle->shadow())
+ shadow->adjustRectForShadow(repaintRect);
return;
}
@@ -296,7 +296,8 @@ void SVGRenderSupport::intersectRepaintRectWithResources(const RenderObject* obj
if (RenderSVGResourceMasker* masker = resources->masker())
repaintRect.intersect(masker->resourceBoundingBox(renderer));
- svgStyle->inflateForShadow(repaintRect);
+ if (const ShadowData* shadow = svgStyle->shadow())
+ shadow->adjustRectForShadow(repaintRect);
}
bool SVGRenderSupport::pointInClippingArea(RenderObject* object, const FloatPoint& point)
diff --git a/WebCore/rendering/SVGRenderSupport.h b/WebCore/rendering/SVGRenderSupport.h
index 2de1e99..54622d2 100644
--- a/WebCore/rendering/SVGRenderSupport.h
+++ b/WebCore/rendering/SVGRenderSupport.h
@@ -58,15 +58,8 @@ public:
// Determines whether the passed point lies in a clipping area
static bool pointInClippingArea(RenderObject*, const FloatPoint&);
- enum ContainerBoundingBoxMode {
- ObjectBoundingBox,
- StrokeBoundingBox,
- RepaintBoundingBox
- };
-
- // Used to share the "walk all the children" logic between objectBoundingBox
- // and repaintRectInLocalCoordinates in RenderSVGRoot and RenderSVGContainer
- static FloatRect computeContainerBoundingBox(const RenderObject* container, ContainerBoundingBoxMode);
+ static void computeContainerBoundingBoxes(const RenderObject* container, FloatRect& objectBoundingBox, FloatRect& strokeBoundingBox, FloatRect& repaintBoundingBox);
+ static bool paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo& paintInfo);
// Important functions used by nearly all SVG renderers centralizing coordinate transformations / repaint rect calculations
static IntRect clippedOverflowRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer);
diff --git a/WebCore/rendering/SVGResources.h b/WebCore/rendering/SVGResources.h
index 5f6e746..49591cf 100644
--- a/WebCore/rendering/SVGResources.h
+++ b/WebCore/rendering/SVGResources.h
@@ -38,7 +38,7 @@ class RenderSVGResourceMasker;
class SVGRenderStyle;
// Holds a set of resources associated with a RenderObject
-class SVGResources {
+class SVGResources : public Noncopyable {
public:
SVGResources();
diff --git a/WebCore/rendering/SVGResourcesCache.cpp b/WebCore/rendering/SVGResourcesCache.cpp
index a4089d6..88cbb3a 100644
--- a/WebCore/rendering/SVGResourcesCache.cpp
+++ b/WebCore/rendering/SVGResourcesCache.cpp
@@ -34,11 +34,7 @@ SVGResourcesCache::SVGResourcesCache()
SVGResourcesCache::~SVGResourcesCache()
{
- if (m_cache.isEmpty())
- return;
-
deleteAllValues(m_cache);
- m_cache.clear();
}
void SVGResourcesCache::addResourcesFromRenderObject(RenderObject* object, const RenderStyle* style)
diff --git a/WebCore/rendering/SVGShadowTreeElements.cpp b/WebCore/rendering/SVGShadowTreeElements.cpp
index 311874c..8a66991 100644
--- a/WebCore/rendering/SVGShadowTreeElements.cpp
+++ b/WebCore/rendering/SVGShadowTreeElements.cpp
@@ -26,17 +26,20 @@
#include "FloatSize.h"
#include "RenderObject.h"
#include "SVGNames.h"
+#include "SVGUseElement.h"
namespace WebCore {
// SVGShadowTreeContainerElement
+
SVGShadowTreeContainerElement::SVGShadowTreeContainerElement(Document* document)
: SVGGElement(SVGNames::gTag, document)
{
}
-
-SVGShadowTreeContainerElement::~SVGShadowTreeContainerElement()
+
+PassRefPtr<SVGShadowTreeContainerElement> SVGShadowTreeContainerElement::create(Document* document)
{
+ return adoptRef(new SVGShadowTreeContainerElement(document));
}
FloatSize SVGShadowTreeContainerElement::containerTranslation() const
@@ -45,15 +48,17 @@ FloatSize SVGShadowTreeContainerElement::containerTranslation() const
}
// SVGShadowTreeRootElement
-SVGShadowTreeRootElement::SVGShadowTreeRootElement(Document* document, Element* shadowParent)
+
+inline SVGShadowTreeRootElement::SVGShadowTreeRootElement(Document* document, SVGUseElement* shadowParent)
: SVGShadowTreeContainerElement(document)
, m_shadowParent(shadowParent)
{
setInDocument();
}
-SVGShadowTreeRootElement::~SVGShadowTreeRootElement()
+PassRefPtr<SVGShadowTreeRootElement> SVGShadowTreeRootElement::create(Document* document, SVGUseElement* shadowParent)
{
+ return adoptRef(new SVGShadowTreeRootElement(document, shadowParent));
}
void SVGShadowTreeRootElement::attachElement(PassRefPtr<RenderStyle> style, RenderArena* arena)
diff --git a/WebCore/rendering/SVGShadowTreeElements.h b/WebCore/rendering/SVGShadowTreeElements.h
index 7611b8a..d49fbaa 100644
--- a/WebCore/rendering/SVGShadowTreeElements.h
+++ b/WebCore/rendering/SVGShadowTreeElements.h
@@ -27,13 +27,11 @@
namespace WebCore {
class FloatSize;
+class SVGUseElement;
class SVGShadowTreeContainerElement : public SVGGElement {
public:
- SVGShadowTreeContainerElement(Document*);
- virtual ~SVGShadowTreeContainerElement();
-
- virtual bool isShadowTreeContainerElement() const { return true; }
+ static PassRefPtr<SVGShadowTreeContainerElement> create(Document*);
FloatSize containerTranslation() const;
void setContainerOffset(const SVGLength& x, const SVGLength& y)
@@ -42,22 +40,29 @@ public:
m_yOffset = y;
}
+protected:
+ SVGShadowTreeContainerElement(Document*);
+
private:
+ virtual bool isShadowTreeContainerElement() const { return true; }
+
SVGLength m_xOffset;
SVGLength m_yOffset;
};
class SVGShadowTreeRootElement : public SVGShadowTreeContainerElement {
public:
- SVGShadowTreeRootElement(Document*, Element* shadowParent);
- virtual ~SVGShadowTreeRootElement();
-
- virtual bool isShadowNode() const { return m_shadowParent; }
- virtual ContainerNode* shadowParentNode() { return m_shadowParent; }
+ static PassRefPtr<SVGShadowTreeRootElement> create(Document*, SVGUseElement* shadowParent);
void attachElement(PassRefPtr<RenderStyle>, RenderArena*);
+ virtual ContainerNode* shadowParentNode() { return m_shadowParent; }
+
private:
+ SVGShadowTreeRootElement(Document*, SVGUseElement* shadowParent);
+
+ virtual bool isShadowNode() const { return m_shadowParent; }
+
ContainerNode* m_shadowParent;
};
diff --git a/WebCore/rendering/style/BorderData.h b/WebCore/rendering/style/BorderData.h
index 96caf97..03635d9 100644
--- a/WebCore/rendering/style/BorderData.h
+++ b/WebCore/rendering/style/BorderData.h
@@ -26,7 +26,7 @@
#define BorderData_h
#include "BorderValue.h"
-#include "IntSize.h"
+#include "LengthSize.h"
#include "NinePieceImage.h"
namespace WebCore {
@@ -34,6 +34,12 @@ namespace WebCore {
class BorderData {
friend class RenderStyle;
public:
+ BorderData() : m_topLeft(Length(0, Fixed), Length(0, Fixed))
+ , m_topRight(Length(0, Fixed), Length(0, Fixed))
+ , m_bottomLeft(Length(0, Fixed), Length(0, Fixed))
+ , m_bottomRight(Length(0, Fixed), Length(0, Fixed))
+ {
+ }
bool hasBorder() const
{
bool haveImage = m_image.hasImage();
@@ -42,13 +48,13 @@ public:
bool hasBorderRadius() const
{
- if (m_topLeft.width() > 0)
+ if (m_topLeft.width().rawValue() > 0)
return true;
- if (m_topRight.width() > 0)
+ if (m_topRight.width().rawValue() > 0)
return true;
- if (m_bottomLeft.width() > 0)
+ if (m_bottomLeft.width().rawValue() > 0)
return true;
- if (m_bottomRight.width() > 0)
+ if (m_bottomRight.width().rawValue() > 0)
return true;
return false;
}
@@ -99,10 +105,10 @@ public:
const NinePieceImage& image() const { return m_image; }
- const IntSize& topLeft() const { return m_topLeft; }
- const IntSize& topRight() const { return m_topRight; }
- const IntSize& bottomLeft() const { return m_bottomLeft; }
- const IntSize& bottomRight() const { return m_bottomRight; }
+ const LengthSize& topLeft() const { return m_topLeft; }
+ const LengthSize& topRight() const { return m_topRight; }
+ const LengthSize& bottomLeft() const { return m_bottomLeft; }
+ const LengthSize& bottomRight() const { return m_bottomRight; }
private:
BorderValue m_left;
@@ -112,10 +118,10 @@ private:
NinePieceImage m_image;
- IntSize m_topLeft;
- IntSize m_topRight;
- IntSize m_bottomLeft;
- IntSize m_bottomRight;
+ LengthSize m_topLeft;
+ LengthSize m_topRight;
+ LengthSize m_bottomLeft;
+ LengthSize m_bottomRight;
};
} // namespace WebCore
diff --git a/WebCore/rendering/style/ContentData.cpp b/WebCore/rendering/style/ContentData.cpp
index b0f9e81..d150f77 100644
--- a/WebCore/rendering/style/ContentData.cpp
+++ b/WebCore/rendering/style/ContentData.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 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
@@ -22,7 +22,6 @@
#include "config.h"
#include "ContentData.h"
-#include "CounterContent.h"
#include "StyleImage.h"
#include <wtf/text/StringImpl.h>
@@ -32,42 +31,26 @@ void ContentData::clear()
{
deleteContent();
- ContentData* n = m_next;
- m_next = 0;
-
- // Reverse the list so we can delete without recursing.
- ContentData* last = 0;
- ContentData* c;
- while ((c = n)) {
- n = c->m_next;
- c->m_next = last;
- last = c;
- }
- for (c = last; c; c = n) {
- n = c->m_next;
- c->m_next = 0;
- delete c;
- }
+ // Delete the singly-linked list without recursing.
+ for (OwnPtr<ContentData> next = m_next.release(); next; next = next->m_next.release()) { }
}
+// FIXME: Why isn't this just operator==?
+// FIXME: This is not a good name for a boolean-returning function.
bool ContentData::dataEquivalent(const ContentData& other) const
{
if (type() != other.type())
return false;
switch (type()) {
- case CONTENT_NONE:
- return true;
- break;
- case CONTENT_TEXT:
- return equal(text(), other.text());
- break;
- case CONTENT_OBJECT:
- return StyleImage::imagesEquivalent(image(), other.image());
- break;
- case CONTENT_COUNTER:
- return *counter() == *other.counter();
- break;
+ case CONTENT_NONE:
+ return true;
+ case CONTENT_TEXT:
+ return equal(text(), other.text());
+ case CONTENT_OBJECT:
+ return StyleImage::imagesEquivalent(image(), other.image());
+ case CONTENT_COUNTER:
+ return *counter() == *other.counter();
}
ASSERT_NOT_REACHED();
@@ -77,17 +60,17 @@ bool ContentData::dataEquivalent(const ContentData& other) const
void ContentData::deleteContent()
{
switch (m_type) {
- case CONTENT_NONE:
- break;
- case CONTENT_OBJECT:
- m_content.m_image->deref();
- break;
- case CONTENT_TEXT:
- m_content.m_text->deref();
- break;
- case CONTENT_COUNTER:
- delete m_content.m_counter;
- break;
+ case CONTENT_NONE:
+ break;
+ case CONTENT_OBJECT:
+ m_content.m_image->deref();
+ break;
+ case CONTENT_TEXT:
+ m_content.m_text->deref();
+ break;
+ case CONTENT_COUNTER:
+ delete m_content.m_counter;
+ break;
}
m_type = CONTENT_NONE;
diff --git a/WebCore/rendering/style/ContentData.h b/WebCore/rendering/style/ContentData.h
index 5c3565e..4f964a2 100644
--- a/WebCore/rendering/style/ContentData.h
+++ b/WebCore/rendering/style/ContentData.h
@@ -2,7 +2,7 @@
* Copyright (C) 2000 Lars Knoll (knoll@kde.org)
* (C) 2000 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
*
* This library is free software; you can redistribute it and/or
@@ -25,21 +25,18 @@
#ifndef ContentData_h
#define ContentData_h
-#include "RenderStyleConstants.h"
-#include <wtf/Forward.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/PassRefPtr.h>
+#include "CounterContent.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
namespace WebCore {
-class CounterContent;
class StyleImage;
struct ContentData : Noncopyable {
public:
ContentData()
: m_type(CONTENT_NONE)
- , m_next(0)
{
}
@@ -59,35 +56,44 @@ public:
bool dataEquivalent(const ContentData&) const;
- StyleImage* image() const { return m_content.m_image; }
+ StyleImage* image() const
+ {
+ ASSERT(isImage());
+ return m_content.m_image;
+ }
void setImage(PassRefPtr<StyleImage> image)
{
deleteContent();
m_type = CONTENT_OBJECT;
- m_content.m_image = image.releaseRef();
+ m_content.m_image = image.leakRef();
}
- StringImpl* text() const { return m_content.m_text; }
+ StringImpl* text() const
+ {
+ ASSERT(isText());
+ return m_content.m_text;
+ }
void setText(PassRefPtr<StringImpl> text)
{
deleteContent();
m_type = CONTENT_TEXT;
- m_content.m_text = text.releaseRef();
+ m_content.m_text = text.leakRef();
}
- CounterContent* counter() const { return m_content.m_counter; }
- void setCounter(CounterContent* counter)
+ CounterContent* counter() const
+ {
+ ASSERT(isCounter());
+ return m_content.m_counter;
+ }
+ void setCounter(PassOwnPtr<CounterContent> counter)
{
deleteContent();
m_type = CONTENT_COUNTER;
- m_content.m_counter = counter;
+ m_content.m_counter = counter.leakPtr();
}
- ContentData* next() const { return m_next; }
- void setNext(ContentData* next)
- {
- m_next = next;
- }
+ ContentData* next() const { return m_next.get(); }
+ void setNext(PassOwnPtr<ContentData> next) { m_next = next; }
private:
void deleteContent();
@@ -98,7 +104,7 @@ private:
StringImpl* m_text;
CounterContent* m_counter;
} m_content;
- ContentData* m_next;
+ OwnPtr<ContentData> m_next;
};
} // namespace WebCore
diff --git a/WebCore/rendering/style/CursorData.h b/WebCore/rendering/style/CursorData.h
index 2341e71..6d0a273 100644
--- a/WebCore/rendering/style/CursorData.h
+++ b/WebCore/rendering/style/CursorData.h
@@ -25,15 +25,14 @@
#ifndef CursorData_h
#define CursorData_h
-#include "CachedImage.h"
-#include "CachedResourceHandle.h"
#include "IntPoint.h"
+#include "StyleImage.h"
namespace WebCore {
class CursorData {
public:
- CursorData(CachedImage* image, const IntPoint& hotSpot)
+ CursorData(PassRefPtr<StyleImage> image, const IntPoint& hotSpot)
: m_image(image)
, m_hotSpot(hotSpot)
{
@@ -49,11 +48,13 @@ public:
return !(*this == o);
}
- const CachedImage* image() const { return m_image.get(); }
+ StyleImage* image() const { return m_image.get(); }
+ void setImage(PassRefPtr<StyleImage> image) { m_image = image; }
+
const IntPoint& hotSpot() const { return m_hotSpot; }
private:
- CachedResourceHandle<CachedImage> m_image;
+ RefPtr<StyleImage> m_image;
IntPoint m_hotSpot; // for CSS3 support
};
diff --git a/WebCore/rendering/style/CursorList.h b/WebCore/rendering/style/CursorList.h
index bdd65d4..1b82684 100644
--- a/WebCore/rendering/style/CursorList.h
+++ b/WebCore/rendering/style/CursorList.h
@@ -39,6 +39,7 @@ public:
}
const CursorData& operator[](int i) const { return m_vector[i]; }
+ CursorData& operator[](int i) { return m_vector[i]; }
bool operator==(const CursorList& o) const { return m_vector == o.m_vector; }
bool operator!=(const CursorList& o) const { return m_vector != o.m_vector; }
diff --git a/WebCore/rendering/style/KeyframeList.cpp b/WebCore/rendering/style/KeyframeList.cpp
index 41fbbe2..bafa426 100644
--- a/WebCore/rendering/style/KeyframeList.cpp
+++ b/WebCore/rendering/style/KeyframeList.cpp
@@ -43,10 +43,10 @@ bool KeyframeList::operator==(const KeyframeList& o) const
Vector<KeyframeValue>::const_iterator it2 = o.m_keyframes.begin();
for (Vector<KeyframeValue>::const_iterator it1 = m_keyframes.begin(); it1 != m_keyframes.end(); ++it1) {
- if (it1->m_key != it2->m_key)
+ if (it1->key() != it2->key())
return false;
- const RenderStyle& style1 = *it1->m_style;
- const RenderStyle& style2 = *it2->m_style;
+ const RenderStyle& style1 = *it1->style();
+ const RenderStyle& style2 = *it2->style();
if (style1 != style2)
return false;
++it2;
@@ -55,34 +55,43 @@ bool KeyframeList::operator==(const KeyframeList& o) const
return true;
}
-void KeyframeList::insert(float key, PassRefPtr<RenderStyle> style)
+void KeyframeList::insert(const KeyframeValue& keyframe)
{
- if (key < 0 || key > 1)
+ if (keyframe.key() < 0 || keyframe.key() > 1)
return;
- int index = -1;
-
+ bool inserted = false;
+ bool replaced = false;
for (size_t i = 0; i < m_keyframes.size(); ++i) {
- if (m_keyframes[i].m_key == key) {
- index = (int) i;
+ if (m_keyframes[i].key() == keyframe.key()) {
+ m_keyframes[i] = keyframe;
+ replaced = true;
break;
}
- if (m_keyframes[i].m_key > key) {
+
+ if (m_keyframes[i].key() > keyframe.key()) {
// insert before
- m_keyframes.insert(i, KeyframeValue());
- index = (int) i;
+ m_keyframes.insert(i, keyframe);
+ inserted = true;
break;
}
}
- if (index < 0) {
- // append
- index = (int) m_keyframes.size();
- m_keyframes.append(KeyframeValue());
+ if (!replaced && !inserted)
+ m_keyframes.append(keyframe);
+
+ if (replaced) {
+ // We have to rebuild the properties list from scratch.
+ m_properties.clear();
+ for (Vector<KeyframeValue>::const_iterator it = m_keyframes.begin(); it != m_keyframes.end(); ++it) {
+ const KeyframeValue& currKeyframe = *it;
+ for (HashSet<int>::const_iterator it = currKeyframe.properties().begin(); it != currKeyframe.properties().end(); ++it)
+ m_properties.add(*it);
+ }
+ } else {
+ for (HashSet<int>::const_iterator it = keyframe.properties().begin(); it != keyframe.properties().end(); ++it)
+ m_properties.add(*it);
}
-
- m_keyframes[index].m_key = key;
- m_keyframes[index].m_style = style;
}
} // namespace WebCore
diff --git a/WebCore/rendering/style/KeyframeList.h b/WebCore/rendering/style/KeyframeList.h
index bb5f180..64170ce 100644
--- a/WebCore/rendering/style/KeyframeList.h
+++ b/WebCore/rendering/style/KeyframeList.h
@@ -37,15 +37,25 @@ class RenderStyle;
class KeyframeValue {
public:
- KeyframeValue()
- : m_key(-1)
+ KeyframeValue(float key, PassRefPtr<RenderStyle> style)
+ : m_key(key)
+ , m_style(style)
{
}
+ void addProperty(int prop) { m_properties.add(prop); }
+ bool containsProperty(int prop) const { return m_properties.contains(prop); }
+ const HashSet<int>& properties() const { return m_properties; }
+
float key() const { return m_key; }
+ void setKey(float key) { m_key = key; }
+
const RenderStyle* style() const { return m_style.get(); }
+ void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
+private:
float m_key;
+ HashSet<int> m_properties; // The properties specified in this keyframe.
RefPtr<RenderStyle> m_style;
};
@@ -55,8 +65,8 @@ public:
: m_animationName(animationName)
, m_renderer(renderer)
{
- insert(0, 0);
- insert(1, 0);
+ insert(KeyframeValue(0, 0));
+ insert(KeyframeValue(1, 0));
}
~KeyframeList();
@@ -65,7 +75,7 @@ public:
const AtomicString& animationName() const { return m_animationName; }
- void insert(float key, PassRefPtr<RenderStyle> style);
+ void insert(const KeyframeValue& keyframe);
void addProperty(int prop) { m_properties.add(prop); }
bool containsProperty(int prop) const { return m_properties.contains(prop); }
@@ -75,13 +85,12 @@ public:
void clear();
bool isEmpty() const { return m_keyframes.isEmpty(); }
size_t size() const { return m_keyframes.size(); }
- Vector<KeyframeValue>::const_iterator beginKeyframes() const { return m_keyframes.begin(); }
- Vector<KeyframeValue>::const_iterator endKeyframes() const { return m_keyframes.end(); }
+ const KeyframeValue& operator[](size_t index) const { return m_keyframes[index]; }
private:
AtomicString m_animationName;
- Vector<KeyframeValue> m_keyframes;
- HashSet<int> m_properties; // the properties being animated
+ Vector<KeyframeValue> m_keyframes; // kept sorted by key
+ HashSet<int> m_properties; // the properties being animated
RenderObject* m_renderer;
};
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index aaccbf7..93cd8de 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -24,8 +24,6 @@
#include "CSSPropertyNames.h"
#include "CSSStyleSelector.h"
-#include "CachedImage.h"
-#include "CounterContent.h"
#include "FontSelector.h"
#include "RenderArena.h"
#include "RenderObject.h"
@@ -403,7 +401,6 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
inherited->vertical_border_spacing != other->inherited->vertical_border_spacing ||
inherited_flags._box_direction != other->inherited_flags._box_direction ||
inherited_flags._visuallyOrdered != other->inherited_flags._visuallyOrdered ||
- inherited_flags._htmlHacks != other->inherited_flags._htmlHacks ||
noninherited_flags._position != other->noninherited_flags._position ||
noninherited_flags._floating != other->noninherited_flags._floating ||
noninherited_flags._originalDisplay != other->noninherited_flags._originalDisplay)
@@ -552,7 +549,7 @@ void RenderStyle::setClip(Length top, Length right, Length bottom, Length left)
data->clip.m_left = left;
}
-void RenderStyle::addCursor(CachedImage* image, const IntPoint& hotSpot)
+void RenderStyle::addCursor(PassRefPtr<StyleImage> image, const IntPoint& hotSpot)
{
if (!rareInheritedData.access()->cursorData)
rareInheritedData.access()->cursorData = CursorList::create();
@@ -576,92 +573,59 @@ void RenderStyle::clearContent()
rareNonInheritedData->m_content->clear();
}
-void RenderStyle::setContent(PassRefPtr<StyleImage> image, bool add)
+ContentData* RenderStyle::prepareToSetContent(StringImpl* string, bool add)
{
- if (!image)
- return; // The object is null. Nothing to do. Just bail.
-
OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content;
ContentData* lastContent = content.get();
while (lastContent && lastContent->next())
lastContent = lastContent->next();
+ if (string && add && lastContent && lastContent->isText()) {
+ // Augment the existing string and share the existing ContentData node.
+ String newText = lastContent->text();
+ newText.append(string);
+ lastContent->setText(newText.impl());
+ return 0;
+ }
+
bool reuseContent = !add;
- ContentData* newContentData;
+ OwnPtr<ContentData> newContentData;
if (reuseContent && content) {
content->clear();
- newContentData = content.leakPtr();
+ newContentData = content.release();
} else
- newContentData = new ContentData;
+ newContentData = adoptPtr(new ContentData);
+
+ ContentData* result = newContentData.get();
if (lastContent && !reuseContent)
- lastContent->setNext(newContentData);
+ lastContent->setNext(newContentData.release());
else
- content.set(newContentData);
+ content = newContentData.release();
- newContentData->setImage(image);
+ return result;
}
-void RenderStyle::setContent(PassRefPtr<StringImpl> s, bool add)
+void RenderStyle::setContent(PassRefPtr<StyleImage> image, bool add)
{
- if (!s)
- return; // The string is null. Nothing to do. Just bail.
-
- OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content;
- ContentData* lastContent = content.get();
- while (lastContent && lastContent->next())
- lastContent = lastContent->next();
-
- bool reuseContent = !add;
- if (add && lastContent) {
- if (lastContent->isText()) {
- // We can augment the existing string and share this ContentData node.
- String newStr = lastContent->text();
- newStr.append(s.get());
- lastContent->setText(newStr.impl());
- return;
- }
- }
-
- ContentData* newContentData = 0;
- if (reuseContent && content) {
- content->clear();
- newContentData = content.leakPtr();
- } else
- newContentData = new ContentData;
-
- if (lastContent && !reuseContent)
- lastContent->setNext(newContentData);
- else
- content.set(newContentData);
-
- newContentData->setText(s);
+ if (!image)
+ return;
+ prepareToSetContent(0, add)->setImage(image);
}
-void RenderStyle::setContent(CounterContent* c, bool add)
+void RenderStyle::setContent(PassRefPtr<StringImpl> string, bool add)
{
- if (!c)
+ if (!string)
return;
+ if (ContentData* data = prepareToSetContent(string.get(), add))
+ data->setText(string);
+}
- OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content;
- ContentData* lastContent = content.get();
- while (lastContent && lastContent->next())
- lastContent = lastContent->next();
-
- bool reuseContent = !add;
- ContentData* newContentData = 0;
- if (reuseContent && content) {
- content->clear();
- newContentData = content.leakPtr();
- } else
- newContentData = new ContentData;
-
- if (lastContent && !reuseContent)
- lastContent->setNext(newContentData);
- else
- content.set(newContentData);
-
- newContentData->setCounter(c);
+void RenderStyle::setContent(PassOwnPtr<CounterContent> counter, bool add)
+{
+ if (!counter)
+ return;
+ prepareToSetContent(0, add)->setCounter(counter);
}
void RenderStyle::applyTransform(TransformationMatrix& transform, const IntSize& borderBoxSize, ApplyTransformOrigin applyOrigin) const
@@ -774,21 +738,22 @@ static void constrainCornerRadiiForRect(const IntRect& r, IntSize& topLeft, IntS
void RenderStyle::getBorderRadiiForRect(const IntRect& r, IntSize& topLeft, IntSize& topRight, IntSize& bottomLeft, IntSize& bottomRight) const
{
- topLeft = surround->border.topLeft();
- topRight = surround->border.topRight();
+ topLeft = IntSize(surround->border.topLeft().width().calcValue(r.width()), surround->border.topLeft().height().calcValue(r.height()));
+ topRight = IntSize(surround->border.topRight().width().calcValue(r.width()), surround->border.topRight().height().calcValue(r.height()));
- bottomLeft = surround->border.bottomLeft();
- bottomRight = surround->border.bottomRight();
+ bottomLeft = IntSize(surround->border.bottomLeft().width().calcValue(r.width()), surround->border.bottomLeft().height().calcValue(r.height()));
+ bottomRight = IntSize(surround->border.bottomRight().width().calcValue(r.width()), surround->border.bottomRight().height().calcValue(r.height()));
constrainCornerRadiiForRect(r, topLeft, topRight, bottomLeft, bottomRight);
}
void RenderStyle::getInnerBorderRadiiForRectWithBorderWidths(const IntRect& innerRect, unsigned short topWidth, unsigned short bottomWidth, unsigned short leftWidth, unsigned short rightWidth, IntSize& innerTopLeft, IntSize& innerTopRight, IntSize& innerBottomLeft, IntSize& innerBottomRight) const
{
- innerTopLeft = surround->border.topLeft();
- innerTopRight = surround->border.topRight();
- innerBottomLeft = surround->border.bottomLeft();
- innerBottomRight = surround->border.bottomRight();
+ innerTopLeft = IntSize(surround->border.topLeft().width().calcValue(innerRect.width()), surround->border.topLeft().height().calcValue(innerRect.height()));
+ innerTopRight = IntSize(surround->border.topRight().width().calcValue(innerRect.width()), surround->border.topRight().height().calcValue(innerRect.height()));
+ innerBottomLeft = IntSize(surround->border.bottomLeft().width().calcValue(innerRect.width()), surround->border.bottomLeft().height().calcValue(innerRect.height()));
+ innerBottomRight = IntSize(surround->border.bottomRight().width().calcValue(innerRect.width()), surround->border.bottomRight().height().calcValue(innerRect.height()));
+
innerTopLeft.setWidth(max(0, innerTopLeft.width() - leftWidth));
innerTopLeft.setHeight(max(0, innerTopLeft.height() - topWidth));
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 1681890..e696735 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -35,7 +35,6 @@
#include "CSSPropertyNames.h"
#include "CSSReflectionDirection.h"
#include "CSSValueList.h"
-#include "CachedImage.h"
#include "CollapsedBorderValue.h"
#include "Color.h"
#include "ColorSpace.h"
@@ -103,7 +102,6 @@ using std::max;
class CSSStyleSelector;
class CSSValueList;
-class CachedImage;
class Pair;
class StyleImage;
@@ -178,7 +176,6 @@ protected:
(_white_space == other._white_space) &&
(_box_direction == other._box_direction) &&
(_visuallyOrdered == other._visuallyOrdered) &&
- (_htmlHacks == other._htmlHacks) &&
(_force_backgrounds_to_white == other._force_backgrounds_to_white) &&
(_pointerEvents == other._pointerEvents) &&
(_insideLink == other._insideLink);
@@ -203,7 +200,6 @@ protected:
// non CSS2 inherited
bool _visuallyOrdered : 1;
- bool _htmlHacks : 1;
bool _force_backgrounds_to_white : 1;
unsigned _pointerEvents : 4; // EPointerEvents
unsigned _insideLink : 2; // EInsideLink
@@ -279,7 +275,6 @@ protected:
inherited_flags._border_collapse = initialBorderCollapse();
inherited_flags._white_space = initialWhiteSpace();
inherited_flags._visuallyOrdered = initialVisuallyOrdered();
- inherited_flags._htmlHacks=false;
inherited_flags._box_direction = initialBoxDirection();
inherited_flags._force_backgrounds_to_white = false;
inherited_flags._pointerEvents = initialPointerEvents();
@@ -348,6 +343,14 @@ public:
bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
bool hasAppearance() const { return appearance() != NoControlPart; }
+ bool hasBackground() const
+ {
+ Color color = visitedDependentColor(CSSPropertyBackgroundColor);
+ if (color.isValid() && color.alpha() > 0)
+ return true;
+ return hasBackgroundImage();
+ }
+
bool visuallyOrdered() const { return inherited_flags._visuallyOrdered; }
void setVisuallyOrdered(bool b) { inherited_flags._visuallyOrdered = b; }
@@ -390,10 +393,10 @@ public:
const NinePieceImage& borderImage() const { return surround->border.image(); }
- const IntSize& borderTopLeftRadius() const { return surround->border.topLeft(); }
- const IntSize& borderTopRightRadius() const { return surround->border.topRight(); }
- const IntSize& borderBottomLeftRadius() const { return surround->border.bottomLeft(); }
- const IntSize& borderBottomRightRadius() const { return surround->border.bottomRight(); }
+ const LengthSize& borderTopLeftRadius() const { return surround->border.topLeft(); }
+ const LengthSize& borderTopRightRadius() const { return surround->border.topRight(); }
+ const LengthSize& borderBottomLeftRadius() const { return surround->border.bottomLeft(); }
+ const LengthSize& borderBottomRightRadius() const { return surround->border.bottomRight(); }
bool hasBorderRadius() const { return surround->border.hasBorderRadius(); }
unsigned short borderLeftWidth() const { return surround->border.borderLeftWidth(); }
@@ -788,18 +791,23 @@ public:
void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_image, b) }
- void setBorderTopLeftRadius(const IntSize& s) { SET_VAR(surround, border.m_topLeft, s) }
- void setBorderTopRightRadius(const IntSize& s) { SET_VAR(surround, border.m_topRight, s) }
- void setBorderBottomLeftRadius(const IntSize& s) { SET_VAR(surround, border.m_bottomLeft, s) }
- void setBorderBottomRightRadius(const IntSize& s) { SET_VAR(surround, border.m_bottomRight, s) }
+ void setBorderTopLeftRadius(const LengthSize& s) { SET_VAR(surround, border.m_topLeft, s) }
+ void setBorderTopRightRadius(const LengthSize& s) { SET_VAR(surround, border.m_topRight, s) }
+ void setBorderBottomLeftRadius(const LengthSize& s) { SET_VAR(surround, border.m_bottomLeft, s) }
+ void setBorderBottomRightRadius(const LengthSize& s) { SET_VAR(surround, border.m_bottomRight, s) }
- void setBorderRadius(const IntSize& s)
+ void setBorderRadius(const LengthSize& s)
{
setBorderTopLeftRadius(s);
setBorderTopRightRadius(s);
setBorderBottomLeftRadius(s);
setBorderBottomRightRadius(s);
}
+ void setBorderRadius(const IntSize& s)
+ {
+ setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed)));
+ }
+
void getBorderRadiiForRect(const IntRect&, IntSize& topLeft, IntSize& topRight, IntSize& bottomLeft, IntSize& bottomRight) const;
void getInnerBorderRadiiForRectWithBorderWidths(const IntRect&, unsigned short topWidth,
@@ -914,7 +922,7 @@ public:
void setCounterReset(short v) { SET_VAR(rareNonInheritedData, m_counterReset, v) }
void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }
- void setListStyleImage(StyleImage* v) { if (inherited->list_style_image != v) inherited.access()->list_style_image = v; }
+ void setListStyleImage(PassRefPtr<StyleImage> v) { if (inherited->list_style_image != v) inherited.access()->list_style_image = v; }
void setListStylePosition(EListStylePosition v) { inherited_flags._list_style_position = v; }
void resetMargin() { SET_VAR(surround, margin, LengthBox(Fixed)) }
@@ -931,7 +939,7 @@ public:
void setPaddingRight(Length v) { SET_VAR(surround, padding.m_right, v) }
void setCursor(ECursor c) { inherited_flags._cursor_style = c; }
- void addCursor(CachedImage*, const IntPoint& = IntPoint());
+ void addCursor(PassRefPtr<StyleImage>, const IntPoint& hotSpot = IntPoint());
void setCursorList(PassRefPtr<CursorList>);
void clearCursorList();
@@ -941,9 +949,6 @@ public:
bool forceBackgroundsToWhite() const { return inherited_flags._force_backgrounds_to_white; }
void setForceBackgroundsToWhite(bool b=true) { inherited_flags._force_backgrounds_to_white = b; }
- bool htmlHacks() const { return inherited_flags._htmlHacks; }
- void setHtmlHacks(bool b=true) { inherited_flags._htmlHacks = b; }
-
bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); }
void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_box, m_zIndex, 0) }
int zIndex() const { return m_box->zIndex(); }
@@ -1091,7 +1096,7 @@ public:
void clearContent();
void setContent(PassRefPtr<StringImpl>, bool add = false);
void setContent(PassRefPtr<StyleImage>, bool add = false);
- void setContent(CounterContent*, bool add = false);
+ void setContent(PassOwnPtr<CounterContent>, bool add = false);
const CounterDirectiveMap* counterDirectives() const;
CounterDirectiveMap& accessCounterDirectives();
@@ -1153,7 +1158,7 @@ public:
static bool initialBorderCollapse() { return false; }
static EBorderStyle initialBorderStyle() { return BNONE; }
static NinePieceImage initialNinePieceImage() { return NinePieceImage(); }
- static IntSize initialBorderRadius() { return IntSize(0, 0); }
+ static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed), Length(0, Fixed)); }
static ECaptionSide initialCaptionSide() { return CAPTOP; }
static EClear initialClear() { return CNONE; }
static TextDirection initialDirection() { return LTR; }
@@ -1281,6 +1286,8 @@ private:
const Color& textStrokeColor() const { return rareInheritedData->textStrokeColor; }
const Color colorIncludingFallback(int colorProperty, EBorderStyle borderStyle) const;
+
+ ContentData* prepareToSetContent(StringImpl*, bool add);
};
} // namespace WebCore
diff --git a/WebCore/rendering/style/RenderStyleConstants.h b/WebCore/rendering/style/RenderStyleConstants.h
index 70b128b..68c8113 100644
--- a/WebCore/rendering/style/RenderStyleConstants.h
+++ b/WebCore/rendering/style/RenderStyleConstants.h
@@ -79,6 +79,7 @@ enum PseudoId {
METER_HORIZONTAL_BAR, METER_HORIZONTAL_OPTIMUM, METER_HORIZONTAL_SUBOPTIMAL, METER_HORIZONTAL_EVEN_LESS_GOOD,
METER_VERTICAL_BAR, METER_VERTICAL_OPTIMUM, METER_VERTICAL_SUBOPTIMAL, METER_VERTICAL_EVEN_LESS_GOOD,
AFTER_LAST_INTERNAL_PSEUDOID,
+ FULL_SCREEN, FULL_SCREEN_DOCUMENT,
FIRST_PUBLIC_PSEUDOID = FIRST_LINE,
FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON,
PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_PUBLIC_PSEUDOID) - 1)
@@ -276,6 +277,8 @@ enum EListStyleType {
EthiopicAbegedeTiEt,
UpperGreek,
UpperNorwegian,
+ Asterisks,
+ Footnotes,
Hebrew,
Armenian,
Georgian,
diff --git a/WebCore/rendering/style/SVGRenderStyle.cpp b/WebCore/rendering/style/SVGRenderStyle.cpp
index dc8a5af..7d1ad3b 100644
--- a/WebCore/rendering/style/SVGRenderStyle.cpp
+++ b/WebCore/rendering/style/SVGRenderStyle.cpp
@@ -162,6 +162,10 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
|| svg_inherited_flags._joinStyle != other->svg_inherited_flags._joinStyle)
return StyleDifferenceLayout;
+ // Shadow changes require relayouts, as they affect the repaint rects.
+ if (shadowSVG != other->shadowSVG)
+ return StyleDifferenceLayout;
+
// Some stroke properties, requires relayouts, as the cached stroke boundaries need to be recalculated.
if (stroke != other->stroke) {
if (stroke->width != other->stroke->width
@@ -178,10 +182,6 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
// NOTE: All comparisions below may only return StyleDifferenceRepaint
- // Shadow changes need to cause repaints.
- if (shadowSVG != other->shadowSVG)
- return StyleDifferenceRepaint;
-
// Painting related properties only need repaints.
if (miscNotEqual) {
if (misc->floodColor != other->misc->floodColor
@@ -215,48 +215,6 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
return StyleDifferenceEqual;
}
-static void getSVGShadowExtent(ShadowData* shadow, float& top, float& right, float& bottom, float& left)
-{
- top = 0.0f;
- right = 0.0f;
- bottom = 0.0f;
- left = 0.0f;
-
- float blurAndSpread = shadow->blur() + shadow->spread();
-
- top = min(top, shadow->y() - blurAndSpread);
- right = max(right, shadow->x() + blurAndSpread);
- bottom = max(bottom, shadow->y() + blurAndSpread);
- left = min(left, shadow->x() - blurAndSpread);
-}
-
-void SVGRenderStyle::inflateForShadow(IntRect& repaintRect) const
-{
- ShadowData* svgShadow = shadow();
- if (!svgShadow)
- return;
-
- FloatRect repaintFloatRect = FloatRect(repaintRect);
- inflateForShadow(repaintFloatRect);
- repaintRect = enclosingIntRect(repaintFloatRect);
-}
-
-void SVGRenderStyle::inflateForShadow(FloatRect& repaintRect) const
-{
- ShadowData* svgShadow = shadow();
- if (!svgShadow)
- return;
-
- float shadowTop;
- float shadowRight;
- float shadowBottom;
- float shadowLeft;
- getSVGShadowExtent(svgShadow, shadowTop, shadowRight, shadowBottom, shadowLeft);
-
- repaintRect.move(shadowLeft, shadowTop);
- repaintRect.setSize(repaintRect.size() + FloatSize(shadowRight - shadowLeft, shadowBottom - shadowTop));
-}
-
}
#endif // ENABLE(SVG)
diff --git a/WebCore/rendering/style/SVGRenderStyle.h b/WebCore/rendering/style/SVGRenderStyle.h
index f071755..d57e4cf 100644
--- a/WebCore/rendering/style/SVGRenderStyle.h
+++ b/WebCore/rendering/style/SVGRenderStyle.h
@@ -47,10 +47,6 @@ public:
bool inheritedNotEqual(const SVGRenderStyle*) const;
void inheritFrom(const SVGRenderStyle*);
- // FIXME: These functions should move to ShadowData.
- void inflateForShadow(IntRect&) const;
- void inflateForShadow(FloatRect&) const;
-
StyleDifference diff(const SVGRenderStyle*) const;
bool operator==(const SVGRenderStyle&) const;
diff --git a/WebCore/rendering/style/ShadowData.cpp b/WebCore/rendering/style/ShadowData.cpp
index d4569d0..3a8f81d 100644
--- a/WebCore/rendering/style/ShadowData.cpp
+++ b/WebCore/rendering/style/ShadowData.cpp
@@ -22,6 +22,11 @@
#include "config.h"
#include "ShadowData.h"
+#include "FloatRect.h"
+#include "IntRect.h"
+
+using namespace std;
+
namespace WebCore {
ShadowData::ShadowData(const ShadowData& o)
@@ -44,4 +49,45 @@ bool ShadowData::operator==(const ShadowData& o) const
return m_x == o.m_x && m_y == o.m_y && m_blur == o.m_blur && m_spread == o.m_spread && m_style == o.m_style && m_color == o.m_color;
}
+static inline void calculateShadowExtent(const ShadowData* shadow, int additionalOutlineSize, int& shadowLeft, int& shadowRight, int& shadowTop, int& shadowBottom)
+{
+ do {
+ int blurAndSpread = shadow->blur() + shadow->spread() + additionalOutlineSize;
+ if (shadow->style() == Normal) {
+ shadowLeft = min(shadow->x() - blurAndSpread, shadowLeft);
+ shadowRight = max(shadow->x() + blurAndSpread, shadowRight);
+ shadowTop = min(shadow->y() - blurAndSpread, shadowTop);
+ shadowBottom = max(shadow->y() + blurAndSpread, shadowBottom);
+ }
+
+ shadow = shadow->next();
+ } while (shadow);
+}
+
+void ShadowData::adjustRectForShadow(IntRect& rect, int additionalOutlineSize) const
+{
+ int shadowLeft = 0;
+ int shadowRight = 0;
+ int shadowTop = 0;
+ int shadowBottom = 0;
+ calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom);
+
+ rect.move(shadowLeft, shadowTop);
+ rect.setWidth(rect.width() - shadowLeft + shadowRight);
+ rect.setHeight(rect.height() - shadowTop + shadowBottom);
+}
+
+void ShadowData::adjustRectForShadow(FloatRect& rect, int additionalOutlineSize) const
+{
+ int shadowLeft = 0;
+ int shadowRight = 0;
+ int shadowTop = 0;
+ int shadowBottom = 0;
+ calculateShadowExtent(this, additionalOutlineSize, shadowLeft, shadowRight, shadowTop, shadowBottom);
+
+ rect.move(shadowLeft, shadowTop);
+ rect.setWidth(rect.width() - shadowLeft + shadowRight);
+ rect.setHeight(rect.height() - shadowTop + shadowBottom);
+}
+
} // namespace WebCore
diff --git a/WebCore/rendering/style/ShadowData.h b/WebCore/rendering/style/ShadowData.h
index 9252e13..ca83af0 100644
--- a/WebCore/rendering/style/ShadowData.h
+++ b/WebCore/rendering/style/ShadowData.h
@@ -30,6 +30,9 @@
namespace WebCore {
+class FloatRect;
+class IntRect;
+
enum ShadowStyle { Normal, Inset };
// This struct holds information about shadows for the text-shadow and box-shadow properties.
@@ -76,6 +79,9 @@ public:
const ShadowData* next() const { return m_next; }
void setNext(ShadowData* shadow) { m_next = shadow; }
+ void adjustRectForShadow(IntRect&, int additionalOutlineSize = 0) const;
+ void adjustRectForShadow(FloatRect&, int additionalOutlineSize = 0) const;
+
private:
int m_x;
int m_y;
diff --git a/WebCore/rendering/style/StyleCachedImage.cpp b/WebCore/rendering/style/StyleCachedImage.cpp
index b55c5b9..1d7aba8 100644
--- a/WebCore/rendering/style/StyleCachedImage.cpp
+++ b/WebCore/rendering/style/StyleCachedImage.cpp
@@ -29,7 +29,7 @@
namespace WebCore {
-PassRefPtr<CSSValue> StyleCachedImage::cssValue()
+PassRefPtr<CSSValue> StyleCachedImage::cssValue() const
{
return CSSPrimitiveValue::create(m_image->url(), CSSPrimitiveValue::CSS_URI);
}
diff --git a/WebCore/rendering/style/StyleCachedImage.h b/WebCore/rendering/style/StyleCachedImage.h
index 3d22868..3d6e1a2 100644
--- a/WebCore/rendering/style/StyleCachedImage.h
+++ b/WebCore/rendering/style/StyleCachedImage.h
@@ -38,7 +38,7 @@ public:
virtual bool isCachedImage() const { return true; }
- virtual PassRefPtr<CSSValue> cssValue();
+ virtual PassRefPtr<CSSValue> cssValue() const;
CachedImage* cachedImage() const { return m_image.get(); }
diff --git a/WebCore/rendering/style/StyleGeneratedImage.cpp b/WebCore/rendering/style/StyleGeneratedImage.cpp
index 610e73d..2322f5f 100644
--- a/WebCore/rendering/style/StyleGeneratedImage.cpp
+++ b/WebCore/rendering/style/StyleGeneratedImage.cpp
@@ -29,7 +29,7 @@
namespace WebCore {
-PassRefPtr<CSSValue> StyleGeneratedImage::cssValue()
+PassRefPtr<CSSValue> StyleGeneratedImage::cssValue() const
{
return m_generator;
}
diff --git a/WebCore/rendering/style/StyleGeneratedImage.h b/WebCore/rendering/style/StyleGeneratedImage.h
index 532e383..7be1f6a 100644
--- a/WebCore/rendering/style/StyleGeneratedImage.h
+++ b/WebCore/rendering/style/StyleGeneratedImage.h
@@ -42,7 +42,7 @@ public:
virtual bool isGeneratedImage() const { return true; }
- virtual PassRefPtr<CSSValue> cssValue();
+ virtual PassRefPtr<CSSValue> cssValue() const;
virtual IntSize imageSize(const RenderObject*, float multiplier) const;
virtual bool imageHasRelativeWidth() const { return !m_fixedSize; }
diff --git a/WebCore/rendering/style/StyleImage.h b/WebCore/rendering/style/StyleImage.h
index cb90288..ead8d4a 100644
--- a/WebCore/rendering/style/StyleImage.h
+++ b/WebCore/rendering/style/StyleImage.h
@@ -24,6 +24,7 @@
#ifndef StyleImage_h
#define StyleImage_h
+#include "CSSValue.h"
#include "IntSize.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -41,12 +42,12 @@ class StyleImage : public RefCounted<StyleImage> {
public:
virtual ~StyleImage() { }
- bool operator==(const StyleImage& other)
+ bool operator==(const StyleImage& other) const
{
return data() == other.data();
}
-
- virtual PassRefPtr<CSSValue> cssValue() = 0;
+
+ virtual PassRefPtr<CSSValue> cssValue() const = 0;
virtual bool canRender(float /*multiplier*/) const { return true; }
virtual bool isLoaded() const { return true; }
@@ -60,7 +61,9 @@ public:
virtual void removeClient(RenderObject*) = 0;
virtual Image* image(RenderObject*, const IntSize&) const = 0;
virtual WrappedImagePtr data() const = 0;
+
virtual bool isCachedImage() const { return false; }
+ virtual bool isPendingImage() const { return false; }
virtual bool isGeneratedImage() const { return false; }
static bool imagesEquivalent(StyleImage* image1, StyleImage* image2)
diff --git a/WebCore/rendering/style/StylePendingImage.h b/WebCore/rendering/style/StylePendingImage.h
new file mode 100644
index 0000000..b0c9b01
--- /dev/null
+++ b/WebCore/rendering/style/StylePendingImage.h
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+#ifndef StylePendingImage_h
+#define StylePendingImage_h
+
+#include "StyleImage.h"
+
+namespace WebCore {
+
+// StylePendingImage is a placeholder StyleImage that is entered into the RenderStyle during
+// style resolution, in order to avoid loading images that are not referenced by the final style.
+// They should never exist in a RenderStyle after it has been returned from the style selector.
+
+class StylePendingImage : public StyleImage {
+public:
+ static PassRefPtr<StylePendingImage> create(CSSImageValue* value) { return adoptRef(new StylePendingImage(value)); }
+
+ virtual WrappedImagePtr data() const { return m_value; }
+
+ virtual bool isPendingImage() const { return true; }
+
+ virtual PassRefPtr<CSSValue> cssValue() const { return m_value; }
+ CSSImageValue* cssImageValue() const { return m_value; }
+
+ virtual IntSize imageSize(const RenderObject*, float /*multiplier*/) const { return IntSize(); }
+ virtual bool imageHasRelativeWidth() const { return false; }
+ virtual bool imageHasRelativeHeight() const { return false; }
+ virtual bool usesImageContainerSize() const { return false; }
+ virtual void setImageContainerSize(const IntSize&) { }
+ virtual void addClient(RenderObject*) { }
+ virtual void removeClient(RenderObject*) { }
+ virtual Image* image(RenderObject*, const IntSize&) const
+ {
+ ASSERT_NOT_REACHED();
+ return 0;
+ }
+
+private:
+ StylePendingImage(CSSImageValue* value)
+ : m_value(value)
+ {
+ }
+
+ CSSImageValue* m_value; // Not retained; it owns us.
+};
+
+}
+#endif
diff --git a/WebCore/storage/IDBCursor.cpp b/WebCore/storage/IDBCursor.cpp
index de752f5..ae0d127 100644
--- a/WebCore/storage/IDBCursor.cpp
+++ b/WebCore/storage/IDBCursor.cpp
@@ -59,7 +59,7 @@ PassRefPtr<IDBKey> IDBCursor::key() const
PassRefPtr<IDBAny> IDBCursor::value() const
{
- return m_backend->value();
+ return IDBAny::create(m_backend->value().get());
}
PassRefPtr<IDBRequest> IDBCursor::update(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value)
diff --git a/WebCore/storage/IDBCursorBackendImpl.cpp b/WebCore/storage/IDBCursorBackendImpl.cpp
index d3298b3..4cbac0e 100644
--- a/WebCore/storage/IDBCursorBackendImpl.cpp
+++ b/WebCore/storage/IDBCursorBackendImpl.cpp
@@ -28,23 +28,26 @@
#if ENABLE(INDEXED_DATABASE)
-#include "IDBAny.h"
#include "IDBCallbacks.h"
+#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseError.h"
+#include "IDBDatabaseException.h"
#include "IDBKeyRange.h"
#include "IDBObjectStoreBackendImpl.h"
#include "IDBRequest.h"
#include "SQLiteDatabase.h"
+#include "SQLiteStatement.h"
#include "SerializedScriptValue.h"
namespace WebCore {
-IDBCursorBackendImpl::IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl> idbObjectStore, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassRefPtr<IDBKey> key, PassRefPtr<SerializedScriptValue> value)
+IDBCursorBackendImpl::IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl> idbObjectStore, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query)
: m_idbObjectStore(idbObjectStore)
, m_keyRange(keyRange)
, m_direction(direction)
- , m_key(key)
- , m_value(IDBAny::create(value.get()))
+ , m_query(query)
{
+ loadCurrentRow();
}
IDBCursorBackendImpl::~IDBCursorBackendImpl()
@@ -58,30 +61,106 @@ unsigned short IDBCursorBackendImpl::direction() const
PassRefPtr<IDBKey> IDBCursorBackendImpl::key() const
{
- return m_key;
+
+ return m_currentKey;
}
-PassRefPtr<IDBAny> IDBCursorBackendImpl::value() const
+PassRefPtr<SerializedScriptValue> IDBCursorBackendImpl::value() const
{
- return m_value;
+ return m_currentValue;
}
-void IDBCursorBackendImpl::update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>)
+void IDBCursorBackendImpl::update(PassRefPtr<SerializedScriptValue> prpValue, PassRefPtr<IDBCallbacks> callbacks)
{
- // FIXME: Implement this method.
- ASSERT_NOT_REACHED();
+ RefPtr<SerializedScriptValue> value = prpValue;
+
+ if (!m_query || m_currentId == InvalidId) {
+ // FIXME: Use the proper error code when it's specced.
+ callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Operation not possible."));
+ return;
+ }
+
+ String sql = "UPDATE ObjectStoreData SET value = ? WHERE id = ?";
+ SQLiteStatement updateQuery(m_idbObjectStore->database()->sqliteDatabase(), sql);
+
+ bool ok = updateQuery.prepare() == SQLResultOk;
+ ASSERT_UNUSED(ok, ok); // FIXME: Better error handling.
+ updateQuery.bindText(1, value->toWireString());
+ updateQuery.bindInt64(2, m_currentId);
+ ok = updateQuery.step() == SQLResultDone;
+ ASSERT_UNUSED(ok, ok); // FIXME: Better error handling.
+
+ m_currentValue = value.release();
+ callbacks->onSuccess();
+}
+
+void IDBCursorBackendImpl::continueFunction(PassRefPtr<IDBKey> prpKey, PassRefPtr<IDBCallbacks> callbacks)
+{
+ RefPtr<IDBKey> key = prpKey;
+ while (true) {
+ if (!m_query || m_query->step() != SQLResultRow) {
+ m_query = 0;
+ m_currentId = InvalidId;
+ m_currentKey = 0;
+ m_currentValue = 0;
+ callbacks->onSuccess();
+ return;
+ }
+
+ RefPtr<IDBKey> oldKey = m_currentKey;
+ loadCurrentRow();
+
+ // If a key was supplied, we must loop until we find that key (or hit the end).
+ if (key && !key->isEqual(m_currentKey.get()))
+ continue;
+
+ // If we don't have a uniqueness constraint, we can stop now.
+ if (m_direction == IDBCursor::NEXT || m_direction == IDBCursor::PREV)
+ break;
+ if (!m_currentKey->isEqual(oldKey.get()))
+ break;
+ }
+
+ callbacks->onSuccess(this);
}
-void IDBCursorBackendImpl::continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>)
+void IDBCursorBackendImpl::remove(PassRefPtr<IDBCallbacks> callbacks)
{
- // FIXME: Implement this method.
- ASSERT_NOT_REACHED();
+ if (!m_query || m_currentId == InvalidId) {
+ // FIXME: Use the proper error code when it's specced.
+ callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Operation not possible."));
+ return;
+ }
+
+ String sql = "DELETE FROM ObjectStoreData WHERE id = ?";
+ SQLiteStatement deleteQuery(m_idbObjectStore->database()->sqliteDatabase(), sql);
+
+ bool ok = deleteQuery.prepare() == SQLResultOk;
+ ASSERT_UNUSED(ok, ok); // FIXME: Better error handling.
+ deleteQuery.bindInt64(1, m_currentId);
+ ok = deleteQuery.step() == SQLResultDone;
+ ASSERT_UNUSED(ok, ok); // FIXME: Better error handling.
+
+ m_currentId = InvalidId;
+ m_currentKey = 0;
+ m_currentValue = 0;
+ callbacks->onSuccess();
}
-void IDBCursorBackendImpl::remove(PassRefPtr<IDBCallbacks>)
+void IDBCursorBackendImpl::loadCurrentRow()
{
- // FIXME: Implement this method.
- ASSERT_NOT_REACHED();
+ // The column numbers depend on the query in IDBObjectStoreBackendImpl::openCursor.
+ m_currentId = m_query->getColumnInt64(0);
+ if (!m_query->isColumnNull(1))
+ m_currentKey = IDBKey::create(m_query->getColumnText(1));
+ else if (!m_query->isColumnNull(2)) {
+ ASSERT_NOT_REACHED(); // FIXME: Implement date.
+ m_currentKey = IDBKey::create();
+ } else if (!m_query->isColumnNull(3))
+ m_currentKey = IDBKey::create(m_query->getColumnInt(3));
+ else
+ m_currentKey = IDBKey::create();
+ m_currentValue = SerializedScriptValue::createFromWire(m_query->getColumnText(4));
}
} // namespace WebCore
diff --git a/WebCore/storage/IDBCursorBackendImpl.h b/WebCore/storage/IDBCursorBackendImpl.h
index 9ef62fe..3f7c4aa 100644
--- a/WebCore/storage/IDBCursorBackendImpl.h
+++ b/WebCore/storage/IDBCursorBackendImpl.h
@@ -31,37 +31,46 @@
#include "IDBCursor.h"
#include "IDBCursorBackendInterface.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
class IDBKeyRange;
class IDBObjectStoreBackendImpl;
+class SQLiteStatement;
class SerializedScriptValue;
class IDBCursorBackendImpl : public IDBCursorBackendInterface {
public:
- static PassRefPtr<IDBCursorBackendImpl> create(PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassRefPtr<IDBKey> key, PassRefPtr<SerializedScriptValue> value)
+ static PassRefPtr<IDBCursorBackendImpl> create(PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query)
{
- return adoptRef(new IDBCursorBackendImpl(objectStore, keyRange, direction, key, value));
+ return adoptRef(new IDBCursorBackendImpl(objectStore, keyRange, direction, query));
}
virtual ~IDBCursorBackendImpl();
virtual unsigned short direction() const;
virtual PassRefPtr<IDBKey> key() const;
- virtual PassRefPtr<IDBAny> value() const;
+ virtual PassRefPtr<SerializedScriptValue> value() const;
virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>);
virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
virtual void remove(PassRefPtr<IDBCallbacks>);
private:
- IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassRefPtr<IDBKey>, PassRefPtr<SerializedScriptValue>);
+ IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassOwnPtr<SQLiteStatement> query);
+
+ void loadCurrentRow();
+
+ static const int64_t InvalidId = -1;
RefPtr<IDBObjectStoreBackendImpl> m_idbObjectStore;
RefPtr<IDBKeyRange> m_keyRange;
IDBCursor::Direction m_direction;
- RefPtr<IDBKey> m_key;
- RefPtr<IDBAny> m_value;
+ OwnPtr<SQLiteStatement> m_query;
+ int64_t m_currentId;
+ RefPtr<IDBKey> m_currentKey;
+ RefPtr<SerializedScriptValue> m_currentValue;
};
} // namespace WebCore
diff --git a/WebCore/storage/IDBCursorBackendInterface.h b/WebCore/storage/IDBCursorBackendInterface.h
index 4b209c4..acea955 100644
--- a/WebCore/storage/IDBCursorBackendInterface.h
+++ b/WebCore/storage/IDBCursorBackendInterface.h
@@ -46,7 +46,7 @@ public:
virtual unsigned short direction() const = 0;
virtual PassRefPtr<IDBKey> key() const = 0;
- virtual PassRefPtr<IDBAny> value() const = 0;
+ virtual PassRefPtr<SerializedScriptValue> value() const = 0;
virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>) = 0;
virtual void continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>) = 0;
diff --git a/WebCore/storage/IDBDatabase.cpp b/WebCore/storage/IDBDatabase.cpp
index 78a6646..81950d6 100644
--- a/WebCore/storage/IDBDatabase.cpp
+++ b/WebCore/storage/IDBDatabase.cpp
@@ -69,6 +69,13 @@ PassRefPtr<IDBRequest> IDBDatabase::removeObjectStore(ScriptExecutionContext* co
return request;
}
+PassRefPtr<IDBRequest> IDBDatabase::setVersion(ScriptExecutionContext* context, const String& version)
+{
+ RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this));
+ m_backend->setVersion(version, request);
+ return request;
+}
+
PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
{
// We need to create a new transaction synchronously. Locks are acquired asynchronously. Operations
diff --git a/WebCore/storage/IDBDatabase.h b/WebCore/storage/IDBDatabase.h
index 0e83288..dc70114 100644
--- a/WebCore/storage/IDBDatabase.h
+++ b/WebCore/storage/IDBDatabase.h
@@ -58,8 +58,10 @@ public:
PassRefPtr<IDBRequest> createObjectStore(ScriptExecutionContext*, const String& name, const String& keyPath = String(), bool autoIncrement = false);
PassRefPtr<IDBObjectStore> objectStore(const String& name, unsigned short mode = IDBTransaction::READ_ONLY);
PassRefPtr<IDBRequest> removeObjectStore(ScriptExecutionContext*, const String& name);
+ PassRefPtr<IDBRequest> setVersion(ScriptExecutionContext*, const String& version);
PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, DOMStringList* storeNames = 0, unsigned short mode = IDBTransaction::READ_ONLY,
unsigned long timeout = 0); // FIXME: what should the default timeout be?
+
private:
IDBDatabase(PassRefPtr<IDBDatabaseBackendInterface>);
diff --git a/WebCore/storage/IDBDatabase.idl b/WebCore/storage/IDBDatabase.idl
index 51bbafb..347b3a7 100644
--- a/WebCore/storage/IDBDatabase.idl
+++ b/WebCore/storage/IDBDatabase.idl
@@ -32,13 +32,14 @@ module storage {
readonly attribute DOMString version;
readonly attribute DOMStringList objectStores;
- // FIXME: Add setVersion.
[CallWith=ScriptExecutionContext] IDBRequest createObjectStore(in DOMString name, in [Optional, ConvertNullToNullString] DOMString keyPath, in [Optional] boolean autoIncrement);
// FIXME: objectStore needs to be able to raise an IDBDatabaseException.
IDBObjectStore objectStore(in DOMString name, in [Optional] unsigned short mode);
[CallWith=ScriptExecutionContext] IDBRequest removeObjectStore(in DOMString name);
+ [CallWith=ScriptExecutionContext] IDBRequest setVersion(in DOMString version);
[CallWith=ScriptExecutionContext] IDBTransaction transaction (in [Optional] DOMStringList storeNames, in [Optional] unsigned short mode, in [Optional] unsigned long timeout);
+ // FIXME: Add close.
};
}
diff --git a/WebCore/storage/IDBDatabaseBackendImpl.cpp b/WebCore/storage/IDBDatabaseBackendImpl.cpp
index 23bc44e..f4f2934 100644
--- a/WebCore/storage/IDBDatabaseBackendImpl.cpp
+++ b/WebCore/storage/IDBDatabaseBackendImpl.cpp
@@ -185,6 +185,13 @@ void IDBDatabaseBackendImpl::removeObjectStore(const String& name, PassRefPtr<ID
callbacks->onSuccess();
}
+void IDBDatabaseBackendImpl::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_version = version;
+ setMetaData(m_sqliteDatabase.get(), m_name, m_description, m_version);
+ callbacks->onSuccess();
+}
+
PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseBackendImpl::transaction(DOMStringList* objectStores, unsigned short mode, unsigned long timeout)
{
return m_transactionCoordinator->createTransaction(objectStores, mode, timeout, this);
diff --git a/WebCore/storage/IDBDatabaseBackendImpl.h b/WebCore/storage/IDBDatabaseBackendImpl.h
index 3540b21..ab055f8 100644
--- a/WebCore/storage/IDBDatabaseBackendImpl.h
+++ b/WebCore/storage/IDBDatabaseBackendImpl.h
@@ -59,7 +59,9 @@ public:
virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
+ virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout);
+
private:
IDBDatabaseBackendImpl(const String& name, const String& description, PassOwnPtr<SQLiteDatabase> database, IDBTransactionCoordinator*);
diff --git a/WebCore/storage/IDBDatabaseBackendInterface.h b/WebCore/storage/IDBDatabaseBackendInterface.h
index 9e35369..a2e042a 100644
--- a/WebCore/storage/IDBDatabaseBackendInterface.h
+++ b/WebCore/storage/IDBDatabaseBackendInterface.h
@@ -54,12 +54,12 @@ public:
virtual String version() const = 0;
virtual PassRefPtr<DOMStringList> objectStores() const = 0;
- // FIXME: Add transaction and setVersion.
-
virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>) = 0;
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode) = 0;
virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>) = 0;
+ virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>) = 0;
virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout) = 0;
+ // FIXME: Add close.
};
} // namespace WebCore
diff --git a/WebCore/storage/IDBKey.cpp b/WebCore/storage/IDBKey.cpp
index 8ec5dfd..50c4c46 100644
--- a/WebCore/storage/IDBKey.cpp
+++ b/WebCore/storage/IDBKey.cpp
@@ -53,6 +53,25 @@ IDBKey::~IDBKey()
{
}
+bool IDBKey::isEqual(IDBKey* other)
+{
+ if (!other || other->m_type != m_type)
+ return false;
+
+ switch (m_type) {
+ case StringType:
+ return other->m_string == m_string;
+ // FIXME: Implement dates.
+ case NumberType:
+ return other->m_number == m_number;
+ case NullType:
+ return true;
+ }
+
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
} // namespace WebCore
#endif
diff --git a/WebCore/storage/IDBKey.h b/WebCore/storage/IDBKey.h
index a84ea6a..228b4a4 100644
--- a/WebCore/storage/IDBKey.h
+++ b/WebCore/storage/IDBKey.h
@@ -71,6 +71,8 @@ public:
return m_number;
}
+ bool isEqual(IDBKey* other);
+
private:
IDBKey();
explicit IDBKey(int32_t);
diff --git a/WebCore/storage/IDBKeyPathBackendImpl.cpp b/WebCore/storage/IDBKeyPathBackendImpl.cpp
index 6cc9be5..b7c45c3 100644
--- a/WebCore/storage/IDBKeyPathBackendImpl.cpp
+++ b/WebCore/storage/IDBKeyPathBackendImpl.cpp
@@ -30,7 +30,11 @@
#error "Chromium should not compile this file and instead define its own version of this factory that navigates the multi-process boundry."
#endif
+#if ENABLE(INDEXED_DATABASE)
+
void IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue>&, 0> values, const String& keyPath, Vector<RefPtr<IDBKey>, 0>& keys)
{
// FIXME: Implement this method once JSC supports WireFormat for SerializedScriptValue.
}
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBKeyRange.cpp b/WebCore/storage/IDBKeyRange.cpp
index dfcae19..4088b34 100644
--- a/WebCore/storage/IDBKeyRange.cpp
+++ b/WebCore/storage/IDBKeyRange.cpp
@@ -47,18 +47,27 @@ PassRefPtr<IDBKeyRange> IDBKeyRange::only(PassRefPtr<IDBKey> prpValue)
PassRefPtr<IDBKeyRange> IDBKeyRange::leftBound(PassRefPtr<IDBKey> bound, bool open)
{
- return IDBKeyRange::create(bound, IDBKey::create(), open ? IDBKeyRange::LEFT_OPEN : IDBKeyRange::LEFT_BOUND);
+ unsigned short flags = IDBKeyRange::LEFT_BOUND;
+ if (open)
+ flags |= IDBKeyRange::LEFT_OPEN;
+ return IDBKeyRange::create(bound, IDBKey::create(), flags);
}
PassRefPtr<IDBKeyRange> IDBKeyRange::rightBound(PassRefPtr<IDBKey> bound, bool open)
{
- return IDBKeyRange::create(IDBKey::create(), bound, open ? IDBKeyRange::RIGHT_OPEN : IDBKeyRange::RIGHT_BOUND);
+ unsigned short flags = IDBKeyRange::RIGHT_BOUND;
+ if (open)
+ flags |= IDBKeyRange::RIGHT_OPEN;
+ return IDBKeyRange::create(IDBKey::create(), bound, flags);
}
PassRefPtr<IDBKeyRange> IDBKeyRange::bound(PassRefPtr<IDBKey> left, PassRefPtr<IDBKey> right, bool openLeft, bool openRight)
{
- unsigned short flags = openLeft ? IDBKeyRange::LEFT_OPEN : IDBKeyRange::LEFT_BOUND;
- flags |= openRight ? IDBKeyRange::RIGHT_OPEN : IDBKeyRange::RIGHT_BOUND;
+ unsigned short flags = IDBKeyRange::LEFT_BOUND | IDBKeyRange::RIGHT_BOUND;
+ if (openLeft)
+ flags |= IDBKeyRange::LEFT_OPEN;
+ if (openRight)
+ flags |= IDBKeyRange::RIGHT_OPEN;
return IDBKeyRange::create(left, right, flags);
}
diff --git a/WebCore/storage/IDBObjectStoreBackendImpl.cpp b/WebCore/storage/IDBObjectStoreBackendImpl.cpp
index 1b9b76b..aeb3ced 100755
--- a/WebCore/storage/IDBObjectStoreBackendImpl.cpp
+++ b/WebCore/storage/IDBObjectStoreBackendImpl.cpp
@@ -265,23 +265,89 @@ void IDBObjectStoreBackendImpl::removeIndex(const String& name, PassRefPtr<IDBCa
callbacks->onSuccess();
}
-void IDBObjectStoreBackendImpl::openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks)
+static String leftCursorWhereFragment(IDBKey::Type type, String comparisonOperator)
{
- // FIXME: Fully implement.
+ switch (type) {
+ case IDBKey::StringType:
+ return "? " + comparisonOperator + " keyString AND ";
+ // FIXME: Implement date.
+ case IDBKey::NumberType:
+ return "(? " + comparisonOperator + " keyNumber OR NOT keyString IS NULL OR NOT keyDate IS NULL) AND ";
+ case IDBKey::NullType:
+ if (comparisonOperator == "<")
+ return "NOT(keyString IS NULL AND keyDate IS NULL AND keyNumber IS NULL) AND ";
+ return ""; // If it's =, the upper bound half will do the constraining. If it's <=, then that's a no-op.
+ }
+ ASSERT_NOT_REACHED();
+ return "";
+}
- RefPtr<IDBKey> key = range->left();
- SQLiteStatement query(sqliteDatabase(), "SELECT id, value FROM ObjectStoreData " + whereClause(key->type()));
- bool ok = query.prepare() == SQLResultOk;
+static String rightCursorWhereFragment(IDBKey::Type type, String comparisonOperator)
+{
+ switch (type) {
+ case IDBKey::StringType:
+ return "(keyString " + comparisonOperator + " ? OR keyString IS NULL) AND ";
+ // FIXME: Implement date.
+ case IDBKey::NumberType:
+ return "(keyNumber " + comparisonOperator + " ? OR keyNumber IS NULL) AND keyString IS NULL AND keyDate IS NULL AND ";
+ case IDBKey::NullType:
+ if (comparisonOperator == "<")
+ return "0 != 0 AND ";
+ return "keyString IS NULL AND keyDate IS NULL AND keyNumber IS NULL AND ";
+ }
+ ASSERT_NOT_REACHED();
+ return "";
+}
+
+void IDBObjectStoreBackendImpl::openCursor(PassRefPtr<IDBKeyRange> range, unsigned short tmpDirection, PassRefPtr<IDBCallbacks> callbacks)
+{
+ String lowerEquality;
+ if (range->flags() & IDBKeyRange::LEFT_OPEN)
+ lowerEquality = "<";
+ else if (range->flags() & IDBKeyRange::LEFT_BOUND)
+ lowerEquality = "<=";
+ else
+ lowerEquality = "=";
+
+ String upperEquality;
+ if (range->flags() & IDBKeyRange::RIGHT_OPEN)
+ upperEquality = "<";
+ else if (range->flags() & IDBKeyRange::RIGHT_BOUND)
+ upperEquality = "<=";
+ else
+ upperEquality = "=";
+
+ // If you change the order of this select, you'll need to change it in IDBCursorBackendImpl.cpp as well.
+ String sql = "SELECT id, keyString, keyDate, keyNumber, value FROM ObjectStoreData WHERE ";
+ if (range->flags() & IDBKeyRange::LEFT_BOUND || range->flags() == IDBKeyRange::SINGLE)
+ sql += leftCursorWhereFragment(range->left()->type(), lowerEquality);
+ if (range->flags() & IDBKeyRange::RIGHT_BOUND || range->flags() == IDBKeyRange::SINGLE)
+ sql += rightCursorWhereFragment(range->right()->type(), upperEquality);
+ sql += "objectStoreId = ? ORDER BY ";
+
+ IDBCursor::Direction direction = static_cast<IDBCursor::Direction>(tmpDirection);
+ if (direction == IDBCursor::NEXT || direction == IDBCursor::NEXT_NO_DUPLICATE)
+ sql += "keyString, keyDate, keyNumber";
+ else
+ sql += "keyString DESC, keyDate DESC, keyNumber DESC";
+
+ OwnPtr<SQLiteStatement> query = adoptPtr(new SQLiteStatement(sqliteDatabase(), sql));
+ bool ok = query->prepare() == SQLResultOk;
ASSERT_UNUSED(ok, ok); // FIXME: Better error handling?
- bindWhereClause(query, m_id, key.get());
- if (query.step() != SQLResultRow) {
+ int currentColumn = 1;
+ if (range->flags() & IDBKeyRange::LEFT_BOUND || range->flags() == IDBKeyRange::SINGLE)
+ currentColumn += bindKey(*query, currentColumn, range->left().get());
+ if (range->flags() & IDBKeyRange::RIGHT_BOUND || range->flags() == IDBKeyRange::SINGLE)
+ currentColumn += bindKey(*query, currentColumn, range->right().get());
+ query->bindInt64(currentColumn, m_id);
+
+ if (query->step() != SQLResultRow) {
callbacks->onSuccess();
return;
}
- RefPtr<SerializedScriptValue> value = SerializedScriptValue::createFromWire(query.getColumnText(1));
- RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(this, range, static_cast<IDBCursor::Direction>(direction), key.release(), value.release());
+ RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(this, range, direction, query.release());
callbacks->onSuccess(cursor.release());
}
diff --git a/WebCore/svg/SVGAElement.cpp b/WebCore/svg/SVGAElement.cpp
index a2a4e73..b0ffc74 100644
--- a/WebCore/svg/SVGAElement.cpp
+++ b/WebCore/svg/SVGAElement.cpp
@@ -45,17 +45,14 @@
namespace WebCore {
-SVGAElement::SVGAElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGURIReference()
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGAElement::~SVGAElement()
+PassRefPtr<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAElement(tagName, document));
}
String SVGAElement::title() const
@@ -222,7 +219,7 @@ bool SVGAElement::childShouldCreateRenderer(Node* child) const
if (child->hasTagName(SVGNames::aTag))
return false;
if (parent() && parent()->isSVGElement())
- return static_cast<SVGElement*>(parent())->childShouldCreateRenderer(child);
+ return parent()->childShouldCreateRenderer(child);
return SVGElement::childShouldCreateRenderer(child);
}
diff --git a/WebCore/svg/SVGAElement.h b/WebCore/svg/SVGAElement.h
index 3debf8a..b43f192 100644
--- a/WebCore/svg/SVGAElement.h
+++ b/WebCore/svg/SVGAElement.h
@@ -23,6 +23,7 @@
#define SVGAElement_h
#if ENABLE(SVG)
+
#include "SVGExternalResourcesRequired.h"
#include "SVGLangSpace.h"
#include "SVGStyledTransformableElement.h"
@@ -37,8 +38,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGAElement> create(const QualifiedName&, Document*);
+
+ private:
SVGAElement(const QualifiedName&, Document*);
- virtual ~SVGAElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -59,7 +62,6 @@ namespace WebCore {
virtual bool childShouldCreateRenderer(Node*) const;
- private:
DECLARE_ANIMATED_PROPERTY(SVGAElement, SVGNames::targetAttr, String, Target, target)
// SVGURIReference
@@ -72,4 +74,5 @@ namespace WebCore {
} // namespace WebCore
#endif // ENABLE(SVG)
+
#endif // SVGAElement_h
diff --git a/WebCore/svg/SVGAltGlyphElement.cpp b/WebCore/svg/SVGAltGlyphElement.cpp
index 16808b9..2280d90 100644
--- a/WebCore/svg/SVGAltGlyphElement.cpp
+++ b/WebCore/svg/SVGAltGlyphElement.cpp
@@ -33,13 +33,14 @@
namespace WebCore {
-SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document* doc)
- : SVGTextPositioningElement(tagName, doc)
+inline SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document* document)
+ : SVGTextPositioningElement(tagName, document)
{
}
-SVGAltGlyphElement::~SVGAltGlyphElement()
+PassRefPtr<SVGAltGlyphElement> SVGAltGlyphElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAltGlyphElement(tagName, document));
}
void SVGAltGlyphElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGAltGlyphElement.h b/WebCore/svg/SVGAltGlyphElement.h
index cc5364b..ae0903a 100644
--- a/WebCore/svg/SVGAltGlyphElement.h
+++ b/WebCore/svg/SVGAltGlyphElement.h
@@ -34,13 +34,7 @@ namespace WebCore {
class SVGAltGlyphElement : public SVGTextPositioningElement,
public SVGURIReference {
public:
- SVGAltGlyphElement(const QualifiedName&, Document*);
- virtual ~SVGAltGlyphElement();
-
- virtual void synchronizeProperty(const QualifiedName&);
-
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ static PassRefPtr<SVGAltGlyphElement> create(const QualifiedName&, Document*);
const AtomicString& glyphRef() const;
void setGlyphRef(const AtomicString&, ExceptionCode&);
@@ -49,7 +43,14 @@ namespace WebCore {
SVGGlyphElement* glyphElement() const;
- private:
+ private:
+ SVGAltGlyphElement(const QualifiedName&, Document*);
+
+ virtual void synchronizeProperty(const QualifiedName&);
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual bool childShouldCreateRenderer(Node*) const;
+
// SVGURIReference
DECLARE_ANIMATED_PROPERTY(SVGAltGlyphElement, XLinkNames::hrefAttr, String, Href, href)
};
diff --git a/WebCore/svg/SVGAngle.cpp b/WebCore/svg/SVGAngle.cpp
index 4d65ad0..6702904 100644
--- a/WebCore/svg/SVGAngle.cpp
+++ b/WebCore/svg/SVGAngle.cpp
@@ -34,25 +34,11 @@ SVGAngle::SVGAngle()
{
}
-SVGAngle::~SVGAngle()
-{
-}
-
-SVGAngle::SVGAngleType SVGAngle::unitType() const
-{
- return m_unitType;
-}
-
void SVGAngle::setValue(float value)
{
m_value = value;
}
-float SVGAngle::value() const
-{
- return m_value;
-}
-
// calc m_value
void SVGAngle::calculate()
{
@@ -70,11 +56,6 @@ void SVGAngle::setValueInSpecifiedUnits(float valueInSpecifiedUnits)
calculate();
}
-float SVGAngle::valueInSpecifiedUnits() const
-{
- return m_valueInSpecifiedUnits;
-}
-
void SVGAngle::setValueAsString(const String& s)
{
m_valueAsString = s;
diff --git a/WebCore/svg/SVGAngle.h b/WebCore/svg/SVGAngle.h
index 289b8c6..de5c3ce 100644
--- a/WebCore/svg/SVGAngle.h
+++ b/WebCore/svg/SVGAngle.h
@@ -29,7 +29,6 @@ namespace WebCore {
class SVGAngle {
public:
SVGAngle();
- virtual ~SVGAngle();
enum SVGAngleType {
SVG_ANGLETYPE_UNKNOWN = 0,
@@ -39,13 +38,13 @@ namespace WebCore {
SVG_ANGLETYPE_GRAD = 4
};
- SVGAngleType unitType() const;
+ SVGAngleType unitType() const { return m_unitType; }
void setValue(float);
- float value() const;
+ float value() const { return m_value; }
void setValueInSpecifiedUnits(float valueInSpecifiedUnits);
- float valueInSpecifiedUnits() const;
+ float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
void setValueAsString(const String&);
String valueAsString() const;
diff --git a/WebCore/svg/SVGAnimateColorElement.cpp b/WebCore/svg/SVGAnimateColorElement.cpp
index d5166cf..3960b3e 100644
--- a/WebCore/svg/SVGAnimateColorElement.cpp
+++ b/WebCore/svg/SVGAnimateColorElement.cpp
@@ -25,11 +25,16 @@
namespace WebCore {
-SVGAnimateColorElement::SVGAnimateColorElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimateElement(tagName, doc)
+inline SVGAnimateColorElement::SVGAnimateColorElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimateElement(tagName, document)
{
}
+PassRefPtr<SVGAnimateColorElement> SVGAnimateColorElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGAnimateColorElement(tagName, document));
+}
+
}
// vim:ts=4:noet
diff --git a/WebCore/svg/SVGAnimateColorElement.h b/WebCore/svg/SVGAnimateColorElement.h
index ad9a774..d36c8de 100644
--- a/WebCore/svg/SVGAnimateColorElement.h
+++ b/WebCore/svg/SVGAnimateColorElement.h
@@ -30,6 +30,9 @@ namespace WebCore {
// SVGAnimateElement implements superset of the functionality.
class SVGAnimateColorElement : public SVGAnimateElement {
public:
+ static PassRefPtr<SVGAnimateColorElement> create(const QualifiedName&, Document*);
+
+ private:
SVGAnimateColorElement(const QualifiedName&, Document*);
};
diff --git a/WebCore/svg/SVGAnimateElement.cpp b/WebCore/svg/SVGAnimateElement.cpp
index df0c3bc..c47a378 100644
--- a/WebCore/svg/SVGAnimateElement.cpp
+++ b/WebCore/svg/SVGAnimateElement.cpp
@@ -36,8 +36,8 @@ using namespace std;
namespace WebCore {
-SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimationElement(tagName, doc)
+SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimationElement(tagName, document)
, m_propertyType(StringProperty)
, m_fromNumber(0)
, m_toNumber(0)
@@ -46,6 +46,11 @@ SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document* doc
{
}
+PassRefPtr<SVGAnimateElement> SVGAnimateElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGAnimateElement(tagName, document));
+}
+
SVGAnimateElement::~SVGAnimateElement()
{
}
diff --git a/WebCore/svg/SVGAnimateElement.h b/WebCore/svg/SVGAnimateElement.h
index 43522a7..9993d84 100644
--- a/WebCore/svg/SVGAnimateElement.h
+++ b/WebCore/svg/SVGAnimateElement.h
@@ -30,15 +30,19 @@
#include <wtf/OwnPtr.h>
namespace WebCore {
+
class SVGPathSegList;
class SVGPointList;
class SVGAnimateElement : public SVGAnimationElement {
public:
- SVGAnimateElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document*);
+
virtual ~SVGAnimateElement();
-
+
protected:
+ SVGAnimateElement(const QualifiedName&, Document*);
+
virtual void resetToBaseValue(const String&);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index 4ddda73..ffa201b 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -40,15 +40,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGAnimateMotionElement::SVGAnimateMotionElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimationElement(tagName, doc)
+inline SVGAnimateMotionElement::SVGAnimateMotionElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimationElement(tagName, document)
, m_baseIndexInTransformList(0)
, m_angle(0)
{
}
-SVGAnimateMotionElement::~SVGAnimateMotionElement()
+PassRefPtr<SVGAnimateMotionElement> SVGAnimateMotionElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAnimateMotionElement(tagName, document));
}
bool SVGAnimateMotionElement::hasValidTarget() const
diff --git a/WebCore/svg/SVGAnimateMotionElement.h b/WebCore/svg/SVGAnimateMotionElement.h
index ec189f9..225a076 100644
--- a/WebCore/svg/SVGAnimateMotionElement.h
+++ b/WebCore/svg/SVGAnimateMotionElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGAnimateMotionElement : public SVGAnimationElement {
public:
+ static PassRefPtr<SVGAnimateMotionElement> create(const QualifiedName&, Document*);
+
+ private:
SVGAnimateMotionElement(const QualifiedName&, Document*);
- virtual ~SVGAnimateMotionElement();
virtual bool hasValidTarget() const;
virtual void parseMappedAttribute(Attribute*);
- private:
virtual void resetToBaseValue(const String&);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
diff --git a/WebCore/svg/SVGAnimateTransformElement.cpp b/WebCore/svg/SVGAnimateTransformElement.cpp
index 0c27f0a..7471ea7 100644
--- a/WebCore/svg/SVGAnimateTransformElement.cpp
+++ b/WebCore/svg/SVGAnimateTransformElement.cpp
@@ -46,15 +46,16 @@ using namespace std;
namespace WebCore {
-SVGAnimateTransformElement::SVGAnimateTransformElement(const QualifiedName& tagName, Document* doc)
- : SVGAnimationElement(tagName, doc)
+inline SVGAnimateTransformElement::SVGAnimateTransformElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimationElement(tagName, document)
, m_type(SVGTransform::SVG_TRANSFORM_UNKNOWN)
, m_baseIndexInTransformList(0)
{
}
-SVGAnimateTransformElement::~SVGAnimateTransformElement()
+PassRefPtr<SVGAnimateTransformElement> SVGAnimateTransformElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGAnimateTransformElement(tagName, document));
}
bool SVGAnimateTransformElement::hasValidTarget() const
diff --git a/WebCore/svg/SVGAnimateTransformElement.h b/WebCore/svg/SVGAnimateTransformElement.h
index bf3de36..0f806d7 100644
--- a/WebCore/svg/SVGAnimateTransformElement.h
+++ b/WebCore/svg/SVGAnimateTransformElement.h
@@ -34,14 +34,15 @@ class AffineTransform;
class SVGAnimateTransformElement : public SVGAnimationElement {
public:
+ static PassRefPtr<SVGAnimateTransformElement> create(const QualifiedName&, Document*);
+
+private:
SVGAnimateTransformElement(const QualifiedName&, Document*);
- virtual ~SVGAnimateTransformElement();
virtual bool hasValidTarget() const;
virtual void parseMappedAttribute(Attribute*);
-private:
virtual void resetToBaseValue(const String&);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
diff --git a/WebCore/svg/SVGAnimatedPathData.cpp b/WebCore/svg/SVGAnimatedPathData.cpp
index 8ae4acd..6f54888 100644
--- a/WebCore/svg/SVGAnimatedPathData.cpp
+++ b/WebCore/svg/SVGAnimatedPathData.cpp
@@ -1,40 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * 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 "SVGAnimatedPathData.h"
-
-namespace WebCore {
-
-SVGAnimatedPathData::SVGAnimatedPathData()
-{
-}
-
-SVGAnimatedPathData::~SVGAnimatedPathData()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGAnimatedPathData.h b/WebCore/svg/SVGAnimatedPathData.h
index 399b61b..5ff66d3 100644
--- a/WebCore/svg/SVGAnimatedPathData.h
+++ b/WebCore/svg/SVGAnimatedPathData.h
@@ -24,14 +24,13 @@
#if ENABLE(SVG)
namespace WebCore {
+
class SVGPathSegList;
class SVGAnimatedPathData {
public:
- SVGAnimatedPathData();
- virtual ~SVGAnimatedPathData();
+ virtual ~SVGAnimatedPathData() { }
- // 'SVGAnimatedPathData' functions
virtual SVGPathSegList* pathSegList() const = 0;
virtual SVGPathSegList* normalizedPathSegList() const = 0;
virtual SVGPathSegList* animatedPathSegList() const = 0;
diff --git a/WebCore/svg/SVGAnimatedPoints.cpp b/WebCore/svg/SVGAnimatedPoints.cpp
index 1b73309..6f54888 100644
--- a/WebCore/svg/SVGAnimatedPoints.cpp
+++ b/WebCore/svg/SVGAnimatedPoints.cpp
@@ -1,40 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * 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 "SVGAnimatedPoints.h"
-
-namespace WebCore {
-
-SVGAnimatedPoints::SVGAnimatedPoints()
-{
-}
-
-SVGAnimatedPoints::~SVGAnimatedPoints()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGAnimatedPoints.h b/WebCore/svg/SVGAnimatedPoints.h
index ec2f2ae..a62f60c 100644
--- a/WebCore/svg/SVGAnimatedPoints.h
+++ b/WebCore/svg/SVGAnimatedPoints.h
@@ -24,12 +24,12 @@
#if ENABLE(SVG)
namespace WebCore {
+
class SVGPointList;
class SVGAnimatedPoints {
public:
- SVGAnimatedPoints();
- virtual ~SVGAnimatedPoints();
+ virtual ~SVGAnimatedPoints() { }
// 'SVGAnimatedPoints' functions
virtual SVGPointList* points() const = 0;
diff --git a/WebCore/svg/SVGAnimationElement.cpp b/WebCore/svg/SVGAnimationElement.cpp
index 513274e..b5eaafc 100644
--- a/WebCore/svg/SVGAnimationElement.cpp
+++ b/WebCore/svg/SVGAnimationElement.cpp
@@ -52,18 +52,12 @@ using namespace std;
namespace WebCore {
-SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* doc)
- : SVGSMILElement(tagName, doc)
- , SVGTests()
- , SVGExternalResourcesRequired()
+SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document* document)
+ : SVGSMILElement(tagName, document)
, m_animationValid(false)
{
}
-SVGAnimationElement::~SVGAnimationElement()
-{
-}
-
static void parseKeyTimes(const String& parse, Vector<float>& result, bool verifyOrder)
{
result.clear();
diff --git a/WebCore/svg/SVGAnimationElement.h b/WebCore/svg/SVGAnimationElement.h
index 8e49460..da48dd6 100644
--- a/WebCore/svg/SVGAnimationElement.h
+++ b/WebCore/svg/SVGAnimationElement.h
@@ -44,13 +44,6 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public ElementTimeControl {
public:
- SVGAnimationElement(const QualifiedName&, Document*);
- virtual ~SVGAnimationElement();
-
- virtual void parseMappedAttribute(Attribute*);
- virtual void attributeChanged(Attribute*, bool preserveDecls);
- virtual void synchronizeProperty(const QualifiedName&);
-
// SVGAnimationElement
float getStartTime() const;
float getCurrentTime() const;
@@ -65,6 +58,10 @@ namespace WebCore {
static bool attributeIsCSS(const String& attributeName);
protected:
+ SVGAnimationElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
enum CalcMode { CalcModeDiscrete, CalcModeLinear, CalcModePaced, CalcModeSpline };
CalcMode calcMode() const;
@@ -93,6 +90,9 @@ namespace WebCore {
virtual void endedActiveInterval();
private:
+ virtual void attributeChanged(Attribute*, bool preserveDecls);
+ virtual void synchronizeProperty(const QualifiedName&);
+
virtual bool calculateFromAndToValues(const String& fromString, const String& toString) = 0;
virtual bool calculateFromAndByValues(const String& fromString, const String& byString) = 0;
virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement) = 0;
@@ -105,7 +105,6 @@ namespace WebCore {
void currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const;
float calculatePercentForSpline(float percent, unsigned splineIndex) const;
- protected:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
diff --git a/WebCore/svg/SVGCircleElement.cpp b/WebCore/svg/SVGCircleElement.cpp
index ffbaa7b..b5a5184 100644
--- a/WebCore/svg/SVGCircleElement.cpp
+++ b/WebCore/svg/SVGCircleElement.cpp
@@ -32,19 +32,17 @@
namespace WebCore {
-SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_cx(LengthModeWidth)
, m_cy(LengthModeHeight)
, m_r(LengthModeOther)
{
}
-SVGCircleElement::~SVGCircleElement()
+PassRefPtr<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGCircleElement(tagName, document));
}
void SVGCircleElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGCircleElement.h b/WebCore/svg/SVGCircleElement.h
index f436b3c..dd11792 100644
--- a/WebCore/svg/SVGCircleElement.h
+++ b/WebCore/svg/SVGCircleElement.h
@@ -34,8 +34,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGCircleElement> create(const QualifiedName&, Document*);
+
+ private:
SVGCircleElement(const QualifiedName&, Document*);
- virtual ~SVGCircleElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -45,7 +47,6 @@ namespace WebCore {
virtual Path toPathData() const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGCircleElement, SVGNames::cxAttr, SVGLength, Cx, cx)
diff --git a/WebCore/svg/SVGClipPathElement.cpp b/WebCore/svg/SVGClipPathElement.cpp
index baaae96..715a34e 100644
--- a/WebCore/svg/SVGClipPathElement.cpp
+++ b/WebCore/svg/SVGClipPathElement.cpp
@@ -34,17 +34,15 @@
namespace WebCore {
-SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
{
}
-SVGClipPathElement::~SVGClipPathElement()
+PassRefPtr<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGClipPathElement(tagName, document));
}
void SVGClipPathElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGClipPathElement.h b/WebCore/svg/SVGClipPathElement.h
index 85dd05e..7d8ada2 100644
--- a/WebCore/svg/SVGClipPathElement.h
+++ b/WebCore/svg/SVGClipPathElement.h
@@ -35,8 +35,10 @@ class SVGClipPathElement : public SVGStyledTransformableElement,
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGClipPathElement> create(const QualifiedName&, Document*);
+
+private:
SVGClipPathElement(const QualifiedName&, Document*);
- virtual ~SVGClipPathElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool needsPendingResourceHandling() const { return false; }
@@ -48,7 +50,6 @@ public:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGClipPathElement, SVGNames::clipPathUnitsAttr, int, ClipPathUnits, clipPathUnits)
// SVGExternalResourcesRequired
diff --git a/WebCore/svg/SVGColor.cpp b/WebCore/svg/SVGColor.cpp
index bacead9..75900ad 100644
--- a/WebCore/svg/SVGColor.cpp
+++ b/WebCore/svg/SVGColor.cpp
@@ -50,16 +50,6 @@ SVGColor::SVGColor(const Color& c)
{
}
-
-SVGColor::~SVGColor()
-{
-}
-
-unsigned short SVGColor::colorType() const
-{
- return m_colorType;
-}
-
PassRefPtr<RGBColor> SVGColor::rgbColor() const
{
return RGBColor::create(m_color.rgb());
@@ -103,11 +93,6 @@ String SVGColor::cssText() const
return String();
}
-const Color& SVGColor::color() const
-{
- return m_color;
-}
-
}
// vim:ts=4:noet
diff --git a/WebCore/svg/SVGColor.h b/WebCore/svg/SVGColor.h
index c181b6b..f8b55f0 100644
--- a/WebCore/svg/SVGColor.h
+++ b/WebCore/svg/SVGColor.h
@@ -45,8 +45,6 @@ namespace WebCore {
return adoptRef(new SVGColor(SVG_COLORTYPE_CURRENTCOLOR));
}
- virtual ~SVGColor();
-
enum SVGColorType {
SVG_COLORTYPE_UNKNOWN = 0,
SVG_COLORTYPE_RGBCOLOR = 1,
@@ -55,7 +53,7 @@ namespace WebCore {
};
// 'SVGColor' functions
- unsigned short colorType() const;
+ unsigned short colorType() const { return m_colorType; }
PassRefPtr<RGBColor> rgbColor() const;
@@ -66,16 +64,15 @@ namespace WebCore {
void setRGBColorICCColor(const String& rgbColor, const String& iccColor, ExceptionCode&);
void setColor(unsigned short colorType, const String& rgbColor, const String& iccColor, ExceptionCode&);
- virtual String cssText() const;
-
- // Helpers
- const Color& color() const;
+ const Color& color() const { return m_color; }
protected:
SVGColor();
SVGColor(const String& color);
SVGColor(const Color&);
+ virtual String cssText() const;
+
private:
SVGColor(SVGColorType);
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.cpp b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
index 7c6cb85..c1750d7 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.cpp
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.cpp
@@ -30,17 +30,13 @@
namespace WebCore {
-SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
, m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN)
, m_tableValues(SVGNumberList::create(SVGNames::tableValuesAttr))
- , m_slope(1.0f)
- , m_amplitude(1.0f)
- , m_exponent(1.0f)
-{
-}
-
-SVGComponentTransferFunctionElement::~SVGComponentTransferFunctionElement()
+ , m_slope(1)
+ , m_amplitude(1)
+ , m_exponent(1)
{
}
diff --git a/WebCore/svg/SVGComponentTransferFunctionElement.h b/WebCore/svg/SVGComponentTransferFunctionElement.h
index 91f0767..8b888af 100644
--- a/WebCore/svg/SVGComponentTransferFunctionElement.h
+++ b/WebCore/svg/SVGComponentTransferFunctionElement.h
@@ -31,14 +31,14 @@ namespace WebCore {
class SVGComponentTransferFunctionElement : public SVGElement {
public:
+ ComponentTransferFunction transferFunction() const;
+
+ protected:
SVGComponentTransferFunctionElement(const QualifiedName&, Document*);
- virtual ~SVGComponentTransferFunctionElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- ComponentTransferFunction transferFunction() const;
-
private:
DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::typeAttr, int, Type, type)
DECLARE_ANIMATED_PROPERTY(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, SVGNumberList*, TableValues, tableValues)
diff --git a/WebCore/svg/SVGCursorElement.cpp b/WebCore/svg/SVGCursorElement.cpp
index cc3dfd1..9fb4140 100644
--- a/WebCore/svg/SVGCursorElement.cpp
+++ b/WebCore/svg/SVGCursorElement.cpp
@@ -30,16 +30,18 @@
namespace WebCore {
-SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
- , SVGTests()
- , SVGExternalResourcesRequired()
- , SVGURIReference()
+inline SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
{
}
+PassRefPtr<SVGCursorElement> SVGCursorElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGCursorElement(tagName, document));
+}
+
SVGCursorElement::~SVGCursorElement()
{
HashSet<SVGElement*>::iterator end = m_clients.end();
diff --git a/WebCore/svg/SVGCursorElement.h b/WebCore/svg/SVGCursorElement.h
index fe2d647..ce4d129 100644
--- a/WebCore/svg/SVGCursorElement.h
+++ b/WebCore/svg/SVGCursorElement.h
@@ -35,12 +35,16 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
- SVGCursorElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGCursorElement> create(const QualifiedName&, Document*);
+
virtual ~SVGCursorElement();
void addClient(SVGElement*);
void removeClient(SVGElement*);
+ private:
+ SVGCursorElement(const QualifiedName&, Document*);
+
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(Attribute*);
@@ -49,7 +53,6 @@ namespace WebCore {
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
- private:
DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::xAttr, SVGLength, X, x)
DECLARE_ANIMATED_PROPERTY(SVGCursorElement, SVGNames::yAttr, SVGLength, Y, y)
diff --git a/WebCore/svg/SVGDefsElement.cpp b/WebCore/svg/SVGDefsElement.cpp
index 660e0d1..4f5a582 100644
--- a/WebCore/svg/SVGDefsElement.cpp
+++ b/WebCore/svg/SVGDefsElement.cpp
@@ -27,16 +27,14 @@
namespace WebCore {
-SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGDefsElement::~SVGDefsElement()
+PassRefPtr<SVGDefsElement> SVGDefsElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGDefsElement(tagName, document));
}
bool SVGDefsElement::isValid() const
diff --git a/WebCore/svg/SVGDefsElement.h b/WebCore/svg/SVGDefsElement.h
index 1d84dd5..4a60bb5 100644
--- a/WebCore/svg/SVGDefsElement.h
+++ b/WebCore/svg/SVGDefsElement.h
@@ -34,15 +34,16 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGDefsElement> create(const QualifiedName&, Document*);
+
+ private:
SVGDefsElement(const QualifiedName&, Document*);
- virtual ~SVGDefsElement();
virtual bool isValid() const;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void synchronizeProperty(const QualifiedName&);
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
diff --git a/WebCore/svg/SVGDescElement.cpp b/WebCore/svg/SVGDescElement.cpp
index 58a7e01..720146c 100644
--- a/WebCore/svg/SVGDescElement.cpp
+++ b/WebCore/svg/SVGDescElement.cpp
@@ -24,14 +24,14 @@
namespace WebCore {
-SVGDescElement::SVGDescElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledElement(tagName, doc)
- , SVGLangSpace()
+inline SVGDescElement::SVGDescElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGDescElement::~SVGDescElement()
+PassRefPtr<SVGDescElement> SVGDescElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGDescElement(tagName, document));
}
String SVGDescElement::description() const
diff --git a/WebCore/svg/SVGDescElement.h b/WebCore/svg/SVGDescElement.h
index 23374ef..994007c 100644
--- a/WebCore/svg/SVGDescElement.h
+++ b/WebCore/svg/SVGDescElement.h
@@ -30,11 +30,13 @@ namespace WebCore {
class SVGDescElement : public SVGStyledElement,
public SVGLangSpace {
public:
- SVGDescElement(const QualifiedName&, Document*);
- virtual ~SVGDescElement();
+ static PassRefPtr<SVGDescElement> create(const QualifiedName&, Document*);
String description() const;
+ private:
+ SVGDescElement(const QualifiedName&, Document*);
+
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
};
diff --git a/WebCore/svg/SVGDocument.cpp b/WebCore/svg/SVGDocument.cpp
index c31ca9e..e6d53a4 100644
--- a/WebCore/svg/SVGDocument.cpp
+++ b/WebCore/svg/SVGDocument.cpp
@@ -40,10 +40,6 @@ SVGDocument::SVGDocument(Frame* frame, const KURL& url)
{
}
-SVGDocument::~SVGDocument()
-{
-}
-
SVGSVGElement* SVGDocument::rootElement() const
{
Element* elem = documentElement();
diff --git a/WebCore/svg/SVGDocument.h b/WebCore/svg/SVGDocument.h
index b5d4076..58e3518 100644
--- a/WebCore/svg/SVGDocument.h
+++ b/WebCore/svg/SVGDocument.h
@@ -38,8 +38,6 @@ namespace WebCore {
return adoptRef(new SVGDocument(frame, url));
}
- virtual ~SVGDocument();
-
SVGSVGElement* rootElement() const;
void dispatchZoomEvent(float prevScale, float newScale);
diff --git a/WebCore/svg/SVGDocumentExtensions.cpp b/WebCore/svg/SVGDocumentExtensions.cpp
index 819d12b..011859a 100644
--- a/WebCore/svg/SVGDocumentExtensions.cpp
+++ b/WebCore/svg/SVGDocumentExtensions.cpp
@@ -40,9 +40,9 @@
namespace WebCore {
-SVGDocumentExtensions::SVGDocumentExtensions(Document* doc)
- : m_doc(doc)
- , m_resourcesCache(new SVGResourcesCache)
+SVGDocumentExtensions::SVGDocumentExtensions(Document* document)
+ : m_document(document)
+ , m_resourcesCache(adoptPtr(new SVGResourcesCache))
{
}
@@ -148,12 +148,12 @@ static void reportMessage(Document* document, MessageLevel level, const String&
void SVGDocumentExtensions::reportWarning(const String& message)
{
- reportMessage(m_doc, WarningMessageLevel, "Warning: " + message);
+ reportMessage(m_document, WarningMessageLevel, "Warning: " + message);
}
void SVGDocumentExtensions::reportError(const String& message)
{
- reportMessage(m_doc, ErrorMessageLevel, "Error: " + message);
+ reportMessage(m_document, ErrorMessageLevel, "Error: " + message);
}
void SVGDocumentExtensions::addPendingResource(const AtomicString& id, SVGStyledElement* obj)
diff --git a/WebCore/svg/SVGDocumentExtensions.h b/WebCore/svg/SVGDocumentExtensions.h
index da23cd0..e716e10 100644
--- a/WebCore/svg/SVGDocumentExtensions.h
+++ b/WebCore/svg/SVGDocumentExtensions.h
@@ -61,7 +61,7 @@ public:
SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); }
private:
- Document* m_doc; // weak reference
+ Document* m_document; // weak reference
HashSet<SVGSVGElement*> m_timeContainers; // For SVG 1.2 support this will need to be made more general.
HashMap<AtomicString, RenderSVGResourceContainer*> m_resources;
HashMap<AtomicString, HashSet<SVGStyledElement*>*> m_pendingResources;
diff --git a/WebCore/svg/SVGElement.cpp b/WebCore/svg/SVGElement.cpp
index 37e4930..ee16e8f 100644
--- a/WebCore/svg/SVGElement.cpp
+++ b/WebCore/svg/SVGElement.cpp
@@ -52,13 +52,13 @@ namespace WebCore {
using namespace HTMLNames;
SVGElement::SVGElement(const QualifiedName& tagName, Document* document)
- : StyledElement(tagName, document, CreateSVGElementZeroRefCount)
+ : StyledElement(tagName, document, CreateSVGElement)
{
}
PassRefPtr<SVGElement> SVGElement::create(const QualifiedName& tagName, Document* document)
{
- return new SVGElement(tagName, document);
+ return adoptRef(new SVGElement(tagName, document));
}
SVGElement::~SVGElement()
diff --git a/WebCore/svg/SVGElement.h b/WebCore/svg/SVGElement.h
index 255c7be..fb28279 100644
--- a/WebCore/svg/SVGElement.h
+++ b/WebCore/svg/SVGElement.h
@@ -49,8 +49,6 @@ namespace WebCore {
SVGDocumentExtensions* accessDocumentSVGExtensions() const;
- virtual void parseMappedAttribute(Attribute*);
-
virtual bool isStyled() const { return false; }
virtual bool isStyledTransformable() const { return false; }
virtual bool isStyledLocatable() const { return false; }
@@ -62,9 +60,6 @@ namespace WebCore {
// For SVGTests
virtual bool isValid() const { return true; }
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- virtual bool childShouldCreateRenderer(Node*) const;
-
virtual void svgAttributeChanged(const QualifiedName&) { }
virtual void synchronizeProperty(const QualifiedName&) { }
@@ -84,9 +79,12 @@ namespace WebCore {
protected:
SVGElement(const QualifiedName&, Document*);
+ virtual void parseMappedAttribute(Attribute*);
+
virtual void finishParsingChildren();
virtual void insertedIntoDocument();
virtual void attributeChanged(Attribute*, bool preserveDecls = false);
+ virtual bool childShouldCreateRenderer(Node*) const;
SVGElementRareData* rareSVGData() const;
SVGElementRareData* ensureRareSVGData();
@@ -94,6 +92,8 @@ namespace WebCore {
private:
friend class SVGElementInstance;
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+
virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
virtual ContainerNode* eventParentNode();
diff --git a/WebCore/svg/SVGElementInstanceList.h b/WebCore/svg/SVGElementInstanceList.h
index 4a4bbcb..87dffe1 100644
--- a/WebCore/svg/SVGElementInstanceList.h
+++ b/WebCore/svg/SVGElementInstanceList.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGElementInstanceList : public RefCounted<SVGElementInstanceList> {
public:
- static PassRefPtr<SVGElementInstanceList> create(PassRefPtr<SVGElementInstance> rootInstance) { return adoptRef(new SVGElementInstanceList(rootInstance)); }
+ static PassRefPtr<SVGElementInstanceList> create(PassRefPtr<SVGElementInstance> root) { return adoptRef(new SVGElementInstanceList(root)); }
virtual ~SVGElementInstanceList();
unsigned length() const;
SVGElementInstance* item(unsigned index);
private:
- SVGElementInstanceList(PassRefPtr<SVGElementInstance> rootInstance);
+ SVGElementInstanceList(PassRefPtr<SVGElementInstance>);
+
RefPtr<SVGElementInstance> m_rootInstance;
};
diff --git a/WebCore/svg/SVGEllipseElement.cpp b/WebCore/svg/SVGEllipseElement.cpp
index 128b5e0..5e18910 100644
--- a/WebCore/svg/SVGEllipseElement.cpp
+++ b/WebCore/svg/SVGEllipseElement.cpp
@@ -32,11 +32,8 @@
namespace WebCore {
-SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_cx(LengthModeWidth)
, m_cy(LengthModeHeight)
, m_rx(LengthModeWidth)
@@ -44,8 +41,9 @@ SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document* doc
{
}
-SVGEllipseElement::~SVGEllipseElement()
+PassRefPtr<SVGEllipseElement> SVGEllipseElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGEllipseElement(tagName, document));
}
void SVGEllipseElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGEllipseElement.h b/WebCore/svg/SVGEllipseElement.h
index 85ec4c8..bee815c 100644
--- a/WebCore/svg/SVGEllipseElement.h
+++ b/WebCore/svg/SVGEllipseElement.h
@@ -34,8 +34,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGEllipseElement> create(const QualifiedName&, Document*);
+
+ private:
SVGEllipseElement(const QualifiedName&, Document*);
- virtual ~SVGEllipseElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -45,7 +47,6 @@ namespace WebCore {
virtual Path toPathData() const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGEllipseElement, SVGNames::cxAttr, SVGLength, Cx, cx)
diff --git a/WebCore/svg/SVGExternalResourcesRequired.cpp b/WebCore/svg/SVGExternalResourcesRequired.cpp
index 981b056..c976b0f 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.cpp
+++ b/WebCore/svg/SVGExternalResourcesRequired.cpp
@@ -24,19 +24,9 @@
#include "SVGExternalResourcesRequired.h"
#include "Attr.h"
-#include "SVGElement.h"
-#include "SVGNames.h"
namespace WebCore {
-SVGExternalResourcesRequired::SVGExternalResourcesRequired()
-{
-}
-
-SVGExternalResourcesRequired::~SVGExternalResourcesRequired()
-{
-}
-
bool SVGExternalResourcesRequired::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::externalResourcesRequiredAttr) {
diff --git a/WebCore/svg/SVGExternalResourcesRequired.h b/WebCore/svg/SVGExternalResourcesRequired.h
index 44b6ae7..6322538 100644
--- a/WebCore/svg/SVGExternalResourcesRequired.h
+++ b/WebCore/svg/SVGExternalResourcesRequired.h
@@ -36,8 +36,7 @@ namespace WebCore {
// FIXME: When implementing animVal support, make sure that animVal==baseVal for externalResourcesRequired
class SVGExternalResourcesRequired {
public:
- SVGExternalResourcesRequired();
- virtual ~SVGExternalResourcesRequired();
+ virtual ~SVGExternalResourcesRequired() { }
bool parseMappedAttribute(Attribute*);
bool isKnownAttribute(const QualifiedName&);
diff --git a/WebCore/svg/SVGFEBlendElement.cpp b/WebCore/svg/SVGFEBlendElement.cpp
index e944d61..451b7d1 100644
--- a/WebCore/svg/SVGFEBlendElement.cpp
+++ b/WebCore/svg/SVGFEBlendElement.cpp
@@ -27,14 +27,15 @@
namespace WebCore {
-SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_mode(FEBLEND_MODE_NORMAL)
{
}
-SVGFEBlendElement::~SVGFEBlendElement()
+PassRefPtr<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEBlendElement(tagName, document));
}
void SVGFEBlendElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEBlendElement.h b/WebCore/svg/SVGFEBlendElement.h
index 2ffa93e..41c8307 100644
--- a/WebCore/svg/SVGFEBlendElement.h
+++ b/WebCore/svg/SVGFEBlendElement.h
@@ -28,14 +28,15 @@
namespace WebCore {
class SVGFEBlendElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEBlendElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEBlendElement(const QualifiedName&, Document*);
- virtual ~SVGFEBlendElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::in2Attr, String, In2, in2)
DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::modeAttr, int, Mode, mode)
diff --git a/WebCore/svg/SVGFEColorMatrixElement.cpp b/WebCore/svg/SVGFEColorMatrixElement.cpp
index d7c10d1..7f496bc 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.cpp
+++ b/WebCore/svg/SVGFEColorMatrixElement.cpp
@@ -29,15 +29,16 @@
namespace WebCore {
-SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_type(FECOLORMATRIX_TYPE_UNKNOWN)
, m_values(SVGNumberList::create(SVGNames::valuesAttr))
{
}
-SVGFEColorMatrixElement::~SVGFEColorMatrixElement()
+PassRefPtr<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEColorMatrixElement(tagName, document));
}
void SVGFEColorMatrixElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEColorMatrixElement.h b/WebCore/svg/SVGFEColorMatrixElement.h
index 6701eea..873d530 100644
--- a/WebCore/svg/SVGFEColorMatrixElement.h
+++ b/WebCore/svg/SVGFEColorMatrixElement.h
@@ -30,14 +30,15 @@ namespace WebCore {
class SVGFEColorMatrixElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEColorMatrixElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEColorMatrixElement(const QualifiedName&, Document*);
- virtual ~SVGFEColorMatrixElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::typeAttr, int, Type, type)
DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::valuesAttr, SVGNumberList*, Values, values)
diff --git a/WebCore/svg/SVGFEComponentTransferElement.cpp b/WebCore/svg/SVGFEComponentTransferElement.cpp
index 9f85a0b..a99e74c 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.cpp
+++ b/WebCore/svg/SVGFEComponentTransferElement.cpp
@@ -33,13 +33,14 @@
namespace WebCore {
-SVGFEComponentTransferElement::SVGFEComponentTransferElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEComponentTransferElement::SVGFEComponentTransferElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEComponentTransferElement::~SVGFEComponentTransferElement()
+PassRefPtr<SVGFEComponentTransferElement> SVGFEComponentTransferElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEComponentTransferElement(tagName, document));
}
void SVGFEComponentTransferElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEComponentTransferElement.h b/WebCore/svg/SVGFEComponentTransferElement.h
index 785dc68..957661e 100644
--- a/WebCore/svg/SVGFEComponentTransferElement.h
+++ b/WebCore/svg/SVGFEComponentTransferElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGFEComponentTransferElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEComponentTransferElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEComponentTransferElement(const QualifiedName&, Document*);
- virtual ~SVGFEComponentTransferElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEComponentTransferElement, SVGNames::inAttr, String, In1, in1)
};
diff --git a/WebCore/svg/SVGFECompositeElement.cpp b/WebCore/svg/SVGFECompositeElement.cpp
index dfa335d..f658632 100644
--- a/WebCore/svg/SVGFECompositeElement.cpp
+++ b/WebCore/svg/SVGFECompositeElement.cpp
@@ -28,14 +28,15 @@
namespace WebCore {
-SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m__operator(FECOMPOSITE_OPERATOR_OVER)
{
}
-SVGFECompositeElement::~SVGFECompositeElement()
+PassRefPtr<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFECompositeElement(tagName, document));
}
void SVGFECompositeElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFECompositeElement.h b/WebCore/svg/SVGFECompositeElement.h
index b229cc5..19683de 100644
--- a/WebCore/svg/SVGFECompositeElement.h
+++ b/WebCore/svg/SVGFECompositeElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGFECompositeElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFECompositeElement> create(const QualifiedName&, Document*);
+
+private:
SVGFECompositeElement(const QualifiedName&, Document*);
- virtual ~SVGFECompositeElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::in2Attr, String, In2, in2)
DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::operatorAttr, int, _operator, _operator)
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.cpp b/WebCore/svg/SVGFEConvolveMatrixElement.cpp
index ed6910e..9432a00 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.cpp
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.cpp
@@ -38,15 +38,16 @@ namespace WebCore {
char SVGKernelUnitLengthXAttrIdentifier[] = "SVGKernelUnitLengthXAttr";
char SVGKernelUnitLengthYAttrIdentifier[] = "SVGKernelUnitLengthYAttr";
-SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_kernelMatrix(SVGNumberList::create(SVGNames::kernelMatrixAttr))
, m_edgeMode(EDGEMODE_DUPLICATE)
{
}
-SVGFEConvolveMatrixElement::~SVGFEConvolveMatrixElement()
+PassRefPtr<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEConvolveMatrixElement(tagName, document));
}
void SVGFEConvolveMatrixElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEConvolveMatrixElement.h b/WebCore/svg/SVGFEConvolveMatrixElement.h
index 5f505d7..e70b768 100644
--- a/WebCore/svg/SVGFEConvolveMatrixElement.h
+++ b/WebCore/svg/SVGFEConvolveMatrixElement.h
@@ -29,16 +29,17 @@ namespace WebCore {
class SVGFEConvolveMatrixElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEConvolveMatrixElement(const QualifiedName&, Document*);
- virtual ~SVGFEConvolveMatrixElement();
+ static PassRefPtr<SVGFEConvolveMatrixElement> create(const QualifiedName&, Document*);
void setOrder(float orderX, float orderY);
void setKernelUnitLength(float kernelUnitLengthX, float kernelUnitLengthY);
+private:
+ SVGFEConvolveMatrixElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::orderXAttr, long, OrderX, orderX)
DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::orderYAttr, long, OrderY, orderY)
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
index 81144c6..8c7e7ed 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.cpp
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.cpp
@@ -35,15 +35,16 @@ namespace WebCore {
char SVGKernelUnitLengthXIdentifier[] = "SVGKernelUnitLengthX";
char SVGKernelUnitLengthYIdentifier[] = "SVGKernelUnitLengthY";
-SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_diffuseConstant(1.0f)
- , m_surfaceScale(1.0f)
+inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
+ , m_diffuseConstant(1)
+ , m_surfaceScale(1)
{
}
-SVGFEDiffuseLightingElement::~SVGFEDiffuseLightingElement()
+PassRefPtr<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEDiffuseLightingElement(tagName, document));
}
void SVGFEDiffuseLightingElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEDiffuseLightingElement.h b/WebCore/svg/SVGFEDiffuseLightingElement.h
index c5bedf1..e0dbfc4 100644
--- a/WebCore/svg/SVGFEDiffuseLightingElement.h
+++ b/WebCore/svg/SVGFEDiffuseLightingElement.h
@@ -36,15 +36,16 @@ class SVGColor;
class SVGFEDiffuseLightingElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEDiffuseLightingElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEDiffuseLightingElement(const QualifiedName&, Document*);
- virtual ~SVGFEDiffuseLightingElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::diffuseConstantAttr, float, DiffuseConstant, diffuseConstant)
DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale)
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.cpp b/WebCore/svg/SVGFEDisplacementMapElement.cpp
index 2706c78..013eca5 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.cpp
+++ b/WebCore/svg/SVGFEDisplacementMapElement.cpp
@@ -26,15 +26,16 @@
namespace WebCore {
-SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_xChannelSelector(CHANNEL_A)
, m_yChannelSelector(CHANNEL_A)
{
}
-SVGFEDisplacementMapElement::~SVGFEDisplacementMapElement()
+PassRefPtr<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEDisplacementMapElement(tagName, document));
}
ChannelSelectorType SVGFEDisplacementMapElement::stringToChannel(const String& key)
diff --git a/WebCore/svg/SVGFEDisplacementMapElement.h b/WebCore/svg/SVGFEDisplacementMapElement.h
index 445c631..239c2c7 100644
--- a/WebCore/svg/SVGFEDisplacementMapElement.h
+++ b/WebCore/svg/SVGFEDisplacementMapElement.h
@@ -28,16 +28,17 @@ namespace WebCore {
class SVGFEDisplacementMapElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEDisplacementMapElement(const QualifiedName& tagName, Document*);
- virtual ~SVGFEDisplacementMapElement();
-
+ static PassRefPtr<SVGFEDisplacementMapElement> create(const QualifiedName&, Document*);
+
static ChannelSelectorType stringToChannel(const String&);
+private:
+ SVGFEDisplacementMapElement(const QualifiedName& tagName, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::in2Attr, String, In2, in2)
DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::xChannelSelectorAttr, int, XChannelSelector, xChannelSelector)
diff --git a/WebCore/svg/SVGFEDistantLightElement.cpp b/WebCore/svg/SVGFEDistantLightElement.cpp
index 3a056af..59394d8 100644
--- a/WebCore/svg/SVGFEDistantLightElement.cpp
+++ b/WebCore/svg/SVGFEDistantLightElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEDistantLightElement::SVGFEDistantLightElement(const QualifiedName& tagName, Document* doc)
- : SVGFELightElement(tagName, doc)
+inline SVGFEDistantLightElement::SVGFEDistantLightElement(const QualifiedName& tagName, Document* document)
+ : SVGFELightElement(tagName, document)
{
}
-SVGFEDistantLightElement::~SVGFEDistantLightElement()
+PassRefPtr<SVGFEDistantLightElement> SVGFEDistantLightElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEDistantLightElement(tagName, document));
}
PassRefPtr<LightSource> SVGFEDistantLightElement::lightSource() const
diff --git a/WebCore/svg/SVGFEDistantLightElement.h b/WebCore/svg/SVGFEDistantLightElement.h
index a625c04..9024cce 100644
--- a/WebCore/svg/SVGFEDistantLightElement.h
+++ b/WebCore/svg/SVGFEDistantLightElement.h
@@ -24,10 +24,13 @@
#include "SVGFELightElement.h"
namespace WebCore {
+
class SVGFEDistantLightElement : public SVGFELightElement {
public:
+ static PassRefPtr<SVGFEDistantLightElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEDistantLightElement(const QualifiedName&, Document*);
- virtual ~SVGFEDistantLightElement();
virtual PassRefPtr<LightSource> lightSource() const;
};
diff --git a/WebCore/svg/SVGFEFloodElement.cpp b/WebCore/svg/SVGFEFloodElement.cpp
index 050f2d4..321eb8f 100644
--- a/WebCore/svg/SVGFEFloodElement.cpp
+++ b/WebCore/svg/SVGFEFloodElement.cpp
@@ -29,13 +29,14 @@
namespace WebCore {
-SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEFloodElement::~SVGFEFloodElement()
+PassRefPtr<SVGFEFloodElement> SVGFEFloodElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFloodElement(tagName, document));
}
PassRefPtr<FilterEffect> SVGFEFloodElement::build(SVGFilterBuilder*)
diff --git a/WebCore/svg/SVGFEFloodElement.h b/WebCore/svg/SVGFEFloodElement.h
index 73aa0ee..2f7d94d 100644
--- a/WebCore/svg/SVGFEFloodElement.h
+++ b/WebCore/svg/SVGFEFloodElement.h
@@ -26,10 +26,13 @@
#include "SVGFilterPrimitiveStandardAttributes.h"
namespace WebCore {
+
class SVGFEFloodElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEFloodElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEFloodElement(const QualifiedName&, Document*);
- virtual ~SVGFEFloodElement();
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
};
diff --git a/WebCore/svg/SVGFEFuncAElement.cpp b/WebCore/svg/SVGFEFuncAElement.cpp
index 3722826..8967efe 100644
--- a/WebCore/svg/SVGFEFuncAElement.cpp
+++ b/WebCore/svg/SVGFEFuncAElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncAElement::SVGFEFuncAElement(const QualifiedName& tagName, Document* doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncAElement::SVGFEFuncAElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncAElement::~SVGFEFuncAElement()
+PassRefPtr<SVGFEFuncAElement> SVGFEFuncAElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncAElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncAElement.h b/WebCore/svg/SVGFEFuncAElement.h
index 500d630..f92ad5b 100644
--- a/WebCore/svg/SVGFEFuncAElement.h
+++ b/WebCore/svg/SVGFEFuncAElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncAElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncAElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncAElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncAElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncBElement.cpp b/WebCore/svg/SVGFEFuncBElement.cpp
index 3ea448f..2b4287a 100644
--- a/WebCore/svg/SVGFEFuncBElement.cpp
+++ b/WebCore/svg/SVGFEFuncBElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncBElement::SVGFEFuncBElement(const QualifiedName& tagName, Document *doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncBElement::SVGFEFuncBElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncBElement::~SVGFEFuncBElement()
+PassRefPtr<SVGFEFuncBElement> SVGFEFuncBElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncBElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncBElement.h b/WebCore/svg/SVGFEFuncBElement.h
index 85f9500..ea664f5 100644
--- a/WebCore/svg/SVGFEFuncBElement.h
+++ b/WebCore/svg/SVGFEFuncBElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncBElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncBElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncBElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncBElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncGElement.cpp b/WebCore/svg/SVGFEFuncGElement.cpp
index c74a9ce..32cbdf3 100644
--- a/WebCore/svg/SVGFEFuncGElement.cpp
+++ b/WebCore/svg/SVGFEFuncGElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncGElement::SVGFEFuncGElement(const QualifiedName& tagName, Document* doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncGElement::SVGFEFuncGElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncGElement::~SVGFEFuncGElement()
+PassRefPtr<SVGFEFuncGElement> SVGFEFuncGElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncGElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncGElement.h b/WebCore/svg/SVGFEFuncGElement.h
index 9950a53..df32106 100644
--- a/WebCore/svg/SVGFEFuncGElement.h
+++ b/WebCore/svg/SVGFEFuncGElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncGElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncGElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncGElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncGElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEFuncRElement.cpp b/WebCore/svg/SVGFEFuncRElement.cpp
index ce3355d..9c17909 100644
--- a/WebCore/svg/SVGFEFuncRElement.cpp
+++ b/WebCore/svg/SVGFEFuncRElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFEFuncRElement::SVGFEFuncRElement(const QualifiedName& tagName, Document* doc)
- : SVGComponentTransferFunctionElement(tagName, doc)
+inline SVGFEFuncRElement::SVGFEFuncRElement(const QualifiedName& tagName, Document* document)
+ : SVGComponentTransferFunctionElement(tagName, document)
{
}
-SVGFEFuncRElement::~SVGFEFuncRElement()
+PassRefPtr<SVGFEFuncRElement> SVGFEFuncRElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEFuncRElement(tagName, document));
}
}
diff --git a/WebCore/svg/SVGFEFuncRElement.h b/WebCore/svg/SVGFEFuncRElement.h
index 8e78091..601095f 100644
--- a/WebCore/svg/SVGFEFuncRElement.h
+++ b/WebCore/svg/SVGFEFuncRElement.h
@@ -25,10 +25,13 @@
#include "SVGComponentTransferFunctionElement.h"
namespace WebCore {
+
class SVGFEFuncRElement : public SVGComponentTransferFunctionElement {
public:
+ static PassRefPtr<SVGFEFuncRElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEFuncRElement(const QualifiedName&, Document*);
- virtual ~SVGFEFuncRElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFEGaussianBlurElement.cpp b/WebCore/svg/SVGFEGaussianBlurElement.cpp
index 2e5578a..f66fa90 100644
--- a/WebCore/svg/SVGFEGaussianBlurElement.cpp
+++ b/WebCore/svg/SVGFEGaussianBlurElement.cpp
@@ -32,13 +32,14 @@ namespace WebCore {
char SVGStdDeviationXAttrIdentifier[] = "SVGStdDeviationXAttr";
char SVGStdDeviationYAttrIdentifier[] = "SVGStdDeviationYAttr";
-SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEGaussianBlurElement::~SVGFEGaussianBlurElement()
+PassRefPtr<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEGaussianBlurElement(tagName, document));
}
void SVGFEGaussianBlurElement::setStdDeviation(float, float)
diff --git a/WebCore/svg/SVGFEGaussianBlurElement.h b/WebCore/svg/SVGFEGaussianBlurElement.h
index 10c0f5a..36b7383 100644
--- a/WebCore/svg/SVGFEGaussianBlurElement.h
+++ b/WebCore/svg/SVGFEGaussianBlurElement.h
@@ -32,16 +32,17 @@ extern char SVGStdDeviationYAttrIdentifier[];
class SVGFEGaussianBlurElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEGaussianBlurElement(const QualifiedName&, Document*);
- virtual ~SVGFEGaussianBlurElement();
+ static PassRefPtr<SVGFEGaussianBlurElement> create(const QualifiedName&, Document*);
void setStdDeviation(float stdDeviationX, float stdDeviationY);
+private:
+ SVGFEGaussianBlurElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEGaussianBlurElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, SVGStdDeviationXAttrIdentifier, float, StdDeviationX, stdDeviationX)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, SVGStdDeviationYAttrIdentifier, float, StdDeviationY, stdDeviationY)
diff --git a/WebCore/svg/SVGFEImageElement.cpp b/WebCore/svg/SVGFEImageElement.cpp
index eb024f6..0808ad7 100644
--- a/WebCore/svg/SVGFEImageElement.cpp
+++ b/WebCore/svg/SVGFEImageElement.cpp
@@ -37,14 +37,16 @@
namespace WebCore {
-SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , SVGURIReference()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
+PassRefPtr<SVGFEImageElement> SVGFEImageElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFEImageElement(tagName, document));
+}
+
SVGFEImageElement::~SVGFEImageElement()
{
if (m_cachedImage)
diff --git a/WebCore/svg/SVGFEImageElement.h b/WebCore/svg/SVGFEImageElement.h
index 2128c6d..b5fad48 100644
--- a/WebCore/svg/SVGFEImageElement.h
+++ b/WebCore/svg/SVGFEImageElement.h
@@ -40,9 +40,13 @@ class SVGFEImageElement : public SVGFilterPrimitiveStandardAttributes,
public SVGExternalResourcesRequired,
public CachedResourceClient {
public:
- SVGFEImageElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGFEImageElement> create(const QualifiedName&, Document*);
+
virtual ~SVGFEImageElement();
+private:
+ SVGFEImageElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual void notifyFinished(CachedResource*);
@@ -50,7 +54,6 @@ public:
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
void requestImageResource();
DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
diff --git a/WebCore/svg/SVGFELightElement.cpp b/WebCore/svg/SVGFELightElement.cpp
index 5975033..dc10cf9 100644
--- a/WebCore/svg/SVGFELightElement.cpp
+++ b/WebCore/svg/SVGFELightElement.cpp
@@ -30,13 +30,9 @@
namespace WebCore {
-SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
- , m_specularExponent(1.0f)
-{
-}
-
-SVGFELightElement::~SVGFELightElement()
+SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
+ , m_specularExponent(1)
{
}
diff --git a/WebCore/svg/SVGFELightElement.h b/WebCore/svg/SVGFELightElement.h
index d0874cb..b86204d 100644
--- a/WebCore/svg/SVGFELightElement.h
+++ b/WebCore/svg/SVGFELightElement.h
@@ -31,16 +31,17 @@ namespace WebCore {
class SVGFELightElement : public SVGElement {
public:
- SVGFELightElement(const QualifiedName&, Document*);
- virtual ~SVGFELightElement();
-
virtual PassRefPtr<LightSource> lightSource() const = 0;
+
+protected:
+ SVGFELightElement(const QualifiedName&, Document*);
+
+private:
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);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::azimuthAttr, float, Azimuth, azimuth)
DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::elevationAttr, float, Elevation, elevation)
DECLARE_ANIMATED_PROPERTY(SVGFELightElement, SVGNames::xAttr, float, X, x)
diff --git a/WebCore/svg/SVGFEMergeElement.cpp b/WebCore/svg/SVGFEMergeElement.cpp
index bbdfd52..6254b24 100644
--- a/WebCore/svg/SVGFEMergeElement.cpp
+++ b/WebCore/svg/SVGFEMergeElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGFEMergeElement::SVGFEMergeElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEMergeElement::SVGFEMergeElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEMergeElement::~SVGFEMergeElement()
+PassRefPtr<SVGFEMergeElement> SVGFEMergeElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEMergeElement(tagName, document));
}
PassRefPtr<FilterEffect> SVGFEMergeElement::build(SVGFilterBuilder* filterBuilder)
diff --git a/WebCore/svg/SVGFEMergeElement.h b/WebCore/svg/SVGFEMergeElement.h
index 1ae6eb4..c07be4c 100644
--- a/WebCore/svg/SVGFEMergeElement.h
+++ b/WebCore/svg/SVGFEMergeElement.h
@@ -29,8 +29,10 @@ namespace WebCore {
class SVGFEMergeElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEMergeElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEMergeElement(const QualifiedName&, Document*);
- virtual ~SVGFEMergeElement();
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
};
diff --git a/WebCore/svg/SVGFEMergeNodeElement.cpp b/WebCore/svg/SVGFEMergeNodeElement.cpp
index 65f7a1d..4bd5ac5 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.cpp
+++ b/WebCore/svg/SVGFEMergeNodeElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGFEMergeNodeElement::~SVGFEMergeNodeElement()
+PassRefPtr<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEMergeNodeElement(tagName, document));
}
void SVGFEMergeNodeElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEMergeNodeElement.h b/WebCore/svg/SVGFEMergeNodeElement.h
index 944081f..65c5d3d 100644
--- a/WebCore/svg/SVGFEMergeNodeElement.h
+++ b/WebCore/svg/SVGFEMergeNodeElement.h
@@ -29,13 +29,14 @@ namespace WebCore {
class SVGFEMergeNodeElement : public SVGElement {
public:
+ static PassRefPtr<SVGFEMergeNodeElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEMergeNodeElement(const QualifiedName&, Document*);
- virtual ~SVGFEMergeNodeElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- private:
DECLARE_ANIMATED_PROPERTY(SVGFEMergeNodeElement, SVGNames::inAttr, String, In1, in1)
};
diff --git a/WebCore/svg/SVGFEMorphologyElement.cpp b/WebCore/svg/SVGFEMorphologyElement.cpp
index 739517f..c3db844 100644
--- a/WebCore/svg/SVGFEMorphologyElement.cpp
+++ b/WebCore/svg/SVGFEMorphologyElement.cpp
@@ -31,14 +31,15 @@ namespace WebCore {
char SVGRadiusXAttrIdentifier[] = "SVGRadiusXAttr";
char SVGRadiusYAttrIdentifier[] = "SVGRadiusYAttr";
-SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document)
+inline SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document* document)
: SVGFilterPrimitiveStandardAttributes(tagName, document)
, m__operator(FEMORPHOLOGY_OPERATOR_ERODE)
{
}
-SVGFEMorphologyElement::~SVGFEMorphologyElement()
+PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEMorphologyElement(tagName, document));
}
void SVGFEMorphologyElement::setRadius(float, float)
diff --git a/WebCore/svg/SVGFEMorphologyElement.h b/WebCore/svg/SVGFEMorphologyElement.h
index d976b92..9bf26ee 100644
--- a/WebCore/svg/SVGFEMorphologyElement.h
+++ b/WebCore/svg/SVGFEMorphologyElement.h
@@ -31,16 +31,17 @@ extern char SVGRadiusYAttrIdentifier[];
class SVGFEMorphologyElement : public SVGFilterPrimitiveStandardAttributes {
public:
- SVGFEMorphologyElement(const QualifiedName&, Document*);
- virtual ~SVGFEMorphologyElement();
+ static PassRefPtr<SVGFEMorphologyElement> create(const QualifiedName&, Document*);
void setRadius(float radiusX, float radiusY);
+private:
+ SVGFEMorphologyElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEMorphologyElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEMorphologyElement, SVGNames::operatorAttr, int, _operator, _operator)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, SVGRadiusXAttrIdentifier, float, RadiusX, radiusX)
diff --git a/WebCore/svg/SVGFEOffsetElement.cpp b/WebCore/svg/SVGFEOffsetElement.cpp
index 006bb3b..b27db31 100644
--- a/WebCore/svg/SVGFEOffsetElement.cpp
+++ b/WebCore/svg/SVGFEOffsetElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFEOffsetElement::~SVGFEOffsetElement()
+PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEOffsetElement(tagName, document));
}
void SVGFEOffsetElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFEOffsetElement.h b/WebCore/svg/SVGFEOffsetElement.h
index 8f93526..e522ce2 100644
--- a/WebCore/svg/SVGFEOffsetElement.h
+++ b/WebCore/svg/SVGFEOffsetElement.h
@@ -29,15 +29,16 @@ namespace WebCore {
class SVGFEOffsetElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFEOffsetElement> create(const QualifiedName&, Document*);
+
+private:
SVGFEOffsetElement(const QualifiedName&, Document*);
- virtual ~SVGFEOffsetElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::dxAttr, float, Dx, dx)
DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::dyAttr, float, Dy, dy)
diff --git a/WebCore/svg/SVGFEPointLightElement.cpp b/WebCore/svg/SVGFEPointLightElement.cpp
index 46568ff..4436ab9 100644
--- a/WebCore/svg/SVGFEPointLightElement.cpp
+++ b/WebCore/svg/SVGFEPointLightElement.cpp
@@ -25,19 +25,19 @@
namespace WebCore {
-SVGFEPointLightElement::SVGFEPointLightElement(const QualifiedName& tagName, Document* doc)
- : SVGFELightElement(tagName, doc)
+inline SVGFEPointLightElement::SVGFEPointLightElement(const QualifiedName& tagName, Document* document)
+ : SVGFELightElement(tagName, document)
{
}
-SVGFEPointLightElement::~SVGFEPointLightElement()
+PassRefPtr<SVGFEPointLightElement> SVGFEPointLightElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFEPointLightElement(tagName, document));
}
PassRefPtr<LightSource> SVGFEPointLightElement::lightSource() const
{
- FloatPoint3D pos(x(), y(), z());
- return PointLightSource::create(pos);
+ return PointLightSource::create(FloatPoint3D(x(), y(), z()));
}
}
diff --git a/WebCore/svg/SVGFEPointLightElement.h b/WebCore/svg/SVGFEPointLightElement.h
index d734f9e..270d36d 100644
--- a/WebCore/svg/SVGFEPointLightElement.h
+++ b/WebCore/svg/SVGFEPointLightElement.h
@@ -24,10 +24,13 @@
#include "SVGFELightElement.h"
namespace WebCore {
+
class SVGFEPointLightElement : public SVGFELightElement {
- public:
+ public:
+ static PassRefPtr<SVGFEPointLightElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFEPointLightElement(const QualifiedName&, Document*);
- virtual ~SVGFEPointLightElement();
virtual PassRefPtr<LightSource> lightSource() const;
};
diff --git a/WebCore/svg/SVGFESpecularLightingElement.cpp b/WebCore/svg/SVGFESpecularLightingElement.cpp
index afbdefe..d07c6ce 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.cpp
+++ b/WebCore/svg/SVGFESpecularLightingElement.cpp
@@ -32,16 +32,17 @@
namespace WebCore {
-SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
- , m_specularConstant(1.0f)
- , m_specularExponent(1.0f)
- , m_surfaceScale(1.0f)
+inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
+ , m_specularConstant(1)
+ , m_specularExponent(1)
+ , m_surfaceScale(1)
{
}
-SVGFESpecularLightingElement::~SVGFESpecularLightingElement()
+PassRefPtr<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFESpecularLightingElement(tagName, document));
}
void SVGFESpecularLightingElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFESpecularLightingElement.h b/WebCore/svg/SVGFESpecularLightingElement.h
index a506cf7..1fed36f 100644
--- a/WebCore/svg/SVGFESpecularLightingElement.h
+++ b/WebCore/svg/SVGFESpecularLightingElement.h
@@ -33,14 +33,15 @@ extern char SVGKernelUnitLengthYIdentifier[];
class SVGFESpecularLightingElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFESpecularLightingElement> create(const QualifiedName&, Document*);
+
+private:
SVGFESpecularLightingElement(const QualifiedName&, Document*);
- virtual ~SVGFESpecularLightingElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::inAttr, String, In1, in1)
DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::specularConstantAttr, float, SpecularConstant, specularConstant)
DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent)
diff --git a/WebCore/svg/SVGFESpotLightElement.cpp b/WebCore/svg/SVGFESpotLightElement.cpp
index 26d0e16..04731f0 100644
--- a/WebCore/svg/SVGFESpotLightElement.cpp
+++ b/WebCore/svg/SVGFESpotLightElement.cpp
@@ -25,13 +25,14 @@
namespace WebCore {
-SVGFESpotLightElement::SVGFESpotLightElement(const QualifiedName& tagName, Document* doc)
- : SVGFELightElement(tagName, doc)
+inline SVGFESpotLightElement::SVGFESpotLightElement(const QualifiedName& tagName, Document* document)
+ : SVGFELightElement(tagName, document)
{
}
-SVGFESpotLightElement::~SVGFESpotLightElement()
+PassRefPtr<SVGFESpotLightElement> SVGFESpotLightElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFESpotLightElement(tagName, document));
}
PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const
diff --git a/WebCore/svg/SVGFESpotLightElement.h b/WebCore/svg/SVGFESpotLightElement.h
index 6903c0b..79fc5fc 100644
--- a/WebCore/svg/SVGFESpotLightElement.h
+++ b/WebCore/svg/SVGFESpotLightElement.h
@@ -24,10 +24,13 @@
#include "SVGFELightElement.h"
namespace WebCore {
+
class SVGFESpotLightElement : public SVGFELightElement {
public:
+ static PassRefPtr<SVGFESpotLightElement> create(const QualifiedName&, Document*);
+
+ private:
SVGFESpotLightElement(const QualifiedName&, Document*);
- virtual ~SVGFESpotLightElement();
virtual PassRefPtr<LightSource> lightSource() const;
};
diff --git a/WebCore/svg/SVGFETileElement.cpp b/WebCore/svg/SVGFETileElement.cpp
index f3f5eaf..4379b96 100644
--- a/WebCore/svg/SVGFETileElement.cpp
+++ b/WebCore/svg/SVGFETileElement.cpp
@@ -28,13 +28,14 @@
namespace WebCore {
-SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
{
}
-SVGFETileElement::~SVGFETileElement()
+PassRefPtr<SVGFETileElement> SVGFETileElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFETileElement(tagName, document));
}
void SVGFETileElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFETileElement.h b/WebCore/svg/SVGFETileElement.h
index 41355e2..03dc08d 100644
--- a/WebCore/svg/SVGFETileElement.h
+++ b/WebCore/svg/SVGFETileElement.h
@@ -29,14 +29,15 @@ namespace WebCore {
class SVGFETileElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFETileElement> create(const QualifiedName&, Document*);
+
+private:
SVGFETileElement(const QualifiedName&, Document*);
- virtual ~SVGFETileElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY(SVGFETileElement, SVGNames::inAttr, String, In1, in1)
};
diff --git a/WebCore/svg/SVGFETurbulenceElement.cpp b/WebCore/svg/SVGFETurbulenceElement.cpp
index 0415e89..5c1d32f 100644
--- a/WebCore/svg/SVGFETurbulenceElement.cpp
+++ b/WebCore/svg/SVGFETurbulenceElement.cpp
@@ -31,16 +31,17 @@ namespace WebCore {
char SVGBaseFrequencyXIdentifier[] = "SVGBaseFrequencyX";
char SVGBaseFrequencyYIdentifier[] = "SVGBaseFrequencyY";
-SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document* doc)
- : SVGFilterPrimitiveStandardAttributes(tagName, doc)
+inline SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document* document)
+ : SVGFilterPrimitiveStandardAttributes(tagName, document)
, m_numOctaves(1)
, m_stitchTiles(SVG_STITCHTYPE_NOSTITCH)
, m_type(FETURBULENCE_TYPE_TURBULENCE)
{
}
-SVGFETurbulenceElement::~SVGFETurbulenceElement()
+PassRefPtr<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFETurbulenceElement(tagName, document));
}
void SVGFETurbulenceElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGFETurbulenceElement.h b/WebCore/svg/SVGFETurbulenceElement.h
index c5820c8..78d47f9 100644
--- a/WebCore/svg/SVGFETurbulenceElement.h
+++ b/WebCore/svg/SVGFETurbulenceElement.h
@@ -38,14 +38,15 @@ enum SVGStitchOptions {
class SVGFETurbulenceElement : public SVGFilterPrimitiveStandardAttributes {
public:
+ static PassRefPtr<SVGFETurbulenceElement> create(const QualifiedName&, Document*);
+
+private:
SVGFETurbulenceElement(const QualifiedName&, Document*);
- virtual ~SVGFETurbulenceElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
-private:
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, SVGBaseFrequencyXIdentifier, float, BaseFrequencyX, baseFrequencyX)
DECLARE_ANIMATED_PROPERTY_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, SVGBaseFrequencyYIdentifier, float, BaseFrequencyY, baseFrequencyY)
DECLARE_ANIMATED_PROPERTY(SVGFETurbulenceElement, SVGNames::numOctavesAttr, long, NumOctaves, numOctaves)
diff --git a/WebCore/svg/SVGFilterElement.cpp b/WebCore/svg/SVGFilterElement.cpp
index eb633c0..3418b9d 100644
--- a/WebCore/svg/SVGFilterElement.cpp
+++ b/WebCore/svg/SVGFilterElement.cpp
@@ -42,8 +42,8 @@ namespace WebCore {
char SVGFilterResXIdentifier[] = "SVGFilterResX";
char SVGFilterResYIdentifier[] = "SVGFilterResY";
-SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, SVGURIReference()
, SVGLangSpace()
, SVGExternalResourcesRequired()
@@ -58,8 +58,9 @@ SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document* doc)
// Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
}
-SVGFilterElement::~SVGFilterElement()
+PassRefPtr<SVGFilterElement> SVGFilterElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFilterElement(tagName, document));
}
void SVGFilterElement::setFilterRes(unsigned long filterResX, unsigned long filterResY)
diff --git a/WebCore/svg/SVGFilterElement.h b/WebCore/svg/SVGFilterElement.h
index ddcd953..67d0a47 100644
--- a/WebCore/svg/SVGFilterElement.h
+++ b/WebCore/svg/SVGFilterElement.h
@@ -40,21 +40,11 @@ class SVGFilterElement : public SVGStyledElement,
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
- SVGFilterElement(const QualifiedName&, Document*);
- virtual ~SVGFilterElement();
-
- virtual bool needsPendingResourceHandling() const { return false; }
+ static PassRefPtr<SVGFilterElement> create(const QualifiedName&, Document*);
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*);
-
static void invalidateFilter(SVGElement* element)
{
ASSERT(element);
@@ -72,6 +62,17 @@ public:
}
private:
+ SVGFilterElement(const QualifiedName&, Document*);
+
+ virtual bool needsPendingResourceHandling() const { return false; }
+
+ 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*);
+
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGFilterElement, SVGNames::filterUnitsAttr, int, FilterUnits, filterUnits)
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
index e91c0a1..07d9241 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -33,8 +33,8 @@
namespace WebCore {
-SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_x(LengthModeWidth, "0%")
, m_y(LengthModeHeight, "0%")
, m_width(LengthModeWidth, "100%")
@@ -44,10 +44,6 @@ SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const
// Spec: If the width/height attribute is not specified, the effect is as if a value of "100%" were specified.
}
-SVGFilterPrimitiveStandardAttributes::~SVGFilterPrimitiveStandardAttributes()
-{
-}
-
void SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(Attribute* attr)
{
const AtomicString& value = attr->value();
diff --git a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
index 8754c6a..2fb41ea 100644
--- a/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
+++ b/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
@@ -35,22 +35,23 @@ namespace WebCore {
class SVGFilterPrimitiveStandardAttributes : public SVGStyledElement {
public:
+ void setStandardAttributes(bool, FilterEffect*) const;
+
+ virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*) = 0;
+
+protected:
SVGFilterPrimitiveStandardAttributes(const QualifiedName&, Document*);
- virtual ~SVGFilterPrimitiveStandardAttributes();
-
- virtual bool isFilterEffect() const { return true; }
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 PassRefPtr<FilterEffect> build(SVGFilterBuilder*) = 0;
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+private:
+ virtual bool isFilterEffect() const { return true; }
- void setStandardAttributes(bool, FilterEffect*) const;
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
-private:
DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::xAttr, SVGLength, X, x)
DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::yAttr, SVGLength, Y, y)
DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::widthAttr, SVGLength, Width, width)
diff --git a/WebCore/svg/SVGFitToViewBox.cpp b/WebCore/svg/SVGFitToViewBox.cpp
index c78a619..5297e8f 100644
--- a/WebCore/svg/SVGFitToViewBox.cpp
+++ b/WebCore/svg/SVGFitToViewBox.cpp
@@ -34,14 +34,6 @@
namespace WebCore {
-SVGFitToViewBox::SVGFitToViewBox()
-{
-}
-
-SVGFitToViewBox::~SVGFitToViewBox()
-{
-}
-
bool SVGFitToViewBox::parseViewBox(Document* doc, const String& s, FloatRect& viewBox)
{
const UChar* c = s.characters();
diff --git a/WebCore/svg/SVGFitToViewBox.h b/WebCore/svg/SVGFitToViewBox.h
index ca0fec8..d6551f5 100644
--- a/WebCore/svg/SVGFitToViewBox.h
+++ b/WebCore/svg/SVGFitToViewBox.h
@@ -31,8 +31,7 @@ class AffineTransform;
class SVGFitToViewBox {
public:
- SVGFitToViewBox();
- virtual ~SVGFitToViewBox();
+ virtual ~SVGFitToViewBox() { }
bool parseViewBox(Document*, const UChar*& start, const UChar* end, FloatRect& viewBox, bool validate = true);
static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
diff --git a/WebCore/svg/SVGFontData.cpp b/WebCore/svg/SVGFontData.cpp
index a88de66..63433ee 100644
--- a/WebCore/svg/SVGFontData.cpp
+++ b/WebCore/svg/SVGFontData.cpp
@@ -36,10 +36,6 @@ SVGFontData::SVGFontData(SVGFontFaceElement* fontFaceElement)
ASSERT_ARG(fontFaceElement, fontFaceElement);
}
-SVGFontData::~SVGFontData()
-{
-}
-
} // namespace WebCore
#endif
diff --git a/WebCore/svg/SVGFontData.h b/WebCore/svg/SVGFontData.h
index c66aa23..e897a59 100644
--- a/WebCore/svg/SVGFontData.h
+++ b/WebCore/svg/SVGFontData.h
@@ -28,7 +28,7 @@ namespace WebCore {
class SVGFontData : public Noncopyable {
public:
SVGFontData(SVGFontFaceElement*);
- virtual ~SVGFontData();
+ virtual ~SVGFontData() { }
SVGFontFaceElement* svgFontFaceElement() const { return m_svgFontFaceElement; }
diff --git a/WebCore/svg/SVGFontElement.cpp b/WebCore/svg/SVGFontElement.cpp
index 2d29042..ae0cb6e 100644
--- a/WebCore/svg/SVGFontElement.cpp
+++ b/WebCore/svg/SVGFontElement.cpp
@@ -40,14 +40,15 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGFontElement::SVGFontElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_isGlyphCacheValid(false)
{
}
-SVGFontElement::~SVGFontElement()
+PassRefPtr<SVGFontElement> SVGFontElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFontElement(tagName, document));
}
void SVGFontElement::synchronizeProperty(const QualifiedName& attrName)
diff --git a/WebCore/svg/SVGFontElement.h b/WebCore/svg/SVGFontElement.h
index 24c2fc5..98bf766 100644
--- a/WebCore/svg/SVGFontElement.h
+++ b/WebCore/svg/SVGFontElement.h
@@ -50,14 +50,11 @@ struct SVGKerningPair {
typedef Vector<SVGKerningPair> KerningPairVector;
class SVGMissingGlyphElement;
+
class SVGFontElement : public SVGStyledElement
, public SVGExternalResourcesRequired {
public:
- SVGFontElement(const QualifiedName&, Document*);
- virtual ~SVGFontElement();
-
- virtual void synchronizeProperty(const QualifiedName&);
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+ static PassRefPtr<SVGFontElement> create(const QualifiedName&, Document*);
void invalidateGlyphCache();
@@ -69,11 +66,16 @@ public:
SVGMissingGlyphElement* firstMissingGlyphElement() const;
private:
- // SVGExternalResourcesRequired
- DECLARE_ANIMATED_PROPERTY(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+ SVGFontElement(const QualifiedName&, Document*);
+
+ virtual void synchronizeProperty(const QualifiedName&);
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
void ensureGlyphCache() const;
+ // SVGExternalResourcesRequired
+ DECLARE_ANIMATED_PROPERTY(SVGFontElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
+
mutable KerningPairVector m_horizontalKerningPairs;
mutable KerningPairVector m_verticalKerningPairs;
mutable SVGGlyphMap m_glyphMap;
diff --git a/WebCore/svg/SVGFontFaceElement.cpp b/WebCore/svg/SVGFontFaceElement.cpp
index 42c1c75..4884074 100644
--- a/WebCore/svg/SVGFontFaceElement.cpp
+++ b/WebCore/svg/SVGFontFaceElement.cpp
@@ -46,18 +46,19 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
, m_fontFaceRule(CSSFontFaceRule::create())
, m_styleDeclaration(CSSMutableStyleDeclaration::create())
{
- m_styleDeclaration->setParent(document()->mappedElementSheet());
+ m_styleDeclaration->setParent(document->mappedElementSheet());
m_styleDeclaration->setStrictParsing(true);
m_fontFaceRule->setDeclaration(m_styleDeclaration.get());
}
-SVGFontFaceElement::~SVGFontFaceElement()
+PassRefPtr<SVGFontFaceElement> SVGFontFaceElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGFontFaceElement(tagName, document));
}
static int cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
@@ -307,7 +308,7 @@ void SVGFontFaceElement::rebuildFontFace()
}
}
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
void SVGFontFaceElement::insertedIntoDocument()
@@ -342,7 +343,7 @@ void SVGFontFaceElement::removeFromMappedElementSheet()
break;
}
}
- document()->updateStyleSelector();
+ document()->styleSelectorChanged(DeferRecalcStyle);
}
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceElement.h b/WebCore/svg/SVGFontFaceElement.h
index 7d1f457..3ee71d8 100644
--- a/WebCore/svg/SVGFontFaceElement.h
+++ b/WebCore/svg/SVGFontFaceElement.h
@@ -33,14 +33,7 @@ namespace WebCore {
class SVGFontFaceElement : public SVGElement {
public:
- SVGFontFaceElement(const QualifiedName&, Document*);
- virtual ~SVGFontFaceElement();
-
- virtual void parseMappedAttribute(Attribute*);
-
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
+ static PassRefPtr<SVGFontFaceElement> create(const QualifiedName&, Document*);
unsigned unitsPerEm() const;
int xHeight() const;
@@ -59,6 +52,14 @@ namespace WebCore {
void removeFromMappedElementSheet();
private:
+ SVGFontFaceElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+
RefPtr<CSSFontFaceRule> m_fontFaceRule;
RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration;
diff --git a/WebCore/svg/SVGFontFaceFormatElement.cpp b/WebCore/svg/SVGFontFaceFormatElement.cpp
index d6e3a3d..e3182c4 100644
--- a/WebCore/svg/SVGFontFaceFormatElement.cpp
+++ b/WebCore/svg/SVGFontFaceFormatElement.cpp
@@ -29,11 +29,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceFormatElement::SVGFontFaceFormatElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceFormatElement::SVGFontFaceFormatElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceFormatElement> SVGFontFaceFormatElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceFormatElement(tagName, document));
+}
+
void SVGFontFaceFormatElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
SVGElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
diff --git a/WebCore/svg/SVGFontFaceFormatElement.h b/WebCore/svg/SVGFontFaceFormatElement.h
index eae22bf..6ca6c1f 100644
--- a/WebCore/svg/SVGFontFaceFormatElement.h
+++ b/WebCore/svg/SVGFontFaceFormatElement.h
@@ -27,6 +27,9 @@ namespace WebCore {
class SVGFontFaceFormatElement : public SVGElement {
public:
+ static PassRefPtr<SVGFontFaceFormatElement> create(const QualifiedName&, Document*);
+
+private:
SVGFontFaceFormatElement(const QualifiedName&, Document*);
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
diff --git a/WebCore/svg/SVGFontFaceNameElement.cpp b/WebCore/svg/SVGFontFaceNameElement.cpp
index b9657b3..39ac2b3 100644
--- a/WebCore/svg/SVGFontFaceNameElement.cpp
+++ b/WebCore/svg/SVGFontFaceNameElement.cpp
@@ -27,11 +27,16 @@
namespace WebCore {
-SVGFontFaceNameElement::SVGFontFaceNameElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceNameElement::SVGFontFaceNameElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceNameElement> SVGFontFaceNameElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceNameElement(tagName, document));
+}
+
PassRefPtr<CSSFontFaceSrcValue> SVGFontFaceNameElement::srcValue() const
{
return CSSFontFaceSrcValue::createLocal(getAttribute(SVGNames::nameAttr));
diff --git a/WebCore/svg/SVGFontFaceNameElement.h b/WebCore/svg/SVGFontFaceNameElement.h
index ab71b7d..462d7a8 100644
--- a/WebCore/svg/SVGFontFaceNameElement.h
+++ b/WebCore/svg/SVGFontFaceNameElement.h
@@ -24,12 +24,17 @@
#include "SVGElement.h"
namespace WebCore {
+
class CSSFontFaceSrcValue;
+
class SVGFontFaceNameElement : public SVGElement {
public:
- SVGFontFaceNameElement(const QualifiedName&, Document*);
+ static PassRefPtr<SVGFontFaceNameElement> create(const QualifiedName&, Document*);
PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
+
+ private:
+ SVGFontFaceNameElement(const QualifiedName&, Document*);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGFontFaceSrcElement.cpp b/WebCore/svg/SVGFontFaceSrcElement.cpp
index 77b2e5e..891ddcd 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.cpp
+++ b/WebCore/svg/SVGFontFaceSrcElement.cpp
@@ -33,11 +33,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceSrcElement::SVGFontFaceSrcElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceSrcElement::SVGFontFaceSrcElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceSrcElement> SVGFontFaceSrcElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceSrcElement(tagName, document));
+}
+
PassRefPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const
{
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
diff --git a/WebCore/svg/SVGFontFaceSrcElement.h b/WebCore/svg/SVGFontFaceSrcElement.h
index 0277e9a..e6f8d30 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.h
+++ b/WebCore/svg/SVGFontFaceSrcElement.h
@@ -24,13 +24,18 @@
#include "SVGElement.h"
namespace WebCore {
+
class CSSValueList;
+
class SVGFontFaceSrcElement : public SVGElement {
public:
- SVGFontFaceSrcElement(const QualifiedName&, Document*);
-
+ static PassRefPtr<SVGFontFaceSrcElement> create(const QualifiedName&, Document*);
+
PassRefPtr<CSSValueList> srcValue() const;
+ private:
+ SVGFontFaceSrcElement(const QualifiedName&, Document*);
+
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
};
diff --git a/WebCore/svg/SVGFontFaceUriElement.cpp b/WebCore/svg/SVGFontFaceUriElement.cpp
index a7ad370..4d03b2b 100644
--- a/WebCore/svg/SVGFontFaceUriElement.cpp
+++ b/WebCore/svg/SVGFontFaceUriElement.cpp
@@ -36,11 +36,16 @@ namespace WebCore {
using namespace SVGNames;
-SVGFontFaceUriElement::SVGFontFaceUriElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGFontFaceUriElement::SVGFontFaceUriElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
+PassRefPtr<SVGFontFaceUriElement> SVGFontFaceUriElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGFontFaceUriElement(tagName, document));
+}
+
SVGFontFaceUriElement::~SVGFontFaceUriElement()
{
if (m_cachedFont)
diff --git a/WebCore/svg/SVGFontFaceUriElement.h b/WebCore/svg/SVGFontFaceUriElement.h
index b026160..74999ac 100644
--- a/WebCore/svg/SVGFontFaceUriElement.h
+++ b/WebCore/svg/SVGFontFaceUriElement.h
@@ -32,15 +32,20 @@ namespace WebCore {
class SVGFontFaceUriElement : public SVGElement, public CachedResourceClient {
public:
- SVGFontFaceUriElement(const QualifiedName&, Document*);
- ~SVGFontFaceUriElement();
-
+ static PassRefPtr<SVGFontFaceUriElement> create(const QualifiedName&, Document*);
+
+ virtual ~SVGFontFaceUriElement();
+
PassRefPtr<CSSFontFaceSrcValue> srcValue() const;
+ private:
+ SVGFontFaceUriElement(const QualifiedName&, Document*);
+
virtual void parseMappedAttribute(Attribute*);
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual void insertedIntoDocument();
+<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
void* operator new(size_t size) {
return SVGElement::operator new(size);
@@ -58,6 +63,8 @@ namespace WebCore {
#endif
private:
+=======
+>>>>>>> webkit.org at r66666
void loadFont();
CachedResourceHandle<CachedFont> m_cachedFont;
diff --git a/WebCore/svg/SVGForeignObjectElement.cpp b/WebCore/svg/SVGForeignObjectElement.cpp
index 3e9e90e..e4f7096 100644
--- a/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/WebCore/svg/SVGForeignObjectElement.cpp
@@ -33,11 +33,8 @@
namespace WebCore {
-SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -45,8 +42,9 @@ SVGForeignObjectElement::SVGForeignObjectElement(const QualifiedName& tagName, D
{
}
-SVGForeignObjectElement::~SVGForeignObjectElement()
+PassRefPtr<SVGForeignObjectElement> SVGForeignObjectElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGForeignObjectElement(tagName, document));
}
void SVGForeignObjectElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGForeignObjectElement.h b/WebCore/svg/SVGForeignObjectElement.h
index 5ce16fd..a587134 100644
--- a/WebCore/svg/SVGForeignObjectElement.h
+++ b/WebCore/svg/SVGForeignObjectElement.h
@@ -35,18 +35,19 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGForeignObjectElement> create(const QualifiedName&, Document*);
+
+ private:
SVGForeignObjectElement(const QualifiedName&, Document*);
- virtual ~SVGForeignObjectElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
virtual RenderObject* createRenderer(RenderArena* arena, RenderStyle* style);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGGElement.cpp b/WebCore/svg/SVGGElement.cpp
index 0c85a03..8174eac 100644
--- a/WebCore/svg/SVGGElement.cpp
+++ b/WebCore/svg/SVGGElement.cpp
@@ -29,16 +29,14 @@
namespace WebCore {
-SVGGElement::SVGGElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+SVGGElement::SVGGElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGGElement::~SVGGElement()
+PassRefPtr<SVGGElement> SVGGElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGGElement(tagName, document));
}
void SVGGElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGGElement.h b/WebCore/svg/SVGGElement.h
index 107fa3c..a149351 100644
--- a/WebCore/svg/SVGGElement.h
+++ b/WebCore/svg/SVGGElement.h
@@ -34,10 +34,16 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
- SVGGElement(const QualifiedName&, Document*);
- virtual ~SVGGElement();
+ static PassRefPtr<SVGGElement> create(const QualifiedName&, Document*);
virtual bool isShadowTreeContainerElement() const { return false; }
+
+ protected:
+ SVGGElement(const QualifiedName&, Document*);
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+ private:
virtual bool isValid() const { return SVGTests::isValid(); }
virtual void parseMappedAttribute(Attribute*);
@@ -45,9 +51,7 @@ namespace WebCore {
virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return true; }
- virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGGElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
diff --git a/WebCore/svg/SVGGlyphElement.cpp b/WebCore/svg/SVGGlyphElement.cpp
index 2c84841..8ded0fc 100644
--- a/WebCore/svg/SVGGlyphElement.cpp
+++ b/WebCore/svg/SVGGlyphElement.cpp
@@ -37,13 +37,14 @@ namespace WebCore {
using namespace SVGNames;
-SVGGlyphElement::SVGGlyphElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGGlyphElement::SVGGlyphElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGGlyphElement::~SVGGlyphElement()
+PassRefPtr<SVGGlyphElement> SVGGlyphElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGGlyphElement(tagName, document));
}
void SVGGlyphElement::invalidateGlyphCache()
diff --git a/WebCore/svg/SVGGlyphElement.h b/WebCore/svg/SVGGlyphElement.h
index 5b5408d..a7dd570 100644
--- a/WebCore/svg/SVGGlyphElement.h
+++ b/WebCore/svg/SVGGlyphElement.h
@@ -103,15 +103,7 @@ namespace WebCore {
class SVGGlyphElement : public SVGStyledElement {
public:
- SVGGlyphElement(const QualifiedName&, Document*);
- virtual ~SVGGlyphElement();
-
- virtual void parseMappedAttribute(Attribute*);
-
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
-
- virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+ static PassRefPtr<SVGGlyphElement> create(const QualifiedName&, Document*);
SVGGlyphIdentifier buildGlyphIdentifier() const;
@@ -121,7 +113,17 @@ namespace WebCore {
// Helper function shared between SVGGlyphElement & SVGMissingGlyphElement
static SVGGlyphIdentifier buildGenericGlyphIdentifier(const SVGElement*);
+
private:
+ SVGGlyphElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+
+ virtual bool rendererIsNeeded(RenderStyle*) { return false; }
+
void invalidateGlyphCache();
};
diff --git a/WebCore/svg/SVGGradientElement.cpp b/WebCore/svg/SVGGradientElement.cpp
index f2d9712..523e4df 100644
--- a/WebCore/svg/SVGGradientElement.cpp
+++ b/WebCore/svg/SVGGradientElement.cpp
@@ -38,19 +38,13 @@
namespace WebCore {
-SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGURIReference()
- , SVGExternalResourcesRequired()
+SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
, m_gradientTransform(SVGTransformList::create(SVGNames::gradientTransformAttr))
{
}
-SVGGradientElement::~SVGGradientElement()
-{
-}
-
void SVGGradientElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::gradientUnitsAttr) {
diff --git a/WebCore/svg/SVGGradientElement.h b/WebCore/svg/SVGGradientElement.h
index 9976d7d..d1e7914 100644
--- a/WebCore/svg/SVGGradientElement.h
+++ b/WebCore/svg/SVGGradientElement.h
@@ -34,20 +34,20 @@ namespace WebCore {
public SVGURIReference,
public SVGExternalResourcesRequired {
public:
+ Vector<Gradient::ColorStop> buildStops();
+
+ protected:
SVGGradientElement(const QualifiedName&, Document*);
- virtual ~SVGGradientElement();
-
- virtual bool needsPendingResourceHandling() const { return false; }
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
+ private:
+ virtual bool needsPendingResourceHandling() const { return false; }
+
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- Vector<Gradient::ColorStop> buildStops();
-
- protected:
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod)
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits)
DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList*, GradientTransform, gradientTransform)
diff --git a/WebCore/svg/SVGHKernElement.cpp b/WebCore/svg/SVGHKernElement.cpp
index eb8a4b5..a432daa 100644
--- a/WebCore/svg/SVGHKernElement.cpp
+++ b/WebCore/svg/SVGHKernElement.cpp
@@ -35,13 +35,14 @@ namespace WebCore {
using namespace SVGNames;
-SVGHKernElement::SVGHKernElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGHKernElement::SVGHKernElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGHKernElement::~SVGHKernElement()
+PassRefPtr<SVGHKernElement> SVGHKernElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGHKernElement(tagName, document));
}
void SVGHKernElement::insertedIntoDocument()
diff --git a/WebCore/svg/SVGHKernElement.h b/WebCore/svg/SVGHKernElement.h
index bd893d8..7249fac 100644
--- a/WebCore/svg/SVGHKernElement.h
+++ b/WebCore/svg/SVGHKernElement.h
@@ -24,27 +24,22 @@
#if ENABLE(SVG_FONTS)
#include "SVGFontElement.h"
-#include "SVGParserUtilities.h"
-#include "SVGStyledElement.h"
-#include <wtf/Forward.h>
-
-#include <limits>
namespace WebCore {
- class SVGFontData;
-
class SVGHKernElement : public SVGElement {
public:
+ static PassRefPtr<SVGHKernElement> create(const QualifiedName&, Document*);
+
+ void buildHorizontalKerningPair(KerningPairVector&);
+
+ private:
SVGHKernElement(const QualifiedName&, Document*);
- virtual ~SVGHKernElement();
virtual void insertedIntoDocument();
virtual void removedFromDocument();
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
-
- void buildHorizontalKerningPair(KerningPairVector&);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGImageElement.cpp b/WebCore/svg/SVGImageElement.cpp
index c5e4802..f6fa013 100644
--- a/WebCore/svg/SVGImageElement.cpp
+++ b/WebCore/svg/SVGImageElement.cpp
@@ -26,6 +26,7 @@
#include "Attribute.h"
#include "CSSPropertyNames.h"
+#include "RenderImageResource.h"
#include "RenderSVGImage.h"
#include "RenderSVGResource.h"
#include "SVGDocument.h"
@@ -36,12 +37,8 @@
namespace WebCore {
-SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGURIReference()
+inline SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -50,8 +47,9 @@ SVGImageElement::SVGImageElement(const QualifiedName& tagName, Document* doc)
{
}
-SVGImageElement::~SVGImageElement()
+PassRefPtr<SVGImageElement> SVGImageElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGImageElement(tagName, document));
}
void SVGImageElement::parseMappedAttribute(Attribute* attr)
@@ -172,10 +170,10 @@ void SVGImageElement::attach()
SVGStyledTransformableElement::attach();
if (RenderSVGImage* imageObj = toRenderSVGImage(renderer())) {
- if (imageObj->hasImage())
+ if (imageObj->imageResource()->hasImage())
return;
- imageObj->setCachedImage(m_imageLoader.image());
+ imageObj->imageResource()->setCachedImage(m_imageLoader.image());
}
}
diff --git a/WebCore/svg/SVGImageElement.h b/WebCore/svg/SVGImageElement.h
index cf4cf88..9024415 100644
--- a/WebCore/svg/SVGImageElement.h
+++ b/WebCore/svg/SVGImageElement.h
@@ -40,8 +40,10 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
+ static PassRefPtr<SVGImageElement> create(const QualifiedName&, Document*);
+
+ private:
SVGImageElement(const QualifiedName&, Document*);
- virtual ~SVGImageElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -57,10 +59,8 @@ namespace WebCore {
virtual const QualifiedName& imageSourceAttributeName() const;
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
- protected:
virtual bool haveLoadedRequiredResources();
- private:
virtual bool selfHasRelativeLengths() const;
virtual void willMoveToNewOwnerDocument();
diff --git a/WebCore/svg/SVGImageLoader.cpp b/WebCore/svg/SVGImageLoader.cpp
index 3d04863..5ba9c81 100644
--- a/WebCore/svg/SVGImageLoader.cpp
+++ b/WebCore/svg/SVGImageLoader.cpp
@@ -35,10 +35,6 @@ SVGImageLoader::SVGImageLoader(SVGImageElement* node)
{
}
-SVGImageLoader::~SVGImageLoader()
-{
-}
-
void SVGImageLoader::dispatchLoadEvent()
{
if (image()->errorOccurred())
diff --git a/WebCore/svg/SVGImageLoader.h b/WebCore/svg/SVGImageLoader.h
index 807a9bc..98dcffc 100644
--- a/WebCore/svg/SVGImageLoader.h
+++ b/WebCore/svg/SVGImageLoader.h
@@ -30,8 +30,8 @@ namespace WebCore {
class SVGImageLoader : public ImageLoader {
public:
SVGImageLoader(SVGImageElement*);
- virtual ~SVGImageLoader();
+ private:
virtual void dispatchLoadEvent();
virtual String sourceURI(const AtomicString&) const;
};
diff --git a/WebCore/svg/SVGLangSpace.cpp b/WebCore/svg/SVGLangSpace.cpp
index 4ac7c00..ad6458c 100644
--- a/WebCore/svg/SVGLangSpace.cpp
+++ b/WebCore/svg/SVGLangSpace.cpp
@@ -30,19 +30,6 @@
namespace WebCore {
-SVGLangSpace::SVGLangSpace()
-{
-}
-
-SVGLangSpace::~SVGLangSpace()
-{
-}
-
-const AtomicString& SVGLangSpace::xmllang() const
-{
- return m_lang;
-}
-
void SVGLangSpace::setXmllang(const AtomicString& xmlLang)
{
m_lang = xmlLang;
diff --git a/WebCore/svg/SVGLangSpace.h b/WebCore/svg/SVGLangSpace.h
index 64e435d..723fa7a 100644
--- a/WebCore/svg/SVGLangSpace.h
+++ b/WebCore/svg/SVGLangSpace.h
@@ -31,10 +31,7 @@ namespace WebCore {
class SVGLangSpace {
public:
- SVGLangSpace();
- virtual ~SVGLangSpace();
-
- const AtomicString& xmllang() const;
+ const AtomicString& xmllang() const { return m_lang; }
void setXmllang(const AtomicString& xmlLang);
const AtomicString& xmlspace() const;
diff --git a/WebCore/svg/SVGLengthList.cpp b/WebCore/svg/SVGLengthList.cpp
index d144ca0..2149e04 100644
--- a/WebCore/svg/SVGLengthList.cpp
+++ b/WebCore/svg/SVGLengthList.cpp
@@ -32,10 +32,6 @@ SVGLengthList::SVGLengthList(const QualifiedName& attributeName)
{
}
-SVGLengthList::~SVGLengthList()
-{
-}
-
void SVGLengthList::parse(const String& value, SVGLengthMode mode)
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGLengthList.h b/WebCore/svg/SVGLengthList.h
index bbabf62..27b958f 100644
--- a/WebCore/svg/SVGLengthList.h
+++ b/WebCore/svg/SVGLengthList.h
@@ -30,9 +30,8 @@ namespace WebCore {
class SVGLengthList : public SVGPODList<SVGLength> {
public:
static PassRefPtr<SVGLengthList> create(const QualifiedName& attributeName) { return adoptRef(new SVGLengthList(attributeName)); }
- virtual ~SVGLengthList();
- void parse(const String& value, SVGLengthMode mode);
+ void parse(const String& value, SVGLengthMode);
String valueAsString() const;
diff --git a/WebCore/svg/SVGLineElement.cpp b/WebCore/svg/SVGLineElement.cpp
index ebbcdf6..bd15890 100644
--- a/WebCore/svg/SVGLineElement.cpp
+++ b/WebCore/svg/SVGLineElement.cpp
@@ -32,11 +32,8 @@
namespace WebCore {
-SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x1(LengthModeWidth)
, m_y1(LengthModeHeight)
, m_x2(LengthModeWidth)
@@ -44,8 +41,9 @@ SVGLineElement::SVGLineElement(const QualifiedName& tagName, Document* doc)
{
}
-SVGLineElement::~SVGLineElement()
+PassRefPtr<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGLineElement(tagName, document));
}
void SVGLineElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGLineElement.h b/WebCore/svg/SVGLineElement.h
index cdfa2aa..21007f0 100644
--- a/WebCore/svg/SVGLineElement.h
+++ b/WebCore/svg/SVGLineElement.h
@@ -36,8 +36,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document*);
+
+ private:
SVGLineElement(const QualifiedName&, Document*);
- virtual ~SVGLineElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -49,7 +51,6 @@ namespace WebCore {
virtual bool supportsMarkers() const { return true; }
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGLineElement, SVGNames::x1Attr, SVGLength, X1, x1)
diff --git a/WebCore/svg/SVGLinearGradientElement.cpp b/WebCore/svg/SVGLinearGradientElement.cpp
index d3c81b0..ec351d7 100644
--- a/WebCore/svg/SVGLinearGradientElement.cpp
+++ b/WebCore/svg/SVGLinearGradientElement.cpp
@@ -39,8 +39,8 @@
namespace WebCore {
-SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* doc)
- : SVGGradientElement(tagName, doc)
+inline SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document* document)
+ : SVGGradientElement(tagName, document)
, m_x1(LengthModeWidth)
, m_y1(LengthModeHeight)
, m_x2(LengthModeWidth, "100%")
@@ -49,8 +49,9 @@ SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName,
// Spec: If the x2 attribute is not specified, the effect is as if a value of "100%" were specified.
}
-SVGLinearGradientElement::~SVGLinearGradientElement()
+PassRefPtr<SVGLinearGradientElement> SVGLinearGradientElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGLinearGradientElement(tagName, document));
}
void SVGLinearGradientElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGLinearGradientElement.h b/WebCore/svg/SVGLinearGradientElement.h
index b329d8b..dec912f 100644
--- a/WebCore/svg/SVGLinearGradientElement.h
+++ b/WebCore/svg/SVGLinearGradientElement.h
@@ -31,8 +31,13 @@ namespace WebCore {
class SVGLinearGradientElement : public SVGGradientElement {
public:
+ static PassRefPtr<SVGLinearGradientElement> create(const QualifiedName&, Document*);
+
+ LinearGradientAttributes collectGradientProperties();
+ void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
+
+ private:
SVGLinearGradientElement(const QualifiedName&, Document*);
- virtual ~SVGLinearGradientElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
@@ -40,10 +45,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- LinearGradientAttributes collectGradientProperties();
- void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGLinearGradientElement, SVGNames::x1Attr, SVGLength, X1, x1)
diff --git a/WebCore/svg/SVGLocatable.cpp b/WebCore/svg/SVGLocatable.cpp
index b7b4440..3311a5a 100644
--- a/WebCore/svg/SVGLocatable.cpp
+++ b/WebCore/svg/SVGLocatable.cpp
@@ -31,14 +31,6 @@
namespace WebCore {
-SVGLocatable::SVGLocatable()
-{
-}
-
-SVGLocatable::~SVGLocatable()
-{
-}
-
static bool isViewportElement(Node* node)
{
return (node->hasTagName(SVGNames::svgTag)
diff --git a/WebCore/svg/SVGLocatable.h b/WebCore/svg/SVGLocatable.h
index 2e51dc5..b19f5cd 100644
--- a/WebCore/svg/SVGLocatable.h
+++ b/WebCore/svg/SVGLocatable.h
@@ -33,8 +33,7 @@ class SVGElement;
class SVGLocatable {
public:
- SVGLocatable();
- virtual ~SVGLocatable();
+ virtual ~SVGLocatable() { }
// 'SVGLocatable' functions
virtual SVGElement* nearestViewportElement() const = 0;
diff --git a/WebCore/svg/SVGMPathElement.cpp b/WebCore/svg/SVGMPathElement.cpp
index 7165c11..c6da308 100644
--- a/WebCore/svg/SVGMPathElement.cpp
+++ b/WebCore/svg/SVGMPathElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGMPathElement::SVGMPathElement(const QualifiedName& qname, Document* doc)
- : SVGElement(qname, doc)
+inline SVGMPathElement::SVGMPathElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGMPathElement::~SVGMPathElement()
+PassRefPtr<SVGMPathElement> SVGMPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMPathElement(tagName, document));
}
void SVGMPathElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGMPathElement.h b/WebCore/svg/SVGMPathElement.h
index 7543b6e..1bbe7d3 100644
--- a/WebCore/svg/SVGMPathElement.h
+++ b/WebCore/svg/SVGMPathElement.h
@@ -32,15 +32,16 @@ namespace WebCore {
public SVGURIReference,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGMPathElement> create(const QualifiedName&, Document*);
+
+ SVGPathElement* pathElement();
+
+ private:
SVGMPathElement(const QualifiedName&, Document*);
- virtual ~SVGMPathElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- SVGPathElement* pathElement();
-
- private:
// SVGURIReference
DECLARE_ANIMATED_PROPERTY(SVGMPathElement, XLinkNames::hrefAttr, String, Href, href)
diff --git a/WebCore/svg/SVGMarkerElement.cpp b/WebCore/svg/SVGMarkerElement.cpp
index 8e6296d..4ff420d 100644
--- a/WebCore/svg/SVGMarkerElement.cpp
+++ b/WebCore/svg/SVGMarkerElement.cpp
@@ -38,11 +38,8 @@ namespace WebCore {
char SVGOrientTypeAttrIdentifier[] = "SVGOrientTypeAttr";
char SVGOrientAngleAttrIdentifier[] = "SVGOrientAngleAttr";
-SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
+SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_refX(LengthModeWidth)
, m_refY(LengthModeHeight)
, m_markerWidth(LengthModeWidth, "3")
@@ -53,8 +50,9 @@ SVGMarkerElement::SVGMarkerElement(const QualifiedName& tagName, Document* doc)
// Spec: If the markerWidth/markerHeight attribute is not specified, the effect is as if a value of "3" were specified.
}
-SVGMarkerElement::~SVGMarkerElement()
+PassRefPtr<SVGMarkerElement> SVGMarkerElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMarkerElement(tagName, document));
}
AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index 436aaa7..7782739 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -53,16 +53,18 @@ public:
SVG_MARKER_ORIENT_ANGLE = 2
};
- SVGMarkerElement(const QualifiedName&, Document*);
- virtual ~SVGMarkerElement();
-
- virtual bool needsPendingResourceHandling() const { return false; }
+ static PassRefPtr<SVGMarkerElement> create(const QualifiedName&, Document*);
AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
void setOrientToAuto();
void setOrientToAngle(const SVGAngle&);
+private:
+ SVGMarkerElement(const QualifiedName&, Document*);
+
+ virtual bool needsPendingResourceHandling() const { return false; }
+
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
@@ -70,7 +72,6 @@ public:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGMarkerElement, SVGNames::refXAttr, SVGLength, RefX, refX)
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index 4f245ce..78c3732 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -38,11 +38,8 @@ using namespace std;
namespace WebCore {
-SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledLocatableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledLocatableElement(tagName, document)
, m_maskUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
, m_maskContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
, m_x(LengthModeWidth, "-10%")
@@ -54,8 +51,9 @@ SVGMaskElement::SVGMaskElement(const QualifiedName& tagName, Document* doc)
// Spec: If the width/height attribute is not specified, the effect is as if a value of "120%" were specified.
}
-SVGMaskElement::~SVGMaskElement()
+PassRefPtr<SVGMaskElement> SVGMaskElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMaskElement(tagName, document));
}
void SVGMaskElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGMaskElement.h b/WebCore/svg/SVGMaskElement.h
index 91d9bc9..c951beb 100644
--- a/WebCore/svg/SVGMaskElement.h
+++ b/WebCore/svg/SVGMaskElement.h
@@ -36,13 +36,16 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*);
+
+ FloatRect maskBoundingBox(const FloatRect&) const;
+
+ private:
SVGMaskElement(const QualifiedName&, Document*);
- virtual ~SVGMaskElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool needsPendingResourceHandling() const { return false; }
- FloatRect maskBoundingBox(const FloatRect&) const;
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
@@ -50,7 +53,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGMaskElement, SVGNames::maskUnitsAttr, int, MaskUnits, maskUnits)
diff --git a/WebCore/svg/SVGMetadataElement.cpp b/WebCore/svg/SVGMetadataElement.cpp
index 28a34d6..6db3806 100644
--- a/WebCore/svg/SVGMetadataElement.cpp
+++ b/WebCore/svg/SVGMetadataElement.cpp
@@ -22,15 +22,18 @@
#if ENABLE(SVG)
#include "SVGMetadataElement.h"
-using namespace WebCore;
+namespace WebCore {
-SVGMetadataElement::SVGMetadataElement(const QualifiedName& tagName, Document *doc)
-: SVGElement(tagName, doc)
+inline SVGMetadataElement::SVGMetadataElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGMetadataElement::~SVGMetadataElement()
+PassRefPtr<SVGMetadataElement> SVGMetadataElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGMetadataElement(tagName, document));
+}
+
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGMetadataElement.h b/WebCore/svg/SVGMetadataElement.h
index 6323f12..4cac5bc 100644
--- a/WebCore/svg/SVGMetadataElement.h
+++ b/WebCore/svg/SVGMetadataElement.h
@@ -25,10 +25,13 @@
#include "SVGElement.h"
namespace WebCore {
+
class SVGMetadataElement : public SVGElement {
public:
+ static PassRefPtr<SVGMetadataElement> create(const QualifiedName&, Document*);
+
+ private:
SVGMetadataElement(const QualifiedName&, Document*);
- virtual ~SVGMetadataElement();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGMissingGlyphElement.cpp b/WebCore/svg/SVGMissingGlyphElement.cpp
index 3fe531c..4c80494 100644
--- a/WebCore/svg/SVGMissingGlyphElement.cpp
+++ b/WebCore/svg/SVGMissingGlyphElement.cpp
@@ -24,11 +24,16 @@
namespace WebCore {
-SVGMissingGlyphElement::SVGMissingGlyphElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGMissingGlyphElement::SVGMissingGlyphElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
+PassRefPtr<SVGMissingGlyphElement> SVGMissingGlyphElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGMissingGlyphElement(tagName, document));
+}
+
}
#endif // ENABLE(SVG_FONTS)
diff --git a/WebCore/svg/SVGMissingGlyphElement.h b/WebCore/svg/SVGMissingGlyphElement.h
index 9dde843..ecae295 100644
--- a/WebCore/svg/SVGMissingGlyphElement.h
+++ b/WebCore/svg/SVGMissingGlyphElement.h
@@ -24,8 +24,12 @@
#include "SVGStyledElement.h"
namespace WebCore {
+
class SVGMissingGlyphElement : public SVGStyledElement {
public:
+ static PassRefPtr<SVGMissingGlyphElement> create(const QualifiedName&, Document*);
+
+ private:
SVGMissingGlyphElement(const QualifiedName&, Document*);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
diff --git a/WebCore/svg/SVGNumberList.cpp b/WebCore/svg/SVGNumberList.cpp
index 0603af7..96fe55f 100644
--- a/WebCore/svg/SVGNumberList.cpp
+++ b/WebCore/svg/SVGNumberList.cpp
@@ -32,10 +32,6 @@ SVGNumberList::SVGNumberList(const QualifiedName& attributeName)
{
}
-SVGNumberList::~SVGNumberList()
-{
-}
-
void SVGNumberList::parse(const String& value)
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGNumberList.h b/WebCore/svg/SVGNumberList.h
index fa29356..e64b0b7 100644
--- a/WebCore/svg/SVGNumberList.h
+++ b/WebCore/svg/SVGNumberList.h
@@ -31,7 +31,6 @@ namespace WebCore {
class SVGNumberList : public SVGPODList<float> {
public:
static PassRefPtr<SVGNumberList> create(const QualifiedName& attributeName) { return adoptRef(new SVGNumberList(attributeName)); }
- virtual ~SVGNumberList();
void parse(const String& value);
diff --git a/WebCore/svg/SVGPaint.cpp b/WebCore/svg/SVGPaint.cpp
index a2100aa..b36e97d 100644
--- a/WebCore/svg/SVGPaint.cpp
+++ b/WebCore/svg/SVGPaint.cpp
@@ -63,10 +63,6 @@ SVGPaint::SVGPaint(const String& uri, const Color& c)
setUri(uri);
}
-SVGPaint::~SVGPaint()
-{
-}
-
SVGPaint* SVGPaint::defaultFill()
{
static SVGPaint* staticDefaultFill = create(Color::black).releaseRef();
diff --git a/WebCore/svg/SVGPaint.h b/WebCore/svg/SVGPaint.h
index e86c315..f0ceb4c 100644
--- a/WebCore/svg/SVGPaint.h
+++ b/WebCore/svg/SVGPaint.h
@@ -64,16 +64,12 @@ namespace WebCore {
return adoptRef(new SVGPaint(uri, color));
}
- virtual ~SVGPaint();
-
// 'SVGPaint' functions
SVGPaintType paintType() const { return m_paintType; }
String uri() const;
void setUri(const String&);
void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
-
- virtual String cssText() const;
static SVGPaint* defaultFill();
static SVGPaint* defaultStroke();
@@ -90,6 +86,8 @@ namespace WebCore {
virtual bool isSVGPaint() const { return true; }
+ virtual String cssText() const;
+
SVGPaintType m_paintType;
String m_uri;
};
diff --git a/WebCore/svg/SVGParserUtilities.cpp b/WebCore/svg/SVGParserUtilities.cpp
index 5bf2fbc..b8b6d85 100644
--- a/WebCore/svg/SVGParserUtilities.cpp
+++ b/WebCore/svg/SVGParserUtilities.cpp
@@ -34,11 +34,10 @@
namespace WebCore {
-/* We use this generic _parseNumber function to allow the Path parsing code to work
- * at a higher precision internally, without any unnecessary runtime cost or code
- * complexity
- */
-template <typename FloatType> static bool _parseNumber(const UChar*& ptr, const UChar* end, FloatType& number, bool skip)
+// We use this generic parseNumber function to allow the Path parsing code to work
+// at a higher precision internally, without any unnecessary runtime cost or code
+// complexity.
+template <typename FloatType> static bool genericParseNumber(const UChar*& ptr, const UChar* end, FloatType& number, bool skip)
{
int exponent;
FloatType integer, decimal, frac;
@@ -127,7 +126,7 @@ template <typename FloatType> static bool _parseNumber(const UChar*& ptr, const
bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip)
{
- return _parseNumber(ptr, end, number, skip);
+ return genericParseNumber(ptr, end, number, skip);
}
// only used to parse largeArcFlag and sweepFlag which must be a "0" or "1"
diff --git a/WebCore/svg/SVGPathBlender.cpp b/WebCore/svg/SVGPathBlender.cpp
index 8320890..d46e24a 100644
--- a/WebCore/svg/SVGPathBlender.cpp
+++ b/WebCore/svg/SVGPathBlender.cpp
@@ -34,10 +34,6 @@ SVGPathBlender::SVGPathBlender()
{
}
-SVGPathBlender::~SVGPathBlender()
-{
-}
-
float SVGPathBlender::blendAnimatedFloat(float from, float to)
{
return (to - from) * m_progress + from;
diff --git a/WebCore/svg/SVGPathBlender.h b/WebCore/svg/SVGPathBlender.h
index a15c0ad..c0ae7f3 100644
--- a/WebCore/svg/SVGPathBlender.h
+++ b/WebCore/svg/SVGPathBlender.h
@@ -30,7 +30,6 @@ namespace WebCore {
class SVGPathBlender : public Noncopyable {
public:
SVGPathBlender();
- ~SVGPathBlender();
bool blendAnimatedPath(float, SVGPathSource*, SVGPathSource*, SVGPathConsumer*);
void cleanup();
diff --git a/WebCore/svg/SVGPathBuilder.h b/WebCore/svg/SVGPathBuilder.h
index 38eabd4..f3c2632 100644
--- a/WebCore/svg/SVGPathBuilder.h
+++ b/WebCore/svg/SVGPathBuilder.h
@@ -36,18 +36,18 @@ public:
SVGPathBuilder();
void setCurrentPath(Path* path) { m_path = path; }
+
+private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup() { m_path = 0; }
-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(); }
diff --git a/WebCore/svg/SVGPathByteStreamBuilder.h b/WebCore/svg/SVGPathByteStreamBuilder.h
index c89856f..55803aa 100644
--- a/WebCore/svg/SVGPathByteStreamBuilder.h
+++ b/WebCore/svg/SVGPathByteStreamBuilder.h
@@ -34,18 +34,18 @@ public:
SVGPathByteStreamBuilder();
void setCurrentByteStream(SVGPathByteStream* byteStream) { m_byteStream = byteStream; }
+
+private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup() { m_byteStream = 0; }
-private:
// Used in UnalteredParsing/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);
@@ -54,7 +54,6 @@ private:
virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode);
-private:
template<typename ByteType>
void writeType(const ByteType& type)
{
diff --git a/WebCore/svg/SVGPathByteStreamSource.cpp b/WebCore/svg/SVGPathByteStreamSource.cpp
index e6a60e3..d0475f3 100644
--- a/WebCore/svg/SVGPathByteStreamSource.cpp
+++ b/WebCore/svg/SVGPathByteStreamSource.cpp
@@ -32,10 +32,6 @@ SVGPathByteStreamSource::SVGPathByteStreamSource(SVGPathByteStream* stream)
m_streamEnd = stream->end();
}
-SVGPathByteStreamSource::~SVGPathByteStreamSource()
-{
-}
-
bool SVGPathByteStreamSource::hasMoreData() const
{
return m_streamCurrent < m_streamEnd;
diff --git a/WebCore/svg/SVGPathByteStreamSource.h b/WebCore/svg/SVGPathByteStreamSource.h
index 2537ad2..6895c73 100644
--- a/WebCore/svg/SVGPathByteStreamSource.h
+++ b/WebCore/svg/SVGPathByteStreamSource.h
@@ -35,7 +35,8 @@ public:
return adoptPtr(new SVGPathByteStreamSource(stream));
}
- virtual ~SVGPathByteStreamSource();
+private:
+ SVGPathByteStreamSource(SVGPathByteStream*);
virtual bool hasMoreData() const;
virtual bool moveToNextToken() { return true; }
@@ -52,9 +53,6 @@ public:
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
-private:
- SVGPathByteStreamSource(SVGPathByteStream*);
-
#if COMPILER(MSVC)
#pragma warning(disable: 4701)
#endif
diff --git a/WebCore/svg/SVGPathConsumer.h b/WebCore/svg/SVGPathConsumer.h
index 629c1bf..b7c5e73 100644
--- a/WebCore/svg/SVGPathConsumer.h
+++ b/WebCore/svg/SVGPathConsumer.h
@@ -46,14 +46,12 @@ public:
virtual bool continueConsuming() = 0;
virtual void cleanup() = 0;
-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;
@@ -63,7 +61,6 @@ public:
virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode) = 0;
protected:
- SVGPathConsumer() { }
virtual ~SVGPathConsumer() { }
};
diff --git a/WebCore/svg/SVGPathElement.cpp b/WebCore/svg/SVGPathElement.cpp
index 6d801fb..3ed85a3 100644
--- a/WebCore/svg/SVGPathElement.cpp
+++ b/WebCore/svg/SVGPathElement.cpp
@@ -44,16 +44,14 @@
namespace WebCore {
-SVGPathElement::SVGPathElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGPathElement::SVGPathElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGPathElement::~SVGPathElement()
+PassRefPtr<SVGPathElement> SVGPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPathElement(tagName, document));
}
float SVGPathElement::getTotalLength()
diff --git a/WebCore/svg/SVGPathElement.h b/WebCore/svg/SVGPathElement.h
index 07612c6..cc4e7bd 100644
--- a/WebCore/svg/SVGPathElement.h
+++ b/WebCore/svg/SVGPathElement.h
@@ -50,16 +50,15 @@ namespace WebCore {
class SVGPathSegCurvetoCubicSmoothRel;
class SVGPathSegCurvetoQuadraticSmoothAbs;
class SVGPathSegCurvetoQuadraticSmoothRel;
+
class SVGPathElement : public SVGStyledTransformableElement,
public SVGTests,
public SVGLangSpace,
public SVGExternalResourcesRequired,
public SVGAnimatedPathData {
public:
- SVGPathElement(const QualifiedName&, Document*);
- virtual ~SVGPathElement();
+ static PassRefPtr<SVGPathElement> create(const QualifiedName&, Document*);
- virtual bool isValid() const { return SVGTests::isValid(); }
float getTotalLength();
FloatPoint getPointAtLength(float distance);
unsigned long getPathSegAtLength(float distance);
@@ -90,15 +89,19 @@ namespace WebCore {
virtual SVGPathSegList* animatedPathSegList() const;
virtual SVGPathSegList* animatedNormalizedPathSegList() const;
+ virtual Path toPathData() const;
+
+ private:
+ SVGPathElement(const QualifiedName&, Document*);
+
+ virtual bool isValid() const { return SVGTests::isValid(); }
+
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- virtual Path toPathData() const;
-
virtual bool supportsMarkers() const { return true; }
- private:
mutable RefPtr<SVGPathSegList> m_pathSegList;
DECLARE_ANIMATED_PROPERTY(SVGPathElement, SVGNames::pathLengthAttr, float, PathLength, pathLength)
diff --git a/WebCore/svg/SVGPathParser.cpp b/WebCore/svg/SVGPathParser.cpp
index 66bd00f..a0d6847 100644
--- a/WebCore/svg/SVGPathParser.cpp
+++ b/WebCore/svg/SVGPathParser.cpp
@@ -38,10 +38,6 @@ SVGPathParser::SVGPathParser()
{
}
-SVGPathParser::~SVGPathParser()
-{
-}
-
void SVGPathParser::parseClosePathSegment()
{
// Reset m_currentPoint for the next path.
diff --git a/WebCore/svg/SVGPathParser.h b/WebCore/svg/SVGPathParser.h
index 5393fc2..7679a95 100644
--- a/WebCore/svg/SVGPathParser.h
+++ b/WebCore/svg/SVGPathParser.h
@@ -37,7 +37,6 @@ namespace WebCore {
class SVGPathParser : public Noncopyable {
public:
SVGPathParser();
- ~SVGPathParser();
bool parsePathDataFromSource(PathParsingMode pathParsingMode);
void setCurrentConsumer(SVGPathConsumer* consumer) { m_consumer = consumer; }
diff --git a/WebCore/svg/SVGPathSeg.cpp b/WebCore/svg/SVGPathSeg.cpp
index 56ee56c..5939976 100644
--- a/WebCore/svg/SVGPathSeg.cpp
+++ b/WebCore/svg/SVGPathSeg.cpp
@@ -31,20 +31,6 @@
namespace WebCore {
-SVGPathSeg::~SVGPathSeg()
-{
-}
-
-unsigned short SVGPathSeg::pathSegType() const
-{
- return PATHSEG_UNKNOWN;
-}
-
-String SVGPathSeg::pathSegTypeAsLetter() const
-{
- return "";
-}
-
const QualifiedName& SVGPathSeg::associatedAttributeName() const
{
return SVGNames::dAttr;
diff --git a/WebCore/svg/SVGPathSeg.h b/WebCore/svg/SVGPathSeg.h
index 6c4db89..a2cf261 100644
--- a/WebCore/svg/SVGPathSeg.h
+++ b/WebCore/svg/SVGPathSeg.h
@@ -50,13 +50,11 @@ enum SVGPathSegType {
PathSegCurveToQuadraticSmoothRel = 19
};
-class SVGPathElement;
-class SVGStyledElement;
class QualifiedName;
class SVGPathSeg : public RefCounted<SVGPathSeg> {
public:
- virtual ~SVGPathSeg();
+ virtual ~SVGPathSeg() { }
// Forward declare these enums in the w3c naming scheme, for IDL generation
enum {
@@ -83,29 +81,27 @@ public:
};
- virtual unsigned short pathSegType() const;
- virtual String pathSegTypeAsLetter() const;
+ virtual unsigned short pathSegType() const = 0;
+ virtual String pathSegTypeAsLetter() const = 0;
const QualifiedName& associatedAttributeName() const;
-
-protected:
- SVGPathSeg() { }
};
class SVGPathSegSingleCoord : public SVGPathSeg {
public:
- SVGPathSegSingleCoord(float x, float y)
- : m_x(x)
- , m_y(y)
- {
- }
-
void setX(float x) { m_x = x; }
float x() const { return m_x; }
void setY(float y) { m_y = y; }
float y() const { return m_y; }
+protected:
+ SVGPathSegSingleCoord(float x, float y)
+ : m_x(x)
+ , m_y(y)
+ {
+ }
+
private:
float m_x;
float m_y;
diff --git a/WebCore/svg/SVGPathSegArc.h b/WebCore/svg/SVGPathSegArc.h
index c7bbbb0..5d5c332 100644
--- a/WebCore/svg/SVGPathSegArc.h
+++ b/WebCore/svg/SVGPathSegArc.h
@@ -80,11 +80,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegArcAbs(x, y, r1, r2, angle, largeArcFlag, sweepFlag));
}
- virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
- virtual String pathSegTypeAsLetter() const { return "A"; }
-
private:
SVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "A"; }
};
class SVGPathSegArcRel : public SVGPathSegArc {
@@ -94,11 +94,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegArcRel(x, y, r1, r2, angle, largeArcFlag, sweepFlag));
}
- virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
- virtual String pathSegTypeAsLetter() const { return "a"; }
-
private:
SVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
+ virtual String pathSegTypeAsLetter() const { return "a"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegClosePath.cpp b/WebCore/svg/SVGPathSegClosePath.cpp
index d3c8c3b..6f54888 100644
--- a/WebCore/svg/SVGPathSegClosePath.cpp
+++ b/WebCore/svg/SVGPathSegClosePath.cpp
@@ -1,41 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * 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 "SVGPathSegClosePath.h"
-
-namespace WebCore {
-
-SVGPathSegClosePath::SVGPathSegClosePath()
- : SVGPathSeg()
-{
-}
-
-SVGPathSegClosePath::~SVGPathSegClosePath()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
-
-// vim:ts=4:noet
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGPathSegClosePath.h b/WebCore/svg/SVGPathSegClosePath.h
index 635c970..8f074ed 100644
--- a/WebCore/svg/SVGPathSegClosePath.h
+++ b/WebCore/svg/SVGPathSegClosePath.h
@@ -31,13 +31,12 @@ namespace WebCore {
class SVGPathSegClosePath : public SVGPathSeg {
public:
static PassRefPtr<SVGPathSegClosePath> create() { return adoptRef(new SVGPathSegClosePath); }
- virtual ~SVGPathSegClosePath();
+
+private:
+ SVGPathSegClosePath() { }
virtual unsigned short pathSegType() const { return PATHSEG_CLOSEPATH; }
virtual String pathSegTypeAsLetter() const { return "Z"; }
-
-private:
- SVGPathSegClosePath();
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoCubic.h b/WebCore/svg/SVGPathSegCurvetoCubic.h
index 7e2735e..ae4a21d 100644
--- a/WebCore/svg/SVGPathSegCurvetoCubic.h
+++ b/WebCore/svg/SVGPathSegCurvetoCubic.h
@@ -30,7 +30,7 @@ namespace WebCore {
class SVGPathSegCurvetoCubic : public SVGPathSeg {
public:
- SVGPathSegCurvetoCubic(float x, float y, float x1, float y1, float x2, float y2) : SVGPathSeg() , m_x(x) , m_y(y) , m_x1(x1) , m_y1(y1) , m_x2(x2) , m_y2(y2) {}
+ SVGPathSegCurvetoCubic(float x, float y, float x1, float y1, float x2, float y2) : m_x(x), m_y(y), m_x1(x1), m_y1(y1), m_x2(x2), m_y2(y2) { }
void setX(float x) { m_x = x; }
float x() const { return m_x; }
@@ -66,11 +66,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2));
}
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
- virtual String pathSegTypeAsLetter() const { return "C"; }
-
private:
SVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "C"; }
};
class SVGPathSegCurvetoCubicRel : public SVGPathSegCurvetoCubic {
@@ -80,11 +80,11 @@ namespace WebCore {
return adoptRef(new SVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2));
}
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
- virtual String pathSegTypeAsLetter() const { return "c"; }
-
private:
SVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
+ virtual String pathSegTypeAsLetter() const { return "c"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h b/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h
index bc8895c..2227951 100644
--- a/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h
+++ b/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h
@@ -31,7 +31,12 @@ namespace WebCore {
class SVGPathSegCurvetoCubicSmooth : public SVGPathSeg {
public:
SVGPathSegCurvetoCubicSmooth(float x, float y, float x2, float y2)
- : m_x(x), m_y(y), m_x2(x2), m_y2(y2) { }
+ : m_x(x)
+ , m_y(y)
+ , m_x2(x2)
+ , m_y2(y2)
+ {
+ }
void setX(float x) { m_x = x; }
float x() const { return m_x; }
@@ -56,22 +61,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
- virtual String pathSegTypeAsLetter() const { return "S"; }
-
private:
SVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "S"; }
};
class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSegCurvetoCubicSmooth {
public:
static PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
- virtual String pathSegTypeAsLetter() const { return "s"; }
-
private:
SVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
+ virtual String pathSegTypeAsLetter() const { return "s"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoQuadratic.h b/WebCore/svg/SVGPathSegCurvetoQuadratic.h
index 967442f..f84cfaa 100644
--- a/WebCore/svg/SVGPathSegCurvetoQuadratic.h
+++ b/WebCore/svg/SVGPathSegCurvetoQuadratic.h
@@ -31,7 +31,12 @@ namespace WebCore {
class SVGPathSegCurvetoQuadratic : public SVGPathSeg {
public:
SVGPathSegCurvetoQuadratic(float x, float y, float x1, float y1)
- : SVGPathSeg(), m_x(x), m_y(y), m_x1(x1), m_y1(y1) {}
+ : m_x(x)
+ , m_y(y)
+ , m_x1(x1)
+ , m_y1(y1)
+ {
+ }
void setX(float x) { m_x = x; }
float x() const { return m_x; }
@@ -56,22 +61,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticAbs> create(float x, float y, float x1, float y1) { return adoptRef(new SVGPathSegCurvetoQuadraticAbs(x, y, x1, y1)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
- virtual String pathSegTypeAsLetter() const { return "Q"; }
-
private:
SVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "Q"; }
};
class SVGPathSegCurvetoQuadraticRel : public SVGPathSegCurvetoQuadratic {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticRel> create(float x, float y, float x1, float y1) { return adoptRef(new SVGPathSegCurvetoQuadraticRel(x, y, x1, y1)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
- virtual String pathSegTypeAsLetter() const { return "q"; }
-
private:
SVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
+ virtual String pathSegTypeAsLetter() const { return "q"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h b/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h
index fb3d51f..109799e 100644
--- a/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h
+++ b/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h
@@ -32,22 +32,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs> create(float x, float y) { return adoptRef(new SVGPathSegCurvetoQuadraticSmoothAbs(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; }
- virtual String pathSegTypeAsLetter() const { return "T"; }
-
private:
SVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "T"; }
};
class SVGPathSegCurvetoQuadraticSmoothRel : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel> create(float x, float y) { return adoptRef(new SVGPathSegCurvetoQuadraticSmoothRel(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; }
- virtual String pathSegTypeAsLetter() const { return "t"; }
-
private:
SVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; }
+ virtual String pathSegTypeAsLetter() const { return "t"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegLineto.h b/WebCore/svg/SVGPathSegLineto.h
index 9b69bf0..3cd3b7f 100644
--- a/WebCore/svg/SVGPathSegLineto.h
+++ b/WebCore/svg/SVGPathSegLineto.h
@@ -27,27 +27,27 @@
#include "SVGPathSeg.h"
namespace WebCore {
+
class SVGPathSegLinetoAbs : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegLinetoAbs> create(float x, float y) { return adoptRef(new SVGPathSegLinetoAbs(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
- virtual String pathSegTypeAsLetter() const { return "L"; }
-
private:
SVGPathSegLinetoAbs(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "L"; }
};
class SVGPathSegLinetoRel : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegLinetoRel> create(float x, float y) { return adoptRef(new SVGPathSegLinetoRel(x, y)); }
+ private:
+ SVGPathSegLinetoRel(float x, float y);
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; }
virtual String pathSegTypeAsLetter() const { return "l"; }
-
- private:
- SVGPathSegLinetoRel(float x, float y);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegLinetoHorizontal.h b/WebCore/svg/SVGPathSegLinetoHorizontal.h
index 3a16ad1..da59f05 100644
--- a/WebCore/svg/SVGPathSegLinetoHorizontal.h
+++ b/WebCore/svg/SVGPathSegLinetoHorizontal.h
@@ -43,22 +43,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegLinetoHorizontalAbs> create(float x) { return adoptRef(new SVGPathSegLinetoHorizontalAbs(x)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
- virtual String pathSegTypeAsLetter() const { return "H"; }
-
private:
SVGPathSegLinetoHorizontalAbs(float x);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "H"; }
};
class SVGPathSegLinetoHorizontalRel : public SVGPathSegLinetoHorizontal {
public:
static PassRefPtr<SVGPathSegLinetoHorizontalRel> create(float x) { return adoptRef(new SVGPathSegLinetoHorizontalRel(x)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
- virtual String pathSegTypeAsLetter() const { return "h"; }
-
private:
SVGPathSegLinetoHorizontalRel(float x);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
+ virtual String pathSegTypeAsLetter() const { return "h"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegLinetoVertical.h b/WebCore/svg/SVGPathSegLinetoVertical.h
index d4d9f85..b13b9f4 100644
--- a/WebCore/svg/SVGPathSegLinetoVertical.h
+++ b/WebCore/svg/SVGPathSegLinetoVertical.h
@@ -43,22 +43,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegLinetoVerticalAbs> create(float y) { return adoptRef(new SVGPathSegLinetoVerticalAbs(y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
- virtual String pathSegTypeAsLetter() const { return "V"; }
-
private:
SVGPathSegLinetoVerticalAbs(float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "V"; }
};
class SVGPathSegLinetoVerticalRel : public SVGPathSegLinetoVertical {
public:
static PassRefPtr<SVGPathSegLinetoVerticalRel> create(float y) { return adoptRef(new SVGPathSegLinetoVerticalRel(y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
- virtual String pathSegTypeAsLetter() const { return "v"; }
-
private:
SVGPathSegLinetoVerticalRel(float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
+ virtual String pathSegTypeAsLetter() const { return "v"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSegList.cpp b/WebCore/svg/SVGPathSegList.cpp
index 3b86f55..5a40c64 100644
--- a/WebCore/svg/SVGPathSegList.cpp
+++ b/WebCore/svg/SVGPathSegList.cpp
@@ -32,10 +32,6 @@ SVGPathSegList::SVGPathSegList(const QualifiedName& attributeName)
{
}
-SVGPathSegList::~SVGPathSegList()
-{
-}
-
}
#endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGPathSegList.h b/WebCore/svg/SVGPathSegList.h
index f27c653..6e61c06 100644
--- a/WebCore/svg/SVGPathSegList.h
+++ b/WebCore/svg/SVGPathSegList.h
@@ -31,7 +31,6 @@ class SVGElement;
class SVGPathSegList : public SVGList<RefPtr<SVGPathSeg> > {
public:
static PassRefPtr<SVGPathSegList> create(const QualifiedName& attributeName) { return adoptRef(new SVGPathSegList(attributeName)); }
- virtual ~SVGPathSegList();
private:
SVGPathSegList(const QualifiedName&);
diff --git a/WebCore/svg/SVGPathSegListBuilder.h b/WebCore/svg/SVGPathSegListBuilder.h
index 2fd2667..f376706 100644
--- a/WebCore/svg/SVGPathSegListBuilder.h
+++ b/WebCore/svg/SVGPathSegListBuilder.h
@@ -36,18 +36,18 @@ public:
SVGPathSegListBuilder();
void setCurrentSVGPathSegList(SVGPathSegList* pathSegList) { m_pathSegList = pathSegList; }
+
+private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup() { m_pathSegList = 0; }
-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);
diff --git a/WebCore/svg/SVGPathSegListSource.cpp b/WebCore/svg/SVGPathSegListSource.cpp
index 48fa094..2378743 100644
--- a/WebCore/svg/SVGPathSegListSource.cpp
+++ b/WebCore/svg/SVGPathSegListSource.cpp
@@ -39,10 +39,6 @@ SVGPathSegListSource::SVGPathSegListSource(SVGPathSegList* pathSegList)
m_itemEnd = m_pathSegList->numberOfItems();
}
-SVGPathSegListSource::~SVGPathSegListSource()
-{
-}
-
bool SVGPathSegListSource::hasMoreData() const
{
return m_itemCurrent < m_itemEnd;
diff --git a/WebCore/svg/SVGPathSegListSource.h b/WebCore/svg/SVGPathSegListSource.h
index fd89e3e..4f93be1 100644
--- a/WebCore/svg/SVGPathSegListSource.h
+++ b/WebCore/svg/SVGPathSegListSource.h
@@ -37,7 +37,8 @@ public:
return adoptPtr(new SVGPathSegListSource(pathSegList));
}
- virtual ~SVGPathSegListSource();
+private:
+ SVGPathSegListSource(SVGPathSegList*);
virtual bool hasMoreData() const;
virtual bool moveToNextToken() { return true; }
@@ -54,9 +55,6 @@ public:
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
-private:
- SVGPathSegListSource(SVGPathSegList*);
-
SVGPathSegList* m_pathSegList;
RefPtr<SVGPathSeg> m_segment;
int m_itemCurrent;
diff --git a/WebCore/svg/SVGPathSegMoveto.h b/WebCore/svg/SVGPathSegMoveto.h
index 194b1a6..edaff4b 100644
--- a/WebCore/svg/SVGPathSegMoveto.h
+++ b/WebCore/svg/SVGPathSegMoveto.h
@@ -31,22 +31,22 @@ namespace WebCore {
public:
static PassRefPtr<SVGPathSegMovetoAbs> create(float x, float y) { return adoptRef(new SVGPathSegMovetoAbs(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
- virtual String pathSegTypeAsLetter() const { return "M"; }
-
private:
SVGPathSegMovetoAbs(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
+ virtual String pathSegTypeAsLetter() const { return "M"; }
};
class SVGPathSegMovetoRel : public SVGPathSegSingleCoord {
public:
static PassRefPtr<SVGPathSegMovetoRel> create(float x, float y) { return adoptRef(new SVGPathSegMovetoRel(x, y)); }
- virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
- virtual String pathSegTypeAsLetter() const { return "m"; }
-
private:
SVGPathSegMovetoRel(float x, float y);
+
+ virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
+ virtual String pathSegTypeAsLetter() const { return "m"; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathSource.h b/WebCore/svg/SVGPathSource.h
index 6d7ec5f..d1a6149 100644
--- a/WebCore/svg/SVGPathSource.h
+++ b/WebCore/svg/SVGPathSource.h
@@ -43,9 +43,6 @@ public:
virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&) = 0;
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&) = 0;
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&) = 0;
-
-public:
- SVGPathSource() { }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGPathStringBuilder.cpp b/WebCore/svg/SVGPathStringBuilder.cpp
index 0a166ad..951956d 100644
--- a/WebCore/svg/SVGPathStringBuilder.cpp
+++ b/WebCore/svg/SVGPathStringBuilder.cpp
@@ -24,10 +24,6 @@
namespace WebCore {
-SVGPathStringBuilder::SVGPathStringBuilder()
-{
-}
-
void SVGPathStringBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode mode)
{
if (mode == AbsoluteCoordinates)
diff --git a/WebCore/svg/SVGPathStringBuilder.h b/WebCore/svg/SVGPathStringBuilder.h
index ebb8596..a51c40c 100644
--- a/WebCore/svg/SVGPathStringBuilder.h
+++ b/WebCore/svg/SVGPathStringBuilder.h
@@ -29,21 +29,19 @@ namespace WebCore {
class SVGPathStringBuilder : public SVGPathConsumer {
public:
- SVGPathStringBuilder();
+ String result() { return m_stringBuilder.toString(ConcatAddingSpacesBetweenIndividualStrings); }
+private:
virtual void cleanup() { m_stringBuilder.clear(); }
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
- String result() { return m_stringBuilder.toString(ConcatAddingSpacesBetweenIndividualStrings); }
-private:
// Used in UnalteredParsing/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);
diff --git a/WebCore/svg/SVGPathStringSource.cpp b/WebCore/svg/SVGPathStringSource.cpp
index 0efbfd0..5154ee6 100644
--- a/WebCore/svg/SVGPathStringSource.cpp
+++ b/WebCore/svg/SVGPathStringSource.cpp
@@ -34,10 +34,6 @@ SVGPathStringSource::SVGPathStringSource(const String& string)
ASSERT(!string.isEmpty());
}
-SVGPathStringSource::~SVGPathStringSource()
-{
-}
-
bool SVGPathStringSource::hasMoreData() const
{
return m_current < m_end;
diff --git a/WebCore/svg/SVGPathStringSource.h b/WebCore/svg/SVGPathStringSource.h
index d0266f4..a3c8a95 100644
--- a/WebCore/svg/SVGPathStringSource.h
+++ b/WebCore/svg/SVGPathStringSource.h
@@ -35,7 +35,8 @@ public:
return adoptPtr(new SVGPathStringSource(string));
}
- virtual ~SVGPathStringSource();
+private:
+ SVGPathStringSource(const String&);
virtual bool hasMoreData() const;
virtual bool moveToNextToken();
@@ -52,8 +53,6 @@ public:
virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
-private:
- SVGPathStringSource(const String&);
String m_string;
const UChar* m_current;
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index 94d3572..6a8a108 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -49,13 +49,8 @@ using namespace std;
namespace WebCore {
-SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGURIReference()
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
+inline SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -66,8 +61,9 @@ SVGPatternElement::SVGPatternElement(const QualifiedName& tagName, Document* doc
{
}
-SVGPatternElement::~SVGPatternElement()
+PassRefPtr<SVGPatternElement> SVGPatternElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPatternElement(tagName, document));
}
void SVGPatternElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGPatternElement.h b/WebCore/svg/SVGPatternElement.h
index 32ec808..497660a 100644
--- a/WebCore/svg/SVGPatternElement.h
+++ b/WebCore/svg/SVGPatternElement.h
@@ -43,8 +43,12 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGFitToViewBox {
public:
+ static PassRefPtr<SVGPatternElement> create(const QualifiedName&, Document*);
+
+ PatternAttributes collectPatternProperties() const;
+
+ private:
SVGPatternElement(const QualifiedName&, Document*);
- virtual ~SVGPatternElement();
virtual bool isValid() const { return SVGTests::isValid(); }
virtual bool needsPendingResourceHandling() const { return false; }
@@ -56,9 +60,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- PatternAttributes collectPatternProperties() const;
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGPointList.cpp b/WebCore/svg/SVGPointList.cpp
index 8a3d870..0d8e10c 100644
--- a/WebCore/svg/SVGPointList.cpp
+++ b/WebCore/svg/SVGPointList.cpp
@@ -32,10 +32,6 @@ SVGPointList::SVGPointList(const QualifiedName& attributeName)
{
}
-SVGPointList::~SVGPointList()
-{
-}
-
String SVGPointList::valueAsString() const
{
String result;
diff --git a/WebCore/svg/SVGPointList.h b/WebCore/svg/SVGPointList.h
index 853c7b1..43edbbb 100644
--- a/WebCore/svg/SVGPointList.h
+++ b/WebCore/svg/SVGPointList.h
@@ -32,7 +32,6 @@ namespace WebCore {
class SVGPointList : public SVGPODList<FloatPoint> {
public:
static PassRefPtr<SVGPointList> create(const QualifiedName& attributeName) { return adoptRef(new SVGPointList(attributeName)); }
- virtual ~SVGPointList();
String valueAsString() const;
diff --git a/WebCore/svg/SVGPolyElement.cpp b/WebCore/svg/SVGPolyElement.cpp
index 8475309..da8aba4 100644
--- a/WebCore/svg/SVGPolyElement.cpp
+++ b/WebCore/svg/SVGPolyElement.cpp
@@ -34,16 +34,8 @@
namespace WebCore {
-SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGAnimatedPoints()
-{
-}
-
-SVGPolyElement::~SVGPolyElement()
+SVGPolyElement::SVGPolyElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
diff --git a/WebCore/svg/SVGPolyElement.h b/WebCore/svg/SVGPolyElement.h
index bbcdb67..6d36f4b 100644
--- a/WebCore/svg/SVGPolyElement.h
+++ b/WebCore/svg/SVGPolyElement.h
@@ -36,21 +36,21 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGAnimatedPoints {
public:
- SVGPolyElement(const QualifiedName&, Document*);
- virtual ~SVGPolyElement();
-
- virtual bool isValid() const { return SVGTests::isValid(); }
-
virtual SVGPointList* points() const;
virtual SVGPointList* animatedPoints() const;
+ protected:
+ SVGPolyElement(const QualifiedName&, Document*);
+
+ private:
+ virtual bool isValid() const { return SVGTests::isValid(); }
+
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual bool supportsMarkers() const { return true; }
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGPolyElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
diff --git a/WebCore/svg/SVGPolygonElement.cpp b/WebCore/svg/SVGPolygonElement.cpp
index c7ab09b..57e2d53 100644
--- a/WebCore/svg/SVGPolygonElement.cpp
+++ b/WebCore/svg/SVGPolygonElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* doc)
- : SVGPolyElement(tagName, doc)
+inline SVGPolygonElement::SVGPolygonElement(const QualifiedName& tagName, Document* document)
+ : SVGPolyElement(tagName, document)
{
}
-SVGPolygonElement::~SVGPolygonElement()
+PassRefPtr<SVGPolygonElement> SVGPolygonElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPolygonElement(tagName, document));
}
Path SVGPolygonElement::toPathData() const
diff --git a/WebCore/svg/SVGPolygonElement.h b/WebCore/svg/SVGPolygonElement.h
index 76b11a2..7a5bda8 100644
--- a/WebCore/svg/SVGPolygonElement.h
+++ b/WebCore/svg/SVGPolygonElement.h
@@ -28,8 +28,10 @@ namespace WebCore {
class SVGPolygonElement : public SVGPolyElement {
public:
+ static PassRefPtr<SVGPolygonElement> create(const QualifiedName&, Document*);
+
+ private:
SVGPolygonElement(const QualifiedName&, Document*);
- virtual ~SVGPolygonElement();
virtual Path toPathData() const;
};
diff --git a/WebCore/svg/SVGPolylineElement.cpp b/WebCore/svg/SVGPolylineElement.cpp
index a1dfcd6..7ec8431 100644
--- a/WebCore/svg/SVGPolylineElement.cpp
+++ b/WebCore/svg/SVGPolylineElement.cpp
@@ -27,13 +27,14 @@
namespace WebCore {
-SVGPolylineElement::SVGPolylineElement(const QualifiedName& tagName, Document* doc)
- : SVGPolyElement(tagName, doc)
+inline SVGPolylineElement::SVGPolylineElement(const QualifiedName& tagName, Document* document)
+ : SVGPolyElement(tagName, document)
{
}
-SVGPolylineElement::~SVGPolylineElement()
+PassRefPtr<SVGPolylineElement> SVGPolylineElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGPolylineElement(tagName, document));
}
Path SVGPolylineElement::toPathData() const
diff --git a/WebCore/svg/SVGPolylineElement.h b/WebCore/svg/SVGPolylineElement.h
index fbdaa81..d3fe555 100644
--- a/WebCore/svg/SVGPolylineElement.h
+++ b/WebCore/svg/SVGPolylineElement.h
@@ -28,8 +28,10 @@ namespace WebCore {
class SVGPolylineElement : public SVGPolyElement {
public:
+ static PassRefPtr<SVGPolylineElement> create(const QualifiedName&, Document*);
+
+ private:
SVGPolylineElement(const QualifiedName&, Document*);
- virtual ~SVGPolylineElement();
virtual Path toPathData() const;
};
diff --git a/WebCore/svg/SVGPreserveAspectRatio.cpp b/WebCore/svg/SVGPreserveAspectRatio.cpp
index 00a7a65..a129fe6 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.cpp
+++ b/WebCore/svg/SVGPreserveAspectRatio.cpp
@@ -37,10 +37,6 @@ SVGPreserveAspectRatio::SVGPreserveAspectRatio()
// FIXME: Should the two values default to UNKNOWN instead?
}
-SVGPreserveAspectRatio::~SVGPreserveAspectRatio()
-{
-}
-
void SVGPreserveAspectRatio::setAlign(unsigned short align)
{
m_align = align;
diff --git a/WebCore/svg/SVGPreserveAspectRatio.h b/WebCore/svg/SVGPreserveAspectRatio.h
index 9ed27fe..f29b7d3 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.h
+++ b/WebCore/svg/SVGPreserveAspectRatio.h
@@ -54,7 +54,6 @@ namespace WebCore {
};
SVGPreserveAspectRatio();
- virtual ~SVGPreserveAspectRatio();
void setAlign(unsigned short);
unsigned short align() const;
diff --git a/WebCore/svg/SVGRadialGradientElement.cpp b/WebCore/svg/SVGRadialGradientElement.cpp
index 4448c67..80aba78 100644
--- a/WebCore/svg/SVGRadialGradientElement.cpp
+++ b/WebCore/svg/SVGRadialGradientElement.cpp
@@ -40,8 +40,8 @@
namespace WebCore {
-SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* doc)
- : SVGGradientElement(tagName, doc)
+inline SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName, Document* document)
+ : SVGGradientElement(tagName, document)
, m_cx(LengthModeWidth, "50%")
, m_cy(LengthModeHeight, "50%")
, m_r(LengthModeOther, "50%")
@@ -51,8 +51,9 @@ SVGRadialGradientElement::SVGRadialGradientElement(const QualifiedName& tagName,
// Spec: If the cx/cy/r attribute is not specified, the effect is as if a value of "50%" were specified.
}
-SVGRadialGradientElement::~SVGRadialGradientElement()
+PassRefPtr<SVGRadialGradientElement> SVGRadialGradientElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGRadialGradientElement(tagName, document));
}
void SVGRadialGradientElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGRadialGradientElement.h b/WebCore/svg/SVGRadialGradientElement.h
index 2c3db56..e528a13 100644
--- a/WebCore/svg/SVGRadialGradientElement.h
+++ b/WebCore/svg/SVGRadialGradientElement.h
@@ -31,8 +31,13 @@ namespace WebCore {
class SVGRadialGradientElement : public SVGGradientElement {
public:
+ static PassRefPtr<SVGRadialGradientElement> create(const QualifiedName&, Document*);
+
+ RadialGradientAttributes collectGradientProperties();
+ void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
+
+ private:
SVGRadialGradientElement(const QualifiedName&, Document*);
- virtual ~SVGRadialGradientElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
@@ -40,10 +45,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- RadialGradientAttributes collectGradientProperties();
- void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGRadialGradientElement, SVGNames::cxAttr, SVGLength, Cx, cx)
diff --git a/WebCore/svg/SVGRectElement.cpp b/WebCore/svg/SVGRectElement.cpp
index d5451e2..43ba888 100644
--- a/WebCore/svg/SVGRectElement.cpp
+++ b/WebCore/svg/SVGRectElement.cpp
@@ -31,11 +31,8 @@
namespace WebCore {
-SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document *doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -45,8 +42,9 @@ SVGRectElement::SVGRectElement(const QualifiedName& tagName, Document *doc)
{
}
-SVGRectElement::~SVGRectElement()
+PassRefPtr<SVGRectElement> SVGRectElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGRectElement(tagName, document));
}
void SVGRectElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGRectElement.h b/WebCore/svg/SVGRectElement.h
index bc90919..382078d 100644
--- a/WebCore/svg/SVGRectElement.h
+++ b/WebCore/svg/SVGRectElement.h
@@ -34,8 +34,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGRectElement> create(const QualifiedName&, Document*);
+
+ private:
SVGRectElement(const QualifiedName&, Document*);
- virtual ~SVGRectElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -45,7 +47,6 @@ namespace WebCore {
virtual Path toPathData() const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGRectElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index b7f9717..bc669a3 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -78,6 +78,11 @@ SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document* doc)
doc->registerForDocumentActivationCallbacks(this);
}
+PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGSVGElement(tagName, document));
+}
+
SVGSVGElement::~SVGSVGElement()
{
document()->unregisterForDocumentActivationCallbacks(this);
@@ -181,8 +186,7 @@ void SVGSVGElement::setUseCurrentView(bool currentView)
SVGViewSpec* SVGSVGElement::currentView() const
{
if (!m_viewSpec)
- m_viewSpec.set(new SVGViewSpec(this));
-
+ m_viewSpec = adoptPtr(new SVGViewSpec(this));
return m_viewSpec.get();
}
@@ -472,6 +476,12 @@ AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMSc
// RenderSVGRoot::localToBorderBoxTransform() (called through mapLocalToContainer(), called from localToAbsolute())
// also takes the viewBoxToViewTransform() into account, so we have to subtract it here (original cause of bug #27183)
transform.translate(location.x() - viewBoxTransform.e(), location.y() - viewBoxTransform.f());
+
+ // Respect scroll offset.
+ if (FrameView* view = document()->view()) {
+ IntSize scrollOffset = view->scrollOffset();
+ transform.translate(-scrollOffset.width(), -scrollOffset.height());
+ }
}
}
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index b7c9b16..b5b10b1 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -45,11 +45,8 @@ namespace WebCore {
public SVGFitToViewBox,
public SVGZoomAndPan {
public:
- SVGSVGElement(const QualifiedName&, Document*);
- virtual ~SVGSVGElement();
+ static PassRefPtr<SVGSVGElement> create(const QualifiedName&, Document*);
- virtual bool isSVG() const { return true; }
-
virtual bool isValid() const { return SVGTests::isValid(); }
// 'SVGSVGElement' functions
@@ -112,6 +109,20 @@ namespace WebCore {
static SVGTransform createSVGTransform();
static SVGTransform createSVGTransformFromMatrix(const AffineTransform&);
+ AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
+
+ void inheritViewAttributes(SVGViewElement*);
+
+ bool isOutermostSVG() const;
+
+ Element* getElementById(const AtomicString&) const;
+
+ private:
+ SVGSVGElement(const QualifiedName&, Document*);
+ virtual ~SVGSVGElement();
+
+ virtual bool isSVG() const { return true; }
+
virtual void parseMappedAttribute(Attribute*);
virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
@@ -123,15 +134,6 @@ namespace WebCore {
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
-
- void inheritViewAttributes(SVGViewElement*);
-
- bool isOutermostSVG() const;
-
- Element* getElementById(const AtomicString&) const;
-
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGSVGElement, SVGNames::xAttr, SVGLength, X, x)
diff --git a/WebCore/svg/SVGScriptElement.cpp b/WebCore/svg/SVGScriptElement.cpp
index 4109aad..6532ac2 100644
--- a/WebCore/svg/SVGScriptElement.cpp
+++ b/WebCore/svg/SVGScriptElement.cpp
@@ -31,17 +31,16 @@
namespace WebCore {
-SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* doc, bool createdByParser)
- : SVGElement(tagName, doc)
- , SVGURIReference()
- , SVGExternalResourcesRequired()
+inline SVGScriptElement::SVGScriptElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+ : SVGElement(tagName, document)
, m_data(this, this)
{
m_data.setCreatedByParser(createdByParser);
}
-SVGScriptElement::~SVGScriptElement()
+PassRefPtr<SVGScriptElement> SVGScriptElement::create(const QualifiedName& tagName, Document* document, bool createdByParser)
{
+ return adoptRef(new SVGScriptElement(tagName, document, createdByParser));
}
String SVGScriptElement::scriptContent() const
diff --git a/WebCore/svg/SVGScriptElement.h b/WebCore/svg/SVGScriptElement.h
index 8f2a393..6dffea6 100644
--- a/WebCore/svg/SVGScriptElement.h
+++ b/WebCore/svg/SVGScriptElement.h
@@ -34,8 +34,13 @@ namespace WebCore {
, public SVGExternalResourcesRequired
, public ScriptElement {
public:
+ static PassRefPtr<SVGScriptElement> create(const QualifiedName&, Document*, bool createdByParser);
+
+ String type() const;
+ void setType(const String&);
+
+ private:
SVGScriptElement(const QualifiedName&, Document*, bool createdByParser);
- virtual ~SVGScriptElement();
virtual String scriptContent() const;
@@ -49,16 +54,12 @@ namespace WebCore {
virtual bool isURLAttribute(Attribute*) const;
virtual void finishParsingChildren();
- String type() const;
- void setType(const String&);
-
virtual String scriptCharset() const;
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
virtual bool shouldExecuteAsJavaScript() const;
- protected:
virtual bool haveLoadedRequiredResources();
virtual String sourceAttributeValue() const;
@@ -73,14 +74,12 @@ namespace WebCore {
virtual void dispatchLoadEvent();
virtual void dispatchErrorEvent();
- private:
// SVGURIReference
DECLARE_ANIMATED_PROPERTY(SVGScriptElement, XLinkNames::hrefAttr, String, Href, href)
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGScriptElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
- private:
ScriptElementData m_data;
String m_type;
};
diff --git a/WebCore/svg/SVGSetElement.cpp b/WebCore/svg/SVGSetElement.cpp
index eceed12..d455c9b 100644
--- a/WebCore/svg/SVGSetElement.cpp
+++ b/WebCore/svg/SVGSetElement.cpp
@@ -24,10 +24,16 @@
namespace WebCore {
-SVGSetElement::SVGSetElement(const QualifiedName& tagName, Document *doc)
- : SVGAnimateElement(tagName, doc)
+inline SVGSetElement::SVGSetElement(const QualifiedName& tagName, Document* document)
+ : SVGAnimateElement(tagName, document)
{
}
+
+PassRefPtr<SVGSetElement> SVGSetElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGSetElement(tagName, document));
+}
+
}
// vim:ts=4:noet
diff --git a/WebCore/svg/SVGSetElement.h b/WebCore/svg/SVGSetElement.h
index 975ad27..a519973 100644
--- a/WebCore/svg/SVGSetElement.h
+++ b/WebCore/svg/SVGSetElement.h
@@ -25,9 +25,13 @@
#include "SVGAnimateElement.h"
namespace WebCore {
+
// SVGAnimateElement implements superset of the functionality.
class SVGSetElement : public SVGAnimateElement {
public:
+ static PassRefPtr<SVGSetElement> create(const QualifiedName&, Document*);
+
+ private:
SVGSetElement(const QualifiedName&, Document*);
};
diff --git a/WebCore/svg/SVGStopElement.cpp b/WebCore/svg/SVGStopElement.cpp
index 317774a..cd78a46 100644
--- a/WebCore/svg/SVGStopElement.cpp
+++ b/WebCore/svg/SVGStopElement.cpp
@@ -32,14 +32,15 @@
namespace WebCore {
-SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGStopElement::SVGStopElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_offset(0)
{
}
-SVGStopElement::~SVGStopElement()
+PassRefPtr<SVGStopElement> SVGStopElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGStopElement(tagName, document));
}
void SVGStopElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGStopElement.h b/WebCore/svg/SVGStopElement.h
index 1fb60b5..232b97a 100644
--- a/WebCore/svg/SVGStopElement.h
+++ b/WebCore/svg/SVGStopElement.h
@@ -29,16 +29,17 @@ namespace WebCore {
class SVGStopElement : public SVGStyledElement {
public:
+ static PassRefPtr<SVGStopElement> create(const QualifiedName&, Document*);
+
+ Color stopColorIncludingOpacity() const;
+
+ private:
SVGStopElement(const QualifiedName&, Document*);
- virtual ~SVGStopElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- Color stopColorIncludingOpacity() const;
-
- private:
virtual bool isGradientStop() const { return true; }
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
diff --git a/WebCore/svg/SVGStringList.cpp b/WebCore/svg/SVGStringList.cpp
index 806c70a..9f4809f 100644
--- a/WebCore/svg/SVGStringList.cpp
+++ b/WebCore/svg/SVGStringList.cpp
@@ -32,10 +32,6 @@ SVGStringList::SVGStringList(const QualifiedName& attributeName)
{
}
-SVGStringList::~SVGStringList()
-{
-}
-
void SVGStringList::reset(const String& str)
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGStringList.h b/WebCore/svg/SVGStringList.h
index bc234ff..e8841ea 100644
--- a/WebCore/svg/SVGStringList.h
+++ b/WebCore/svg/SVGStringList.h
@@ -30,7 +30,6 @@ namespace WebCore {
class SVGStringList : public SVGList<String> {
public:
static PassRefPtr<SVGStringList> create(const QualifiedName& attributeName) { return adoptRef(new SVGStringList(attributeName)); }
- virtual ~SVGStringList();
void reset(const String& str);
void parse(const String& data, UChar delimiter = ',');
diff --git a/WebCore/svg/SVGStylable.cpp b/WebCore/svg/SVGStylable.cpp
index 510467d..6f54888 100644
--- a/WebCore/svg/SVGStylable.cpp
+++ b/WebCore/svg/SVGStylable.cpp
@@ -1,38 +1 @@
-/*
- * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * 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 "SVGStylable.h"
-
-namespace WebCore {
-
-SVGStylable::SVGStylable()
-{
-}
-
-SVGStylable::~SVGStylable()
-{
-}
-
-}
-
-#endif // ENABLE(SVG)
+// This file is now intentionally empty. Delete it after removing it from all the build systems and project files.
diff --git a/WebCore/svg/SVGStylable.h b/WebCore/svg/SVGStylable.h
index 37148f9..fee4e63 100644
--- a/WebCore/svg/SVGStylable.h
+++ b/WebCore/svg/SVGStylable.h
@@ -29,12 +29,10 @@ namespace WebCore {
class CSSValue;
class CSSStyleDeclaration;
- class QualifiedName;
class SVGStylable {
public:
- SVGStylable();
- virtual ~SVGStylable();
+ virtual ~SVGStylable() { }
virtual CSSStyleDeclaration* style() = 0;
virtual PassRefPtr<CSSValue> getPresentationAttribute(const String&) = 0;
diff --git a/WebCore/svg/SVGStyleElement.cpp b/WebCore/svg/SVGStyleElement.cpp
index bb50e67..4a80319 100644
--- a/WebCore/svg/SVGStyleElement.cpp
+++ b/WebCore/svg/SVGStyleElement.cpp
@@ -34,13 +34,17 @@
namespace WebCore {
-SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+inline SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* document, bool createdByParser)
: SVGElement(tagName, document)
- , SVGLangSpace()
, StyleElement(document, createdByParser)
{
}
+PassRefPtr<SVGStyleElement> SVGStyleElement::create(const QualifiedName& tagName, Document* document, bool createdByParser)
+{
+ return adoptRef(new SVGStyleElement(tagName, document, createdByParser));
+}
+
const AtomicString& SVGStyleElement::type() const
{
DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css"));
diff --git a/WebCore/svg/SVGStyleElement.h b/WebCore/svg/SVGStyleElement.h
index 6385039..bb46549 100644
--- a/WebCore/svg/SVGStyleElement.h
+++ b/WebCore/svg/SVGStyleElement.h
@@ -32,17 +32,9 @@ class SVGStyleElement : public SVGElement
, public SVGLangSpace
, public StyleElement {
public:
- SVGStyleElement(const QualifiedName&, Document*, bool createdByParser);
-
- virtual void parseMappedAttribute(Attribute*);
- virtual void insertedIntoDocument();
- virtual void removedFromDocument();
- virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+ static PassRefPtr<SVGStyleElement> create(const QualifiedName&, Document*, bool createdByParser);
- virtual void finishParsingChildren();
-
- virtual bool isLoading() const { return StyleElement::isLoading(); }
- virtual bool sheetLoaded() { return StyleElement::sheetLoaded(document()); }
+ StyleSheet* sheet();
virtual const AtomicString& type() const;
void setType(const AtomicString&, ExceptionCode&);
@@ -53,7 +45,18 @@ public:
virtual String title() const;
void setTitle(const AtomicString&, ExceptionCode&);
- StyleSheet* sheet();
+private:
+ SVGStyleElement(const QualifiedName&, Document*, bool createdByParser);
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void insertedIntoDocument();
+ virtual void removedFromDocument();
+ virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+
+ virtual void finishParsingChildren();
+
+ virtual bool isLoading() const { return StyleElement::isLoading(); }
+ virtual bool sheetLoaded() { return StyleElement::sheetLoaded(document()); }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGStyledElement.cpp b/WebCore/svg/SVGStyledElement.cpp
index 6f04382..f554846 100644
--- a/WebCore/svg/SVGStyledElement.cpp
+++ b/WebCore/svg/SVGStyledElement.cpp
@@ -55,12 +55,8 @@ void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, int>* propertyNameToId
propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
}
-SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
-{
-}
-
-SVGStyledElement::~SVGStyledElement()
+SVGStyledElement::SVGStyledElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
diff --git a/WebCore/svg/SVGStyledElement.h b/WebCore/svg/SVGStyledElement.h
index 8431458..3482a4f 100644
--- a/WebCore/svg/SVGStyledElement.h
+++ b/WebCore/svg/SVGStyledElement.h
@@ -35,21 +35,29 @@ namespace WebCore {
class SVGStyledElement : public SVGElement,
public SVGStylable {
public:
- SVGStyledElement(const QualifiedName&, Document*);
- virtual ~SVGStyledElement();
-
virtual String title() const;
bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
- virtual bool isStyled() const { return true; }
virtual bool supportsMarkers() const { return false; }
virtual PassRefPtr<CSSValue> getPresentationAttribute(const String& name);
- virtual CSSStyleDeclaration* style() { return StyledElement::style(); }
bool isKnownAttribute(const QualifiedName&);
+ // Centralized place to force a manual style resolution. Hacky but needed for now.
+ PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle);
+
+ bool instanceUpdatesBlocked() const;
+ void setInstanceUpdatesBlocked(bool);
+
+ virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
+
+ virtual CSSStyleDeclaration* style() { return StyledElement::style(); }
+
+ protected:
+ SVGStyledElement(const QualifiedName&, Document*);
+
virtual bool rendererIsNeeded(RenderStyle*);
virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
@@ -62,15 +70,6 @@ namespace WebCore {
virtual void removedFromDocument();
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
- // Centralized place to force a manual style resolution. Hacky but needed for now.
- PassRefPtr<RenderStyle> resolveStyle(RenderStyle* parentStyle);
-
- bool instanceUpdatesBlocked() const;
- void setInstanceUpdatesBlocked(bool);
-
- virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const;
-
- protected:
static int cssPropertyIdForSVGAttributeName(const QualifiedName&);
void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(selfHasRelativeLengths(), this); }
void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGStyledElement*);
@@ -78,7 +77,10 @@ namespace WebCore {
virtual bool selfHasRelativeLengths() const { return false; }
private:
+ virtual bool isStyled() const { return true; }
+
HashSet<SVGStyledElement*> m_elementsWithRelativeLengths;
+
DECLARE_ANIMATED_PROPERTY(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className)
};
diff --git a/WebCore/svg/SVGStyledLocatableElement.cpp b/WebCore/svg/SVGStyledLocatableElement.cpp
index 6b49542..d22e708 100644
--- a/WebCore/svg/SVGStyledLocatableElement.cpp
+++ b/WebCore/svg/SVGStyledLocatableElement.cpp
@@ -30,13 +30,8 @@
namespace WebCore {
-SVGStyledLocatableElement::SVGStyledLocatableElement(const QualifiedName& tagName, Document* doc)
- : SVGLocatable()
- , SVGStyledElement(tagName, doc)
-{
-}
-
-SVGStyledLocatableElement::~SVGStyledLocatableElement()
+SVGStyledLocatableElement::SVGStyledLocatableElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
diff --git a/WebCore/svg/SVGStyledLocatableElement.h b/WebCore/svg/SVGStyledLocatableElement.h
index 6eab7b0..82b3436 100644
--- a/WebCore/svg/SVGStyledLocatableElement.h
+++ b/WebCore/svg/SVGStyledLocatableElement.h
@@ -32,11 +32,6 @@ namespace WebCore {
class SVGStyledLocatableElement : public SVGStyledElement,
virtual public SVGLocatable {
public:
- SVGStyledLocatableElement(const QualifiedName&, Document*);
- virtual ~SVGStyledLocatableElement();
-
- virtual bool isStyledLocatable() const { return true; }
-
virtual SVGElement* nearestViewportElement() const;
virtual SVGElement* farthestViewportElement() const;
@@ -45,6 +40,12 @@ namespace WebCore {
virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGLocatable::localCoordinateSpaceTransform(mode); }
+
+ protected:
+ SVGStyledLocatableElement(const QualifiedName&, Document*);
+
+ private:
+ virtual bool isStyledLocatable() const { return true; }
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index 279f437..af10ed7 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -32,17 +32,12 @@
namespace WebCore {
-SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledLocatableElement(tagName, doc)
- , SVGTransformable()
+SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledLocatableElement(tagName, document)
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
-SVGStyledTransformableElement::~SVGStyledTransformableElement()
-{
-}
-
AffineTransform SVGStyledTransformableElement::getCTM(StyleUpdateStrategy styleUpdateStrategy) const
{
return SVGLocatable::computeCTM(this, SVGLocatable::NearestViewportScope, styleUpdateStrategy);
diff --git a/WebCore/svg/SVGStyledTransformableElement.h b/WebCore/svg/SVGStyledTransformableElement.h
index 1d7b197..7668889 100644
--- a/WebCore/svg/SVGStyledTransformableElement.h
+++ b/WebCore/svg/SVGStyledTransformableElement.h
@@ -33,11 +33,6 @@ class AffineTransform;
class SVGStyledTransformableElement : public SVGStyledLocatableElement,
public SVGTransformable {
public:
- SVGStyledTransformableElement(const QualifiedName&, Document*);
- virtual ~SVGStyledTransformableElement();
-
- virtual bool isStyledTransformable() const { return true; }
-
virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual SVGElement* nearestViewportElement() const;
@@ -49,8 +44,6 @@ public:
virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
- virtual void parseMappedAttribute(Attribute*);
- virtual void synchronizeProperty(const QualifiedName&);
bool isKnownAttribute(const QualifiedName&);
// "base class" methods for all the elements which render as paths
@@ -59,9 +52,16 @@ public:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
protected:
+ SVGStyledTransformableElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
+
DECLARE_ANIMATED_PROPERTY(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
private:
+ virtual bool isStyledTransformable() const { return true; }
+
// Used by <animateMotion>
OwnPtr<AffineTransform> m_supplementalTransform;
};
diff --git a/WebCore/svg/SVGSwitchElement.cpp b/WebCore/svg/SVGSwitchElement.cpp
index 5f397af..9b40a02 100644
--- a/WebCore/svg/SVGSwitchElement.cpp
+++ b/WebCore/svg/SVGSwitchElement.cpp
@@ -27,20 +27,21 @@
namespace WebCore {
-SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+inline SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
{
}
-SVGSwitchElement::~SVGSwitchElement()
+PassRefPtr<SVGSwitchElement> SVGSwitchElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGSwitchElement(tagName, document));
}
bool SVGSwitchElement::childShouldCreateRenderer(Node* child) const
{
+ // FIXME: This function does not do what the comment below implies it does.
+ // It will create a renderer for any valid SVG element children, not just the first one.
+
for (Node* n = firstChild(); n != 0; n = n->nextSibling()) {
if (n->isSVGElement()) {
SVGElement* element = static_cast<SVGElement*>(n);
diff --git a/WebCore/svg/SVGSwitchElement.h b/WebCore/svg/SVGSwitchElement.h
index 83b02d5..970cc1f 100644
--- a/WebCore/svg/SVGSwitchElement.h
+++ b/WebCore/svg/SVGSwitchElement.h
@@ -33,8 +33,10 @@ namespace WebCore {
public SVGLangSpace,
public SVGExternalResourcesRequired {
public:
+ static PassRefPtr<SVGSwitchElement> create(const QualifiedName&, Document*);
+
+ private:
SVGSwitchElement(const QualifiedName&, Document*);
- virtual ~SVGSwitchElement();
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -43,7 +45,6 @@ namespace WebCore {
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual void synchronizeProperty(const QualifiedName&);
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGSwitchElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
};
diff --git a/WebCore/svg/SVGSymbolElement.cpp b/WebCore/svg/SVGSymbolElement.cpp
index 9c110cb..7dab3e1 100644
--- a/WebCore/svg/SVGSymbolElement.cpp
+++ b/WebCore/svg/SVGSymbolElement.cpp
@@ -27,16 +27,14 @@
namespace WebCore {
-SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
+inline SVGSymbolElement::SVGSymbolElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGSymbolElement::~SVGSymbolElement()
+PassRefPtr<SVGSymbolElement> SVGSymbolElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGSymbolElement(tagName, document));
}
void SVGSymbolElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGSymbolElement.h b/WebCore/svg/SVGSymbolElement.h
index 7d6fdd3..1f310f8 100644
--- a/WebCore/svg/SVGSymbolElement.h
+++ b/WebCore/svg/SVGSymbolElement.h
@@ -34,15 +34,16 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGFitToViewBox {
public:
+ static PassRefPtr<SVGSymbolElement> create(const QualifiedName&, Document*);
+
+ private:
SVGSymbolElement(const QualifiedName&, Document*);
- virtual ~SVGSymbolElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- private:
virtual bool selfHasRelativeLengths() const;
// SVGExternalResourcesRequired
diff --git a/WebCore/svg/SVGTRefElement.cpp b/WebCore/svg/SVGTRefElement.cpp
index c140f05..72a037a 100644
--- a/WebCore/svg/SVGTRefElement.cpp
+++ b/WebCore/svg/SVGTRefElement.cpp
@@ -32,14 +32,14 @@
namespace WebCore {
-SVGTRefElement::SVGTRefElement(const QualifiedName& tagName, Document* doc)
- : SVGTextPositioningElement(tagName, doc)
- , SVGURIReference()
+inline SVGTRefElement::SVGTRefElement(const QualifiedName& tagName, Document* document)
+ : SVGTextPositioningElement(tagName, document)
{
}
-SVGTRefElement::~SVGTRefElement()
+PassRefPtr<SVGTRefElement> SVGTRefElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTRefElement(tagName, document));
}
void SVGTRefElement::updateReferencedText()
diff --git a/WebCore/svg/SVGTRefElement.h b/WebCore/svg/SVGTRefElement.h
index f86f015..7a79ae5 100644
--- a/WebCore/svg/SVGTRefElement.h
+++ b/WebCore/svg/SVGTRefElement.h
@@ -30,17 +30,18 @@ namespace WebCore {
class SVGTRefElement : public SVGTextPositioningElement,
public SVGURIReference {
public:
+ static PassRefPtr<SVGTRefElement> create(const QualifiedName&, Document*);
+
+ private:
SVGTRefElement(const QualifiedName&, Document*);
- virtual ~SVGTRefElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
- private:
void updateReferencedText();
// SVGURIReference
diff --git a/WebCore/svg/SVGTSpanElement.cpp b/WebCore/svg/SVGTSpanElement.cpp
index ef36780..d1deb70 100644
--- a/WebCore/svg/SVGTSpanElement.cpp
+++ b/WebCore/svg/SVGTSpanElement.cpp
@@ -29,13 +29,14 @@
namespace WebCore {
-SVGTSpanElement::SVGTSpanElement(const QualifiedName& tagName, Document* doc)
- : SVGTextPositioningElement(tagName, doc)
+inline SVGTSpanElement::SVGTSpanElement(const QualifiedName& tagName, Document* document)
+ : SVGTextPositioningElement(tagName, document)
{
}
-SVGTSpanElement::~SVGTSpanElement()
+PassRefPtr<SVGTSpanElement> SVGTSpanElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTSpanElement(tagName, document));
}
bool SVGTSpanElement::childShouldCreateRenderer(Node* child) const
diff --git a/WebCore/svg/SVGTSpanElement.h b/WebCore/svg/SVGTSpanElement.h
index 3b9357b..9b276a8 100644
--- a/WebCore/svg/SVGTSpanElement.h
+++ b/WebCore/svg/SVGTSpanElement.h
@@ -28,11 +28,13 @@ namespace WebCore {
class SVGTSpanElement : public SVGTextPositioningElement {
public:
+ static PassRefPtr<SVGTSpanElement> create(const QualifiedName&, Document*);
+
+ private:
SVGTSpanElement(const QualifiedName&, Document*);
- virtual ~SVGTSpanElement();
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTests.cpp b/WebCore/svg/SVGTests.cpp
index 9767432..e4813cd 100644
--- a/WebCore/svg/SVGTests.cpp
+++ b/WebCore/svg/SVGTests.cpp
@@ -64,11 +64,6 @@ SVGStringList* SVGTests::systemLanguage() const
return m_systemLanguage.get();
}
-bool SVGTests::hasExtension(const String&) const
-{
- return false;
-}
-
bool SVGTests::isValid() const
{
ExceptionCode ec = 0;
diff --git a/WebCore/svg/SVGTests.h b/WebCore/svg/SVGTests.h
index b638c0a..c5bb70f 100644
--- a/WebCore/svg/SVGTests.h
+++ b/WebCore/svg/SVGTests.h
@@ -33,20 +33,21 @@ namespace WebCore {
class SVGTests {
public:
- SVGTests();
- virtual ~SVGTests();
-
SVGStringList* requiredFeatures() const;
SVGStringList* requiredExtensions() const;
SVGStringList* systemLanguage() const;
- bool hasExtension(const String&) const;
+ bool hasExtension(const String&) const { return false; }
bool isValid() const;
bool parseMappedAttribute(Attribute*);
bool isKnownAttribute(const QualifiedName&);
+ protected:
+ SVGTests();
+ ~SVGTests();
+
private:
mutable RefPtr<SVGStringList> m_features;
mutable RefPtr<SVGStringList> m_extensions;
diff --git a/WebCore/svg/SVGTextContentElement.cpp b/WebCore/svg/SVGTextContentElement.cpp
index a96ce63..9d44b10 100644
--- a/WebCore/svg/SVGTextContentElement.cpp
+++ b/WebCore/svg/SVGTextContentElement.cpp
@@ -32,20 +32,13 @@
namespace WebCore {
-SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
+SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
, m_textLength(LengthModeOther)
, m_lengthAdjust(LENGTHADJUST_SPACING)
{
}
-SVGTextContentElement::~SVGTextContentElement()
-{
-}
-
unsigned SVGTextContentElement::getNumberOfChars() const
{
document()->updateLayoutIgnorePendingStylesheets();
diff --git a/WebCore/svg/SVGTextContentElement.h b/WebCore/svg/SVGTextContentElement.h
index d006a89..cf3698b 100644
--- a/WebCore/svg/SVGTextContentElement.h
+++ b/WebCore/svg/SVGTextContentElement.h
@@ -42,12 +42,6 @@ namespace WebCore {
LENGTHADJUST_SPACINGANDGLYPHS = 2
};
- SVGTextContentElement(const QualifiedName&, Document*);
- virtual ~SVGTextContentElement();
-
- virtual bool isValid() const { return SVGTests::isValid(); }
- virtual bool isTextContent() const { return true; }
-
unsigned getNumberOfChars() const;
float getComputedTextLength() const;
float getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode&) const;
@@ -58,15 +52,21 @@ namespace WebCore {
int getCharNumAtPosition(const FloatPoint&) const;
void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&) const;
- virtual void parseMappedAttribute(Attribute*);
- virtual void synchronizeProperty(const QualifiedName&);
-
bool isKnownAttribute(const QualifiedName&);
protected:
+ SVGTextContentElement(const QualifiedName&, Document*);
+
+ virtual bool isValid() const { return SVGTests::isValid(); }
+
+ virtual void parseMappedAttribute(Attribute*);
+ virtual void synchronizeProperty(const QualifiedName&);
+
virtual bool selfHasRelativeLengths() const;
private:
+ virtual bool isTextContent() const { return true; }
+
DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::textLengthAttr, SVGLength, TextLength, textLength)
DECLARE_ANIMATED_PROPERTY(SVGTextContentElement, SVGNames::lengthAdjustAttr, int, LengthAdjust, lengthAdjust)
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index e13e611..c8f280e 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -35,15 +35,16 @@
namespace WebCore {
-SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc)
+inline SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc)
: SVGTextPositioningElement(tagName, doc)
, SVGTransformable()
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
-SVGTextElement::~SVGTextElement()
+PassRefPtr<SVGTextElement> SVGTextElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTextElement(tagName, document));
}
void SVGTextElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGTextElement.h b/WebCore/svg/SVGTextElement.h
index 1788ea9..00afa59 100644
--- a/WebCore/svg/SVGTextElement.h
+++ b/WebCore/svg/SVGTextElement.h
@@ -30,10 +30,7 @@ namespace WebCore {
class SVGTextElement : public SVGTextPositioningElement,
public SVGTransformable {
public:
- SVGTextElement(const QualifiedName&, Document*);
- virtual ~SVGTextElement();
-
- virtual void parseMappedAttribute(Attribute*);
+ static PassRefPtr<SVGTextElement> create(const QualifiedName&, Document*);
virtual SVGElement* nearestViewportElement() const;
virtual SVGElement* farthestViewportElement() const;
@@ -42,6 +39,12 @@ namespace WebCore {
virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
virtual AffineTransform animatedLocalTransform() const;
+
+ private:
+ SVGTextElement(const QualifiedName&, Document*);
+
+ virtual void parseMappedAttribute(Attribute*);
+
virtual AffineTransform* supplementalTransform();
virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const { return SVGTransformable::localCoordinateSpaceTransform(mode); }
@@ -51,11 +54,10 @@ namespace WebCore {
virtual void svgAttributeChanged(const QualifiedName&);
virtual void synchronizeProperty(const QualifiedName&);
- private:
DECLARE_ANIMATED_PROPERTY(SVGTextElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
- // Used by <animateMotion>
- OwnPtr<AffineTransform> m_supplementalTransform;
+ // Used by <animateMotion>
+ OwnPtr<AffineTransform> m_supplementalTransform;
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index 8f21ab3..82adb29 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -34,17 +34,17 @@
namespace WebCore {
-SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Document* doc)
- : SVGTextContentElement(tagName, doc)
- , SVGURIReference()
+inline SVGTextPathElement::SVGTextPathElement(const QualifiedName& tagName, Document* document)
+ : SVGTextContentElement(tagName, document)
, m_startOffset(LengthModeOther)
, m_method(SVG_TEXTPATH_METHODTYPE_ALIGN)
, m_spacing(SVG_TEXTPATH_SPACINGTYPE_EXACT)
{
}
-SVGTextPathElement::~SVGTextPathElement()
+PassRefPtr<SVGTextPathElement> SVGTextPathElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGTextPathElement(tagName, document));
}
void SVGTextPathElement::parseMappedAttribute(Attribute* attr)
diff --git a/WebCore/svg/SVGTextPathElement.h b/WebCore/svg/SVGTextPathElement.h
index 537a107..b87dfa5 100644
--- a/WebCore/svg/SVGTextPathElement.h
+++ b/WebCore/svg/SVGTextPathElement.h
@@ -51,9 +51,11 @@ namespace WebCore {
TEXTPATH_SPACINGTYPE_EXACT = SVG_TEXTPATH_SPACINGTYPE_EXACT
};
- SVGTextPathElement(const QualifiedName&, Document*);
- virtual ~SVGTextPathElement();
+ static PassRefPtr<SVGTextPathElement> create(const QualifiedName&, Document*);
+ private:
+ SVGTextPathElement(const QualifiedName&, Document*);
+
virtual void insertedIntoDocument();
virtual void parseMappedAttribute(Attribute*);
@@ -61,9 +63,8 @@ namespace WebCore {
virtual void synchronizeProperty(const QualifiedName&);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
- bool childShouldCreateRenderer(Node*) const;
+ virtual bool childShouldCreateRenderer(Node*) const;
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, SVGNames::startOffsetAttr, SVGLength, StartOffset, startOffset)
diff --git a/WebCore/svg/SVGTextPositioningElement.cpp b/WebCore/svg/SVGTextPositioningElement.cpp
index 86231f8..4703482 100644
--- a/WebCore/svg/SVGTextPositioningElement.cpp
+++ b/WebCore/svg/SVGTextPositioningElement.cpp
@@ -32,8 +32,8 @@
namespace WebCore {
-SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* doc)
- : SVGTextContentElement(tagName, doc)
+SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagName, Document* document)
+ : SVGTextContentElement(tagName, document)
, m_x(SVGLengthList::create(SVGNames::xAttr))
, m_y(SVGLengthList::create(SVGNames::yAttr))
, m_dx(SVGLengthList::create(SVGNames::dxAttr))
@@ -42,10 +42,6 @@ SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagNam
{
}
-SVGTextPositioningElement::~SVGTextPositioningElement()
-{
-}
-
void SVGTextPositioningElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::xAttr)
diff --git a/WebCore/svg/SVGTextPositioningElement.h b/WebCore/svg/SVGTextPositioningElement.h
index 0ad3090..57a4028 100644
--- a/WebCore/svg/SVGTextPositioningElement.h
+++ b/WebCore/svg/SVGTextPositioningElement.h
@@ -29,9 +29,8 @@
namespace WebCore {
class SVGTextPositioningElement : public SVGTextContentElement {
- public:
+ protected:
SVGTextPositioningElement(const QualifiedName&, Document*);
- virtual ~SVGTextPositioningElement();
virtual void parseMappedAttribute(Attribute*);
virtual void svgAttributeChanged(const QualifiedName&);
@@ -39,7 +38,6 @@ namespace WebCore {
bool isKnownAttribute(const QualifiedName&);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGTextPositioningElement, SVGNames::xAttr, SVGLengthList*, X, x)
diff --git a/WebCore/svg/SVGTitleElement.cpp b/WebCore/svg/SVGTitleElement.cpp
index 7fdb2e0..5eb2204 100644
--- a/WebCore/svg/SVGTitleElement.cpp
+++ b/WebCore/svg/SVGTitleElement.cpp
@@ -26,11 +26,16 @@
namespace WebCore {
-SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
+inline SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
+PassRefPtr<SVGTitleElement> SVGTitleElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new SVGTitleElement(tagName, document));
+}
+
void SVGTitleElement::insertedIntoDocument()
{
SVGStyledElement::insertedIntoDocument();
diff --git a/WebCore/svg/SVGTitleElement.h b/WebCore/svg/SVGTitleElement.h
index f3381b1..986f73e 100644
--- a/WebCore/svg/SVGTitleElement.h
+++ b/WebCore/svg/SVGTitleElement.h
@@ -26,9 +26,13 @@
#include "SVGStyledElement.h"
namespace WebCore {
+
class SVGTitleElement : public SVGStyledElement,
public SVGLangSpace {
public:
+ static PassRefPtr<SVGTitleElement> create(const QualifiedName&, Document*);
+
+ private:
SVGTitleElement(const QualifiedName&, Document*);
virtual void insertedIntoDocument();
diff --git a/WebCore/svg/SVGTransform.cpp b/WebCore/svg/SVGTransform.cpp
index 594af16..86774db 100644
--- a/WebCore/svg/SVGTransform.cpp
+++ b/WebCore/svg/SVGTransform.cpp
@@ -52,10 +52,6 @@ SVGTransform::SVGTransform(const AffineTransform& matrix)
{
}
-SVGTransform::~SVGTransform()
-{
-}
-
bool SVGTransform::isValid()
{
return (m_type != SVG_TRANSFORM_UNKNOWN);
diff --git a/WebCore/svg/SVGTransform.h b/WebCore/svg/SVGTransform.h
index 071d908..db6a42f 100644
--- a/WebCore/svg/SVGTransform.h
+++ b/WebCore/svg/SVGTransform.h
@@ -44,8 +44,7 @@ namespace WebCore {
SVGTransform();
SVGTransform(SVGTransformType);
explicit SVGTransform(const AffineTransform&);
- virtual ~SVGTransform();
-
+
SVGTransformType type() const;
AffineTransform matrix() const;
diff --git a/WebCore/svg/SVGTransformable.cpp b/WebCore/svg/SVGTransformable.cpp
index a47cd1f..a25e086 100644
--- a/WebCore/svg/SVGTransformable.cpp
+++ b/WebCore/svg/SVGTransformable.cpp
@@ -33,15 +33,6 @@
namespace WebCore {
-SVGTransformable::SVGTransformable()
- : SVGLocatable()
-{
-}
-
-SVGTransformable::~SVGTransformable()
-{
-}
-
static int parseTransformParamList(const UChar*& ptr, const UChar* end, float* values, int required, int optional)
{
int optionalParams = 0, requiredParams = 0;
diff --git a/WebCore/svg/SVGTransformable.h b/WebCore/svg/SVGTransformable.h
index 8979eb1..e2fec4e 100644
--- a/WebCore/svg/SVGTransformable.h
+++ b/WebCore/svg/SVGTransformable.h
@@ -35,9 +35,6 @@ class QualifiedName;
class SVGTransformable : virtual public SVGLocatable {
public:
- SVGTransformable();
- virtual ~SVGTransformable();
-
enum TransformParsingMode {
ClearList,
DoNotClearList
diff --git a/WebCore/svg/SVGURIReference.cpp b/WebCore/svg/SVGURIReference.cpp
index 97003e5..af62eb4 100644
--- a/WebCore/svg/SVGURIReference.cpp
+++ b/WebCore/svg/SVGURIReference.cpp
@@ -27,14 +27,6 @@
namespace WebCore {
-SVGURIReference::SVGURIReference()
-{
-}
-
-SVGURIReference::~SVGURIReference()
-{
-}
-
bool SVGURIReference::parseMappedAttribute(Attribute* attr)
{
if (attr->name().matches(XLinkNames::hrefAttr)) {
diff --git a/WebCore/svg/SVGURIReference.h b/WebCore/svg/SVGURIReference.h
index 0900215..92a93a9 100644
--- a/WebCore/svg/SVGURIReference.h
+++ b/WebCore/svg/SVGURIReference.h
@@ -31,8 +31,7 @@ namespace WebCore {
class SVGURIReference {
public:
- SVGURIReference();
- virtual ~SVGURIReference();
+ virtual ~SVGURIReference() { }
bool parseMappedAttribute(Attribute*);
bool isKnownAttribute(const QualifiedName&);
diff --git a/WebCore/svg/SVGUseElement.cpp b/WebCore/svg/SVGUseElement.cpp
index 68c087c..fc6c9fc 100644
--- a/WebCore/svg/SVGUseElement.cpp
+++ b/WebCore/svg/SVGUseElement.cpp
@@ -54,12 +54,8 @@
namespace WebCore {
-SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledTransformableElement(tagName, doc)
- , SVGTests()
- , SVGLangSpace()
- , SVGExternalResourcesRequired()
- , SVGURIReference()
+inline SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledTransformableElement(tagName, document)
, m_x(LengthModeWidth)
, m_y(LengthModeHeight)
, m_width(LengthModeWidth)
@@ -70,8 +66,9 @@ SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* doc)
{
}
-SVGUseElement::~SVGUseElement()
+PassRefPtr<SVGUseElement> SVGUseElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGUseElement(tagName, document));
}
SVGElementInstance* SVGUseElement::instanceRoot() const
@@ -798,7 +795,7 @@ void SVGUseElement::expandUseElementsInShadowTree(SVGShadowTreeRootElement* shad
// Don't ASSERT(target) here, it may be "pending", too.
// Setup sub-shadow tree root node
- RefPtr<SVGShadowTreeContainerElement> cloneParent = new SVGShadowTreeContainerElement(document());
+ RefPtr<SVGShadowTreeContainerElement> cloneParent = SVGShadowTreeContainerElement::create(document());
// Spec: In the generated content, the 'use' will be replaced by 'g', where all attributes from the
// 'use' element except for x, y, width, height and xlink:href are transferred to the generated 'g' element.
@@ -848,7 +845,7 @@ void SVGUseElement::expandSymbolElementsInShadowTree(SVGShadowTreeRootElement* s
// height are provided on the 'use' element, then these attributes will be transferred to
// the generated 'svg'. If attributes width and/or height are not specified, the generated
// 'svg' element will use values of 100% for these attributes.
- RefPtr<SVGSVGElement> svgElement = new SVGSVGElement(SVGNames::svgTag, document());
+ RefPtr<SVGSVGElement> svgElement = SVGSVGElement::create(SVGNames::svgTag, document());
// Transfer all attributes from <symbol> to the new <svg> element
svgElement->attributes()->setAttributes(*element->attributes());
diff --git a/WebCore/svg/SVGUseElement.h b/WebCore/svg/SVGUseElement.h
index 52f3f6e..9366d25 100644
--- a/WebCore/svg/SVGUseElement.h
+++ b/WebCore/svg/SVGUseElement.h
@@ -40,11 +40,17 @@ namespace WebCore {
public SVGExternalResourcesRequired,
public SVGURIReference {
public:
- SVGUseElement(const QualifiedName&, Document*);
- virtual ~SVGUseElement();
+ static PassRefPtr<SVGUseElement> create(const QualifiedName&, Document*);
SVGElementInstance* instanceRoot() const;
SVGElementInstance* animatedInstanceRoot() const;
+ SVGElementInstance* instanceForShadowTreeElement(Node*) const;
+ void invalidateShadowTree();
+
+ RenderObject* rendererClipChild() const;
+
+ private:
+ SVGUseElement(const QualifiedName&, Document*);
virtual bool isValid() const { return SVGTests::isValid(); }
@@ -62,20 +68,15 @@ namespace WebCore {
virtual void detach();
virtual Path toClipPath() const;
- RenderObject* rendererClipChild() const;
static void removeDisallowedElementsFromSubtree(Node* element);
- SVGElementInstance* instanceForShadowTreeElement(Node* element) const;
- void invalidateShadowTree();
void setUpdatesBlocked(bool blocked) { m_updatesBlocked = blocked; }
- private:
friend class RenderSVGShadowTreeRootContainer;
bool isPendingResource() const { return m_isPendingResource; }
void buildShadowAndInstanceTree(SVGShadowTreeRootElement*);
- private:
virtual bool selfHasRelativeLengths() const;
DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::xAttr, SVGLength, X, x)
@@ -89,7 +90,6 @@ namespace WebCore {
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGUseElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
- private:
// Instance tree handling
void buildInstanceTree(SVGElement* target, SVGElementInstance* targetInstance, bool& foundCycle);
void handleDeepUseReferencing(SVGUseElement* use, SVGElementInstance* targetInstance, bool& foundCycle);
diff --git a/WebCore/svg/SVGVKernElement.cpp b/WebCore/svg/SVGVKernElement.cpp
index 662f714..b9f3c17 100644
--- a/WebCore/svg/SVGVKernElement.cpp
+++ b/WebCore/svg/SVGVKernElement.cpp
@@ -33,13 +33,14 @@ namespace WebCore {
using namespace SVGNames;
-SVGVKernElement::SVGVKernElement(const QualifiedName& tagName, Document* doc)
- : SVGElement(tagName, doc)
+inline SVGVKernElement::SVGVKernElement(const QualifiedName& tagName, Document* document)
+ : SVGElement(tagName, document)
{
}
-SVGVKernElement::~SVGVKernElement()
+PassRefPtr<SVGVKernElement> SVGVKernElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGVKernElement(tagName, document));
}
void SVGVKernElement::insertedIntoDocument()
diff --git a/WebCore/svg/SVGVKernElement.h b/WebCore/svg/SVGVKernElement.h
index c4bc90f..c8bb1d4 100644
--- a/WebCore/svg/SVGVKernElement.h
+++ b/WebCore/svg/SVGVKernElement.h
@@ -34,15 +34,17 @@ class SVGFontData;
class SVGVKernElement : public SVGElement {
public:
+ static PassRefPtr<SVGVKernElement> create(const QualifiedName&, Document*);
+
+ void buildVerticalKerningPair(KerningPairVector&);
+
+private:
SVGVKernElement(const QualifiedName&, Document*);
- virtual ~SVGVKernElement();
virtual void insertedIntoDocument();
virtual void removedFromDocument();
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
-
- void buildVerticalKerningPair(KerningPairVector&);
};
} // namespace WebCore
diff --git a/WebCore/svg/SVGViewElement.cpp b/WebCore/svg/SVGViewElement.cpp
index 2b9b6cc..6a83066 100644
--- a/WebCore/svg/SVGViewElement.cpp
+++ b/WebCore/svg/SVGViewElement.cpp
@@ -32,16 +32,14 @@
namespace WebCore {
-SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* doc)
- : SVGStyledElement(tagName, doc)
- , SVGExternalResourcesRequired()
- , SVGFitToViewBox()
- , SVGZoomAndPan()
+inline SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* document)
+ : SVGStyledElement(tagName, document)
{
}
-SVGViewElement::~SVGViewElement()
+PassRefPtr<SVGViewElement> SVGViewElement::create(const QualifiedName& tagName, Document* document)
{
+ return adoptRef(new SVGViewElement(tagName, document));
}
SVGStringList* SVGViewElement::viewTarget() const
diff --git a/WebCore/svg/SVGViewElement.h b/WebCore/svg/SVGViewElement.h
index 14ea19e..b483236 100644
--- a/WebCore/svg/SVGViewElement.h
+++ b/WebCore/svg/SVGViewElement.h
@@ -35,17 +35,18 @@ namespace WebCore {
public SVGFitToViewBox,
public SVGZoomAndPan {
public:
+ static PassRefPtr<SVGViewElement> create(const QualifiedName&, Document*);
+
+ SVGStringList* viewTarget() const;
+
+ private:
SVGViewElement(const QualifiedName&, Document*);
- virtual ~SVGViewElement();
virtual void parseMappedAttribute(Attribute*);
virtual void synchronizeProperty(const QualifiedName&);
- SVGStringList* viewTarget() const;
-
virtual bool rendererIsNeeded(RenderStyle*) { return false; }
- private:
// SVGExternalResourcesRequired
DECLARE_ANIMATED_PROPERTY(SVGViewElement, SVGNames::externalResourcesRequiredAttr, bool, ExternalResourcesRequired, externalResourcesRequired)
diff --git a/WebCore/svg/SVGViewSpec.cpp b/WebCore/svg/SVGViewSpec.cpp
index 25fb66b..20c58ac 100644
--- a/WebCore/svg/SVGViewSpec.cpp
+++ b/WebCore/svg/SVGViewSpec.cpp
@@ -32,17 +32,11 @@
namespace WebCore {
SVGViewSpec::SVGViewSpec(const SVGSVGElement* contextElement)
- : SVGFitToViewBox()
- , SVGZoomAndPan()
- , m_contextElement(contextElement)
+ : m_contextElement(contextElement)
, m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
-SVGViewSpec::~SVGViewSpec()
-{
-}
-
void SVGViewSpec::setTransform(const String& transform)
{
SVGTransformable::parseTransformAttribute(m_transform.get(), transform);
diff --git a/WebCore/svg/SVGViewSpec.h b/WebCore/svg/SVGViewSpec.h
index 3355fce..cf64bca 100644
--- a/WebCore/svg/SVGViewSpec.h
+++ b/WebCore/svg/SVGViewSpec.h
@@ -37,7 +37,6 @@ namespace WebCore {
public Noncopyable {
public:
SVGViewSpec(const SVGSVGElement*);
- virtual ~SVGViewSpec();
bool parseViewSpec(const String&);
diff --git a/WebCore/svg/SVGZoomAndPan.cpp b/WebCore/svg/SVGZoomAndPan.cpp
index d256bd0..93ab3ad 100644
--- a/WebCore/svg/SVGZoomAndPan.cpp
+++ b/WebCore/svg/SVGZoomAndPan.cpp
@@ -29,20 +29,6 @@
namespace WebCore {
-SVGZoomAndPan::SVGZoomAndPan()
- : m_zoomAndPan(SVG_ZOOMANDPAN_MAGNIFY)
-{
-}
-
-SVGZoomAndPan::~SVGZoomAndPan()
-{
-}
-
-unsigned short SVGZoomAndPan::zoomAndPan() const
-{
- return m_zoomAndPan;
-}
-
void SVGZoomAndPan::setZoomAndPan(unsigned short zoomAndPan)
{
m_zoomAndPan = zoomAndPan;
diff --git a/WebCore/svg/SVGZoomAndPan.h b/WebCore/svg/SVGZoomAndPan.h
index a85304d..b2e9d83 100644
--- a/WebCore/svg/SVGZoomAndPan.h
+++ b/WebCore/svg/SVGZoomAndPan.h
@@ -22,7 +22,8 @@
#define SVGZoomAndPan_h
#if ENABLE(SVG)
-#include "PlatformString.h"
+
+#include <wtf/unicode/Unicode.h>
namespace WebCore {
@@ -37,10 +38,10 @@ namespace WebCore {
SVG_ZOOMANDPAN_MAGNIFY = 2
};
- SVGZoomAndPan();
- virtual ~SVGZoomAndPan();
+ SVGZoomAndPan() : m_zoomAndPan(SVG_ZOOMANDPAN_MAGNIFY) { }
+ virtual ~SVGZoomAndPan() { }
- unsigned short zoomAndPan() const;
+ unsigned short zoomAndPan() const { return m_zoomAndPan; }
virtual void setZoomAndPan(unsigned short zoomAndPan);
bool parseMappedAttribute(Attribute*);
@@ -55,4 +56,5 @@ namespace WebCore {
} // namespace WebCore
#endif // ENABLE(SVG)
+
#endif // SVGZoomAndPan_h
diff --git a/WebCore/svg/SVGZoomEvent.cpp b/WebCore/svg/SVGZoomEvent.cpp
index f8d94e4..784c32b 100644
--- a/WebCore/svg/SVGZoomEvent.cpp
+++ b/WebCore/svg/SVGZoomEvent.cpp
@@ -31,10 +31,6 @@ SVGZoomEvent::SVGZoomEvent()
{
}
-SVGZoomEvent::~SVGZoomEvent()
-{
-}
-
FloatRect SVGZoomEvent::zoomRectScreen() const
{
return m_zoomRectScreen;
diff --git a/WebCore/svg/SVGZoomEvent.h b/WebCore/svg/SVGZoomEvent.h
index d4b7de0..48a3636 100644
--- a/WebCore/svg/SVGZoomEvent.h
+++ b/WebCore/svg/SVGZoomEvent.h
@@ -31,7 +31,6 @@ namespace WebCore {
class SVGZoomEvent : public UIEvent {
public:
static PassRefPtr<SVGZoomEvent> create() { return adoptRef(new SVGZoomEvent); }
- virtual ~SVGZoomEvent();
// 'SVGZoomEvent' functions
FloatRect zoomRectScreen() const;
@@ -46,11 +45,11 @@ namespace WebCore {
FloatPoint newTranslate() const;
- virtual bool isSVGZoomEvent() const;
-
private:
SVGZoomEvent();
+ virtual bool isSVGZoomEvent() const;
+
float m_newScale;
float m_previousScale;
diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp
index 6608c9e..2d1d592 100644
--- a/WebCore/svg/graphics/SVGImage.cpp
+++ b/WebCore/svg/graphics/SVGImage.cpp
@@ -240,7 +240,7 @@ bool SVGImage::dataChanged(bool allDataReceived)
static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderClient;
Page::PageClients pageClients;
- m_chromeClient.set(new SVGImageChromeClient(this));
+ m_chromeClient = adoptPtr(new SVGImageChromeClient(this));
pageClients.chromeClient = m_chromeClient.get();
#if ENABLE(CONTEXT_MENUS)
static ContextMenuClient* dummyContextMenuClient = new EmptyContextMenuClient;
diff --git a/WebCore/svg/svgtags.in b/WebCore/svg/svgtags.in
index adf0b24..ee6765c 100644
--- a/WebCore/svg/svgtags.in
+++ b/WebCore/svg/svgtags.in
@@ -2,105 +2,105 @@ namespace="SVG"
namespaceURI="http://www.w3.org/2000/svg"
guardFactoryWith="ENABLE(SVG)"
-a createWithNew
+a
#if ENABLE_SVG_FONTS
-altGlyph createWithNew
+altGlyph
#endif
#if 0
-altGlyphDef createWithNew
-altGlyphItem createWithNew
+altGlyphDef
+altGlyphItem
#endif
#if ENABLE_SVG_ANIMATION
-animate createWithNew
-animateColor createWithNew
-animateMotion JSInterfaceName=SVGElement, createWithNew
-animateTransform createWithNew
-set createWithNew
+animate
+animateColor
+animateMotion JSInterfaceName=SVGElement
+animateTransform
+set
#endif
-circle createWithNew
-clipPath createWithNew
+circle
+clipPath
#if 0
-color_profile createWithNew
+color_profile
#endif
-cursor createWithNew
-defs createWithNew
-desc createWithNew
-ellipse createWithNew
+cursor
+defs
+desc
+ellipse
#if ENABLE_FILTERS
-feBlend createWithNew
-feColorMatrix createWithNew
-feComponentTransfer createWithNew
-feComposite createWithNew
-feConvolveMatrix createWithNew
-feDiffuseLighting createWithNew
-feDisplacementMap createWithNew
-feDistantLight createWithNew
-feFlood createWithNew
-feFuncA createWithNew
-feFuncB createWithNew
-feFuncG createWithNew
-feFuncR createWithNew
-feGaussianBlur createWithNew
-feImage createWithNew
-feMerge createWithNew
-feMergeNode createWithNew
-feMorphology createWithNew
-feOffset createWithNew
-fePointLight createWithNew
-feSpecularLighting createWithNew
-feSpotLight createWithNew
-feTile createWithNew
-feTurbulence createWithNew
-filter createWithNew
+feBlend
+feColorMatrix
+feComponentTransfer
+feComposite
+feConvolveMatrix
+feDiffuseLighting
+feDisplacementMap
+feDistantLight
+feFlood
+feFuncA
+feFuncB
+feFuncG
+feFuncR
+feGaussianBlur
+feImage
+feMerge
+feMergeNode
+feMorphology
+feOffset
+fePointLight
+feSpecularLighting
+feSpotLight
+feTile
+feTurbulence
+filter
#endif
#if ENABLE_SVG_FONTS
-font createWithNew
-font_face createWithNew
-font_face_format createWithNew
-font_face_name createWithNew
-font_face_src createWithNew
-font_face_uri createWithNew
+font
+font_face
+font_face_format
+font_face_name
+font_face_src
+font_face_uri
#endif
#if ENABLE_SVG_FOREIGN_OBJECT
-foreignObject createWithNew
+foreignObject
#endif
-g createWithNew
+g
#if ENABLE_SVG_FONTS
-glyph createWithNew
+glyph
#endif
#if 0
-glyphRef createWithNew
+glyphRef
#endif
#if ENABLE_SVG_FONTS
-hkern interfaceName=SVGHKernElement, JSInterfaceName=SVGElement, createWithNew
+hkern interfaceName=SVGHKernElement, JSInterfaceName=SVGElement
#endif
-image createWithNew
-line createWithNew
-linearGradient createWithNew
-marker createWithNew
-mask createWithNew
-metadata createWithNew
+image
+line
+linearGradient
+marker
+mask
+metadata
#if ENABLE_SVG_FONTS
-missing_glyph createWithNew
+missing_glyph
#endif
-mpath interfaceName=SVGMPathElement, JSInterfaceName=SVGElement, createWithNew
-path createWithNew
-pattern createWithNew
-polygon createWithNew
-polyline createWithNew
-radialGradient createWithNew
-rect createWithNew
-script constructorNeedsCreatedByParser, createWithNew
-stop createWithNew
-style constructorNeedsCreatedByParser, createWithNew
-svg interfaceName=SVGSVGElement, createWithNew
-switch createWithNew
-symbol createWithNew
-text createWithNew
-textPath createWithNew
-title createWithNew
-tref interfaceName=SVGTRefElement, createWithNew
-tspan interfaceName=SVGTSpanElement, createWithNew
-use createWithNew
-view createWithNew
-vkern interfaceName=SVGVKernElement, createWithNew
+mpath interfaceName=SVGMPathElement, JSInterfaceName=SVGElement
+path
+pattern
+polygon
+polyline
+radialGradient
+rect
+script constructorNeedsCreatedByParser
+stop
+style constructorNeedsCreatedByParser
+svg interfaceName=SVGSVGElement
+switch
+symbol
+text
+textPath
+title
+tref interfaceName=SVGTRefElement
+tspan interfaceName=SVGTSpanElement
+use
+view
+vkern interfaceName=SVGVKernElement
diff --git a/WebCore/wml/WMLAElement.cpp b/WebCore/wml/WMLAElement.cpp
index 99e30e9..4d1bf95 100644
--- a/WebCore/wml/WMLAElement.cpp
+++ b/WebCore/wml/WMLAElement.cpp
@@ -51,6 +51,11 @@ WMLAElement::WMLAElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLAElement> WMLAElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLAElement(tagName, document));
+}
+
void WMLAElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == HTMLNames::hrefAttr) {
diff --git a/WebCore/wml/WMLAElement.h b/WebCore/wml/WMLAElement.h
index b21ebb6..9dcda6b 100644
--- a/WebCore/wml/WMLAElement.h
+++ b/WebCore/wml/WMLAElement.h
@@ -33,6 +33,8 @@ namespace WebCore {
class WMLAElement : public WMLElement {
public:
+ static PassRefPtr<WMLAElement> create(const QualifiedName& tagName, Document*);
+
WMLAElement(const QualifiedName& tagName, Document*);
virtual bool supportsFocus() const;
diff --git a/WebCore/wml/WMLAccessElement.cpp b/WebCore/wml/WMLAccessElement.cpp
index d6e6768..0e13106 100644
--- a/WebCore/wml/WMLAccessElement.cpp
+++ b/WebCore/wml/WMLAccessElement.cpp
@@ -37,6 +37,11 @@ WMLAccessElement::WMLAccessElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLAccessElement> WMLAccessElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLAccessElement(tagName, document));
+}
+
void WMLAccessElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == domainAttr) {
diff --git a/WebCore/wml/WMLAccessElement.h b/WebCore/wml/WMLAccessElement.h
index 83290e4..eb7436c 100644
--- a/WebCore/wml/WMLAccessElement.h
+++ b/WebCore/wml/WMLAccessElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLAccessElement : public WMLElement {
public:
+ static PassRefPtr<WMLAccessElement> create(const QualifiedName& tagName, Document*);
+
WMLAccessElement(const QualifiedName& tagName, Document*);
virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/wml/WMLAnchorElement.cpp b/WebCore/wml/WMLAnchorElement.cpp
index ac9c8f2..5b842bc 100644
--- a/WebCore/wml/WMLAnchorElement.cpp
+++ b/WebCore/wml/WMLAnchorElement.cpp
@@ -40,6 +40,11 @@ WMLAnchorElement::WMLAnchorElement(const QualifiedName& tagName, Document* doc)
setIsLink();
}
+PassRefPtr<WMLAnchorElement> WMLAnchorElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLAnchorElement(tagName, document));
+}
+
WMLAnchorElement::~WMLAnchorElement()
{
}
diff --git a/WebCore/wml/WMLAnchorElement.h b/WebCore/wml/WMLAnchorElement.h
index abc01c9..6cb36c8 100644
--- a/WebCore/wml/WMLAnchorElement.h
+++ b/WebCore/wml/WMLAnchorElement.h
@@ -30,6 +30,8 @@ class WMLTaskElement;
class WMLAnchorElement : public WMLAElement {
public:
+ static PassRefPtr<WMLAnchorElement> create(const QualifiedName& tagName, Document*);
+
WMLAnchorElement(const QualifiedName& tagName, Document*);
virtual ~WMLAnchorElement();
diff --git a/WebCore/wml/WMLBRElement.cpp b/WebCore/wml/WMLBRElement.cpp
index d24d2a2..51a2f57 100644
--- a/WebCore/wml/WMLBRElement.cpp
+++ b/WebCore/wml/WMLBRElement.cpp
@@ -40,6 +40,11 @@ WMLBRElement::WMLBRElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLBRElement> WMLBRElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLBRElement(tagName, document));
+}
+
bool WMLBRElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
{
if (attrName == HTMLNames::clearAttr) {
diff --git a/WebCore/wml/WMLBRElement.h b/WebCore/wml/WMLBRElement.h
index 41c8776..fb12688 100644
--- a/WebCore/wml/WMLBRElement.h
+++ b/WebCore/wml/WMLBRElement.h
@@ -32,6 +32,8 @@ namespace WebCore {
class WMLBRElement : public WMLElement {
public:
+ static PassRefPtr<WMLBRElement> create(const QualifiedName& tagName, Document*);
+
WMLBRElement(const QualifiedName& tagName, Document*);
virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
diff --git a/WebCore/wml/WMLCardElement.cpp b/WebCore/wml/WMLCardElement.cpp
index 645d0fc..38ba8ab 100644
--- a/WebCore/wml/WMLCardElement.cpp
+++ b/WebCore/wml/WMLCardElement.cpp
@@ -55,6 +55,11 @@ WMLCardElement::WMLCardElement(const QualifiedName& tagName, Document* doc)
ASSERT(hasTagName(cardTag));
}
+PassRefPtr<WMLCardElement> WMLCardElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLCardElement(tagName, document));
+}
+
WMLCardElement::~WMLCardElement()
{
}
diff --git a/WebCore/wml/WMLCardElement.h b/WebCore/wml/WMLCardElement.h
index 40eec36..f82374d 100644
--- a/WebCore/wml/WMLCardElement.h
+++ b/WebCore/wml/WMLCardElement.h
@@ -33,6 +33,8 @@ class WMLTimerElement;
class WMLCardElement : public WMLElement, public WMLEventHandlingElement {
public:
+ static PassRefPtr<WMLCardElement> create(const QualifiedName& tagName, Document*);
+
WMLCardElement(const QualifiedName&, Document*);
virtual ~WMLCardElement();
diff --git a/WebCore/wml/WMLDoElement.cpp b/WebCore/wml/WMLDoElement.cpp
index 6a40fc9..9398aa0 100644
--- a/WebCore/wml/WMLDoElement.cpp
+++ b/WebCore/wml/WMLDoElement.cpp
@@ -51,6 +51,11 @@ WMLDoElement::WMLDoElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLDoElement> WMLDoElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLDoElement(tagName, document));
+}
+
void WMLDoElement::defaultEventHandler(Event* event)
{
if (m_isOptional)
diff --git a/WebCore/wml/WMLDoElement.h b/WebCore/wml/WMLDoElement.h
index 024ef80..2ba6d9e 100644
--- a/WebCore/wml/WMLDoElement.h
+++ b/WebCore/wml/WMLDoElement.h
@@ -30,6 +30,8 @@ class WMLTaskElement;
class WMLDoElement : public WMLElement {
public:
+ static PassRefPtr<WMLDoElement> create(const QualifiedName& tagName, Document*);
+
WMLDoElement(const QualifiedName& tagName, Document*);
virtual void defaultEventHandler(Event*);
diff --git a/WebCore/wml/WMLDocument.h b/WebCore/wml/WMLDocument.h
index 3057d9b..f2be938 100644
--- a/WebCore/wml/WMLDocument.h
+++ b/WebCore/wml/WMLDocument.h
@@ -34,7 +34,7 @@ class WMLDocument : public Document {
public:
static PassRefPtr<WMLDocument> create(Frame* frame, const KURL& url)
{
- return adoptRef(new WMLDocument(frame, url));
+ return adoptRef(adoptRef(new WMLDocument(frame, url))));
}
virtual ~WMLDocument();
diff --git a/WebCore/wml/WMLElement.cpp b/WebCore/wml/WMLElement.cpp
index f359236..4d18e94 100644
--- a/WebCore/wml/WMLElement.cpp
+++ b/WebCore/wml/WMLElement.cpp
@@ -39,13 +39,13 @@ namespace WebCore {
using namespace WMLNames;
WMLElement::WMLElement(const QualifiedName& tagName, Document* document)
- : StyledElement(tagName, document, CreateStyledElementZeroRefCount)
+ : StyledElement(tagName, document, CreateStyledElement)
{
}
PassRefPtr<WMLElement> WMLElement::create(const QualifiedName& tagName, Document* document)
{
- return new WMLElement(tagName, document);
+ return adoptRef(new WMLElement(tagName, document));
}
bool WMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
diff --git a/WebCore/wml/WMLFieldSetElement.cpp b/WebCore/wml/WMLFieldSetElement.cpp
index c89e669..86c1e46 100644
--- a/WebCore/wml/WMLFieldSetElement.cpp
+++ b/WebCore/wml/WMLFieldSetElement.cpp
@@ -39,6 +39,11 @@ WMLFieldSetElement::WMLFieldSetElement(const QualifiedName& tagName, Document* d
{
}
+PassRefPtr<WMLFieldSetElement> WMLFieldSetElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLFieldSetElement(tagName, document));
+}
+
WMLFieldSetElement::~WMLFieldSetElement()
{
}
diff --git a/WebCore/wml/WMLFieldSetElement.h b/WebCore/wml/WMLFieldSetElement.h
index 1087fa1..11ef2c1 100644
--- a/WebCore/wml/WMLFieldSetElement.h
+++ b/WebCore/wml/WMLFieldSetElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLFieldSetElement : public WMLElement {
public:
+ static PassRefPtr<WMLFieldSetElement> create(const QualifiedName&, Document*);
+
WMLFieldSetElement(const QualifiedName& tagName, Document*);
virtual ~WMLFieldSetElement();
diff --git a/WebCore/wml/WMLFormControlElement.cpp b/WebCore/wml/WMLFormControlElement.cpp
index 93ffbda..c264340 100644
--- a/WebCore/wml/WMLFormControlElement.cpp
+++ b/WebCore/wml/WMLFormControlElement.cpp
@@ -35,6 +35,11 @@ WMLFormControlElement::WMLFormControlElement(const QualifiedName& tagName, Docum
{
}
+PassRefPtr<WMLFormControlElement> WMLFormControlElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLFormControlElement(tagName, document));
+}
+
WMLFormControlElement::~WMLFormControlElement()
{
}
diff --git a/WebCore/wml/WMLGoElement.cpp b/WebCore/wml/WMLGoElement.cpp
index d3a6216..cc41226 100644
--- a/WebCore/wml/WMLGoElement.cpp
+++ b/WebCore/wml/WMLGoElement.cpp
@@ -50,6 +50,11 @@ WMLGoElement::WMLGoElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLGoElement> WMLGoElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLGoElement(tagName, document));
+}
+
void WMLGoElement::registerPostfieldElement(WMLPostfieldElement* postfield)
{
ASSERT(m_postfieldElements.find(postfield) == WTF::notFound);
diff --git a/WebCore/wml/WMLGoElement.h b/WebCore/wml/WMLGoElement.h
index d7f8991..d29e124 100644
--- a/WebCore/wml/WMLGoElement.h
+++ b/WebCore/wml/WMLGoElement.h
@@ -33,6 +33,8 @@ class WMLPostfieldElement;
class WMLGoElement : public WMLTaskElement {
public:
+ static PassRefPtr<WMLGoElement> create(const QualifiedName&, Document*);
+
WMLGoElement(const QualifiedName& tagName, Document*);
void registerPostfieldElement(WMLPostfieldElement*);
diff --git a/WebCore/wml/WMLImageElement.cpp b/WebCore/wml/WMLImageElement.cpp
index f6b3f1e..c4f6b06 100644
--- a/WebCore/wml/WMLImageElement.cpp
+++ b/WebCore/wml/WMLImageElement.cpp
@@ -43,6 +43,11 @@ WMLImageElement::WMLImageElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLImageElement> WMLImageElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLImageElement(tagName, document));
+}
+
WMLImageElement::~WMLImageElement()
{
}
@@ -109,7 +114,9 @@ void WMLImageElement::attach()
RenderObject* WMLImageElement::createRenderer(RenderArena* arena, RenderStyle*)
{
- return new (arena) RenderImage(this);
+ RenderImage* image = new (arena) RenderImage(this);
+ image->setImageResource(RenderImageResource::create());
+ return image;
}
void WMLImageElement::insertedIntoDocument()
diff --git a/WebCore/wml/WMLImageElement.h b/WebCore/wml/WMLImageElement.h
index 2ec5031..6421f6e 100644
--- a/WebCore/wml/WMLImageElement.h
+++ b/WebCore/wml/WMLImageElement.h
@@ -29,6 +29,8 @@ namespace WebCore {
class WMLImageElement : public WMLElement {
public:
+ static PassRefPtr<WMLImageElement> create(const QualifiedName&, Document*);
+
WMLImageElement(const QualifiedName& tagName, Document*);
virtual ~WMLImageElement();
diff --git a/WebCore/wml/WMLInputElement.cpp b/WebCore/wml/WMLInputElement.cpp
index bf407c1..639658f 100644
--- a/WebCore/wml/WMLInputElement.cpp
+++ b/WebCore/wml/WMLInputElement.cpp
@@ -45,6 +45,11 @@ WMLInputElement::WMLInputElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLInputElement> WMLInputElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLInputElement(tagName, document));
+}
+
WMLInputElement::~WMLInputElement()
{
if (m_isPasswordField)
diff --git a/WebCore/wml/WMLInputElement.h b/WebCore/wml/WMLInputElement.h
index 329d869..70d85e9 100644
--- a/WebCore/wml/WMLInputElement.h
+++ b/WebCore/wml/WMLInputElement.h
@@ -31,6 +31,8 @@ class FormDataList;
class WMLInputElement : public WMLFormControlElement, public InputElement {
public:
+ static PassRefPtr<WMLInputElement> create(const QualifiedName&, Document*);
+
WMLInputElement(const QualifiedName& tagName, Document*);
virtual ~WMLInputElement();
diff --git a/WebCore/wml/WMLInsertedLegendElement.cpp b/WebCore/wml/WMLInsertedLegendElement.cpp
index 1464e71..0a18b4a 100644
--- a/WebCore/wml/WMLInsertedLegendElement.cpp
+++ b/WebCore/wml/WMLInsertedLegendElement.cpp
@@ -30,6 +30,11 @@ WMLInsertedLegendElement::WMLInsertedLegendElement(const QualifiedName& tagName,
{
}
+PassRefPtr<WMLInsertedLegendElement> WMLInsertedLegendElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLInsertedLegendElement(tagName, document));
+}
+
WMLInsertedLegendElement::~WMLInsertedLegendElement()
{
}
diff --git a/WebCore/wml/WMLInsertedLegendElement.h b/WebCore/wml/WMLInsertedLegendElement.h
index 73392ad..e79550e 100644
--- a/WebCore/wml/WMLInsertedLegendElement.h
+++ b/WebCore/wml/WMLInsertedLegendElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLInsertedLegendElement : public WMLElement {
public:
+ static PassRefPtr<WMLInsertedLegendElement> create(const QualifiedName&, Document*);
+
WMLInsertedLegendElement(const QualifiedName& tagName, Document*);
virtual ~WMLInsertedLegendElement();
};
diff --git a/WebCore/wml/WMLIntrinsicEvent.cpp b/WebCore/wml/WMLIntrinsicEvent.cpp
index bb631b9..ec5e987 100644
--- a/WebCore/wml/WMLIntrinsicEvent.cpp
+++ b/WebCore/wml/WMLIntrinsicEvent.cpp
@@ -43,6 +43,11 @@ WMLIntrinsicEvent::WMLIntrinsicEvent(Document* document, const String& targetURL
m_taskElement->setAttribute(HTMLNames::hrefAttr, targetURL);
}
+PassRefPtr<WMLIntrinsicEvent> WMLIntrinsicEvent::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLIntrinsicEvent(tagName, document));
+}
+
WMLIntrinsicEvent::WMLIntrinsicEvent(WMLTaskElement* taskElement)
: m_taskElement(taskElement)
{
diff --git a/WebCore/wml/WMLMetaElement.cpp b/WebCore/wml/WMLMetaElement.cpp
index e28afaf..2b8e00d 100644
--- a/WebCore/wml/WMLMetaElement.cpp
+++ b/WebCore/wml/WMLMetaElement.cpp
@@ -34,6 +34,11 @@ WMLMetaElement::WMLMetaElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLMetaElement> WMLMetaElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLMetaElement(tagName, document));
+}
+
WMLMetaElement::~WMLMetaElement()
{
}
diff --git a/WebCore/wml/WMLMetaElement.h b/WebCore/wml/WMLMetaElement.h
index 765490d..16e2268 100644
--- a/WebCore/wml/WMLMetaElement.h
+++ b/WebCore/wml/WMLMetaElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLMetaElement : public WMLElement {
public:
+ static PassRefPtr<WMLMetaElement> create(const QualifiedName&, Document*);
+
WMLMetaElement(const QualifiedName& tagName, Document*);
virtual ~WMLMetaElement();
diff --git a/WebCore/wml/WMLNoopElement.cpp b/WebCore/wml/WMLNoopElement.cpp
index b2ce506..3afddeb 100644
--- a/WebCore/wml/WMLNoopElement.cpp
+++ b/WebCore/wml/WMLNoopElement.cpp
@@ -36,6 +36,11 @@ WMLNoopElement::WMLNoopElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLNoopElement> WMLNoopElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLNoopElement(tagName, document));
+}
+
WMLNoopElement::~WMLNoopElement()
{
}
diff --git a/WebCore/wml/WMLNoopElement.h b/WebCore/wml/WMLNoopElement.h
index 63b316e..be0413c 100644
--- a/WebCore/wml/WMLNoopElement.h
+++ b/WebCore/wml/WMLNoopElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLNoopElement : public WMLElement {
public:
+ static PassRefPtr<WMLNoopElement> create(const QualifiedName&, Document*);
+
WMLNoopElement(const QualifiedName& tagName, Document*);
virtual ~WMLNoopElement();
diff --git a/WebCore/wml/WMLOnEventElement.cpp b/WebCore/wml/WMLOnEventElement.cpp
index 34518c3..ad6684b 100644
--- a/WebCore/wml/WMLOnEventElement.cpp
+++ b/WebCore/wml/WMLOnEventElement.cpp
@@ -41,6 +41,11 @@ WMLOnEventElement::WMLOnEventElement(const QualifiedName& tagName, Document* doc
{
}
+PassRefPtr<WMLOnEventElement> WMLOnEventElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLOnEventElement(tagName, document));
+}
+
void WMLOnEventElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == HTMLNames::typeAttr) {
diff --git a/WebCore/wml/WMLOnEventElement.h b/WebCore/wml/WMLOnEventElement.h
index 4bc4bca..8bbaa1d 100644
--- a/WebCore/wml/WMLOnEventElement.h
+++ b/WebCore/wml/WMLOnEventElement.h
@@ -31,6 +31,8 @@ class WMLTaskElement;
class WMLOnEventElement : public WMLElement {
public:
+ static PassRefPtr<WMLOnEventElement> create(const QualifiedName&, Document*);
+
WMLOnEventElement(const QualifiedName& tagName, Document*);
virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/wml/WMLOptGroupElement.cpp b/WebCore/wml/WMLOptGroupElement.cpp
index fde3474..7c59a7e 100644
--- a/WebCore/wml/WMLOptGroupElement.cpp
+++ b/WebCore/wml/WMLOptGroupElement.cpp
@@ -40,6 +40,11 @@ WMLOptGroupElement::WMLOptGroupElement(const QualifiedName& tagName, Document* d
{
}
+PassRefPtr<WMLOptGroupElement> WMLOptGroupElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLOptGroupElement(tagName, document));
+}
+
WMLOptGroupElement::~WMLOptGroupElement()
{
}
diff --git a/WebCore/wml/WMLOptGroupElement.h b/WebCore/wml/WMLOptGroupElement.h
index 682c68c..3cfa47d 100644
--- a/WebCore/wml/WMLOptGroupElement.h
+++ b/WebCore/wml/WMLOptGroupElement.h
@@ -29,6 +29,8 @@ namespace WebCore {
class WMLOptGroupElement : public WMLFormControlElement, public OptionGroupElement {
public:
+ static PassRefPtr<WMLOptGroupElement> create(const QualifiedName&, Document*);
+
WMLOptGroupElement(const QualifiedName& tagName, Document*);
virtual ~WMLOptGroupElement();
diff --git a/WebCore/wml/WMLOptionElement.cpp b/WebCore/wml/WMLOptionElement.cpp
index ca4ea91..bc97215 100644
--- a/WebCore/wml/WMLOptionElement.cpp
+++ b/WebCore/wml/WMLOptionElement.cpp
@@ -39,6 +39,11 @@ WMLOptionElement::WMLOptionElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLOptionElement> WMLOptionElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLOptionElement(tagName, document));
+}
+
WMLOptionElement::~WMLOptionElement()
{
}
diff --git a/WebCore/wml/WMLOptionElement.h b/WebCore/wml/WMLOptionElement.h
index 3831f7d..41a4638 100644
--- a/WebCore/wml/WMLOptionElement.h
+++ b/WebCore/wml/WMLOptionElement.h
@@ -30,6 +30,8 @@ namespace WebCore {
class WMLOptionElement : public WMLFormControlElement, public WMLEventHandlingElement, public OptionElement {
public:
+ static PassRefPtr<WMLOptionElement> create(const QualifiedName&, Document*);
+
WMLOptionElement(const QualifiedName& tagName, Document*);
virtual ~WMLOptionElement();
diff --git a/WebCore/wml/WMLPElement.cpp b/WebCore/wml/WMLPElement.cpp
index ca76022..629b49f 100644
--- a/WebCore/wml/WMLPElement.cpp
+++ b/WebCore/wml/WMLPElement.cpp
@@ -43,6 +43,11 @@ WMLPElement::WMLPElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLPElement> WMLPElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLPElement(tagName, document));
+}
+
bool WMLPElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
{
if (attrName == HTMLNames::alignAttr) {
diff --git a/WebCore/wml/WMLPElement.h b/WebCore/wml/WMLPElement.h
index 48f98f8..32a35b1 100644
--- a/WebCore/wml/WMLPElement.h
+++ b/WebCore/wml/WMLPElement.h
@@ -31,6 +31,8 @@ namespace WebCore {
class WMLPElement : public WMLElement {
public:
+ static PassRefPtr<WMLPElement> create(const QualifiedName&, Document*);
+
WMLPElement(const QualifiedName& tagName, Document*);
virtual bool mapToEntry(const QualifiedName&, MappedAttributeEntry&) const;
diff --git a/WebCore/wml/WMLPostfieldElement.cpp b/WebCore/wml/WMLPostfieldElement.cpp
index 5cf26c7..b168dbb 100644
--- a/WebCore/wml/WMLPostfieldElement.cpp
+++ b/WebCore/wml/WMLPostfieldElement.cpp
@@ -39,6 +39,11 @@ WMLPostfieldElement::WMLPostfieldElement(const QualifiedName& tagName, Document*
{
}
+PassRefPtr<WMLPostfieldElement> WMLPostfieldElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLPostfieldElement(tagName, document));
+}
+
void WMLPostfieldElement::insertedIntoDocument()
{
WMLElement::insertedIntoDocument();
diff --git a/WebCore/wml/WMLPostfieldElement.h b/WebCore/wml/WMLPostfieldElement.h
index dd10b47..8d91073 100644
--- a/WebCore/wml/WMLPostfieldElement.h
+++ b/WebCore/wml/WMLPostfieldElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLPostfieldElement : public WMLElement {
public:
+ static PassRefPtr<WMLPostfieldElement> create(const QualifiedName&, Document*);
+
WMLPostfieldElement(const QualifiedName& tagName, Document*);
virtual void insertedIntoDocument();
diff --git a/WebCore/wml/WMLPrevElement.cpp b/WebCore/wml/WMLPrevElement.cpp
index 3d487ea..b90e22b 100644
--- a/WebCore/wml/WMLPrevElement.cpp
+++ b/WebCore/wml/WMLPrevElement.cpp
@@ -36,6 +36,11 @@ WMLPrevElement::WMLPrevElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLPrevElement> WMLPrevElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLPrevElement(tagName, document));
+}
+
WMLPrevElement::~WMLPrevElement()
{
}
diff --git a/WebCore/wml/WMLPrevElement.h b/WebCore/wml/WMLPrevElement.h
index ce8596e..2db8166 100644
--- a/WebCore/wml/WMLPrevElement.h
+++ b/WebCore/wml/WMLPrevElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLPrevElement : public WMLTaskElement {
public:
+ static PassRefPtr<WMLPrevElement> create(const QualifiedName&, Document*);
+
WMLPrevElement(const QualifiedName& tagName, Document*);
virtual ~WMLPrevElement();
diff --git a/WebCore/wml/WMLRefreshElement.cpp b/WebCore/wml/WMLRefreshElement.cpp
index bcf87ac..8267e20 100644
--- a/WebCore/wml/WMLRefreshElement.cpp
+++ b/WebCore/wml/WMLRefreshElement.cpp
@@ -37,6 +37,11 @@ WMLRefreshElement::WMLRefreshElement(const QualifiedName& tagName, Document* doc
{
}
+PassRefPtr<WMLRefreshElement> WMLRefreshElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLRefreshElement(tagName, document));
+}
+
WMLRefreshElement::~WMLRefreshElement()
{
}
diff --git a/WebCore/wml/WMLRefreshElement.h b/WebCore/wml/WMLRefreshElement.h
index 43b71b5..1459a05 100644
--- a/WebCore/wml/WMLRefreshElement.h
+++ b/WebCore/wml/WMLRefreshElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLRefreshElement : public WMLTaskElement {
public:
+ static PassRefPtr<WMLRefreshElement> create(const QualifiedName&, Document*);
+
WMLRefreshElement(const QualifiedName& tagName, Document*);
virtual ~WMLRefreshElement();
diff --git a/WebCore/wml/WMLSelectElement.cpp b/WebCore/wml/WMLSelectElement.cpp
index 3991b52..81c3a77 100644
--- a/WebCore/wml/WMLSelectElement.cpp
+++ b/WebCore/wml/WMLSelectElement.cpp
@@ -44,6 +44,11 @@ WMLSelectElement::WMLSelectElement(const QualifiedName& tagName, Document* docum
{
}
+PassRefPtr<WMLSelectElement> WMLSelectElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLSelectElement(tagName, document));
+}
+
WMLSelectElement::~WMLSelectElement()
{
}
diff --git a/WebCore/wml/WMLSelectElement.h b/WebCore/wml/WMLSelectElement.h
index 09a96f9..00b4649 100644
--- a/WebCore/wml/WMLSelectElement.h
+++ b/WebCore/wml/WMLSelectElement.h
@@ -29,6 +29,8 @@ namespace WebCore {
class WMLSelectElement : public WMLFormControlElement, public SelectElement {
public:
+ static PassRefPtr<WMLSelectElement> create(const QualifiedName&, Document*);
+
WMLSelectElement(const QualifiedName&, Document*);
virtual ~WMLSelectElement();
diff --git a/WebCore/wml/WMLSetvarElement.cpp b/WebCore/wml/WMLSetvarElement.cpp
index 1407b3f..a0fc3e8 100644
--- a/WebCore/wml/WMLSetvarElement.cpp
+++ b/WebCore/wml/WMLSetvarElement.cpp
@@ -36,6 +36,11 @@ WMLSetvarElement::WMLSetvarElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLSetvarElement> WMLSetvarElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLSetvarElement(tagName, document));
+}
+
WMLSetvarElement::~WMLSetvarElement()
{
}
diff --git a/WebCore/wml/WMLSetvarElement.h b/WebCore/wml/WMLSetvarElement.h
index 410db70..0951360 100644
--- a/WebCore/wml/WMLSetvarElement.h
+++ b/WebCore/wml/WMLSetvarElement.h
@@ -28,6 +28,8 @@ namespace WebCore {
class WMLSetvarElement : public WMLElement {
public:
+ static PassRefPtr<WMLSetvarElement> create(const QualifiedName&, Document*);
+
WMLSetvarElement(const QualifiedName& tagName, Document*);
virtual ~WMLSetvarElement();
diff --git a/WebCore/wml/WMLTableElement.cpp b/WebCore/wml/WMLTableElement.cpp
index 4d5e785..eb22503 100644
--- a/WebCore/wml/WMLTableElement.cpp
+++ b/WebCore/wml/WMLTableElement.cpp
@@ -45,6 +45,11 @@ WMLTableElement::WMLTableElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLTableElement> WMLTableElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLTableElement(tagName, document));
+}
+
WMLTableElement::~WMLTableElement()
{
}
diff --git a/WebCore/wml/WMLTableElement.h b/WebCore/wml/WMLTableElement.h
index 22a9676..9f0a592 100644
--- a/WebCore/wml/WMLTableElement.h
+++ b/WebCore/wml/WMLTableElement.h
@@ -30,6 +30,8 @@ class HTMLCollection;
class WMLTableElement : public WMLElement {
public:
+ static PassRefPtr<WMLTableElement> create(const QualifiedName&, Document*);
+
WMLTableElement(const QualifiedName& tagName, Document*);
virtual ~WMLTableElement();
diff --git a/WebCore/wml/WMLTagNames.in b/WebCore/wml/WMLTagNames.in
index 1c24f42..fd7c762 100644
--- a/WebCore/wml/WMLTagNames.in
+++ b/WebCore/wml/WMLTagNames.in
@@ -2,34 +2,34 @@ namespace="WML"
namespaceURI="http://www.wapforum.org/DTD/wml_1.1.xml"
guardFactoryWith="ENABLE(WML)"
-a createWithNew
-access createWithNew
-anchor createWithNew
-br interfaceName=WMLBRElement, createWithNew
-card createWithNew
-do createWithNew
-fieldset interfaceName=WMLFieldSetElement, createWithNew
-go createWithNew
+a
+access
+anchor
+br interfaceName=WMLBRElement
+card
+do
+fieldset interfaceName=WMLFieldSetElement
+go
head interfaceName=WMLElement
-img interfaceName=WMLImageElement, createWithNew
-input createWithNew
+img interfaceName=WMLImageElement
+input
#if 0
# Note: 'insertedLegend' is not an official WML element - internal purpose only!
#endif
-insertedLegend interfaceName=WMLInsertedLegendElement, createWithNew
-meta createWithNew
-noop createWithNew
-onevent interfaceName=WMLOnEventElement, createWithNew
-optgroup interfaceName=WMLOptGroupElement, createWithNew
-option createWithNew
-p createWithNew
-postfield createWithNew
-prev createWithNew
-refresh createWithNew
-select createWithNew
-setvar createWithNew
-table createWithNew
+insertedLegend interfaceName=WMLInsertedLegendElement
+meta
+noop
+onevent interfaceName=WMLOnEventElement
+optgroup interfaceName=WMLOptGroupElement
+option
+p
+postfield
+prev
+refresh
+select
+setvar
+table
td interfaceName=WMLElement
-template createWithNew
-timer createWithNew
+template
+timer
tr interfaceName=WMLElement
diff --git a/WebCore/wml/WMLTaskElement.cpp b/WebCore/wml/WMLTaskElement.cpp
index d49a03e..4ef3496 100644
--- a/WebCore/wml/WMLTaskElement.cpp
+++ b/WebCore/wml/WMLTaskElement.cpp
@@ -39,6 +39,11 @@ WMLTaskElement::WMLTaskElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLTaskElement> WMLTaskElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLTaskElement(tagName, document));
+}
+
WMLTaskElement::~WMLTaskElement()
{
}
diff --git a/WebCore/wml/WMLTaskElement.h b/WebCore/wml/WMLTaskElement.h
index b813285..b7c5376 100644
--- a/WebCore/wml/WMLTaskElement.h
+++ b/WebCore/wml/WMLTaskElement.h
@@ -33,6 +33,8 @@ class WMLSetvarElement;
class WMLTaskElement : public WMLElement {
public:
+ static PassRefPtr<WMLTaskElement> create(const QualifiedName& tagName, Document*);
+
WMLTaskElement(const QualifiedName& tagName, Document*);
virtual ~WMLTaskElement();
diff --git a/WebCore/wml/WMLTemplateElement.cpp b/WebCore/wml/WMLTemplateElement.cpp
index 27c828c..584a762 100644
--- a/WebCore/wml/WMLTemplateElement.cpp
+++ b/WebCore/wml/WMLTemplateElement.cpp
@@ -43,6 +43,11 @@ WMLTemplateElement::~WMLTemplateElement()
{
}
+PassRefPtr<WMLTemplateElement> WMLTemplateElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLTemplateElement(tagName, document));
+}
+
void WMLTemplateElement::parseMappedAttribute(Attribute* attr)
{
WMLIntrinsicEventType eventType = WMLIntrinsicEventUnknown;
diff --git a/WebCore/wml/WMLTemplateElement.h b/WebCore/wml/WMLTemplateElement.h
index e11d089..c168753 100644
--- a/WebCore/wml/WMLTemplateElement.h
+++ b/WebCore/wml/WMLTemplateElement.h
@@ -29,6 +29,8 @@ namespace WebCore {
class WMLTemplateElement : public WMLElement, public WMLEventHandlingElement {
public:
+ static PassRefPtr<WMLTemplateElement> create(const QualifiedName&, Document*);
+
WMLTemplateElement(const QualifiedName&, Document*);
virtual ~WMLTemplateElement();
diff --git a/WebCore/wml/WMLTimerElement.cpp b/WebCore/wml/WMLTimerElement.cpp
index 48eed34..feac38b 100644
--- a/WebCore/wml/WMLTimerElement.cpp
+++ b/WebCore/wml/WMLTimerElement.cpp
@@ -42,6 +42,11 @@ WMLTimerElement::WMLTimerElement(const QualifiedName& tagName, Document* doc)
{
}
+PassRefPtr<WMLTimerElement> WMLTimerElement::create(const QualifiedName& tagName, Document* document)
+{
+ return adoptRef(new WMLTimerElement(tagName, document));
+}
+
void WMLTimerElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == HTMLNames::nameAttr)
diff --git a/WebCore/wml/WMLTimerElement.h b/WebCore/wml/WMLTimerElement.h
index 09f3fbf..894c793 100644
--- a/WebCore/wml/WMLTimerElement.h
+++ b/WebCore/wml/WMLTimerElement.h
@@ -31,6 +31,8 @@ class WMLCardElement;
class WMLTimerElement : public WMLElement {
public:
+ static PassRefPtr<WMLTimerElement> create(const QualifiedName&, Document*);
+
WMLTimerElement(const QualifiedName& tagName, Document*);
virtual void parseMappedAttribute(Attribute*);
diff --git a/WebCore/workers/WorkerContext.cpp b/WebCore/workers/WorkerContext.cpp
index 36a9f94..b52b285 100644
--- a/WebCore/workers/WorkerContext.cpp
+++ b/WebCore/workers/WorkerContext.cpp
@@ -43,6 +43,7 @@
#include "Event.h"
#include "EventException.h"
#include "InspectorController.h"
+#include "KURL.h"
#include "MessagePort.h"
#include "NotImplemented.h"
#include "ScriptSourceCode.h"
@@ -322,6 +323,18 @@ EventTargetData* WorkerContext::ensureEventTargetData()
return &m_eventTargetData;
}
+#if ENABLE(BLOB)
+String WorkerContext::createBlobURL(Blob* blob)
+{
+ return scriptExecutionContext()->createPublicBlobURL(blob).string();
+}
+
+void WorkerContext::revokeBlobURL(const String& blobURLString)
+{
+ scriptExecutionContext()->revokePublicBlobURL(KURL(ParsedURLString, blobURLString));
+}
+#endif
+
} // namespace WebCore
#endif // ENABLE(WORKERS)
diff --git a/WebCore/workers/WorkerContext.h b/WebCore/workers/WorkerContext.h
index 9e9e54f..7fb8b46 100644
--- a/WebCore/workers/WorkerContext.h
+++ b/WebCore/workers/WorkerContext.h
@@ -43,6 +43,7 @@
namespace WebCore {
+ class Blob;
class Database;
class DatabaseCallback;
class DatabaseSync;
@@ -115,6 +116,10 @@ namespace WebCore {
virtual bool isContextThread() const;
virtual bool isJSExecutionTerminated() const;
+#if ENABLE(BLOB)
+ String createBlobURL(Blob*);
+ void revokeBlobURL(const String&);
+#endif
// These methods are used for GC marking. See JSWorkerContext::markChildren(MarkStack&) in
// JSWorkerContextCustom.cpp.
diff --git a/WebCore/workers/WorkerContext.idl b/WebCore/workers/WorkerContext.idl
index 27b4b14..02aa4ad 100644
--- a/WebCore/workers/WorkerContext.idl
+++ b/WebCore/workers/WorkerContext.idl
@@ -96,6 +96,14 @@ module threads {
attribute [JSCCustomGetter,EnabledAtRuntime] WebSocketConstructor WebSocket; // Usable with the new operator
#endif
#endif
+
+#if defined(ENABLE_BLOB) && ENABLE_BLOB
+ attribute BlobBuilderConstructor BlobBuilder;
+ attribute FileReaderConstructor FileReader;
+ attribute FileReaderSyncConstructor FileReaderSync;
+ DOMString createBlobURL(in Blob blob);
+ void revokeBlobURL(in DOMString blobURL);
+#endif
};
}
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 3e76407..9f93e1a 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -32,6 +32,7 @@
#include "EventException.h"
#include "EventListener.h"
#include "EventNames.h"
+#include "File.h"
#include "HTTPParsers.h"
#include "InspectorController.h"
#include "InspectorTimelineAgent.h"
@@ -48,6 +49,7 @@
#include <wtf/text/CString.h>
#include <wtf/StdLibExtras.h>
#include <wtf/RefCountedLeakCounter.h>
+#include <wtf/UnusedParam.h>
#if USE(JSC)
#include "JSDOMBinding.h"
@@ -129,26 +131,22 @@ static bool isSetCookieHeader(const AtomicString& name)
return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set-cookie2");
}
-static void setCharsetInMediaType(String& mediaType, const String& charsetValue)
+static void replaceCharsetInMediaType(String& mediaType, const String& charsetValue)
{
unsigned int pos = 0, len = 0;
findCharsetInMediaType(mediaType, pos, len);
if (!len) {
- // When no charset found, append new charset.
- mediaType.stripWhiteSpace();
- if (mediaType[mediaType.length() - 1] != ';')
- mediaType.append(";");
- mediaType.append(" charset=");
- mediaType.append(charsetValue);
- } else {
- // Found at least one existing charset, replace all occurrences with new charset.
- while (len) {
- mediaType.replace(pos, len, charsetValue);
- unsigned int start = pos + charsetValue.length();
- findCharsetInMediaType(mediaType, pos, len, start);
- }
+ // When no charset found, do nothing.
+ return;
+ }
+
+ // Found at least one existing charset, replace all occurrences with new charset.
+ while (len) {
+ mediaType.replace(pos, len, charsetValue);
+ unsigned int start = pos + charsetValue.length();
+ findCharsetInMediaType(mediaType, pos, len, start);
}
}
@@ -171,6 +169,9 @@ XMLHttpRequest::XMLHttpRequest(ScriptExecutionContext* context)
: ActiveDOMObject(context, this)
, m_async(true)
, m_includeCredentials(false)
+#if ENABLE(XHR_RESPONSE_BLOB)
+ , m_asBlob(false)
+#endif
, m_state(UNSENT)
, m_responseText("")
, m_createdDocument(false)
@@ -225,13 +226,28 @@ XMLHttpRequest::State XMLHttpRequest::readyState() const
return m_state;
}
-const ScriptString& XMLHttpRequest::responseText() const
+const ScriptString& XMLHttpRequest::responseText(ExceptionCode& ec) const
{
+#if ENABLE(XHR_RESPONSE_BLOB)
+ if (m_asBlob)
+ ec = INVALID_STATE_ERR;
+#else
+ UNUSED_PARAM(ec);
+#endif
return m_responseText;
}
-Document* XMLHttpRequest::responseXML() const
+Document* XMLHttpRequest::responseXML(ExceptionCode& ec) const
{
+#if ENABLE(XHR_RESPONSE_BLOB)
+ if (m_asBlob) {
+ ec = INVALID_STATE_ERR;
+ return 0;
+ }
+#else
+ UNUSED_PARAM(ec);
+#endif
+
if (m_state != DONE)
return 0;
@@ -256,6 +272,17 @@ Document* XMLHttpRequest::responseXML() const
return m_responseXML.get();
}
+#if ENABLE(XHR_RESPONSE_BLOB)
+Blob* XMLHttpRequest::responseBlob(ExceptionCode& ec) const
+{
+ if (!m_asBlob) {
+ ec = INVALID_STATE_ERR;
+ return 0;
+ }
+ return m_responseBlob.get();
+}
+#endif
+
XMLHttpRequestUpload* XMLHttpRequest::upload()
{
if (!m_upload)
@@ -318,6 +345,18 @@ void XMLHttpRequest::setWithCredentials(bool value, ExceptionCode& ec)
m_includeCredentials = value;
}
+#if ENABLE(XHR_RESPONSE_BLOB)
+void XMLHttpRequest::setAsBlob(bool value, ExceptionCode& ec)
+{
+ if (m_state != OPENED || m_loader) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+
+ m_asBlob = value;
+}
+#endif
+
void XMLHttpRequest::open(const String& method, const KURL& url, ExceptionCode& ec)
{
open(method, url, true, ec);
@@ -329,7 +368,9 @@ void XMLHttpRequest::open(const String& method, const KURL& url, bool async, Exc
State previousState = m_state;
m_state = UNSENT;
m_error = false;
-
+#if ENABLE(XHR_RESPONSE_BLOB)
+ m_asBlob = false;
+#endif
m_uploadComplete = false;
// clear stuff from possible previous load
@@ -457,7 +498,7 @@ void XMLHttpRequest::send(const String& body, ExceptionCode& ec)
#endif
setRequestHeaderInternal("Content-Type", "application/xml");
} else {
- setCharsetInMediaType(contentType, "UTF-8");
+ replaceCharsetInMediaType(contentType, "UTF-8");
m_requestHeaders.set("Content-Type", contentType);
}
@@ -478,7 +519,12 @@ void XMLHttpRequest::send(Blob* body, ExceptionCode& ec)
// FIXME: Should we set a Content-Type if one is not set.
// FIXME: add support for uploading bundles.
m_requestEntityBody = FormData::create();
- m_requestEntityBody->appendItems(body->items());
+ if (body->isFile())
+ m_requestEntityBody->appendFile(static_cast<File*>(body)->path());
+#if ENABLE(BLOB)
+ else
+ m_requestEntityBody->appendBlob(body->url());
+#endif
}
createRequest(ec);
@@ -490,7 +536,7 @@ void XMLHttpRequest::send(DOMFormData* body, ExceptionCode& ec)
return;
if (m_method != "GET" && m_method != "HEAD" && m_url.protocolInHTTPFamily()) {
- m_requestEntityBody = FormData::createMultiPart(body->items(), body->encoding(), document());
+ m_requestEntityBody = FormData::createMultiPart(*(static_cast<FormDataList*>(body)), body->encoding(), document());
// We need to ask the client to provide the generated file names if needed. When FormData fills the element
// for the file, it could set a flag to use the generated file name, i.e. a package file on Mac.
@@ -509,6 +555,14 @@ void XMLHttpRequest::send(DOMFormData* body, ExceptionCode& ec)
void XMLHttpRequest::createRequest(ExceptionCode& ec)
{
+#if ENABLE(BLOB)
+ // Only GET request is supported for blob URL.
+ if (m_url.protocolIs("blob") && m_method != "GET") {
+ ec = XMLHttpRequestException::NETWORK_ERR;
+ return;
+ }
+#endif
+
// The presence of upload event listeners forces us to use preflighting because POSTing to an URL that does not
// permit cross origin requests should look exactly like POSTing to an URL that does not respond at all.
// Also, only async requests support upload progress events.
@@ -594,6 +648,9 @@ void XMLHttpRequest::abort()
m_responseText = "";
m_createdDocument = false;
m_responseXML = 0;
+#if ENABLE(XHR_RESPONSE_BLOB)
+ m_responseBlob = 0;
+#endif
// Clear headers as required by the spec
m_requestHeaders.clear();
@@ -640,6 +697,9 @@ void XMLHttpRequest::clearResponse()
m_responseText = "";
m_createdDocument = false;
m_responseXML = 0;
+#if ENABLE(XHR_RESPONSE_BLOB)
+ m_responseBlob = 0;
+#endif
}
void XMLHttpRequest::clearRequest()
@@ -902,6 +962,10 @@ void XMLHttpRequest::didFinishLoading(unsigned long identifier)
if (m_decoder)
m_responseText += m_decoder->flush();
+#if ENABLE(XHR_RESPONSE_BLOB)
+ // FIXME: Set m_responseBlob to something here in the m_asBlob case.
+#endif
+
#if ENABLE(INSPECTOR)
if (InspectorController* inspector = scriptExecutionContext()->inspectorController())
inspector->resourceRetrievedByXMLHttpRequest(identifier, m_responseText, m_url, m_lastSendURL, m_lastSendLineNumber);
diff --git a/WebCore/xml/XMLHttpRequest.h b/WebCore/xml/XMLHttpRequest.h
index 2947b46..d25f63f 100644
--- a/WebCore/xml/XMLHttpRequest.h
+++ b/WebCore/xml/XMLHttpRequest.h
@@ -70,6 +70,10 @@ public:
State readyState() const;
bool withCredentials() const { return m_includeCredentials; }
void setWithCredentials(bool, ExceptionCode&);
+#if ENABLE(XHR_RESPONSE_BLOB)
+ bool asBlob() const { return m_asBlob; }
+ void setAsBlob(bool, ExceptionCode&);
+#endif
void open(const String& method, const KURL&, ExceptionCode&);
void open(const String& method, const KURL&, bool async, ExceptionCode&);
void open(const String& method, const KURL&, bool async, const String& user, ExceptionCode&);
@@ -84,8 +88,11 @@ public:
void overrideMimeType(const String& override);
String getAllResponseHeaders(ExceptionCode&) const;
String getResponseHeader(const AtomicString& name, ExceptionCode&) const;
- const ScriptString& responseText() const;
- Document* responseXML() const;
+ const ScriptString& responseText(ExceptionCode&) const;
+ Document* responseXML(ExceptionCode&) const;
+#if ENABLE(XHR_RESPONSE_BLOB)
+ Blob* responseBlob(ExceptionCode&) const;
+#endif
void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lineNumber; }
void setLastSendURL(const String& url) { m_lastSendURL = url; }
@@ -155,6 +162,10 @@ private:
String m_mimeTypeOverride;
bool m_async;
bool m_includeCredentials;
+#if ENABLE(XHR_RESPONSE_BLOB)
+ bool m_asBlob;
+ RefPtr<Blob> m_responseBlob;
+#endif
RefPtr<ThreadableLoader> m_loader;
State m_state;
diff --git a/WebCore/xml/XMLHttpRequest.idl b/WebCore/xml/XMLHttpRequest.idl
index 58413ff..59997f8 100644
--- a/WebCore/xml/XMLHttpRequest.idl
+++ b/WebCore/xml/XMLHttpRequest.idl
@@ -57,6 +57,11 @@ module xml {
readonly attribute unsigned short readyState;
// request
+#if defined(ENABLE_XHR_RESPONSE_BLOB) && ENABLE_XHR_RESPONSE_BLOB
+ attribute [EnabledAtRuntime] boolean asBlob
+ setter raises(DOMException);
+#endif
+
attribute boolean withCredentials
setter raises(DOMException);
// void open(in DOMString method, in DOMString url);
@@ -82,8 +87,14 @@ module xml {
raises(DOMException);
[RequiresAllArguments=Raise, ConvertNullStringTo=Null] DOMString getResponseHeader(in DOMString header)
raises(DOMException);
- readonly attribute [CustomGetter] DOMString responseText; // The custom getter implements ConvertNullStringTo=Null
- readonly attribute Document responseXML;
+ readonly attribute [CustomGetter] DOMString responseText // The custom getter implements ConvertNullStringTo=Null
+ getter raises(DOMException);
+ readonly attribute Document responseXML
+ getter raises(DOMException);
+#if defined(ENABLE_XHR_RESPONSE_BLOB) && ENABLE_XHR_RESPONSE_BLOB
+ readonly attribute [EnabledAtRuntime] Blob responseBlob
+ getter raises(DOMException);
+#endif
readonly attribute unsigned short status
getter raises(DOMException);
readonly attribute DOMString statusText
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9747ffa..898fc8d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add 'application/x-snkp' to StringsNotToBeLocalized.txt.
+
+ * StringsNotToBeLocalized.txt:
+
2010-08-20 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed build fix.
diff --git a/WebKit/StringsNotToBeLocalized.txt b/WebKit/StringsNotToBeLocalized.txt
index d23cafa..bf1e575 100644
--- a/WebKit/StringsNotToBeLocalized.txt
+++ b/WebKit/StringsNotToBeLocalized.txt
@@ -540,6 +540,7 @@
"application/rss+xml"
"application/x-apple-msg-attachment"
"application/x-java-applet"
+"application/x-snkp"
"application/x-webarchive"
"application/xhtml+xml"
"attributeKeys"
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 6b0b3fa..527e8ef 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,407 @@
+2010-09-02 Ilya Sherman <isherman@google.com>
+
+ Reviewed by Eric Seidel.
+
+ Exposing computing an element's inherited language, per the DOM, in the
+ Chromium API -- primarily for use with autofill i18n.
+ https://bugs.webkit.org/show_bug.cgi?id=44803
+
+ * public/WebElement.h:
+ * src/WebElement.cpp:
+ (WebKit::WebElement::computeInheritedLanguage):
+
+2010-09-01 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Remove dependency on JS files for V8 logs processing.
+
+ https://bugs.webkit.org/show_bug.cgi?id=45045
+
+ * WebKit.gyp:
+
+2010-09-01 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, rolling out r66576.
+ http://trac.webkit.org/changeset/66576
+ https://bugs.webkit.org/show_bug.cgi?id=45016
+
+ This change is not needed.
+
+ * public/WebKitClient.h:
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::layout):
+
+2010-08-31 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Add WebKitClient::callOnMainThreadWithDelay()
+ https://bugs.webkit.org/show_bug.cgi?id=45016
+
+ It is required to remove base/task.h and base/timer.h dependency
+ from DRT/Chromium.
+
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::callOnMainThreadWithDelay): Added.
+
+2010-08-31 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ Add LocalFileSystem.requestFileSystem interface to DOMWindow
+ https://bugs.webkit.org/show_bug.cgi?id=44734
+
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableFileSystem):
+ (WebKit::WebRuntimeFeatures::isFileSystemEnabled):
+
+2010-08-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Implement the rest of IDBCursors + make them persistent
+ https://bugs.webkit.org/show_bug.cgi?id=44546
+
+ * src/IDBCursorBackendProxy.cpp:
+ (WebCore::IDBCursorBackendProxy::value):
+ * src/IDBCursorBackendProxy.h:
+ * src/WebIDBCursorImpl.cpp:
+ (WebKit::WebIDBCursorImpl::value):
+
+2010-08-27 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Notifications should support a click event
+ https://bugs.webkit.org/show_bug.cgi?id=44800
+
+ * public/WebNotification.h:
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::dispatchClickEvent):
+
+2010-08-31 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Switch the Blob implementation to using the blob data registration model
+ https://bugs.webkit.org/show_bug.cgi?id=44389
+
+ * src/WebSearchableFormData.cpp:
+ (WebCore::HasSuitableTextElement):
+
+2010-08-30 Nat Duca <nduca@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [chromium] Accelerated Compositing: Artifacts/blink when enabling compositor.
+ https://bugs.webkit.org/show_bug.cgi?id=44196
+
+ If accelerated compositing enables after a page loads, the dirtied
+ portion of the screen will be only a subset of the full screen,
+ leading to artefacts. Avoid these artefacts by invalidating the
+ visible content rect on compositor initialization.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2010-08-30 Kinuko Yasuda <kinuko@chromium.osrc>
+
+ Reviewed by Darin Fisher.
+
+ Add DOMFileSystem implementation to support Entry manipulation operations
+ https://bugs.webkit.org/show_bug.cgi?id=44732
+
+ Fixed virtual-path / platform-path conversion timing. (The conversion needs to be done before calling AsyncFileSystem methods to support cross-filesystem operations.)
+
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystemChromium::move):
+ (WebCore::AsyncFileSystemChromium::copy):
+ (WebCore::AsyncFileSystemChromium::remove):
+ (WebCore::AsyncFileSystemChromium::readMetadata):
+ (WebCore::AsyncFileSystemChromium::createFile):
+ (WebCore::AsyncFileSystemChromium::createDirectory):
+ (WebCore::AsyncFileSystemChromium::fileExists):
+ (WebCore::AsyncFileSystemChromium::directoryExists):
+ (WebCore::AsyncFileSystemChromium::readDirectory):
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * src/InspectorFrontendClientImpl.cpp:
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Introduce isValidValue(const String&) of HTMLInputElement and HTMLTextAreaElement
+ https://bugs.webkit.org/show_bug.cgi?id=43537
+
+ * public/WebInputElement.h:
+ * src/WebInputElement.cpp:
+ (WebKit::WebInputElement::isValidValue):
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Remove dependency to base/keyboard_codes.h
+ https://bugs.webkit.org/show_bug.cgi?id=44847
+
+ * DEPS: Roll Chromium revision to 57823 to have a webkit_support change.
+
+2010-08-28 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add webkit_support.gyp:blob to WebKit.gyp
+ https://bugs.webkit.org/show_bug.cgi?id=44829
+
+ Also bump up chromium revision in DEPS in order to pick up
+ the revision that contains blob change.
+
+ * DEPS:
+ * WebKit.gyp:
+
+2010-08-28 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Add AX notification for childrenChanged
+ https://bugs.webkit.org/show_bug.cgi?id=44472
+
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::didChangeAccessibilityObjectChildren):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren):
+ * src/ChromeClientImpl.h:
+
+2010-08-27 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Add new WebClipboard method for setting generic data in copy/cut handlers.
+ https://bugs.webkit.org/show_bug.cgi?id=42121
+
+ * public/WebClipboard.h:
+ (WebKit::WebClipboard::writeData):
+ (WebKit::WebClipboard::readFilenames):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::clipboardWriteData):
+
+2010-08-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ [chromium] Add chromium-side of AsyncFileSystem implementation
+ https://bugs.webkit.org/show_bug.cgi?id=44434
+
+ * WebKit.gyp:
+ * src/AssertMatchingEnums.cpp: Added assertions.
+ * src/AsyncFileSystemChromium.cpp: Added.
+ * src/AsyncFileSystemChromium.h: Added.
+ * src/LocalFileSystemChromium.cpp: Added.
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl):
+ * src/WebFileSystemCallbacksImpl.h:
+
+2010-08-27 Michael Nordman <michaeln@google.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44133
+ WebKitAPI to allow runtime enablement of XmlHttpRequest.responseBlob.
+
+ * features.gypi: Define ENABLE_XHR_RESPONSE_BLOB.
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableXHRResponseBlob):
+ (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled):
+
+2010-08-25 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Add setVersion to IndexedDB
+ https://bugs.webkit.org/show_bug.cgi?id=44630
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ (WebKit::WebIDBDatabase::setVersion):
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::setVersion):
+ * src/IDBDatabaseProxy.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::setVersion):
+ * src/WebIDBDatabaseImpl.h:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::disconnectFromBackend):
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [DRT/Chromium] Fix inspector test failures
+ https://bugs.webkit.org/show_bug.cgi?id=44748
+
+ * DEPS: Update Chromium revision to 57605 to have a webkit_support change.
+
+2010-08-26 Dumitru Daniliuc <dumi@chromium.org>
+
+ Unreviewed, Chromium build fix.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::markerTextForListItem):
+
+2010-08-26 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add support for markerTextForListItem() to Chromium's LayoutTestController.
+ https://bugs.webkit.org/show_bug.cgi?id=44724
+
+ * public/WebBindings.h:
+ * public/WebFrame.h:
+ * src/WebBindings.cpp:
+ (WebKit::getElementImpl):
+ (WebKit::WebBindings::getElement):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::markerTextForListItem):
+ * src/WebFrameImpl.h:
+
+2010-08-26 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+ https://bugs.webkit.org/show_bug.cgi?id=43761
+
+ Removes API support to grab a GLES2Context from within WebCore. The compositor
+ has a special codepath to grab its GLES2Context and no other codepaths
+ need access to a raw context. Accelerated drawing elsewhere will go through
+ GraphicsContext3D.
+
+ * src/ChromeClientImpl.cpp:
+ * src/ChromeClientImpl.h:
+
+2010-08-26 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] WebEntities is broken
+ https://bugs.webkit.org/show_bug.cgi?id=44708
+
+ For serialization purposes, we don't need to convert all entity references.
+ This patch modifies WebEntities::WebEntities to use hard-coded entity lists for both HTML and XML,
+ and deletes populateMapFromXMLEntities and populateMapFromHTMLEntityTable.
+
+ No tests are added since the code is tested in DomSerializerTests
+
+ * src/WebEntities.cpp:
+ (WebKit::):
+ (WebKit::WebEntities::WebEntities):
+
+2010-08-26 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Misc. cleanup split off from bug 32356.
+ https://bugs.webkit.org/show_bug.cgi?id=44696
+
+ * src/WebScrollbarImpl.cpp:
+ (WebKit::WebScrollbarImpl::setLocation):
+ (WebKit::WebScrollbarImpl::onMouseWheel):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::propagateScroll):
+ * src/win/WebInputEventFactory.cpp:
+ (WebKit::WebInputEventFactory::mouseWheelEvent):
+
+2010-08-26 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Store heap snapshots in InspectorProfilerAgent.
+
+ Change the way heap snapshots are transported to Inspector
+ to be aligned with CPU profiles. As a result, the Heap snapshots
+ view of Profiles panel was upstreamed into WebCore.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44531
+
+ * DEPS:
+ * WebKit.gypi:
+ * src/js/DevTools.js:
+ ():
+ * src/js/HeapProfilerPanel.js: Removed.
+ * src/js/ProfilerAgent.js: Removed.
+ * src/js/ProfilerProcessor.js: Removed.
+ * src/js/devTools.css:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * src/InspectorFrontendClientImpl.cpp:
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * src/InspectorFrontendClientImpl.cpp:
+ (WebKit::InspectorFrontendClientImpl::disconnectFromBackend):
+ * src/InspectorFrontendClientImpl.h:
+
+2010-08-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [DRT/Chromium] Enable DEVICE_ORIENTATION
+ https://bugs.webkit.org/show_bug.cgi?id=44587
+
+ * features.gypi:
+
+2010-08-25 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ WebInspector: as far as we have 'seq' property in the each inspector message
+ it would be better to remove explicit callId argument from Inspector.idl functions
+ declarations.
+ https://bugs.webkit.org/show_bug.cgi?id=44617
+
+ * src/js/ProfilerAgent.js:
+ (devtools.ProfilerAgent.prototype._getNextLogLines.else.delayedRequest):
+ (devtools.ProfilerAgent.prototype._getNextLogLines):
+
2010-08-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r66074.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index c189f59..6252f08 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': '57298',
+ 'chromium_rev': '57823',
}
deps = {
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 9443d8e..c75cac7 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -49,13 +49,6 @@
# 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)',
],
},{
@@ -64,13 +57,6 @@
'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)',
],
}],
@@ -292,6 +278,8 @@
'src/ApplicationCacheHost.cpp',
'src/ApplicationCacheHostInternal.h',
'src/AssertMatchingEnums.cpp',
+ 'src/AsyncFileSystemChromium.cpp',
+ 'src/AsyncFileSystemChromium.h',
'src/AutoFillPopupMenuClient.cpp',
'src/AutoFillPopupMenuClient.h',
'src/BackForwardListClientImpl.cpp',
@@ -363,6 +351,7 @@
'src/x11/WebScreenInfoFactory.cpp',
'src/mac/WebInputEventFactory.mm',
'src/mac/WebScreenInfoFactory.mm',
+ 'src/LocalFileSystemChromium.cpp',
'src/LocalizedStrings.cpp',
'src/MediaPlayerPrivateChromium.cpp',
'src/NotificationPresenterImpl.h',
@@ -736,6 +725,7 @@
'<(chromium_src_dir)/base/base.gyp:base_i18n',
'<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
@@ -805,6 +795,7 @@
'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:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib'
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index b45e3e7..4c6ac37 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -33,9 +33,6 @@
# 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_js_files': [
- 'src/js/ProfilerAgent.js',
- 'src/js/ProfilerProcessor.js',
- 'src/js/HeapProfilerPanel.js',
'src/js/DevTools.js',
'src/js/DevToolsHostStub.js',
'src/js/Tests.js',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 61e5806..df277d6 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -46,7 +46,7 @@
'ENABLE_DASHBOARD_SUPPORT=0',
'ENABLE_DATABASE=1',
'ENABLE_DATAGRID=0',
- 'ENABLE_DEVICE_ORIENTATION=0',
+ 'ENABLE_DEVICE_ORIENTATION=1',
'ENABLE_DIRECTORY_UPLOAD=1',
'ENABLE_DOM_STORAGE=1',
'ENABLE_EVENTSOURCE=1',
@@ -81,12 +81,13 @@
'ENABLE_WEB_SOCKETS=1',
'ENABLE_WEB_TIMING=1',
'ENABLE_WORKERS=1',
+ 'ENABLE_XHR_RESPONSE_BLOB=1',
'ENABLE_XPATH=1',
'ENABLE_XSLT=1',
],
'conditions': [
- ['OS=="win" or OS=="linux"', {
+ ['OS=="win" or OS=="linux" or OS=="mac"', {
'feature_defines': [
'WTF_USE_ACCELERATED_COMPOSITING=1',
'ENABLE_3D_RENDERING=1',
diff --git a/WebKit/chromium/public/WebBindings.h b/WebKit/chromium/public/WebBindings.h
index 0fa3bfd..bca4095 100644
--- a/WebKit/chromium/public/WebBindings.h
+++ b/WebKit/chromium/public/WebBindings.h
@@ -37,6 +37,7 @@
namespace WebKit {
class WebDragData;
+class WebElement;
class WebRange;
// A haphazard collection of functions for dealing with plugins.
@@ -139,6 +140,10 @@ public:
// If so, return that range as a WebRange object.
WEBKIT_API static bool getRange(NPObject* range, WebRange*);
+ // Return true (success) if the given npobj is an element.
+ // If so, return that element as a WebElement object.
+ WEBKIT_API static bool getElement(NPObject* element, WebElement*);
+
// Exceptions -------------------------------------------------------------
typedef void (ExceptionHandler)(void* data, const NPUTF8* message);
diff --git a/WebKit/chromium/public/WebClipboard.h b/WebKit/chromium/public/WebClipboard.h
index 6755d96..861c522 100644
--- a/WebKit/chromium/public/WebClipboard.h
+++ b/WebKit/chromium/public/WebClipboard.h
@@ -71,7 +71,10 @@ public:
const WebURL&, const WebString& title) { }
virtual void writeImage(
const WebImage&, const WebURL&, const WebString& title) { }
- virtual void writeData(const WebDragData&) { }
+ virtual void writeData(
+ const WebString& type,
+ const WebString& data,
+ const WebString& metadata) { }
// The following functions are used for reading platform data for copy and
// paste, drag and drop, and selection copy (on X).
@@ -81,7 +84,8 @@ public:
virtual bool readData(
Buffer, const WebString& type, WebString* data,
WebString* metadata) { return false; }
- virtual WebVector<WebString> readFilenames(Buffer) { return WebVector<WebString>(); }
+ virtual WebVector<WebString> readFilenames(
+ Buffer) { return WebVector<WebString>(); }
protected:
~WebClipboard() {}
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index 16a82d8..5b6fd6a 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -58,6 +58,12 @@ class WebNamedNodeMap;
WEBKIT_API WebNamedNodeMap attributes() const;
WEBKIT_API WebString innerText() const;
+ // Returns the language code specified for this element. This attribute
+ // is inherited, so the returned value is drawn from the closest parent
+ // element that has the lang attribute set, or from the HTTP
+ // "Content-Language" header as a fallback.
+ WEBKIT_API WebString computeInheritedLanguage() const;
+
#if WEBKIT_IMPLEMENTATION
WebElement(const WTF::PassRefPtr<WebCore::Element>&);
WebElement& operator=(const WTF::PassRefPtr<WebCore::Element>&);
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index c4fa7ae..d8eca6a 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -518,6 +518,8 @@ public:
// used to support layout tests.
virtual WebString counterValueForElementById(const WebString& id) const = 0;
+ // Calls markerTextForListItem() defined in WebCore/rendering/RenderTreeAsText.h.
+ virtual WebString markerTextForListItem(const WebElement&) const = 0;
// Returns the number of page where the specified element will be put.
// This method is used to support layout tests.
diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h
index 6e494ce..4e5cdcb 100644
--- a/WebKit/chromium/public/WebIDBDatabase.h
+++ b/WebKit/chromium/public/WebIDBDatabase.h
@@ -61,20 +61,15 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebDOMStringList();
}
- virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks*)
- {
- WEBKIT_ASSERT_NOT_REACHED();
- }
+ virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBObjectStore to the caller.
virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
- virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks)
- {
- WEBKIT_ASSERT_NOT_REACHED();
- }
+ virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBTransaction to the caller.
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
{
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index d8c8ce7..ef3b577 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -99,6 +99,7 @@ namespace WebKit {
WEBKIT_API void setSelectionRange(int, int);
WEBKIT_API int selectionStart();
WEBKIT_API int selectionEnd();
+ WEBKIT_API bool isValidValue(const WebString&) const;
#if WEBKIT_IMPLEMENTATION
WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&);
diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h
index 89dff7a..dbbde02 100644
--- a/WebKit/chromium/public/WebNotification.h
+++ b/WebKit/chromium/public/WebNotification.h
@@ -97,6 +97,9 @@ public:
// the byUser parameter will be true.
WEBKIT_API void dispatchCloseEvent(bool byUser);
+ // Called to indicate the notification was clicked on.
+ WEBKIT_API void dispatchClickEvent();
+
#if WEBKIT_IMPLEMENTATION
WebNotification(const WTF::PassRefPtr<WebCore::Notification>&);
WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&);
diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h
index 9aa1f4f..5537ee2 100644
--- a/WebKit/chromium/public/WebRuntimeFeatures.h
+++ b/WebKit/chromium/public/WebRuntimeFeatures.h
@@ -86,6 +86,12 @@ public:
WEBKIT_API static void enableSpeechInput(bool);
WEBKIT_API static bool isSpeechInputEnabled();
+ WEBKIT_API static void enableXHRResponseBlob(bool);
+ WEBKIT_API static bool isXHRResponseBlobEnabled();
+
+ WEBKIT_API static void enableFileSystem(bool);
+ WEBKIT_API static bool isFileSystemEnabled();
+
private:
WebRuntimeFeatures();
};
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index c64418b..5c9a79b 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -277,6 +277,9 @@ public:
// Notifies embedder that the state of an accessibility object has changed.
virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { }
+
+ // Notifies embedder that the children of an accessibility object has changed.
+ virtual void didChangeAccessibilityObjectChildren(const WebAccessibilityObject&) { }
// Developer tools -----------------------------------------------------
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index a117fc2..ac3aad3 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -35,6 +35,7 @@
#include "AccessibilityObject.h"
#include "ApplicationCacheHost.h"
+#include "AsyncFileSystem.h"
#include "EditorInsertAction.h"
#include "FontDescription.h"
#include "FontSmoothingMode.h"
@@ -54,6 +55,7 @@
#include "WebClipboard.h"
#include "WebCursorInfo.h"
#include "WebEditingAction.h"
+#include "WebFileSystem.h"
#include "WebFontDescription.h"
#include "WebIDBKey.h"
#include "WebInputElement.h"
@@ -380,3 +382,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInT
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
+
+#if ENABLE(FILE_SYSTEM)
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, AsyncFileSystem::Persistent);
+#endif
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
new file mode 100644
index 0000000..08fcea6
--- /dev/null
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
@@ -0,0 +1,104 @@
+/*
+ * 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 "AsyncFileSystemChromium.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystemCallbacks.h"
+#include "FileSystem.h"
+#include "WebFileSystem.h"
+#include "WebFileSystemCallbacksImpl.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath)
+ : AsyncFileSystem(rootPath)
+ , m_webFileSystem(WebKit::webKitClient()->fileSystem())
+{
+ ASSERT(m_webFileSystem);
+}
+
+AsyncFileSystemChromium::~AsyncFileSystemChromium()
+{
+}
+
+void AsyncFileSystemChromium::move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->move(srcPath, destPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->copy(srcPath, destPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->remove(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->readMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->createFile(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->createDirectory(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->fileExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->directoryExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+void AsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.h b/WebKit/chromium/src/AsyncFileSystemChromium.h
new file mode 100644
index 0000000..f46f78c
--- /dev/null
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.h
@@ -0,0 +1,70 @@
+/*
+ * 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 AsyncFileSystemChromium_h
+#define AsyncFileSystemChromium_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+class WebFileSystem;
+}
+
+namespace WebCore {
+
+class AsyncFileSystemCallbacks;
+
+class AsyncFileSystemChromium : public AsyncFileSystem {
+public:
+ AsyncFileSystemChromium(const String& rootPath);
+ virtual ~AsyncFileSystemChromium();
+
+ virtual void move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+
+private:
+ WebKit::WebFileSystem* m_webFileSystem;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // AsyncFileSystemChromium_h
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 405fbf6..e6f1400 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -712,6 +712,13 @@ void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* ob
m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj));
}
+void ChromeClientImpl::didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject* obj)
+{
+ // Alert assistive technology about the accessibility object children change
+ if (obj)
+ m_webView->client()->didChangeAccessibilityObjectChildren(WebAccessibilityObject(obj));
+}
+
#if ENABLE(NOTIFICATIONS)
NotificationPresenter* ChromeClientImpl::notificationPresenter() const
{
@@ -744,18 +751,6 @@ void ChromeClientImpl::scheduleCompositingLayerSync()
}
#endif
-#if USE(GLES2_RENDERING)
-PassOwnPtr<GLES2Context> ChromeClientImpl::getOnscreenGLES2Context()
-{
- return m_webView->getOnscreenGLES2Context();
-}
-
-PassOwnPtr<GLES2Context> ChromeClientImpl::getOffscreenGLES2Context()
-{
- return m_webView->getOffscreenGLES2Context();
-}
-#endif
-
bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
{
if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 8763def..bff9f90 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -152,11 +152,6 @@ public:
virtual void scheduleCompositingLayerSync();
#endif
-#if USE(GLES2_RENDERING)
- 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*);
@@ -167,6 +162,7 @@ public:
bool handleExternally);
virtual void popupClosed(WebCore::PopupContainer* popupContainer);
virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);
+ virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*);
// ChromeClientImpl:
void setCursor(const WebCursorInfo& cursor);
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 33f405d..911dcf3 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -200,11 +200,11 @@ void ChromiumBridge::clipboardWriteImage(NativeImagePtr image,
webKitClient()->clipboard()->writeImage(webImage, sourceURL, title);
}
-void ChromiumBridge::clipboardWriteData(ClipboardData* data)
+void ChromiumBridge::clipboardWriteData(const String& type,
+ const String& data,
+ const String& metadata)
{
- notImplemented();
- WebDragData dragData; // FIXME: Define the conversion from ClipboardData to WebDragData.
- webKitClient()->clipboard()->writeData(dragData);
+ webKitClient()->clipboard()->writeData(type, data, metadata);
}
HashSet<String> ChromiumBridge::clipboardReadAvailableTypes(
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
index fff00b7..b4711eb 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
@@ -60,10 +60,9 @@ PassRefPtr<IDBKey> IDBCursorBackendProxy::key() const
return m_idbCursor->key();
}
-PassRefPtr<IDBAny> IDBCursorBackendProxy::value() const
+PassRefPtr<SerializedScriptValue> IDBCursorBackendProxy::value() const
{
- RefPtr<SerializedScriptValue> value = PassRefPtr<SerializedScriptValue>(m_idbCursor->value());
- return IDBAny::create(value.get());
+ return m_idbCursor->value();
}
void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBCallbacks> callbacks)
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.h b/WebKit/chromium/src/IDBCursorBackendProxy.h
index d8b621a..8af27cf 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.h
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.h
@@ -44,7 +44,7 @@ public:
virtual unsigned short direction() const;
virtual PassRefPtr<IDBKey> key() const;
- virtual PassRefPtr<IDBAny> value() const;
+ virtual PassRefPtr<SerializedScriptValue> value() const;
virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>);
virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
virtual void remove(PassRefPtr<IDBCallbacks>);
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index 9aa2977..ce5e0a6 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -94,6 +94,11 @@ void IDBDatabaseProxy::removeObjectStore(const String& name, PassRefPtr<IDBCallb
m_webIDBDatabase->removeObjectStore(name, new WebIDBCallbacksImpl(callbacks));
}
+void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks)
+{
+ m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks));
+}
+
PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
{
WebKit::WebDOMStringList names(storeNames);
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index ed2016a..42a7d7e 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -52,6 +52,7 @@ public:
virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
+ virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout);
private:
diff --git a/WebKit/chromium/src/LocalFileSystemChromium.cpp b/WebKit/chromium/src/LocalFileSystemChromium.cpp
new file mode 100644
index 0000000..45365ef
--- /dev/null
+++ b/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -0,0 +1,69 @@
+/*
+ * 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 "LocalFileSystem.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "ErrorCallback.h"
+#include "FileSystemCallback.h"
+#include "FileSystemCallbacks.h"
+#include "PlatformString.h"
+#include "WebFileSystem.h"
+#include "WebFileSystemCallbacksImpl.h"
+#include "WebFrameClient.h"
+#include "WebFrameImpl.h"
+
+using namespace WebKit;
+
+namespace WebCore {
+
+PassRefPtr<LocalFileSystem> LocalFileSystem::create(const String& path)
+{
+ return adoptRef(new LocalFileSystem(path));
+}
+
+void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+{
+ ASSERT(context);
+ if (context->isDocument()) {
+ Document* document = static_cast<Document*>(context);
+ WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
+ webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(new FileSystemCallbacks(successCallback, errorCallback, context)));
+ } else {
+ // FIXME: Add implementation for workers.
+ }
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp
index 3aaebfd..4bb9022 100644
--- a/WebKit/chromium/src/WebBindings.cpp
+++ b/WebKit/chromium/src/WebBindings.cpp
@@ -43,6 +43,7 @@
#include "Range.h"
#include "V8BindingState.h"
#include "V8DOMWrapper.h"
+#include "V8Element.h"
#include "V8Event.h"
#include "V8Helpers.h"
#include "V8HiddenPropertyName.h"
@@ -53,6 +54,7 @@
#include "bridge/c/c_utility.h"
#endif
#include "WebDragData.h"
+#include "WebElement.h"
#include "WebRange.h"
#if USE(JAVASCRIPTCORE_BINDINGS)
@@ -295,6 +297,21 @@ static bool getRangeImpl(NPObject* npobj, WebRange* range)
return true;
}
+static bool getElementImpl(NPObject* npObj, WebElement* webElement)
+{
+ if (!npObj || (npObj->_class != npScriptObjectClass))
+ return false;
+
+ V8NPObject* v8NPObject = reinterpret_cast<V8NPObject*>(npObj);
+ v8::Handle<v8::Object> v8Object(v8NPObject->v8Object);
+ Element* native = V8Element::toNative(v8Object);
+ if (!native)
+ return false;
+
+ *webElement = WebElement(native);
+ return true;
+}
+
#endif
bool WebBindings::getDragData(NPObject* event, int* eventId, WebDragData* data)
@@ -323,6 +340,16 @@ bool WebBindings::getRange(NPObject* range, WebRange* webrange)
#endif
}
+bool WebBindings::getElement(NPObject* element, WebElement* webElement)
+{
+#if USE(V8)
+ return getElementImpl(element, webElement);
+#else
+ // Not supported on other ports (JSC, etc.).
+ return false;
+#endif
+}
+
void WebBindings::pushExceptionHandler(ExceptionHandler handler, void* data)
{
WebCore::pushExceptionHandler(handler, data);
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index f45cba9..91f310d 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -85,6 +85,11 @@ WebString WebElement::innerText() const
return constUnwrap<Element>()->innerText();
}
+WebString WebElement::computeInheritedLanguage() const
+{
+ return WebString(constUnwrap<Element>()->computeInheritedLanguage());
+}
+
WebElement::WebElement(const PassRefPtr<Element>& elem)
: WebNode(elem)
{
diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
index 2e05d52..bfdd9f2 100644
--- a/WebKit/chromium/src/WebEntities.cpp
+++ b/WebKit/chromium/src/WebEntities.cpp
@@ -33,7 +33,6 @@
#include <string.h>
-#include "HTMLEntityTable.h"
#include "PlatformString.h"
#include "StringBuilder.h"
#include <wtf/HashMap.h>
@@ -44,49 +43,17 @@ using namespace WebCore;
namespace WebKit {
-namespace {
-
-void populateMapFromXMLEntities(WTF::HashMap<int, WTF::String>& map)
-{
- ASSERT(map.isEmpty());
- map.set(0x003c, "lt");
- map.set(0x003e, "gt");
- map.set(0x0026, "amp");
- map.set(0x0027, "apos");
- map.set(0x0022, "quot");
-}
-
-void populateMapFromHTMLEntityTable(WTF::HashMap<int, WTF::String>& map)
-{
- ASSERT(map.isEmpty());
- const HTMLEntityTableEntry* entry = HTMLEntityTable::firstEntry();
- const HTMLEntityTableEntry* end = HTMLEntityTable::lastEntry() + 1;
- for (; entry != end; ++entry) {
- String entity = entry->entity;
- int value = entry->value;
- ASSERT(value && !entity.isEmpty());
- if (entity[entity.length() - 1] != ';')
- continue; // We want the canonical version that ends in ;
- // For consistency, use the lower case for entities that have both.
- if (map.contains(value) && map.get(value) == entity.lower())
- continue;
- // Don't register &percnt;, &nsup; and &supl; for some unknown reason.
- if (value == '%' || value == 0x2285 || value == 0x00b9)
- continue;
- map.set(value, entity);
- }
- // We add #39 for some unknown reason.
- map.set(0x0027, String("#39"));
-}
-
-}
-
WebEntities::WebEntities(bool xmlEntities)
{
- if (xmlEntities)
- populateMapFromXMLEntities(m_entitiesMap);
- else
- populateMapFromHTMLEntityTable(m_entitiesMap);
+ ASSERT(m_entitiesMap.isEmpty());
+ m_entitiesMap.set(0x003c, "lt");
+ m_entitiesMap.set(0x003e, "gt");
+ m_entitiesMap.set(0x0026, "amp");
+ m_entitiesMap.set(0x0027, "apos");
+ m_entitiesMap.set(0x0022, "quot");
+ // We add #39 for test-compatibility reason.
+ if (!xmlEntities)
+ m_entitiesMap.set(0x0027, String("#39"));
}
String WebEntities::entityNameByCode(int code) const
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
index d29f86d..a23add7 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -32,8 +32,9 @@
#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileSystemCallbacks.h"
+#include "AsyncFileSystemChromium.h"
#include "ExceptionCode.h"
-#include "FileSystemCallbacks.h"
#include "WebFileSystemEntry.h"
#include "WebFileInfo.h"
#include "WebString.h"
@@ -43,7 +44,7 @@ using namespace WebCore;
namespace WebKit {
-WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<FileSystemCallbacksBase> callbacks)
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
: m_callbacks(callbacks)
{
}
@@ -71,14 +72,14 @@ void WebFileSystemCallbacksImpl::didReadDirectory(const WebVector<WebFileSystemE
ASSERT(m_callbacks);
for (size_t i = 0; i < entries.size(); ++i)
m_callbacks->didReadDirectoryEntry(entries[i].name, entries[i].isDirectory);
- m_callbacks->didReadDirectoryChunkDone(hasMore);
+ m_callbacks->didReadDirectoryEntries(hasMore);
if (!hasMore)
delete this;
}
void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebString& path)
{
- m_callbacks->didOpenFileSystem(name, path);
+ m_callbacks->didOpenFileSystem(name, new AsyncFileSystemChromium(path));
delete this;
}
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
index f3c6bc3..b9c825b 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -37,7 +37,7 @@
#include <wtf/PassOwnPtr.h>
namespace WebCore {
-class FileSystemCallbacksBase;
+class AsyncFileSystemCallbacks;
}
namespace WebKit {
@@ -48,7 +48,7 @@ class WebString;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
public:
- WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::FileSystemCallbacksBase>);
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>);
virtual ~WebFileSystemCallbacksImpl();
virtual void didSucceed();
@@ -58,7 +58,7 @@ public:
virtual void didFail(WebFileError error);
private:
- OwnPtr<WebCore::FileSystemCallbacksBase> m_callbacks;
+ OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 4375e73..eb0db7e 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -1690,6 +1690,11 @@ WebString WebFrameImpl::counterValueForElementById(const WebString& id) const
return counterValueForElement(element);
}
+WebString WebFrameImpl::markerTextForListItem(const WebElement& webElement) const
+{
+ return WebCore::markerTextForListItem(const_cast<Element*>(webElement.constUnwrap<Element>()));
+}
+
int WebFrameImpl::pageNumberForElementById(const WebString& id,
float pageWidthInPixels,
float pageHeightInPixels) const
@@ -1811,7 +1816,7 @@ void WebFrameImpl::layout()
// layout this frame
FrameView* view = m_frame->view();
if (view)
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
}
void WebFrameImpl::paintWithContext(GraphicsContext& gc, const WebRect& rect)
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index 00e8ecb..14217fa 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -176,6 +176,7 @@ public:
virtual WebString contentAsMarkup() const;
virtual WebString renderTreeAsText() const;
virtual WebString counterValueForElementById(const WebString& id) const;
+ virtual WebString markerTextForListItem(const WebElement&) const;
virtual int pageNumberForElementById(const WebString& id,
float pageWidthInPixels,
float pageHeightInPixels) const;
diff --git a/WebKit/chromium/src/WebIDBCursorImpl.cpp b/WebKit/chromium/src/WebIDBCursorImpl.cpp
index 1ade687..b74d680 100644
--- a/WebKit/chromium/src/WebIDBCursorImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCursorImpl.cpp
@@ -57,7 +57,7 @@ WebIDBKey WebIDBCursorImpl::key() const
WebSerializedScriptValue WebIDBCursorImpl::value() const
{
- return m_idbCursorBackend->value()->serializedScriptValue();
+ return m_idbCursorBackend->value();
}
void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks)
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index bd3600f..8870ff9 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -87,6 +87,11 @@ void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, WebIDBCallback
m_databaseBackend->removeObjectStore(name, IDBCallbacksProxy::create(callbacks));
}
+void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks)
+{
+ m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(callbacks));
+}
+
WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
{
RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names);
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 9ae74e0..e0eaaa5 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -52,6 +52,7 @@ public:
virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks* callbacks);
virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode);
virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks);
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks);
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout);
private:
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 3b88335..7bf6407 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -140,6 +140,11 @@ int WebInputElement::selectionEnd()
return unwrap<HTMLInputElement>()->selectionEnd();
}
+bool WebInputElement::isValidValue(const WebString& value) const
+{
+ return constUnwrap<HTMLInputElement>()->isValidValue(value);
+}
+
WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem)
: WebFormControlElement(elem)
{
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index 6aa8439..bfc1bec 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -138,6 +138,12 @@ void WebNotification::dispatchCloseEvent(bool /* byUser */)
m_private->dispatchEvent(event.release());
}
+void WebNotification::dispatchClickEvent()
+{
+ RefPtr<Event> event = Event::create(eventNames().clickEvent, false, true);
+ m_private->dispatchEvent(event.release());
+}
+
WebNotification::WebNotification(const WTF::PassRefPtr<Notification>& notification)
: m_private(static_cast<WebNotificationPrivate*>(notification.releaseRef()))
{
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 9e21d58..2279eeb 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -256,4 +256,36 @@ bool WebRuntimeFeatures::isSpeechInputEnabled()
return RuntimeEnabledFeatures::speechInputEnabled();
}
+void WebRuntimeFeatures::enableXHRResponseBlob(bool enable)
+{
+#if ENABLE(XHR_RESPONSE_BLOB)
+ RuntimeEnabledFeatures::setXHRResponseBlobEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isXHRResponseBlobEnabled()
+{
+#if ENABLE(XHR_RESPONSE_BLOB)
+ return RuntimeEnabledFeatures::xhrResponseBlobEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebRuntimeFeatures::enableFileSystem(bool enable)
+{
+#if ENABLE(FILE_SYSTEM)
+ RuntimeEnabledFeatures::setFileSystemEnabled(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isFileSystemEnabled()
+{
+#if ENABLE(FILE_SYSTEM)
+ return RuntimeEnabledFeatures::fileSystemEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebScrollbarImpl.cpp b/WebKit/chromium/src/WebScrollbarImpl.cpp
index 8bf5340..c0131cb 100644
--- a/WebKit/chromium/src/WebScrollbarImpl.cpp
+++ b/WebKit/chromium/src/WebScrollbarImpl.cpp
@@ -81,7 +81,7 @@ void WebScrollbarImpl::setLocation(const WebRect& rect)
m_scrollbar->invalidate();
int length = m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar->width() : m_scrollbar->height();
- int pageStep = max(max<int>(length * Scrollbar::minFractionToStepWhenPaging(), length - Scrollbar::maxOverlapBetweenPages()), 1);
+ int pageStep = max(max(static_cast<int>(static_cast<float>(length) * Scrollbar::minFractionToStepWhenPaging()), length - Scrollbar::maxOverlapBetweenPages()), 1);
m_scrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_scrollbar->setEnabled(m_scrollbar->totalSize() > length);
m_scrollbar->setProportion(length, m_scrollbar->totalSize());
@@ -214,7 +214,7 @@ bool WebScrollbarImpl::onMouseWheel(const WebInputEvent& event)
if (mousewheel.scrollByPage) {
ASSERT(m_scrollbar->orientation() == VerticalScrollbar);
bool negative = delta < 0;
- delta = max(max<int>(m_scrollbar->visibleSize() * Scrollbar::minFractionToStepWhenPaging(), m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages()), 1);
+ delta = max(max(static_cast<float>(m_scrollbar->visibleSize()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages())), 1.0f);
if (negative)
delta *= -1;
}
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 14ece13..1864514 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -187,7 +187,7 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
if (!formElement->appendFormData(dataList, false))
continue;
- const BlobItemList& items = dataList.items();
+ const Vector<FormDataList::Item>& items = dataList.items();
if (isTextElement && !items.isEmpty()) {
if (textElement) {
// The auto-complete bar only knows how to fill in one value.
@@ -196,22 +196,20 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
}
textElement = static_cast<HTMLInputElement*>(formElement);
}
- for (BlobItemList::const_iterator j(items.begin()); j != items.end(); ++j) {
- const StringBlobItem* item = (*j)->toStringBlobItem();
- ASSERT(item);
+ for (Vector<FormDataList::Item>::const_iterator j(items.begin()); j != items.end(); ++j) {
// Handle ISINDEX / <input name=isindex> specially, but only if it's
// the first entry.
- if (!encodedString->isEmpty() || item->cstr() != "isindex") {
+ if (!encodedString->isEmpty() || j->data() != "isindex") {
if (!encodedString->isEmpty())
encodedString->append('&');
- FormDataBuilder::encodeStringAsFormData(*encodedString, item->cstr());
+ FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
encodedString->append('=');
}
++j;
if (formElement == textElement)
encodedString->append("{searchTerms}", 13);
else
- FormDataBuilder::encodeStringAsFormData(*encodedString, item->cstr());
+ FormDataBuilder::encodeStringAsFormData(*encodedString, j->data());
}
}
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 383b716..4b129d6 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -823,13 +823,10 @@ bool WebViewImpl::propagateScroll(ScrollDirection scrollDirection,
if (!frame)
return false;
- bool scrollHandled =
- frame->eventHandler()->scrollOverflow(scrollDirection,
- scrollGranularity);
+ bool scrollHandled = frame->eventHandler()->scrollOverflow(scrollDirection, scrollGranularity);
Frame* currentFrame = frame;
while (!scrollHandled && currentFrame) {
- scrollHandled = currentFrame->view()->scroll(scrollDirection,
- scrollGranularity);
+ scrollHandled = currentFrame->view()->scroll(scrollDirection, scrollGranularity);
currentFrame = currentFrame->tree()->parent();
}
return scrollHandled;
@@ -2120,9 +2117,13 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (active) {
m_layerRenderer = LayerRendererChromium::create(getOnscreenGLES2Context());
- if (m_layerRenderer->hardwareCompositing())
+ if (m_layerRenderer->hardwareCompositing()) {
m_isAcceleratedCompositingActive = true;
- else {
+
+ // Force a redraw the entire view so that the compositor gets the entire view,
+ // rather than just the currently-dirty subset.
+ m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height));
+ } else {
m_layerRenderer.clear();
m_isAcceleratedCompositingActive = false;
}
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index e3e0204..f55be4e 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -34,39 +34,10 @@
* DevTools frontend together. It is also responsible for overriding existing
* WebInspector functionality while it is getting upstreamed into WebCore.
*/
-devtools.ToolsAgent = function()
-{
- this.profilerAgent_ = new devtools.ProfilerAgent();
-};
-
-
-/**
- * @return {devtools.ProfilerAgent} Profiler agent instance.
- */
-devtools.ToolsAgent.prototype.getProfilerAgent = function()
-{
- return this.profilerAgent_;
-};
-
-
-
-/**
- * Global instance of the tools agent.
- * @type {devtools.ToolsAgent}
- */
-devtools.tools = null;
-
var context = {}; // Used by WebCore's inspector routines.
-///////////////////////////////////////////////////////////////////////////////
-// Here and below are overrides to existing WebInspector methods only.
-// TODO(pfeldman): Patch WebCore and upstream changes.
-var oldLoaded = WebInspector.loaded;
-WebInspector.loaded = function()
-{
- devtools.tools = new devtools.ToolsAgent();
-
+(function () {
Preferences.ignoreWhitespace = false;
Preferences.samplingCPUProfiler = true;
Preferences.heapProfilerPresent = true;
@@ -75,9 +46,9 @@ WebInspector.loaded = function()
Preferences.canEditScriptSource = true;
Preferences.onlineDetectionEnabled = false;
Preferences.domBreakpointsEnabled = true;
+})();
- oldLoaded.call(WebInspector);
-}
+var devtools = devtools || {};
devtools.domContentLoaded = function()
{
@@ -88,12 +59,12 @@ devtools.domContentLoaded = function()
document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false);
+// FIXME: This needs to be upstreamed.
(function InterceptProfilesPanelEvents()
{
var oldShow = WebInspector.ProfilesPanel.prototype.show;
WebInspector.ProfilesPanel.prototype.show = function()
{
- devtools.tools.getProfilerAgent().initializeProfiling();
this.enableToggleButton.visible = false;
oldShow.call(this);
// Show is called on every show event of a panel, so
diff --git a/WebKit/chromium/src/js/ProfilerAgent.js b/WebKit/chromium/src/js/ProfilerAgent.js
deleted file mode 100644
index 7f74595..0000000
--- a/WebKit/chromium/src/js/ProfilerAgent.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * @fileoverview Provides communication interface to remote v8 profiler.
- */
-
-/**
- * @constructor
- */
-devtools.ProfilerAgent = function()
-{
-
- /**
- * Profiler log position.
- * @type {number}
- */
- this._logPosition = 0;
-
- /**
- * Last requested log position.
- * @type {number}
- */
- this._lastRequestedLogPosition = -1;
-
- /**
- * Profiler processor instance.
- * @type {devtools.profiler.Processor}
- */
- this._profilerProcessor = new devtools.profiler.Processor();
-};
-
-
-/**
- * A copy of enum from include/v8.h
- * @enum {number}
- */
-devtools.ProfilerAgent.ProfilerModules = {
- PROFILER_MODULE_NONE: 0,
- PROFILER_MODULE_CPU: 1,
- PROFILER_MODULE_HEAP_STATS: 1 << 1,
- PROFILER_MODULE_JS_CONSTRUCTORS: 1 << 2,
- PROFILER_MODULE_HEAP_SNAPSHOT: 1 << 16
-};
-
-
-/**
- * Initializes profiling state.
- */
-devtools.ProfilerAgent.prototype.initializeProfiling = function()
-{
- this._getNextLogLines(false);
-};
-
-
-/**
- * Requests the next chunk of log lines.
- * @param {boolean} immediately Do not postpone the request.
- * @private
- */
-devtools.ProfilerAgent.prototype._getNextLogLines = function(immediately)
-{
- if (this._lastRequestedLogPosition == this._logPosition)
- return;
- var pos = this._lastRequestedLogPosition = this._logPosition;
-
- var callId = WebInspector.Callback.wrap(this._didGetProfilerLogLines.bind(this));
- if (immediately)
- InspectorBackend.getProfilerLogLines(callId, pos);
- else {
- function delayedRequest()
- {
- InspectorBackend.getProfilerLogLines(callId, pos);
- }
- setTimeout(delayedRequest, 500);
- }
-};
-
-
-/**
- * Starts profiling.
- * @param {number} modules List of modules to enable.
- */
-devtools.ProfilerAgent.prototype.startProfiling = function(modules)
-{
- if (modules & devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT) {
- InspectorBackend.takeHeapSnapshot();
- // Active modules will not change, instead, a snapshot will be logged.
- this._getNextLogLines();
- }
-};
-
-
-/**
- * Handles a portion of a profiler log retrieved by getLogLines call.
- * @param {number} pos Current position in log.
- * @param {string} log A portion of profiler log.
- */
-devtools.ProfilerAgent.prototype._didGetProfilerLogLines = function(pos, log)
-{
- this._logPosition = pos;
- if (log.length > 0) {
- this._profilerProcessor.processLogChunk(log);
- this._getNextLogLines();
- } else {
- // Allow re-reading from the last position.
- this._lastRequestedLogPosition = this._logPosition - 1;
- }
-};
-
-WebInspector.didGetProfilerLogLines = WebInspector.Callback.processCallback;
diff --git a/WebKit/chromium/src/js/ProfilerProcessor.js b/WebKit/chromium/src/js/ProfilerProcessor.js
deleted file mode 100644
index 61714e8..0000000
--- a/WebKit/chromium/src/js/ProfilerProcessor.js
+++ /dev/null
@@ -1,543 +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 Profiler processor is used to process log file produced
- * by V8 and produce an internal profile representation which is used
- * for building profile views in "Profiles" tab.
- */
-
-
-/**
- * Creates a Profile View builder object compatible with WebKit Profiler UI.
- *
- * @param {number} samplingRate Number of ms between profiler ticks.
- * @constructor
- */
-devtools.profiler.WebKitViewBuilder = function(samplingRate)
-{
- devtools.profiler.ViewBuilder.call(this, samplingRate);
-};
-devtools.profiler.WebKitViewBuilder.prototype.__proto__ = devtools.profiler.ViewBuilder.prototype;
-
-
-/**
- * @override
- */
-devtools.profiler.WebKitViewBuilder.prototype.createViewNode = function(funcName, totalTime, selfTime, head)
-{
- return new devtools.profiler.WebKitViewNode(funcName, totalTime, selfTime, head);
-};
-
-
-/**
- * Constructs a Profile View node object for displaying in WebKit Profiler UI.
- *
- * @param {string} internalFuncName A fully qualified function name.
- * @param {number} totalTime Amount of time that application spent in the
- * corresponding function and its descendants (not that depending on
- * profile they can be either callees or callers.)
- * @param {number} selfTime Amount of time that application spent in the
- * corresponding function only.
- * @param {devtools.profiler.ProfileView.Node} head Profile view head.
- * @constructor
- */
-devtools.profiler.WebKitViewNode = function(internalFuncName, totalTime, selfTime, head)
-{
- devtools.profiler.ProfileView.Node.call(this, internalFuncName, totalTime, selfTime, head);
- this.initFuncInfo_();
- this.callUID = internalFuncName;
-};
-devtools.profiler.WebKitViewNode.prototype.__proto__ = devtools.profiler.ProfileView.Node.prototype;
-
-
-/**
- * RegEx for stripping V8's prefixes of compiled functions.
- */
-devtools.profiler.WebKitViewNode.FUNC_NAME_STRIP_RE = /^(?:LazyCompile|Function|Callback): (.*)$/;
-
-
-/**
- * RegEx for extracting script source URL and line number.
- */
-devtools.profiler.WebKitViewNode.FUNC_NAME_PARSE_RE = /^((?:get | set )?[^ ]+) (.*):(\d+)( \{\d+\})?$/;
-
-
-/**
- * Inits "functionName", "url", and "lineNumber" fields using "internalFuncName"
- * field.
- * @private
- */
-devtools.profiler.WebKitViewNode.prototype.initFuncInfo_ = function()
-{
- var nodeAlias = devtools.profiler.WebKitViewNode;
- this.functionName = this.internalFuncName;
-
- var strippedName = nodeAlias.FUNC_NAME_STRIP_RE.exec(this.functionName);
- if (strippedName)
- this.functionName = strippedName[1];
-
- var parsedName = nodeAlias.FUNC_NAME_PARSE_RE.exec(this.functionName);
- if (parsedName) {
- this.functionName = parsedName[1];
- if (parsedName[4])
- this.functionName += parsedName[4];
- this.url = parsedName[2];
- this.lineNumber = parsedName[3];
- } else {
- this.url = '';
- this.lineNumber = 0;
- }
-};
-
-
-/**
- * Ancestor of a profile object that leaves out only JS-related functions.
- * @constructor
- */
-devtools.profiler.JsProfile = function()
-{
- devtools.profiler.Profile.call(this);
-};
-devtools.profiler.JsProfile.prototype.__proto__ = devtools.profiler.Profile.prototype;
-
-
-/**
- * RegExp that leaves only non-native JS functions.
- * @type {RegExp}
- */
-devtools.profiler.JsProfile.JS_NON_NATIVE_RE = new RegExp(
- "^" +
- "(?:Callback:)|" +
- "(?:Script: (?!native))|" +
- "(?:(?:LazyCompile|Function): [^ ]*(?: (?!native )[^ ]+:\\d+)?$)");
-
-
-/**
- * @override
- */
-devtools.profiler.JsProfile.prototype.skipThisFunction = function(name)
-{
- return !devtools.profiler.JsProfile.JS_NON_NATIVE_RE.test(name);
-};
-
-
-/**
- * Profiler processor. Consumes profiler log and builds profile views.
- * FIXME: change field naming style to use trailing underscore.
- *
- * @param {function(devtools.profiler.ProfileView)} newProfileCallback Callback
- * that receives a new processed profile.
- * @constructor
- */
-devtools.profiler.Processor = function()
-{
- var dispatches = {
- "code-creation": {
- parsers: [null, this.createAddressParser("code"), parseInt, null],
- processor: this.processCodeCreation_, backrefs: true,
- needsProfile: true },
- "code-move": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("code-move-to")],
- processor: this.processCodeMove_, backrefs: true,
- needsProfile: true },
- "code-delete": { parsers: [this.createAddressParser("code")],
- processor: this.processCodeDelete_, backrefs: true,
- needsProfile: true },
- "function-creation": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("function-obj")],
- processor: this.processFunctionCreation_, backrefs: true },
- "function-move": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("code-move-to")],
- processor: this.processFunctionMove_, backrefs: true },
- "function-delete": { parsers: [this.createAddressParser("code")],
- processor: this.processFunctionDelete_, backrefs: true },
- "tick": { parsers: [this.createAddressParser("code"),
- this.createAddressParser("stack"), parseInt, "var-args"],
- processor: this.processTick_, backrefs: true, needProfile: true },
- "profiler": { parsers: [null, "var-args"],
- processor: this.processProfiler_, needsProfile: false },
- "heap-sample-begin": { parsers: [null, null, parseInt],
- processor: this.processHeapSampleBegin_ },
- "heap-sample-stats": { parsers: [null, null, parseInt, parseInt],
- processor: this.processHeapSampleStats_ },
- "heap-sample-item": { parsers: [null, parseInt, parseInt],
- processor: this.processHeapSampleItem_ },
- "heap-js-cons-item": { parsers: [null, parseInt, parseInt],
- processor: this.processHeapJsConsItem_ },
- "heap-js-ret-item": { parsers: [null, "var-args"],
- processor: this.processHeapJsRetItem_ },
- "heap-sample-end": { parsers: [null, null],
- processor: this.processHeapSampleEnd_ },
- // Not used in DevTools Profiler.
- "shared-library": null,
- // Obsolete row types.
- "code-allocate": null,
- "begin-code-region": null,
- "end-code-region": null};
-
- if (devtools.profiler.Profile.VERSION === 2) {
- dispatches["tick"] = { parsers: [this.createAddressParser("code"),
- this.createAddressParser("stack"),
- this.createAddressParser("func"), parseInt, "var-args"],
- processor: this.processTickV2_, backrefs: true };
- }
-
- devtools.profiler.LogReader.call(this, dispatches);
-
- /**
- * Callback that is called when a new profile is encountered in the log.
- * @type {function()}
- */
- this.startedProfileProcessing_ = null;
-
- /**
- * Callback that is called periodically to display processing status.
- * @type {function()}
- */
- this.profileProcessingStatus_ = null;
-
- /**
- * Callback that is called when a profile has been processed and is ready
- * to be shown.
- * @type {function(devtools.profiler.ProfileView)}
- */
- this.finishedProfileProcessing_ = null;
-
- /**
- * The current profile.
- * @type {devtools.profiler.JsProfile}
- */
- this.currentProfile_ = null;
-
- /**
- * Builder of profile views. Created during "profiler,begin" event processing.
- * @type {devtools.profiler.WebKitViewBuilder}
- */
- this.viewBuilder_ = null;
-
- /**
- * Next profile id.
- * @type {number}
- */
- this.profileId_ = 1;
-
- /**
- * Counter for processed ticks.
- * @type {number}
- */
- this.ticksCount_ = 0;
-
- /**
- * Interval id for updating processing status.
- * @type {number}
- */
- this.processingInterval_ = null;
-
- /**
- * The current heap snapshot.
- * @type {string}
- */
- this.currentHeapSnapshot_ = null;
-
- /**
- * Next heap snapshot id.
- * @type {number}
- */
- this.heapSnapshotId_ = 1;
-};
-devtools.profiler.Processor.prototype.__proto__ = devtools.profiler.LogReader.prototype;
-
-
-/**
- * @override
- */
-devtools.profiler.Processor.prototype.printError = function(str)
-{
- WebInspector.log(str);
-};
-
-
-/**
- * @override
- */
-devtools.profiler.Processor.prototype.skipDispatch = function(dispatch)
-{
- return dispatch.needsProfile && this.currentProfile_ === null;
-};
-
-
-/**
- * Sets profile processing callbacks.
- *
- * @param {function()} started Started processing callback.
- * @param {function(devtools.profiler.ProfileView)} finished Finished
- * processing callback.
- */
-devtools.profiler.Processor.prototype.setCallbacks = function(started, processing, finished)
-{
- this.startedProfileProcessing_ = started;
- this.profileProcessingStatus_ = processing;
- this.finishedProfileProcessing_ = finished;
-};
-
-
-/**
- * An address for the fake "(program)" entry. WebKit's visualisation
- * has assumptions on how the top of the call tree should look like,
- * and we need to add a fake entry as the topmost function. This
- * address is chosen because it's the end address of the first memory
- * page, which is never used for code or data, but only as a guard
- * page for catching AV errors.
- *
- * @type {number}
- */
-devtools.profiler.Processor.PROGRAM_ENTRY = 0xffff;
-/**
- * @type {string}
- */
-devtools.profiler.Processor.PROGRAM_ENTRY_STR = "0xffff";
-
-
-/**
- * Sets new profile callback.
- * @param {function(devtools.profiler.ProfileView)} callback Callback function.
- */
-devtools.profiler.Processor.prototype.setNewProfileCallback = function(callback)
-{
- this.newProfileCallback_ = callback;
-};
-
-
-devtools.profiler.Processor.prototype.processProfiler_ = function(state, params)
-{
- switch (state) {
- case "resume":
- if (this.currentProfile_ === null) {
- this.currentProfile_ = new devtools.profiler.JsProfile();
- // see the comment for devtools.profiler.Processor.PROGRAM_ENTRY
- this.currentProfile_.addCode("Function", "(program)", devtools.profiler.Processor.PROGRAM_ENTRY, 1);
- if (this.startedProfileProcessing_)
- this.startedProfileProcessing_();
- this.ticksCount_ = 0;
- var self = this;
- if (this.profileProcessingStatus_) {
- this.processingInterval_ = window.setInterval(
- function() { self.profileProcessingStatus_(self.ticksCount_); },
- 1000);
- }
- }
- break;
- case "pause":
- if (this.currentProfile_ !== null) {
- window.clearInterval(this.processingInterval_);
- this.processingInterval_ = null;
- if (this.finishedProfileProcessing_)
- this.finishedProfileProcessing_(this.createProfileForView());
- this.currentProfile_ = null;
- }
- break;
- case "begin":
- var samplingRate = NaN;
- if (params.length > 0)
- samplingRate = parseInt(params[0]);
- if (isNaN(samplingRate))
- samplingRate = 1;
- this.viewBuilder_ = new devtools.profiler.WebKitViewBuilder(samplingRate);
- break;
- // These events are valid but aren't used.
- case "compression":
- case "end": break;
- default:
- throw new Error("unknown profiler state: " + state);
- }
-};
-
-
-devtools.profiler.Processor.prototype.processCodeCreation_ = function(type, start, size, name)
-{
- this.currentProfile_.addCode(this.expandAlias(type), name, start, size);
-};
-
-
-devtools.profiler.Processor.prototype.processCodeMove_ = function(from, to)
-{
- this.currentProfile_.moveCode(from, to);
-};
-
-
-devtools.profiler.Processor.prototype.processCodeDelete_ = function(start)
-{
- this.currentProfile_.deleteCode(start);
-};
-
-
-devtools.profiler.Processor.prototype.processFunctionCreation_ = function(functionAddr, codeAddr)
-{
- this.currentProfile_.addCodeAlias(functionAddr, codeAddr);
-};
-
-
-devtools.profiler.Processor.prototype.processFunctionMove_ = function(from, to)
-{
- this.currentProfile_.safeMoveDynamicCode(from, to);
-};
-
-
-devtools.profiler.Processor.prototype.processFunctionDelete_ = function(start)
-{
- this.currentProfile_.safeDeleteDynamicCode(start);
-};
-
-
-// TODO(mnaganov): Remove after next V8 roll.
-devtools.profiler.Processor.prototype.processTick_ = function(pc, sp, vmState, stack)
-{
- // see the comment for devtools.profiler.Processor.PROGRAM_ENTRY
- stack.push(devtools.profiler.Processor.PROGRAM_ENTRY_STR);
- this.currentProfile_.recordTick(this.processStack(pc, stack));
- this.ticksCount_++;
-};
-
-
-devtools.profiler.Processor.prototype.processTickV2_ = function(pc, sp, func, vmState, stack)
-{
- // see the comment for devtools.profiler.Processor.PROGRAM_ENTRY
- stack.push(devtools.profiler.Processor.PROGRAM_ENTRY_STR);
-
-
- if (func) {
- var funcEntry = this.currentProfile_.findEntry(func);
- if (!funcEntry || !funcEntry.isJSFunction || !funcEntry.isJSFunction())
- func = 0;
- else {
- var currEntry = this.currentProfile_.findEntry(pc);
- if (!currEntry || !currEntry.isJSFunction || currEntry.isJSFunction()) {
- func = 0;
- }
- }
- }
-
- this.currentProfile_.recordTick(this.processStack(pc, func, stack));
- this.ticksCount_++;
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleBegin_ = function(space, state, ticks)
-{
- if (space !== "Heap") return;
- this.currentHeapSnapshot_ = {
- number: this.heapSnapshotId_++,
- entries: {},
- clusters: {},
- lowlevels: {},
- ticks: ticks
- };
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleStats_ = function(space, state, capacity, used)
-{
- if (space !== "Heap") return;
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleItem_ = function(item, number, size)
-{
- if (!this.currentHeapSnapshot_) return;
- this.currentHeapSnapshot_.lowlevels[item] = {
- type: item, count: number, size: size
- };
-};
-
-
-devtools.profiler.Processor.prototype.processHeapJsConsItem_ = function(item, number, size)
-{
- if (!this.currentHeapSnapshot_) return;
- this.currentHeapSnapshot_.entries[item] = {
- cons: item, count: number, size: size, retainers: {}
- };
-};
-
-
-devtools.profiler.Processor.prototype.processHeapJsRetItem_ = function(item, retainersArray)
-{
- if (!this.currentHeapSnapshot_) return;
- var rawRetainers = {};
- for (var i = 0, n = retainersArray.length; i < n; ++i) {
- var entry = retainersArray[i].split(";");
- rawRetainers[entry[0]] = parseInt(entry[1], 10);
- }
-
- function mergeRetainers(entry) {
- for (var rawRetainer in rawRetainers) {
- var consName = rawRetainer.indexOf(":") !== -1 ? rawRetainer.split(":")[0] : rawRetainer;
- if (!(consName in entry.retainers))
- entry.retainers[consName] = { cons: consName, count: 0, clusters: {} };
- var retainer = entry.retainers[consName];
- retainer.count += rawRetainers[rawRetainer];
- if (consName !== rawRetainer)
- retainer.clusters[rawRetainer] = true;
- }
- }
-
- if (item.indexOf(":") !== -1) {
- // Array, Function, or Object instances cluster case.
- if (!(item in this.currentHeapSnapshot_.clusters)) {
- this.currentHeapSnapshot_.clusters[item] = {
- cons: item, retainers: {}
- };
- }
- mergeRetainers(this.currentHeapSnapshot_.clusters[item]);
- item = item.split(":")[0];
- }
- mergeRetainers(this.currentHeapSnapshot_.entries[item]);
-};
-
-
-devtools.profiler.Processor.prototype.processHeapSampleEnd_ = function(space, state)
-{
- if (space !== "Heap") return;
- var snapshot = this.currentHeapSnapshot_;
- this.currentHeapSnapshot_ = null;
- WebInspector.panels.profiles.addSnapshot(snapshot);
-};
-
-
-/**
- * Creates a profile for further displaying in ProfileView.
- */
-devtools.profiler.Processor.prototype.createProfileForView = function()
-{
- var profile = this.viewBuilder_.buildView(this.currentProfile_.getTopDownProfile());
- profile.uid = this.profileId_++;
- profile.title = UserInitiatedProfileName + "." + profile.uid;
- return profile;
-};
diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css
index dfcaadf..9495fb8 100755
--- a/WebKit/chromium/src/js/devTools.css
+++ b/WebKit/chromium/src/js/devTools.css
@@ -37,118 +37,6 @@ body.platform-linux #scripts-files {
line-height: 12px;
}
-/* Heap Profiler Styles */
-
-.heap-snapshot-status-bar-item .glyph {
- -webkit-mask-image: url(Images/focusButtonGlyph.png);
-}
-
-.heap-snapshot-sidebar-tree-item .icon {
- content: url(Images/profileIcon.png);
-}
-
-.heap-snapshot-sidebar-tree-item.small .icon {
- content: url(Images/profileSmallIcon.png);
-}
-
-.heap-snapshot-view {
- display: none;
- overflow: hidden;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
-}
-
-.heap-snapshot-view.visible {
- display: block;
-}
-
-.heap-snapshot-view .data-grid {
- border: none;
- max-height: 100%;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 93px;
-}
-
-.heap-snapshot-view .data-grid th.count-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.count-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.size-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.size-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.countDelta-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.countDelta-column {
- text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.sizeDelta-column {
- text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.sizeDelta-column {
- text-align: right;
-}
-
-#heap-snapshot-summary-container {
- position: absolute;
- padding-top: 20px;
- bottom: 0;
- left: 0;
- right: 0;
- height: 93px;
- margin-left: -1px;
- border-left: 1px solid rgb(102, 102, 102);
- background-color: rgb(101, 111, 130);
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
- background-repeat: repeat-x;
- background-position: top;
- text-align: center;
- text-shadow: black 0 1px 1px;
- white-space: nowrap;
- color: white;
- -webkit-background-size: 1px 6px;
- -webkit-background-origin: padding;
- -webkit-background-clip: padding;
-}
-
-.heap-snapshot-summary {
- display: inline-block;
- width: 50%;
- min-width: 300px;
- position: relative;
-}
-
-.heap-snapshot-summary canvas.summary-graph {
- width: 225px;
-}
-
-.heap-snapshot-summary-label {
- font-size: 12px;
- font-weight: bold;
- position: absolute;
- top: 1px;
- width: 50%;
- left: 25%;
-}
-
.section > .header {
border: 1px solid rgb(92, 116, 157);
background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(105, 133, 180)), to(rgb(92, 116, 157)));
diff --git a/WebKit/chromium/src/win/WebInputEventFactory.cpp b/WebKit/chromium/src/win/WebInputEventFactory.cpp
index a5bd935..4d83f22 100644
--- a/WebKit/chromium/src/win/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/win/WebInputEventFactory.cpp
@@ -398,11 +398,11 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(HWND hwnd, UINT message
//
// How many pixels should we scroll per line? Gecko uses the height of the
// current line, which means scroll distance changes as you go through the
- // page or go to different pages. IE 7 is ~50 px/line, although the value
- // seems to vary slightly by page and zoom level. Since IE 7 has a smoothing
- // algorithm on scrolling, it can get away with slightly larger scroll values
- // without feeling jerky. Here we use 100 px per three lines (the default
- // scroll amount is three lines per wheel tick).
+ // page or go to different pages. IE 8 is ~60 px/line, although the value
+ // seems to vary slightly by page and zoom level. Also, IE defaults to
+ // smooth scrolling while Firefox doesn't, so it can get away with somewhat
+ // larger scroll values without feeling as jerky. Here we use 100 px per
+ // three lines (the default scroll amount is three lines per wheel tick).
static const float scrollbarPixelsPerLine = 100.0f / 3.0f;
wheelDelta /= WHEEL_DELTA;
float scrollDelta = wheelDelta;
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt
index cdb24ff..7b5865b 100644
--- a/WebKit/efl/CMakeListsEfl.txt
+++ b/WebKit/efl/CMakeListsEfl.txt
@@ -21,12 +21,23 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
${SQLITE_INCLUDE_DIRS}
)
+IF (ENABLE_VIDEO)
+LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+ "${WEBCORE_DIR}/platform/graphics/gstreamer"
+ ${Gstreamer-App_INCLUDE_DIRS}
+ ${Gstreamer-Interfaces_INCLUDE_DIRS}
+ ${Gstreamer-Pbutils_INCLUDE_DIRS}
+ ${Gstreamer-Video_INCLUDE_DIRS}
+)
+ENDIF()
+
LIST(APPEND WebKit_SOURCES
efl/WebCoreSupport/ChromeClientEfl.cpp
efl/WebCoreSupport/ContextMenuClientEfl.cpp
efl/WebCoreSupport/DragClientEfl.cpp
efl/WebCoreSupport/EditorClientEfl.cpp
efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+ efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
efl/WebCoreSupport/InspectorClientEfl.cpp
efl/ewk/ewk_contextmenu.cpp
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index e1ce89a..bafa48d 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,150 @@
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_layout_if_needed_recursive):
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add ability to count text matches without marking
+ https://bugs.webkit.org/show_bug.cgi?id=43996
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_text_matches_mark): Switched to call
+ countMatchesForText() instead of markAllMatchesForText().
+
+2010-08-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Unreviewed build fix.
+
+ [EFL] Build break for r66456
+ https://bugs.webkit.org/post_bug.cgi
+
+ Replace firstRectsForMarkers with renderedRectsForMarkers.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_text_matches_nth_pos_get):
+
+2010-08-30 Kamil Blank <k.blank@samsung.com>
+
+ Reviewed by Adam Barth.
+
+ [EFL] Added API which returns position of n-th text matches mark
+ https://bugs.webkit.org/show_bug.cgi?id=44258
+
+ * ewk/ewk_frame.cpp:
+ (_ewk_frame_rect_cmp_less_than): Private.
+ (_ewk_frame_rect_is_negative_value): Private.
+ (ewk_frame_text_matches_nth_pos_get): Added. Function returns position of
+ n-th text match in frame.
+ * ewk/ewk_frame.h:
+
+2010-08-30 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Adam Barth.
+
+ [EFL]Url of HistoryItem was broken for special character like korean
+ https://bugs.webkit.org/show_bug.cgi?id=44495
+
+ Remove unnecessary code. This makes a bug with complicated URL.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_view_state_save):
+
+2010-08-30 Mikołaj Małecki <m.malecki@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen
+
+ [EFL] Added initial setting to turn on offline pages.
+ https://bugs.webkit.org/show_bug.cgi?id=44239
+
+ * ewk/ewk_main.cpp: Torn off non-EFL init to _ewk_init_body
+ (ewk_init): Changed non-EFL init to call _ewk_init_body
+ (_ewk_init_body): Moved internal init here and added cache directory path setting.
+ * ewk/ewk_view.cpp: Added new config items: offline_app_cache and cache_directory
+ (_ewk_view_priv_new): creating cache_directory string
+ (_ewk_view_priv_del): deleting cache_directory string
+ (ewk_view_setting_offline_app_cache_get):
+ (ewk_view_setting_offline_app_cache_set):
+ (ewk_view_setting_cache_directory_get):
+ (ewk_view_setting_cache_directory_set):
+ * ewk/ewk_view.h: added offline_app_cache and cache_directory props to ewk API
+
+2010-08-26 Miroslaw Szymanski <miroslaw.s@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Added new callback when view's size is changed to fix issue with changing layout size
+ https://bugs.webkit.org/show_bug.cgi?id=44337
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_smart_calculate):
+
+2010-08-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Add dummy FullScreenVideoControllerEfl to WebKit EFL
+ https://bugs.webkit.org/show_bug.cgi?id=44590
+
+ Add FullScreenVideoControllerEfl to WebCoreSupport. However,
+ this is not implemented yet.
+
+ * CMakeListsEfl.txt:
+ * WebCoreSupport/FullscreenVideoControllerEfl.cpp: Added.
+ (FullscreenVideoController::FullscreenVideoController):
+ (FullscreenVideoController::~FullscreenVideoController):
+ (FullscreenVideoController::setMediaElement):
+ (FullscreenVideoController::showHud):
+ (FullscreenVideoController::hideHud):
+ (FullscreenVideoController::enterFullscreen):
+ (FullscreenVideoController::updateHudPosition):
+ (FullscreenVideoController::exitOnUserRequest):
+ (FullscreenVideoController::exitFullscreen):
+ (FullscreenVideoController::canPlay):
+ (FullscreenVideoController::play):
+ (FullscreenVideoController::pause):
+ (FullscreenVideoController::playStateChanged):
+ (FullscreenVideoController::togglePlay):
+ (FullscreenVideoController::volume):
+ (FullscreenVideoController::muted):
+ (FullscreenVideoController::setVolume):
+ (FullscreenVideoController::volumeChanged):
+ (FullscreenVideoController::muteChanged):
+ (FullscreenVideoController::currentTime):
+ (FullscreenVideoController::setCurrentTime):
+ (FullscreenVideoController::duration):
+ (FullscreenVideoController::percentLoaded):
+ (FullscreenVideoController::beginSeek):
+ (FullscreenVideoController::doSeek):
+ (FullscreenVideoController::endSeek):
+ (timeToString):
+ (FullscreenVideoController::updateHudProgressBar):
+ (FullscreenVideoController::createHud):
+ * WebCoreSupport/FullscreenVideoControllerEfl.h: Added.
+ (FullscreenVideoController::mediaElement):
+
+2010-08-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Add setting API for enabling local storage.
+ https://bugs.webkit.org/show_bug.cgi?id=44319
+
+ Add API for enabling/disabling local storage.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+ (ewk_view_setting_local_storage_get): Added
+ (ewk_view_setting_local_storage_set): Added
+ * ewk/ewk_view.h:
+
2010-08-25 Jaehun Lim <ljaehun.lim@samsung.com>
Reviewed by Antonio Gomes.
diff --git a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
new file mode 100644
index 0000000..6e5d599
--- /dev/null
+++ b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2010 Igalia S.L
+ * 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"
+
+#if ENABLE(VIDEO)
+
+#include "FullscreenVideoControllerEfl.h"
+
+#include "MediaPlayer.h"
+#include "NotImplemented.h"
+
+#include <gst/gst.h>
+
+using namespace std;
+using namespace WebCore;
+
+FullscreenVideoController::FullscreenVideoController()
+ : m_hudTimeoutId(0)
+ , m_progressBarUpdateId(0)
+ , m_seekLock(false)
+ , m_window(0)
+ , m_hudWindow(0)
+{
+}
+
+FullscreenVideoController::~FullscreenVideoController()
+{
+ exitFullscreen();
+}
+
+void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement)
+{
+ if (mediaElement == m_mediaElement)
+ return;
+
+ m_mediaElement = mediaElement;
+ if (!m_mediaElement) {
+ // Can't do full-screen, just get out
+ exitFullscreen();
+ }
+}
+
+void FullscreenVideoController::showHud(bool autoHide)
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::hideHud()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::enterFullscreen()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::updateHudPosition()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::exitOnUserRequest()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::exitFullscreen()
+{
+ notImplemented();
+}
+
+bool FullscreenVideoController::canPlay() const
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::play()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::pause()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::playStateChanged()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::togglePlay()
+{
+ notImplemented();
+}
+
+float FullscreenVideoController::volume() const
+{
+ notImplemented();
+ return 0;
+}
+
+bool FullscreenVideoController::muted() const
+{
+ notImplemented();
+ return false;
+}
+
+void FullscreenVideoController::setVolume(float volume)
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::volumeChanged()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::muteChanged()
+{
+ notImplemented();
+}
+
+float FullscreenVideoController::currentTime() const
+{
+ notImplemented();
+ return 0;
+}
+
+void FullscreenVideoController::setCurrentTime(float value)
+{
+ notImplemented();
+}
+
+float FullscreenVideoController::duration() const
+{
+ notImplemented();
+ return 0;
+}
+
+float FullscreenVideoController::percentLoaded() const
+{
+ notImplemented();
+ return 0;
+}
+
+void FullscreenVideoController::beginSeek()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::doSeek()
+{
+ notImplemented();
+}
+
+void FullscreenVideoController::endSeek()
+{
+ notImplemented();
+}
+
+static String timeToString(float time)
+{
+ notImplemented();
+}
+
+bool FullscreenVideoController::updateHudProgressBar()
+{
+ notImplemented();
+ return false;
+}
+
+void FullscreenVideoController::createHud()
+{
+ notImplemented();
+}
+
+#endif
diff --git a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h
new file mode 100644
index 0000000..4bbae25
--- /dev/null
+++ b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 Igalia S.L
+ * 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 FullscreenVideoControllerEfl_h
+#define FullscreenVideoControllerEfl_h
+
+#if ENABLE(VIDEO)
+
+#include "GStreamerGWorld.h"
+#include "HTMLMediaElement.h"
+#include <wtf/RefPtr.h>
+
+class FullscreenVideoController : public Noncopyable {
+public:
+ FullscreenVideoController();
+ virtual ~FullscreenVideoController();
+
+ void setMediaElement(WebCore::HTMLMediaElement*);
+ WebCore::HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); }
+
+ void enterFullscreen();
+ void exitFullscreen();
+
+ void exitOnUserRequest();
+ void togglePlay();
+ void beginSeek();
+ void doSeek();
+ void endSeek();
+
+ void hideHud();
+ void showHud(bool);
+ bool updateHudProgressBar();
+
+ float volume() const;
+ void setVolume(float);
+ void volumeChanged();
+ void muteChanged();
+
+private:
+ bool canPlay() const;
+ void play();
+ void pause();
+ void playStateChanged();
+
+ bool muted() const;
+
+ float currentTime() const;
+ void setCurrentTime(float);
+
+ float duration() const;
+ float percentLoaded() const;
+
+ void createHud();
+ void updateHudPosition();
+
+ RefPtr<WebCore::HTMLMediaElement> m_mediaElement;
+ RefPtr<WebCore::GStreamerGWorld> m_gstreamerGWorld;
+
+ uint m_hudTimeoutId;
+ uint m_progressBarUpdateId;
+ uint m_progressBarFillUpdateId;
+ uint m_hscaleUpdateId;
+ uint m_volumeUpdateId;
+ bool m_seekLock;
+ PlatformWidget* m_window;
+ PlatformWidget* m_hudWindow;
+ PlatformWidget* m_timeHScale;
+ PlatformWidget* m_timeLabel;
+ PlatformWidget* m_volumeButton;
+};
+
+#endif
+
+#endif // FullscreenVideoControllerEfl_h
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 7a2af5a..a7ce1ff 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -44,14 +44,15 @@
#include "ScriptValue.h"
#include "SharedBuffer.h"
#include "SubstituteData.h"
-#include "ZoomMode.h"
#include "WindowsKeyboardCodes.h"
+#include "ZoomMode.h"
#include "ewk_private.h"
-#include <wtf/text/CString.h>
#include <Eina.h>
#include <Evas.h>
+#include <algorithm>
#include <eina_safety_checks.h>
+#include <wtf/text/CString.h>
static const char EWK_FRAME_TYPE_STR[] = "EWK_Frame";
@@ -771,7 +772,7 @@ unsigned int ewk_frame_text_matches_mark(Evas_Object* o, const char* string, Ein
EINA_SAFETY_ON_NULL_RETURN_VAL(string, 0);
sd->frame->setMarkedTextMatchesAreHighlighted(highlight);
- return sd->frame->markAllMatchesForText(WTF::String::fromUTF8(string), case_sensitive, limit);
+ return sd->frame->countMatchesForText(WTF::String::fromUTF8(string), case_sensitive, limit, true);
}
/**
@@ -820,6 +821,55 @@ Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object* o)
return sd->frame->markedTextMatchesAreHighlighted();
}
+/**
+ * Comparison function used by ewk_frame_text_matches_nth_pos_get
+ */
+static bool _ewk_frame_rect_cmp_less_than(const WebCore::IntRect& i, const WebCore::IntRect& j)
+{
+ return (i.y() < j.y() || (i.y() == j.y() && i.x() < j.x()));
+}
+
+/**
+ * Predicate used by ewk_frame_text_matches_nth_pos_get
+ */
+static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& i)
+{
+ return (i.x() < 0 || i.y() < 0);
+}
+
+/**
+ * Get x, y position of n-th text match in frame
+ *
+ * @param o frame object where matches are highlighted.
+ * @param n index of element
+ * @param x where to return x position. May be @c NULL.
+ * @param y where to return y position. May be @c NULL.
+ *
+ * @return @c EINA_TRUE on success, @c EINA_FALSE for failure - when no matches found or
+ * n bigger than search results.
+ */
+Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object* o, int n, int* x, int* y)
+{
+ EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
+
+ Vector<WebCore::IntRect> intRects = sd->frame->document()->markers()->renderedRectsForMarkers(WebCore::DocumentMarker::TextMatch);
+
+ /* remove useless values */
+ std::remove_if(intRects.begin(), intRects.end(), _ewk_frame_rect_is_negative_value);
+
+ if (intRects.isEmpty() || n > intRects.size())
+ return EINA_FALSE;
+
+ std::sort(intRects.begin(), intRects.end(), _ewk_frame_rect_cmp_less_than);
+
+ if (x)
+ *x = intRects[n - 1].x();
+ if (y)
+ *y = intRects[n - 1].y();
+ return EINA_TRUE;
+}
+
/**
* Ask frame to stop loading.
*
@@ -1687,12 +1737,6 @@ void ewk_frame_did_perform_first_navigation(Evas_Object *o)
*/
void ewk_frame_view_state_save(Evas_Object *o, WebCore::HistoryItem* item)
{
- const char *title = ewk_frame_title_get(o);
- const char *uri = ewk_frame_uri_get(o);
-
- item->setTitle(WTF::String::fromUTF8(title));
- item->setURLString(WTF::String::fromUTF8(uri));
-
evas_object_smart_callback_call(o, "state,save", 0);
}
diff --git a/WebKit/efl/ewk/ewk_frame.h b/WebKit/efl/ewk/ewk_frame.h
index 1a9fe81..9394446 100644
--- a/WebKit/efl/ewk/ewk_frame.h
+++ b/WebKit/efl/ewk/ewk_frame.h
@@ -160,6 +160,7 @@ EAPI unsigned int ewk_frame_text_matches_mark(Evas_Object *o, const char *string
EAPI Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object *o);
EAPI Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object *o, Eina_Bool highlight);
EAPI Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_frame_text_matches_nth_pos_get(Evas_Object *o, int n, int *x, int *y);
EAPI Eina_Bool ewk_frame_stop(Evas_Object *o);
EAPI Eina_Bool ewk_frame_reload(Evas_Object *o);
diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp
index 1cd5e42..8c27478 100644
--- a/WebKit/efl/ewk/ewk_main.cpp
+++ b/WebKit/efl/ewk/ewk_main.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "ewk_main.h"
+#include "appcache/ApplicationCacheStorage.h"
#include "EWebKit.h"
#include "Logging.h"
#include "PageCache.h"
@@ -36,6 +37,7 @@
#include <Eina.h>
#include <Evas.h>
#include <stdlib.h>
+#include <sys/stat.h>
#if ENABLE(GLIB_SUPPORT)
#include <glib-object.h>
@@ -56,6 +58,8 @@
static int _ewk_init_count = 0;
int _ewk_log_dom = -1;
+static Eina_Bool _ewk_init_body(void);
+
int ewk_init(void)
{
if (_ewk_init_count)
@@ -90,6 +94,44 @@ int ewk_init(void)
goto error_edje;
}
+ _ewk_init_body();
+
+ return ++_ewk_init_count;
+
+error_edje:
+ ecore_evas_shutdown();
+error_ecore_evas:
+ ecore_shutdown();
+error_ecore:
+ evas_shutdown();
+error_evas:
+ eina_log_domain_unregister(_ewk_log_dom);
+ _ewk_log_dom = -1;
+error_log_domain:
+ eina_shutdown();
+error_eina:
+ return 0;
+}
+
+int ewk_shutdown(void)
+{
+ _ewk_init_count--;
+ if (_ewk_init_count)
+ return _ewk_init_count;
+
+ ecore_evas_shutdown();
+ ecore_shutdown();
+ evas_shutdown();
+ eina_log_domain_unregister(_ewk_log_dom);
+ _ewk_log_dom = -1;
+ eina_shutdown();
+
+ return 0;
+}
+
+Eina_Bool _ewk_init_body(void)
+{
+
#if ENABLE(GLIB_SUPPORT)
g_type_init();
@@ -117,8 +159,24 @@ int ewk_init(void)
WebCore::pageCache()->setCapacity(3);
WebCore::PageGroup::setShouldTrackVisitedLinks(true);
- // set default location of web database path
- ewk_settings_web_database_path_set(getenv("HOME"));
+ // set default location of web database path and appcache dir
+ const char* home = getenv("HOME");
+ if (!home) // don't forget about the homeless
+ home = "/tmp"; // this directory must always exist
+
+ // anyway, check it first
+ struct stat state;
+ if (stat(home, &state) == -1) {
+ // Exit now - otherwise you may have some crash later
+ int errnowas = errno;
+ CRITICAL("Can't access HOME dir (or /tmp) - no place to save databases: %s", strerror(errnowas));
+ return EINA_FALSE;
+ }
+
+ WTF::String wkdir = WTF::String(home) + "/.webkit";
+ ewk_settings_web_database_path_set(wkdir.utf8().data());
+
+ WebCore::cacheStorage().setCacheDirectory(wkdir);
// TODO: this should move to WebCore, already reported to webkit-gtk folks:
#ifdef WTF_USE_SOUP
@@ -129,36 +187,6 @@ int ewk_init(void)
}
#endif
- return ++_ewk_init_count;
-
-error_edje:
- ecore_evas_shutdown();
-error_ecore_evas:
- ecore_shutdown();
-error_ecore:
- evas_shutdown();
-error_evas:
- eina_log_domain_unregister(_ewk_log_dom);
- _ewk_log_dom = -1;
-error_log_domain:
- eina_shutdown();
-error_eina:
- return 0;
-}
-
-int ewk_shutdown(void)
-{
- _ewk_init_count--;
- if (_ewk_init_count)
- return _ewk_init_count;
-
- ecore_evas_shutdown();
- ecore_shutdown();
- evas_shutdown();
- eina_log_domain_unregister(_ewk_log_dom);
- _ewk_log_dom = -1;
- eina_shutdown();
-
- return 0;
+ return EINA_TRUE;
}
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 4a100d7..ea54167 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "ewk_view.h"
+#include "appcache/ApplicationCacheStorage.h"
#include "ChromeClientEfl.h"
#include "ContextMenuClientEfl.h"
#include "ContextMenuController.h"
@@ -88,6 +89,7 @@ struct _Ewk_View_Private_Data {
const char* user_stylesheet;
const char* encoding_default;
const char* encoding_custom;
+ const char* cache_directory;
int font_minimum_size;
int font_minimum_logical_size;
int font_default_size;
@@ -108,6 +110,8 @@ struct _Ewk_View_Private_Data {
Eina_Bool private_browsing:1;
Eina_Bool caret_browsing:1;
Eina_Bool spatial_navigation:1;
+ Eina_Bool local_storage:1;
+ Eina_Bool offline_app_cache: 1;
struct {
float w;
float h;
@@ -560,6 +564,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->page_settings->setJavaScriptEnabled(true);
priv->page_settings->setPluginsEnabled(true);
priv->page_settings->setLocalStorageEnabled(true);
+ priv->page_settings->setOfflineWebApplicationCacheEnabled(true);
url = priv->page_settings->userStyleSheetLocation();
priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data());
@@ -568,6 +573,9 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
(priv->page_settings->defaultTextEncodingName().utf8().data());
priv->settings.encoding_custom = 0;
+ priv->settings.cache_directory = eina_stringshare_add
+ (WebCore::cacheStorage().cacheDirectory().utf8().data());
+
priv->settings.font_minimum_size = priv->page_settings->minimumFontSize();
priv->settings.font_minimum_logical_size = priv->page_settings->minimumLogicalFontSize();
priv->settings.font_default_size = priv->page_settings->defaultFontSize();
@@ -595,6 +603,8 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.resizable_textareas = priv->page_settings->textAreasAreResizable();
priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled();
priv->settings.caret_browsing = priv->page_settings->caretBrowsingEnabled();
+ priv->settings.local_storage = priv->page_settings->localStorageEnabled();
+ priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting
// Since there's no scale separated from zooming in webkit-efl, this functionality of
// viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -641,6 +651,7 @@ static void _ewk_view_priv_del(Ewk_View_Private_Data* priv)
eina_stringshare_del(priv->settings.user_stylesheet);
eina_stringshare_del(priv->settings.encoding_default);
eina_stringshare_del(priv->settings.encoding_custom);
+ eina_stringshare_del(priv->settings.cache_directory);
eina_stringshare_del(priv->settings.font_standard);
eina_stringshare_del(priv->settings.font_cursive);
eina_stringshare_del(priv->settings.font_monospace);
@@ -794,6 +805,9 @@ static void _ewk_view_smart_calculate(Evas_Object* o)
sd->changed.frame_rect = EINA_TRUE;
sd->view.w = w;
sd->view.h = h;
+
+ // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set).
+ evas_object_smart_callback_call(o, "view,resized", 0);
}
sd->changed.size = EINA_FALSE;
@@ -2385,6 +2399,26 @@ Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object* o, Eina_Bool enable
return EINA_TRUE;
}
+Eina_Bool ewk_view_setting_offline_app_cache_get(const Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.offline_app_cache;
+}
+
+Eina_Bool ewk_view_setting_offline_app_cache_set(Evas_Object* o, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ enable = !!enable;
+ if (priv->settings.offline_app_cache != enable) {
+ priv->page_settings->setOfflineWebApplicationCacheEnabled(enable);
+ priv->settings.offline_app_cache = enable;
+ }
+ return EINA_TRUE;
+}
+
+
Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
@@ -2465,6 +2499,22 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco
return EINA_TRUE;
}
+const char* ewk_view_setting_cache_directory_get(const Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
+ return priv->settings.cache_directory;
+}
+
+Eina_Bool ewk_view_setting_cache_directory_set(Evas_Object* o, const char* path)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ if (eina_stringshare_replace(&priv->settings.cache_directory, path))
+ WebCore::cacheStorage().setCacheDirectory(WTF::String::fromUTF8(path));
+ return EINA_TRUE;
+}
+
int ewk_view_setting_font_minimum_size_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
@@ -2665,6 +2715,37 @@ Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enab
}
/**
+ * Gets if the local storage is enabled.
+ *
+ * @param o view object to set if local storage is enabled.
+ * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not.
+ */
+Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.local_storage;
+}
+
+/**
+ * Sets the local storage of HTML5.
+ *
+ * @param o view object to set if local storage is enabled.
+ * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
+ */
+Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ enable = !!enable;
+ if (priv->settings.local_storage != enable) {
+ priv->page_settings->setLocalStorageEnabled(enable);
+ priv->settings.local_storage = enable;
+ }
+ return EINA_TRUE;
+}
+
+/**
* Similar to evas_object_smart_data_get(), but does type checking.
*
* @param o view object to query internal data.
@@ -2769,7 +2850,7 @@ void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data* priv)
ERR("no main frame view");
return;
}
- v->layoutIfNeededRecursive();
+ v->updateLayoutAndStyleIfNeededRecursive();
}
void ewk_view_scrolls_process(Ewk_View_Smart_Data* sd)
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index 9d5997c..c5d2d45 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -88,6 +88,7 @@ extern "C" {
* - "icon,received", void: main frame received an icon.
* - "viewport,changed", void: Report that viewport has changed.
* - "inputmethods,changed" with a boolean indicating whether it's enabled or not.
+ * - "view,resized", void: view object's size has changed.
*/
typedef struct _Ewk_View_Smart_Data Ewk_View_Smart_Data;
@@ -403,6 +404,8 @@ EAPI Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object *o, const cha
EAPI Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object *o, Eina_Bool enable);
+EAPI Eina_Bool ewk_view_setting_offline_app_cache_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_view_setting_offline_app_cache_set(Evas_Object *o, Eina_Bool enable);
EAPI Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object *o, Eina_Bool enable);
@@ -411,6 +414,8 @@ EAPI const char *ewk_view_setting_encoding_custom_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object *o, const char *encoding);
EAPI const char *ewk_view_setting_encoding_default_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object *o, const char *encoding);
+EAPI const char *ewk_view_setting_cache_directory_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_view_setting_cache_directory_set(Evas_Object *o, const char *path);
EAPI int ewk_view_setting_font_minimum_size_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object *o, int size);
@@ -442,6 +447,9 @@ EAPI Eina_Bool ewk_view_setting_font_sans_serif_set(Evas_Object *o, const cha
EAPI Eina_Bool ewk_view_setting_spatial_navigation_get(Evas_Object* o);
EAPI Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enable);
+EAPI Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o);
+EAPI Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable);
+
/* to be used by subclass implementations */
EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 4073840..8098b7f 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,118 @@
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_expose_event):
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Isolate all GTK+ typedefs into one file
+ https://bugs.webkit.org/show_bug.cgi?id=44900
+
+ * WebCoreSupport/EditorClientGtk.h: Remove GTK+ typedefs.
+ * WebCoreSupport/FullscreenVideoController.h: Ditto.
+
+2010-08-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ Preparations for the 1.3.4 release.
+
+ * NEWS:
+ * docs/webkitgtk-docs.sgml:
+
+2010-08-31 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Minor documentation typo fix.
+
+ * webkit/webkitwebview.cpp:
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [Gtk] gdk_display_get_core_pointer and gdk_device_get_core_pointer
+ are deprecated
+ https://bugs.webkit.org/show_bug.cgi?id=44787
+
+ We have replaced GtkVersioning.cpp with GtkVersioning.c and
+ created a function (getDefaultGDKPointerDevice) to get the pointer
+ of the window with the new APIs. We added that function to DRT and
+ copyandpaste unit test.
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback):
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ (WebKit::InspectorFrontendClient::disconnectFromBackend):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::notifyWebViewDestroyed):
+ (WebKit::InspectorFrontendClient::destroyInspectorWindow):
+ (WebKit::InspectorFrontendClient::closeWindow):
+ (WebKit::InspectorFrontendClient::disconnectFromBackend):
+ * WebCoreSupport/InspectorClientGtk.h:
+
+2010-08-26 Gustavo Noronha Silva <gns@gnome.org>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] WebKitGTK+ needs proper introspection annotation for most types and methods
+ https://bugs.webkit.org/show_bug.cgi?id=44565
+
+ Add documentation and introspection specific information to a few
+ getter and setter methods.
+
+ * webkit/webkitwebview.cpp:
+
2010-08-25 Martin Robinson <mrobinson@igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS
index b99e2a1..402c07c 100644
--- a/WebKit/gtk/NEWS
+++ b/WebKit/gtk/NEWS
@@ -1,4 +1,19 @@
================
+WebKitGTK+ 1.3.4
+================
+
+What's new in WebKitGTK+ 1.3.4?
+
+ - Fixes to compile with latest GTK+ changes.
+ - File reader/writer APIs are now enabled.
+ - The javascript JIT is now enabled by default on ARM.
+ - Clipboard data is no longer lost when the process exists.
+ - Image DnD support.
+ - GSettings support to save/restore Web Inspector settings.
+ - Fullscreen support for HTML5 media player.
+ - Many other bugfixes.
+
+================
WebKitGTK+ 1.3.3
================
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index efb734f..f9ff82e 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -39,8 +39,6 @@
#include <wtf/gobject/GRefPtr.h>
typedef struct _WebKitWebView WebKitWebView;
-typedef struct _GtkWidget GtkWidget;
-typedef char gchar;
namespace WebCore {
class Frame;
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
index 1567d9b..9ff1e6a 100644
--- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
@@ -27,13 +27,6 @@
#include "HTMLMediaElement.h"
#include <wtf/RefPtr.h>
-typedef struct _GtkObject GtkObject;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkAction GtkAction;
-typedef struct _GdkCursor GdkCursor;
-typedef struct _GdkEventConfigure GdkEventConfigure;
-
-
class FullscreenVideoController : public Noncopyable {
public:
FullscreenVideoController();
diff --git a/WebKit/gtk/docs/webkitgtk-docs.sgml b/WebKit/gtk/docs/webkitgtk-docs.sgml
index c6539af..0852c7d 100644
--- a/WebKit/gtk/docs/webkitgtk-docs.sgml
+++ b/WebKit/gtk/docs/webkitgtk-docs.sgml
@@ -114,4 +114,13 @@
<index id="index-1.3.1" role="1.3.1">
<title>Index of new symbols in 1.3.1</title>
</index>
+ <index id="index-1.3.2" role="1.3.2">
+ <title>Index of new symbols in 1.3.2</title>
+ </index>
+ <index id="index-1.3.3" role="1.3.3">
+ <title>Index of new symbols in 1.3.3</title>
+ </index>
+ <index id="index-1.3.4" role="1.3.4">
+ <title>Index of new symbols in 1.3.4</title>
+ </index>
</book>
diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog
index 309ba09..3665005 100644
--- a/WebKit/gtk/po/ChangeLog
+++ b/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,85 @@
+2010-08-31 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66519.
+ http://trac.webkit.org/changeset/66519
+ https://bugs.webkit.org/show_bug.cgi?id=44973
+
+ Broke GTK+. (Requested by kov on #webkit).
+
+ * cs.po:
+ * de.po:
+ * en_GB.po:
+ * es.po:
+ * et.po:
+ * gl.po:
+ * gu.po:
+ * he.po:
+ * it.po:
+ * lt.po:
+ * lv.po:
+ * nb.po:
+ * nl.po:
+ * pa.po:
+ * pt.po:
+ * pt_BR.po:
+ * ru.po:
+ * sl.po:
+ * sr.po:
+ * sr@latin.po:
+ * sv.po:
+ * uk.po:
+ * vi.po:
+ * zh_CN.po:
+
+2010-08-31 Gustavo Noronha Silva <gns@gnome.org>
+
+ Refreshed all po files with the latest potfile.
+
+ * cs.po:
+ * de.po:
+ * en_GB.po:
+ * es.po:
+ * et.po:
+ * gl.po:
+ * gu.po:
+ * he.po:
+ * it.po:
+ * lt.po:
+ * lv.po:
+ * nb.po:
+ * nl.po:
+ * pa.po:
+ * pt.po:
+ * pt_BR.po:
+ * ru.po:
+ * sl.po:
+ * sr.po:
+ * sr@latin.po:
+ * sv.po:
+ * uk.po:
+ * vi.po:
+ * zh_CN.po:
+
+2010-08-31 Jorge González <aloriel@gmail.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Spanish translation for trunk
+ https://bugs.webkit.org/show_bug.cgi?id=44395
+
+ * es.po: Updated.
+
+2010-08-31 Kjartan Maraas <kmaraas@gnome.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ WebKitGTK+ translation needed
+ https://bugzilla.gnome.org/show_bug.cgi?id=610099
+
+ Initial Norwegian (bokmal) translation.
+
+ * nb.po: Added.
+
2010-08-19 Philippe Normand <pnormand@igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/po/es.po b/WebKit/gtk/po/es.po
index 433c9de..83ad6bf 100644
--- a/WebKit/gtk/po/es.po
+++ b/WebKit/gtk/po/es.po
@@ -1,15 +1,15 @@
# translation of webkit.po to Español
# This file is put in the public domain.
-# Jorge González <jorgegonz@svn.gnome.org>, 2010.
+# Jorge González González <aloriel@gmail.com>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: webkit\n"
"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2010-05-01 11:18+0200\n"
-"Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n"
-"Language-Team: Español <gnome-es-list@gnome.org>\n"
+"PO-Revision-Date: 2010-08-22 12:03+0200\n"
+"Last-Translator: Jorge González González <aloriel@gmail.com>\n"
+"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -267,7 +267,7 @@ msgstr "Perfilar el JavaScript ejecutado."
#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
msgid "Enable Timeline profiling"
-msgstr ""
+msgstr "Activar perfilado de tiempo"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
msgid "Profile the WebCore instrumentation."
@@ -512,11 +512,12 @@ msgstr ""
#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
msgid "Enable Caret Browsing"
-msgstr ""
+msgstr "Activar navegación por cursor"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
msgid "Whether to enable accesibility enhanced keyboard navigation"
msgstr ""
+"Indica si activar la mejora de accesibilidad para navegación por teclado"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
msgid "Enable HTML5 Database"
@@ -528,11 +529,11 @@ msgstr "Indica si se debe activar el soporte para la base de datos de HTML5"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
msgid "Enable HTML5 Local Storage"
-msgstr ""
+msgstr "Activar almacén local de HTML5"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
msgid "Whether to enable HTML5 Local Storage support"
-msgstr ""
+msgstr "Indica si activar el soporte de almacén local de HTML5"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
msgid "Enable XSS Auditor"
@@ -552,19 +553,19 @@ msgstr ""
#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
msgid "JavaScript can open windows automatically"
-msgstr ""
+msgstr "JavaScript puede abrir ventanas automáticamente"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
msgid "Whether JavaScript can open windows automatically"
-msgstr ""
+msgstr "Indica si JavaScript puede abrir ventanas automáticamente"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
msgid "Enable offline web application cache"
-msgstr ""
+msgstr "Activar la caché de aplicación fuera de línea"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
msgid "Whether to enable offline web application cache"
-msgstr ""
+msgstr "Indica si activar la caché de aplicación web fuera de línea"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
msgid "Editing behavior"
@@ -631,6 +632,8 @@ msgstr "Autoredimensionar ventana"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
msgid "Automatically resize the toplevel window when a page requests it"
msgstr ""
+"Redimensionar automáticamente la ventana de nivel superior cuando una página "
+"lo solicita"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
msgid "Enable Java Applet"
@@ -740,7 +743,7 @@ msgstr "Icono de URI"
#: WebKit/gtk/webkit/webkitwebview.cpp:2521
msgid "The URI for the favicon for the #WebKitWebView."
-msgstr ""
+msgstr "El URI para el icono favorito para #WebKitWebView."
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
@@ -935,7 +938,7 @@ msgstr "silenciar"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
msgid "unmute"
-msgstr ""
+msgstr "dar voz"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
msgid "play"
@@ -1011,11 +1014,11 @@ msgstr ""
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "begin playback"
-msgstr ""
+msgstr "comenzar la reproducción"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
msgid "pause playback"
-msgstr ""
+msgstr "pausar la reproducción"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
msgid "movie time scrubber"
@@ -1039,7 +1042,7 @@ msgstr ""
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
msgid "number of seconds of movie remaining"
-msgstr ""
+msgstr "número de segundos restantes de la película"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
msgid "current movie status"
diff --git a/WebKit/gtk/po/nb.po b/WebKit/gtk/po/nb.po
new file mode 100644
index 0000000..fdfa753
--- /dev/null
+++ b/WebKit/gtk/po/nb.po
@@ -0,0 +1,1104 @@
+# Norwegian bokmål translation of Epiphany
+# Copyright (C) 2000-2003, 2005 Free Software Foundation, Inc.
+# Ola Sverre Bauge <osb@plover.net>, 2000.
+# Kjartan Maraas <kmaraas@gnome.org>, 2000-2010.
+# Roy-Magne Mo <rmo@sunnmore.net>, 2001.
+# Terance Edward Sola <terance@lyse.net>, 2005.
+# Øivind Hoel <ohoel@cvs.gnome.org>, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: epiphany 2.29.x\n"
+"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
+"POT-Creation-Date: 2010-02-25 15:53-0300\n"
+"PO-Revision-Date: 2010-04-05 14:36+0200\n"
+"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
+"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
+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 ""
+
+# (ugh)
+#: WebKit/gtk/webkit/webkitdownload.cpp:329
+msgid "Progress"
+msgstr "Fremdrift"
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:330
+msgid "Determines the current progress of the download"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitdownload.cpp:343
+msgid "Status"
+msgstr "Status"
+
+#: 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 "Total størrelse"
+
+#: 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 "Brukernavn:"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:293
+msgid "Password:"
+msgstr "Passord:"
+
+#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
+msgid "_Remember password"
+msgstr "Husk passo_rd"
+
+#: WebKit/gtk/webkit/webkitwebframe.cpp:298
+msgid "Name"
+msgstr "Navn"
+
+#: 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 "Tittel"
+
+#: 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 "URI"
+
+#: 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
+#, fuzzy
+msgid "The title of the history item"
+msgstr "Sideinformasjon som vises i historikkvisning"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
+msgid "Alternate Title"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
+#, fuzzy
+msgid "The alternate title of the history item"
+msgstr "Sideinformasjon som vises i historikkvisning"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:179
+#, fuzzy
+msgid "The URI of the history item"
+msgstr "Åpne historikkvinduet"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:194
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:173
+msgid "Original URI"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:195
+#, fuzzy
+msgid "The original URI of the history item"
+msgstr "Sideinformasjon som vises i historikkvisning"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:210
+#, fuzzy
+msgid "Last visited Time"
+msgstr "Oftest besøkt"
+
+#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:211
+msgid "The time at which the history item was last visited"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:268
+#, fuzzy
+msgid "Web View"
+msgstr "_Vis"
+
+#: 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 "Aktiver profilering av JavaScript"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:300
+msgid "Profile the executed JavaScript."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
+#, fuzzy
+msgid "Enable Timeline profiling"
+msgstr "Aktiver myk rulling"
+
+#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
+msgid "Profile the WebCore instrumentation."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
+msgid "Reason"
+msgstr "Årsak"
+
+#: 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 "Knapp"
+
+#: 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 "Forvalgt koding"
+
+#: 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 "Forvalgt skriftfamilie"
+
+#: 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 "Forvalgt skriftstørrelse"
+
+#: 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 "Minste skriftstørrelse"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:319
+msgid "The minimum font size used to display text."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:327
+#, fuzzy
+msgid "Minimum Logical Font Size"
+msgstr "Minste skriftstørrelse"
+
+#: 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 "Skriv ut bakgrunn"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:375
+#, fuzzy
+msgid "Whether background images should be printed."
+msgstr "Om bakgrunnsbilder skal skrives ut"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:383
+msgid "Enable Scripts"
+msgstr "Slå på JavaScript"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:384
+msgid "Enable embedded scripting languages."
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:392
+msgid "Enable Plugins"
+msgstr "Aktiver tillegg"
+
+#: 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
+#, fuzzy
+msgid "User Stylesheet URI"
+msgstr "Bruk egendefinert _stilark"
+
+#: 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 "Slå på privat nettlesing"
+
+#: 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
+#, fuzzy
+msgid "Enable Caret Browsing"
+msgstr "Aktiver myk rulling"
+
+#: 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
+#, fuzzy
+msgid "Whether to enable teh XSS auditor"
+msgstr "Om bakgrunnen skal skrives ut"
+
+#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
+msgid "User Agent"
+msgstr "Brukeragent"
+
+#: 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 "Slå på Java-applet"
+
+#: 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
+#, fuzzy
+msgid "Paste target list"
+msgstr "Lim inn utklippstavlen"
+
+#: 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 "Innstillinger"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2368
+msgid "An associated WebKitWebSettings instance"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2381
+msgid "Web Inspector"
+msgstr "Inspeksjon av nettsider"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2382
+msgid "The associated WebKitWebInspector instance"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2402
+msgid "Editable"
+msgstr "Redigerbar"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2403
+#, fuzzy
+msgid "Whether content can be modified by the user"
+msgstr "Bruk koding som spesifisert av dokumentet"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2409
+msgid "Transparent"
+msgstr "Gjennomsiktig"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2410
+#, fuzzy
+msgid "Whether content has a transparent background"
+msgstr "Om bakgrunnen skal skrives ut"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2423
+msgid "Zoom level"
+msgstr "Zoom-nivå"
+
+#: 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 "Koding"
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2454
+msgid "The default encoding of the web view"
+msgstr ""
+
+#: WebKit/gtk/webkit/webkitwebview.cpp:2467
+#, fuzzy
+msgid "Custom Encoding"
+msgstr "Tekstkoding"
+
+#: 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 "Send inn"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:65
+msgid "Reset"
+msgstr "Nullstill"
+
+#: 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 "Velg fil"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:80
+msgid "(None)"
+msgstr "(Ingen)"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:85
+msgid "Open Link in New _Window"
+msgstr "Åpne lenke i nytt _vindu"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:90
+#, fuzzy
+msgid "_Download Linked File"
+msgstr "Last ne_d lenke"
+
+#: 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 "Åpne b_ilde i nytt vindu"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:105
+msgid "Sa_ve Image As"
+msgstr "La_gre bilde som"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:110
+msgid "Cop_y Image"
+msgstr "Kop_ier bilde"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:115
+#, fuzzy
+msgid "Open _Frame in New Window"
+msgstr "Åpne i nytt _vindu"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:166
+msgid "_Reload"
+msgstr "_Last om"
+
+#: 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 "_Søk på nettet"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:203
+msgid "_Look Up in Dictionary"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:208
+msgid "_Open Link"
+msgstr "_Åpne lenke"
+
+#: 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 "_Sjekk dokumentet nå"
+
+#: 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 "Skri_ft"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:266
+msgid "_Outline"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
+msgid "Inspect _Element"
+msgstr "Inspiser _element"
+
+#: 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
+#, fuzzy
+msgid "term"
+msgstr "Andre"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:296
+msgid "definition"
+msgstr "definisjon"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:301
+#, fuzzy
+msgid "press"
+msgstr "Adresse"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:306
+msgid "select"
+msgstr "velg"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:311
+msgid "activate"
+msgstr "slå på"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:316
+msgid "uncheck"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:321
+msgid "check"
+msgstr "sjekk"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:326
+msgid "jump"
+msgstr "hopp"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:342
+msgid " files"
+msgstr " filer"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:347
+msgid "Unknown"
+msgstr "Ukjent"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
+msgid "Loading..."
+msgstr "Laster..."
+
+#: 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 "demp"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
+msgid "unmute"
+msgstr ""
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
+msgid "play"
+msgstr "spill av"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
+msgid "pause"
+msgstr "pause"
+
+#: 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 "tilbake 30 sekunder"
+
+#: 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 "gjenstående tid"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
+msgid "status"
+msgstr "status"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
+msgid "fullscreen"
+msgstr "fullskjerm"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
+#, fuzzy
+msgid "fast forward"
+msgstr "_Fremover"
+
+#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
+#, fuzzy
+msgid "fast reverse"
+msgstr "Tidligere utviklere:"
+
+#: 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
+#, fuzzy
+msgid "Play movie in fullscreen mode"
+msgstr "Lås i fullskjermmodus"
+
+#: 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/testcopyandpaste.c b/WebKit/gtk/tests/testcopyandpaste.c
index 58fb764..5e3f5e7 100644
--- a/WebKit/gtk/tests/testcopyandpaste.c
+++ b/WebKit/gtk/tests/testcopyandpaste.c
@@ -25,7 +25,6 @@
#include <JavaScriptCore/JSStringRef.h>
#include <JavaScriptCore/JSContextRef.h>
-
#if GTK_CHECK_VERSION(2, 14, 0)
typedef struct {
@@ -134,8 +133,10 @@ static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef functio
event->key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture->webView));
g_object_ref(event->key.window);
#ifndef GTK_API_VERSION_2
- gdk_event_set_device(event, gdk_device_get_associated_device(gdk_display_get_core_pointer(gdk_drawable_get_display(event->key.window))));
+ GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_drawable_get_display(event->key.window));
+ gdk_event_set_device(event, gdk_device_manager_get_client_pointer(manager));
#endif
+
GdkKeymapKey* keys;
gint n_keys;
if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), event->key.keyval, &keys, &n_keys)) {
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 76fe6cb..98f8e4e 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -519,7 +519,7 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose*
Frame* frame = core(webView)->mainFrame();
if (frame->contentRenderer() && frame->view()) {
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
cairo_t* cr = gdk_cairo_create(event->window);
GraphicsContext ctx(cr);
@@ -3193,6 +3193,18 @@ bool webkit_web_view_use_primary_for_paste(WebKitWebView* webView)
return webView->priv->usePrimaryForPaste;
}
+/**
+ * webkit_web_view_set_settings:
+ * @web_view: a #WebKitWebView
+ * @settings: (transfer none): the #WebKitWebSettings to be set
+ *
+ * Replaces the #WebKitWebSettings instance that is currently attached
+ * to @web_view with @settings. The reference held by the @web_view on
+ * the old #WebKitWebSettings instance is dropped, and the reference
+ * count of @settings is inscreased.
+ *
+ * The settings are automatically applied to @web_view.
+ */
void webkit_web_view_set_settings(WebKitWebView* webView, WebKitWebSettings* webSettings)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
@@ -3208,6 +3220,19 @@ void webkit_web_view_set_settings(WebKitWebView* webView, WebKitWebSettings* web
g_object_notify(G_OBJECT(webView), "settings");
}
+/**
+ * webkit_web_view_get_settings:
+ * @web_view: a #WebKitWebView
+ *
+ * Obtains the #WebKitWebSettings associated with the
+ * #WebKitWebView. The #WebKitWebView always has an associated
+ * instance of #WebKitWebSettings. The reference that is returned by
+ * this call is owned by the #WebKitWebView. You may need to increase
+ * its reference count if you intend to keep it alive for longer than
+ * the #WebKitWebView.
+ *
+ * Return value: (transfer none): the #WebKitWebSettings instance
+ */
WebKitWebSettings* webkit_web_view_get_settings(WebKitWebView* webView)
{
g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), NULL);
@@ -3226,9 +3251,7 @@ WebKitWebSettings* webkit_web_view_get_settings(WebKitWebView* webView)
* so this function will only return NULL if the argument is not a
* valid #WebKitWebView.
*
- * Returns: the #WebKitWebInspector instance associated with the
- * #WebKitWebView; %NULL is only returned if the argument is not a
- * valid #WebKitWebView.
+ * Return value: (transfer none): the #WebKitWebInspector instance.
*
* Since: 1.0.3
*/
@@ -3263,7 +3286,7 @@ static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWe
* Returns the instance of #WebKitWebWindowFeatures held by the given
* #WebKitWebView.
*
- * Return value: the #WebKitWebWindowFeatures
+ * Return value: (transfer none): the #WebKitWebWindowFeatures
*
* Since: 1.0.3
*/
@@ -3329,7 +3352,7 @@ void webkit_web_view_set_maintains_back_forward_list(WebKitWebView* webView, gbo
* webkit_web_view_get_back_forward_list:
* @web_view: a #WebKitWebView
*
- * Obtains the #WebKitBackForwardList associated with the given #WebKitWebView. The
+ * Obtains the #WebKitWebBackForwardList associated with the given #WebKitWebView. The
* #WebKitWebBackForwardList is owned by the #WebKitWebView.
*
* Return value: (transfer none): the #WebKitWebBackForwardList
diff --git a/WebKit/mac/Carbon/HIViewAdapter.m b/WebKit/mac/Carbon/HIViewAdapter.m
index d11bea4..565be4f 100644
--- a/WebKit/mac/Carbon/HIViewAdapter.m
+++ b/WebKit/mac/Carbon/HIViewAdapter.m
@@ -30,6 +30,7 @@
#import "HIViewAdapter.h"
+#import "QuickDrawCompatibility.h"
#import "WebNSObjectExtras.h"
#import <wtf/Assertions.h>
diff --git a/WebKit/mac/Carbon/HIWebView.mm b/WebKit/mac/Carbon/HIWebView.mm
index b461394..a3cdc66 100644
--- a/WebKit/mac/Carbon/HIWebView.mm
+++ b/WebKit/mac/Carbon/HIWebView.mm
@@ -32,11 +32,11 @@
#import "CarbonWindowAdapter.h"
#import "HIViewAdapter.h"
+#import "QuickDrawCompatibility.h"
#import "WebHTMLViewInternal.h"
#import "WebKit.h"
-
-#import <objc/objc-runtime.h>
#import <WebKitSystemInterface.h>
+#import <objc/objc-runtime.h>
@interface NSWindow (AppKitSecretsHIWebViewKnows)
- (void)_removeWindowRef;
@@ -351,7 +351,7 @@ Draw( HIWebView* inView, RgnHandle limitRgn, CGContextRef inContext )
NSView <WebDocumentView> *documentView = [[[inView->fWebView mainFrame] frameView] documentView];
if ([documentView isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)documentView _web_layoutIfNeededRecursive];
+ [(WebHTMLView *)documentView _web_updateLayoutAndStyleIfNeededRecursive];
if ( inView->fIsComposited )
[inView->fWebView displayIfNeededInRect: *(NSRect*)&hiRect];
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 565b1b0..88a2fbf 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,265 @@
+2010-09-01 Jia Pu <jpu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add support for autocorrection UI on Mac OS X.
+ https://bugs.webkit.org/show_bug.cgi?id=44958
+ <rdar://problem/7326847>
+
+ See detailed high level description in WebCore/ChangeLog.
+
+ * WebCoreSupport/WebEditorClient.h: Added new member methods declared in
+ EditorClient. Added m_correctionPanelTag to store the ID of current autocorrection UI object.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::WebEditorClient): Initialize m_correctionPanelTag.
+ (WebEditorClient::~WebEditorClient): Make sure the autocorrection UI is
+ dismissed before destroying the object.
+ (WebEditorClient::respondToChangedSelection): Dismiss autocorrection UI whenever the selection changes.
+ (WebEditorClient::showCorrectionPanel): Show autocorrection UI.
+ (WebEditorClient::dismissCorrectionPanel): Dismiss autocorrection UI.
+
+2010-09-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ <rdar://problem/8374711> WebKit needs to compile without access to QuickDraw private headers.
+
+ * Carbon/HIViewAdapter.m:
+ * Carbon/HIWebView.mm:
+ * Misc/QuickDrawCompatibility.h: Added.
+ * Plugins/WebNetscapePluginView.mm:
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ Eliminate Mac-specific code for style re-application and recursive layout/style updating in
+ favor of the cross-platform code that all the other ports use.
+
+ * Carbon/HIWebView.mm:
+ (Draw):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::forceLayout):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
+ (-[WebHTMLView viewWillDraw]):
+ (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
+ (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
+ (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
+ (-[WebHTMLView reapplyStyles]):
+ (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView setNeedsToApplyStyles:]):
+ (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]):
+ (-[WebHTMLView _layoutIfNeeded]):
+ (-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]):
+ * WebView/WebHTMLViewInternal.h:
+ * WebView/WebView.mm:
+ (-[WebView _viewWillDrawInternal]):
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add ability to count text matches without marking
+ https://bugs.webkit.org/show_bug.cgi?id=43996
+
+ Safari needs to be able to count text matches without triggering lots of repainting.
+ Rename markAllMatchesForText: to countMatchesForText: and add a markMatches:
+ parameter. For backwards compatibility markAllMatchesForText: calls
+ countMatchesForText: and passes YES for markMatches:.
+
+ * WebView/WebDocumentInternal.h:
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
+ (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
+ (-[WebPDFView countMatchesForText:caseSensitive:limit:markMatches:]):
+ * WebView/WebView.mm:
+ (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
+ (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
+ * WebView/WebViewPrivate.h:
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * WebInspector/WebInspectorFrontend.mm:
+ (-[WebInspectorFrontend initWithFrontendClient:]): Remove a stray semicolon.
+
+2010-08-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/8369736> WebKit build fails.
+
+ Temporarily add some extra includes in order to get things building again until <rdar://problem/8374711> is addressed.
+
+ * Carbon/HIViewAdapter.m:
+ * Carbon/HIWebView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+
+2010-08-30 Andy Estes <aestes@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (r66156): Sites using AppleConnect for authentication fail to log in.
+ https://bugs.webkit.org/show_bug.cgi?id=44865
+
+ After http://trac.webkit.org/changeset/66156, sites using the AppleConnect plug-in
+ for authentication fail to log in. This is due to a bug in AppleConnect that r66156
+ exposed, but since this will have a significant impact on users of WebKit nightly
+ builds, a plugin-specific hack should be added while the underlying issue is being
+ addressed.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin): Convert plug-in parameter names to lowercase
+ if the plugin is of type 'application/x-snkp'.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ text/plain non-video files cause <video> to hang (while reading them?)
+ https://bugs.webkit.org/show_bug.cgi?id=44212
+
+ Add the new WebKitSystemInterface function WKQTMovieDisableComponent to
+ the initialization routine.
+
+ * WebCoreSupport/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface): Initialize WKQTMovieDisableComponent.
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-08-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make an internal method used by Apple Mail into SPI
+ https://bugs.webkit.org/show_bug.cgi?id=44832
+ rdar://problem/5748951
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Moved this method
+ from the internal section to the private section.
+ * WebView/WebFrameInternal.h: Moved the method declaration out of here.
+ * WebView/WebFramePrivate.h: Moved the method declaration in here.
+
+2010-08-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+
+ Added chrome client overrides which support entering and exiting full screen. A new preference has
+ been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled
+ (defaults to disabled). Added a new WebKitFullScreenListener callback object which notifies WebCore
+ when the chrome has started/finished its full screen animation.
+
+ * Configurations/FeatureDefines.xcconfig:
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::supportsFullscreenForElement):
+ (WebChromeClient::enterFullscreenForElement):
+ (WebChromeClient::exitFullscreenForElement):
+ (-[WebKitFullScreenListener initWithElement:]):
+ (-[WebKitFullScreenListener webkitWillEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitDidEnterFullScreen]):
+ (-[WebKitFullScreenListener webkitWillExitFullScreen]):
+ (-[WebKitFullScreenListener webkitDidExitFullScreen]):
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences setFullScreenEnabled:]):
+ (-[WebPreferences fullScreenEnabled]):
+ * WebView/WebUIDelegatePrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-27 David Hyatt <hyatt@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44788, implement HTML5-compliant doctype switching.
+
+ Rename the various modes to match the HTML5 specification:
+ ParseMode -> CompatibilityMode
+ CompatMode -> QuirksMode
+ AlmostStrictMode -> LimitedQuirksMode
+ StrictMode -> NoQuirksMode
+
+ Remove the htmlHacks() accessor from RenderStyle and make rendering code just go to the document
+ instead. This makes switching modes avoid forcing all RenderStyles to detect as changed.
+
+ Clean up user stylesheets to minimize style recalculation when the mode is switched.
+
+ Fix bugs with the propagation of correct modes in the HTML5 parser. Make sure the
+ dummy document created for fragment parsing properly inherits the real document's CompatibilityMode.
+ Make sure the tree builder properly changes the insertion mode to "BeforeHTML" after handling
+ a doctype token.
+
+ determineParseMode -> setCompatibilityModeFromDoctype, and it now implements the HTML5 algorithm
+ precisely.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (-[WebInspectorWindowController windowShouldClose:]):
+ (-[WebInspectorWindowController destroyInspectorView:]):
+
2010-08-24 Eric Seidel <eric@webkit.org>
Reviewed by Adam Barth.
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index f2b4c09..8f8c213 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -71,6 +71,7 @@ ENABLE_FILTERS_macosx = ENABLE_FILTERS;
ENABLE_FILE_WRITER = ;
ENABLE_FILE_SYSTEM = ;
+ENABLE_FULLSCREEN_API = ENABLE_FULLSCREEN_API;
ENABLE_GEOLOCATION = ENABLE_GEOLOCATION;
ENABLE_ICONDATABASE = $(ENABLE_ICONDATABASE_$(REAL_PLATFORM_NAME));
@@ -120,4 +121,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_WRITER) $(ENABLE_FILE_SYSTEM) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_WRITER) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index deb52b6..659ac62 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 6;
+MINOR_VERSION = 7;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/Misc/QuickDrawCompatibility.h b/WebKit/mac/Misc/QuickDrawCompatibility.h
new file mode 100644
index 0000000..1a4ff99
--- /dev/null
+++ b/WebKit/mac/Misc/QuickDrawCompatibility.h
@@ -0,0 +1,96 @@
+/*
+ * 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 QuickDrawCompatibility_h
+#define QuickDrawCompatibility_h
+
+#ifndef __LP64__
+
+#import <Carbon/Carbon.h>
+
+#if defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MacSetRect SetRect
+#define MacSetRectRgn SetRectRgn
+#define MacUnionRgn UnionRgn
+
+extern Boolean EmptyRgn(RgnHandle);
+extern OSStatus CreateCGContextForPort(CGrafPtr, CGContextRef*);
+extern OSStatus SyncCGContextOriginWithPort(CGContextRef, CGrafPtr);
+extern PixMapHandle GetPortPixMap(CGrafPtr);
+extern QDErr NewGWorldFromPtr(GWorldPtr*, UInt32, const Rect*, CTabHandle, GDHandle, GWorldFlags, Ptr, SInt32);
+extern Rect* GetPortBounds(CGrafPtr, Rect*);
+extern Rect* GetRegionBounds(RgnHandle, Rect*);
+extern RgnHandle GetPortClipRegion(CGrafPtr, RgnHandle);
+extern RgnHandle GetPortVisibleRegion(CGrafPtr, RgnHandle);
+extern RgnHandle NewRgn();
+extern void BackColor(long);
+extern void DisposeGWorld(GWorldPtr);
+extern void DisposeRgn(RgnHandle);
+extern void ForeColor(long);
+extern void GetGWorld(CGrafPtr*, GDHandle*);
+extern void GetPort(GrafPtr*);
+extern void GlobalToLocal(Point*);
+extern void MacSetRect(Rect*, short, short, short, short);
+extern void MacSetRectRgn(RgnHandle, short, short, short, short);
+extern void MacUnionRgn(RgnHandle, RgnHandle, RgnHandle);
+extern void MovePortTo(short, short);
+extern void OffsetRect(Rect*, short, short);
+extern void OffsetRgn(RgnHandle, short, short);
+extern void PaintRect(const Rect*);
+extern void PenNormal();
+extern void PortSize(short, short);
+extern void RectRgn(RgnHandle, const Rect*);
+extern void SectRgn(RgnHandle, RgnHandle, RgnHandle);
+extern void SetGWorld(CGrafPtr, GDHandle);
+extern void SetOrigin(short, short);
+extern void SetPort(GrafPtr);
+extern void SetPortClipRegion(CGrafPtr, RgnHandle);
+extern void SetPortVisibleRegion(CGrafPtr, RgnHandle);
+
+enum {
+ k16BE555PixelFormat = 0x00000010,
+ k32ARGBPixelFormat = 0x00000020,
+ k16LE555PixelFormat = 'L555',
+ k32BGRAPixelFormat = 'BGRA',
+
+ blackColor = 33,
+ whiteColor = 30,
+ greenColor = 341,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+
+#endif // __LP64__
+
+#endif // QuickDrawCompatibility_h
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 10a3187..a4481bc 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -30,6 +30,7 @@
#import "WebNetscapePluginView.h"
+#import "QuickDrawCompatibility.h"
#import "WebDataSourceInternal.h"
#import "WebDefaultUIDelegate.h"
#import "WebFrameInternal.h"
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index e5de14d..5f3b727 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -164,6 +164,12 @@ public:
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
#endif
+
+#if ENABLE(FULLSCREEN_API)
+ virtual bool supportsFullScreenForElement(const WebCore::Element*);
+ virtual void enterFullScreenForElement(WebCore::Element*);
+ virtual void exitFullScreenForElement(WebCore::Element*);
+#endif
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index 2c2616d..d973e2b 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -110,6 +110,16 @@ using namespace WebCore;
- (id)initWithGeolocation:(Geolocation*)geolocation;
@end
+#if ENABLE(FULLSCREEN_API)
+@interface WebKitFullScreenListener : NSObject <WebKitFullScreenListener>
+{
+ RefPtr<Element> _element;
+}
+
+- (id)initWithElement:(Element*)element;
+@end
+#endif
+
WebChromeClient::WebChromeClient(WebView *webView)
: m_webView(webView)
{
@@ -815,6 +825,29 @@ void WebChromeClient::exitFullscreenForNode(Node*)
#endif
+#if ENABLE(FULLSCREEN_API)
+
+bool WebChromeClient::supportsFullScreenForElement(const Element* element)
+{
+ return CallUIDelegateReturningBoolean(false, m_webView, @selector(webView:supportsFullScreenForElement:), kit(const_cast<WebCore::Element*>(element)));
+}
+
+void WebChromeClient::enterFullScreenForElement(Element* element)
+{
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, @selector(webView:enterFullScreenForElement:listener:), kit(element), listener);
+ [listener release];
+}
+
+void WebChromeClient::exitFullScreenForElement(Element* element)
+{
+ WebKitFullScreenListener* listener = [[WebKitFullScreenListener alloc] initWithElement:element];
+ CallUIDelegate(m_webView, @selector(webView:exitFullScreenForElement:listener:), kit(element), listener);
+ [listener release];
+}
+
+#endif
+
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -919,3 +952,41 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
}
@end
+
+#if ENABLE(FULLSCREEN_API)
+@implementation WebKitFullScreenListener
+- (id)initWithElement:(Element*)element
+{
+ if (!(self = [super init]))
+ return nil;
+
+ _element = element;
+ return self;
+}
+
+- (void)webkitWillEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidEnterFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidEnterFullScreenForElement(_element.get());
+}
+
+- (void)webkitWillExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitWillExitFullScreenForElement(_element.get());
+}
+
+- (void)webkitDidExitFullScreen
+{
+ if (_element)
+ _element->document()->webkitDidExitFullScreenForElement(_element.get());
+}
+
+@end
+#endif
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index e6426aa..fe33e05 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -27,6 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import <WebCore/Editor.h>
#import <WebCore/EditorClient.h>
#import <wtf/RetainPtr.h>
#import <wtf/Forward.h>
@@ -38,7 +39,7 @@
class WebEditorClient : public WebCore::EditorClient {
public:
WebEditorClient(WebView *);
-
+ virtual ~WebEditorClient();
virtual void pageDestroyed();
virtual bool isGrammarCheckingEnabled();
@@ -129,12 +130,19 @@ public:
virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ virtual void showCorrectionPanel(const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
+ virtual void dismissCorrectionPanel(bool correctionAccepted);
+#endif
private:
void registerCommandForUndoOrRedo(PassRefPtr<WebCore::EditCommand>, bool isRedo);
WebEditorClient();
-
+
WebView *m_webView;
RetainPtr<WebEditorUndoTarget> m_undoTarget;
-
bool m_haveUndoRedoOperations;
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ NSInteger m_correctionPanelTag;
+#endif
};
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 2c89919..41cff68 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -64,6 +64,9 @@
#import <runtime/InitializeThreading.h>
#import <wtf/PassRefPtr.h>
#import <wtf/Threading.h>
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+#import <AppKit/NSTextChecker.h>
+#endif
using namespace WebCore;
using namespace WTF;
@@ -171,7 +174,17 @@ WebEditorClient::WebEditorClient(WebView *webView)
: m_webView(webView)
, m_undoTarget([[[WebEditorUndoTarget alloc] init] autorelease])
, m_haveUndoRedoOperations(false)
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ , m_correctionPanelTag(-1)
+#endif
+{
+}
+
+WebEditorClient::~WebEditorClient()
{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ dismissCorrectionPanel(true);
+#endif
}
bool WebEditorClient::isContinuousSpellCheckingEnabled()
@@ -286,6 +299,10 @@ void WebEditorClient::respondToChangedSelection()
{
[m_webView _selectionChanged];
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ dismissCorrectionPanel(true);
+#endif
+
// FIXME: This quirk is needed due to <rdar://problem/5009625> - We can phase it out once Aperture can adopt the new behavior on their end
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_APERTURE_QUIRK) && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Aperture"])
return;
@@ -790,6 +807,35 @@ void WebEditorClient::updateSpellingUIWithGrammarString(const String& badGrammar
#endif
}
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+void WebEditorClient::showCorrectionPanel(const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, Editor* editor) {
+ dismissCorrectionPanel(true);
+
+ NSRect boundingBoxAsNSRect = boundingBoxOfReplacedString;
+ NSRect webViewFrame = m_webView.frame;
+ boundingBoxAsNSRect.origin.y = webViewFrame.size.height-NSMaxY(boundingBoxAsNSRect);
+
+ // Need to explicitly use these local NSString objects, because the C++ references may be invalidated by the time the block below is executed.
+ NSString *replacedStringAsNSString = replacedString;
+ NSString *replacementStringAsNSString = replacementString;
+
+ m_correctionPanelTag = [[NSSpellChecker sharedSpellChecker] showCorrection:replacementStringAsNSString forStringInRect:boundingBoxAsNSRect view:m_webView completionHandler:^(BOOL accepted) {
+ if (!accepted) {
+ [[NSSpellChecker sharedSpellChecker] recordResponse:NSCorrectionResponseRejected toCorrection:replacementStringAsNSString forWord:replacedStringAsNSString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]];
+ editor->handleRejectedCorrection();
+ }
+ }];
+}
+
+void WebEditorClient::dismissCorrectionPanel(bool correctionAccepted)
+{
+ if (m_correctionPanelTag >= 0) {
+ [[NSSpellChecker sharedSpellChecker] dismissCorrection:m_correctionPanelTag acceptCorrection:correctionAccepted];
+ m_correctionPanelTag = -1;
+ }
+}
+#endif
+
void WebEditorClient::updateSpellingUIWithMisspelledWord(const String& misspelledWord)
{
[[NSSpellChecker sharedSpellChecker] updateSpellingPanelWithMisspelledWord:misspelledWord];
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 8bdeca0..3f7c471 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -241,8 +241,6 @@ bool WebFrameLoaderClient::hasHTMLView() const
void WebFrameLoaderClient::forceLayout()
{
NSView <WebDocumentView> *view = [m_webFrame->_private->webFrameView documentView];
- if ([view isKindOfClass:[WebHTMLView class]])
- [(WebHTMLView *)view setNeedsToApplyStyles:YES];
[view setNeedsLayout:YES];
[view layout];
}
@@ -1576,8 +1574,20 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
NSURL *baseURL = document->baseURL();
NSURL *pluginURL = url;
+ // <rdar://problem/8366089>: AppleConnect has a bug where it does not
+ // understand the parameter names specified in the <object> element that
+ // embeds its plug-in. This site-specific hack works around the issue by
+ // converting the parameter names to lowercase before passing them to the
+ // plug-in.
+ Frame* frame = core(m_webFrame.get());
+ NSMutableArray *attributeKeys = kit(paramNames);
+ if (frame && frame->settings()->needsSiteSpecificQuirks() && equalIgnoringCase(mimeType, "application/x-snkp")) {
+ for (NSUInteger i = 0; i < [attributeKeys count]; ++i)
+ [attributeKeys replaceObjectAtIndex:i withObject:[[attributeKeys objectAtIndex:i] lowercaseString]];
+ }
+
if ([[webView UIDelegate] respondsToSelector:selector]) {
- NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)];
+ NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:attributeKeys];
NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
attributes, WebPlugInAttributesKey,
[NSNumber numberWithInt:loadManually ? WebPlugInModeFull : WebPlugInModeEmbed], WebPlugInModeKey,
@@ -1620,7 +1630,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
if (pluginPackage) {
if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
- view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), loadManually);
+ view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, attributeKeys, kit(paramValues), baseURL, kit(element), loadManually);
#if ENABLE(NETSCAPE_PLUGIN_API)
else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
@@ -1630,7 +1640,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
URL:pluginURL
baseURL:baseURL
MIMEType:MIMEType
- attributeKeys:kit(paramNames)
+ attributeKeys:attributeKeys
attributeValues:kit(paramValues)
loadManually:loadManually
element:element] autorelease];
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index 0b74dee..47b16b2 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -84,6 +84,7 @@ void InitWebCoreSystemInterface(void)
INIT(SignalCFReadStreamHasBytes);
INIT(QTIncludeOnlyModernMediaFileTypes);
INIT(QTMovieDataRate);
+ INIT(QTMovieDisableComponent);
INIT(QTMovieMaxTimeLoaded);
INIT(QTMovieMaxTimeLoadedChangeNotification);
INIT(QTMovieMaxTimeSeekable);
diff --git a/WebKit/mac/WebInspector/WebInspectorFrontend.mm b/WebKit/mac/WebInspector/WebInspectorFrontend.mm
index 91caa64..c285ef7 100644
--- a/WebKit/mac/WebInspector/WebInspectorFrontend.mm
+++ b/WebKit/mac/WebInspector/WebInspectorFrontend.mm
@@ -29,7 +29,7 @@
@implementation WebInspectorFrontend
-- (id)initWithFrontendClient:(WebInspectorFrontendClient *)frontendClient;
+- (id)initWithFrontendClient:(WebInspectorFrontendClient *)frontendClient
{
if (!(self = [super init]))
return nil;
diff --git a/WebKit/mac/WebView/WebDocumentInternal.h b/WebKit/mac/WebView/WebDocumentInternal.h
index 191264b..0f63d75 100644
--- a/WebKit/mac/WebView/WebDocumentInternal.h
+++ b/WebKit/mac/WebView/WebDocumentInternal.h
@@ -62,6 +62,7 @@
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue;
- (BOOL)markedTextMatchesAreHighlighted;
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit;
+- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
- (void)unmarkAllTextMatches;
- (NSArray *)rectsForTextMatches;
@end
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index dff9ff7..1feb97e 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -824,64 +824,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return kit(range.get());
}
-// Determines whether whitespace needs to be added around aString to preserve proper spacing and
-// punctuation when it’s inserted into the receiver’s text over charRange. Returns by reference
-// in beforeString and afterString any whitespace that should be added, unless either or both are
-// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
-- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
-{
- // give back nil pointers in case of early returns
- if (beforeString)
- *beforeString = nil;
- if (afterString)
- *afterString = nil;
-
- // inspect destination
- Node *startContainer = core([rangeToReplace startContainer]);
- Node *endContainer = core([rangeToReplace endContainer]);
-
- Position startPos(startContainer, [rangeToReplace startOffset]);
- Position endPos(endContainer, [rangeToReplace endOffset]);
-
- VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
- VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
-
- // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
- if (startVisiblePos.isNull() || endVisiblePos.isNull())
- return;
-
- bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
- if (addLeadingSpace)
- if (UChar previousChar = startVisiblePos.previous().characterAfter())
- addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
-
- bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
- if (addTrailingSpace)
- if (UChar thisChar = endVisiblePos.characterAfter())
- addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
-
- // inspect source
- bool hasWhitespaceAtStart = false;
- bool hasWhitespaceAtEnd = false;
- unsigned pasteLength = [pasteString length];
- if (pasteLength > 0) {
- NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
-
- if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
- hasWhitespaceAtStart = YES;
- }
- if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
- hasWhitespaceAtEnd = YES;
- }
- }
-
- // issue the verdict
- if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
- *beforeString = @" ";
- if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
- *afterString = @" ";
-}
-
- (DOMDocumentFragment *)_documentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString
{
if (!_private->coreFrame || !_private->coreFrame->document())
@@ -1240,6 +1182,64 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
[self _replaceSelectionWithFragment:fragment selectReplacement:selectReplacement smartReplace:smartReplace matchStyle:NO];
}
+// Determines whether whitespace needs to be added around aString to preserve proper spacing and
+// punctuation when it's inserted into the receiver's text over charRange. Returns by reference
+// in beforeString and afterString any whitespace that should be added, unless either or both are
+// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
+{
+ // give back nil pointers in case of early returns
+ if (beforeString)
+ *beforeString = nil;
+ if (afterString)
+ *afterString = nil;
+
+ // inspect destination
+ Node *startContainer = core([rangeToReplace startContainer]);
+ Node *endContainer = core([rangeToReplace endContainer]);
+
+ Position startPos(startContainer, [rangeToReplace startOffset]);
+ Position endPos(endContainer, [rangeToReplace endOffset]);
+
+ VisiblePosition startVisiblePos = VisiblePosition(startPos, VP_DEFAULT_AFFINITY);
+ VisiblePosition endVisiblePos = VisiblePosition(endPos, VP_DEFAULT_AFFINITY);
+
+ // this check also ensures startContainer, startPos, endContainer, and endPos are non-null
+ if (startVisiblePos.isNull() || endVisiblePos.isNull())
+ return;
+
+ bool addLeadingSpace = startPos.leadingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isStartOfParagraph(startVisiblePos);
+ if (addLeadingSpace)
+ if (UChar previousChar = startVisiblePos.previous().characterAfter())
+ addLeadingSpace = !isCharacterSmartReplaceExempt(previousChar, true);
+
+ bool addTrailingSpace = endPos.trailingWhitespacePosition(VP_DEFAULT_AFFINITY, true).isNull() && !isEndOfParagraph(endVisiblePos);
+ if (addTrailingSpace)
+ if (UChar thisChar = endVisiblePos.characterAfter())
+ addTrailingSpace = !isCharacterSmartReplaceExempt(thisChar, false);
+
+ // inspect source
+ bool hasWhitespaceAtStart = false;
+ bool hasWhitespaceAtEnd = false;
+ unsigned pasteLength = [pasteString length];
+ if (pasteLength > 0) {
+ NSCharacterSet *whiteSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
+
+ if ([whiteSet characterIsMember:[pasteString characterAtIndex:0]]) {
+ hasWhitespaceAtStart = YES;
+ }
+ if ([whiteSet characterIsMember:[pasteString characterAtIndex:(pasteLength - 1)]]) {
+ hasWhitespaceAtEnd = YES;
+ }
+ }
+
+ // issue the verdict
+ if (beforeString && addLeadingSpace && !hasWhitespaceAtStart)
+ *beforeString = @" ";
+ if (afterString && addTrailingSpace && !hasWhitespaceAtEnd)
+ *afterString = @" ";
+}
+
- (NSMutableDictionary *)_cacheabilityDictionary
{
NSMutableDictionary *result = [NSMutableDictionary dictionary];
diff --git a/WebKit/mac/WebView/WebFrameInternal.h b/WebKit/mac/WebView/WebFrameInternal.h
index 240b09c..dc3de21 100644
--- a/WebKit/mac/WebView/WebFrameInternal.h
+++ b/WebKit/mac/WebView/WebFrameInternal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 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
@@ -30,7 +30,6 @@
#import "WebFramePrivate.h"
#import "WebPreferencesPrivate.h"
-
#import <WebCore/EditAction.h>
#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/SelectionController.h>
@@ -142,7 +141,6 @@ WebView *getWebView(WebFrame *webFrame);
- (id)_accessibilityTree;
- (DOMRange *)_rangeByAlteringCurrentSelection:(WebCore::SelectionController::EAlteration)alteration direction:(WebCore::SelectionController::EDirection)direction granularity:(WebCore::TextGranularity)granularity;
-- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)charRangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
- (NSRange)_convertToNSRange:(WebCore::Range*)range;
- (DOMRange *)_convertNSRangeToDOMRange:(NSRange)range;
- (NSRange)_convertDOMRangeToNSRange:(DOMRange *)range;
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index 3556ad8..a1031f3 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,6 +37,7 @@
@class DOMDocumentFragment;
@class DOMNode;
+@class DOMRange;
@class WebIconFetcher;
@class WebScriptObject;
@class WebScriptWorld;
@@ -84,7 +85,7 @@ typedef enum {
- (BOOL)_isDisplayingStandaloneImage;
-- (unsigned) _pendingFrameUnloadEventCount;
+- (unsigned)_pendingFrameUnloadEventCount;
- (WebIconFetcher *)fetchApplicationIcon:(id)target
selector:(SEL)selector;
@@ -111,16 +112,18 @@ typedef enum {
- (BOOL)_pauseSVGAnimation:(NSString*)elementId onSMILNode:(DOMNode *)node atTime:(NSTimeInterval)time;
// Returns the total number of currently running animations (includes both CSS transitions and CSS animations).
-- (unsigned) _numberOfActiveAnimations;
+- (unsigned)_numberOfActiveAnimations;
// Suspend and resume animations (includes both CSS transitions and CSS animations).
-- (void) _suspendAnimations;
-- (void) _resumeAnimations;
+- (void)_suspendAnimations;
+- (void)_resumeAnimations;
- (void)_replaceSelectionWithFragment:(DOMDocumentFragment *)fragment selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace matchStyle:(BOOL)matchStyle;
- (void)_replaceSelectionWithText:(NSString *)text selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
- (void)_replaceSelectionWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString selectReplacement:(BOOL)selectReplacement smartReplace:(BOOL)smartReplace;
+- (void)_smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString;
+
- (NSMutableDictionary *)_cacheabilityDictionary;
- (BOOL)_allowsFollowingLink:(NSURL *)URL;
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index a619f18..34745a1 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -443,7 +443,6 @@ struct WebHTMLViewInterpretKeyEventsParameters {
@interface WebHTMLViewPrivate : NSObject {
@public
BOOL closed;
- BOOL needsToApplyStyles;
BOOL ignoringMouseDraggedEvents;
BOOL printing;
BOOL avoidingPrintOrphan;
@@ -1290,7 +1289,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
- (void)_propagateDirtyRectsToOpaqueAncestors
{
if (![[self _webView] drawsBackground])
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[super _propagateDirtyRectsToOpaqueAncestors];
}
@@ -1302,7 +1301,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// So check if the dataSource is nil before calling [self _isTopHTMLView], this can be removed
// once the FIXME in _isTopHTMLView is fixed.
if (_private->dataSource && [self _isTopHTMLView])
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[super viewWillDraw];
}
@@ -1320,7 +1319,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_setPrintingModeRecursive];
#ifndef BUILDING_ON_TIGER
else
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
@@ -1336,12 +1335,12 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self getRectsBeingDrawn:0 count:&rectCount];
if (rectCount) {
LOG_ERROR("View needs layout. Either -viewWillDraw wasn't called or layout was invalidated during the display operation. Performing layout now.");
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
}
}
#else
// Because Tiger does not have viewWillDraw we need to do layout here.
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
[_subviews makeObjectsPerformSelector:@selector(_propagateDirtyRectsToOpaqueAncestors)];
#endif
@@ -1373,7 +1372,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
[self _web_setPrintingModeRecursive];
#ifndef BUILDING_ON_TIGER
else
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
} else if (wasInPrintingMode)
[self _web_clearPrintingModeRecursive];
@@ -1383,7 +1382,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
// Because Tiger does not have viewWillDraw we need to do layout here.
NSRect boundsBeforeLayout = [self bounds];
if (!NSIsEmptyRect(visRect))
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
// If layout changes the view's bounds, then we need to recompute the visRect.
// That's because the visRect passed to us was based on the bounds at the time
@@ -1416,7 +1415,7 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
{
#ifdef BUILDING_ON_TIGER
// Because Tiger does not have viewWillDraw we need to do layout here.
- [self _web_layoutIfNeededRecursive];
+ [self _web_updateLayoutAndStyleIfNeededRecursive];
#endif
[self _setAsideSubviews];
@@ -3117,37 +3116,23 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)reapplyStyles
{
- if (!_private->needsToApplyStyles)
- return;
-
#ifdef LOG_TIMES
double start = CFAbsoluteTimeGetCurrent();
#endif
- if (Frame* coreFrame = core([self _frame])) {
- if (FrameView* coreView = coreFrame->view())
- coreView->setMediaType(_private->printing ? "print" : "screen");
- if (Document* document = coreFrame->document()) {
- document->setPaginatedForScreen(_private->paginateScreenContent);
- document->setPrinting(_private->printing);
- }
- coreFrame->reapplyStyles();
- }
+ if (Frame* coreFrame = core([self _frame]))
+ coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
#ifdef LOG_TIMES
double thisTime = CFAbsoluteTimeGetCurrent() - start;
LOG(Timing, "%s apply style seconds = %f", [self URL], thisTime);
#endif
-
- _private->needsToApplyStyles = NO;
}
// Do a layout, but set up a new fixed width for the purposes of doing printing layout.
// minPageWidth==0 implies a non-printing layout
- (void)layoutToMinimumPageWidth:(float)minPageWidth height:(float)minPageHeight maximumPageWidth:(float)maxPageWidth adjustingViewSize:(BOOL)adjustViewSize
-{
- [self reapplyStyles];
-
+{
if (![self _needsLayout])
return;
@@ -3308,7 +3293,13 @@ WEBCORE_COMMAND(yankAndSelect)
- (void)setNeedsToApplyStyles: (BOOL)flag
{
LOG(View, "%@ setNeedsToApplyStyles:%@", self, flag ? @"YES" : @"NO");
- _private->needsToApplyStyles = flag;
+ if (!flag)
+ return; // There's no way to say you don't need a style recalc.
+ if (Frame* frame = core([self _frame])) {
+ if (frame->document() && frame->document()->inPageCache())
+ return;
+ frame->document()->scheduleForcedStyleRecalc();
+ }
}
- (void)drawSingleRect:(NSRect)rect
@@ -3883,7 +3874,18 @@ static BOOL isInPasswordField(Frame* coreFrame)
_private->paginateScreenContent = paginateScreenContent;
if (!printing && !paginateScreenContent)
_private->avoidingPrintOrphan = NO;
- [self setNeedsToApplyStyles:YES];
+
+ Frame* coreFrame = core([self _frame]);
+ if (coreFrame) {
+ if (FrameView* coreView = coreFrame->view())
+ coreView->setMediaType(_private->printing ? "print" : "screen");
+ if (Document* document = coreFrame->document()) {
+ document->setPaginatedForScreen(_private->paginateScreenContent);
+ document->setPrinting(_private->printing);
+ document->styleSelectorChanged(RecalcStyleImmediately);
+ }
+ }
+
[self setNeedsLayout:YES];
[self layoutToMinimumPageWidth:minPageWidth height:minPageHeight maximumPageWidth:maxPageWidth adjustingViewSize:adjustViewSize];
if (!printing) {
@@ -5507,31 +5509,16 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
{
ASSERT(!_private->subviewsSetAside);
- if (_private->needsToApplyStyles || [self _needsLayout])
+ if ([self _needsLayout])
[self layout];
}
-- (void)_web_layoutIfNeededRecursive
+- (void)_web_updateLayoutAndStyleIfNeededRecursive
{
- [self _layoutIfNeeded];
-
-#ifndef NDEBUG
- _private->enumeratingSubviews = YES;
-#endif
-
- NSMutableArray *descendantWebHTMLViews = [[NSMutableArray alloc] init];
-
- [self _web_addDescendantWebHTMLViewsToArray:descendantWebHTMLViews];
-
- unsigned count = [descendantWebHTMLViews count];
- for (unsigned i = 0; i < count; ++i)
- [[descendantWebHTMLViews objectAtIndex:i] _layoutIfNeeded];
-
- [descendantWebHTMLViews release];
-
-#ifndef NDEBUG
- _private->enumeratingSubviews = NO;
-#endif
+ WebFrame *webFrame = [self _frame];
+ Frame* coreFrame = core(webFrame);
+ if (coreFrame && coreFrame->view())
+ coreFrame->view()->updateLayoutAndStyleIfNeededRecursive();
}
- (void) _destroyAllWebPlugins
@@ -6202,10 +6189,15 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
Frame* coreFrame = core([self _frame]);
if (!coreFrame)
return 0;
- return coreFrame->markAllMatchesForText(string, caseFlag, limit);
+ return coreFrame->countMatchesForText(string, caseFlag, limit, markMatches);
}
- (void)setMarkedTextMatchesAreHighlighted:(BOOL)newValue
diff --git a/WebKit/mac/WebView/WebHTMLViewInternal.h b/WebKit/mac/WebView/WebHTMLViewInternal.h
index 3f1f50d..2d9e2a9 100644
--- a/WebKit/mac/WebView/WebHTMLViewInternal.h
+++ b/WebKit/mac/WebView/WebHTMLViewInternal.h
@@ -59,7 +59,7 @@ namespace WebCore {
#endif
- (WebCore::CachedImage*)promisedDragTIFFDataSource;
- (void)setPromisedDragTIFFDataSource:(WebCore::CachedImage*)source;
-- (void)_web_layoutIfNeededRecursive;
+- (void)_web_updateLayoutAndStyleIfNeededRecursive;
- (void)_destroyAllWebPlugins;
- (BOOL)_needsLayout;
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index 5e7b73c..70fceb6 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -628,6 +628,11 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
PDFSelection *previousMatch = nil;
PDFSelection *nextMatch = nil;
NSMutableArray *matches = [[NSMutableArray alloc] initWithCapacity:limit];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index 86f6d85..3b750ff 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -97,6 +97,7 @@
#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
+#define WebKitFullScreenEnabledPreferenceKey @"WebKitFullScreenEnabled"
#define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled"
// These are private both because callers should be using the cover methods and because the
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index eae2d8d..a4a5383 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -365,6 +365,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
[NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitFullScreenEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
[NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
[NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheDefaultOriginQuota,
@@ -1346,6 +1347,16 @@ static NSString *classIBCreatorID = nil;
[self _setStringValue:value forKey:key];
}
+- (void)setFullScreenEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitFullScreenEnabledPreferenceKey];
+}
+
+- (BOOL)fullScreenEnabled
+{
+ return [self _boolValueForKey:WebKitFullScreenEnabledPreferenceKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 45c2a24..783038d 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -206,4 +206,10 @@ extern NSString *WebPreferencesRemovedNotification;
// For WebView's use only.
- (void)willAddToWebView;
- (void)didRemoveFromWebView;
+
+// Full screen support is dependent on WebCore/WebKit being
+// compiled with ENABLE_FULLSCREEN_API.
+- (void)setFullScreenEnabled:(BOOL)flag;
+- (BOOL)fullScreenEnabled;
+
@end
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 0fb120c..22752ae 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -95,6 +95,15 @@ enum {
- (void)deny;
@end
+#if ENABLE(FULLSCREEN_API)
+@protocol WebKitFullScreenListener<NSObject>
+- (void)webkitWillEnterFullScreen;
+- (void)webkitDidEnterFullScreen;
+- (void)webkitWillExitFullScreen;
+- (void)webkitDidExitFullScreen;
+@end
+#endif
+
@interface NSObject (WebUIDelegatePrivate)
- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message;
@@ -164,4 +173,10 @@ enum {
*/
- (void)webView:(WebView *)sender printFrame:(WebFrame *)frame;
+#if ENABLE(FULLSCREEN_API)
+- (BOOL)webView:(WebView *)sender supportsFullScreenForElement:(DOMElement *)element;
+- (void)webView:(WebView *)sender enterFullScreenForElement:(DOMElement *)element;
+- (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element;
+#endif
+
@end
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 2d3dbfa..f2e76c1 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -842,7 +842,7 @@ static bool shouldEnableLoadDeferring()
{
Frame* frame = [self _mainCoreFrame];
if (frame && frame->view())
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
}
#endif
@@ -1425,7 +1425,7 @@ static bool fastDocumentTeardownEnabled()
settings->setZoomMode([preferences zoomsTextOnly] ? ZoomTextOnly : ZoomPage);
settings->setJavaScriptCanAccessClipboard([preferences javaScriptCanAccessClipboard]);
settings->setXSSAuditorEnabled([preferences isXSSAuditorEnabled]);
- settings->setEnforceCSSMIMETypeInStrictMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
+ settings->setEnforceCSSMIMETypeInNoQuirksMode(!WKAppVersionCheckLessThan(@"com.apple.iWeb", -1, 2.1));
settings->setDNSPrefetchingEnabled([preferences isDNSPrefetchingEnabled]);
// FIXME: Enabling accelerated compositing when WebGL is enabled causes tests to fail on Leopard which expect HW compositing to be disabled.
@@ -1438,6 +1438,9 @@ static bool fastDocumentTeardownEnabled()
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
+#if ENABLE(FULLSCREEN_API)
+ settings->setFullScreenEnabled([preferences fullScreenEnabled]);
+#endif
settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
// Application Cache Preferences are stored on the global cache storage manager, not in Settings.
@@ -4372,15 +4375,21 @@ static NSAppleEventDescriptor* aeDescFromJSValue(ExecState* exec, JSValue jsValu
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
{
+ return [self countMatchesForText:string caseSensitive:caseFlag highlight:highlight limit:limit markMatches:YES];
+}
+
+- (NSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit markMatches:(BOOL)markMatches
+{
WebFrame *frame = [self mainFrame];
unsigned matchCount = 0;
do {
id <WebDocumentView> view = [[frame frameView] documentView];
if ([view conformsToProtocol:@protocol(WebMultipleTextMatches)]) {
- [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight];
+ if (markMatches)
+ [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight];
ASSERT(limit == 0 || matchCount < limit);
- matchCount += [(NSView <WebMultipleTextMatches>*)view markAllMatchesForText:string caseSensitive:caseFlag limit:limit == 0 ? 0 : limit - matchCount];
+ matchCount += [(NSView <WebMultipleTextMatches>*)view countMatchesForText:string caseSensitive:caseFlag limit:limit == 0 ? 0 : limit - matchCount markMatches:markMatches];
// Stop looking if we've reached the limit. A limit of 0 means no limit.
if (limit > 0 && matchCount >= limit)
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index 9d47a4d..28348cc 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -180,6 +180,7 @@ typedef enum {
// These methods are still in flux; don't rely on them yet.
- (BOOL)canMarkAllTextMatches;
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit;
+- (WebNSUInteger)countMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit markMatches:(BOOL)markMatches;
- (void)unmarkAllTextMatches;
- (NSArray *)rectsForTextMatches;
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index 83ee451..f7b1188 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -1446,7 +1446,7 @@ void QWebElement::render(QPainter* painter)
FrameView* view = frame->view();
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
IntRect rect = e->getRect();
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 1b0c2df..81eabfc 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -286,7 +286,7 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
QPainter* painter = context->platformContext();
WebCore::FrameView* view = frame->view();
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 5eee21c..ec415bb 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -81,6 +81,7 @@
#include "Cache.h"
#include "runtime/InitializeThreading.h"
#include "PageGroup.h"
+#include "GeolocationPermissionClientQt.h"
#include "NotificationPresenterClientQt.h"
#include "PageClientQt.h"
#include "WorkerThread.h"
@@ -2082,30 +2083,6 @@ bool QWebPage::shouldInterruptJavaScript()
#endif
}
-/*!
- \fn bool QWebPage::allowGeolocationRequest()
- \since 4.7
-
- This function is called whenever a JavaScript program running inside \a frame tries to access user location through navigator.geolocation.
-
- If the user wants to allow access to location then it should return true; otherwise false.
-
- The default implementation executes the query using QMessageBox::information with QMessageBox::Yes and QMessageBox::No buttons.
-
- \warning Because of binary compatibility constraints, this function is not virtual. If you want to
- provide your own implementation in a QWebPage subclass, reimplement the allowGeolocationRequest()
- slot in your subclass instead. QtWebKit will dynamically detect the slot and call it.
-*/
-bool QWebPage::allowGeolocationRequest(QWebFrame *frame)
-{
-#ifdef QT_NO_MESSAGEBOX
- return false;
-#else
- QWidget* parent = (d->client) ? d->client->ownerWidget() : 0;
- return QMessageBox::Yes == QMessageBox::information(parent, tr("Location Request by- %1").arg(frame->url().host()), tr("The page wants to access your location information. Do you want to allow the request?"), QMessageBox::Yes, QMessageBox::No);
-#endif
-}
-
void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, PermissionPolicy policy)
{
switch (domain) {
@@ -2115,6 +2092,12 @@ void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, Perm
NotificationPresenterClientQt::notificationPresenter()->allowNotificationForFrame(frame);
#endif
break;
+ case GeolocationPermissionDomain:
+#if ENABLE(GEOLOCATION)
+ GeolocationPermissionClientQt::geolocationPermissionClient()->setPermission(frame, policy);
+#endif
+ break;
+
default:
break;
}
@@ -2131,7 +2114,11 @@ void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, Perm
If \a type is WebModalDialog, the application must call setWindowModality(Qt::ApplicationModal) on the new window.
- \sa acceptNavigationRequest()
+ \note In the cases when the window creation is being triggered by JavaScript, apart from
+ reimplementing this method application must also set the JavaScriptCanOpenWindows attribute
+ of QWebSettings to true in order for it to get called.
+
+ \sa acceptNavigationRequest(), QWebView::createWindow()
*/
QWebPage *QWebPage::createWindow(WebWindowType type)
{
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index 14f3b8b..dda4a6a 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -57,6 +57,7 @@ namespace WebCore {
class InspectorClientQt;
class InspectorFrontendClientQt;
class NotificationPresenterClientQt;
+ class GeolocationPermissionClientQt;
class ResourceHandle;
class HitTestResult;
class QNetworkReplyHandler;
@@ -202,7 +203,8 @@ public:
};
enum PermissionDomain {
- NotificationsPermissionDomain
+ NotificationsPermissionDomain,
+ GeolocationPermissionDomain
};
class ViewportHints {
@@ -351,7 +353,6 @@ public:
public Q_SLOTS:
bool shouldInterruptJavaScript();
- bool allowGeolocationRequest(QWebFrame *frame);
Q_SIGNALS:
void loadStarted();
@@ -424,6 +425,7 @@ private:
friend class WebCore::InspectorClientQt;
friend class WebCore::InspectorFrontendClientQt;
friend class WebCore::NotificationPresenterClientQt;
+ friend class WebCore::GeolocationPermissionClientQt;
friend class WebCore::ResourceHandle;
friend class WebCore::QNetworkReplyHandler;
friend class DumpRenderTreeSupportQt;
diff --git a/WebKit/qt/Api/qwebplugindatabase.cpp b/WebKit/qt/Api/qwebplugindatabase.cpp
index 758e257..a7a3b5f 100644
--- a/WebKit/qt/Api/qwebplugindatabase.cpp
+++ b/WebKit/qt/Api/qwebplugindatabase.cpp
@@ -284,6 +284,10 @@ QList<QWebPluginInfo> QWebPluginDatabase::plugins() const
for (unsigned int i = 0; i < plugins.size(); ++i) {
PluginPackage* plugin = plugins[i];
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ if (!plugin->ensurePluginLoaded())
+ continue;
+#endif
qwebplugins.append(QWebPluginInfo(plugin));
}
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index edd07da..d88b0da 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -34,6 +34,7 @@
#include "KURL.h"
#include "PlatformString.h"
#include "IconDatabase.h"
+#include "PluginDatabase.h"
#include "Image.h"
#include "IntSize.h"
#include "ApplicationCacheStorage.h"
@@ -1093,6 +1094,14 @@ void QWebSettings::enablePersistentStorage(const QString& path)
QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
+
+#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+ QFileInfo info(storagePath);
+ if (info.isDir() && info.isWritable()) {
+ WebCore::PluginDatabase::setPersistentMetadataCacheEnabled(true);
+ WebCore::PluginDatabase::setPersistentMetadataCachePath(storagePath);
+ }
+#endif
}
/*!
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 10cf60c..1f400cb 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -953,7 +953,11 @@ void QWebView::paintEvent(QPaintEvent *ev)
\note If the createWindow() method of the associated page is reimplemented, this
method is not called, unless explicitly done so in the reimplementation.
- \sa QWebPage::createWindow()
+ \note In the cases when the window creation is being triggered by JavaScript, apart from
+ reimplementing this method application must also set the JavaScriptCanOpenWindows attribute
+ of QWebSettings to true in order for it to get called.
+
+ \sa QWebPage::createWindow(), QWebPage::acceptNavigationRequest()
*/
QWebView *QWebView::createWindow(QWebPage::WebWindowType type)
{
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 9969ebd..996435b 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,232 @@
+2010-09-01 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] QWebPage::allowGeolocationRequest should be async API
+ https://bugs.webkit.org/show_bug.cgi?id=41364
+
+ Provides a new async API for geolocation permission. Using
+ Notification API approach from qtwebkit. GeolocationPermissionClientQt
+ maintains list of pending requests from WebCore and intimates them
+ when client either allowes/denies the request. Also implements
+ ChromeClientQt::cancelGeolocationPermissionRequestForFrame.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::setUserPermission):
+ * Api/qwebpage.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::requestGeolocationPermissionForFrame):
+ (WebCore::ChromeClientQt::cancelGeolocationPermissionRequestForFrame):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/GeolocationPermissionClientQt.cpp: Added.
+ (WebCore::GeolocationPermissionClientQt::geolocationPermissionClient):
+ (WebCore::GeolocationPermissionClientQt::GeolocationPermissionClientQt):
+ (WebCore::GeolocationPermissionClientQt::~GeolocationPermissionClientQt):
+ (WebCore::GeolocationPermissionClientQt::requestGeolocationPermissionForFrame):
+ (WebCore::GeolocationPermissionClientQt::cancelGeolocationPermissionRequestForFrame):
+ (WebCore::GeolocationPermissionClientQt::setPermission):
+ * WebCoreSupport/GeolocationPermissionClientQt.h: Added.
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (JSTestPage::requestPermission):
+ (tst_QWebPage::geolocationRequestJS):
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::render):
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderRelativeCoords):
+
+2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebPage::originatingObjectInNetworkRequests() fails on trunk
+ https://bugs.webkit.org/show_bug.cgi?id=45001
+
+ Fix the test, we should not use data encoded URL since we are not
+ setting an URL but setting the substituteData directly.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::originatingObjectInNetworkRequests):
+
+2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ JSC TimeoutChecker::didTimeOut overflows on ARM
+ https://bugs.webkit.org/show_bug.cgi?id=38538
+
+ Re-enabled the test that was skipped for Maemo 5.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::infiniteLoopJS):
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::inspectorDestroyed):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorClientQt::releaseFrontendPage):
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-28 Daniel Bates <dbates@rim.com>
+
+ Attempt to fix the Qt Windows and Qt Linux Release minimal builds
+ after changeset 66297 <http://trac.webkit.org/changeset/66297>.
+
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginDatabase::plugins): Wrap the call to PluginPackage::ensurePluginLoaded
+ in #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE).
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] tst_QWebView::focusInputTypes() fails on MeeGo Handset with WebKit 2.1
+ https://bugs.webkit.org/show_bug.cgi?id=44761
+
+ Make the test more robust to changes in the execution environment. The click
+ are now correctly simulated, and the position are determined from the content.
+
+ The test also create the view and page on the stack to avoid the leak when the
+ test is failing.
+
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::focusInputTypes):
+
+2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Cache plugin info to a persistent database
+
+ https://bugs.webkit.org/show_bug.cgi?id=43179
+
+ Implement a cache of NPAPI plugin metadata. Write the metadata to aa
+ file that gets rewritten if any plugin is added / removed. Compilation
+ of the feature is controlled by #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
+
+ Currently only enabled for Qt UNIX flavors.
+
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginDatabase::plugins): Match previous behavior: ensure all returned plugins are loaded.
+ * Api/qwebsettings.cpp:
+ (QWebSettings::enablePersistentStorage): Set plugin cache path.
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebFrame::inputFieldFocus() fails on MeeGo Handset with QtWebKit 2.1
+ https://bugs.webkit.org/show_bug.cgi?id=44703
+
+ Make the test more robust to changes in the execution environment.
+ The position where the mouse events are sent is now computed from the element geometry,
+ this make the test less dependent on the fonts.
+
+ The test now also make sure the window manager mapped the window on screen
+ before attempting to send the events.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebFrame::hitTestContent() fails on Meego Handset
+ https://bugs.webkit.org/show_bug.cgi?id=44701
+
+ Make the test more robust. The position of the text is not relying
+ on the size of the fonts anymore.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-08-26 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add support for automatically creating new windows in QWebView
+ https://bugs.webkit.org/show_bug.cgi?id=29847
+
+ Improved the documentation of createWindow methods of both QWebView and
+ QWebPage by mentioning that for any of them be called, QWebSettings'
+ JavaScriptCanOpenWindows attribute must be set to true.
+
+ * Api/qwebpage.cpp:
+ * Api/qwebview.cpp:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::inspectorDestroyed):
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+ (WebCore::InspectorClientQt::releaseFrontendPage):
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ (WebCore::InspectorFrontendClientQt::disconnectFromBackend):
+ (WebCore::InspectorFrontendClientQt::destroyInspectorView):
+ (WebCore::InspectorFrontendClientQt::inspectorClientDestroyed):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-26 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Remove dead code.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::statusbarVisible):
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorFrontendClientQt::closeWindow):
+ (WebCore::InspectorFrontendClientQt::disconnectFromBackend):
+ (WebCore::InspectorFrontendClientQt::destroyInspectorView):
+ * WebCoreSupport/InspectorClientQt.h:
+
+2010-08-26 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] tst_QWebFrame::popupFocus() hardcode the element position
+ https://bugs.webkit.org/show_bug.cgi?id=44674
+
+ This patch dynamically find the position of the combo element instead
+ of hardcoding a position to click.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
2010-08-25 Leo Yang <leo.yang@torchmobile.com.cn>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index bfce824..8b01d4d 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -41,6 +41,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayerQt.h"
#endif
+#include "GeolocationPermissionClientQt.h"
#include "HitTestResult.h"
#include "Icon.h"
#include "NotImplemented.h"
@@ -229,7 +230,6 @@ void ChromeClientQt::setStatusbarVisible(bool visible)
bool ChromeClientQt::statusbarVisible()
{
return statusBarVisible;
- return false;
}
@@ -568,10 +568,18 @@ void ChromeClientQt::setCursor(const Cursor& cursor)
void ChromeClientQt::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
- bool allow = false;
+#if ENABLE(GEOLOCATION)
QWebFrame* webFrame = QWebFramePrivate::kit(frame);
- QMetaObject::invokeMethod(m_webPage, "allowGeolocationRequest", Qt::DirectConnection, Q_RETURN_ARG(bool, allow), Q_ARG(QWebFrame*, webFrame));
- geolocation->setIsAllowed(allow);
+ GeolocationPermissionClientQt::geolocationPermissionClient()->requestGeolocationPermissionForFrame(webFrame, geolocation);
+#endif
+}
+
+void ChromeClientQt::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
+{
+#if ENABLE(GEOLOCATION)
+ QWebFrame* webFrame = QWebFramePrivate::kit(frame);
+ GeolocationPermissionClientQt::geolocationPermissionClient()->cancelGeolocationPermissionRequestForFrame(webFrame, geolocation);
+#endif
}
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 55edc50..d18f993 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -168,7 +168,7 @@ namespace WebCore {
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*);
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*);
virtual bool selectItemWritingDirectionIsNatural();
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index b6c3d51..026866c 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -388,7 +388,7 @@ void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
WebCore::FrameView* view = coreFrame->view();
view->setMediaType(type);
- coreFrame->document()->updateStyleSelector();
+ coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
view->layout();
}
diff --git a/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp
new file mode 100644
index 0000000..5fb9ab7
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 "GeolocationPermissionClientQt.h"
+
+#include "Geolocation.h"
+
+#include "qwebframe.h"
+#include "qwebkitglobal.h"
+#include "qwebpage.h"
+
+namespace WebCore {
+
+#if ENABLE(GEOLOCATION)
+
+static GeolocationPermissionClientQt* s_geolocationPermission;
+
+GeolocationPermissionClientQt* GeolocationPermissionClientQt::geolocationPermissionClient()
+{
+ if (s_geolocationPermission)
+ return s_geolocationPermission;
+
+ s_geolocationPermission = new GeolocationPermissionClientQt();
+ return s_geolocationPermission;
+}
+
+GeolocationPermissionClientQt::GeolocationPermissionClientQt()
+{
+}
+
+GeolocationPermissionClientQt::~GeolocationPermissionClientQt()
+{
+}
+
+void GeolocationPermissionClientQt::requestGeolocationPermissionForFrame(QWebFrame* webFrame, Geolocation* listener)
+{
+ m_pendingPermissionRequests.insert(webFrame, listener);
+
+ QWebPage* page = webFrame->page();
+ emit page->requestPermissionFromUser(webFrame, QWebPage::GeolocationPermissionDomain);
+}
+
+
+void GeolocationPermissionClientQt::cancelGeolocationPermissionRequestForFrame(QWebFrame* webFrame, Geolocation* listener)
+{
+ m_pendingPermissionRequests.remove(webFrame);
+
+ QWebPage* page = webFrame->page();
+ emit page->cancelRequestsForPermission(webFrame, QWebPage::GeolocationPermissionDomain);
+}
+
+void GeolocationPermissionClientQt::setPermission(QWebFrame* webFrame, QWebPage::PermissionPolicy permission)
+{
+ if (!m_pendingPermissionRequests.contains(webFrame))
+ return;
+
+ Geolocation* listener = m_pendingPermissionRequests.value(webFrame);
+
+ if (permission == QWebPage::PermissionGranted)
+ listener->setIsAllowed(true);
+ else if (permission == QWebPage::PermissionDenied)
+ listener->setIsAllowed(false);
+ else
+ return;
+
+ m_pendingPermissionRequests.remove(webFrame);
+}
+
+#endif // ENABLE(GEOLOCATION)
+}
diff --git a/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
new file mode 100644
index 0000000..abe9c76
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 GeolocationPermissionClientQt_h
+#define GeolocationPermissionClientQt_h
+
+#include "Geolocation.h"
+#include "qwebpage.h"
+
+#include <QHash>
+
+class QWebFrame;
+class QWebPage;
+
+namespace WebCore {
+
+class GeolocationPermissionClientQt {
+public:
+ GeolocationPermissionClientQt();
+ ~GeolocationPermissionClientQt();
+
+ void requestGeolocationPermissionForFrame(QWebFrame*, Geolocation*);
+ void cancelGeolocationPermissionRequestForFrame(QWebFrame*, Geolocation*);
+ void setPermission(QWebFrame*, QWebPage::PermissionPolicy);
+
+ static GeolocationPermissionClientQt* geolocationPermissionClient();
+private:
+ QHash<QWebFrame*, Geolocation*> m_pendingPermissionRequests;
+};
+
+}
+
+#endif
diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 83b8600..98ce663 100644
--- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -2678,7 +2678,8 @@ void tst_QWebFrame::popupFocus()
QTRY_VERIFY(view.hasFocus());
// open the popup by clicking. check if focus is on the popup
- QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
+ const QWebElement webCombo = view.page()->mainFrame()->documentElement().findFirst(QLatin1String("select[name=select]"));
+ QTest::mouseClick(&view, Qt::LeftButton, 0, webCombo.geometry().center());
QObject* webpopup = firstChildByClassName(&view, "QComboBox");
QComboBox* combo = qobject_cast<QComboBox*>(webpopup);
QVERIFY(combo != 0);
@@ -2696,6 +2697,7 @@ void tst_QWebFrame::inputFieldFocus()
view.setHtml("<html><body><input type=\"text\"></input></body></html>");
view.resize(400, 100);
view.show();
+ QTest::qWaitForWindowShown(&view);
view.setFocus();
QTRY_VERIFY(view.hasFocus());
@@ -2703,7 +2705,8 @@ void tst_QWebFrame::inputFieldFocus()
int delay = qApp->cursorFlashTime() * 2;
// focus the lineedit and check if it blinks
- QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25));
+ const QWebElement inputElement = view.page()->mainFrame()->documentElement().findFirst(QLatin1String("input[type=text]"));
+ QTest::mouseClick(&view, Qt::LeftButton, 0, inputElement.geometry().center());
m_inputFieldsTestView = &view;
view.installEventFilter( this );
QTest::qWait(delay);
@@ -2713,13 +2716,14 @@ void tst_QWebFrame::inputFieldFocus()
void tst_QWebFrame::hitTestContent()
{
- QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\">link text</a></body></html>");
+ QString html("<html><body><p>A paragraph</p><br/><br/><br/><a href=\"about:blank\" target=\"_foo\" id=\"link\">link text</a></body></html>");
QWebPage page;
QWebFrame* frame = page.mainFrame();
frame->setHtml(html);
page.setViewportSize(QSize(200, 0)); //no height so link is not visible
- QWebHitTestResult result = frame->hitTestContent(QPoint(10, 100));
+ const QWebElement linkElement = frame->documentElement().findFirst(QLatin1String("a#link"));
+ QWebHitTestResult result = frame->hitTestContent(linkElement.geometry().center());
QCOMPARE(result.linkText(), QString("link text"));
QWebElement link = result.linkElement();
QCOMPARE(link.attribute("target"), QString("_foo"));
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 67e3ecd..9a6c35f 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -217,9 +217,12 @@ public slots:
bool shouldInterruptJavaScript() {
return true;
}
- bool allowGeolocationRequest(QWebFrame *frame)
+ void requestPermission(QWebFrame* frame, QWebPage::PermissionDomain domain)
{
- return m_allowGeolocation;
+ if (m_allowGeolocation)
+ setUserPermission(frame, domain, PermissionGranted);
+ else
+ setUserPermission(frame, domain, PermissionDenied);
}
public:
@@ -234,9 +237,6 @@ private:
void tst_QWebPage::infiniteLoopJS()
{
-#ifdef Q_WS_MAEMO_5
- QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll);
-#endif
JSTestPage* newPage = new JSTestPage(m_view);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><body>test</body></html>"), QUrl());
@@ -247,6 +247,9 @@ void tst_QWebPage::infiniteLoopJS()
void tst_QWebPage::geolocationRequestJS()
{
JSTestPage* newPage = new JSTestPage(m_view);
+ connect(newPage, SIGNAL(requestPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)),
+ newPage, SLOT(requestPermission(QWebFrame*, QWebPage::PermissionDomain)));
+
newPage->setGeolocationPermission(false);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><body>test</body></html>"), QUrl());
@@ -2028,7 +2031,7 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
m_page->setNetworkAccessManager(networkManager);
networkManager->requests.clear();
- m_view->setHtml(QString("data:text/html,<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
+ m_view->setHtml(QString("<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
"<head><meta http-equiv='refresh' content='1'></head>foo \">"
"<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
diff --git a/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index 57f726d..fd4978d 100644
--- a/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -28,6 +28,7 @@
#include <qnetworkrequest.h>
#include <qdiriterator.h>
#include <qwebkitversion.h>
+#include <qwebelement.h>
#include <qwebframe.h>
class tst_QWebView : public QObject
@@ -52,20 +53,6 @@ private slots:
void crashTests();
};
-class WebView : public QWebView
-{
- Q_OBJECT
-
-public:
- void fireMouseClick(QPoint point) {
- QMouseEvent presEv(QEvent::MouseButtonPress, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
- QMouseEvent relEv(QEvent::MouseButtonRelease, point, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
- QWebView::mousePressEvent(&presEv);
- QWebView::mousePressEvent(&relEv);
- }
-
-};
-
// This will be called before the first test function is executed.
// It is only called once.
void tst_QWebView::initTestCase()
@@ -245,79 +232,86 @@ void tst_QWebView::microFocusCoordinates()
void tst_QWebView::focusInputTypes()
{
- QWebPage* page = new QWebPage;
- WebView* webView = new WebView;
- webView->setPage( page );
+ QWebView webView;
+ webView.show();
+ QTest::qWaitForWindowShown(&webView);
- QCoreApplication::processEvents();
QUrl url("qrc:///resources/input_types.html");
- page->mainFrame()->load(url);
- page->mainFrame()->setFocus();
+ QWebFrame* const mainFrame = webView.page()->mainFrame();
+ mainFrame->load(url);
+ mainFrame->setFocus();
- QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+ QVERIFY(waitForSignal(&webView, SIGNAL(loadFinished(bool))));
// 'text' type
- webView->fireMouseClick(QPoint(20, 10));
+ QWebElement inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=text]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoPredictiveText);
#else
- QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+ QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
#endif
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
- webView->fireMouseClick(QPoint(20, 60));
- QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'tel' field
- webView->fireMouseClick(QPoint(20, 110));
- QVERIFY(webView->inputMethodHints() == Qt::ImhDialableCharactersOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=tel]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhDialableCharactersOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'number' field
- webView->fireMouseClick(QPoint(20, 160));
- QVERIFY(webView->inputMethodHints() == Qt::ImhDigitsOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=number]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhDigitsOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'email' field
- webView->fireMouseClick(QPoint(20, 210));
- QVERIFY(webView->inputMethodHints() == Qt::ImhEmailCharactersOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=email]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhEmailCharactersOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'url' field
- webView->fireMouseClick(QPoint(20, 260));
- QVERIFY(webView->inputMethodHints() == Qt::ImhUrlCharactersOnly);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=url]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhUrlCharactersOnly);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
- webView->fireMouseClick(QPoint(20, 60));
- QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'text' type
- webView->fireMouseClick(QPoint(20, 10));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=text]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(Q_OS_SYMBIAN)
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoAutoUppercase);
- QVERIFY(webView->inputMethodHints() & Qt::ImhNoPredictiveText);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoAutoUppercase);
+ QVERIFY(webView.inputMethodHints() & Qt::ImhNoPredictiveText);
#else
- QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
+ QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
#endif
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'password' field
- webView->fireMouseClick(QPoint(20, 60));
- QVERIFY(webView->inputMethodHints() == Qt::ImhHiddenText);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("input[type=password]"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhHiddenText);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
// 'text area' field
- webView->fireMouseClick(QPoint(20, 320));
- QVERIFY(webView->inputMethodHints() == Qt::ImhNone);
- QVERIFY(webView->testAttribute(Qt::WA_InputMethodEnabled));
-
- delete webView;
-
+ inputElement = mainFrame->documentElement().findFirst(QLatin1String("textarea"));
+ QTest::mouseClick(&webView, Qt::LeftButton, 0, inputElement.geometry().center());
+ QVERIFY(webView.inputMethodHints() == Qt::ImhNone);
+ QVERIFY(webView.testAttribute(Qt::WA_InputMethodEnabled));
}
QTEST_MAIN(tst_QWebView)
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9a20e51..b3877dc 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,96 @@
+2010-09-01 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebViews should allow their parent windows to handle WM_MOUSEACTIVATE messages.
+ https://bugs.webkit.org/show_bug.cgi?id=45047
+
+ * WebView.cpp:
+ (WebView::WebViewWndProc):
+
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * WebFrame.cpp:
+ (WebFrame::paintDocumentRectToContext):
+ * WebView.cpp:
+ (WebView::updateBackingStore):
+
+2010-08-30 Adam Roben <aroben@apple.com>
+
+ Fix crash on launch on Windows due to changing IWebFramePrivate's
+ vtable
+
+ This regressed in r65107.
+
+ Fixes <http://webkit.org/b/44755>.
+
+ Rubber-stamped by Jon Honeycutt.
+
+ * Interfaces/IWebFramePrivate.idl: Moved suspendAnimations and
+ resumeAnimations to the end of the interface so that the vtable will
+ match what Safari expects.
+
+2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66198.
+ http://trac.webkit.org/changeset/66198
+ https://bugs.webkit.org/show_bug.cgi?id=44856
+
+ It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-08-27 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Revert r66103 since Qt tests are failing.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
+2010-08-26 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=44230
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::~WebInspectorFrontendClient):
+ (WebInspectorFrontendClient::closeWindow):
+ (WebInspectorFrontendClient::disconnectFromBackend):
+ (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+ (WebInspectorFrontendClient::destroyInspectorView):
+ * WebCoreSupport/WebInspectorClient.h:
+
2010-08-24 Ada Chan <adachan@apple.com>
Reviewed by Steve Falkenburg.
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index cf25204..bc9a4bd 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -90,8 +90,6 @@ interface IWebFramePrivate : IUnknown
HRESULT pauseAnimation([in] BSTR animationName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
HRESULT pauseTransition([in] BSTR propertyName, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* transitionWasRunning);
HRESULT numberOfActiveAnimations([out, retval] UINT* number);
- HRESULT suspendAnimations();
- HRESULT resumeAnimations();
HRESULT isDisplayingStandaloneImage([out, retval] BOOL* result);
@@ -116,4 +114,7 @@ interface IWebFramePrivate : IUnknown
HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
HRESULT renderTreeAsExternalRepresentation([in] BOOL forPrinting, [out, retval] BSTR* result);
+
+ HRESULT suspendAnimations();
+ HRESULT resumeAnimations();
}
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index d0cd1e8..d12989b 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -340,7 +340,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext(
return E_FAIL;
// We can't paint with a layout still pending.
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
HDC dc = reinterpret_cast<HDC>(static_cast<ULONG64>(deviceContext));
GraphicsContext gc(dc);
@@ -373,7 +373,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::paintScrollViewRectToContextAtPoint(
return E_FAIL;
// We can't paint with a layout still pending.
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
HDC dc = reinterpret_cast<HDC>(static_cast<ULONG64>(deviceContext));
GraphicsContext gc(dc);
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index c682e91..5aa4fc4 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -910,7 +910,7 @@ void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore
// Do a layout first so that everything we render to the backing store is always current.
if (Frame* coreFrame = core(m_mainFrame))
if (FrameView* view = coreFrame->view())
- view->layoutIfNeededRecursive();
+ view->updateLayoutAndStyleIfNeededRecursive();
Vector<IntRect> paintRects;
if (!backingStoreCompletelyDirty && m_backingStoreDirtyRegion) {
@@ -2193,6 +2193,7 @@ LRESULT CALLBACK WebView::WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam,
break;
case WM_MOUSEACTIVATE:
webView->setMouseActivated(true);
+ handled = false;
break;
case WM_GETDLGCODE: {
COMPtr<IWebUIDelegate> uiDelegate;
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
new file mode 100644
index 0000000..ea106fe
--- /dev/null
+++ b/WebKit/wince/ChangeLog
@@ -0,0 +1,120 @@
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add EditorClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44822
+
+ * WebCoreSupport/EditorClientWinCE.cpp: Added.
+ (WebKit::EditorClient::EditorClient):
+ (WebKit::EditorClient::~EditorClient):
+ (WebKit::EditorClient::setInputMethodState):
+ (WebKit::EditorClient::shouldDeleteRange):
+ (WebKit::EditorClient::shouldShowDeleteInterface):
+ (WebKit::EditorClient::isContinuousSpellCheckingEnabled):
+ (WebKit::EditorClient::isGrammarCheckingEnabled):
+ (WebKit::EditorClient::spellCheckerDocumentTag):
+ (WebKit::EditorClient::shouldBeginEditing):
+ (WebKit::EditorClient::shouldEndEditing):
+ (WebKit::EditorClient::shouldInsertText):
+ (WebKit::EditorClient::shouldChangeSelectedRange):
+ (WebKit::EditorClient::shouldApplyStyle):
+ (WebKit::EditorClient::shouldMoveRangeAfterDelete):
+ (WebKit::EditorClient::didBeginEditing):
+ (WebKit::EditorClient::respondToChangedContents):
+ (WebKit::EditorClient::respondToChangedSelection):
+ (WebKit::EditorClient::didEndEditing):
+ (WebKit::EditorClient::didWriteSelectionToPasteboard):
+ (WebKit::EditorClient::didSetSelectionTypesForPasteboard):
+ (WebKit::EditorClient::isEditable):
+ (WebKit::EditorClient::registerCommandForUndo):
+ (WebKit::EditorClient::registerCommandForRedo):
+ (WebKit::EditorClient::clearUndoRedoOperations):
+ (WebKit::EditorClient::canUndo):
+ (WebKit::EditorClient::canRedo):
+ (WebKit::EditorClient::undo):
+ (WebKit::EditorClient::redo):
+ (WebKit::EditorClient::shouldInsertNode):
+ (WebKit::EditorClient::pageDestroyed):
+ (WebKit::EditorClient::smartInsertDeleteEnabled):
+ (WebKit::EditorClient::isSelectTrailingWhitespaceEnabled):
+ (WebKit::EditorClient::toggleContinuousSpellChecking):
+ (WebKit::EditorClient::toggleGrammarChecking):
+ (WebKit::EditorClient::handleKeyboardEvent):
+ (WebKit::EditorClient::handleInputMethodKeydown):
+ (WebKit::EditorClient::textFieldDidBeginEditing):
+ (WebKit::EditorClient::textFieldDidEndEditing):
+ (WebKit::EditorClient::textDidChangeInTextField):
+ (WebKit::EditorClient::doTextFieldCommandFromEvent):
+ (WebKit::EditorClient::textWillBeDeletedInTextField):
+ (WebKit::EditorClient::textDidChangeInTextArea):
+ (WebKit::EditorClient::ignoreWordInSpellDocument):
+ (WebKit::EditorClient::learnWord):
+ (WebKit::EditorClient::checkSpellingOfString):
+ (WebKit::EditorClient::getAutoCorrectSuggestionForMisspelledWord):
+ (WebKit::EditorClient::checkGrammarOfString):
+ (WebKit::EditorClient::updateSpellingUIWithGrammarString):
+ (WebKit::EditorClient::updateSpellingUIWithMisspelledWord):
+ (WebKit::EditorClient::showSpellingUI):
+ (WebKit::EditorClient::spellingUIIsShowing):
+ (WebKit::EditorClient::getGuessesForWord):
+ (WebKit::EditorClient::willSetInputMethodState):
+ * WebCoreSupport/EditorClientWinCE.h: Added.
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add DragClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44821
+
+ * WebCoreSupport/DragClientWinCE.cpp: Added.
+ (WebKit::DragClient::willPerformDragDestinationAction):
+ (WebKit::DragClient::willPerformDragSourceAction):
+ (WebKit::DragClient::actionMaskForDrag):
+ (WebKit::DragClient::dragSourceActionMaskForPoint):
+ (WebKit::DragClient::startDrag):
+ (WebKit::DragClient::createDragImageForLink):
+ (WebKit::DragClient::dragControllerDestroyed):
+ * WebCoreSupport/DragClientWinCE.h: Added.
+
+2010-08-31 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add ContextMenuClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44820
+
+ * WebCoreSupport/ContextMenuClientWinCE.cpp: Added.
+ (WebKit::ContextMenuClient::ContextMenuClient):
+ (WebKit::ContextMenuClient::contextMenuDestroyed):
+ (WebKit::ContextMenuClient::getCustomMenuFromDefaultItems):
+ (WebKit::ContextMenuClient::contextMenuItemSelected):
+ (WebKit::ContextMenuClient::downloadURL):
+ (WebKit::ContextMenuClient::copyImageToClipboard):
+ (WebKit::ContextMenuClient::searchWithGoogle):
+ (WebKit::ContextMenuClient::lookUpInDictionary):
+ (WebKit::ContextMenuClient::speak):
+ (WebKit::ContextMenuClient::stopSpeaking):
+ (WebKit::ContextMenuClient::isSpeaking):
+ * WebCoreSupport/ContextMenuClientWinCE.h: Added.
+
+2010-08-28 Patrick Gansterer <paroga@paroga.com>
+
+ Reviewed by Adam Roben.
+
+ Add InspectorClientWinCE
+ https://bugs.webkit.org/show_bug.cgi?id=44819
+
+ * WebCoreSupport/InspectorClientWinCE.cpp: Added.
+ (WebKit::InspectorClient::InspectorClient):
+ (WebKit::InspectorClient::~InspectorClient):
+ (WebKit::InspectorClient::inspectorDestroyed):
+ (WebKit::InspectorClient::openInspectorFrontend):
+ (WebKit::InspectorClient::releaseFrontendPage):
+ (WebKit::InspectorClient::highlight):
+ (WebKit::InspectorClient::hideHighlight):
+ (WebKit::InspectorClient::populateSetting):
+ (WebKit::InspectorClient::storeSetting):
+ (WebKit::InspectorClient::sendMessageToFrontend):
+ * WebCoreSupport/InspectorClientWinCE.h: Added.
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
new file mode 100644
index 0000000..011c2ea
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ContextMenuClientWinCE.h"
+
+#include "ContextMenu.h"
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+ContextMenuClient::ContextMenuClient(WebView *webView)
+ : m_webView(webView)
+{
+}
+
+void ContextMenuClient::contextMenuDestroyed()
+{
+ delete this;
+}
+
+PlatformMenuDescription ContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu)
+{
+ return menu->releasePlatformDescription();
+}
+
+void ContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::downloadURL(const KURL& url)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::copyImageToClipboard(const HitTestResult&)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::searchWithGoogle(const Frame*)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::lookUpInDictionary(Frame*)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::speak(const String&)
+{
+ notImplemented();
+}
+
+void ContextMenuClient::stopSpeaking()
+{
+ notImplemented();
+}
+
+bool ContextMenuClient::isSpeaking()
+{
+ notImplemented();
+ return false;
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
new file mode 100644
index 0000000..3d51f3c
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ContextMenuClientWinCE_h
+#define ContextMenuClientWinCE_h
+
+#include "ContextMenuClient.h"
+
+class WebView;
+
+namespace WebKit {
+
+class ContextMenuClient : public WebCore::ContextMenuClient {
+public:
+ ContextMenuClient(WebView*);
+
+ virtual void contextMenuDestroyed();
+
+ virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*);
+ virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
+
+ virtual void downloadURL(const WebCore::KURL&);
+ virtual void copyImageToClipboard(const WebCore::HitTestResult&);
+ virtual void searchWithGoogle(const WebCore::Frame*);
+ virtual void lookUpInDictionary(WebCore::Frame*);
+ virtual void speak(const WTF::String&);
+ virtual void stopSpeaking();
+ virtual bool isSpeaking();
+
+private:
+ WebView* m_webView;
+};
+
+} // namespace WebKit
+
+#endif // ContextMenuClientWinCE_h
diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp
new file mode 100644
index 0000000..cd94547
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "DragClientWinCE.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void DragClient::willPerformDragDestinationAction(DragDestinationAction, DragData*)
+{
+ notImplemented();
+}
+
+void DragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*)
+{
+ notImplemented();
+}
+
+DragDestinationAction DragClient::actionMaskForDrag(DragData*)
+{
+ notImplemented();
+ return DragDestinationActionAny;
+}
+
+DragSourceAction DragClient::dragSourceActionMaskForPoint(const IntPoint&)
+{
+ notImplemented();
+ return DragSourceActionAny;
+}
+
+void DragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool)
+{
+ notImplemented();
+}
+
+DragImageRef DragClient::createDragImageForLink(KURL&, const String& label, Frame*)
+{
+ notImplemented();
+ return 0;
+}
+
+void DragClient::dragControllerDestroyed()
+{
+ delete this;
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.h b/WebKit/wince/WebCoreSupport/DragClientWinCE.h
new file mode 100644
index 0000000..01dba3c
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DragClientWinCE_h
+#define DragClientWinCE_h
+
+#include "DragClient.h"
+
+namespace WebKit {
+
+class DragClient : public WebCore::DragClient {
+public:
+ virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*);
+ virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*);
+ virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*);
+
+ virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&);
+
+ virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::Clipboard*, WebCore::Frame*, bool = false);
+ virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL&, const WTF::String&, WebCore::Frame*);
+
+ virtual void dragControllerDestroyed();
+};
+
+} // namespace WebKit
+
+#endif // DragClientWinCE_h
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
new file mode 100644
index 0000000..d81fc02
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
@@ -0,0 +1,315 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EditorClientWinCE.h"
+
+#include "EditCommand.h"
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+EditorClient::EditorClient(WebView* webView)
+ : m_webView(webView)
+{
+}
+
+EditorClient::~EditorClient()
+{
+}
+
+void EditorClient::setInputMethodState(bool active)
+{
+ notImplemented();
+}
+
+bool EditorClient::shouldDeleteRange(Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldShowDeleteInterface(HTMLElement*)
+{
+ return false;
+}
+
+bool EditorClient::isContinuousSpellCheckingEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClient::isGrammarCheckingEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+int EditorClient::spellCheckerDocumentTag()
+{
+ notImplemented();
+ return 0;
+}
+
+bool EditorClient::shouldBeginEditing(WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldEndEditing(WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldInsertText(const String&, Range*, EditorInsertAction)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldChangeSelectedRange(Range*, Range*, EAffinity, bool)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+bool EditorClient::shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*)
+{
+ notImplemented();
+ return true;
+}
+
+void EditorClient::didBeginEditing()
+{
+ notImplemented();
+}
+
+void EditorClient::respondToChangedContents()
+{
+ notImplemented();
+}
+
+void EditorClient::respondToChangedSelection()
+{
+ notImplemented();
+}
+
+void EditorClient::didEndEditing()
+{
+ notImplemented();
+}
+
+void EditorClient::didWriteSelectionToPasteboard()
+{
+ notImplemented();
+}
+
+void EditorClient::didSetSelectionTypesForPasteboard()
+{
+ notImplemented();
+}
+
+bool EditorClient::isEditable()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command)
+{
+ notImplemented();
+}
+
+void EditorClient::registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand> command)
+{
+ notImplemented();
+}
+
+void EditorClient::clearUndoRedoOperations()
+{
+ notImplemented();
+}
+
+bool EditorClient::canUndo() const
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClient::canRedo() const
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::undo()
+{
+ notImplemented();
+}
+
+void EditorClient::redo()
+{
+ notImplemented();
+}
+
+bool EditorClient::shouldInsertNode(Node*, Range*, EditorInsertAction)
+{
+ notImplemented();
+ return true;
+}
+
+void EditorClient::pageDestroyed()
+{
+ delete this;
+}
+
+bool EditorClient::smartInsertDeleteEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+bool EditorClient::isSelectTrailingWhitespaceEnabled()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::toggleContinuousSpellChecking()
+{
+ notImplemented();
+}
+
+void EditorClient::toggleGrammarChecking()
+{
+ notImplemented();
+}
+
+void EditorClient::handleKeyboardEvent(KeyboardEvent* event)
+{
+ notImplemented();
+}
+
+void EditorClient::handleInputMethodKeydown(KeyboardEvent* event)
+{
+ notImplemented();
+}
+
+void EditorClient::textFieldDidBeginEditing(Element*)
+{
+}
+
+void EditorClient::textFieldDidEndEditing(Element*)
+{
+}
+
+void EditorClient::textDidChangeInTextField(Element*)
+{
+}
+
+bool EditorClient::doTextFieldCommandFromEvent(Element*, KeyboardEvent*)
+{
+ return false;
+}
+
+void EditorClient::textWillBeDeletedInTextField(Element*)
+{
+ notImplemented();
+}
+
+void EditorClient::textDidChangeInTextArea(Element*)
+{
+ notImplemented();
+}
+
+void EditorClient::ignoreWordInSpellDocument(const String& text)
+{
+ notImplemented();
+}
+
+void EditorClient::learnWord(const String& text)
+{
+ notImplemented();
+}
+
+void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength)
+{
+ notImplemented();
+}
+
+String EditorClient::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord)
+{
+ // This method can be implemented using customized algorithms for the particular browser.
+ // Currently, it computes an empty string.
+ return String();
+}
+
+void EditorClient::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*)
+{
+ notImplemented();
+}
+
+void EditorClient::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&)
+{
+ notImplemented();
+}
+
+void EditorClient::updateSpellingUIWithMisspelledWord(const String&)
+{
+ notImplemented();
+}
+
+void EditorClient::showSpellingUI(bool)
+{
+ notImplemented();
+}
+
+bool EditorClient::spellingUIIsShowing()
+{
+ notImplemented();
+ return false;
+}
+
+void EditorClient::getGuessesForWord(const String& word, WTF::Vector<String>& guesses)
+{
+ notImplemented();
+}
+
+void EditorClient::willSetInputMethodState()
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
new file mode 100644
index 0000000..943f591
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EditorClientWinCE_h
+#define EditorClientWinCE_h
+
+#include "EditorClient.h"
+
+class WebView;
+
+namespace WebKit {
+
+class EditorClient : public WebCore::EditorClient {
+public:
+ EditorClient(WebView*);
+ ~EditorClient();
+
+ virtual void pageDestroyed();
+
+ virtual bool shouldDeleteRange(WebCore::Range*);
+ virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*);
+ virtual bool smartInsertDeleteEnabled();
+ virtual bool isSelectTrailingWhitespaceEnabled();
+ virtual bool isContinuousSpellCheckingEnabled();
+ virtual void toggleContinuousSpellChecking();
+ virtual bool isGrammarCheckingEnabled();
+ virtual void toggleGrammarChecking();
+ virtual int spellCheckerDocumentTag();
+
+ virtual bool isEditable();
+
+ virtual bool shouldBeginEditing(WebCore::Range*);
+ virtual bool shouldEndEditing(WebCore::Range*);
+ virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction);
+ virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction);
+ virtual bool shouldChangeSelectedRange(WebCore::Range*, WebCore::Range*, WebCore::EAffinity, bool);
+
+ virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*);
+ virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*);
+
+ virtual void didBeginEditing();
+ virtual void respondToChangedContents();
+ virtual void respondToChangedSelection();
+ virtual void didEndEditing();
+ virtual void didWriteSelectionToPasteboard();
+ virtual void didSetSelectionTypesForPasteboard();
+
+ virtual void registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand>);
+ virtual void registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand>);
+ virtual void clearUndoRedoOperations();
+
+ virtual bool canUndo() const;
+ virtual bool canRedo() const;
+
+ virtual void undo();
+ virtual void redo();
+
+ virtual void handleKeyboardEvent(WebCore::KeyboardEvent*);
+ virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*);
+
+ virtual void textFieldDidBeginEditing(WebCore::Element*);
+ virtual void textFieldDidEndEditing(WebCore::Element*);
+ virtual void textDidChangeInTextField(WebCore::Element*);
+ virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*);
+ virtual void textWillBeDeletedInTextField(WebCore::Element*);
+ virtual void textDidChangeInTextArea(WebCore::Element*);
+
+ virtual void ignoreWordInSpellDocument(const WTF::String&);
+ virtual void learnWord(const WTF::String&);
+ virtual void checkSpellingOfString(const UChar*, int, int*, int*);
+ virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&);
+ virtual void checkGrammarOfString(const UChar*, int, WTF::Vector<WebCore::GrammarDetail>&, int*, int*);
+ virtual void updateSpellingUIWithGrammarString(const WTF::String&, const WebCore::GrammarDetail&);
+ virtual void updateSpellingUIWithMisspelledWord(const WTF::String&);
+ virtual void showSpellingUI(bool);
+ virtual bool spellingUIIsShowing();
+ virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>&);
+ virtual void willSetInputMethodState();
+ virtual void setInputMethodState(bool);
+
+private:
+ WebView* m_webView;
+};
+
+} // namespace WebKit
+
+#endif // EditorClientWinCE_h
diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp
new file mode 100644
index 0000000..debc611
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "InspectorClientWinCE.h"
+
+#include "NotImplemented.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+InspectorClient::InspectorClient(WebView* webView)
+ : m_inspectedWebView(webView)
+{
+}
+
+InspectorClient::~InspectorClient()
+{
+}
+
+void InspectorClient::inspectorDestroyed()
+{
+ delete this;
+}
+
+void InspectorClient::openInspectorFrontend(InspectorController* controller)
+{
+ notImplemented();
+}
+
+void InspectorClient::releaseFrontendPage()
+{
+ notImplemented();
+}
+
+void InspectorClient::highlight(Node* node)
+{
+ notImplemented();
+}
+
+void InspectorClient::hideHighlight()
+{
+ notImplemented();
+}
+
+void InspectorClient::populateSetting(const String& key, String* value)
+{
+ notImplemented();
+}
+
+void InspectorClient::storeSetting(const String& key, const String& value)
+{
+ notImplemented();
+}
+
+bool InspectorClient::sendMessageToFrontend(const String& message)
+{
+ notImplemented();
+ return false;
+}
+
+} // namespace WebKit
diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h
new file mode 100644
index 0000000..45fcc5b
--- /dev/null
+++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef InspectorClientWinCE_h
+#define InspectorClientWinCE_h
+
+#include "InspectorClient.h"
+
+class WebView;
+
+namespace WebKit {
+
+class InspectorClient : public WebCore::InspectorClient {
+public:
+ InspectorClient(WebView* webView);
+ ~InspectorClient();
+
+ virtual void inspectorDestroyed();
+
+ virtual void openInspectorFrontend(WebCore::InspectorController*);
+
+ virtual void highlight(WebCore::Node*);
+ virtual void hideHighlight();
+
+ virtual void populateSetting(const WTF::String& key, WTF::String* value);
+ virtual void storeSetting(const WTF::String& key, const WTF::String& value);
+
+ virtual bool sendMessageToFrontend(const WTF::String&);
+
+ void releaseFrontendPage();
+
+private:
+ WebView* m_inspectedWebView;
+};
+
+} // namespace WebKit
+
+#endif // InspectorClientWinCE_h
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index 342edea..757981f 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,59 @@
+2010-08-31 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
+ the former can occur in more places without having to do the latter.
+
+ * WebView.cpp:
+ (wxWebView::OnPaint):
+
+2010-08-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after parseMode -> compatibilityMode rename.
+
+ * WebFrame.cpp:
+ (wxWebFrame::GetCompatibilityMode):
+ * WebFrame.h:
+ * WebView.cpp:
+ (wxWebView::GetCompatibilityMode):
+ * WebView.h:
+
+2010-08-26 Robin Dunn <robin@alldunn.com>
+
+ Reviewed by Kevin Ollivier.
+
+ A few tweaks to the wxWebView editing APIs after addition of DOM bindings.
+ https://bugs.webkit.org/show_bug.cgi?id=44656
+
+ 1. adoptRef fix for WebCore::EditCommand wrapper API.
+ 2. Add the mimetype as an argument to SetPageSource to allow XHTML documents to be loaded.
+ 3. Add notification events for contents / selection changed editing events.
+ 4. Improved wxPython binding typemaps support for DOM APIs.
+
+ * WebEdit.cpp:
+ (WebCoreEditCommandPrivate::WebCoreEditCommandPrivate):
+ (WebCoreEditCommandPrivate::~WebCoreEditCommandPrivate):
+ (WebCoreEditCommandPrivate::command):
+ (wxWebEditCommand::wxWebEditCommand):
+ (wxWebEditCommand::~wxWebEditCommand):
+ (wxWebEditCommand::SetNodeAttribute):
+ (wxWebEditCommand::Apply):
+ * WebEdit.h:
+ * WebFrame.cpp:
+ (wxWebFrame::SetPageSource):
+ * WebFrame.h:
+ * WebKitSupport/EditorClientWx.cpp:
+ (WebCore::EditorClientWx::respondToChangedContents):
+ (WebCore::EditorClientWx::respondToChangedSelection):
+ * WebSettings.h:
+ * WebView.cpp:
+ (wxWebViewContentsChangedEvent::wxWebViewContentsChangedEvent):
+ (wxWebViewSelectionChangedEvent::wxWebViewSelectionChangedEvent):
+ (wxWebView::SetPageSource):
+ * WebView.h:
+ * bindings/python/webview.i:
+
2010-08-16 Kevin Ollivier <kevino@theolliviers.com>
[wx] Build fix, do not build WebCore as a convenience library as this leads to
diff --git a/WebKit/wx/WebEdit.cpp b/WebKit/wx/WebEdit.cpp
index 503e2ed..33b4c86 100644
--- a/WebKit/wx/WebEdit.cpp
+++ b/WebKit/wx/WebEdit.cpp
@@ -34,32 +34,47 @@ public:
}
+class WebCoreEditCommandPrivate {
+public:
+ WebCoreEditCommandPrivate()
+ : m_ptr(0)
+ { }
+
+ WebCoreEditCommandPrivate(WebCore::WebCoreEditCommand* ptr)
+ : m_ptr(adoptRef(ptr))
+ { }
+
+ ~WebCoreEditCommandPrivate() { }
+
+ WebCore::WebCoreEditCommand* command() { return m_ptr.get(); }
+
+ RefPtr<WebCore::WebCoreEditCommand> m_ptr;
+};
+
wxWebEditCommand::wxWebEditCommand(wxWebFrame* webframe)
{
if (webframe) {
WebCore::Frame* frame = webframe->GetFrame();
if (frame && frame->document())
- m_impl = new WebCore::WebCoreEditCommand(frame->document());
- m_impl->ref();
+ m_impl = new WebCoreEditCommandPrivate(new WebCore::WebCoreEditCommand(frame->document()));
}
}
wxWebEditCommand::~wxWebEditCommand()
{
// the impl. is ref-counted, so don't delete it as it may be in an undo/redo stack
- if (m_impl)
- m_impl->deref();
+ delete m_impl;
m_impl = 0;
}
void wxWebEditCommand::SetNodeAttribute(WebDOMElement* element, const wxString& name, const wxString& value)
{
- if (m_impl)
- m_impl->setElementAttribute(element->impl(), WebCore::QualifiedName(WTF::nullAtom, WTF::String(name), WTF::nullAtom), WTF::String(value));
+ if (m_impl && m_impl->command())
+ m_impl->command()->setElementAttribute(element->impl(), WebCore::QualifiedName(WTF::nullAtom, WTF::String(name), WTF::nullAtom), WTF::String(value));
}
void wxWebEditCommand::Apply()
{
- if (m_impl)
- m_impl->apply();
-} \ No newline at end of file
+ if (m_impl && m_impl->command())
+ m_impl->command()->apply();
+}
diff --git a/WebKit/wx/WebEdit.h b/WebKit/wx/WebEdit.h
index 7099088..e4bba91 100644
--- a/WebKit/wx/WebEdit.h
+++ b/WebKit/wx/WebEdit.h
@@ -41,6 +41,7 @@ namespace WebCore {
}
class WebDOMElement;
+class WebCoreEditCommandPrivate;
class wxWebFrame;
class WXDLLIMPEXP_WEBKIT wxWebEditCommand
@@ -56,7 +57,7 @@ public:
void Apply();
private:
- WebCore::WebCoreEditCommand* m_impl;
+ WebCoreEditCommandPrivate* m_impl;
};
#endif
diff --git a/WebKit/wx/WebFrame.cpp b/WebKit/wx/WebFrame.cpp
index f9be56f..fe45eea 100644
--- a/WebKit/wx/WebFrame.cpp
+++ b/WebKit/wx/WebFrame.cpp
@@ -155,7 +155,7 @@ wxString wxWebFrame::GetPageSource()
return wxEmptyString;
}
-void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl)
+void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
{
if (m_impl->frame && m_impl->frame->loader()) {
WebCore::KURL url(WebCore::KURL(), baseUrl);
@@ -164,7 +164,7 @@ void wxWebFrame::SetPageSource(const wxString& source, const wxString& baseUrl)
const char* contents = charBuffer;
WTF::PassRefPtr<WebCore::SharedBuffer> sharedBuffer = WebCore::SharedBuffer::create(contents, strlen(contents));
- WebCore::SubstituteData substituteData(sharedBuffer, WTF::String("text/html"), WTF::String("UTF-8"), WebCore::blankURL(), url);
+ WebCore::SubstituteData substituteData(sharedBuffer, mimetype, WTF::String("UTF-8"), WebCore::blankURL(), url);
m_impl->frame->loader()->stop();
m_impl->frame->loader()->load(WebCore::ResourceRequest(url), substituteData, false);
@@ -476,12 +476,12 @@ bool wxWebFrame::ShouldClose() const
return true;
}
-wxWebKitParseMode wxWebFrame::GetParseMode() const
+wxWebKitCompatibilityMode wxWebFrame::GetCompatibilityMode() const
{
if (m_impl->frame && m_impl->frame->document())
- return (wxWebKitParseMode)m_impl->frame->document()->parseMode();
+ return (wxWebKitCompatibilityMode)m_impl->frame->document()->compatibilityMode();
- return NoDocument;
+ return QuirksMode;
}
void wxWebFrame::GrantUniversalAccess()
diff --git a/WebKit/wx/WebFrame.h b/WebKit/wx/WebFrame.h
index f09c884..3e9355a 100644
--- a/WebKit/wx/WebFrame.h
+++ b/WebKit/wx/WebFrame.h
@@ -93,7 +93,7 @@ private:
};
// based on enums in WebCore/dom/Document.h
-enum wxWebKitParseMode { Compat, AlmostStrict, Strict, NoDocument };
+enum wxWebKitCompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
class WXDLLIMPEXP_WEBKIT wxWebFrame
{
@@ -134,7 +134,7 @@ public:
void Redo();
wxString GetPageSource();
- void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString);
+ void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString, const wxString& mimetype = wxT("text/html"));
wxString GetInnerText();
wxString GetAsMarkup();
@@ -167,7 +167,7 @@ public:
bool ShouldClose() const;
- wxWebKitParseMode GetParseMode() const;
+ wxWebKitCompatibilityMode GetCompatibilityMode() const;
void GrantUniversalAccess();
diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.cpp b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
index 99afec8..59e2fd4 100644
--- a/WebKit/wx/WebKitSupport/EditorClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/EditorClientWx.cpp
@@ -262,7 +262,15 @@ void EditorClientWx::didBeginEditing()
void EditorClientWx::respondToChangedContents()
{
- notImplemented();
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+
+ if (frame) {
+ wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ if (webKitWin) {
+ wxWebViewContentsChangedEvent wkEvent(webKitWin);
+ webKitWin->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+ }
}
void EditorClientWx::didEndEditing()
@@ -483,7 +491,14 @@ void EditorClientWx::textDidChangeInTextArea(Element*)
void EditorClientWx::respondToChangedSelection()
{
- notImplemented();
+ Frame* frame = m_page->focusController()->focusedOrMainFrame();
+ if (frame) {
+ wxWebView* webKitWin = dynamic_cast<wxWebView*>(frame->view()->hostWindow()->platformPageClient());
+ if (webKitWin) {
+ wxWebViewSelectionChangedEvent wkEvent(webKitWin);
+ webKitWin->GetEventHandler()->ProcessEvent(wkEvent);
+ }
+ }
}
void EditorClientWx::ignoreWordInSpellDocument(const String&)
diff --git a/WebKit/wx/WebSettings.h b/WebKit/wx/WebSettings.h
index 148755a..9ab5502 100644
--- a/WebKit/wx/WebSettings.h
+++ b/WebKit/wx/WebSettings.h
@@ -66,6 +66,8 @@ public:
{}
wxWebSettings() : wxObject() {}
+
+ virtual ~wxWebSettings() { }
/**
Sets the default font size for fixed fonts.
diff --git a/WebKit/wx/WebView.cpp b/WebKit/wx/WebView.cpp
index 3b0bcb0..5980236 100644
--- a/WebKit/wx/WebView.cpp
+++ b/WebKit/wx/WebView.cpp
@@ -226,6 +226,29 @@ wxWebViewWindowObjectClearedEvent::wxWebViewWindowObjectClearedEvent(wxWindow* w
SetId(win->GetId());
}
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewContentsChangedEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_CONTENTS_CHANGED)
+
+wxWebViewContentsChangedEvent::wxWebViewContentsChangedEvent(wxWindow* win)
+{
+ SetEventType(wxEVT_WEBVIEW_CONTENTS_CHANGED);
+ SetEventObject(win);
+ if (win)
+ SetId(win->GetId());
+}
+
+IMPLEMENT_DYNAMIC_CLASS(wxWebViewSelectionChangedEvent, wxCommandEvent)
+
+DEFINE_EVENT_TYPE(wxEVT_WEBVIEW_SELECTION_CHANGED)
+
+wxWebViewSelectionChangedEvent::wxWebViewSelectionChangedEvent(wxWindow* win)
+{
+ SetEventType(wxEVT_WEBVIEW_SELECTION_CHANGED);
+ SetEventObject(win);
+ if (win)
+ SetId(win->GetId());
+}
//---------------------------------------------------------
// DOM Element info data type
@@ -438,10 +461,10 @@ wxString wxWebView::GetPageSource()
return wxEmptyString;
}
-void wxWebView::SetPageSource(const wxString& source, const wxString& baseUrl)
+void wxWebView::SetPageSource(const wxString& source, const wxString& baseUrl, const wxString& mimetype)
{
if (m_mainFrame)
- m_mainFrame->SetPageSource(source, baseUrl);
+ m_mainFrame->SetPageSource(source, baseUrl, mimetype);
}
wxString wxWebView::GetInnerText()
@@ -661,7 +684,7 @@ void wxWebView::OnPaint(wxPaintEvent& event)
WebCore::GraphicsContext gc(&dc);
#endif
if (frame->contentRenderer()) {
- frame->view()->layoutIfNeededRecursive();
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
frame->view()->paint(&gc, paintRect);
}
}
@@ -1121,12 +1144,12 @@ wxWebSettings wxWebView::GetWebSettings()
return wxWebSettings();
}
-wxWebKitParseMode wxWebView::GetParseMode() const
+wxWebKitCompatibilityMode wxWebView::GetCompatibilityMode() const
{
if (m_mainFrame)
- return m_mainFrame->GetParseMode();
+ return m_mainFrame->GetCompatibilityMode();
- return NoDocument;
+ return QuirksMode;
}
void wxWebView::GrantUniversalAccess()
diff --git a/WebKit/wx/WebView.h b/WebKit/wx/WebView.h
index d7f23b6..3ddb45e 100644
--- a/WebKit/wx/WebView.h
+++ b/WebKit/wx/WebView.h
@@ -156,7 +156,7 @@ public:
//bool CanGetPageSource();
wxString GetPageSource();
- void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString);
+ void SetPageSource(const wxString& source, const wxString& baseUrl = wxEmptyString, const wxString& mimetype = wxT("text/html"));
wxString GetInnerText();
wxString GetAsMarkup();
@@ -221,7 +221,7 @@ public:
const wxString& password = wxEmptyString);
wxWebSettings GetWebSettings();
- wxWebKitParseMode GetParseMode() const;
+ wxWebKitCompatibilityMode GetCompatibilityMode() const;
/*
This method allows cross site-scripting (XSS) in the WebView.
@@ -525,6 +525,26 @@ private:
JSObjectRef m_windowObject;
};
+class WXDLLIMPEXP_WEBKIT wxWebViewContentsChangedEvent : public wxCommandEvent {
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS(wxWebViewContentsChangedEvent)
+#endif
+
+public:
+ wxWebViewContentsChangedEvent(wxWindow* win = static_cast<wxWindow*>(0));
+ wxEvent *Clone(void) const { return new wxWebViewContentsChangedEvent(*this); }
+};
+
+class WXDLLIMPEXP_WEBKIT wxWebViewSelectionChangedEvent : public wxCommandEvent {
+#ifndef SWIG
+ DECLARE_DYNAMIC_CLASS(wxWebViewSelectionChangedEvent)
+#endif
+
+public:
+ wxWebViewSelectionChangedEvent(wxWindow* win = static_cast<wxWindow*>(0));
+ wxEvent *Clone(void) const { return new wxWebViewSelectionChangedEvent(*this); }
+};
+
typedef void (wxEvtHandler::*wxWebViewLoadEventFunction)(wxWebViewLoadEvent&);
typedef void (wxEvtHandler::*wxWebViewBeforeLoadEventFunction)(wxWebViewBeforeLoadEvent&);
typedef void (wxEvtHandler::*wxWebViewNewWindowEventFunction)(wxWebViewNewWindowEvent&);
@@ -535,6 +555,8 @@ typedef void (wxEvtHandler::*wxWebViewConfirmEventFunction)(wxWebViewConfirmEven
typedef void (wxEvtHandler::*wxWebViewPromptEventFunction)(wxWebViewPromptEvent&);
typedef void (wxEvtHandler::*wxWebViewReceivedTitleEventFunction)(wxWebViewReceivedTitleEvent&);
typedef void (wxEvtHandler::*wxWebViewWindowObjectClearedFunction)(wxWebViewWindowObjectClearedEvent&);
+typedef void (wxEvtHandler::*wxWebViewContentsChangedFunction)(wxWebViewContentsChangedEvent&);
+typedef void (wxEvtHandler::*wxWebViewSelectionChangedFunction)(wxWebViewSelectionChangedEvent&);
#define wxWebViewLoadEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewLoadEventFunction, &func)
@@ -556,7 +578,11 @@ typedef void (wxEvtHandler::*wxWebViewWindowObjectClearedFunction)(wxWebViewWind
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewReceivedTitleEventFunction, &func)
#define wxWebViewWindowObjectClearedEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewWindowObjectClearedFunction, &func)
-
+#define wxWebViewContentsChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewContentsChangedEventFunction, &func)
+#define wxWebViewSelectionChangedEventHandler(func) \
+ (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWebViewSelectionChangedEventFunction, &func)
+
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_BEFORE_LOAD, wxID_ANY)
@@ -569,6 +595,8 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_JS_PROMPT, wxID_ANY)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_RECEIVED_TITLE, wxID_ANY)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_WINDOW_OBJECT_CLEARED, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_CONTENTS_CHANGED, wxID_ANY)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WEBKIT, wxEVT_WEBVIEW_SELECTION_CHANGED, wxID_ANY)
END_DECLARE_EVENT_TYPES()
#endif
@@ -652,4 +680,21 @@ END_DECLARE_EVENT_TYPES()
(wxWebViewWindowObjectClearedFunction) & func, \
static_cast<wxObject*>(NULL)),
+#define EVT_WEBVIEW_CONTENTS_CHANGED(winid, func) \
+ DECLARE_EVENT_TABLE_ENTRY(wxEVT_WEBVIEW_CONTENTS_CHANGED, \
+ winid, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewContentsChangedEventFunction) & func, \
+ static_cast<wxObject*>(0)),
+
+#define EVT_WEBVIEW_SELECTION_CHANGED(winid, func) \
+ DECLARE_EVENT_TABLE_ENTRY(wxEVT_WEBVIEW_SELECTION_CHANGED, \
+ winid, \
+ wxID_ANY, \
+ (wxObjectEventFunction) \
+ (wxWebViewSelectionChangedEventFunction) & func, \
+ static_cast<wxObject*>(0)),
+
+
#endif // ifndef WXWEBVIEW_H
diff --git a/WebKit/wx/bindings/python/webview.i b/WebKit/wx/bindings/python/webview.i
index 8e3c808..f1621b0 100644
--- a/WebKit/wx/bindings/python/webview.i
+++ b/WebKit/wx/bindings/python/webview.i
@@ -51,7 +51,7 @@
#include "WebDOMRange.h"
#ifndef __WXMSW__
-PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
+PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn, bool isValueObject)
{
//static wxPyTypeInfoHashMap* typeInfoCache = NULL;
@@ -73,9 +73,13 @@ PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
name = "WebDOMNode*";
}
swigType = SWIG_TypeQuery(name);
- if (swigType)
+ if (swigType) {
+ if (isValueObject) {
+ return SWIG_Python_NewPointerObj(new WebDOMNode(*ptr), swigType, setThisOwn);
+ }
+
return SWIG_Python_NewPointerObj(ptr, swigType, setThisOwn);
-
+ }
// if it still wasn't found, try looking for a mapped name
//if (swigType) {
// and add it to the map if found
@@ -87,8 +91,34 @@ PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
return Py_None;
}
+
+WebDOMString* createWebDOMString(PyObject* source)
+{
+ if (!PyString_Check(source) && !PyUnicode_Check(source)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return new WebDOMString();
+ }
+
+ char* tmpPtr;
+ Py_ssize_t tmpSize;
+
+ if (PyString_Check(source))
+ PyString_AsStringAndSize(source, &tmpPtr, &tmpSize);
+ else {
+ PyObject* str = PyUnicode_AsUTF8String(source);
+ PyString_AsStringAndSize(str, &tmpPtr, &tmpSize);
+ Py_DECREF(str);
+ }
+
+ WebDOMString temp = WebDOMString::fromUTF8(tmpPtr);
+
+ return new WebDOMString(temp);
+}
+
#endif
+
+
%}
//---------------------------------------------------------------------------
@@ -96,10 +126,13 @@ PyObject* createDOMNodeSubtype(WebDOMNode* ptr, bool setThisOwn)
%import windows.i
#ifndef __WXMSW__
-%typemap(out) WebDOMNode* { $result = createDOMNodeSubtype($1, (bool)$owner); }
-%typemap(out) WebDOMElement* { $result = createDOMNodeSubtype($1, (bool)$owner); }
-%typemap(out) WebDOMNode { $result = createDOMNodeSubtype(&$1, (bool)$owner); }
-%typemap(out) WebDOMElement { $result = createDOMNodeSubtype(&$1, (bool)$owner); }
+%typemap(out) WebDOMNode* { $result = createDOMNodeSubtype($1, (bool)$owner, 0); }
+%typemap(out) WebDOMElement* { $result = createDOMNodeSubtype($1, (bool)$owner, 0); }
+%typemap(out) WebDOMNode { $result = createDOMNodeSubtype(&$1, (bool)$owner, 1); }
+%typemap(out) WebDOMElement { $result = createDOMNodeSubtype(&$1, (bool)$owner, 1); }
+%typemap(in) WebDOMString& { $1 = createWebDOMString($input); }
+%typemap(out) WebDOMString { $result = PyUnicode_DecodeUTF8($1.utf8().data(), $1.utf8().length(), NULL); }
+%typemap(out) WebDOMString& { $result = PyUnicode_DecodeUTF8($1.utf8().data(), $1.utf8().length(), NULL); }
#endif
MAKE_CONST_WXSTRING(WebViewNameStr);
@@ -134,6 +167,8 @@ MustHaveApp(wxWebView);
%constant wxEventType wxEVT_WEBVIEW_RIGHT_CLICK;
%constant wxEventType wxEVT_WEBVIEW_CONSOLE_MESSAGE;
%constant wxEventType wxEVT_WEBVIEW_RECEIVED_TITLE;
+%constant wxEventType wxEVT_WEBVIEW_CONTENTS_CHANGED;
+%constant wxEventType wxEVT_WEBVIEW_SELECTION_CHANGED;
%pythoncode {
EVT_WEBVIEW_BEFORE_LOAD = wx.PyEventBinder( wxEVT_WEBVIEW_BEFORE_LOAD, 1 )
@@ -141,5 +176,7 @@ EVT_WEBVIEW_LOAD = wx.PyEventBinder( wxEVT_WEBVIEW_LOAD, 1 )
EVT_WEBVIEW_NEW_WINDOW = wx.PyEventBinder( wxEVT_WEBVIEW_NEW_WINDOW, 1 )
EVT_WEBVIEW_RIGHT_CLICK = wx.PyEventBinder( wxEVT_WEBVIEW_RIGHT_CLICK, 1 )
EVT_WEBVIEW_CONSOLE_MESSAGE = wx.PyEventBinder( wxEVT_WEBVIEW_CONSOLE_MESSAGE, 1 )
-EVT_WEBVIEW_RECEIVED_TITLE = wx.PyEventBinder( wxEVT_WEBVIEW_RECEIVED_TITLE, 1 )
+EVT_WEBVIEW_RECEIVED_TITLE = wx.PyEventBinder( wxEVT_WEBVIEW_RECEIVED_TITLE, 1 )
+EVT_WEBVIEW_CONTENTS_CHANGED = wx.PyEventBinder( wxEVT_WEBVIEW_CONTENTS_CHANGED, 1 )
+EVT_WEBVIEW_SELECTION_CHANGED = wx.PyEventBinder( wxEVT_WEBVIEW_SELECTION_CHANGED, 1 )
}
diff --git a/WebKitLibraries/WebKitSystemInterface.h b/WebKitLibraries/WebKitSystemInterface.h
index 8732d81..5f6dcdb 100644
--- a/WebKitLibraries/WebKitSystemInterface.h
+++ b/WebKitLibraries/WebKitSystemInterface.h
@@ -201,6 +201,7 @@ float WKQTMovieMaxTimeLoaded(QTMovie* movie);
float WKQTMovieMaxTimeSeekable(QTMovie* movie);
NSString *WKQTMovieMaxTimeLoadedChangeNotification(void);
void WKQTMovieViewSetDrawSynchronously(QTMovieView* view, BOOL sync);
+void WKQTMovieDisableComponent(uint32_t[5]);
CFStringRef WKCopyFoundationCacheDirectory(void);
diff --git a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
index fc5b8a0..39ceb4a 100644
--- a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
+++ b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
Binary files differ
diff --git a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
index dd6e22e..6dd8afc 100644
--- a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
+++ b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
Binary files differ
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
index 49d770d..89a768a 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json
@@ -23,6 +23,7 @@
{ "name": "apple-windows-4", "platform": "win"},
{ "name": "apple-windows-5", "platform": "win"},
{ "name": "apple-windows-6", "platform": "win"},
+ { "name": "apple-windows-7", "platform": "win"},
{ "name": "gtk-linux-slave-1", "platform": "gtk"},
{ "name": "gtk-linux-slave-2", "platform": "gtk"},
@@ -96,7 +97,7 @@
{
"name": "Windows Debug (Build)", "type": "Build", "builddir": "win-debug",
"platform": "win", "configuration": "debug", "architectures": ["i386"],
- "triggers": ["win-debug-tests"],
+ "triggers": ["win-debug-tests", "win-debug-tests-wk2"],
"slavenames": ["apple-windows-1", "test-slave"]
},
{
@@ -104,6 +105,10 @@
"platform": "win", "configuration": "debug", "architectures": ["i386"],
"slavenames": ["apple-windows-4", "apple-windows-3", "apple-windows-5", "apple-windows-6", "test-slave"]
},
+ { "name": "Windows Debug (WebKit2 Tests)", "type": "TestWebKit2", "builddir": "win-debug-tests-wk2",
+ "platform": "win", "configuration": "debug", "architectures": ["i386"],
+ "slavenames": ["apple-windows-7", "test-slave"]
+ },
{
"name": "GTK Linux 32-bit Release", "type": "BuildAndTest", "builddir": "gtk-linux-32-release",
"platform": "gtk", "configuration": "release", "architectures": ["i386"],
@@ -218,6 +223,9 @@
},
{ "type": "Triggerable", "name": "win-debug-tests",
"builderNames": ["Windows Debug (Tests)"]
+ },
+ { "type": "Triggerable", "name": "win-debug-tests-wk2",
+ "builderNames": ["Windows Debug (WebKit2 Tests)"]
}
]
}
diff --git a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index a0beddb..f30ac16 100644
--- a/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -130,6 +130,7 @@ class DownloadBuiltProduct(transfer.FileDownload):
slavedest = WithProperties("WebKitBuild/%(configuration)s.zip")
mastersrc = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip")
haltOnFailure = True
+ flunkOnFailure = True
def __init__(self):
transfer.FileDownload.__init__(self, self.mastersrc, self.slavedest)
diff --git a/WebKitTools/BuildSlaveSupport/gtk/README b/WebKitTools/BuildSlaveSupport/gtk/README
new file mode 100644
index 0000000..9e58ae2
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/README
@@ -0,0 +1,52 @@
+==============================================
+ Running a GTK+ build slave under daemontools
+==============================================
+
+This directory contains several scripts which can be used to run a WebKitGTK+
+build slave under daemontools [1]. This is convenient because daemontools
+will automatically restart services when they die, and that means less human
+intervention is needed.
+
+
+Dependencies
+============
+
+In order to use the provided service control files, you will need the
+following:
+
+* The GNU Bash shell (the scripts contain some bash-isms)
+
+* The daemontools package (or one of its drop-in replacements, like runit
+ or freedt; but only daemontools has been tested so far).
+
+* The crash dump monitor also uses "inotifywait" (part of inotify-tools [2])
+
+In short, in a Debian-based system you can ensure you have the needed bits
+with the following command:
+
+ apt-get install inotify-tools daemontools-run
+
+
+Setup
+=====
+
+1. Follow the instructions at http://trac.webkit.org/wiki/BuildBot
+
+2. Install the dependencies outlined above.
+
+3. Copy "daemontools-buildbot.conf" to "/etc/daemontools-buildbot.conf"
+
+4. Edit the configuration file to suit your needs, the comments should
+ be self-explanatory.
+
+5. Drop the "buildbot", "pulseaudio" and "xvfb" directories (plus
+ "crashmon", if desired) to the service control directory of
+ daemontools; for Debian-based setups that would be "/etc/service"
+
+
+References
+==========
+
+[1] http://cr.yp.to/daemontools.html
+[2] http://wiki.github.com/rvoicilas/inotify-tools/
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/buildbot/log/run b/WebKitTools/BuildSlaveSupport/gtk/buildbot/log/run
new file mode 100755
index 0000000..cc2c87e
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/buildbot/log/run
@@ -0,0 +1,38 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${HOME}}
+: ${buildbot_log_path:=/var/log/buildbot}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "${buildbot_log_path}"
+chown "${buildbot_user}" "${buildbot_log_path}"
+
+exec /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/multilog t "${buildbot_log_path}"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/buildbot/run b/WebKitTools/BuildSlaveSupport/gtk/buildbot/run
new file mode 100755
index 0000000..b26fe58
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/buildbot/run
@@ -0,0 +1,77 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+exec 2>&1
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+
+if ! [ "${buildbot_path}" ] ; then
+ echo "No \${buildbot_path} defined! (will sleep for 5 minutes)"
+ sleep 300
+ exit 111
+fi
+
+
+if ! [ "${WEBKIT_TESTFONTS}" ] ; then
+ echo "No \${WEBKIT_TESTFONTS} environment variable! (will sleep for 5 minutes)"
+ sleep 300
+ exit 111
+fi
+
+
+if [ "${coredump_output:=''}" ] ; then
+ # Ensure that the output directory exists.
+ if [[ ! -d ${crashmon_output} ]] ; then
+ mkdir -p "${crashmon_output}"
+ fi
+
+ ulimit -c "${crashmon_max_size:=unlimited}"
+fi
+
+
+if [ "${ccache_path}" ] ; then
+ export PATH="${ccache_path}:${PATH}"
+fi
+
+: ${buildbot_user:=${USER}}
+
+cd "${buildbot_path}"
+exec /usr/bin/env - \
+ TERM=dumb \
+ TZ=PST8PDT \
+ PATH="${PATH}" \
+ SHELL=/bin/bash \
+ LANG=en_US.UTF-8 \
+ USER="${buildbot_user}" \
+ LOGNAME="${buildbot_user}" \
+ HOME="/home/${buildbot_user}" \
+ DISPLAY="${xvfb_display:-':10'}" \
+ MAIL="/var/mail/${buildbot_user}" \
+ /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/twistd -noy buildbot.tac
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon b/WebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon
new file mode 100755
index 0000000..41705a2
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/crashmon/crashmon
@@ -0,0 +1,73 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Carlos Lopez <clopez@igalia.com>, Igalia S.L.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+set -e
+
+[ "${coredir}" ] || {
+ echo "Env var '\${coredir}' not defined!" >&2
+ exit 111
+}
+[ "${programpath}" ] || {
+ echo "Env var '\${programpath}' not defined" >&2
+ exit 111
+}
+[ "${arch}" ] || {
+ echo "Env var '\${arch}' not defined" >&2
+ exit 111
+}
+[ "${mailto}" ] || {
+ echo "Env var '\${mailto}' not defined" >&2
+ exit 111
+}
+
+
+inotifywait -q -m --format '%f' --exclude '.trace.html$' -e close_write "${coredir}" | \
+while read -r coredump
+do
+ if grep -qE '^core-when_[[:digit:]]{10\,12}-_-who_[[:print:]]+-_-why_' <<< "${coredump}"
+ then
+ # Get revision number from Subversion sources
+ rev=$(cd "${crashmon_src_path}" && svn info | sed -e '/^Revision:/s/Revision: //p' -e d)
+
+ # Get the who from the coredump name
+ programfile=$(echo "${coredump}" \
+ | awk -F'-_-who_' '{ print $2 }'\
+ | awk -F'-_-why_' '{ print $1 }')
+
+ # Sometimes programfile gets cut when it is a long name:
+ # Search using wildcards
+ fullprogrampath=$(find "${programpath}" -executable -name "${programfile}"\* | head -n1)
+
+ ( printf "<html><head><title>StackTrace for ${programfile} from svn"
+ printf " rev ${rev}</title></head>\n<body>Core dump file: "
+ printf "<a href=\"cores/${coredump}\">${coredump}</a><br/>\n"
+ printf "<pre>Executable crashed: ${fullprogrampath}</pre>\n"
+ printf "<br/><hr><b>Stack Trace:</b><hr><br/>\n<pre>"
+
+ gdb -ex "thread apply all bt" --batch "${fullprogrampath}" "${coredump}" 2>&1 \
+ | sed -e 's/\&/\&amp/g;s/</\&lt;/g;s/>/\&gt;/g;s/\"/\&quot;/g' -e "s/'/\&\#039;/g"
+
+ printf "</pre></body></html>\n"
+ ) > "/var/www/svn_${rev}.${coredump}.trace.html"
+
+ # Make sure the web server can read it
+ chmod 644 "${coredump}"
+ fi
+done
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/crashmon/log/run b/WebKitTools/BuildSlaveSupport/gtk/crashmon/log/run
new file mode 100755
index 0000000..4dcd71f
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/crashmon/log/run
@@ -0,0 +1,38 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${HOME}}
+: ${crashmon_log_path:=/var/log/crashmon}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "${crashmon_log_path}"
+chown "${buildbot_user}" "${crashmon_log_path}"
+
+exec /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/multilog t "${crashmon_log_path}"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/crashmon/run b/WebKitTools/BuildSlaveSupport/gtk/crashmon/run
new file mode 100755
index 0000000..38be3fe
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/crashmon/run
@@ -0,0 +1,74 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+exec 2>&1
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${USER:-${LOGNAME}}}
+: ${crashmon_output:=''}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+
+if [ ! -d "${crashmon_output}" ]
+then
+ if ! [ "${crashmon_output}" ]
+ then
+ echo "Dump directory '${crashmon_output}' does not exist (sleeping)"
+ fi
+ sleep $(( 60 * 60 * 4 ))
+ exit 111
+fi
+
+
+if ! [ "${buildbot_bits}" ]
+then
+ # Guess bits (32/64) from uname -m
+ machine=$(uname -m)
+ case ${machine} in
+ x86_64 | amd64 | ia64 | ppc64)
+ buildbot_bits="64" ;;
+ *)
+ buildbot_bits="32" ;;
+ esac
+fi
+
+: ${crashmon_bin_path:="${buildbot_path}/gtk-linux-${buildbot_bits}-debug/build/WebKitBuild/Debug/Programs"}
+
+
+cd "${crashmon_output}"
+exec /usr/bin/env - \
+ PATH="${PATH}" \
+ SHELL="/bin/bash" \
+ USER="${buildbot_user}" \
+ arch="${buildbot_bits}" \
+ LOGNAME="${buildbot_user}" \
+ coredir="${crashmon_output}" \
+ HOME="/home/${buildbot_user}" \
+ mailto="${crashmon_mailto:-''}" \
+ programpath="${crashmon_bin_path}" \
+ /usr/bin/setuidgid "${buildbot_user}" "$(pwd)/crashmon"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf b/WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf
new file mode 100644
index 0000000..59c1c0b
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/daemontools-buildbot.conf
@@ -0,0 +1,87 @@
+# Copyright (C) 2010 Igalia S.L. 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.
+
+
+# Path to the Buildbot slave directory
+#
+buildbot_path="/home/slave/webkitgtk"
+
+# User account used to run Buildbot.
+#
+buildbot_user="slave"
+
+# Path to a directory where to log Buildbot output
+#
+buildbot_log_path="/var/log/buildbot"
+
+
+# Display number under which Xvfb will run
+#
+xvfb_display=":10"
+
+# Graphical mode which Xvfb will report to applications
+#
+xvfb_mode="1024x768x24"
+
+# Path to a directory where to log Xvfb error output
+#
+xvfb_log_path="/var/log/xvfb"
+
+
+# Output directory for core dumps. Set this to an empty string to
+# disable recording them.
+#
+crashmon_output="/var/www/webkitgtk-coredumps"
+
+# Maximum size of core dumps. With the default "unlimited" setting
+# it is recommended to have ~20GB for cores in 64-bit machines.
+# For 32-bit bots, less space is needed.
+#
+crashmon_max_size="unlimited"
+
+# Path to a directory where to log crashmon output
+#
+crashmon_log_path="/var/log/crashmon"
+
+# A list of e-mail addresses where to send notifications of core dumps.
+# Leave empty to disable mail notifications.
+#
+# WARNING: E-mail addresses will be flooded with messages!
+#
+crashmon_mailto=""
+
+# Base directory where to find sources and built binaries of which
+# crash dumps are to be catched. Usually you will not need to change this.
+#
+crashmon_src_path="${buildbot_path}/gtk-linux-${buildbot_bits}-debug/build"
+crashmon_bin_path="${crashmon_src_path}/WebKitBuild/Debug/Programs"
+
+
+# If you want to use ccache, set a path to where synlinks with tool
+# names pointing to ccache are installed. In Debian systems this
+# would be /usr/lib/ccache. Set to empty to disable.
+#
+ccache_path="/usr/lib/ccache"
+
+
+# Environment variables. Prefix them with "env_".
+#
+env_CFLAGS="-pipe"
+env_CXXFLAGS="-pipe"
+env_WebKitMakeArguments="-j3"
+env_WEBKIT_TESTFONTS="/home/${buildbot_user}/testfonts"
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/pulseaudio/run b/WebKitTools/BuildSlaveSupport/gtk/pulseaudio/run
new file mode 100755
index 0000000..37ba0de
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/pulseaudio/run
@@ -0,0 +1,24 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+exec 2>&1
+exec /usr/bin/pulseaudio --system \
+ --disallow-exit --disallow-module-loading \
+ --log-target=syslog
+
diff --git a/WebKitTools/BuildSlaveSupport/gtk/xvfb/log/run b/WebKitTools/BuildSlaveSupport/gtk/xvfb/log/run
new file mode 100755
index 0000000..1c83922
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/xvfb/log/run
@@ -0,0 +1,37 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${buildbot_user:=${HOME}}
+: ${xvfb_log_path:=/var/log/xvfb}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "${xvfb_log_path}"
+chown "${buildbot_user}" "${xvfb_log_path}"
+
+exec /usr/bin/setuidgid "${buildbot_user}" \
+ /usr/bin/multilog t "${xvfb_log_path}"
diff --git a/WebKitTools/BuildSlaveSupport/gtk/xvfb/run b/WebKitTools/BuildSlaveSupport/gtk/xvfb/run
new file mode 100755
index 0000000..89cd301
--- /dev/null
+++ b/WebKitTools/BuildSlaveSupport/gtk/xvfb/run
@@ -0,0 +1,41 @@
+#! /bin/bash
+#
+# Copyright (C) 2010 Igalia S.L. 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.
+
+exec 2>&1
+
+: ${BUILDBOT_CONFIG:=/etc/daemontools-buildbot.conf}
+
+# Read configuration file
+[ -r "${BUILDBOT_CONFIG}" ] && . "${BUILDBOT_CONFIG}"
+
+: ${xvfb_display:=':10'}
+: ${xvfb_mode:='1024x768x24'}
+
+# Expand all "env_*" environment variables
+for varname in ${!env_*} ; do
+ eval "export ${varname#env_}=\${${varname}}"
+done
+
+mkdir -p "xvfb${xvfb_display}"
+exec /usr/bin/Xvfb "${xvfb_display}" \
+ -fbdir "xvfb${xvfb_display}" \
+ -screen 0 "${xvfb_mode}" \
+ -nolisten inet6 \
+ -nolisten inet
+
diff --git a/WebKitTools/BuildSlaveSupport/win/kill-old-processes b/WebKitTools/BuildSlaveSupport/win/kill-old-processes
index 50fb8a5..6760e08 100755
--- a/WebKitTools/BuildSlaveSupport/win/kill-old-processes
+++ b/WebKitTools/BuildSlaveSupport/win/kill-old-processes
@@ -28,7 +28,8 @@ import os, sys
def main():
tasksToKill = ["DumpRenderTree.exe", "DumpRenderTree_debug.exe", "testapi.exe", "testapi_debug.exe",
"svn.exe", "httpd.exe", "cl.exe", "link.exe", "midl.exe", "devenv.exe", "perl.exe",
- "imagediff.exe", "imagediff_debug.exe", "jsc.exe", "jsc_debug.exe"]
+ "imagediff.exe", "imagediff_debug.exe", "jsc.exe", "jsc_debug.exe", "WebKit2WebProcess.exe",
+ "WebKit2WebProcess_debug.exe", "WebKitTestRunner.exe", "WebKitTestRunner_debug.exe"]
for task in tasksToKill:
os.system("taskkill /f /im " + task)
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 179fdc1..905a8e2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,663 @@
+2010-09-02 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Implement [continuous]MouseScrollBy() on Chromium, and partly on GTK.
+ https://bugs.webkit.org/show_bug.cgi?id=45073
+
+ * DumpRenderTree/chromium/EventSender.cpp:
+ (EventSender::EventSender):
+ (EventSender::mouseScrollBy):
+ (EventSender::continuousMouseScrollBy):
+ (EventSender::sendCurrentTouchEvent):
+ (EventSender::handleMouseWheel):
+ * DumpRenderTree/chromium/EventSender.h:
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (mouseScrollByCallback):
+ (continuousMouseScrollByCallback):
+
+2010-09-01 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Land a patched version of r66542 - change TestRunner to have an
+ separate cleanup method and fix the ordering of cleanup between
+ TestRunner and the printing module, and then wrap everything in a
+ try/finally block to ensure reliable cleanup without needing to
+ rely on stuff happening in the destructor of the TestRunner.
+
+ Also refactor run_webkit_tests.run() to be much smaller and cleaner
+ by creating a bunch of helper methods and moving more stuff into
+ the TestRunner class.
+
+ This fixes the crash at the end of the linux test run of
+ new-run-webkit-tests (and undoes the rollout in 66547).
+
+ https://bugs.webkit.org/show_bug.cgi?id=44902
+
+ * Scripts/webkitpy/layout_tests/data/failures/expected/exception.html: Added.
+ * Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error-expected.txt: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error.html: Added.
+ * Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2010-09-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix TestNetscapePlugIn to compile without access to QuickDraw private headers.
+
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+
+2010-09-01 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Have kill-old-processes kill debug and release variants of WebKit2WebWebProcess
+ and WebKitTestRunner.
+
+ * BuildSlaveSupport/win/kill-old-processes:
+
+2010-09-01 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Remove obsolete include path from DumpRenderTree.pro
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+
+2010-09-01 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] QWebPage::allowGeolocationRequest should be async API
+ https://bugs.webkit.org/show_bug.cgi?id=41364
+
+ Implements new async API for geolocation permission similar to
+ Notification. WebPage maintains list of geolocation permission request
+ QtWebkit and set's when LayoutTestController gets the access from test JS
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::resetSettings):
+ (WebCore::WebPage::requestPermission):
+ (WebCore::WebPage::cancelPermission):
+ (WebCore::WebPage::permissionSet):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::processLine):
+ (WebCore::DumpRenderTree::geolocationPermissionSet):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::setGeolocationPermission):
+ (LayoutTestController::setGeolocationPermissionCommon):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
+2010-09-01 Andras Becsi <abecsi@webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] Auto-generate WebKit2 forwarding headers
+ https://bugs.webkit.org/show_bug.cgi?id=44692
+
+ * MiniBrowser/qt/BrowserWindow.h: use source style includes
+ * MiniBrowser/qt/MiniBrowser.pro: add missing include paths
+ * Scripts/enumerate-included-framework-headers: Removed.
+
+2010-08-31 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
+
+ Reviewed by Adam Barth.
+
+ Allow Ctrl+C inside Bugzilla::fetch_bug_dictionary
+ https://bugs.webkit.org/show_bug.cgi?id=44789
+
+ * Scripts/webkitpy/common/net/bugzilla.py:
+
+2010-08-31 Leandro Pereira <leandro@profusion.mobi>
+
+ Reviewed by Adam Barth.
+
+ ews: Add support for EFL-EWS
+ https://bugs.webkit.org/show_bug.cgi?id=44982
+
+ * QueueStatusServer/model/queues.py: Add "efl-ews" to queues list.
+ * Scripts/webkitpy/common/config/ports.py: Define a EflPort class
+ and add it to the ports dict.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py: Define a
+ EflEWS class.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Add
+ a test case for the EFL EWS.
+
+2010-08-31 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ https://bugs.webkit.org/show_bug.cgi?id=42195
+ <rdar://problem/8186761> WebKitTestRunner needs to support layoutTestController.setXSSAuditorEnabled
+
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setXSSAuditorEnabled):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+ Added setXSSAuditorEnabled, calling through to an WKBundle private method. Calling this method
+ makes WebProcess use a different value for this preference than UIProcess thinks it uses.
+
+ * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues):
+ Reset xssAuditorEnabled. Even though the value doesn't change, this calls through to WebProcess,
+ which forgets its override.
+
+2010-08-31 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ WebKitTestRunner needs layoutTestController.addUserStyleSheet
+ https://bugs.webkit.org/show_bug.cgi?id=42680
+
+ WebKitTestRunner needs layoutTestController.addUserScript
+ https://bugs.webkit.org/show_bug.cgi?id=42681
+
+ * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::addUserScript):
+ (WTR::LayoutTestController::addUserStyleSheet):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
+2010-08-31 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r66542.
+ http://trac.webkit.org/changeset/66542
+ https://bugs.webkit.org/show_bug.cgi?id=44902
+
+ r66542 - the weird logging dependencies in Python stuck again ...
+
+ * Scripts/webkitpy/layout_tests/data/failures/expected/exception.html: Removed.
+ * Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html: Removed.
+ * Scripts/webkitpy/layout_tests/data/passes/error-expected.txt: Removed.
+ * Scripts/webkitpy/layout_tests/data/passes/error.html: Removed.
+ * Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2010-08-31 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Implementing LayoutTestController::markerTextForListItem() in Chromium's DRT.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::markerTextForListItem):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
+2010-08-31 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ new-run-webkit-tests: add more unit tests
+
+ Add more unit tests for new-run-webkit-tests; we now cover all but
+ the most obscure code paths in the generic code. We still need to
+ add coverage for the http server and web socket paths, and add better
+ coverage of the platform-specific logic. Note that the rebaselining
+ tool is still not well tested.
+
+ Also clean up some of the configuration logic for the printing
+ module and the way it interacts with the Python logging module; that
+ is a crufty interface, to be certain.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44902
+
+ * Scripts/webkitpy/layout_tests/data/failures/expected/exception.html: Added.
+ * Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error-expected.txt: Added.
+ * Scripts/webkitpy/layout_tests/data/passes/error.html: Added.
+ * Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt:
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing.py:
+ * Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2010-08-31 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/check-for-global-initializers: Add a file that ends up having global initializers
+ in a debug build when built with certain compilers.
+
+2010-08-31 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Isolate all GTK+ typedefs into one file
+ https://bugs.webkit.org/show_bug.cgi?id=44900
+
+ * DumpRenderTree/gtk/EventSender.h: Remove GTK+ typedefs.
+
+2010-08-31 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Show more status on queue status pages
+ https://bugs.webkit.org/show_bug.cgi?id=44938
+
+ I upped the number of status lines from 6 to 15 --
+ this has been bugging me for a while...
+
+ I also disabled showing the chromium-win EWS queue
+ since it's been down for almost 5 months now.
+
+ * QueueStatusServer/handlers/dashboard.py:
+ * QueueStatusServer/handlers/queuestatus.py:
+ * QueueStatusServer/model/queues.py:
+
+2010-08-31 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Read command line arguments and open them as URLs in new windows
+ https://bugs.webkit.org/show_bug.cgi?id=44944
+
+ Extend MiniBrowser to accept command line arguments and open them as URLs in new browser windows.
+
+ * MiniBrowser/qt/main.cpp:
+ (main):
+
+2010-08-31 Adrian Perez <aperez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ Support scripts to run Buildbot slaves under daemontools (gtk related)
+ https://bugs.webkit.org/show_bug.cgi?id=40053
+
+ * BuildSlaveSupport/gtk: Added.
+ * BuildSlaveSupport/gtk/README: Added.
+ * BuildSlaveSupport/gtk/buildbot: Added.
+ * BuildSlaveSupport/gtk/buildbot/log: Added.
+ * BuildSlaveSupport/gtk/buildbot/log/run: Added.
+ * BuildSlaveSupport/gtk/buildbot/run: Added.
+ * BuildSlaveSupport/gtk/crashmon: Added.
+ * BuildSlaveSupport/gtk/crashmon/crashmon: Added.
+ * BuildSlaveSupport/gtk/crashmon/log: Added.
+ * BuildSlaveSupport/gtk/crashmon/log/run: Added.
+ * BuildSlaveSupport/gtk/crashmon/run: Added.
+ * BuildSlaveSupport/gtk/daemontools-buildbot.conf: Added.
+ * BuildSlaveSupport/gtk/pulseaudio: Added.
+ * BuildSlaveSupport/gtk/pulseaudio/run: Added.
+ * BuildSlaveSupport/gtk/xvfb: Added.
+ * BuildSlaveSupport/gtk/xvfb/log: Added.
+ * BuildSlaveSupport/gtk/xvfb/log/run: Added.
+ * BuildSlaveSupport/gtk/xvfb/run: Added.
+
+2010-08-27 John Gregg <johnnyg@google.com>
+
+ Reviewed by David Levin.
+
+ Notifications should support a click event.
+ Adds necessary hooks to chromium's DRT so that clicks on desktop notifications
+ can be simulated during a layout test. Requires storing a list of active
+ notifications so that they can be referred to later for clicking.
+ https://bugs.webkit.org/show_bug.cgi?id=44800
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::simulateDesktopNotificationClick):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ (NotificationPresenter::simulateClick):
+ (NotificationPresenter::show):
+ (NotificationPresenter::cancel):
+ (NotificationPresenter::objectDestroyed):
+ * DumpRenderTree/chromium/NotificationPresenter.h:
+
+2010-08-30 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add missing parts of didFinishDocumentLoadForFrame
+ https://bugs.webkit.org/show_bug.cgi?id=44913
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (didFinishDocumentLoadForFrame): Added
+ (-[BrowserWindowController awakeFromNib]): Updated struct
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage): Rearranged function ptr
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize): Updated struct
+
+2010-08-30 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Unreviewed: Add myself to the list of Committers.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-08-30 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Fix fast/notifications/notifications-display-close-events.html failure
+ https://bugs.webkit.org/show_bug.cgi?id=44585
+
+ Apply http://crrev.com/48893. We should dispatch display events
+ asynchronously.
+
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ (deferredDisplayDispatch):
+ (NotificationPresenter::show):
+
+2010-08-30 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ allow ports with windowed plugins to support windowless plugin tests
+
+ https://bugs.webkit.org/show_bug.cgi?id=40730
+
+ Ports that implement plugins windowed by default need to have a way of
+ supporting plugin tests that assume the plugin is windowless. Add this
+ feature to the tests and support it in the webkit test plugin. Also
+ add mouse and keyboard event logging to the webkit-test plugin on Unix.
+
+ Unskip the following tests on Qt:
+
+ plugins/mouse-events.html
+ plugins/keyboard-events.html
+ plugins/mouse-events-fixedpos.html
+
+ * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
+ (pluginSetProperty):
+ * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
+ (NPP_New):
+ * DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp:
+ (webkit_test_plugin_handle_event):
+
+2010-08-30 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after addition of fileapi directory in WebCore.
+
+ * wx/build/settings.py:
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Fixed compilation error, now that we have included the
+ GtkVersioning.h we have to remove some version dependent code from
+ EventSender.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+
+2010-08-30 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [Gtk] gdk_display_get_core_pointer and gdk_device_get_core_pointer
+ are deprecated
+ https://bugs.webkit.org/show_bug.cgi?id=44787
+
+ We have replaced GtkVersioning.cpp with GtkVersioning.c and
+ created a function (getDefaultGDKPointerDevice) to get the pointer
+ of the window with the new APIs. We added that function to DRT and
+ copyandpaste unit test.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (prepareMouseButtonEvent):
+ (mouseMoveToCallback):
+ (keyDownCallback):
+ * GNUmakefile.am:
+
+2010-08-30 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add new window menu to MiniBrowser
+
+ Implement newWindow function and add a menu item for opening new window in MiniBrowser.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::newWindow):
+ * MiniBrowser/qt/BrowserWindow.h:
+ * MiniBrowser/qt/main.cpp:
+ (main):
+
+2010-08-29 James Robinson <jamesr@chromium.org>
+
+ Reviewed by David Levin.
+
+ Make failing the download step fail the build
+ https://bugs.webkit.org/show_bug.cgi?id=44298
+
+ If the download step fails on a test bot, this ensures that
+ the build goes red instead of only the download step going red
+ and the overall build staying green.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+
+2010-08-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Remove dependency to base/keyboard_codes.h
+ https://bugs.webkit.org/show_bug.cgi?id=44847
+
+ * DumpRenderTree/chromium/EventSender.cpp:
+ Use webkit_support::VKEY_* instead of base::VKEY_*.
+
+2010-08-29 Darin Adler <darin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=40589
+
+ * Scripts/prepare-ChangeLog: Only prepend namespaces to non-empty
+ function names.
+
+2010-08-26 Holger Hans Peter Freyther <holger@moiji-mobile.com>
+
+ Reviewed by Darin Adler.
+
+ [iExploder] Add new CSS Properties and HTML Attributes
+ https://bugs.webkit.org/show_bug.cgi?id=44746
+
+ Updated the files with the update-iexploder-cssproperties script
+ and manually readded the -webkit-binding CSS Property to the list.
+
+ * iExploder/htdocs/cssproperties.in:
+ * iExploder/htdocs/htmlattrs.in:
+ * iExploder/htdocs/htmltags.in:
+
+2010-08-26 Holger Hans Peter Freyther <holger@moiji-mobile.com>
+
+ Reviewed by Darin Adler.
+
+ Fix Coverage build after the addition of ANGLE
+ https://bugs.webkit.org/show_bug.cgi?id=44744
+
+ ANGLE is using libtool to build a static library and the version of
+ libtool on Leopard refuses to handle the -fprofile-arcs and -ftest-coverage
+ parameters. The easiest way to handle this is to not build ANGLE with
+ coverage information.
+
+ This is achieved by applying the XCode options for each project
+ separately and exclude ANGLE.
+
+ * Scripts/build-webkit: Remove -framework AppKit due link errors.
+ * Scripts/webkitdirs.pm: Do not apply the XCode options for ANGLE.
+
+2010-08-28 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fix after directory addition.
+
+ * wx/build/settings.py:
+
+2010-08-28 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Add AX notification for childrenChanged
+ https://bugs.webkit.org/show_bug.cgi?id=44472
+
+ * DumpRenderTree/chromium/AccessibilityController.cpp:
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::reset):
+ (AccessibilityController::getRootElement):
+ (AccessibilityController::dumpAccessibilityNotifications):
+ * DumpRenderTree/chromium/AccessibilityController.h:
+ (AccessibilityController::shouldDumpAccessibilityNotifications):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didChangeAccessibilityObjectChildren):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2010-08-28 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Update commit-queue failure message
+ https://bugs.webkit.org/show_bug.cgi?id=44798
+
+ The commit-queue auto-restarts itself and has for a very long time.
+ No need for people to email me to request a restart anymore.
+
+ * Scripts/webkitpy/common/net/bugzilla.py:
+ * Scripts/webkitpy/common/net/bugzilla_unittest.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2010-07-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Eric Carlson.
+
+ Add JavaScript API to allow a page to go fullscreen.
+ rdar://problem/6867795
+
+ Added basic full screen support to DumpRenderTree: when a webView requests
+ that DumpRenderTree go "full screen", just call the provided callback listener object's
+ will/did Enter/Exit full screen methods. Also, register a new user default which
+ enables full screen support.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:supportsFullscreenForElement:]):
+ (-[UIDelegate webView:enterFullscreenForElement:listener:]):
+ (-[UIDelegate webView:exitFullscreenForElement:listener:]):
+
+2010-08-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Unreviewed. Add myself to the committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2010-08-27 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [DRT/Chromium] Fix inspector test failures
+ https://bugs.webkit.org/show_bug.cgi?id=44748
+
+ * DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
+ (DRTDevToolsAgent::createClientMessageLoop):
+ Returns a valid WebKitClientMessageLoop instance
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h:
+
+2010-08-26 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add Windows WebKit2 Tester to buildbot
+ <rdar://problem/7887703>
+
+ Reviewed by Dan Bernstein.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2010-08-26 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations
+ https://bugs.webkit.org/show_bug.cgi?id=42152
+
+ * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
+ (LoadHTMLStringItem::invoke): Implementation using
+ webkit_web_frame_load_string().
+
+2010-08-25 Jon Honeycutt <jhoneycutt@apple.com>
+
+ <rdar://problem/8334338> run-webkit-tests sometimes hangs when using
+ WebKitTestRunner (44331)
+
+ Reviewed by Darin Adler.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ The hang occurs when WebKitTestRunner begins launching the WebKit2
+ web process then exits before it finishes launching. Work around this by
+ looking for the --print-supported-features argument and exiting without
+ creating the web process.
+
+2010-08-26 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ new-run-webkit-tests: add rebaselining tests for test_expectations
+
+ This patch adds more unit tests for the rebaselining code in the
+ test_expectations module. It doesn't add any tests for
+ rebaseline_chromium_webkit_tests itself; that will come some other
+ time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44648
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py:
+
+2010-08-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add HTTP caching support
+ https://bugs.webkit.org/show_bug.cgi?id=44261
+
+ Ignore new soup API that we decided to merge into the soup backend
+ while it is being cooked. It follows the libsoup style, and will
+ be removed from WebKit as soon as it is merged into libsoup.
+
+ * Scripts/webkitpy/style/checker.py:
+
+2010-08-26 Mahesh Kulkarni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] DumpRenderTree runs only one test from command mode
+ https://bugs.webkit.org/show_bug.cgi?id=44012
+
+ Enables support to run multiple test files and single
+ folder containing html files in stand alone mode
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::processArgsLine):
+ (WebCore::DumpRenderTree::loadNextTestInStandAloneMode):
+ (WebCore::DumpRenderTree::processLine):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (WebCore::DumpRenderTree::setStandAloneMode):
+ (WebCore::DumpRenderTree::isStandAloneMode):
+ * DumpRenderTree/qt/main.cpp:
+ (main):
+
2010-08-25 Martin Robinson <mrobinson@igalia.com>
Updating webkitpy test expectations.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
index 0d556b1..44fafa1 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
@@ -139,6 +139,7 @@ enum {
ID_PROPERTY_CACHED_PRIVATE_BROWSING_ENABLED,
ID_PROPERTY_THROW_EXCEPTION_PROPERTY,
ID_LAST_SET_WINDOW_ARGUMENTS,
+ ID_PROPERTY_WINDOWED_PLUGIN,
NUM_PROPERTY_IDENTIFIERS
};
@@ -154,7 +155,8 @@ static const NPUTF8 *pluginPropertyIdentifierNames[NUM_PROPERTY_IDENTIFIERS] = {
"privateBrowsingEnabled",
"cachedPrivateBrowsingEnabled",
"testThrowExceptionProperty",
- "lastSetWindowArguments"
+ "lastSetWindowArguments",
+ "windowedPlugin"
};
enum {
@@ -328,6 +330,9 @@ static bool pluginSetProperty(NPObject* obj, NPIdentifier name, const NPVariant*
} else if (name == pluginPropertyIdentifiers[ID_PROPERTY_THROW_EXCEPTION_PROPERTY]) {
browser->setexception(obj, "plugin object testThrowExceptionProperty SUCCESS");
return true;
+ } else if (name == pluginPropertyIdentifiers[ID_PROPERTY_WINDOWED_PLUGIN]) {
+ browser->setvalue(plugin->npp, NPPVpluginWindowBool, (void *)NPVARIANT_TO_BOOLEAN(*variant));
+ return true;
}
return false;
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
index ab22b4e..c02e918 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
@@ -26,9 +26,12 @@
#include "PluginObject.h"
#include "PluginTest.h"
-
#include <string>
+#if !defined(NP_NO_CARBON) && defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
+extern "C" void GlobalToLocal(Point*);
+#endif
+
using namespace std;
#define CRASH() do { \
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
index afe850c..2487e1a 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp
@@ -44,15 +44,12 @@ AccessibilityController::AccessibilityController(TestShell* shell)
: m_shell(shell)
{
- bindMethod("logFocusEvents",
- &AccessibilityController::logFocusEventsCallback);
- bindMethod("logScrollingStartEvents",
- &AccessibilityController::logScrollingStartEventsCallback);
+ bindMethod("dumpAccessibilityNotifications", &AccessibilityController::dumpAccessibilityNotifications);
+ bindMethod("logFocusEvents", &AccessibilityController::logFocusEventsCallback);
+ bindMethod("logScrollingStartEvents", &AccessibilityController::logScrollingStartEventsCallback);
- bindProperty("focusedElement",
- &AccessibilityController::focusedElementGetterCallback);
- bindProperty("rootElement",
- &AccessibilityController::rootElementGetterCallback);
+ bindProperty("focusedElement", &AccessibilityController::focusedElementGetterCallback);
+ bindProperty("rootElement", &AccessibilityController::rootElementGetterCallback);
bindFallbackMethod(&AccessibilityController::fallbackCallback);
}
@@ -68,6 +65,8 @@ void AccessibilityController::reset()
m_rootElement = WebAccessibilityObject();
m_focusedElement = WebAccessibilityObject();
m_elements.clear();
+
+ m_dumpAccessibilityNotifications = false;
}
void AccessibilityController::setFocusedElement(const WebAccessibilityObject& focusedElement)
@@ -89,6 +88,12 @@ AccessibilityUIElement* AccessibilityController::getRootElement()
return m_elements.createRoot(m_rootElement);
}
+void AccessibilityController::dumpAccessibilityNotifications(const CppArgumentList&, CppVariant* result)
+{
+ m_dumpAccessibilityNotifications = true;
+ result->setNull();
+}
+
void AccessibilityController::logFocusEventsCallback(const CppArgumentList&, CppVariant* result)
{
// As of r49031, this is not being used upstream.
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
index 3cde7cc..0817ec3 100644
--- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
+++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.h
@@ -52,8 +52,19 @@ public:
void setFocusedElement(const WebKit::WebAccessibilityObject&);
AccessibilityUIElement* getFocusedElement();
AccessibilityUIElement* getRootElement();
+
+ // This function sets a flag that tells the test_shell to dump all
+ // accessibility notifications.
+ void dumpAccessibilityNotifications(const CppArgumentList&, CppVariant*);
+
+public:
+ // The following methods are not exposed to JavaScript.
+ bool shouldDumpAccessibilityNotifications() { return m_dumpAccessibilityNotifications; }
private:
+ // If true, the test_shell will dump all accessibility notifications.
+ bool m_dumpAccessibilityNotifications;
+
// Bound methods and properties
void logFocusEventsCallback(const CppArgumentList&, CppVariant*);
void logScrollingStartEventsCallback(const CppArgumentList&, CppVariant*);
diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
index 639ee52..ba1edd7 100644
--- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
@@ -84,6 +84,11 @@ WebCString DRTDevToolsAgent::debuggerScriptSource()
return webkit_support::GetDevToolsDebuggerScriptSource();
}
+WebDevToolsAgentClient::WebKitClientMessageLoop* DRTDevToolsAgent::createClientMessageLoop()
+{
+ return webkit_support::CreateDevToolsMessageLoop();
+}
+
void DRTDevToolsAgent::asyncCall(const DRTDevToolsCallArgs &args)
{
webkit_support::PostTaskFromHere(
diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
index 3613349..8747cea 100644
--- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
+++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h
@@ -64,6 +64,7 @@ public:
virtual void forceRepaint();
virtual void runtimePropertyChanged(const WebKit::WebString& name, const WebKit::WebString& value);
virtual WebKit::WebCString debuggerScriptSource();
+ virtual WebKitClientMessageLoop* createClientMessageLoop();
void asyncCall(const DRTDevToolsCallArgs&);
diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
index bb3c07f..49421f6 100644
--- a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp
@@ -44,7 +44,6 @@
#include "EventSender.h"
#include "TestShell.h"
-#include "base/keyboard_codes.h"
#include "public/WebDragData.h"
#include "public/WebDragOperation.h"
#include "public/WebPoint.h"
@@ -61,7 +60,6 @@
// FIXME: layout before each event?
-using namespace base;
using namespace std;
using namespace WebKit;
@@ -211,16 +209,16 @@ bool getEditCommand(const WebKeyboardEvent& event, string* name)
return false;
switch (event.windowsKeyCode) {
- case base::VKEY_LEFT:
+ case webkit_support::VKEY_LEFT:
*name = "MoveToBeginningOfLine";
break;
- case base::VKEY_RIGHT:
+ case webkit_support::VKEY_RIGHT:
*name = "MoveToEndOfLine";
break;
- case base::VKEY_UP:
+ case webkit_support::VKEY_UP:
*name = "MoveToBeginningOfDocument";
break;
- case base::VKEY_DOWN:
+ case webkit_support::VKEY_DOWN:
*name = "MoveToEndOfDocument";
break;
default:
@@ -257,7 +255,6 @@ EventSender::EventSender(TestShell* shell)
bindMethod("mouseUp", &EventSender::mouseUp);
bindMethod("contextClick", &EventSender::contextClick);
bindMethod("mouseMoveTo", &EventSender::mouseMoveTo);
- bindMethod("mouseWheelTo", &EventSender::mouseWheelTo);
bindMethod("leapForward", &EventSender::leapForward);
bindMethod("keyDown", &EventSender::keyDown);
bindMethod("dispatchMessage", &EventSender::dispatchMessage);
@@ -268,6 +265,8 @@ EventSender::EventSender(TestShell* shell)
bindMethod("textZoomOut", &EventSender::textZoomOut);
bindMethod("zoomPageIn", &EventSender::zoomPageIn);
bindMethod("zoomPageOut", &EventSender::zoomPageOut);
+ bindMethod("mouseScrollBy", &EventSender::mouseScrollBy);
+ bindMethod("continuousMouseScrollBy", &EventSender::continuousMouseScrollBy);
bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousClick);
bindMethod("beginDragWithFiles", &EventSender::beginDragWithFiles);
bindMethod("addTouchPoint", &EventSender::addTouchPoint);
@@ -474,32 +473,6 @@ void EventSender::mouseMoveTo(const CppArgumentList& arguments, CppVariant* resu
}
}
-void EventSender::mouseWheelTo(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
-
- // Force a layout here just to make sure every position has been
- // determined before we send events (as well as all the other methods
- // that send an event do). The layout test calling this
- // (scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html, only one
- // for now) does not rely on this though.
- webview()->layout();
-
- int horizontal = arguments[0].toInt32();
- int vertical = arguments[1].toInt32();
-
- WebMouseWheelEvent event;
- initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
- event.wheelTicksX = static_cast<float>(horizontal);
- event.wheelTicksY = static_cast<float>(vertical);
- event.deltaX = -horizontal * scrollbarPixelsPerTick;
- event.deltaY = -vertical * scrollbarPixelsPerTick;
- webview()->handleInputEvent(event);
-}
-
void EventSender::doMouseMove(const WebMouseEvent& e)
{
lastMousePos = WebPoint(e.x, e.y);
@@ -532,29 +505,29 @@ void EventSender::keyDown(const CppArgumentList& arguments, CppVariant* result)
bool needsShiftKeyModifier = false;
if ("\n" == codeStr) {
generateChar = true;
- text = code = base::VKEY_RETURN;
+ text = code = webkit_support::VKEY_RETURN;
} else if ("rightArrow" == codeStr)
- code = base::VKEY_RIGHT;
+ code = webkit_support::VKEY_RIGHT;
else if ("downArrow" == codeStr)
- code = base::VKEY_DOWN;
+ code = webkit_support::VKEY_DOWN;
else if ("leftArrow" == codeStr)
- code = base::VKEY_LEFT;
+ code = webkit_support::VKEY_LEFT;
else if ("upArrow" == codeStr)
- code = base::VKEY_UP;
+ code = webkit_support::VKEY_UP;
else if ("insert" == codeStr)
- code = base::VKEY_INSERT;
+ code = webkit_support::VKEY_INSERT;
else if ("delete" == codeStr)
- code = base::VKEY_DELETE;
+ code = webkit_support::VKEY_DELETE;
else if ("pageUp" == codeStr)
- code = base::VKEY_PRIOR;
+ code = webkit_support::VKEY_PRIOR;
else if ("pageDown" == codeStr)
- code = base::VKEY_NEXT;
+ code = webkit_support::VKEY_NEXT;
else if ("home" == codeStr)
- code = base::VKEY_HOME;
+ code = webkit_support::VKEY_HOME;
else if ("end" == codeStr)
- code = base::VKEY_END;
+ code = webkit_support::VKEY_END;
else if ("printScreen" == codeStr)
- code = base::VKEY_SNAPSHOT;
+ code = webkit_support::VKEY_SNAPSHOT;
else {
// Compare the input string with the function-key names defined by the
// DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key
@@ -564,7 +537,7 @@ void EventSender::keyDown(const CppArgumentList& arguments, CppVariant* result)
snprintf(functionChars, 10, "F%d", i);
string functionKeyName(functionChars);
if (functionKeyName == codeStr) {
- code = base::VKEY_F1 + (i - 1);
+ code = webkit_support::VKEY_F1 + (i - 1);
break;
}
}
@@ -716,6 +689,16 @@ void EventSender::zoomPageOut(const CppArgumentList&, CppVariant* result)
result->setNull();
}
+void EventSender::mouseScrollBy(const CppArgumentList& arguments, CppVariant* result)
+{
+ handleMouseWheel(arguments, result, false);
+}
+
+void EventSender::continuousMouseScrollBy(const CppArgumentList& arguments, CppVariant* result)
+{
+ handleMouseWheel(arguments, result, true);
+}
+
void EventSender::replaySavedEvents()
{
replayingSavedEvents = true;
@@ -891,6 +874,34 @@ void EventSender::sendCurrentTouchEvent(const WebInputEvent::Type type)
}
}
+void EventSender::handleMouseWheel(const CppArgumentList& arguments, CppVariant* result, bool continuous)
+{
+ result->setNull();
+
+ if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
+ return;
+
+ // Force a layout here just to make sure every position has been
+ // determined before we send events (as well as all the other methods
+ // that send an event do).
+ webview()->layout();
+
+ int horizontal = arguments[0].toInt32();
+ int vertical = arguments[1].toInt32();
+
+ WebMouseWheelEvent event;
+ initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event);
+ event.wheelTicksX = static_cast<float>(horizontal);
+ event.wheelTicksY = static_cast<float>(vertical);
+ event.deltaX = event.wheelTicksX;
+ event.deltaY = event.wheelTicksY;
+ if (!continuous) {
+ event.deltaX *= scrollbarPixelsPerTick;
+ event.deltaY *= scrollbarPixelsPerTick;
+ }
+ webview()->handleInputEvent(event);
+}
+
void EventSender::touchEnd(const CppArgumentList&, CppVariant* result)
{
result->setNull();
diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.h b/WebKitTools/DumpRenderTree/chromium/EventSender.h
index ac475a3..0d8fe5d 100644
--- a/WebKitTools/DumpRenderTree/chromium/EventSender.h
+++ b/WebKitTools/DumpRenderTree/chromium/EventSender.h
@@ -66,7 +66,6 @@ public:
void mouseDown(const CppArgumentList&, CppVariant*);
void mouseUp(const CppArgumentList&, CppVariant*);
void mouseMoveTo(const CppArgumentList&, CppVariant*);
- void mouseWheelTo(const CppArgumentList&, CppVariant*);
void leapForward(const CppArgumentList&, CppVariant*);
void keyDown(const CppArgumentList&, CppVariant*);
void dispatchMessage(const CppArgumentList&, CppVariant*);
@@ -74,6 +73,8 @@ public:
void textZoomOut(const CppArgumentList&, CppVariant*);
void zoomPageIn(const CppArgumentList&, CppVariant*);
void zoomPageOut(const CppArgumentList&, CppVariant*);
+ void mouseScrollBy(const CppArgumentList&, CppVariant*);
+ void continuousMouseScrollBy(const CppArgumentList&, CppVariant*);
void scheduleAsynchronousClick(const CppArgumentList&, CppVariant*);
void beginDragWithFiles(const CppArgumentList&, CppVariant*);
CppVariant dragMode;
@@ -137,6 +138,9 @@ private:
// Compose a touch event from the current touch points and send it.
void sendCurrentTouchEvent(const WebKit::WebInputEvent::Type);
+ // Handle a request to send a wheel event.
+ void handleMouseWheel(const CppArgumentList&, CppVariant*, bool continuous);
+
ScopedRunnableMethodFactory<EventSender> m_methodFactory;
// Non-owning pointer. The EventSender is owned by the TestShell.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index beae21e..2999d3a 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -36,8 +36,10 @@
#include "TestShell.h"
#include "WebViewHost.h"
#include "public/WebAnimationController.h"
+#include "public/WebBindings.h"
#include "public/WebConsoleMessage.h"
#include "public/WebDocument.h"
+#include "public/WebElement.h"
#include "public/WebFrame.h"
#include "public/WebGeolocationServiceMock.h"
#include "public/WebInputElement.h"
@@ -139,6 +141,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("numberOfPages", &LayoutTestController::numberOfPages);
bindMethod("dumpSelectionRect", &LayoutTestController::dumpSelectionRect);
bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
+ bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
// The following are stubs.
bindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive);
@@ -179,6 +182,8 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("abortModal", &LayoutTestController::abortModal);
bindMethod("setMockSpeechInputResult", &LayoutTestController::setMockSpeechInputResult);
+ bindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem);
+
// The fallback method is called when an unknown method is invoked.
bindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -942,6 +947,18 @@ void LayoutTestController::grantDesktopNotificationPermission(const CppArgumentL
result->set(true);
}
+void LayoutTestController::simulateDesktopNotificationClick(const CppArgumentList& arguments, CppVariant* result)
+{
+ if (arguments.size() != 1 || !arguments[0].isString()) {
+ result->set(false);
+ return;
+ }
+ if (m_shell->notificationPresenter()->simulateClick(cppVariantToWebString(arguments[0])))
+ result->set(true);
+ else
+ result->set(false);
+}
+
//
// Unimplemented stubs
//
@@ -1428,3 +1445,12 @@ WebKit::WebSpeechInputController* LayoutTestController::speechInputController(We
m_speechInputControllerMock.set(WebSpeechInputControllerMock::create(listener));
return m_speechInputControllerMock.get();
}
+
+void LayoutTestController::markerTextForListItem(const CppArgumentList& args, CppVariant* result)
+{
+ WebElement element;
+ if (!WebBindings::getElement(args[0].value.objectValue, &element))
+ result->setNull();
+ else
+ result->set(element.document().frame()->markerTextForListItem(element).utf8());
+}
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 352e89f..6706157 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -218,6 +218,8 @@ public:
// Grants permission for desktop notifications to an origin
void grantDesktopNotificationPermission(const CppArgumentList&, CppVariant*);
+ // Simulates a click on a desktop notification.
+ void simulateDesktopNotificationClick(const CppArgumentList&, CppVariant*);
void setEditingBehavior(const CppArgumentList&, CppVariant*);
@@ -310,6 +312,8 @@ public:
// Speech input related functions.
void setMockSpeechInputResult(const CppArgumentList&, CppVariant*);
+ void markerTextForListItem(const CppArgumentList&, CppVariant*);
+
public:
// The following methods are not exposed to JavaScript.
void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
index 95353a7..1098e38 100644
--- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp
@@ -31,18 +31,31 @@
#include "config.h"
#include "NotificationPresenter.h"
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
+#include "base/task.h" // FIXME: Remove this
#include "googleurl/src/gurl.h"
#include "public/WebNotification.h"
#include "public/WebNotificationPermissionCallback.h"
#include "public/WebSecurityOrigin.h"
#include "public/WebString.h"
#include "public/WebURL.h"
+#include "webkit/support/webkit_support.h"
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
using namespace WebKit;
+static WebString identifierForNotification(const WebNotification& notification)
+{
+ if (notification.isHTML())
+ return notification.url().spec().utf16();
+ return notification.title();
+}
+
+static void deferredDisplayDispatch(WebNotification notification)
+{
+ notification.dispatchDisplayEvent();
+}
+
void NotificationPresenter::grantPermission(const WebString& origin)
{
// Make sure it's in the form of an origin.
@@ -50,17 +63,28 @@ void NotificationPresenter::grantPermission(const WebString& origin)
m_allowedOrigins.add(WTF::String(url.GetOrigin().spec().c_str()));
}
+bool NotificationPresenter::simulateClick(const WebString& title)
+{
+ WTF::String id(title.data(), title.length());
+ if (m_activeNotifications.find(id) == m_activeNotifications.end())
+ return false;
+
+ const WebNotification& notification = m_activeNotifications.find(id)->second;
+ WebNotification eventTarget(notification);
+ eventTarget.dispatchClickEvent();
+ return true;
+}
+
// The output from all these methods matches what DumpRenderTree produces.
bool NotificationPresenter::show(const WebNotification& notification)
{
+ WebString identifier = identifierForNotification(notification);
if (!notification.replaceId().isEmpty()) {
WTF::String replaceId(notification.replaceId().data(), notification.replaceId().length());
if (m_replacements.find(replaceId) != m_replacements.end())
printf("REPLACING NOTIFICATION %s\n",
m_replacements.find(replaceId)->second.utf8().data());
- WebString identifier = notification.isHTML() ?
- notification.url().spec().utf16() : notification.title();
m_replacements.set(replaceId, WTF::String(identifier.data(), identifier.length()));
}
@@ -78,27 +102,30 @@ bool NotificationPresenter::show(const WebNotification& notification)
notification.body().utf8().data());
}
+ WTF::String id(identifier.data(), identifier.length());
+ m_activeNotifications.set(id, notification);
+
WebNotification eventTarget(notification);
- eventTarget.dispatchDisplayEvent();
+ webkit_support::PostTaskFromHere(NewRunnableFunction(&deferredDisplayDispatch, eventTarget));
return true;
}
void NotificationPresenter::cancel(const WebNotification& notification)
{
- WebString identifier;
- if (notification.isHTML())
- identifier = notification.url().spec().utf16();
- else
- identifier = notification.title();
-
+ WebString identifier = identifierForNotification(notification);
printf("DESKTOP NOTIFICATION CLOSED: %s\n", identifier.utf8().data());
WebNotification eventTarget(notification);
eventTarget.dispatchCloseEvent(false);
+
+ WTF::String id(identifier.data(), identifier.length());
+ m_activeNotifications.remove(id);
}
void NotificationPresenter::objectDestroyed(const WebKit::WebNotification& notification)
{
- // Nothing to do. Not storing the objects.
+ WebString identifier = identifierForNotification(notification);
+ WTF::String id(identifier.data(), identifier.length());
+ m_activeNotifications.remove(id);
}
WebNotificationPresenter::Permission NotificationPresenter::checkPermission(const WebURL& url)
diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h
index 5c7a400..896f345 100644
--- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h
+++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h
@@ -31,6 +31,7 @@
#ifndef NotificationPresenter_h
#define NotificationPresenter_h
+#include "public/WebNotification.h"
#include "public/WebNotificationPresenter.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
@@ -47,6 +48,9 @@ public:
// Called by the LayoutTestController to simulate a user granting permission.
void grantPermission(const WebKit::WebString& origin);
+ // Called by the LayoutTestController to simulate a user clicking on a notification.
+ bool simulateClick(const WebKit::WebString& notificationIdentifier);
+
// WebKit::WebNotificationPresenter interface
virtual bool show(const WebKit::WebNotification&);
virtual void cancel(const WebKit::WebNotification&);
@@ -63,6 +67,9 @@ private:
// Set of allowed origins.
HashSet<WTF::String> m_allowedOrigins;
+ // Map of active notifications.
+ HashMap<WTF::String, WebKit::WebNotification> m_activeNotifications;
+
// Map of active replacement IDs to the titles of those notifications
HashMap<WTF::String, WTF::String> m_replacements;
};
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index a145bf9..fae3f56 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -489,6 +489,12 @@ void WebViewHost::focusAccessibilityObject(const WebAccessibilityObject& object)
m_shell->accessibilityController()->setFocusedElement(object);
}
+void WebViewHost::didChangeAccessibilityObjectChildren(const WebAccessibilityObject& object)
+{
+ if (m_shell->accessibilityController()->shouldDumpAccessibilityNotifications())
+ printf("didChangeAccessibilityObjectChildren - new count: %d\n", object.childCount());
+}
+
WebNotificationPresenter* WebViewHost::notificationPresenter()
{
return m_shell->notificationPresenter();
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index d95c59f..5067342 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -126,6 +126,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
virtual int historyBackListCount();
virtual int historyForwardListCount();
virtual void focusAccessibilityObject(const WebKit::WebAccessibilityObject&);
+ virtual void didChangeAccessibilityObjectChildren(const WebKit::WebAccessibilityObject&);
virtual WebKit::WebNotificationPresenter* notificationPresenter();
virtual WebKit::WebGeolocationService* geolocationService();
virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
index fa3af64..63a4b81 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009 Zan Dobersek <zandobersek@gmail.com>
* Copyright (C) 2009 Holger Hans Peter Freyther
+ * 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
@@ -33,6 +34,7 @@
#include "DumpRenderTree.h"
+#include <GtkVersioning.h>
#include <JavaScriptCore/JSObjectRef.h>
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
@@ -86,37 +88,6 @@ static void sendOrQueueEvent(GdkEvent*, bool = true);
static void dispatchEvent(GdkEvent* event);
static guint getStateFlags();
-#if !GTK_CHECK_VERSION(2, 17, 3)
-static void gdk_window_get_root_coords(GdkWindow* window, gint x, gint y, gint* rootX, gint* rootY)
-{
- gdk_window_get_root_origin(window, rootX, rootY);
- *rootX = *rootX + x;
- *rootY = *rootY + y;
-}
-#endif
-
-#if !GTK_CHECK_VERSION(2, 14, 0)
-static GdkWindow* gtk_widget_get_window(GtkWidget* widget)
-{
- g_return_val_if_fail(GTK_IS_WIDGET(widget), 0);
- return widget->window;
-}
-#endif
-
-#if !GTK_CHECK_VERSION(2, 21, 2)
-static GdkDragAction gdk_drag_context_get_selected_action(GdkDragContext* context)
-{
- g_return_val_if_fail(GDK_IS_DRAG_CONTEXT(context), static_cast<GdkDragAction>(0));
- return context->action;
-}
-
-static GdkDragAction gdk_drag_context_get_actions(GdkDragContext* context)
-{
- g_return_val_if_fail(GDK_IS_DRAG_CONTEXT(context), GDK_ACTION_DEFAULT);
- return context->actions;
-}
-#endif
-
static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
return JSValueMakeBoolean(context, dragMode);
@@ -161,7 +132,7 @@ bool prepareMouseButtonEvent(GdkEvent* event, int eventSenderButtonNumber)
event->button.y = lastMousePositionY;
event->button.window = gtk_widget_get_window(GTK_WIDGET(view));
g_object_ref(event->button.window);
- event->button.device = gdk_device_get_core_pointer();
+ event->button.device = getDefaultGDKPointerDevice(event->button.window);
event->button.state = getStateFlags();
event->button.time = GDK_CURRENT_TIME;
event->button.axes = 0;
@@ -285,7 +256,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
event->motion.time = GDK_CURRENT_TIME;
event->motion.window = gtk_widget_get_window(GTK_WIDGET(view));
g_object_ref(event->motion.window);
- event->motion.device = gdk_device_get_core_pointer();
+ event->button.device = getDefaultGDKPointerDevice(event->motion.window);
event->motion.state = getStateFlags();
event->motion.axes = 0;
@@ -298,7 +269,7 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
return JSValueMakeUndefined(context);
}
-static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef mouseScrollByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
if (!view)
@@ -323,13 +294,13 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
g_object_ref(event->scroll.window);
if (horizontal < 0)
- event->scroll.direction = GDK_SCROLL_LEFT;
- else if (horizontal > 0)
event->scroll.direction = GDK_SCROLL_RIGHT;
+ else if (horizontal > 0)
+ event->scroll.direction = GDK_SCROLL_LEFT;
else if (vertical < 0)
- event->scroll.direction = GDK_SCROLL_UP;
- else if (vertical > 0)
event->scroll.direction = GDK_SCROLL_DOWN;
+ else if (vertical > 0)
+ event->scroll.direction = GDK_SCROLL_UP;
else
g_assert_not_reached();
@@ -337,6 +308,12 @@ static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef functio
return JSValueMakeUndefined(context);
}
+static JSValueRef continuousMouseScrollByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // GTK doesn't support continuous scroll events.
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
@@ -558,8 +535,9 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
pressEvent->key.window = gtk_widget_get_window(GTK_WIDGET(view));
g_object_ref(pressEvent->key.window);
#ifndef GTK_API_VERSION_2
- gdk_event_set_device(pressEvent, gdk_device_get_associated_device(gdk_display_get_core_pointer(gdk_drawable_get_display(pressEvent->key.window))));
+ gdk_event_set_device(pressEvent, getDefaultGDKPointerDevice(pressEvent->key.window));
#endif
+
// When synthesizing an event, an invalid hardware_keycode value
// can cause it to be badly processed by Gtk+.
GdkKeymapKey* keys;
@@ -624,7 +602,8 @@ static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function
}
static JSStaticFunction staticFunctions[] = {
- { "mouseWheelTo", mouseWheelToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mouseScrollBy", mouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "continuousMouseScrollBy", continuousMouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "contextClick", contextClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "mouseDown", mouseDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "mouseUp", mouseUpCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/gtk/EventSender.h b/WebKitTools/DumpRenderTree/gtk/EventSender.h
index e9b758d..f440f0d 100644
--- a/WebKitTools/DumpRenderTree/gtk/EventSender.h
+++ b/WebKitTools/DumpRenderTree/gtk/EventSender.h
@@ -32,10 +32,6 @@
typedef const struct OpaqueJSContext* JSContextRef;
typedef struct OpaqueJSValue* JSObjectRef;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GdkDragContext GdkDragContext;
-typedef void* gpointer;
-typedef int gboolean;
JSObjectRef makeEventSender(JSContextRef context, bool isTopFrame);
void replaySavedEvents();
diff --git a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
index afe81be..0f44f54 100644
--- a/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
@@ -22,6 +22,7 @@
#include "DumpRenderTree.h"
+#include <GOwnPtr.h>
#include <JavaScriptCore/JSStringRef.h>
#include <webkit/webkit.h>
#include <string.h>
@@ -58,7 +59,10 @@ bool LoadItem::invoke() const
bool LoadHTMLStringItem::invoke() const
{
- return false;
+ GOwnPtr<gchar> content(JSStringCopyUTF8CString(m_content.get()));
+ GOwnPtr<gchar> baseURL(JSStringCopyUTF8CString(m_baseURL.get()));
+ webkit_web_frame_load_string(mainFrame, content.get(), 0, 0, baseURL.get());
+ return true;
}
bool ReloadItem::invoke() const
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index 12a4a50..e756ebf 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -389,6 +389,7 @@ static void resetDefaultsToConsistentValues()
[defaults setObject:@"0.500000 0.500000 0.500000" forKey:@"AppleOtherHighlightColor"];
[defaults setObject:[NSArray arrayWithObject:@"en"] forKey:@"AppleLanguages"];
[defaults setBool:YES forKey:WebKitEnableFullDocumentTeardownPreferenceKey];
+ [defaults setBool:YES forKey:WebKitFullScreenEnabledPreferenceKey];
// Scrollbars are drawn either using AppKit (which uses NSUserDefaults) or using HIToolbox (which uses CFPreferences / kCFPreferencesAnyApplication / kCFPreferencesCurrentUser / kCFPreferencesAnyHost)
[defaults setObject:@"DoubleMax" forKey:@"AppleScrollBarVariant"];
diff --git a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
index f9afdb1..6194c26 100644
--- a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
@@ -227,6 +227,23 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
return NO;
}
+- (BOOL)webView:(WebView *)webView supportsFullScreenForElement:(DOMElement*)element
+{
+ return YES;
+}
+
+- (void)webView:(WebView *)webView enterFullScreenForElement:(DOMElement*)element listener:(NSObject<WebKitFullScreenListener>*)listener
+{
+ [listener webkitWillEnterFullScreen];
+ [listener webkitDidEnterFullScreen];
+}
+
+- (void)webView:(WebView *)webView exitFullScreenForElement:(DOMElement*)element listener:(NSObject<WebKitFullScreenListener>*)listener
+{
+ [listener webkitWillExitFullScreen];
+ [listener webkitDidExitFullScreen];
+}
+
- (BOOL)webView:(WebView *)webView didPressMissingPluginButton:(DOMElement *)element
{
printf("MISSING PLUGIN BUTTON PRESSED\n");
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
index 63554b2..5b81901 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -6,7 +6,6 @@ BASEDIR = $$PWD/../
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
-INCLUDEPATH += /usr/include/freetype2
INCLUDEPATH += ../../..
INCLUDEPATH += ../../../JavaScriptCore
INCLUDEPATH += ../../../JavaScriptCore/ForwardingHeaders
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 4a57d1d..00ccdb5 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -159,7 +159,7 @@ WebPage::WebPage(QObject* parent, DumpRenderTree* drt)
connect(this, SIGNAL(requestPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)), this, SLOT(requestPermission(QWebFrame*, QWebPage::PermissionDomain)));
connect(this, SIGNAL(checkPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain, QWebPage::PermissionPolicy&)), this, SLOT(checkPermission(QWebFrame*, QWebPage::PermissionDomain, QWebPage::PermissionPolicy&)));
- connect(this, SIGNAL(cancelRequestsForPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)), this, SLOT(cancelRequestsForPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)));
+ connect(this, SIGNAL(cancelRequestsForPermission(QWebFrame*, QWebPage::PermissionDomain)), this, SLOT(cancelPermission(QWebFrame*, QWebPage::PermissionDomain)));
}
WebPage::~WebPage()
@@ -202,6 +202,8 @@ void WebPage::resetSettings()
QWebSettings::setMaximumPagesInCache(0); // reset to default
settings()->setUserStyleSheetUrl(QUrl()); // reset to default
+
+ m_pendingGeolocationRequests.clear();
}
QWebPage *WebPage::createWindow(QWebPage::WebWindowType)
@@ -224,6 +226,15 @@ void WebPage::requestPermission(QWebFrame* frame, QWebPage::PermissionDomain dom
if (!m_drt->layoutTestController()->ignoreReqestForPermission())
setUserPermission(frame, domain, PermissionGranted);
break;
+ case GeolocationPermissionDomain:
+ if (m_drt->layoutTestController()->isGeolocationPermissionSet())
+ if (m_drt->layoutTestController()->geolocationPermission())
+ setUserPermission(frame, domain, PermissionGranted);
+ else
+ setUserPermission(frame, domain, PermissionDenied);
+ else
+ m_pendingGeolocationRequests.append(frame);
+ break;
default:
break;
}
@@ -243,8 +254,35 @@ void WebPage::checkPermission(QWebFrame* frame, QWebPage::PermissionDomain domai
}
}
-void WebPage::cancelRequestsForPermission(QWebFrame*, QWebPage::PermissionDomain)
+void WebPage::cancelPermission(QWebFrame* frame, QWebPage::PermissionDomain domain)
+{
+ switch (domain) {
+ case GeolocationPermissionDomain:
+ m_pendingGeolocationRequests.removeOne(frame);
+ break;
+ default:
+ break;
+ }
+}
+
+void WebPage::permissionSet(QWebPage::PermissionDomain domain)
{
+ switch (domain) {
+ case GeolocationPermissionDomain:
+ {
+ Q_ASSERT(m_drt->layoutTestController()->isGeolocationPermissionSet());
+ foreach (QWebFrame* frame, m_pendingGeolocationRequests)
+ if (m_drt->layoutTestController()->geolocationPermission())
+ setUserPermission(frame, domain, PermissionGranted);
+ else
+ setUserPermission(frame, domain, PermissionDenied);
+
+ m_pendingGeolocationRequests.clear();
+ break;
+ }
+ default:
+ break;
+ }
}
static QString urlSuitableForTestResult(const QString& url)
@@ -367,11 +405,6 @@ QObject* WebPage::createPlugin(const QString& classId, const QUrl& url, const QS
#endif
}
-bool WebPage::allowGeolocationRequest(QWebFrame *)
-{
- return m_drt->layoutTestController()->geolocationPermission();
-}
-
void WebPage::setViewGeometry(const QRect& rect)
{
if (WebViewGraphicsBased* v = qobject_cast<WebViewGraphicsBased*>(view()))
@@ -391,7 +424,7 @@ DumpRenderTree::DumpRenderTree()
: m_dumpPixels(false)
, m_stdin(0)
, m_enableTextOutput(false)
- , m_singleFileMode(false)
+ , m_standAloneMode(false)
, m_graphicsBased(false)
, m_persistentStoragePath(QString(getenv("DUMPRENDERTREE_TEMP")))
{
@@ -431,6 +464,9 @@ DumpRenderTree::DumpRenderTree()
connect(m_controller, SIGNAL(showPage()), this, SLOT(showPage()));
connect(m_controller, SIGNAL(hidePage()), this, SLOT(hidePage()));
+ // async geolocation permission set by controller
+ connect(m_controller, SIGNAL(geolocationPermissionSet()), this, SLOT(geolocationPermissionSet()));
+
connect(m_controller, SIGNAL(done()), this, SLOT(dump()));
m_eventSender = new EventSender(m_page);
m_textInputController = new TextInputController(m_page);
@@ -605,6 +641,40 @@ void DumpRenderTree::readLine()
processLine(QString::fromLocal8Bit(line.constData(), line.length()));
}
+void DumpRenderTree::processArgsLine(const QStringList &args)
+{
+ setStandAloneMode(true);
+
+ for (int i = 1; i < args.size(); ++i)
+ if (!args.at(i).startsWith('-'))
+ m_standAloneModeTestList.append(args[i]);
+
+ QFileInfo firstEntry(m_standAloneModeTestList.first());
+ if (firstEntry.isDir()) {
+ QDir folderEntry(m_standAloneModeTestList.first());
+ QStringList supportedExt;
+ // Check for all supported extensions (from Scripts/webkitpy/layout_tests/layout_package/test_files.py).
+ supportedExt << "*.html" << "*.shtml" << "*.xml" << "*.xhtml" << "*.xhtmlmp" << "*.pl" << "*.php" << "*.svg";
+ m_standAloneModeTestList = folderEntry.entryList(supportedExt, QDir::Files);
+ for (int i = 0; i < m_standAloneModeTestList.size(); ++i)
+ m_standAloneModeTestList[i] = folderEntry.absoluteFilePath(m_standAloneModeTestList[i]);
+ }
+
+ processLine(m_standAloneModeTestList.first());
+ m_standAloneModeTestList.removeFirst();
+
+ connect(this, SIGNAL(ready()), this, SLOT(loadNextTestInStandAloneMode()));
+}
+
+void DumpRenderTree::loadNextTestInStandAloneMode()
+{
+ if (m_standAloneModeTestList.isEmpty())
+ emit quit();
+
+ processLine(m_standAloneModeTestList.first());
+ m_standAloneModeTestList.removeFirst();
+}
+
void DumpRenderTree::processLine(const QString &input)
{
QString line = input;
@@ -636,14 +706,9 @@ void DumpRenderTree::processLine(const QString &input)
fi = QFileInfo(currentDir, line.prepend(QLatin1String("LayoutTests/")));
if (!fi.exists()) {
- if (isSingleFileMode())
- emit quit();
- else
- emit ready();
-
+ emit ready();
return;
}
-
}
open(QUrl::fromLocalFile(fi.absoluteFilePath()));
@@ -834,7 +899,7 @@ void DumpRenderTree::dump()
QWebFrame *mainFrame = m_page->mainFrame();
- if (isSingleFileMode()) {
+ if (isStandAloneMode()) {
QString markup = mainFrame->toHtml();
fprintf(stdout, "Source:\n\n%s\n", markup.toUtf8().constData());
}
@@ -922,10 +987,7 @@ void DumpRenderTree::dump()
fflush(stdout);
fflush(stderr);
- if (isSingleFileMode())
- emit quit();
- else
- emit ready();
+ emit ready();
}
void DumpRenderTree::titleChanged(const QString &s)
@@ -999,6 +1061,11 @@ int DumpRenderTree::windowCount() const
return windows.count() + 1;
}
+void DumpRenderTree::geolocationPermissionSet()
+{
+ m_page->permissionSet(QWebPage::GeolocationPermissionDomain);
+}
+
void DumpRenderTree::switchFocus(bool focused)
{
QFocusEvent event((focused) ? QEvent::FocusIn : QEvent::FocusOut, Qt::ActiveWindowFocusReason);
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
index de0c6c5..3d34443 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
@@ -79,9 +79,6 @@ public:
void setTextOutputEnabled(bool enable) { m_enableTextOutput = enable; }
bool isTextOutputEnabled() { return m_enableTextOutput; }
- void setSingleFileMode(bool flag) { m_singleFileMode = flag; }
- bool isSingleFileMode() { return m_singleFileMode; }
-
void setGraphicsBased(bool flag) { m_graphicsBased = flag; }
bool isGraphicsBased() { return m_graphicsBased; }
@@ -106,6 +103,7 @@ public:
#if defined(Q_WS_X11)
static void initializeFonts();
#endif
+ void processArgsLine(const QStringList&);
public Q_SLOTS:
void initJSObjects();
@@ -128,8 +126,13 @@ private Q_SLOTS:
void showPage();
void hidePage();
void dryRunPrint(QWebFrame*);
+ void loadNextTestInStandAloneMode();
+ void geolocationPermissionSet();
private:
+ void setStandAloneMode(bool flag) { m_standAloneMode = flag; }
+ bool isStandAloneMode() { return m_standAloneMode; }
+
QString dumpFramesAsText(QWebFrame* frame);
QString dumpBackForwardList(QWebPage* page);
QString dumpFrameScrollPosition(QWebFrame* frame);
@@ -137,6 +140,7 @@ private:
bool m_dumpPixels;
QString m_expectedHash;
+ QStringList m_standAloneModeTestList;
WebPage *m_page;
QWidget* m_mainView;
@@ -150,7 +154,7 @@ private:
QList<QObject*> windows;
bool m_enableTextOutput;
- bool m_singleFileMode;
+ bool m_standAloneMode;
bool m_graphicsBased;
QString m_persistentStoragePath;
};
@@ -188,12 +192,13 @@ public:
QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
+ void permissionSet(QWebPage::PermissionDomain domain);
+
public slots:
bool shouldInterruptJavaScript() { return false; }
- bool allowGeolocationRequest(QWebFrame *frame);
void requestPermission(QWebFrame* frame, QWebPage::PermissionDomain domain);
void checkPermission(QWebFrame* frame, QWebPage::PermissionDomain domain, QWebPage::PermissionPolicy& policy);
- void cancelRequestsForPermission(QWebFrame* frame, QWebPage::PermissionDomain domain);
+ void cancelPermission(QWebFrame* frame, QWebPage::PermissionDomain domain);
protected:
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, NavigationType type);
@@ -204,6 +209,7 @@ private slots:
private:
QWebInspector* m_webInspector;
+ QList<QWebFrame*> m_pendingGeolocationRequests;
DumpRenderTree *m_drt;
};
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 74baf37..b783141 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -68,6 +68,8 @@ void LayoutTestController::reset()
m_userStyleSheetEnabled = false;
m_desktopNotificationAllowedOrigins.clear();
m_ignoreDesktopNotification = false;
+ m_isGeolocationPermissionSet = false;
+ m_geolocationPermission = false;
DumpRenderTreeSupportQt::dumpEditingCallbacks(false);
DumpRenderTreeSupportQt::dumpFrameLoader(false);
@@ -715,6 +717,12 @@ void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double
void LayoutTestController::setGeolocationPermission(bool allow)
{
+ setGeolocationPermissionCommon(allow);
+ emit geolocationPermissionSet();
+}
+
+void LayoutTestController::setGeolocationPermissionCommon(bool allow)
+{
m_isGeolocationPermissionSet = true;
m_geolocationPermission = allow;
}
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 207e093..7e58f44 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -85,6 +85,7 @@ signals:
void showPage();
void hidePage();
+ void geolocationPermissionSet();
public slots:
void maybeDump(bool ok);
@@ -239,6 +240,9 @@ private slots:
void processWork();
private:
+ void setGeolocationPermissionCommon(bool allow);
+
+private:
bool m_hasDumped;
bool m_textDump;
bool m_dumpBackForwardList;
diff --git a/WebKitTools/DumpRenderTree/qt/main.cpp b/WebKitTools/DumpRenderTree/qt/main.cpp
index 7d1c08c..8349d73 100644
--- a/WebKitTools/DumpRenderTree/qt/main.cpp
+++ b/WebKitTools/DumpRenderTree/qt/main.cpp
@@ -143,7 +143,8 @@ int main(int argc, char* argv[])
QStringList args = app.arguments();
if (args.count() < 2) {
- qDebug() << "Usage: DumpRenderTree [-v|--pixel-tests] filename";
+ qDebug() << "Usage: DumpRenderTree [-v|--pixel-tests] filename [filename2..n]";
+ qDebug() << "Or folder containing test files: DumpRenderTree [-v|--pixel-tests] dirpath";
exit(0);
}
@@ -161,15 +162,8 @@ int main(int argc, char* argv[])
if (args.contains(QLatin1String("-"))) {
QObject::connect(&dumper, SIGNAL(ready()), &dumper, SLOT(readLine()), Qt::QueuedConnection);
QTimer::singleShot(0, &dumper, SLOT(readLine()));
- } else {
- dumper.setSingleFileMode(true);
- for (int i = 1; i < args.size(); ++i) {
- if (!args.at(i).startsWith('-')) {
- dumper.processLine(args.at(i));
- break;
- }
- }
- }
+ } else
+ dumper.processArgsLine(args);
return app.exec();
diff --git a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
index 8216f7a..8c4e98d 100644
--- a/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
+++ b/WebKitTools/DumpRenderTree/unix/TestNetscapePlugin/TestNetscapePlugin.cpp
@@ -267,7 +267,33 @@ webkit_test_plugin_handle_event(NPP instance, void* event)
return 0;
XEvent* evt = static_cast<XEvent*>(event);
- pluginLog(instance, "event %d", evt->type);
+
+ switch (evt->type) {
+ case ButtonRelease:
+ pluginLog(instance, "mouseUp at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
+ break;
+ case ButtonPress:
+ pluginLog(instance, "mouseDown at (%d, %d)", evt->xbutton.x, evt->xbutton.y);
+ break;
+ case KeyRelease:
+ pluginLog(instance, "keyUp '%c'", evt->xkey.keycode);
+ break;
+ case KeyPress:
+ pluginLog(instance, "keyDown '%c'", evt->xkey.keycode);
+ break;
+ case MotionNotify:
+ case EnterNotify:
+ case LeaveNotify:
+ break;
+ case FocusIn:
+ pluginLog(instance, "getFocusEvent");
+ break;
+ case FocusOut:
+ pluginLog(instance, "loseFocusEvent");
+ break;
+ default:
+ pluginLog(instance, "event %d", evt->type);
+ }
return 0;
}
diff --git a/WebKitTools/GNUmakefile.am b/WebKitTools/GNUmakefile.am
index 33d4614..39df421 100644
--- a/WebKitTools/GNUmakefile.am
+++ b/WebKitTools/GNUmakefile.am
@@ -36,6 +36,7 @@ dumprendertree_cppflags := \
-I$(srcdir)/WebKitTools/DumpRenderTree/cairo \
-I$(srcdir)/WebKitTools/DumpRenderTree/gtk \
-I$(srcdir)/WebKit/gtk \
+ -I$(srcdir)/WebCore/platform/gtk \
-I$(top_builddir)/WebKit/gtk \
-I$(top_builddir)/DerivedSources \
$(global_cppflags) \
@@ -72,7 +73,8 @@ Programs_DumpRenderTree_SOURCES = \
WebKitTools/DumpRenderTree/gtk/GCControllerGtk.cpp \
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp \
WebKitTools/DumpRenderTree/gtk/PixelDumpSupportGtk.cpp \
- WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
+ WebKitTools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
+ WebCore/platform/gtk/GtkVersioning.c
Programs_DumpRenderTree_CXXFLAGS = \
$(global_cxxflags) \
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 6422cca..0b4e170 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -172,6 +172,11 @@ static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, const void *
[(BrowserWindowController *)clientInfo didCommitLoadForFrame:frame];
}
+static void didFinishDocumentLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
+{
+ LOG(@"didFinishDocumentLoadForFrame");
+}
+
static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, const void *clientInfo)
{
LOG(@"didFinishLoadForFrame");
@@ -379,6 +384,7 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt
didReceiveServerRedirectForProvisionalLoadForFrame,
didFailProvisionalLoadWithErrorForFrame,
didCommitLoadForFrame,
+ didFinishDocumentLoadForFrame,
didFinishLoadForFrame,
didFailLoadWithErrorForFrame,
didReceiveTitleForFrame,
diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
index 9efe64f..2e0dccd 100644
--- a/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.cpp
@@ -79,10 +79,13 @@ QGraphicsWKView* BrowserView::view() const
BrowserWindow::BrowserWindow()
{
+ setAttribute(Qt::WA_DeleteOnClose);
+
m_menu = new QMenuBar();
m_browser = new BrowserView();
m_addressBar = new QLineEdit();
+ m_menu->addAction("New Window", this, SLOT(newWindow()));
m_menu->addAction("Quit", this, SLOT(close()));
m_browser->setFocus(Qt::OtherFocusReason);
@@ -111,6 +114,15 @@ void BrowserWindow::load(const QString& url)
m_browser->load(QUrl(url));
}
+BrowserWindow* BrowserWindow::newWindow(const QString& url)
+{
+ BrowserWindow* window = new BrowserWindow();
+ window->resize(960, 640);
+ window->show();
+ window->load(url);
+ return window;
+}
+
void BrowserWindow::changeLocation()
{
QString string = m_addressBar->text();
diff --git a/WebKitTools/MiniBrowser/qt/BrowserWindow.h b/WebKitTools/MiniBrowser/qt/BrowserWindow.h
index fa11390..99d3e82 100644
--- a/WebKitTools/MiniBrowser/qt/BrowserWindow.h
+++ b/WebKitTools/MiniBrowser/qt/BrowserWindow.h
@@ -28,13 +28,13 @@
#define PLATFORM(x) 0
-#include <stdint.h>
+#include "WKContext.h"
+#include "WKRetainPtr.h"
+#include "qgraphicswkview.h"
#include <QtGui>
-#include <WebKit2/WKRetainPtr.h>
-#include <WebKit2/WKContext.h>
#include <QGraphicsScene>
#include <QGraphicsView>
-#include <WebKit2/qgraphicswkview.h>
+#include <stdint.h>
class BrowserView : public QGraphicsView {
Q_OBJECT
@@ -62,6 +62,9 @@ public:
~BrowserWindow();
void load(const QString& url);
+public slots:
+ BrowserWindow* newWindow(const QString& url = "about:blank");
+
protected slots:
void changeLocation();
void loadProgress(int progress);
diff --git a/WebKitTools/MiniBrowser/qt/MiniBrowser.pro b/WebKitTools/MiniBrowser/qt/MiniBrowser.pro
index b34b8f7..274b9e5 100644
--- a/WebKitTools/MiniBrowser/qt/MiniBrowser.pro
+++ b/WebKitTools/MiniBrowser/qt/MiniBrowser.pro
@@ -14,6 +14,8 @@ isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../../..
include(../../../WebKit.pri)
INCLUDEPATH += \
+ $$PWD/../../../WebKit2/ \
+ $$PWD/../../../WebKit2/UIProcess/API/cpp \
$$PWD/../../../WebKit2/UIProcess/API/C \
$$PWD/../../../WebKit2/UIProcess/API/qt \
$$OUTPUT_DIR/include
diff --git a/WebKitTools/MiniBrowser/qt/main.cpp b/WebKitTools/MiniBrowser/qt/main.cpp
index b261397..2bc346b 100644
--- a/WebKitTools/MiniBrowser/qt/main.cpp
+++ b/WebKitTools/MiniBrowser/qt/main.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2010 University of Szeged
*
* All rights reserved.
*
@@ -31,10 +32,23 @@
int main(int argc, char** argv) {
QApplication app(argc, argv);
- BrowserWindow window;
- window.resize(960, 640);
- window.show();
- window.load(argc > 1 ? argv[1] : "http://www.google.com");
+ QStringList args = QApplication::arguments();
+ QStringList urls = args;
+ urls.removeAt(0);
+
+ if (urls.isEmpty()) {
+ QString defaultUrl = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
+ if (QDir(defaultUrl).exists())
+ urls.append(defaultUrl);
+ else
+ urls.append("http://www.google.com");
+ }
+
+ BrowserWindow* window = 0;
+ foreach (QString url, urls) {
+ window = new BrowserWindow();
+ window->newWindow(url);
+ }
app.exec();
diff --git a/WebKitTools/QueueStatusServer/handlers/dashboard.py b/WebKitTools/QueueStatusServer/handlers/dashboard.py
index bbb65b8..26de263 100644
--- a/WebKitTools/QueueStatusServer/handlers/dashboard.py
+++ b/WebKitTools/QueueStatusServer/handlers/dashboard.py
@@ -43,7 +43,6 @@ class Dashboard(webapp.RequestHandler):
_queues_to_display = [
["Style", "style-queue"],
["Cr-Linux", "chromium-ews"],
- ["Cr-Win", "cr-win-ews"],
["Qt", "qt-ews"],
["Gtk", "gtk-ews"],
["Mac", "mac-ews"],
diff --git a/WebKitTools/QueueStatusServer/handlers/queuestatus.py b/WebKitTools/QueueStatusServer/handlers/queuestatus.py
index 6282a98..5295b17 100644
--- a/WebKitTools/QueueStatusServer/handlers/queuestatus.py
+++ b/WebKitTools/QueueStatusServer/handlers/queuestatus.py
@@ -49,7 +49,7 @@ class QueueStatus(webapp.RequestHandler):
def get(self, queue_name):
work_items = WorkItems.all().filter("queue_name =", queue_name).get()
- statuses = queuestatus.QueueStatus.all().filter("queue_name =", queue_name).order("-date").fetch(6)
+ statuses = queuestatus.QueueStatus.all().filter("queue_name =", queue_name).order("-date").fetch(15)
template_values = {
"display_queue_name": display_name_for_queue(queue_name),
"work_item_rows": self._rows_for_work_items(work_items),
diff --git a/WebKitTools/QueueStatusServer/model/queues.py b/WebKitTools/QueueStatusServer/model/queues.py
index 2f0884f..9658dd4 100644
--- a/WebKitTools/QueueStatusServer/model/queues.py
+++ b/WebKitTools/QueueStatusServer/model/queues.py
@@ -33,11 +33,11 @@ queues = [
"commit-queue",
"style-queue",
"chromium-ews",
- "cr-win-ews",
"qt-ews",
"gtk-ews",
"mac-ews",
"win-ews",
+ "efl-ews",
]
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index acd7736..4234905 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -2,6 +2,7 @@
# Copyright (C) 2005, 2006 Apple Inc. All rights reserved.
# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2010 moiji-mobile.com All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -330,9 +331,7 @@ if (isGtk()) {
}
foreach (@features) {
- if ($_->{option} eq "coverage") {
- push @options, XcodeCoverageSupportOptions() if $coverageSupport;
- } else {
+ if ($_->{option} ne "coverage") {
my $option = option($_->{define}, ${$_->{value}}, $_->{default});
push @options, $option unless $option eq "";
}
@@ -441,7 +440,9 @@ for my $dir (@projects) {
$result = buildQMakeQtProject($dir, $clean, @options);
} elsif (isAppleMacWebKit()) {
$dir = "MiniBrowser" if $dir eq "WebKitTools/MiniBrowser";
- $result = buildXCodeProject($dir, $clean, @options, @ARGV);
+ my @local_options = @options;
+ push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $dir ne "ANGLE";
+ $result = buildXCodeProject($dir, $clean, @local_options, @ARGV);
} elsif (isAppleWinWebKit()) {
if ($dir eq "WebKit") {
$result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
diff --git a/WebKitTools/Scripts/check-for-global-initializers b/WebKitTools/Scripts/check-for-global-initializers
index 0472901..102fa09 100755
--- a/WebKitTools/Scripts/check-for-global-initializers
+++ b/WebKitTools/Scripts/check-for-global-initializers
@@ -105,18 +105,19 @@ for my $file (sort @files) {
next if $shortName eq "nodes.o";
}
if ($target eq "WebCore") {
+ next if $shortName eq "BidiRun.o";
next if $shortName eq "CachedPage.o";
next if $shortName eq "CachedResource.o";
+ next if $shortName eq "FEGaussianBlur.o";
next if $shortName eq "Frame.o";
next if $shortName eq "JSCustomSQLTransactionCallback.o";
next if $shortName eq "JSLazyEventListener.o";
next if $shortName eq "Node.o";
next if $shortName eq "Page.o";
next if $shortName eq "Range.o";
- next if $shortName eq "BidiRun.o";
next if $shortName eq "RenderObject.o";
- next if $shortName eq "SubresourceLoader.o";
next if $shortName eq "SVGElementInstance.o";
+ next if $shortName eq "SubresourceLoader.o";
next if $shortName eq "XMLHttpRequest.o";
}
if ($target eq "WebKit") {
diff --git a/WebKitTools/Scripts/enumerate-included-framework-headers b/WebKitTools/Scripts/enumerate-included-framework-headers
deleted file mode 100755
index 598a790..0000000
--- a/WebKitTools/Scripts/enumerate-included-framework-headers
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2009, 2010 University of Szeged
-# 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 UNIVERSITY OF SZEGED ``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 UNIVERSITY OF SZEGED 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.
-#
-# A script to find and enumerate headers included from the given frameworks by files in the
-# current directory (and subdirectories).
-
-# FIXME: This should be rewritten in perl.
-# FIXME: Currently only works for qt.
-
-platform_prefixes=android/\|brew/\|cf/\|chromium/\|curl\|efl/\|gtk/\|haiku/\|mac/\|soup\|v8\|win/\|wx/
-
-for framework in $*; do
- headers=`find . \( -name '*.cpp' -o -name '*.h' \) -exec grep "<$framework/" {} ';' | sed -e 's|.*/\(.*\.h\).*|\1|' | sort -u`
-
- for header in $headers
- do
- header_paths=`find ../$framework -name $header | sed "s/..\/$framework\///"`
-
- if test `echo $header_paths | wc -w` -eq 1
- then
- header_path=$header_paths
- if test `echo $header_path | grep -c -E $platform_prefixes` -ne 0
- then
- continue
- fi
- else
- for path in $header_paths
- do
- if test `echo $path | grep -c -E $platform_prefixes` -eq 0
- then
- header_path=$path
- break
- fi
- done
- fi
-
- echo -n "$header_path "
- done
-done
diff --git a/WebKitTools/Scripts/prepare-ChangeLog b/WebKitTools/Scripts/prepare-ChangeLog
index 45aca1b..c2adaf5 100755
--- a/WebKitTools/Scripts/prepare-ChangeLog
+++ b/WebKitTools/Scripts/prepare-ChangeLog
@@ -715,7 +715,7 @@ sub get_function_line_ranges_for_c($$)
if (!$in_braces and $potential_start) {
$start = $potential_start;
$name = $potential_name;
- if (@namespaces && (length($name) < 2 || substr($name,1,1) ne "[")) {
+ if (@namespaces && $name && (length($name) < 2 || substr($name,1,1) ne "[")) {
$name = join ('::', @namespaces, $name);
}
}
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 3901611..b4d3f60 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -403,7 +403,7 @@ sub XcodeCoverageSupportOptions()
push @coverageSupportOptions, "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES";
push @coverageSupportOptions, "EXTRA_LINK= \$(EXTRA_LINK) -ftest-coverage -fprofile-arcs";
push @coverageSupportOptions, "OTHER_CFLAGS= \$(OTHER_CFLAGS) -DCOVERAGE -MD";
- push @coverageSupportOptions, "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ftest-coverage -fprofile-arcs -framework AppKit";
+ push @coverageSupportOptions, "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -ftest-coverage -fprofile-arcs -lgcov";
return @coverageSupportOptions;
}
diff --git a/WebKitTools/Scripts/webkitpy/common/config/committers.py b/WebKitTools/Scripts/webkitpy/common/config/committers.py
index 5110db1..19ebc5f 100644
--- a/WebKitTools/Scripts/webkitpy/common/config/committers.py
+++ b/WebKitTools/Scripts/webkitpy/common/config/committers.py
@@ -81,6 +81,7 @@ committers_unable_to_review = [
Committer("Ben Murdoch", "benm@google.com", "benm"),
Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org"], "icefox"),
Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"], "otte"),
+ Committer("Benjamin Poulain", ["benjamin.poulain@nokia.com", "ikipou@gmail.com"]),
Committer("Brent Fulgham", "bfulgham@webkit.org", "bfulgham"),
Committer("Brett Wilson", "brettw@chromium.org", "brettx"),
Committer("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
@@ -88,7 +89,6 @@ committers_unable_to_review = [
Committer("Carol Szabo", "carol.szabo@nokia.com"),
Committer("Chang Shu", "Chang.Shu@nokia.com"),
Committer("Chris Evans", "cevans@google.com"),
- Committer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
Committer("Chris Petersen", "cpetersen@apple.com", "cpetersen"),
Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org"]),
Committer("Collin Jackson", "collinj@webkit.org"),
@@ -167,6 +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("Vangelis Kokkevis", "vangelis@chromium.org", "vangelis"),
Committer("Victor Wang", "victorw@chromium.org", "victorw"),
Committer("Vitaly Repeshko", "vitalyr@chromium.org"),
Committer("William Siegrist", "wsiegrist@apple.com", "wms"),
@@ -204,6 +205,7 @@ reviewers_list = [
Reviewer("Brady Eidson", "beidson@apple.com", "bradee-oh"),
Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
Reviewer("Chris Blumenberg", "cblu@apple.com", "cblu"),
+ Reviewer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
Reviewer("Chris Fleizach", "cfleizach@apple.com", "cfleizach"),
Reviewer("Chris Jerdonek", "cjerdonek@webkit.org", "cjerdonek"),
Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"], "mitzpettel"),
diff --git a/WebKitTools/Scripts/webkitpy/common/config/ports.py b/WebKitTools/Scripts/webkitpy/common/config/ports.py
index 9d4ac3f..ebd88b1 100644
--- a/WebKitTools/Scripts/webkitpy/common/config/ports.py
+++ b/WebKitTools/Scripts/webkitpy/common/config/ports.py
@@ -49,6 +49,7 @@ class WebKitPort(object):
"mac": MacPort,
"win": WinPort,
"qt": QtPort,
+ "efl": EflPort,
}
default_port = {
"Windows": WinPort,
@@ -177,6 +178,24 @@ class QtPort(WebKitPort):
return command
+class EflPort(WebKitPort):
+
+ @classmethod
+ def name(cls):
+ return "Efl"
+
+ @classmethod
+ def flag(cls):
+ return "--port=efl"
+
+ @classmethod
+ def build_webkit_command(cls, build_style=None):
+ command = WebKitPort.build_webkit_command(build_style=build_style)
+ command.append("--efl")
+ command.append(WebKitPort.makeArgs())
+ return command
+
+
class ChromiumPort(WebKitPort):
@classmethod
diff --git a/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py b/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
index 40db32c..2b2258e 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/bugzilla.py
@@ -341,11 +341,8 @@ class CommitterValidator(object):
flag_name, contribution_guidlines)
message += "\n\n- If you have %s rights please correct the error in %s by adding yourself to the file (no review needed). " % (
flag_name, committers_list)
- message += "Due to bug 30084 the %s will require a restart after your change. " % queue_name
- message += "Please contact %s to request a %s restart. " % (
- queue_administrator, queue_name)
- message += "After restart the %s will correctly respect your %s rights." % (
- queue_name, flag_name)
+ message += "The %s restarts itself every 2 hours. After restart the %s will correctly respect your %s rights." % (
+ queue_name, queue_name, flag_name)
return message
def _validate_setter_email(self, patch, result_key, rejection_function):
@@ -521,6 +518,8 @@ class Bugzilla(object):
def fetch_bug_dictionary(self, bug_id):
try:
return self._parse_bug_page(self._fetch_bug_page(bug_id))
+ except KeyboardInterrupt:
+ raise
except:
self.authenticate()
return self._parse_bug_page(self._fetch_bug_page(bug_id))
diff --git a/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py b/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py
index 3556121..280696e 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/bugzilla_unittest.py
@@ -68,7 +68,7 @@ class CommitterValidatorTest(unittest.TestCase):
- If you do not have review rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
-- If you have review rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your review rights."""
+- If you have review rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your review rights."""
self.assertEqual(validator._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html
new file mode 100644
index 0000000..38c54e3
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/exception.html
@@ -0,0 +1 @@
+exception
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html
new file mode 100644
index 0000000..c253983
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/failures/expected/keyboard.html
@@ -0,0 +1 @@
+keyboard
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt
new file mode 100644
index 0000000..9427269
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error-expected.txt
@@ -0,0 +1 @@
+error-txt
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html
new file mode 100644
index 0000000..8276753
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/passes/error.html
@@ -0,0 +1 @@
+error
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt b/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt
index 6e66caa..16556e3 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/data/platform/test/test_expectations.txt
@@ -8,3 +8,5 @@ WONTFIX : failures/expected/missing_image.html = MISSING PASS
WONTFIX : failures/expected/missing_text.html = MISSING PASS
WONTFIX : failures/expected/text.html = TEXT
WONTFIX : failures/expected/timeout.html = TIMEOUT
+WONTFIX SKIP : failures/expected/keyboard.html = CRASH
+WONTFIX SKIP : failures/expected/exception.html = CRASH
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
index 6343400..ec33086 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
@@ -169,6 +169,11 @@ class SingleTestThread(threading.Thread):
self._output_dir = output_dir
def run(self):
+ self._covered_run()
+
+ def _covered_run(self):
+ # FIXME: this is a separate routine to work around a bug
+ # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
test_info = self._test_info
driver = self._port.create_driver(self._image_path, self._shell_args)
driver.start()
@@ -287,6 +292,11 @@ class TestShellThread(WatchableThread):
def run(self):
"""Delegate main work to a helper method and watch for uncaught
exceptions."""
+ self._covered_run()
+
+ def _covered_run(self):
+ # FIXME: this is a separate routine to work around a bug
+ # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
self._thread_id = thread.get_ident()
self._start_time = time.time()
self._num_tests = 0
@@ -303,9 +313,9 @@ class TestShellThread(WatchableThread):
self._exception_info = sys.exc_info()
self._stop_time = time.time()
# Re-raise it and die.
- _log.error('%s dying: %s' % (self.getName(),
+ _log.error('%s dying, exception raised: %s' % (self.getName(),
self._exception_info))
- raise
+
self._stop_time = time.time()
def run_in_main_thread(self, test_runner, result_summary):
@@ -321,14 +331,8 @@ class TestShellThread(WatchableThread):
If test_runner is not None, then we call test_runner.UpdateSummary()
with the results of each test."""
- batch_size = 0
+ batch_size = self._options.batch_size
batch_count = 0
- if self._options.batch_size:
- try:
- batch_size = int(self._options.batch_size)
- except:
- _log.info("Ignoring invalid batch size '%s'" %
- self._options.batch_size)
# Append tests we're running to the existing tests_run.txt file.
# This is created in run_webkit_tests.py:_PrepareListsAndPrintOutput.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py
index a9c6d5b..9421ff8 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/metered_stream_unittest.py
@@ -34,7 +34,6 @@ import optparse
import pdb
import sys
import unittest
-import logging
from webkitpy.common.array_stream import ArrayStream
from webkitpy.layout_tests.layout_package import metered_stream
@@ -97,13 +96,19 @@ class TestMeteredStream(unittest.TestCase):
m.write("foo")
self.assertEquals(a.get(), ['foo'])
+ import logging
+ b = ArrayStream()
+ logger = logging.getLogger()
+ handler = logging.StreamHandler(b)
+ logger.addHandler(handler)
m.update("bar")
- # FIXME: figure out how to test that this went to the logger. Is this
- # good enough?
+ logger.handlers.remove(handler)
self.assertEquals(a.get(), ['foo'])
+ self.assertEquals(b.get(), ['bar\n'])
m.progress("dropped")
self.assertEquals(a.get(), ['foo'])
+ self.assertEquals(b.get(), ['bar\n'])
if __name__ == '__main__':
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
index a9e015f..d420631 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing.py
@@ -126,19 +126,6 @@ def print_options():
]
-def configure_logging(options, meter):
- """Configures the logging system."""
- log_fmt = '%(message)s'
- log_datefmt = '%y%m%d %H:%M:%S'
- log_level = logging.INFO
- if options.verbose:
- log_fmt = ('%(asctime)s %(filename)s:%(lineno)-4d %(levelname)s '
- '%(message)s')
- log_level = logging.DEBUG
-
- logging.basicConfig(level=log_level, format=log_fmt,
- datefmt=log_datefmt, stream=meter)
-
def parse_print_options(print_options, verbose, child_processes,
is_fully_parallel):
@@ -190,6 +177,28 @@ def parse_print_options(print_options, verbose, child_processes,
return switches
+def _configure_logging(stream, verbose):
+ log_fmt = '%(message)s'
+ log_datefmt = '%y%m%d %H:%M:%S'
+ log_level = logging.INFO
+ if verbose:
+ log_fmt = ('%(asctime)s %(filename)s:%(lineno)-4d %(levelname)s '
+ '%(message)s')
+ log_level = logging.DEBUG
+
+ root = logging.getLogger()
+ handler = logging.StreamHandler(stream)
+ handler.setFormatter(logging.Formatter(log_fmt, None))
+ root.addHandler(handler)
+ root.setLevel(log_level)
+ return handler
+
+
+def _restore_logging(handler_to_remove):
+ root = logging.getLogger()
+ root.handlers.remove(handler_to_remove)
+
+
class Printer(object):
"""Class handling all non-debug-logging printing done by run-webkit-tests.
@@ -237,12 +246,22 @@ class Printer(object):
self._meter = metered_stream.MeteredStream(options.verbose,
regular_output)
- configure_logging(self._options, self._meter)
+ self._logging_handler = _configure_logging(self._meter,
+ options.verbose)
self.switches = parse_print_options(options.print_options,
options.verbose, child_processes, is_fully_parallel)
- # These two routines just hide the implmentation of the switches.
+ def cleanup(self):
+ """Restore logging configuration to its initial settings."""
+ if self._logging_handler:
+ _restore_logging(self._logging_handler)
+ self._logging_handler = None
+
+ def __del__(self):
+ self.cleanup()
+
+ # These two routines just hide the implementation of the switches.
def disabled(self, option):
return not option in self.switches
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
index 40c691f..29139d0 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
@@ -37,6 +37,7 @@ import unittest
import logging
from webkitpy.common import array_stream
+from webkitpy.common.system import logtesting
from webkitpy.layout_tests import port
from webkitpy.layout_tests.layout_package import printing
from webkitpy.layout_tests.layout_package import dump_render_tree_thread
@@ -53,25 +54,24 @@ def get_options(args):
class TestUtilityFunctions(unittest.TestCase):
def test_configure_logging(self):
- # FIXME: We need to figure out how to reset the basic logger.
- # FIXME: If other testing classes call logging.basicConfig() then
- # FIXME: these calls become no-ops and we can't control the
- # FIXME: configuration to test things properly.
options, args = get_options([])
stream = array_stream.ArrayStream()
- printing.configure_logging(options, stream)
+ handler = printing._configure_logging(stream, options.verbose)
logging.info("this should be logged")
- # self.assertFalse(stream.empty())
+ self.assertFalse(stream.empty())
stream.reset()
logging.debug("this should not be logged")
- # self.assertTrue(stream.empty())
+ self.assertTrue(stream.empty())
+
+ printing._restore_logging(handler)
stream.reset()
options, args = get_options(['--verbose'])
- printing.configure_logging(options, stream)
+ handler = printing._configure_logging(stream, options.verbose)
logging.debug("this should be logged")
- # self.assertFalse(stream.empty())
+ self.assertFalse(stream.empty())
+ printing._restore_logging(handler)
def test_print_options(self):
options, args = get_options([])
@@ -190,6 +190,14 @@ class Testprinter(unittest.TestCase):
do_helper(method_name, switch, 'hello', exp_err, exp_bot)
do_helper(method_name, 'everything', 'hello', exp_err, exp_bot)
+ def test_configure_and_cleanup(self):
+ # This test verifies that calling cleanup repeatedly and deleting
+ # the object is safe.
+ printer, err, out = self.get_printer(['--print', 'everything'])
+ printer.cleanup()
+ printer.cleanup()
+ printer = None
+
def test_print_actual(self):
# Actual results need to be logged to the buildbot's stream.
self.do_switch_tests('print_actual', 'actual', to_buildbot=True)
@@ -421,11 +429,12 @@ class Testprinter(unittest.TestCase):
self.assertFalse(err.empty())
self.assertTrue(out.empty())
- def test_write(self):
+ def test_write_nothing(self):
printer, err, out = self.get_printer(['--print', 'nothing'])
printer.write("foo")
self.assertTrue(err.empty())
+ def test_write_misc(self):
printer, err, out = self.get_printer(['--print', 'misc'])
printer.write("foo")
self.assertFalse(err.empty())
@@ -433,6 +442,7 @@ class Testprinter(unittest.TestCase):
printer.write("foo", "config")
self.assertTrue(err.empty())
+ def test_write_everything(self):
printer, err, out = self.get_printer(['--print', 'everything'])
printer.write("foo")
self.assertFalse(err.empty())
@@ -440,11 +450,10 @@ class Testprinter(unittest.TestCase):
printer.write("foo", "config")
self.assertFalse(err.empty())
- # FIXME: this should be logged somewhere, but it actually
- # disappears into the ether in the logging subsystem.
+ def test_write_verbose(self):
printer, err, out = self.get_printer(['--verbose'])
printer.write("foo")
- self.assertTrue(err.empty())
+ self.assertTrue(not err.empty() and "foo" in err.get()[0])
self.assertTrue(out.empty())
def test_print_unexpected_results(self):
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
index 086321d..3d8349b 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations.py
@@ -477,6 +477,7 @@ class TestExpectationsFile:
the updated string.
"""
+ assert(platform)
f_orig = self._get_iterable_expectations(self._expectations)
f_new = []
@@ -487,6 +488,8 @@ class TestExpectationsFile:
lineno += 1
action = self._get_platform_update_action(line, lineno, tests,
platform)
+ assert(action in (NO_CHANGE, REMOVE_TEST, REMOVE_PLATFORM,
+ ADD_PLATFORMS_EXCEPT_THIS))
if action == NO_CHANGE:
# Save the original line back to the file
_log.debug('No change to test: %s', line)
@@ -522,9 +525,6 @@ class TestExpectationsFile:
_log.info('Test updated: ')
_log.info(' old: %s', line)
_log.info(' new: %s', new_line)
- else:
- _log.error('Unknown update action: %d; line: %s',
- action, line)
_log.info('Total tests removed: %d', tests_removed)
_log.info('Total tests updated: %d', tests_updated)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
index 22214b0..26eb18d 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py
@@ -93,14 +93,16 @@ class Base(unittest.TestCase):
self.get_test('failures/expected/image_checksum.html'),
self.get_test('failures/expected/crash.html'),
self.get_test('failures/expected/missing_text.html'),
+ self.get_test('failures/expected/image.html'),
self.get_test('passes/text.html')]
def get_basic_expectations(self):
return """
BUG_TEST : failures/expected/text.html = TEXT
-BUG_TEST SKIP : failures/expected/crash.html = CRASH
-BUG_TEST REBASELINE : failure/expected/missing_image.html = MISSING
-BUG_TEST : failures/expected/image_checksum.html = IMAGE
+BUG_TEST WONTFIX SKIP : failures/expected/crash.html = CRASH
+BUG_TEST REBASELINE : failures/expected/missing_image.html = MISSING
+BUG_TEST WONTFIX : failures/expected/image_checksum.html = IMAGE
+BUG_TEST WONTFIX WIN : failures/expected/image.html = IMAGE
"""
def parse_exp(self, expectations, overrides=None, is_lint_mode=False,
@@ -125,6 +127,13 @@ class TestExpectationsTest(Base):
self.assert_exp('failures/expected/text.html', TEXT)
self.assert_exp('failures/expected/image_checksum.html', IMAGE)
self.assert_exp('passes/text.html', PASS)
+ self.assert_exp('failures/expected/image.html', PASS)
+
+ def test_multiple_results(self):
+ self.parse_exp('BUGX : failures/expected/text.html = TEXT CRASH')
+ self.assertEqual(self._exp.get_expectations(
+ self.get_test('failures/expected/text.html')),
+ set([TEXT, CRASH]))
def test_defer(self):
self.parse_exp('BUGX DEFER : failures/expected/text.html = TEXT')
@@ -183,6 +192,20 @@ BUGX DEFER : failures/expected = IMAGE
self.assertRaises(ValueError, self._exp.expectation_to_string,
-1)
+ def test_get_test_set(self):
+ # Handle some corner cases for this routine not covered by other tests.
+ self.parse_exp(self.get_basic_expectations())
+ s = self._exp._expected_failures.get_test_set(WONTFIX)
+ self.assertEqual(s,
+ set([self.get_test('failures/expected/crash.html'),
+ self.get_test('failures/expected/image_checksum.html')]))
+ s = self._exp._expected_failures.get_test_set(WONTFIX, CRASH)
+ self.assertEqual(s,
+ set([self.get_test('failures/expected/crash.html')]))
+ s = self._exp._expected_failures.get_test_set(WONTFIX, CRASH,
+ include_skips=False)
+ self.assertEqual(s, set([]))
+
def test_syntax_missing_expectation(self):
# This is missing the expectation.
self.assertRaises(SyntaxError, self.parse_exp,
@@ -230,6 +253,13 @@ BUG_TEST : failures/expected/text.html = IMAGE""")
BUG_TEST : failures/expected/text.html = TEXT
BUG_TEST : failures/expected/text.html = IMAGE""")
+ def test_semantic_missing_file(self):
+ # This should log a non-fatal error.
+ self.parse_exp('BUG_TEST : missing_file.html = TEXT')
+ self.assertEqual(
+ len(self._exp._expected_failures.get_non_fatal_errors()), 1)
+
+
def test_overrides(self):
self.parse_exp(self.get_basic_expectations(), """
BUG_OVERRIDE : failures/expected/text.html = IMAGE""")
@@ -256,20 +286,43 @@ BUG_OVERRIDE : failures/expected/text.html = IMAGE""")
class RebaseliningTest(Base):
"""Test rebaselining-specific functionality."""
+ def assertRemove(self, platform, input_expectations, expected_expectations):
+ self.parse_exp(input_expectations)
+ test = self.get_test('failures/expected/text.html')
+ actual_expectations = self._exp.remove_platform_from_expectations(
+ test, platform)
+ self.assertEqual(expected_expectations, actual_expectations)
+
def test_no_get_rebaselining_failures(self):
self.parse_exp(self.get_basic_expectations())
self.assertEqual(len(self._exp.get_rebaselining_failures()), 0)
- def test_basic(self):
+ def test_get_rebaselining_failures_expand(self):
self.parse_exp("""
BUG_TEST REBASELINE : failures/expected/text.html = TEXT
""")
self.assertEqual(len(self._exp.get_rebaselining_failures()), 1)
- new_exp_str = self._exp.remove_platform_from_expectations(
- self.get_test('failures/expected/text.html'), 'TEST')
- # FIXME: actually test rebaselining
- # self.assertEqual(new_exp_str, '\n')
+ def test_remove_expand(self):
+ self.assertRemove('mac',
+ 'BUGX REBASELINE : failures/expected/text.html = TEXT\n',
+ 'BUGX REBASELINE WIN : failures/expected/text.html = TEXT\n')
+
+ def test_remove_mac_win(self):
+ self.assertRemove('mac',
+ 'BUGX REBASELINE MAC WIN : failures/expected/text.html = TEXT\n',
+ 'BUGX REBASELINE WIN : failures/expected/text.html = TEXT\n')
+
+ def test_remove_mac_mac(self):
+ self.assertRemove('mac',
+ 'BUGX REBASELINE MAC : failures/expected/text.html = TEXT\n',
+ '')
+
+ def test_remove_nothing(self):
+ self.assertRemove('mac',
+ '\n\n',
+ '\n\n')
+
if __name__ == '__main__':
unittest.main()
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index af1af93..0dda774 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -327,7 +327,6 @@ class Port(object):
if not self._webkit_base_dir:
abspath = os.path.abspath(__file__)
self._webkit_base_dir = abspath[0:abspath.find('WebKitTools')]
- _log.debug("Using WebKit root: %s" % self._webkit_base_dir)
return os.path.join(self._webkit_base_dir, *comps)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
index 4fe3ec1..e309334 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/test.py
@@ -118,10 +118,10 @@ class TestPort(base.Port):
return file.read()
def test_base_platform_names(self):
- return ('test',)
+ return ('mac', 'win')
def test_platform_name(self):
- return 'test'
+ return 'mac'
def test_platform_names(self):
return self.test_base_platform_names()
@@ -151,7 +151,10 @@ class TestDriver(base.Driver):
def run_test(self, uri, timeoutms, image_hash):
basename = uri[(uri.rfind("/") + 1):uri.rfind(".html")]
- error = ''
+ if 'error' in basename:
+ error = basename + "_error\n"
+ else:
+ error = ''
checksum = None
# There are four currently supported types of tests: text, image,
# image hash (checksum), and stderr output. The fake output
@@ -170,10 +173,13 @@ class TestDriver(base.Driver):
# will allow us to see if any results get crossed by the rest of the
# program.
if 'failures' in uri:
+ if 'keyboard' in basename:
+ raise KeyboardInterrupt
+ if 'exception' in basename:
+ raise ValueError('exception from ' + basename)
+
crash = 'crash' in basename
timeout = 'timeout' in basename
- if 'error' in basename:
- error = basename + "_error\n"
if 'text' in basename:
output = basename + '_failed-txt\n'
else:
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index 7163e1b..4132260 100755
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -75,7 +75,6 @@ from test_types import image_diff
from test_types import text_diff
from test_types import test_type_base
-from webkitpy.common.system.executive import Executive
from webkitpy.thirdparty import simplejson
import port
@@ -106,12 +105,11 @@ class TestInfo:
self._image_hash = None
def _read_image_hash(self):
- try:
- with codecs.open(self._expected_hash_path, "r", "ascii") as hash_file:
- return hash_file.read()
- except IOError, e:
- if errno.ENOENT != e.errno:
- raise
+ if not os.path.exists(self._expected_hash_path):
+ return None
+
+ with codecs.open(self._expected_hash_path, "r", "ascii") as hash_file:
+ return hash_file.read()
def image_hash(self):
# Read the image_hash lazily to reduce startup time.
@@ -273,35 +271,42 @@ class TestRunner:
# options.results_directory, use_tls=True, port=9323)
# a list of TestType objects
- self._test_types = []
+ self._test_types = [text_diff.TestTextDiff]
+ if options.pixel_tests:
+ self._test_types.append(image_diff.ImageDiff)
# a set of test files, and the same tests as a list
self._test_files = set()
self._test_files_list = None
self._result_queue = Queue.Queue()
-
self._retrying = False
- # Hack for dumping threads on the bots
- self._last_thread_dump = None
-
- def __del__(self):
- _log.debug("flushing stdout")
- sys.stdout.flush()
- _log.debug("flushing stderr")
- sys.stderr.flush()
- _log.debug("stopping http server")
- self._port.stop_http_server()
- _log.debug("stopping websocket server")
- self._port.stop_websocket_server()
-
- def gather_file_paths(self, paths):
+ def collect_tests(self, args, last_unexpected_results):
"""Find all the files to test.
Args:
- paths: a list of globs to use instead of the defaults."""
+ args: list of test arguments from the command line
+ last_unexpected_results: list of unexpected results to retest, if any
+
+ """
+ paths = [arg for arg in args if arg and arg != '']
+ paths += last_unexpected_results
+ if self._options.test_list:
+ paths += read_test_files(self._options.test_list)
self._test_files = test_files.gather_test_files(self._port, paths)
+ def lint(self):
+ # Creating the expecations for each platform/configuration pair does
+ # all the test list parsing and ensures it's correct syntax (e.g. no
+ # dupes).
+ for platform_name in self._port.test_platform_names():
+ self.parse_expectations(platform_name, is_debug_mode=True)
+ self.parse_expectations(platform_name, is_debug_mode=False)
+ self._printer.write("")
+ _log.info("If there are no fail messages, errors or exceptions, "
+ "then the lint succeeded.")
+ return 0
+
def parse_expectations(self, test_platform_name, is_debug_mode):
"""Parse the expectations from the test_list files and return a data
structure holding them. Throws an error if the test_list files have
@@ -336,8 +341,8 @@ class TestRunner:
self._printer.print_expected("Found: %d tests" %
(len(self._test_files)))
if not num_all_test_files:
- _log.critical("No tests to run.")
- sys.exit(1)
+ _log.critical('No tests to run.')
+ return None
skipped = set()
if num_all_test_files > 1 and not self._options.force:
@@ -468,10 +473,6 @@ class TestRunner:
return result_summary
- def add_test_type(self, test_type):
- """Add a TestType to the TestRunner."""
- self._test_types.append(test_type)
-
def _get_dir_for_test_file(self, test_file):
"""Returns the highest-level directory by which to shard the given
test file."""
@@ -643,7 +644,7 @@ class TestRunner:
"""
# FIXME: We should use webkitpy.tool.grammar.pluralize here.
plural = ""
- if self._options.child_processes > 1:
+ if not self._is_single_threaded():
plural = "s"
self._printer.print_update('Starting %s%s ...' %
(self._port.driver_name(), plural))
@@ -714,6 +715,49 @@ class TestRunner:
"""Returns whether the test runner needs an HTTP server."""
return self._contains_tests(self.HTTP_SUBDIR)
+ def set_up_run(self):
+ """Configures the system to be ready to run tests.
+
+ Returns a ResultSummary object if we should continue to run tests,
+ or None if we should abort.
+
+ """
+ # This must be started before we check the system dependencies,
+ # since the helper may do things to make the setup correct.
+ self._printer.print_update("Starting helper ...")
+ self._port.start_helper()
+
+ # Check that the system dependencies (themes, fonts, ...) are correct.
+ if not self._options.nocheck_sys_deps:
+ self._printer.print_update("Checking system dependencies ...")
+ if not self._port.check_sys_deps(self.needs_http()):
+ self._port.stop_helper()
+ return None
+
+ if self._options.clobber_old_results:
+ self._clobber_old_results()
+
+ # Create the output directory if it doesn't already exist.
+ self._port.maybe_make_directory(self._options.results_directory)
+
+ self._port.setup_test_run()
+
+ self._printer.print_update("Preparing tests ...")
+ result_summary = self.prepare_lists_and_print_output()
+ if not result_summary:
+ return None
+
+ if self.needs_http():
+ self._printer.print_update('Starting HTTP server ...')
+ self._port.start_http_server()
+
+ if self._contains_tests(self.WEBSOCKET_SUBDIR):
+ self._printer.print_update('Starting WebSocket server ...')
+ self._port.start_websocket_server()
+ # self._websocket_secure_server.Start()
+
+ return result_summary
+
def run(self, result_summary):
"""Run all our tests on all our test files.
@@ -726,19 +770,12 @@ class TestRunner:
Return:
The number of unexpected results (0 == success)
"""
- if not self._test_files:
- return 0
- start_time = time.time()
+ # gather_test_files() must have been called first to initialize us.
+ # If we didn't find any files to test, we've errored out already in
+ # prepare_lists_and_print_output().
+ assert(len(self._test_files))
- if self.needs_http():
- self._printer.print_update('Starting HTTP server ...')
-
- self._port.start_http_server()
-
- if self._contains_tests(self.WEBSOCKET_SUBDIR):
- self._printer.print_update('Starting WebSocket server ...')
- self._port.start_websocket_server()
- # self._websocket_secure_server.Start()
+ start_time = time.time()
keyboard_interrupted, thread_timings, test_timings, \
individual_test_timings = (
@@ -801,6 +838,20 @@ class TestRunner:
# bot red for those.
return unexpected_results['num_regressions']
+ def clean_up_run(self):
+ """Restores the system after we're done running tests."""
+
+ _log.debug("flushing stdout")
+ sys.stdout.flush()
+ _log.debug("flushing stderr")
+ sys.stderr.flush()
+ _log.debug("stopping http server")
+ self._port.stop_http_server()
+ _log.debug("stopping websocket server")
+ self._port.stop_websocket_server()
+ _log.debug("stopping helper")
+ self._port.stop_helper()
+
def update_summary(self, result_summary):
"""Update the summary and print results with any completed tests."""
while True:
@@ -819,6 +870,20 @@ class TestRunner:
self._printer.print_progress(result_summary, self._retrying,
self._test_files_list)
+ def _clobber_old_results(self):
+ # Just clobber the actual test results directories since the other
+ # files in the results directory are explicitly used for cross-run
+ # tracking.
+ self._printer.print_update("Clobbering old results in %s" %
+ self._options.results_directory)
+ layout_tests_dir = self._port.layout_tests_dir()
+ possible_dirs = os.listdir(layout_tests_dir)
+ for dirname in possible_dirs:
+ if os.path.isdir(os.path.join(layout_tests_dir, dirname)):
+ shutil.rmtree(os.path.join(self._options.results_directory,
+ dirname),
+ ignore_errors=True)
+
def _get_failures(self, result_summary, include_crashes):
"""Filters a dict of results and returns only the failures.
@@ -911,6 +976,33 @@ class TestRunner:
_log.info("JSON files uploaded.")
+ def _print_config(self):
+ """Prints the configuration for the test run."""
+ p = self._printer
+ p.print_config("Using port '%s'" % self._port.name())
+ p.print_config("Placing test results in %s" %
+ self._options.results_directory)
+ if self._options.new_baseline:
+ p.print_config("Placing new baselines in %s" %
+ self._port.baseline_path())
+ p.print_config("Using %s build" % self._options.configuration)
+ if self._options.pixel_tests:
+ p.print_config("Pixel tests enabled")
+ else:
+ p.print_config("Pixel tests disabled")
+
+ p.print_config("Regular timeout: %s, slow test timeout: %s" %
+ (self._options.time_out_ms,
+ self._options.slow_time_out_ms))
+
+ if self._is_single_threaded():
+ p.print_config("Running one %s" % self._port.driver_name())
+ else:
+ p.print_config("Running %s %ss in parallel" %
+ (self._options.child_processes,
+ self._port.driver_name()))
+ p.print_config("")
+
def _print_expected_results_of_type(self, result_summary,
result_type, result_type_str):
"""Print the number of the tests in a given result class.
@@ -1266,12 +1358,12 @@ def read_test_files(files):
return tests
-def run(port_obj, options, args, regular_output=sys.stderr,
+def run(port, options, args, regular_output=sys.stderr,
buildbot_output=sys.stdout):
"""Run the tests.
Args:
- port_obj: Port object for port-specific behavior
+ port: Port object for port-specific behavior
options: a dictionary of command line options
args: a list of sub directories or files to test
regular_output: a stream-like object that we can send logging/debug
@@ -1281,24 +1373,61 @@ def run(port_obj, options, args, regular_output=sys.stderr,
Returns:
the number of unexpected results that occurred, or -1 if there is an
error.
- """
- # Configure the printing subsystem for printing output, logging debug
- # info, and tracing tests.
-
- if not options.child_processes:
- # FIXME: Investigate perf/flakiness impact of using cpu_count + 1.
- options.child_processes = port_obj.default_child_processes()
+ """
+ _set_up_derived_options(port, options)
- printer = printing.Printer(port_obj, options, regular_output=regular_output,
- buildbot_output=buildbot_output,
- child_processes=int(options.child_processes),
- is_fully_parallel=options.experimental_fully_parallel)
+ printer = printing.Printer(port, options, regular_output, buildbot_output,
+ int(options.child_processes), options.experimental_fully_parallel)
if options.help_printing:
printer.help_printing()
+ printer.cleanup()
return 0
- executive = Executive()
+ last_unexpected_results = _gather_unexpected_results(options)
+ if options.print_last_failures:
+ printer.write("\n".join(last_unexpected_results) + "\n")
+ printer.cleanup()
+ return 0
+
+ # We wrap any parts of the run that are slow or likely to raise exceptions
+ # in a try/finally to ensure that we clean up the logging configuration.
+ num_unexpected_results = -1
+ try:
+ test_runner = TestRunner(port, options, printer)
+ test_runner._print_config()
+
+ printer.print_update("Collecting tests ...")
+ test_runner.collect_tests(args, last_unexpected_results)
+
+ printer.print_update("Parsing expectations ...")
+ if options.lint_test_files:
+ return test_runner.lint()
+ test_runner.parse_expectations(port.test_platform_name(),
+ options.configuration == 'Debug')
+
+ printer.print_update("Checking build ...")
+ if not port.check_build(test_runner.needs_http()):
+ return -1
+
+ result_summary = test_runner.set_up_run()
+ if result_summary:
+ num_unexpected_results = test_runner.run(result_summary)
+ test_runner.clean_up_run()
+ _log.debug("Testing completed, Exit status: %d" %
+ num_unexpected_results)
+ finally:
+ printer.cleanup()
+
+ return num_unexpected_results
+
+
+def _set_up_derived_options(port_obj, options):
+ """Sets the options values that depend on other options values."""
+
+ if not options.child_processes:
+ # FIXME: Investigate perf/flakiness impact of using cpu_count + 1.
+ options.child_processes = str(port_obj.default_child_processes())
if not options.configuration:
options.configuration = port_obj.default_configuration()
@@ -1318,30 +1447,6 @@ def run(port_obj, options, args, regular_output=sys.stderr,
# Debug or Release.
options.results_directory = port_obj.results_directory()
- last_unexpected_results = []
- if options.print_last_failures or options.retest_last_failures:
- unexpected_results_filename = os.path.join(
- options.results_directory, "unexpected_results.json")
- with codecs.open(unexpected_results_filename, "r", "utf-8") as file:
- results = simplejson.load(file)
- last_unexpected_results = results['tests'].keys()
- if options.print_last_failures:
- printer.write("\n".join(last_unexpected_results) + "\n")
- return 0
-
- if options.clobber_old_results:
- # Just clobber the actual test results directories since the other
- # files in the results directory are explicitly used for cross-run
- # tracking.
- printer.print_update("Clobbering old results in %s" %
- options.results_directory)
- layout_tests_dir = port_obj.layout_tests_dir()
- possible_dirs = os.listdir(layout_tests_dir)
- for dirname in possible_dirs:
- if os.path.isdir(os.path.join(layout_tests_dir, dirname)):
- shutil.rmtree(os.path.join(options.results_directory, dirname),
- ignore_errors=True)
-
if not options.time_out_ms:
if options.configuration == "Debug":
options.time_out_ms = str(2 * TestRunner.DEFAULT_TEST_TIMEOUT_MS)
@@ -1349,92 +1454,18 @@ def run(port_obj, options, args, regular_output=sys.stderr,
options.time_out_ms = str(TestRunner.DEFAULT_TEST_TIMEOUT_MS)
options.slow_time_out_ms = str(5 * int(options.time_out_ms))
- printer.print_config("Regular timeout: %s, slow test timeout: %s" %
- (options.time_out_ms, options.slow_time_out_ms))
-
- if int(options.child_processes) == 1:
- printer.print_config("Running one %s" % port_obj.driver_name())
- else:
- printer.print_config("Running %s %ss in parallel" % (
- options.child_processes, port_obj.driver_name()))
-
- # Include all tests if none are specified.
- new_args = []
- for arg in args:
- if arg and arg != '':
- new_args.append(arg)
-
- paths = new_args
- if not paths:
- paths = []
- paths += last_unexpected_results
- if options.test_list:
- paths += read_test_files(options.test_list)
-
- # Create the output directory if it doesn't already exist.
- port_obj.maybe_make_directory(options.results_directory)
- printer.print_update("Collecting tests ...")
-
- test_runner = TestRunner(port_obj, options, printer)
- test_runner.gather_file_paths(paths)
-
- if options.lint_test_files:
- # Creating the expecations for each platform/configuration pair does
- # all the test list parsing and ensures it's correct syntax (e.g. no
- # dupes).
- for platform_name in port_obj.test_platform_names():
- test_runner.parse_expectations(platform_name, is_debug_mode=True)
- test_runner.parse_expectations(platform_name, is_debug_mode=False)
- printer.write("")
- _log.info("If there are no fail messages, errors or exceptions, "
- "then the lint succeeded.")
- return 0
-
- printer.print_config("Using port '%s'" % port_obj.name())
- printer.print_config("Placing test results in %s" %
- options.results_directory)
- if options.new_baseline:
- printer.print_config("Placing new baselines in %s" %
- port_obj.baseline_path())
- printer.print_config("Using %s build" % options.configuration)
- if options.pixel_tests:
- printer.print_config("Pixel tests enabled")
- else:
- printer.print_config("Pixel tests disabled")
- printer.print_config("")
-
- printer.print_update("Parsing expectations ...")
- test_runner.parse_expectations(port_obj.test_platform_name(),
- options.configuration == 'Debug')
-
- printer.print_update("Checking build ...")
- if not port_obj.check_build(test_runner.needs_http()):
- return -1
-
- printer.print_update("Starting helper ...")
- port_obj.start_helper()
-
- # Check that the system dependencies (themes, fonts, ...) are correct.
- if not options.nocheck_sys_deps:
- printer.print_update("Checking system dependencies ...")
- if not port_obj.check_sys_deps(test_runner.needs_http()):
- return -1
-
- printer.print_update("Preparing tests ...")
- result_summary = test_runner.prepare_lists_and_print_output()
-
- port_obj.setup_test_run()
-
- test_runner.add_test_type(text_diff.TestTextDiff)
- if options.pixel_tests:
- test_runner.add_test_type(image_diff.ImageDiff)
- num_unexpected_results = test_runner.run(result_summary)
- port_obj.stop_helper()
-
- _log.debug("Exit status: %d" % num_unexpected_results)
- return num_unexpected_results
+def _gather_unexpected_results(options):
+ """Returns the unexpected results from the previous run, if any."""
+ last_unexpected_results = []
+ if options.print_last_failures or options.retest_last_failures:
+ unexpected_results_filename = os.path.join(
+ options.results_directory, "unexpected_results.json")
+ with codecs.open(unexpected_results_filename, "r", "utf-8") as file:
+ results = simplejson.load(file)
+ last_unexpected_results = results['tests'].keys()
+ return last_unexpected_results
def _compat_shim_callback(option, opt_str, value, parser):
@@ -1597,7 +1628,7 @@ def parse_args(args=None):
# Restart DumpRenderTree every n tests (default: 1000)
optparse.make_option("--batch-size",
help=("Run a the tests in batches (n), after every n tests, "
- "DumpRenderTree is relaunched.")),
+ "DumpRenderTree is relaunched."), type="int", default=0),
# old-run-webkit-tests calls --run-singly: -1|--singly
# Isolate each test case run (implies --nthly 1 --verbose)
optparse.make_option("--run-singly", action="store_true",
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 3a3b14e..4cbfdfc 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -41,6 +41,7 @@ import threading
import unittest
from webkitpy.common import array_stream
+from webkitpy.common.system import outputcapture
from webkitpy.layout_tests import port
from webkitpy.layout_tests import run_webkit_tests
from webkitpy.layout_tests.layout_package import dump_render_tree_thread
@@ -48,75 +49,139 @@ from webkitpy.layout_tests.layout_package import dump_render_tree_thread
from webkitpy.thirdparty.mock import Mock
-def passing_run(args, port_obj=None, record_results=False,
+def passing_run(args=[], port_obj=None, record_results=False,
tests_included=False):
- args.extend(['--print', 'nothing'])
+ new_args = ['--print', 'nothing']
+ if not '--platform' in args:
+ new_args.extend(['--platform', 'test'])
+ if not record_results:
+ new_args.append('--no-record-results')
+ new_args.extend(args)
if not tests_included:
# We use the glob to test that globbing works.
- args.extend(['passes', 'failures/expected/*'])
- if not record_results:
- args.append('--no-record-results')
- options, args = run_webkit_tests.parse_args(args)
+ new_args.extend(['passes', 'failures/expected/*'])
+ options, parsed_args = run_webkit_tests.parse_args(new_args)
if port_obj is None:
port_obj = port.get(options.platform, options)
- res = run_webkit_tests.run(port_obj, options, args)
+ res = run_webkit_tests.run(port_obj, options, parsed_args)
return res == 0
-def logging_run(args, tests_included=False):
- args.extend(['--no-record-results'])
+def logging_run(args=[], tests_included=False):
+ new_args = ['--no-record-results']
+ if not '--platform' in args:
+ new_args.extend(['--platform', 'test'])
+ if args:
+ new_args.extend(args)
if not tests_included:
- args.extend(['passes', 'failures/expected/*'])
- options, args = run_webkit_tests.parse_args(args)
+ new_args.extend(['passes', 'failures/expected/*'])
+ options, parsed_args = run_webkit_tests.parse_args(new_args)
port_obj = port.get(options.platform, options)
buildbot_output = array_stream.ArrayStream()
regular_output = array_stream.ArrayStream()
- res = run_webkit_tests.run(port_obj, options, args,
+ res = run_webkit_tests.run(port_obj, options, parsed_args,
buildbot_output=buildbot_output,
regular_output=regular_output)
return (res, buildbot_output, regular_output)
class MainTest(unittest.TestCase):
- def test_fast(self):
- self.assertTrue(passing_run(['--platform', 'test']))
- self.assertTrue(passing_run(['--platform', 'test', '--run-singly']))
- self.assertTrue(passing_run(['--platform', 'test',
- 'passes/text.html'], tests_included=True))
+ def test_basic(self):
+ self.assertTrue(passing_run())
- def test_unexpected_failures(self):
- # Run tests including the unexpected failures.
- self.assertFalse(passing_run(['--platform', 'test'],
- tests_included=True))
+ def test_batch_size(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['--batch-size', '2']))
- def test_one_child_process(self):
+ def test_child_process_1(self):
(res, buildbot_output, regular_output) = logging_run(
- ['--platform', 'test', '--print', 'config', '--child-processes',
- '1'])
+ ['--print', 'config', '--child-processes', '1'])
self.assertTrue('Running one DumpRenderTree\n'
in regular_output.get())
- def test_two_child_processes(self):
+ def test_child_processes_2(self):
(res, buildbot_output, regular_output) = logging_run(
- ['--platform', 'test', '--print', 'config', '--child-processes',
- '2'])
+ ['--print', 'config', '--child-processes', '2'])
self.assertTrue('Running 2 DumpRenderTrees in parallel\n'
in regular_output.get())
+ def test_exception_raised(self):
+ self.assertRaises(ValueError, logging_run,
+ ['failures/expected/exception.html'], tests_included=True)
+
+ def test_full_results_html(self):
+ # FIXME: verify html?
+ self.assertTrue(passing_run(['--full-results-html']))
+
+ def test_help_printing(self):
+ res, out, err = logging_run(['--help-printing'])
+ self.assertEqual(res, 0)
+ self.assertTrue(out.empty())
+ self.assertFalse(err.empty())
+
+ def test_keyboard_interrupt(self):
+ # Note that this also tests running a test marked as SKIP if
+ # you specify it explicitly.
+ self.assertRaises(KeyboardInterrupt, passing_run,
+ ['failures/expected/keyboard.html'], tests_included=True)
+
def test_last_results(self):
- passing_run(['--platform', 'test'], record_results=True)
+ passing_run(['--clobber-old-results'], record_results=True)
(res, buildbot_output, regular_output) = logging_run(
- ['--platform', 'test', '--print-last-failures'])
+ ['--print-last-failures'])
self.assertEqual(regular_output.get(), ['\n\n'])
self.assertEqual(buildbot_output.get(), [])
+ def test_lint_test_files(self):
+ # FIXME: add errors?
+ res, out, err = logging_run(['--lint-test-files'], tests_included=True)
+ self.assertEqual(res, 0)
+ self.assertTrue(out.empty())
+ self.assertTrue(any(['lint succeeded' in msg for msg in err.get()]))
+
def test_no_tests_found(self):
- self.assertRaises(SystemExit, logging_run,
- ['--platform', 'test', 'resources'],
- tests_included=True)
- self.assertRaises(SystemExit, logging_run,
- ['--platform', 'test', 'foo'],
- tests_included=True)
+ res, out, err = logging_run(['resources'], tests_included=True)
+ self.assertEqual(res, -1)
+ self.assertTrue(out.empty())
+ self.assertTrue('No tests to run.\n' in err.get())
+
+ def test_no_tests_found_2(self):
+ res, out, err = logging_run(['foo'], tests_included=True)
+ self.assertEqual(res, -1)
+ self.assertTrue(out.empty())
+ self.assertTrue('No tests to run.\n' in err.get())
+
+ def test_randomize_order(self):
+ # FIXME: verify order was shuffled
+ self.assertTrue(passing_run(['--randomize-order']))
+
+ def test_run_chunk(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['--run-chunk', '1:4']))
+
+ def test_run_force(self):
+ # This raises an exception because we run
+ # failures/expected/exception.html, which is normally SKIPped.
+ self.assertRaises(ValueError, logging_run, ['--force'])
+
+ def test_run_part(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['--run-part', '1:2']))
+
+ def test_run_singly(self):
+ self.assertTrue(passing_run(['--run-singly']))
+
+ def test_single_file(self):
+ # FIXME: verify # of tests run
+ self.assertTrue(passing_run(['passes/text.html'], tests_included=True))
+
+ def test_unexpected_failures(self):
+ # Run tests including the unexpected failures.
+ res, out, err = logging_run(tests_included=True)
+ self.assertEqual(res, 1)
+ self.assertFalse(out.empty())
+ self.assertFalse(err.empty())
+
def _mocked_open(original_open, file_list):
def _wrapper(name, mode, encoding):
@@ -144,7 +209,7 @@ class RebaselineTest(unittest.TestCase):
# is missing, update the expected generic location.
file_list = []
codecs.open = _mocked_open(original_open, file_list)
- passing_run(['--platform', 'test', '--pixel-tests',
+ passing_run(['--pixel-tests',
'--reset-results',
'passes/image.html',
'failures/expected/missing_image.html'],
@@ -165,7 +230,7 @@ class RebaselineTest(unittest.TestCase):
# is mssing, then create a new expectation in the platform dir.
file_list = []
codecs.open = _mocked_open(original_open, file_list)
- passing_run(['--platform', 'test', '--pixel-tests',
+ passing_run(['--pixel-tests',
'--new-baseline',
'passes/image.html',
'failures/expected/missing_image.html'],
@@ -208,6 +273,7 @@ class DryrunTest(unittest.TestCase):
if sys.platform != "darwin":
return
+ self.assertTrue(passing_run(['--platform', 'test']))
self.assertTrue(passing_run(['--platform', 'dryrun',
'fast/html']))
self.assertTrue(passing_run(['--platform', 'dryrun-mac',
@@ -223,6 +289,11 @@ class TestThread(dump_render_tree_thread.WatchableThread):
self._timeout_queue = Queue.Queue()
def run(self):
+ self._covered_run()
+
+ def _covered_run(self):
+ # FIXME: this is a separate routine to work around a bug
+ # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
self._thread_id = thread.get_ident()
try:
self._started_queue.put('')
@@ -284,8 +355,11 @@ class WaitForThreadsToFinishTest(unittest.TestCase):
self.assertTrue(interrupted)
def test_timeout(self):
+ oc = outputcapture.OutputCapture()
+ oc.capture_output()
interrupted = self.run_one_thread('Timeout')
self.assertFalse(interrupted)
+ oc.restore_output()
def test_exception(self):
self.assertRaises(ValueError, self.run_one_thread, 'Exception')
@@ -293,6 +367,8 @@ class WaitForThreadsToFinishTest(unittest.TestCase):
class StandaloneFunctionsTest(unittest.TestCase):
def test_log_wedged_thread(self):
+ oc = outputcapture.OutputCapture()
+ oc.capture_output()
logger = run_webkit_tests._log
astream = array_stream.ArrayStream()
handler = TestHandler(astream)
@@ -310,6 +386,7 @@ class StandaloneFunctionsTest(unittest.TestCase):
self.assertFalse(astream.empty())
self.assertFalse(child_thread.isAlive())
+ oc.restore_output()
def test_find_thread_stack(self):
id, stack = sys._current_frames().items()[0]
diff --git a/WebKitTools/Scripts/webkitpy/style/checker.py b/WebKitTools/Scripts/webkitpy/style/checker.py
index ee33003..f8eefa4 100644
--- a/WebKitTools/Scripts/webkitpy/style/checker.py
+++ b/WebKitTools/Scripts/webkitpy/style/checker.py
@@ -212,6 +212,10 @@ _SKIPPED_FILES_WITH_WARNING = [
"WebKit/qt/Api/",
"WebKit/qt/tests/",
"WebKit/qt/examples/",
+ # Soup API that is still being cooked, will be removed from WebKit
+ # in a few months when it is merged into soup proper. The style
+ # follows the libsoup style completely.
+ "WebCore/platform/network/soup/cache/",
]
diff --git a/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py b/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
index c0bb4ac..747b8b4 100644
--- a/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
@@ -93,7 +93,7 @@ class TestExpectationsTestCase(unittest.TestCase):
["passes/text.html = CRASH TIMEOUT FAIL PASS"],
"")
self.assert_lines_lint(
- ["BUG1234 TEST : passes/text.html = PASS FAIL"],
+ ["BUG1234 MAC : passes/text.html = PASS FAIL"],
"")
self.assert_lines_lint(
["SKIP BUG1234 : passes/text.html = TIMEOUT PASS"],
@@ -105,10 +105,10 @@ class TestExpectationsTestCase(unittest.TestCase):
["BUG1234 DEBUG SKIP : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
- ["BUG1234 TEST DEBUG SKIP : passes/text.html = TIMEOUT PASS"],
+ ["BUG1234 MAC DEBUG SKIP : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
- ["BUG1234 DEBUG TEST : passes/text.html = TIMEOUT PASS"],
+ ["BUG1234 DEBUG MAC : passes/text.html = TIMEOUT PASS"],
"")
self.assert_lines_lint(
["SLOW DEFER BUG1234 : passes/text.html = PASS"],
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
index 432a877..86e2e15 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
@@ -109,6 +109,16 @@ class GtkEWS(AbstractEarlyWarningSystem):
]
+class EflEWS(AbstractEarlyWarningSystem):
+ name = "efl-ews"
+ port_name = "efl"
+ watchers = AbstractEarlyWarningSystem.watchers + [
+ "leandro@profusion.mobi",
+ "antognolli@profusion.mobi",
+ "lucas.demarchi@profusion.mobi",
+ ]
+
+
class QtEWS(AbstractEarlyWarningSystem):
name = "qt-ews"
port_name = "qt"
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
index 67393d8..1f04923 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
@@ -75,6 +75,9 @@ class EarlyWarningSytemTest(QueuesTest):
def test_gtk_ews(self):
self._test_ews(GtkEWS())
+ def test_efl_ews(self):
+ self._test_ews(EflEWS())
+
def test_mac_ews(self):
ews = MacEWS()
expected_stderr = self._default_expected_stderr(ews)
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index d729d98..f86e9a2 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -141,7 +141,7 @@ class CommitQueueTest(QueuesTest):
# FIXME: The commit-queue warns about bad committers twice. This is due to the fact that we access Attachment.reviewer() twice and it logs each time.
"next_work_item" : """Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
Warning, attachment 128 on bug 42 has invalid committer (non-committer@example.com)
-MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Rejecting patch 128 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.'
+MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Rejecting patch 128 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/config/committers.py.\n\n- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.\n\n- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.'
MOCK: update_work_items: commit-queue [106, 197]
2 patches in commit-queue [106, 197]
""",
@@ -164,7 +164,7 @@ MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Reject
- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
-- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.'
+- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.'
MOCK: update_work_items: commit-queue [106, 197]
2 patches in commit-queue [106, 197]
""",
@@ -188,7 +188,7 @@ MOCK setting flag 'commit-queue' to '-' on attachment '128' with comment 'Reject
- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
-- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact eseidel@chromium.org to request a commit-queue restart. After restart the commit-queue will correctly respect your committer rights.'
+- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.'
MOCK: update_work_items: commit-queue [106, 197]
2 patches in commit-queue [106, 197]
""",
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
index 7993d78..f3c5e88 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -44,6 +44,7 @@ module WTR {
void setAcceptsEditing(in boolean value);
void setCanOpenWindows(in boolean value);
void setCloseRemainingWindowsWhenComplete(in boolean value);
+ void setXSSAuditorEnabled(in boolean value);
unsigned long windowCount();
// Special DOM functions.
@@ -61,6 +62,10 @@ module WTR {
// Animation testing.
int numberOfActiveAnimations();
boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
+
+ // UserContent testing.
+ void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames);
+ void addUserStyleSheet(in DOMString source, in boolean allFrames);
};
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index b2aa836..ecc302f 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -133,6 +133,8 @@ void InjectedBundle::beginTesting()
WKBundleSetShouldTrackVisitedLinks(m_bundle, false);
WKBundleRemoveAllVisitedLinks(m_bundle);
+ WKBundleRemoveAllUserContent(m_bundle);
+
m_mainPage->reset();
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 424f7ab..c7f9a84 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -100,6 +100,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didReceiveServerRedirectForProvisionalLoadForFrame,
didFailProvisionalLoadWithErrorForFrame,
didCommitLoadForFrame,
+ didFinishDocumentLoadForFrame,
didFinishLoadForFrame,
didFailLoadWithErrorForFrame,
didReceiveTitleForFrame,
@@ -107,7 +108,6 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didCancelClientRedirectForFrame,
willPerformClientRedirectForFrame,
didChangeLocationWithinPageForFrame,
- didFinishDocumentLoadForFrame,
didHandleOnloadEventsForFrame,
didDisplayInsecureContentForFrame,
didRunInsecureContentForFrame
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index f2393f1..d54bb1d 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -32,6 +32,7 @@
#include <WebKit2/WKBundleFrame.h>
#include <WebKit2/WKBundleFramePrivate.h>
#include <WebKit2/WKBundlePagePrivate.h>
+#include <WebKit2/WKBundleScriptWorld.h>
#include <WebKit2/WKBundlePrivate.h>
#include <WebKit2/WKRetainPtr.h>
#include <WebKit2/WebKit2.h>
@@ -163,6 +164,25 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
return WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time);
}
+void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
+{
+ WKRetainPtr<WKStringRef> sourceWK = toWK(source);
+ WKRetainPtr<WKBundleScriptWorldRef> scriptWorld(AdoptWK, WKBundleScriptWorldCreateWorld());
+
+ WKBundleAddUserScript(InjectedBundle::shared().bundle(), scriptWorld.get(), sourceWK.get(), 0, 0, 0,
+ (runAtStart ? kWKInjectAtDocumentStart : kWKInjectAtDocumentEnd),
+ (allFrames ? kWKInjectInAllFrames : kWKInjectInTopFrameOnly));
+}
+
+void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames)
+{
+ WKRetainPtr<WKStringRef> sourceWK = toWK(source);
+ WKRetainPtr<WKBundleScriptWorldRef> scriptWorld(AdoptWK, WKBundleScriptWorldCreateWorld());
+
+ WKBundleAddUserStyleSheet(InjectedBundle::shared().bundle(), scriptWorld.get(), sourceWK.get(), 0, 0, 0,
+ (allFrames ? kWKInjectInAllFrames : kWKInjectInTopFrameOnly));
+}
+
void LayoutTestController::keepWebHistory()
{
WKBundleSetShouldTrackVisitedLinks(InjectedBundle::shared().bundle(), true);
@@ -219,6 +239,11 @@ void LayoutTestController::setCanOpenWindows(bool)
// For now, just ignore this setting, and if we find later it's needed we can add it.
}
+void LayoutTestController::setXSSAuditorEnabled(bool enabled)
+{
+ WKBundleOverrideXSSAuditorEnabledForTestRunner(InjectedBundle::shared().bundle(), true);
+}
+
unsigned LayoutTestController::windowCount()
{
return InjectedBundle::shared().pageCount();
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index 7c3125c..2c112a7 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -62,6 +62,7 @@ public:
void setAcceptsEditing(bool value) { m_shouldAllowEditing = value; }
void setCanOpenWindows(bool);
void setCloseRemainingWindowsWhenComplete(bool value) { m_shouldCloseExtraWindows = value; }
+ void setXSSAuditorEnabled(bool);
unsigned windowCount();
// Special DOM functions.
@@ -80,6 +81,10 @@ public:
unsigned numberOfActiveAnimations() const;
bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
+ // UserContent testing.
+ void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);
+ void addUserStyleSheet(JSStringRef source, bool allFrames);
+
enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
WhatToDump whatToDump() const { return m_whatToDump; }
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index c8a78d5..6f97b9f 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -95,6 +95,8 @@ void TestController::initialize(int argc, const char* argv[])
{
platformInitialize();
+ bool printSupportedFeatures = false;
+
for (int i = 1; i < argc; ++i) {
std::string argument(argv[i]);
@@ -106,7 +108,11 @@ void TestController::initialize(int argc, const char* argv[])
m_verbose = true;
continue;
}
-
+ if (argument == "--print-supported-features") {
+ printSupportedFeatures = true;
+ break;
+ }
+
// Skip any other arguments that begin with '--'.
if (argument.length() >= 2 && argument[0] == '-' && argument[1] == '-')
continue;
@@ -114,6 +120,13 @@ void TestController::initialize(int argc, const char* argv[])
m_paths.push_back(argument);
}
+ if (printSupportedFeatures) {
+ // FIXME: On Windows, DumpRenderTree uses this to expose whether it supports 3d
+ // transforms and accelerated compositing. When we support those features, we
+ // should match DRT's behavior.
+ exit(0);
+ }
+
m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-");
if (m_usingServerMode)
m_printSeparators = true;
@@ -158,6 +171,7 @@ void TestController::initialize(int argc, const char* argv[])
0,
0,
0,
+ 0,
didFinishLoadForFrame,
0,
0,
@@ -184,6 +198,7 @@ void TestController::resetStateToConsistentValues()
WKPreferencesRef preferences = WKContextGetPreferences(m_context.get());
WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing);
+ WKPreferencesSetXSSAuditorEnabled(preferences, false);
m_mainWebView->focus();
diff --git a/WebKitTools/iExploder/htdocs/cssproperties.in b/WebKitTools/iExploder/htdocs/cssproperties.in
index fc2ee50..9ced1c3 100644
--- a/WebKitTools/iExploder/htdocs/cssproperties.in
+++ b/WebKitTools/iExploder/htdocs/cssproperties.in
@@ -1,4 +1,4 @@
-# From WebKit svn r55658 (WebCore/css/CSSPropertyNames.in)
+# From WebKit svn r66165 (WebCore/css/CSSPropertyNames.in)
-webkit-animation
-webkit-animation-delay
-webkit-animation-direction
@@ -14,11 +14,18 @@
-webkit-background-composite
-webkit-background-origin
-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
+-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
@@ -41,15 +48,20 @@
-webkit-column-rule-color
-webkit-column-rule-style
-webkit-column-rule-width
+-webkit-column-span
-webkit-column-width
-webkit-columns
-webkit-font-size-delta
-webkit-font-smoothing
-webkit-highlight
+-webkit-hyphenate-character
+-webkit-hyphenate-locale
+-webkit-hyphens
-webkit-line-break
-webkit-line-clamp
-webkit-margin-bottom-collapse
-webkit-margin-collapse
+-webkit-margin-end
-webkit-margin-start
-webkit-margin-top-collapse
-webkit-marquee
@@ -74,6 +86,7 @@
-webkit-mask-size
-webkit-match-nearest-mail-blockquote-color
-webkit-nbsp-mode
+-webkit-padding-end
-webkit-padding-start
-webkit-perspective
-webkit-perspective-origin
@@ -261,6 +274,9 @@ column-span
column-width
column-width-policy
+# Removed from WebKit between r53119 and r66165
+-webkit-binding
+
# Removed from WebKit between r44660 and r53119
-webkit-border-bottom-left-radius
-webkit-border-bottom-right-radius
diff --git a/WebKitTools/iExploder/htdocs/htmlattrs.in b/WebKitTools/iExploder/htdocs/htmlattrs.in
index 56b4050..0dc8116 100644
--- a/WebKitTools/iExploder/htdocs/htmlattrs.in
+++ b/WebKitTools/iExploder/htdocs/htmlattrs.in
@@ -1,4 +1,4 @@
-# From WebKit svn r55658 (WebCore/html/HTMLAttributeNames.in)
+# From WebKit svn r66165 (WebCore/html/HTMLAttributeNames.in)
abbr
accept
accept_charset
@@ -20,6 +20,7 @@ aria-expanded
aria-flowto
aria-grabbed
aria-haspopup
+aria-help
aria-hidden
aria-label
aria-labeledby
@@ -38,6 +39,7 @@ aria-valuemax
aria-valuemin
aria-valuenow
aria-valuetext
+async
autocomplete
autofocus
autoplay
@@ -94,6 +96,7 @@ frameborder
headers
height
hidden
+high
href
hreflang
hspace
@@ -113,6 +116,7 @@ longdesc
loop
loopend
loopstart
+low
lowsrc
manifest
marginheight
@@ -136,6 +140,7 @@ onbeforecopy
onbeforecut
onbeforeload
onbeforepaste
+onbeforeprocess
onbeforeunload
onblur
oncanplay
@@ -158,6 +163,8 @@ onemptied
onended
onerror
onfocus
+onfocusin
+onfocusout
onhashchange
oninput
oninvalid
@@ -212,6 +219,7 @@ onwebkitanimationstart
onwebkitbeginfullscreen
onwebkitendfullscreen
onwebkittransitionend
+optimum
pattern
placeholder
playcount
@@ -244,6 +252,7 @@ size
sortable
sortdirection
span
+speech
spellcheck
src
standby
@@ -268,6 +277,7 @@ version
viewsource
vlink
vspace
+webkitdirectory
width
wrap
diff --git a/WebKitTools/iExploder/htdocs/htmltags.in b/WebKitTools/iExploder/htdocs/htmltags.in
index f01d2a7..319d528 100644
--- a/WebKitTools/iExploder/htdocs/htmltags.in
+++ b/WebKitTools/iExploder/htdocs/htmltags.in
@@ -1,4 +1,4 @@
-# From WebKit svn r55658 (WebCore/html/HTMLTagNames.in)
+# From WebKit svn r66165 (WebCore/html/HTMLTagNames.in)
a
abbr
acronym
@@ -12,6 +12,7 @@ b
base
basefont
bdo
+bgsound
big
blockquote
body
@@ -24,12 +25,14 @@ cite
code
col
colgroup
+command
datagrid
datalist
dcell
dcol
dd
del
+details
dfn
dir
div
@@ -39,6 +42,8 @@ dt
em
embed
fieldset
+figcaption
+figure
font
footer
form
@@ -52,6 +57,7 @@ h5
h6
head
header
+hgroup
hr
html
i
@@ -70,9 +76,11 @@ li
link
listing
map
+mark
marquee
menu
meta
+meter
nav
nobr
noembed
@@ -88,6 +96,7 @@ p
param
plaintext
pre
+progress
q
rp
rt
@@ -104,6 +113,7 @@ strike
strong
style
sub
+summary
sup
table
tbody
@@ -114,6 +124,7 @@ th
thead
title
tr
+track
tt
u
ul
diff --git a/WebKitTools/wx/build/settings.py b/WebKitTools/wx/build/settings.py
index 74d9789..7dfaa5f 100644
--- a/WebKitTools/wx/build/settings.py
+++ b/WebKitTools/wx/build/settings.py
@@ -109,10 +109,12 @@ webcore_dirs = [
'WebCore/DerivedSources',
'WebCore/dom',
'WebCore/dom/default',
- 'WebCore/editing',
- 'WebCore/history',
+ 'WebCore/editing',
+ 'WebCore/fileapi',
+ 'WebCore/history',
'WebCore/html',
'WebCore/html/canvas',
+ 'WebCore/html/parser',
'WebCore/inspector',
'WebCore/loader',
'WebCore/loader/appcache',